Documentation
¶
Overview ¶
Package dsl provides DSL (domain specific language) to interact with a devstack system.
Each component in the devstack has a DSL wrapper. The wrapper itself does not have any state, and may be recreated or shallow-copied.
Each DSL wrapper provides an Escape method, in case the DSL is not sufficient for a given use-case. The Escape method is a temporary compromise to allow more incremental development of and migration to the DSL. It should be avoided whenever possible and will be removed in the future.
Index ¶
- Constants
- func CheckAll(t devtest.T, checks ...CheckFunc)
- func WithAllLocalUnsafeHeadsAdvancedBy(blocks uint64) func(cfg *VerifySyncStatusConfig)
- type CheckFunc
- type Cluster
- type Conductor
- func (c *Conductor) Escape() stack.Conductor
- func (c *Conductor) FetchClusterMembership() *consensus.ClusterMembership
- func (c *Conductor) FetchLeader() *consensus.ServerInfo
- func (c *Conductor) FetchPaused() bool
- func (c *Conductor) FetchSequencerHealthy() bool
- func (c *Conductor) IsLeader() bool
- func (c *Conductor) String() string
- func (c *Conductor) TransferLeadershipTo(targetLeaderInfo consensus.ServerInfo)
- type ConductorSet
- type ELNode
- type EOA
- func (u *EOA) Address() common.Address
- func (u *EOA) AsEL(el ELNode) *EOA
- func (u *EOA) ChainID() eth.ChainID
- func (u *EOA) DeployEventLogger() common.Address
- func (u *EOA) GetBalance() eth.ETH
- func (u *EOA) Key() *Key
- func (u *EOA) PendingNonce() uint64
- func (u *EOA) Plan() txplan.Option
- func (u *EOA) PlanTransfer(to common.Address, amount eth.ETH) txplan.Option
- func (u *EOA) SendExecMessage(initIntent *txintent.IntentTx[*txintent.InitTrigger, *txintent.InteropOutput], ...) (*txintent.IntentTx[*txintent.ExecTrigger, *txintent.InteropOutput], ...)
- func (u *EOA) SendInitMessage(trigger *txintent.InitTrigger) (*txintent.IntentTx[*txintent.InitTrigger, *txintent.InteropOutput], ...)
- func (u *EOA) SendPackedExecMessages(dependOn *txintent.IntentTx[*txintent.MultiTrigger, *txintent.InteropOutput]) (*txintent.IntentTx[*txintent.MultiTrigger, *txintent.InteropOutput], ...)
- func (u *EOA) SendPackedRandomInitMessages(rng *rand.Rand, eventLoggerAddress common.Address) (*txintent.IntentTx[*txintent.MultiTrigger, *txintent.InteropOutput], ...)
- func (u *EOA) String() string
- func (u *EOA) Transact(opts ...txplan.Option) *txplan.PlannedTx
- func (u *EOA) Transfer(to common.Address, amount eth.ETH) *txplan.PlannedTx
- func (u *EOA) VerifyBalanceAtLeast(v eth.ETH)
- func (u *EOA) VerifyBalanceExact(v eth.ETH)
- func (u *EOA) VerifyBalanceLessThan(v eth.ETH)
- func (u *EOA) WaitForBalance(v eth.ETH)
- type Faucet
- type FlashblocksBuilderNode
- type FlashblocksBuilderSet
- type Funder
- type HDWallet
- type Key
- type L1CLNode
- type L1ELNode
- func (el *L1ELNode) BlockRefByLabel(label eth.BlockLabel) eth.L1BlockRef
- func (el *L1ELNode) BlockRefByNumber(number uint64) eth.L1BlockRef
- func (el L1ELNode) ChainID() eth.ChainID
- func (el *L1ELNode) Escape() stack.L1ELNode
- func (el *L1ELNode) EstimateBlockTime() time.Duration
- func (el *L1ELNode) EthClient() apis.EthClient
- func (el L1ELNode) IsCanonical(ref eth.BlockID) bool
- func (el *L1ELNode) ReorgTriggered(target eth.L1BlockRef, attempts int)
- func (el *L1ELNode) ReorgTriggeredFn(target eth.L1BlockRef, attempts int) CheckFunc
- func (el *L1ELNode) String() string
- func (el *L1ELNode) TransactionTimeout() time.Duration
- func (el L1ELNode) WaitForBlock() eth.BlockRef
- func (el L1ELNode) WaitForBlockNumber(targetBlock uint64) eth.BlockRef
- func (el L1ELNode) WaitForOnline()
- type L1Network
- type L2Batcher
- type L2CLNode
- func (cl *L2CLNode) Advanced(lvl types.SafetyLevel, delta uint64, attempts int)
- func (cl *L2CLNode) AdvancedFn(lvl types.SafetyLevel, delta uint64, attempts int) CheckFunc
- func (cl *L2CLNode) ChainID() eth.ChainID
- func (cl *L2CLNode) ChainSyncStatus(chainID eth.ChainID, lvl types.SafetyLevel) eth.BlockID
- func (cl *L2CLNode) ConnectPeer(peer *L2CLNode)
- func (cl *L2CLNode) DisconnectPeer(peer *L2CLNode)
- func (cl *L2CLNode) Escape() stack.L2CLNode
- func (cl *L2CLNode) HeadBlockRef(lvl types.SafetyLevel) eth.L2BlockRef
- func (cl *L2CLNode) Lagged(refNode SyncStatusProvider, lvl types.SafetyLevel, attempts int, ...)
- func (cl *L2CLNode) LaggedFn(refNode SyncStatusProvider, lvl types.SafetyLevel, attempts int, ...) CheckFunc
- func (cl *L2CLNode) Matched(refNode SyncStatusProvider, lvl types.SafetyLevel, attempts int)
- func (cl *L2CLNode) MatchedFn(refNode SyncStatusProvider, lvl types.SafetyLevel, attempts int) CheckFunc
- func (cl *L2CLNode) NotAdvanced(lvl types.SafetyLevel, attempts int)
- func (cl *L2CLNode) NotAdvancedFn(lvl types.SafetyLevel, attempts int) CheckFunc
- func (cl *L2CLNode) PeerInfo() *apis.PeerInfo
- func (cl *L2CLNode) Peers() *apis.PeerDump
- func (cl *L2CLNode) Reached(lvl types.SafetyLevel, target uint64, attempts int)
- func (cl *L2CLNode) ReachedFn(lvl types.SafetyLevel, target uint64, attempts int) CheckFunc
- func (cl *L2CLNode) ReachedRef(lvl types.SafetyLevel, target eth.BlockID, attempts int)
- func (cl *L2CLNode) ReachedRefFn(lvl types.SafetyLevel, target eth.BlockID, attempts int) CheckFunc
- func (cl *L2CLNode) Rewinded(lvl types.SafetyLevel, delta uint64, attempts int)
- func (cl *L2CLNode) RewindedFn(lvl types.SafetyLevel, delta uint64, attempts int) CheckFunc
- func (cl *L2CLNode) SafeL2BlockRef() eth.L2BlockRef
- func (cl *L2CLNode) Start()
- func (cl *L2CLNode) StartSequencer()
- func (cl *L2CLNode) Stop()
- func (cl *L2CLNode) StopSequencer() common.Hash
- func (cl *L2CLNode) String() string
- func (cl *L2CLNode) SyncStatus() *eth.SyncStatus
- type L2Challenger
- type L2ELNode
- func (el *L2ELNode) Advanced(label eth.BlockLabel, block uint64)
- func (el *L2ELNode) AdvancedFn(label eth.BlockLabel, block uint64) CheckFunc
- func (el *L2ELNode) BlockRefByLabel(label eth.BlockLabel) eth.L2BlockRef
- func (el *L2ELNode) BlockRefByNumber(num uint64) eth.L2BlockRef
- func (el L2ELNode) ChainID() eth.ChainID
- func (el *L2ELNode) Escape() stack.L2ELNode
- func (el L2ELNode) IsCanonical(ref eth.BlockID) bool
- func (el *L2ELNode) NotAdvanced(label eth.BlockLabel)
- func (el *L2ELNode) NotAdvancedFn(label eth.BlockLabel) CheckFunc
- func (el *L2ELNode) ReorgTriggered(target eth.L2BlockRef, attempts int)
- func (el *L2ELNode) ReorgTriggeredFn(target eth.L2BlockRef, attempts int) CheckFunc
- func (el *L2ELNode) String() string
- func (el *L2ELNode) TransactionTimeout() time.Duration
- func (el L2ELNode) WaitForBlock() eth.BlockRef
- func (el L2ELNode) WaitForBlockNumber(targetBlock uint64) eth.BlockRef
- func (el L2ELNode) WaitForOnline()
- type L2Network
- func (n *L2Network) AwaitActivation(t devtest.T, forkName rollup.ForkName) eth.BlockID
- func (n *L2Network) CatchUpTo(o *L2Network)
- func (n *L2Network) ChainID() eth.ChainID
- func (n *L2Network) DisputeGameFactoryProxyAddr() common.Address
- func (n *L2Network) Escape() stack.L2Network
- func (n *L2Network) IsActivated(timestamp uint64) bool
- func (n *L2Network) LatestBlockBeforeTimestamp(t devtest.T, timestamp uint64) eth.BlockRef
- func (n *L2Network) PrintChain()
- func (n *L2Network) PublicRPC() *L2ELNode
- func (n *L2Network) String() string
- func (n *L2Network) WaitForBlock() eth.BlockRef
- type L2Proposer
- type Superchain
- type Supervisor
- func (s *Supervisor) AddManagedL2CL(cl *L2CLNode)
- func (s *Supervisor) AdvancedSafeHead(chainID eth.ChainID, delta uint64, attempts int)
- func (s *Supervisor) AwaitMinL1(minL1 uint64)
- func (s *Supervisor) ChainSyncStatus(chainID eth.ChainID, lvl types.SafetyLevel) eth.BlockID
- func (s *Supervisor) Escape() stack.Supervisor
- func (s *Supervisor) FetchSuperRootAtTimestamp(timestamp uint64) eth.SuperRootResponse
- func (s *Supervisor) FetchSyncStatus() eth.SupervisorSyncStatus
- func (s *Supervisor) L2HeadBlockID(chainID eth.ChainID, lvl types.SafetyLevel) eth.BlockID
- func (s *Supervisor) SafeBlockID(chainID eth.ChainID) eth.BlockID
- func (s *Supervisor) Start()
- func (s *Supervisor) Stop()
- func (s *Supervisor) String() string
- func (s *Supervisor) VerifySyncStatus(opts ...func(config *VerifySyncStatusConfig))
- func (s *Supervisor) WaitForL2HeadToAdvance(chainID eth.ChainID, delta uint64, lvl types.SafetyLevel, attempts int)
- func (s *Supervisor) WaitForL2HeadToAdvanceTo(chainID eth.ChainID, lvl types.SafetyLevel, blockID eth.BlockID)
- func (s *Supervisor) WaitForUnsafeHeadToAdvance(chainID eth.ChainID, delta uint64)
- type SyncStatusProvider
- type TestSequencer
- type VerifySyncStatusConfig
Constants ¶
const DefaultTimeout = 30 * time.Second
const (
SaltEnvVar = "DEVSTACK_KEYS_SALT"
)
Variables ¶
This section is empty.
Functions ¶
func WithAllLocalUnsafeHeadsAdvancedBy ¶
func WithAllLocalUnsafeHeadsAdvancedBy(blocks uint64) func(cfg *VerifySyncStatusConfig)
WithAllLocalUnsafeHeadsAdvancedBy verifies that the local unsafe head of every chain advances by at least the specified number of blocks compared to the value when VerifySyncStatus is called.
Types ¶
type CheckFunc ¶
type CheckFunc func() error
func LaggedFn ¶ added in v1.13.4
func LaggedFn(baseNode, refNode SyncStatusProvider, log log.Logger, ctx context.Context, lvl types.SafetyLevel, chainID eth.ChainID, attempts int, allowMatch bool) CheckFunc
LaggedFn returns a lambda that checks the baseNode head with given safety level is lagged with the refNode chain sync status provider Composable with other lambdas to wait in parallel
func MatchedFn ¶ added in v1.13.4
func MatchedFn(baseNode, refNode SyncStatusProvider, log log.Logger, ctx context.Context, lvl types.SafetyLevel, chainID eth.ChainID, attempts int) CheckFunc
MatchedFn returns a lambda that checks the baseNode head with given safety level is matched with the refNode chain sync status provider Composable with other lambdas to wait in parallel
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster wraps a stack.Cluster interface for DSL operations
func NewCluster ¶
NewCluster creates a new Cluster DSL wrapper
type Conductor ¶ added in v1.13.4
type Conductor struct {
// contains filtered or unexported fields
}
func NewConductor ¶ added in v1.13.4
func (*Conductor) FetchClusterMembership ¶ added in v1.13.4
func (c *Conductor) FetchClusterMembership() *consensus.ClusterMembership
func (*Conductor) FetchLeader ¶ added in v1.13.4
func (c *Conductor) FetchLeader() *consensus.ServerInfo
func (*Conductor) FetchPaused ¶ added in v1.13.4
func (*Conductor) FetchSequencerHealthy ¶ added in v1.13.4
func (*Conductor) TransferLeadershipTo ¶ added in v1.13.4
func (c *Conductor) TransferLeadershipTo(targetLeaderInfo consensus.ServerInfo)
type ConductorSet ¶ added in v1.13.4
type ConductorSet []*Conductor
func NewConductorSet ¶ added in v1.13.4
func NewConductorSet(inner []stack.Conductor) ConductorSet
type EOA ¶
type EOA struct {
// contains filtered or unexported fields
}
EOA is an Externally-Owned-Account: an account on a specific chain that is operated by a single private key.
func (*EOA) DeployEventLogger ¶
func (*EOA) GetBalance ¶ added in v1.13.4
Try to avoid using this method where possible, use the VerifyBalance* methods instead.
func (*EOA) Key ¶
Key returns the cross-chain user identity/key, i.e. the user but detached it from the EL node.
func (*EOA) PendingNonce ¶ added in v1.13.4
PendingNonce looks up the user nonce in the pending state.
func (*EOA) Plan ¶
Plan creates the default tx-planning options, to perform a transaction with this Key, against the connected EL node and its chain.
func (*EOA) PlanTransfer ¶
PlanTransfer creates the tx-plan options to perform a transfer of the given amount of ETH to the given account.
func (*EOA) SendExecMessage ¶
func (u *EOA) SendExecMessage(initIntent *txintent.IntentTx[*txintent.InitTrigger, *txintent.InteropOutput], eventIdx int) (*txintent.IntentTx[*txintent.ExecTrigger, *txintent.InteropOutput], *types.Receipt)
func (*EOA) SendInitMessage ¶
func (u *EOA) SendInitMessage(trigger *txintent.InitTrigger) (*txintent.IntentTx[*txintent.InitTrigger, *txintent.InteropOutput], *types.Receipt)
func (*EOA) SendPackedExecMessages ¶ added in v1.13.4
func (u *EOA) SendPackedExecMessages(dependOn *txintent.IntentTx[*txintent.MultiTrigger, *txintent.InteropOutput]) (*txintent.IntentTx[*txintent.MultiTrigger, *txintent.InteropOutput], *types.Receipt, error)
SendPackedExecMessages batches every message and validates them via a single multicall
func (*EOA) SendPackedRandomInitMessages ¶ added in v1.13.4
func (u *EOA) SendPackedRandomInitMessages(rng *rand.Rand, eventLoggerAddress common.Address) (*txintent.IntentTx[*txintent.MultiTrigger, *txintent.InteropOutput], *types.Receipt, error)
SendPackedRandomInitMessages batches random messages and initiates them via a single multicall
func (*EOA) Transact ¶
Transact plans and executes a tx. The success-state, as defined by the tx-plan options, is required. The resulting evaluated tx is returned.
func (*EOA) Transfer ¶
Transfer transfers the given amount of ETH to the given account, immediately.
func (*EOA) VerifyBalanceAtLeast ¶ added in v1.13.4
VerifyBalanceAtLeast verifies balance >= v
func (*EOA) VerifyBalanceExact ¶
VerifyBalanceExact verifies balance == v
func (*EOA) VerifyBalanceLessThan ¶
VerifyBalanceLessThan verifies balance < v
func (*EOA) WaitForBalance ¶ added in v1.13.4
type Faucet ¶
type Faucet struct {
// contains filtered or unexported fields
}
Faucet wraps a stack.Faucet interface for DSL operations. A Faucet is chain-specific. Note: Faucet wraps a stack component, to share faucet operations in kurtosis by hosting it as service, and prevent race-conditions with the account that sends out the faucet funds.
type FlashblocksBuilderNode ¶ added in v1.13.4
type FlashblocksBuilderNode struct {
// contains filtered or unexported fields
}
func NewFlashblocksBuilderNode ¶ added in v1.13.4
func NewFlashblocksBuilderNode(inner stack.FlashblocksBuilderNode) *FlashblocksBuilderNode
func (*FlashblocksBuilderNode) Escape ¶ added in v1.13.4
func (c *FlashblocksBuilderNode) Escape() stack.FlashblocksBuilderNode
func (*FlashblocksBuilderNode) String ¶ added in v1.13.4
func (c *FlashblocksBuilderNode) String() string
type FlashblocksBuilderSet ¶ added in v1.13.4
type FlashblocksBuilderSet []*FlashblocksBuilderNode
func NewFlashblocksBuilderSet ¶ added in v1.13.4
func NewFlashblocksBuilderSet(inner []stack.FlashblocksBuilderNode) FlashblocksBuilderSet
type Funder ¶
type Funder struct {
// contains filtered or unexported fields
}
func (*Funder) FundAtLeast ¶ added in v1.13.4
type HDWallet ¶
type HDWallet struct {
// contains filtered or unexported fields
}
HDWallet is a collection of deterministic accounts, generated from an underlying devkeys keyring, using the standard cross-chain user identities.
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
Key is an ethereum private key. This is a key with an address identity. The Key may be used on different chains: it is chain-agnostic.
func (*Key) Priv ¶ added in v1.13.4
func (a *Key) Priv() *ecdsa.PrivateKey
type L1CLNode ¶
type L1CLNode struct {
// contains filtered or unexported fields
}
L1CLNode wraps a stack.L1CLNode interface for DSL operations
func NewL1CLNode ¶
NewL1CLNode creates a new L1CLNode DSL wrapper
type L1ELNode ¶
type L1ELNode struct {
// contains filtered or unexported fields
}
L1ELNode wraps a stack.L1ELNode interface for DSL operations
func NewL1ELNode ¶
NewL1ELNode creates a new L1ELNode DSL wrapper
func (*L1ELNode) BlockRefByLabel ¶ added in v1.13.4
func (el *L1ELNode) BlockRefByLabel(label eth.BlockLabel) eth.L1BlockRef
func (*L1ELNode) BlockRefByNumber ¶ added in v1.13.4
func (el *L1ELNode) BlockRefByNumber(number uint64) eth.L1BlockRef
func (*L1ELNode) EstimateBlockTime ¶ added in v1.13.4
EstimateBlockTime estimates the L1 block based on the last 1000 blocks (or since genesis, if insufficient blocks).
func (L1ELNode) IsCanonical ¶ added in v1.13.4
func (*L1ELNode) ReorgTriggered ¶ added in v1.13.4
func (el *L1ELNode) ReorgTriggered(target eth.L1BlockRef, attempts int)
func (*L1ELNode) ReorgTriggeredFn ¶ added in v1.13.4
func (el *L1ELNode) ReorgTriggeredFn(target eth.L1BlockRef, attempts int) CheckFunc
ReorgTriggeredFn returns a lambda that checks that a L1 reorg occurred on the expected block Composable with other lambdas to wait in parallel
func (*L1ELNode) TransactionTimeout ¶ added in v1.13.4
func (L1ELNode) WaitForBlock ¶
func (L1ELNode) WaitForBlockNumber ¶ added in v1.13.4
func (L1ELNode) WaitForOnline ¶ added in v1.13.4
func (el L1ELNode) WaitForOnline()
type L1Network ¶
type L1Network struct {
// contains filtered or unexported fields
}
L1Network wraps a stack.L1Network interface for DSL operations
func NewL1Network ¶
NewL1Network creates a new L1Network DSL wrapper
func (*L1Network) PrintChain ¶ added in v1.13.4
func (n *L1Network) PrintChain()
PrintChain is used for testing/debugging, it prints the blockchain hashes and parent hashes to logs, which is useful when developing reorg tests
func (*L1Network) WaitForBlock ¶
func (*L1Network) WaitForOnline ¶ added in v1.13.4
func (n *L1Network) WaitForOnline()
type L2Batcher ¶
type L2Batcher struct {
// contains filtered or unexported fields
}
L2Batcher wraps a stack.L2Batcher interface for DSL operations
func NewL2Batcher ¶
NewL2Batcher creates a new L2Batcher DSL wrapper
func (*L2Batcher) ActivityAPI ¶
func (b *L2Batcher) ActivityAPI() apis.BatcherActivity
type L2CLNode ¶
type L2CLNode struct {
// contains filtered or unexported fields
}
L2CLNode wraps a stack.L2CLNode interface for DSL operations
func NewL2CLNode ¶
func NewL2CLNode(inner stack.L2CLNode, control stack.ControlPlane) *L2CLNode
NewL2CLNode creates a new L2CLNode DSL wrapper
func (*L2CLNode) Advanced ¶
func (cl *L2CLNode) Advanced(lvl types.SafetyLevel, delta uint64, attempts int)
func (*L2CLNode) AdvancedFn ¶ added in v1.13.4
AdvancedFn returns a lambda that checks the L2CL chain head with given safety level advanced more than delta block number Composable with other lambdas to wait in parallel
func (*L2CLNode) ChainSyncStatus ¶ added in v1.13.4
ChainSyncStatus satisfies that the L2CLNode can provide sync status per chain
func (*L2CLNode) ConnectPeer ¶ added in v1.13.4
func (*L2CLNode) DisconnectPeer ¶
func (*L2CLNode) HeadBlockRef ¶
func (cl *L2CLNode) HeadBlockRef(lvl types.SafetyLevel) eth.L2BlockRef
HeadBlockRef fetches L2CL sync status and returns block ref with given safety level
func (*L2CLNode) Lagged ¶ added in v1.13.4
func (cl *L2CLNode) Lagged(refNode SyncStatusProvider, lvl types.SafetyLevel, attempts int, allowMatch bool)
func (*L2CLNode) LaggedFn ¶ added in v1.13.4
func (cl *L2CLNode) LaggedFn(refNode SyncStatusProvider, lvl types.SafetyLevel, attempts int, allowMatch bool) CheckFunc
LaggedFn returns a lambda that checks the L2CL chain head with given safety level is lagged with the reference chain sync status provider Composable with other lambdas to wait in parallel
func (*L2CLNode) Matched ¶ added in v1.13.4
func (cl *L2CLNode) Matched(refNode SyncStatusProvider, lvl types.SafetyLevel, attempts int)
func (*L2CLNode) MatchedFn ¶ added in v1.13.4
func (cl *L2CLNode) MatchedFn(refNode SyncStatusProvider, lvl types.SafetyLevel, attempts int) CheckFunc
MatchedFn returns a lambda that checks the L2CLNode head with given safety level is matched with the refNode chain sync status provider Composable with other lambdas to wait in parallel
func (*L2CLNode) NotAdvanced ¶ added in v1.13.4
func (cl *L2CLNode) NotAdvanced(lvl types.SafetyLevel, attempts int)
func (*L2CLNode) NotAdvancedFn ¶ added in v1.13.4
func (cl *L2CLNode) NotAdvancedFn(lvl types.SafetyLevel, attempts int) CheckFunc
func (*L2CLNode) Reached ¶
func (cl *L2CLNode) Reached(lvl types.SafetyLevel, target uint64, attempts int)
func (*L2CLNode) ReachedFn ¶ added in v1.13.4
ReachedFn returns a lambda that checks the L2CL chain head with given safety level reaches the target block number Composable with other lambdas to wait in parallel
func (*L2CLNode) ReachedRef ¶ added in v1.13.4
func (*L2CLNode) ReachedRefFn ¶ added in v1.13.4
ReachedRefFn is same as Reached, but has an additional check to ensure that the block referenced is not reorged Composable with other lambdas to wait in parallel
func (*L2CLNode) Rewinded ¶ added in v1.13.4
func (cl *L2CLNode) Rewinded(lvl types.SafetyLevel, delta uint64, attempts int)
func (*L2CLNode) RewindedFn ¶ added in v1.13.4
RewindedFn returns a lambda that checks the L2CL chain head with given safety level rewinded more than the delta block number Composable with other lambdas to wait in parallel
func (*L2CLNode) SafeL2BlockRef ¶
func (cl *L2CLNode) SafeL2BlockRef() eth.L2BlockRef
func (*L2CLNode) StartSequencer ¶ added in v1.13.4
func (cl *L2CLNode) StartSequencer()
func (*L2CLNode) StopSequencer ¶ added in v1.13.4
func (*L2CLNode) SyncStatus ¶
func (cl *L2CLNode) SyncStatus() *eth.SyncStatus
type L2Challenger ¶
type L2Challenger struct {
// contains filtered or unexported fields
}
L2Challenger wraps a stack.L2Challenger interface for DSL operations
func NewL2Challenger ¶
func NewL2Challenger(inner stack.L2Challenger) *L2Challenger
NewL2Challenger creates a new L2Challenger DSL wrapper
func (*L2Challenger) Escape ¶
func (c *L2Challenger) Escape() stack.L2Challenger
Escape returns the underlying stack.L2Challenger
func (*L2Challenger) String ¶
func (c *L2Challenger) String() string
type L2ELNode ¶
type L2ELNode struct {
// contains filtered or unexported fields
}
L2ELNode wraps a stack.L2ELNode interface for DSL operations
func NewL2ELNode ¶
NewL2ELNode creates a new L2ELNode DSL wrapper
func (*L2ELNode) Advanced ¶ added in v1.13.4
func (el *L2ELNode) Advanced(label eth.BlockLabel, block uint64)
func (*L2ELNode) AdvancedFn ¶ added in v1.13.4
func (el *L2ELNode) AdvancedFn(label eth.BlockLabel, block uint64) CheckFunc
func (*L2ELNode) BlockRefByLabel ¶
func (el *L2ELNode) BlockRefByLabel(label eth.BlockLabel) eth.L2BlockRef
func (*L2ELNode) BlockRefByNumber ¶
func (el *L2ELNode) BlockRefByNumber(num uint64) eth.L2BlockRef
func (L2ELNode) IsCanonical ¶ added in v1.13.4
func (*L2ELNode) NotAdvanced ¶ added in v1.13.4
func (el *L2ELNode) NotAdvanced(label eth.BlockLabel)
func (*L2ELNode) NotAdvancedFn ¶ added in v1.13.4
func (el *L2ELNode) NotAdvancedFn(label eth.BlockLabel) CheckFunc
func (*L2ELNode) ReorgTriggered ¶ added in v1.13.4
func (el *L2ELNode) ReorgTriggered(target eth.L2BlockRef, attempts int)
func (*L2ELNode) ReorgTriggeredFn ¶ added in v1.13.4
func (el *L2ELNode) ReorgTriggeredFn(target eth.L2BlockRef, attempts int) CheckFunc
ReorgTriggeredFn returns a lambda that checks that a L2 reorg occurred on the expected block Composable with other lambdas to wait in parallel
func (*L2ELNode) TransactionTimeout ¶ added in v1.13.4
func (L2ELNode) WaitForBlock ¶
func (L2ELNode) WaitForBlockNumber ¶ added in v1.13.4
func (L2ELNode) WaitForOnline ¶ added in v1.13.4
func (el L2ELNode) WaitForOnline()
type L2Network ¶
type L2Network struct {
// contains filtered or unexported fields
}
L2Network wraps a stack.L2Network interface for DSL operations
func NewL2Network ¶
NewL2Network creates a new L2Network DSL wrapper
func (*L2Network) AwaitActivation ¶
AwaitActivation awaits the fork activation time, and returns the activation block
func (*L2Network) DisputeGameFactoryProxyAddr ¶ added in v1.13.4
func (*L2Network) IsActivated ¶ added in v1.13.4
IsActivated checks if a given fork has been activated
func (*L2Network) LatestBlockBeforeTimestamp ¶
LatestBlockBeforeTimestamp finds the latest block before fork activation
func (*L2Network) PrintChain ¶
func (n *L2Network) PrintChain()
PrintChain is used for testing/debugging, it prints the blockchain hashes and parent hashes to logs, which is useful when developing reorg tests
func (*L2Network) WaitForBlock ¶
type L2Proposer ¶
type L2Proposer struct {
// contains filtered or unexported fields
}
L2Proposer wraps a stack.L2Proposer interface for DSL operations
func NewL2Proposer ¶
func NewL2Proposer(inner stack.L2Proposer) *L2Proposer
NewL2Proposer creates a new L2Proposer DSL wrapper
func (*L2Proposer) Escape ¶
func (p *L2Proposer) Escape() stack.L2Proposer
Escape returns the underlying stack.L2Proposer
func (*L2Proposer) String ¶
func (p *L2Proposer) String() string
type Superchain ¶
type Superchain struct {
// contains filtered or unexported fields
}
Superchain wraps a stack.Superchain interface for DSL operations
func NewSuperchain ¶
func NewSuperchain(inner stack.Superchain) *Superchain
NewSuperchain creates a new Superchain DSL wrapper
func (*Superchain) Escape ¶
func (s *Superchain) Escape() stack.Superchain
Escape returns the underlying stack.Superchain
func (*Superchain) String ¶
func (s *Superchain) String() string
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
func NewSupervisor ¶
func NewSupervisor(inner stack.Supervisor, control stack.ControlPlane) *Supervisor
func (*Supervisor) AddManagedL2CL ¶ added in v1.13.4
func (s *Supervisor) AddManagedL2CL(cl *L2CLNode)
func (*Supervisor) AdvancedSafeHead ¶
func (s *Supervisor) AdvancedSafeHead(chainID eth.ChainID, delta uint64, attempts int)
func (*Supervisor) AwaitMinL1 ¶ added in v1.13.4
func (s *Supervisor) AwaitMinL1(minL1 uint64)
func (*Supervisor) ChainSyncStatus ¶ added in v1.13.4
func (s *Supervisor) ChainSyncStatus(chainID eth.ChainID, lvl types.SafetyLevel) eth.BlockID
ChainSyncStatus satisfies that the supervisor can provide sync status per chain
func (*Supervisor) Escape ¶
func (s *Supervisor) Escape() stack.Supervisor
func (*Supervisor) FetchSuperRootAtTimestamp ¶ added in v1.13.4
func (s *Supervisor) FetchSuperRootAtTimestamp(timestamp uint64) eth.SuperRootResponse
func (*Supervisor) FetchSyncStatus ¶
func (s *Supervisor) FetchSyncStatus() eth.SupervisorSyncStatus
func (*Supervisor) L2HeadBlockID ¶
func (s *Supervisor) L2HeadBlockID(chainID eth.ChainID, lvl types.SafetyLevel) eth.BlockID
L2HeadBlockID fetches supervisor sync status and returns block id with given safety level
func (*Supervisor) SafeBlockID ¶
func (s *Supervisor) SafeBlockID(chainID eth.ChainID) eth.BlockID
func (*Supervisor) Start ¶ added in v1.13.4
func (s *Supervisor) Start()
func (*Supervisor) Stop ¶ added in v1.13.4
func (s *Supervisor) Stop()
func (*Supervisor) String ¶
func (s *Supervisor) String() string
func (*Supervisor) VerifySyncStatus ¶
func (s *Supervisor) VerifySyncStatus(opts ...func(config *VerifySyncStatusConfig))
VerifySyncStatus performs assertions based on the supervisor's SyncStatus endpoint.
func (*Supervisor) WaitForL2HeadToAdvance ¶ added in v1.13.4
func (s *Supervisor) WaitForL2HeadToAdvance(chainID eth.ChainID, delta uint64, lvl types.SafetyLevel, attempts int)
WaitForL2HeadToAdvance checks the supervisor view of L2CL chain head with given safety level advanced more than delta block number
func (*Supervisor) WaitForL2HeadToAdvanceTo ¶ added in v1.13.4
func (s *Supervisor) WaitForL2HeadToAdvanceTo(chainID eth.ChainID, lvl types.SafetyLevel, blockID eth.BlockID)
func (*Supervisor) WaitForUnsafeHeadToAdvance ¶ added in v1.13.4
func (s *Supervisor) WaitForUnsafeHeadToAdvance(chainID eth.ChainID, delta uint64)
type SyncStatusProvider ¶ added in v1.13.4
type TestSequencer ¶ added in v1.13.4
type TestSequencer struct {
// contains filtered or unexported fields
}
func NewTestSequencer ¶ added in v1.13.4
func NewTestSequencer(inner stack.TestSequencer) *TestSequencer
func (*TestSequencer) Escape ¶ added in v1.13.4
func (s *TestSequencer) Escape() stack.TestSequencer
func (*TestSequencer) String ¶ added in v1.13.4
func (s *TestSequencer) String() string
type VerifySyncStatusConfig ¶
type VerifySyncStatusConfig struct {
AllUnsafeHeadsAdvance uint64
}