Documentation ¶
Index ¶
- Variables
- type Agent
- type ClaimLoader
- type CloseFunc
- type GameContract
- type GameInfo
- type GamePlayer
- type L1HeaderSource
- type OracleRegistry
- type PrestateLoader
- type PrestateSource
- type PrestateValidator
- type Registry
- type Responder
- type RollupClient
- type SyncStatusProvider
- type SyncValidator
- type TxSender
- type Validator
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotInSync = errors.New("local node too far behind")
Functions ¶
This section is empty.
Types ¶
type ClaimLoader ¶
type CloseFunc ¶
type CloseFunc func()
func RegisterGameTypes ¶
func RegisterGameTypes( ctx context.Context, systemClock clock.Clock, l1Clock faultTypes.ClockReader, logger log.Logger, m metrics.Metricer, cfg *config.Config, registry Registry, oracles OracleRegistry, rollupClient RollupClient, txSender TxSender, gameFactory *contracts.DisputeGameFactoryContract, caller *batching.MultiCaller, l1HeaderSource L1HeaderSource, selective bool, claimants []common.Address, ) (CloseFunc, error)
type GameContract ¶
type GameContract interface { preimages.PreimageGameContract responder.GameContract claims.BondContract GameInfo ClaimLoader GetStatus(ctx context.Context) (gameTypes.GameStatus, error) GetMaxGameDepth(ctx context.Context) (types.Depth, error) GetMaxClockDuration(ctx context.Context) (time.Duration, error) GetOracle(ctx context.Context) (*contracts.PreimageOracleContract, error) GetL1Head(ctx context.Context) (common.Hash, error) }
type GamePlayer ¶
type GamePlayer struct {
// contains filtered or unexported fields
}
func NewGamePlayer ¶
func NewGamePlayer( ctx context.Context, systemClock clock.Clock, l1Clock types.ClockReader, logger log.Logger, m metrics.Metricer, dir string, addr common.Address, txSender TxSender, loader GameContract, syncValidator SyncValidator, validators []Validator, creator resourceCreator, l1HeaderSource L1HeaderSource, selective bool, claimants []common.Address, ) (*GamePlayer, error)
func (*GamePlayer) ProgressGame ¶
func (g *GamePlayer) ProgressGame(ctx context.Context) gameTypes.GameStatus
func (*GamePlayer) Status ¶
func (g *GamePlayer) Status() gameTypes.GameStatus
func (*GamePlayer) ValidatePrestate ¶
func (g *GamePlayer) ValidatePrestate(ctx context.Context) error
type L1HeaderSource ¶
type OracleRegistry ¶
type OracleRegistry interface {
RegisterOracle(oracle keccakTypes.LargePreimageOracle)
}
type PrestateSource ¶
type PrestateSource interface { // PrestatePath returns the path to the prestate file to use for the game. // The provided prestateHash may be used to differentiate between different states but no guarantee is made that // the returned prestate matches the supplied hash. PrestatePath(prestateHash common.Hash) (string, error) }
type PrestateValidator ¶
type PrestateValidator struct {
// contains filtered or unexported fields
}
func NewPrestateValidator ¶
func NewPrestateValidator(valueName string, contractProvider PrestateLoader, localProvider types.PrestateProvider) *PrestateValidator
type Registry ¶
type Registry interface { RegisterGameType(gameType uint32, creator scheduler.PlayerCreator) RegisterBondContract(gameType uint32, creator claims.BondContractCreator) }
type Responder ¶
type Responder interface { CallResolve(ctx context.Context) (gameTypes.GameStatus, error) Resolve() error CallResolveClaim(ctx context.Context, claimIdx uint64) error ResolveClaims(claimIdx ...uint64) error PerformAction(ctx context.Context, action types.Action) error }
Responder takes a response action & executes. For full op-challenger this means executing the transaction on chain.
type RollupClient ¶
type RollupClient interface { outputs.OutputRollupClient SyncStatusProvider }
type SyncStatusProvider ¶
type SyncStatusProvider interface {
SyncStatus(context.Context) (*eth.SyncStatus, error)
}
type SyncValidator ¶
Click to show internal directories.
Click to hide internal directories.