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 RegisterTask
- func NewAlphabetRegisterTask(gameType faultTypes.GameType) *RegisterTask
- func NewAsteriscKonaRegisterTask(gameType faultTypes.GameType, cfg *config.Config, m caching.Metrics, ...) *RegisterTask
- func NewAsteriscRegisterTask(gameType faultTypes.GameType, cfg *config.Config, m caching.Metrics, ...) *RegisterTask
- func NewCannonRegisterTask(gameType faultTypes.GameType, cfg *config.Config, m caching.Metrics, ...) *RegisterTask
- 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 ¶ added in v1.4.2
type CloseFunc func()
func RegisterGameTypes ¶ added in v1.4.2
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 ¶ added in v1.4.2
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 ¶ added in v1.4.2
func (g *GamePlayer) ValidatePrestate(ctx context.Context) error
type L1HeaderSource ¶ added in v1.7.0
type OracleRegistry ¶ added in v1.7.2
type OracleRegistry interface {
RegisterOracle(oracle keccakTypes.LargePreimageOracle)
}
type PrestateSource ¶ added in v1.7.6
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(ctx context.Context, prestateHash common.Hash) (string, error) }
type PrestateValidator ¶ added in v1.4.2
type PrestateValidator struct {
// contains filtered or unexported fields
}
func NewPrestateValidator ¶ added in v1.4.2
func NewPrestateValidator(valueName string, contractProvider PrestateLoader, localProvider types.PrestateProvider) *PrestateValidator
type RegisterTask ¶ added in v1.9.1
type RegisterTask struct {
// contains filtered or unexported fields
}
func NewAlphabetRegisterTask ¶ added in v1.9.1
func NewAlphabetRegisterTask(gameType faultTypes.GameType) *RegisterTask
func NewAsteriscKonaRegisterTask ¶ added in v1.9.3
func NewAsteriscKonaRegisterTask(gameType faultTypes.GameType, cfg *config.Config, m caching.Metrics, serverExecutor vm.OracleServerExecutor) *RegisterTask
func NewAsteriscRegisterTask ¶ added in v1.9.1
func NewAsteriscRegisterTask(gameType faultTypes.GameType, cfg *config.Config, m caching.Metrics, serverExecutor vm.OracleServerExecutor) *RegisterTask
func NewCannonRegisterTask ¶ added in v1.9.1
func NewCannonRegisterTask(gameType faultTypes.GameType, cfg *config.Config, m caching.Metrics, serverExecutor vm.OracleServerExecutor) *RegisterTask
func (*RegisterTask) Register ¶ added in v1.9.1
func (e *RegisterTask) Register( ctx context.Context, registry Registry, oracles OracleRegistry, systemClock clock.Clock, l1Clock faultTypes.ClockReader, logger log.Logger, m metrics.Metricer, syncValidator SyncValidator, rollupClient outputs.OutputRollupClient, txSender TxSender, gameFactory *contracts.DisputeGameFactoryContract, caller *batching.MultiCaller, l2Client utils.L2HeaderSource, l1HeaderSource L1HeaderSource, selective bool, claimants []common.Address) error
type Registry ¶ added in v1.4.2
type Registry interface { RegisterGameType(gameType faultTypes.GameType, creator scheduler.PlayerCreator) RegisterBondContract(gameType faultTypes.GameType, 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 ¶ added in v1.7.0
type RollupClient interface { outputs.OutputRollupClient SyncStatusProvider }
type SyncStatusProvider ¶ added in v1.7.0
type SyncStatusProvider interface {
SyncStatus(context.Context) (*eth.SyncStatus, error)
}
type SyncValidator ¶ added in v1.7.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.