proofs

package
v1.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactBytecode

type ArtifactBytecode struct {
	Object string `json:"object"`
}

type ArtifactJSON

type ArtifactJSON struct {
	Bytecode ArtifactBytecode `json:"bytecode"`
	ABI      json.RawMessage  `json:"abi"`
}

type Claim

type Claim struct {
	Index uint64
	// contains filtered or unexported fields
}

func (*Claim) Attack

func (c *Claim) Attack(eoa *dsl.EOA, newClaim common.Hash) *Claim

func (*Claim) Bond

func (c *Claim) Bond() *big.Int

func (*Claim) Claimant

func (c *Claim) Claimant() common.Address

func (*Claim) CounteredBy

func (c *Claim) CounteredBy() common.Address

func (*Claim) Defend

func (c *Claim) Defend(eoa *dsl.EOA, newClaim common.Hash) *Claim

func (*Claim) Depth

func (c *Claim) Depth() types.Depth

func (*Claim) Position

func (c *Claim) Position() types.Position

func (*Claim) String

func (c *Claim) String() string

func (*Claim) Value

func (c *Claim) Value() common.Hash

func (*Claim) VerifyNoCounterClaim

func (c *Claim) VerifyNoCounterClaim()

func (*Claim) WaitForCounterClaim

func (c *Claim) WaitForCounterClaim(ignoreClaims ...*Claim) *Claim

WaitForCounterClaim waits for the claim to be countered by another claim being posted. Return the new claim that counters this claim.

func (*Claim) WaitForCountered

func (c *Claim) WaitForCountered()

WaitForCountered waits until the claim is countered either by a child claim or by a step call.

type DisputeGameFactory

type DisputeGameFactory struct {
	// contains filtered or unexported fields
}

func NewDisputeGameFactory

func NewDisputeGameFactory(
	t devtest.T,
	l1Network *dsl.L1Network,
	ethClient apis.EthClient,
	dgfAddr common.Address,
	l2CL *dsl.L2CLNode,
	l2EL *dsl.L2ELNode,
	superNode *dsl.Supernode,
	challengerCfg *challengerConfig.Config,
) *DisputeGameFactory

func (*DisputeGameFactory) Address

func (f *DisputeGameFactory) Address() common.Address

func (*DisputeGameFactory) CreateHelperEOA

func (f *DisputeGameFactory) CreateHelperEOA(eoa *dsl.EOA) *GameHelperEOA

func (*DisputeGameFactory) GameArgs

func (f *DisputeGameFactory) GameArgs(gameType gameTypes.GameType) []byte

func (*DisputeGameFactory) GameAtIndex

func (f *DisputeGameFactory) GameAtIndex(idx int64) *FaultDisputeGame

func (*DisputeGameFactory) GameCount

func (f *DisputeGameFactory) GameCount() int64

func (*DisputeGameFactory) GameImpl

func (f *DisputeGameFactory) GameImpl(gameType gameTypes.GameType) *FaultDisputeGame

func (*DisputeGameFactory) RunFPP

func (f *DisputeGameFactory) RunFPP(startTimestamp uint64, endTimestamp uint64)

RunFPP runs the fault proof program between the two supplied timestamps. Currently only supports kona-interop.

func (*DisputeGameFactory) StartCannonGame

func (f *DisputeGameFactory) StartCannonGame(eoa *dsl.EOA, opts ...GameOpt) *FaultDisputeGame

func (*DisputeGameFactory) StartCannonKonaGame

func (f *DisputeGameFactory) StartCannonKonaGame(eoa *dsl.EOA, opts ...GameOpt) *FaultDisputeGame

func (*DisputeGameFactory) StartSuperCannonKonaGame

func (f *DisputeGameFactory) StartSuperCannonKonaGame(eoa *dsl.EOA, opts ...GameOpt) *SuperFaultDisputeGame

func (*DisputeGameFactory) SuperGameAtIndex

func (f *DisputeGameFactory) SuperGameAtIndex(idx int64) *SuperFaultDisputeGame

func (*DisputeGameFactory) VerifyGameImplAbsent

func (f *DisputeGameFactory) VerifyGameImplAbsent(gameType gameTypes.GameType)

func (*DisputeGameFactory) VerifyGameImplPresent

func (f *DisputeGameFactory) VerifyGameImplPresent(gameType gameTypes.GameType)

func (*DisputeGameFactory) WaitForGame

func (f *DisputeGameFactory) WaitForGame() *FaultDisputeGame

func (*DisputeGameFactory) ZKGameImpl added in v1.17.0

func (f *DisputeGameFactory) ZKGameImpl() *ZKDisputeGame

ZKGameImpl returns the ZK dispute game implementation address and its parsed constructor args from the DisputeGameFactory.

type FaultDisputeGame

type FaultDisputeGame struct {
	Address common.Address
	// contains filtered or unexported fields
}

func NewFaultDisputeGame

func NewFaultDisputeGame(
	t devtest.T,
	require *require.Assertions,
	addr common.Address,
	helperProvider gameHelperProvider,
	honestTrace func(game *FaultDisputeGame) challengerTypes.TraceAccessor,
	game *bindings.FaultDisputeGame,
) *FaultDisputeGame

func (*FaultDisputeGame) Attack

func (g *FaultDisputeGame) Attack(eoa *dsl.EOA, claimIdx uint64, newClaim common.Hash)

func (*FaultDisputeGame) ClaimAtIndex

func (g *FaultDisputeGame) ClaimAtIndex(claimIndex uint64) *Claim

func (*FaultDisputeGame) Defend

func (g *FaultDisputeGame) Defend(eoa *dsl.EOA, claimIdx uint64, newClaim common.Hash)

func (*FaultDisputeGame) DisputeL2SequenceNumber

func (g *FaultDisputeGame) DisputeL2SequenceNumber(eoa *dsl.EOA, startClaim *Claim, l2SequenceNumber uint64) *Claim

func (*FaultDisputeGame) DisputeToStep

func (g *FaultDisputeGame) DisputeToStep(eoa *dsl.EOA, startClaim *Claim, traceIndex uint64) *Claim

func (*FaultDisputeGame) GameData

func (g *FaultDisputeGame) GameData() string

func (*FaultDisputeGame) GameType

func (g *FaultDisputeGame) GameType() gameTypes.GameType

func (*FaultDisputeGame) L1Head

func (g *FaultDisputeGame) L1Head() common.Hash

func (*FaultDisputeGame) L2SequenceNumber

func (g *FaultDisputeGame) L2SequenceNumber() uint64

func (*FaultDisputeGame) LogGameData

func (g *FaultDisputeGame) LogGameData()

func (*FaultDisputeGame) MaxDepth

func (g *FaultDisputeGame) MaxDepth() challengerTypes.Depth

func (*FaultDisputeGame) PerformMoves

func (g *FaultDisputeGame) PerformMoves(eoa *dsl.EOA, moves ...GameHelperMove) []*Claim

func (*FaultDisputeGame) RootClaim

func (g *FaultDisputeGame) RootClaim() *Claim

func (*FaultDisputeGame) SplitDepth

func (g *FaultDisputeGame) SplitDepth() challengerTypes.Depth

func (*FaultDisputeGame) StartingL2SequenceNumber

func (g *FaultDisputeGame) StartingL2SequenceNumber() uint64

type GameCfg

type GameCfg struct {
	// contains filtered or unexported fields
}

func NewGameCfg

func NewGameCfg(opts ...GameOpt) *GameCfg

type GameHelper

type GameHelper struct {
	// contains filtered or unexported fields
}

func DeployGameHelper

func DeployGameHelper(t devtest.T, deployer *dsl.EOA, honestTraceProvider func(game *FaultDisputeGame) challengerTypes.TraceAccessor) *GameHelper

func (*GameHelper) AuthEOA

func (gs *GameHelper) AuthEOA(eoa *dsl.EOA) *GameHelper

func (*GameHelper) CreateGameWithClaims

func (gs *GameHelper) CreateGameWithClaims(
	eoa *dsl.EOA,
	factory *DisputeGameFactory,
	gameType gameTypes.GameType,
	rootClaim common.Hash,
	extraData []byte,
	moves []GameHelperMove,
) common.Address

func (*GameHelper) DisputeL2SequenceNumber

func (gs *GameHelper) DisputeL2SequenceNumber(eoa *dsl.EOA, game *FaultDisputeGame, startClaim *Claim, l2SequenceNumber uint64) *Claim

func (*GameHelper) DisputeToStep

func (gs *GameHelper) DisputeToStep(eoa *dsl.EOA, game *FaultDisputeGame, startClaim *Claim, traceIndex uint64) *Claim

func (*GameHelper) PerformMoves

func (gs *GameHelper) PerformMoves(eoa *dsl.EOA, game *FaultDisputeGame, moves []GameHelperMove) []*Claim

type GameHelperEOA

type GameHelperEOA struct {
	EOA *dsl.EOA
	// contains filtered or unexported fields
}

func (*GameHelperEOA) Address

func (a *GameHelperEOA) Address() common.Address

func (*GameHelperEOA) PerformMoves

func (a *GameHelperEOA) PerformMoves(game *FaultDisputeGame, moves ...GameHelperMove) []*Claim

type GameHelperMove

type GameHelperMove struct {
	ParentIdx *big.Int
	Claim     common.Hash
	Attack    bool
}

func Move

func Move(parentIdx int64, claim common.Hash, attack bool) GameHelperMove

type GameOpt

type GameOpt interface {
	Apply(cfg *GameCfg)
}

func WithFutureProposal

func WithFutureProposal() GameOpt

func WithL2SequenceNumber

func WithL2SequenceNumber(seqNum uint64) GameOpt

func WithRootClaim

func WithRootClaim(claim common.Hash) GameOpt

func WithSuperRootFrom

func WithSuperRootFrom(outputRoots ...eth.Bytes32) GameOpt

WithSuperRootFrom sets the output roots to use in a super root game. The length of outputRoots must match the number of chains in the super root.

func WithUnsafeProposal

func WithUnsafeProposal() GameOpt

type SuperFaultDisputeGame

type SuperFaultDisputeGame struct {
	*FaultDisputeGame
}

func NewSuperFaultDisputeGame

func NewSuperFaultDisputeGame(
	t devtest.T,
	require *require.Assertions,
	addr common.Address,
	helperProvider gameHelperProvider,
	honestTrace func(game *FaultDisputeGame) types.TraceAccessor,
	game *bindings.FaultDisputeGame,
) *SuperFaultDisputeGame

func (*SuperFaultDisputeGame) StartingL2SequenceNumber

func (g *SuperFaultDisputeGame) StartingL2SequenceNumber() uint64

type ZKDisputeGame added in v1.17.0

type ZKDisputeGame struct {
	Address common.Address
	Args    ZKGameArgs
}

ZKDisputeGame holds the impl address and parsed args for a deployed ZK dispute game.

type ZKGameArgs added in v1.17.0

type ZKGameArgs struct {
	AbsolutePrestate     common.Hash
	Verifier             common.Address
	MaxChallengeDuration uint64
	MaxProveDuration     uint64
	ChallengerBond       *big.Int
	AnchorStateRegistry  common.Address
	WETH                 common.Address
	L2ChainID            *big.Int
}

ZKGameArgs contains the parsed arguments for a ZK dispute game template.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL