Documentation ¶
Index ¶
- type AlphabetGameHelper
- type ClaimHelper
- func (c *ClaimHelper) AgreesWithOutputRoot() bool
- func (c *ClaimHelper) Attack(ctx context.Context, value common.Hash) *ClaimHelper
- func (c *ClaimHelper) Defend(ctx context.Context, value common.Hash) *ClaimHelper
- func (c *ClaimHelper) Depth() types.Depth
- func (c *ClaimHelper) IsBottomGameRoot(ctx context.Context) bool
- func (c *ClaimHelper) IsMaxDepth(ctx context.Context) bool
- func (c *ClaimHelper) IsOutputRoot(ctx context.Context) bool
- func (c *ClaimHelper) IsOutputRootLeaf(ctx context.Context) bool
- func (c *ClaimHelper) IsRootClaim() bool
- func (c *ClaimHelper) RequireCorrectOutputRoot(ctx context.Context)
- func (c *ClaimHelper) RequireDifferentClaimValue(other *ClaimHelper)
- func (c *ClaimHelper) RequireOnlyCounteredBy(ctx context.Context, expected ...*ClaimHelper)
- func (c *ClaimHelper) WaitForCounterClaim(ctx context.Context, ignoreClaims ...*ClaimHelper) *ClaimHelper
- func (c *ClaimHelper) WaitForCountered(ctx context.Context)
- type ContractClaim
- type DishonestHelper
- func (t *DishonestHelper) Attack(ctx context.Context, claimIndex int64)
- func (t *DishonestHelper) AttackCorrect(ctx context.Context, claimIndex int64)
- func (t *DishonestHelper) Defend(ctx context.Context, claimIndex int64)
- func (t *DishonestHelper) DefendCorrect(ctx context.Context, claimIndex int64)
- func (d *DishonestHelper) ExhaustDishonestClaims(ctx context.Context, rootClaim *ClaimHelper)
- type DisputeSystem
- type ErrWithData
- type FactoryHelper
- func (h *FactoryHelper) StartChallenger(ctx context.Context, name string, options ...challenger.Option) *challenger.Helper
- func (h *FactoryHelper) StartOutputAlphabetGame(ctx context.Context, l2Node string, l2BlockNumber uint64, ...) *OutputAlphabetGameHelper
- func (h *FactoryHelper) StartOutputAlphabetGameWithCorrectRoot(ctx context.Context, l2Node string, l2BlockNumber uint64) *OutputAlphabetGameHelper
- func (h *FactoryHelper) StartOutputCannonGame(ctx context.Context, l2Node string, l2BlockNumber uint64, ...) *OutputCannonGameHelper
- func (h *FactoryHelper) StartOutputCannonGameWithCorrectRoot(ctx context.Context, l2Node string, l2BlockNumber uint64) *OutputCannonGameHelper
- type FaultGameHelper
- func (g *FaultGameHelper) Addr() common.Address
- func (g *FaultGameHelper) Attack(ctx context.Context, claimIdx int64, claim common.Hash)
- func (g *FaultGameHelper) ChallengeRootClaim(ctx context.Context, performMove func(parentClaimIdx int64), ...)
- func (g *FaultGameHelper) Defend(ctx context.Context, claimIdx int64, claim common.Hash)
- func (g *FaultGameHelper) DefendRootClaim(ctx context.Context, performMove func(parentClaimIdx int64))
- func (g *FaultGameHelper) GameDuration(ctx context.Context) time.Duration
- func (g *FaultGameHelper) GetClaimPosition(ctx context.Context, claimIdx int64) types.Position
- func (g *FaultGameHelper) GetClaimValue(ctx context.Context, claimIdx int64) common.Hash
- func (g *FaultGameHelper) LogGameData(ctx context.Context)
- func (g *FaultGameHelper) MaxDepth(ctx context.Context) types.Depth
- func (g *FaultGameHelper) Resolve(ctx context.Context)
- func (g *FaultGameHelper) ResolveClaim(ctx context.Context, claimIdx int64)
- func (g *FaultGameHelper) Status(ctx context.Context) Status
- func (g *FaultGameHelper) StepFails(claimIdx int64, isAttack bool, stateData []byte, proof []byte)
- func (g *FaultGameHelper) WaitForAllClaimsCountered(ctx context.Context)
- func (g *FaultGameHelper) WaitForClaimAtDepth(ctx context.Context, depth types.Depth)
- func (g *FaultGameHelper) WaitForClaimAtMaxDepth(ctx context.Context, countered bool)
- func (g *FaultGameHelper) WaitForClaimCount(ctx context.Context, count int64)
- func (g *FaultGameHelper) WaitForGameStatus(ctx context.Context, expected Status)
- func (g *FaultGameHelper) WaitForInactivity(ctx context.Context, numInactiveBlocks int, untilGameEnds bool)
- func (g *FaultGameHelper) WaitForNewClaim(ctx context.Context, checkPoint int64) (int64, error)
- type HonestHelper
- type Mover
- type OutputAlphabetGameHelper
- func (g *OutputAlphabetGameHelper) CreateDishonestHelper(ctx context.Context, l2Node string, defender bool) *DishonestHelper
- func (g *OutputAlphabetGameHelper) CreateHonestActor(ctx context.Context, l2Node string) *OutputHonestHelper
- func (g *OutputAlphabetGameHelper) StartChallenger(ctx context.Context, l2Node string, name string, options ...challenger.Option) *challenger.Helper
- type OutputCannonGameHelper
- type OutputGameHelper
- func (g *OutputGameHelper) Addr() common.Address
- func (g *OutputGameHelper) Attack(ctx context.Context, claimIdx int64, claim common.Hash)
- func (g *OutputGameHelper) ChallengeClaim(ctx context.Context, claim *ClaimHelper, performMove Mover, ...)
- func (g *OutputGameHelper) Defend(ctx context.Context, claimIdx int64, claim common.Hash)
- func (g *OutputGameHelper) DefendClaim(ctx context.Context, claim *ClaimHelper, performMove Mover)
- func (g *OutputGameHelper) DisputeLastBlock(ctx context.Context) *ClaimHelper
- func (g *OutputGameHelper) GameDuration(ctx context.Context) time.Duration
- func (g *OutputGameHelper) GenesisBlockNum(ctx context.Context) uint64
- func (g *OutputGameHelper) GetClaimValue(ctx context.Context, claimIdx int64) common.Hash
- func (g *OutputGameHelper) L2BlockNum(ctx context.Context) uint64
- func (g *OutputGameHelper) LogGameData(ctx context.Context)
- func (g *OutputGameHelper) MaxDepth(ctx context.Context) types.Depth
- func (g *OutputGameHelper) Resolve(ctx context.Context)
- func (g *OutputGameHelper) ResolveClaim(ctx context.Context, claimIdx int64)
- func (g *OutputGameHelper) RootClaim(ctx context.Context) *ClaimHelper
- func (g *OutputGameHelper) SplitDepth(ctx context.Context) types.Depth
- func (g *OutputGameHelper) Status(ctx context.Context) Status
- func (g *OutputGameHelper) StepFails(claimIdx int64, isAttack bool, stateData []byte, proof []byte)
- func (g *OutputGameHelper) WaitForAllClaimsCountered(ctx context.Context)
- func (g *OutputGameHelper) WaitForClaimAtDepth(ctx context.Context, depth types.Depth)
- func (g *OutputGameHelper) WaitForClaimAtMaxDepth(ctx context.Context, countered bool)
- func (g *OutputGameHelper) WaitForClaimCount(ctx context.Context, count int64)
- func (g *OutputGameHelper) WaitForCorrectOutputRoot(ctx context.Context, claimIdx int64)
- func (g *OutputGameHelper) WaitForGameStatus(ctx context.Context, expected Status)
- func (g *OutputGameHelper) WaitForInactivity(ctx context.Context, numInactiveBlocks int, untilGameEnds bool)
- func (g *OutputGameHelper) WaitForNewClaim(ctx context.Context, checkPoint int64) (int64, error)
- type OutputHonestHelper
- func (h *OutputHonestHelper) Attack(ctx context.Context, claimIdx int64)
- func (h *OutputHonestHelper) AttackClaim(ctx context.Context, claim *ClaimHelper) *ClaimHelper
- func (h *OutputHonestHelper) Defend(ctx context.Context, claimIdx int64)
- func (h *OutputHonestHelper) DefendClaim(ctx context.Context, claim *ClaimHelper) *ClaimHelper
- func (h *OutputHonestHelper) StepClaimFails(ctx context.Context, claim *ClaimHelper, isAttack bool)
- func (h *OutputHonestHelper) StepFails(ctx context.Context, claimIdx int64, isAttack bool)
- type Status
- type Stepper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlphabetGameHelper ¶ added in v1.1.4
type AlphabetGameHelper struct {
FaultGameHelper
}
func (*AlphabetGameHelper) CreateHonestActor ¶ added in v1.1.6
func (g *AlphabetGameHelper) CreateHonestActor(alphabetTrace string, depth types.Depth) *HonestHelper
func (*AlphabetGameHelper) StartChallenger ¶ added in v1.1.4
func (g *AlphabetGameHelper) StartChallenger(ctx context.Context, l1Endpoint string, name string, options ...challenger.Option) *challenger.Helper
type ClaimHelper ¶ added in v1.4.2
type ClaimHelper struct {
// contains filtered or unexported fields
}
func (*ClaimHelper) AgreesWithOutputRoot ¶ added in v1.4.2
func (c *ClaimHelper) AgreesWithOutputRoot() bool
func (*ClaimHelper) Attack ¶ added in v1.4.2
func (c *ClaimHelper) Attack(ctx context.Context, value common.Hash) *ClaimHelper
func (*ClaimHelper) Defend ¶ added in v1.4.2
func (c *ClaimHelper) Defend(ctx context.Context, value common.Hash) *ClaimHelper
func (*ClaimHelper) Depth ¶ added in v1.4.3
func (c *ClaimHelper) Depth() types.Depth
func (*ClaimHelper) IsBottomGameRoot ¶ added in v1.4.3
func (c *ClaimHelper) IsBottomGameRoot(ctx context.Context) bool
func (*ClaimHelper) IsMaxDepth ¶ added in v1.4.2
func (c *ClaimHelper) IsMaxDepth(ctx context.Context) bool
func (*ClaimHelper) IsOutputRoot ¶ added in v1.4.2
func (c *ClaimHelper) IsOutputRoot(ctx context.Context) bool
func (*ClaimHelper) IsOutputRootLeaf ¶ added in v1.4.2
func (c *ClaimHelper) IsOutputRootLeaf(ctx context.Context) bool
func (*ClaimHelper) IsRootClaim ¶ added in v1.4.3
func (c *ClaimHelper) IsRootClaim() bool
func (*ClaimHelper) RequireCorrectOutputRoot ¶ added in v1.4.2
func (c *ClaimHelper) RequireCorrectOutputRoot(ctx context.Context)
func (*ClaimHelper) RequireDifferentClaimValue ¶ added in v1.4.2
func (c *ClaimHelper) RequireDifferentClaimValue(other *ClaimHelper)
func (*ClaimHelper) RequireOnlyCounteredBy ¶ added in v1.4.3
func (c *ClaimHelper) RequireOnlyCounteredBy(ctx context.Context, expected ...*ClaimHelper)
func (*ClaimHelper) WaitForCounterClaim ¶ added in v1.4.2
func (c *ClaimHelper) WaitForCounterClaim(ctx context.Context, ignoreClaims ...*ClaimHelper) *ClaimHelper
WaitForCounterClaim waits for the claim to be countered by another claim being posted. It returns a helper for the claim that countered this one.
func (*ClaimHelper) WaitForCountered ¶ added in v1.4.2
func (c *ClaimHelper) WaitForCountered(ctx context.Context)
WaitForCountered waits until the claim is countered either by a child claim or by a step call.
type ContractClaim ¶
type DishonestHelper ¶ added in v1.1.6
type DishonestHelper struct { *OutputGameHelper *OutputHonestHelper // contains filtered or unexported fields }
func (*DishonestHelper) Attack ¶ added in v1.1.6
func (t *DishonestHelper) Attack(ctx context.Context, claimIndex int64)
func (*DishonestHelper) AttackCorrect ¶ added in v1.1.6
func (t *DishonestHelper) AttackCorrect(ctx context.Context, claimIndex int64)
func (*DishonestHelper) Defend ¶ added in v1.1.6
func (t *DishonestHelper) Defend(ctx context.Context, claimIndex int64)
func (*DishonestHelper) DefendCorrect ¶ added in v1.1.6
func (t *DishonestHelper) DefendCorrect(ctx context.Context, claimIndex int64)
func (*DishonestHelper) ExhaustDishonestClaims ¶ added in v1.1.6
func (d *DishonestHelper) ExhaustDishonestClaims(ctx context.Context, rootClaim *ClaimHelper)
ExhaustDishonestClaims makes all possible significant moves (mod honest challenger's) in a game. It is very inefficient and should NOT be used on games with large depths
type DisputeSystem ¶ added in v1.4.2
type ErrWithData ¶ added in v1.1.6
type ErrWithData interface {
ErrorData() interface{}
}
type FactoryHelper ¶
type FactoryHelper struct {
// contains filtered or unexported fields
}
func NewFactoryHelper ¶
func NewFactoryHelper(t *testing.T, ctx context.Context, system DisputeSystem) *FactoryHelper
func (*FactoryHelper) StartChallenger ¶ added in v1.1.4
func (h *FactoryHelper) StartChallenger(ctx context.Context, name string, options ...challenger.Option) *challenger.Helper
func (*FactoryHelper) StartOutputAlphabetGame ¶ added in v1.4.2
func (h *FactoryHelper) StartOutputAlphabetGame(ctx context.Context, l2Node string, l2BlockNumber uint64, rootClaim common.Hash) *OutputAlphabetGameHelper
func (*FactoryHelper) StartOutputAlphabetGameWithCorrectRoot ¶ added in v1.4.3
func (h *FactoryHelper) StartOutputAlphabetGameWithCorrectRoot(ctx context.Context, l2Node string, l2BlockNumber uint64) *OutputAlphabetGameHelper
func (*FactoryHelper) StartOutputCannonGame ¶ added in v1.4.2
func (h *FactoryHelper) StartOutputCannonGame(ctx context.Context, l2Node string, l2BlockNumber uint64, rootClaim common.Hash) *OutputCannonGameHelper
func (*FactoryHelper) StartOutputCannonGameWithCorrectRoot ¶ added in v1.4.2
func (h *FactoryHelper) StartOutputCannonGameWithCorrectRoot(ctx context.Context, l2Node string, l2BlockNumber uint64) *OutputCannonGameHelper
type FaultGameHelper ¶
type FaultGameHelper struct {
// contains filtered or unexported fields
}
func (*FaultGameHelper) Addr ¶ added in v1.1.6
func (g *FaultGameHelper) Addr() common.Address
func (*FaultGameHelper) ChallengeRootClaim ¶ added in v1.1.6
func (g *FaultGameHelper) ChallengeRootClaim(ctx context.Context, performMove func(parentClaimIdx int64), attemptStep Stepper)
ChallengeRootClaim uses the supplied Mover and Stepper to perform moves and steps in an attempt to challenge the root claim. It is assumed that the output root being disputed is invalid and that an honest op-challenger is already running. When the game has reached the maximum depth it calls the Stepper to attempt to counter the leaf claim. Since the output root is invalid, it should not be possible for the Stepper to call step successfully.
func (*FaultGameHelper) DefendRootClaim ¶ added in v1.1.6
func (g *FaultGameHelper) DefendRootClaim(ctx context.Context, performMove func(parentClaimIdx int64))
DefendRootClaim uses the supplied Mover to perform moves in an attempt to defend the root claim. It is assumed that the output root being disputed is valid and that an honest op-challenger is already running. When the game has reached the maximum depth it waits for the honest challenger to counter the leaf claim with step.
func (*FaultGameHelper) GameDuration ¶ added in v1.1.4
func (g *FaultGameHelper) GameDuration(ctx context.Context) time.Duration
func (*FaultGameHelper) GetClaimPosition ¶ added in v1.2.0
func (*FaultGameHelper) GetClaimValue ¶ added in v1.1.6
func (*FaultGameHelper) LogGameData ¶ added in v1.1.4
func (g *FaultGameHelper) LogGameData(ctx context.Context)
func (*FaultGameHelper) MaxDepth ¶ added in v1.1.4
func (g *FaultGameHelper) MaxDepth(ctx context.Context) types.Depth
func (*FaultGameHelper) Resolve ¶
func (g *FaultGameHelper) Resolve(ctx context.Context)
func (*FaultGameHelper) ResolveClaim ¶ added in v1.1.6
func (g *FaultGameHelper) ResolveClaim(ctx context.Context, claimIdx int64)
ResolveClaim resolves a single subgame
func (*FaultGameHelper) Status ¶ added in v1.1.6
func (g *FaultGameHelper) Status(ctx context.Context) Status
func (*FaultGameHelper) StepFails ¶ added in v1.1.6
func (g *FaultGameHelper) StepFails(claimIdx int64, isAttack bool, stateData []byte, proof []byte)
StepFails attempts to call step and verifies that it fails with ValidStep()
func (*FaultGameHelper) WaitForAllClaimsCountered ¶ added in v1.1.6
func (g *FaultGameHelper) WaitForAllClaimsCountered(ctx context.Context)
func (*FaultGameHelper) WaitForClaimAtDepth ¶ added in v1.1.6
func (g *FaultGameHelper) WaitForClaimAtDepth(ctx context.Context, depth types.Depth)
func (*FaultGameHelper) WaitForClaimAtMaxDepth ¶
func (g *FaultGameHelper) WaitForClaimAtMaxDepth(ctx context.Context, countered bool)
func (*FaultGameHelper) WaitForClaimCount ¶
func (g *FaultGameHelper) WaitForClaimCount(ctx context.Context, count int64)
WaitForClaimCount waits until there are at least count claims in the game. This does not check that the number of claims is exactly the specified count to avoid intermittent failures where a challenger posts an additional claim before this method sees the number of claims it was waiting for.
func (*FaultGameHelper) WaitForGameStatus ¶
func (g *FaultGameHelper) WaitForGameStatus(ctx context.Context, expected Status)
func (*FaultGameHelper) WaitForInactivity ¶ added in v1.1.6
func (g *FaultGameHelper) WaitForInactivity(ctx context.Context, numInactiveBlocks int, untilGameEnds bool)
func (*FaultGameHelper) WaitForNewClaim ¶ added in v1.1.6
type HonestHelper ¶ added in v1.1.4
type HonestHelper struct {
// contains filtered or unexported fields
}
func (*HonestHelper) Attack ¶ added in v1.1.4
func (h *HonestHelper) Attack(ctx context.Context, claimIdx int64)
type Mover ¶ added in v1.1.6
type Mover func(parent *ClaimHelper) *ClaimHelper
Mover is a function that either attacks or defends the claim at parentClaimIdx
type OutputAlphabetGameHelper ¶ added in v1.4.2
type OutputAlphabetGameHelper struct {
OutputGameHelper
}
func (*OutputAlphabetGameHelper) CreateDishonestHelper ¶ added in v1.4.3
func (g *OutputAlphabetGameHelper) CreateDishonestHelper(ctx context.Context, l2Node string, defender bool) *DishonestHelper
func (*OutputAlphabetGameHelper) CreateHonestActor ¶ added in v1.4.3
func (g *OutputAlphabetGameHelper) CreateHonestActor(ctx context.Context, l2Node string) *OutputHonestHelper
func (*OutputAlphabetGameHelper) StartChallenger ¶ added in v1.4.2
func (g *OutputAlphabetGameHelper) StartChallenger( ctx context.Context, l2Node string, name string, options ...challenger.Option, ) *challenger.Helper
type OutputCannonGameHelper ¶ added in v1.4.2
type OutputCannonGameHelper struct {
OutputGameHelper
}
func (*OutputCannonGameHelper) CreateHonestActor ¶ added in v1.4.2
func (g *OutputCannonGameHelper) CreateHonestActor(ctx context.Context, l2Node string, options ...challenger.Option) *OutputHonestHelper
func (*OutputCannonGameHelper) StartChallenger ¶ added in v1.4.2
func (g *OutputCannonGameHelper) StartChallenger( ctx context.Context, l2Node string, name string, options ...challenger.Option, ) *challenger.Helper
type OutputGameHelper ¶ added in v1.4.2
type OutputGameHelper struct {
// contains filtered or unexported fields
}
func (*OutputGameHelper) Addr ¶ added in v1.4.2
func (g *OutputGameHelper) Addr() common.Address
func (*OutputGameHelper) ChallengeClaim ¶ added in v1.4.3
func (g *OutputGameHelper) ChallengeClaim(ctx context.Context, claim *ClaimHelper, performMove Mover, attemptStep Stepper)
ChallengeClaim uses the supplied functions to perform moves and steps in an attempt to challenge the supplied claim. It is assumed that the claim being disputed is valid and that an honest op-challenger is already running. When the game has reached the maximum depth it calls the Stepper to attempt to counter the leaf claim. Since the output root is valid, it should not be possible for the Stepper to call step successfully.
func (*OutputGameHelper) DefendClaim ¶ added in v1.4.3
func (g *OutputGameHelper) DefendClaim(ctx context.Context, claim *ClaimHelper, performMove Mover)
DefendClaim uses the supplied Mover to perform moves in an attempt to defend the supplied claim. It is assumed that the specified claim is invalid and that an honest op-challenger is already running. When the game has reached the maximum depth it waits for the honest challenger to counter the leaf claim with step.
func (*OutputGameHelper) DisputeLastBlock ¶ added in v1.4.2
func (g *OutputGameHelper) DisputeLastBlock(ctx context.Context) *ClaimHelper
DisputeLastBlock posts claims from both the honest and dishonest actor to progress the output root part of the game through to the split depth and the claims are setup such that the last block in the game range is the block to execute cannon on. ie the first block the honest and dishonest actors disagree about is the l2 block of the game.
func (*OutputGameHelper) GameDuration ¶ added in v1.4.2
func (g *OutputGameHelper) GameDuration(ctx context.Context) time.Duration
func (*OutputGameHelper) GenesisBlockNum ¶ added in v1.4.2
func (g *OutputGameHelper) GenesisBlockNum(ctx context.Context) uint64
func (*OutputGameHelper) GetClaimValue ¶ added in v1.4.2
func (*OutputGameHelper) L2BlockNum ¶ added in v1.4.2
func (g *OutputGameHelper) L2BlockNum(ctx context.Context) uint64
func (*OutputGameHelper) LogGameData ¶ added in v1.4.2
func (g *OutputGameHelper) LogGameData(ctx context.Context)
func (*OutputGameHelper) MaxDepth ¶ added in v1.4.2
func (g *OutputGameHelper) MaxDepth(ctx context.Context) types.Depth
func (*OutputGameHelper) Resolve ¶ added in v1.4.2
func (g *OutputGameHelper) Resolve(ctx context.Context)
func (*OutputGameHelper) ResolveClaim ¶ added in v1.4.2
func (g *OutputGameHelper) ResolveClaim(ctx context.Context, claimIdx int64)
ResolveClaim resolves a single subgame
func (*OutputGameHelper) RootClaim ¶ added in v1.4.2
func (g *OutputGameHelper) RootClaim(ctx context.Context) *ClaimHelper
func (*OutputGameHelper) SplitDepth ¶ added in v1.4.2
func (g *OutputGameHelper) SplitDepth(ctx context.Context) types.Depth
func (*OutputGameHelper) Status ¶ added in v1.4.2
func (g *OutputGameHelper) Status(ctx context.Context) Status
func (*OutputGameHelper) StepFails ¶ added in v1.4.2
func (g *OutputGameHelper) StepFails(claimIdx int64, isAttack bool, stateData []byte, proof []byte)
StepFails attempts to call step and verifies that it fails with ValidStep()
func (*OutputGameHelper) WaitForAllClaimsCountered ¶ added in v1.4.2
func (g *OutputGameHelper) WaitForAllClaimsCountered(ctx context.Context)
func (*OutputGameHelper) WaitForClaimAtDepth ¶ added in v1.4.2
func (g *OutputGameHelper) WaitForClaimAtDepth(ctx context.Context, depth types.Depth)
func (*OutputGameHelper) WaitForClaimAtMaxDepth ¶ added in v1.4.2
func (g *OutputGameHelper) WaitForClaimAtMaxDepth(ctx context.Context, countered bool)
func (*OutputGameHelper) WaitForClaimCount ¶ added in v1.4.2
func (g *OutputGameHelper) WaitForClaimCount(ctx context.Context, count int64)
WaitForClaimCount waits until there are at least count claims in the game. This does not check that the number of claims is exactly the specified count to avoid intermittent failures where a challenger posts an additional claim before this method sees the number of claims it was waiting for.
func (*OutputGameHelper) WaitForCorrectOutputRoot ¶ added in v1.4.2
func (g *OutputGameHelper) WaitForCorrectOutputRoot(ctx context.Context, claimIdx int64)
func (*OutputGameHelper) WaitForGameStatus ¶ added in v1.4.2
func (g *OutputGameHelper) WaitForGameStatus(ctx context.Context, expected Status)
func (*OutputGameHelper) WaitForInactivity ¶ added in v1.4.2
func (g *OutputGameHelper) WaitForInactivity(ctx context.Context, numInactiveBlocks int, untilGameEnds bool)
func (*OutputGameHelper) WaitForNewClaim ¶ added in v1.4.2
type OutputHonestHelper ¶ added in v1.4.2
type OutputHonestHelper struct {
// contains filtered or unexported fields
}
func (*OutputHonestHelper) Attack ¶ added in v1.4.2
func (h *OutputHonestHelper) Attack(ctx context.Context, claimIdx int64)
func (*OutputHonestHelper) AttackClaim ¶ added in v1.4.3
func (h *OutputHonestHelper) AttackClaim(ctx context.Context, claim *ClaimHelper) *ClaimHelper
func (*OutputHonestHelper) Defend ¶ added in v1.4.2
func (h *OutputHonestHelper) Defend(ctx context.Context, claimIdx int64)
func (*OutputHonestHelper) DefendClaim ¶ added in v1.4.3
func (h *OutputHonestHelper) DefendClaim(ctx context.Context, claim *ClaimHelper) *ClaimHelper
func (*OutputHonestHelper) StepClaimFails ¶ added in v1.4.3
func (h *OutputHonestHelper) StepClaimFails(ctx context.Context, claim *ClaimHelper, isAttack bool)