Documentation
¶
Index ¶
- Constants
- Variables
- func ConnectP2P(ctx context.Context, require *testreq.Assertions, initiator RpcCaller, ...)
- func DisconnectP2P(ctx context.Context, require *testreq.Assertions, initiator RpcCaller, ...)
- func FlakyOnKonaNode(t devtest.T, reason string)
- func FunderKey(keys devkeys.Keys) (*ecdsa.PrivateKey, error)
- func GetP2PClient(ctx context.Context, logger log.Logger, l2CLNode L2CLNode) (*sources.P2PClient, error)
- func GetPeerInfo(ctx context.Context, p2pClient *sources.P2PClient) (*apis.PeerInfo, error)
- func GetPeers(ctx context.Context, p2pClient *sources.P2PClient) (*apis.PeerDump, error)
- func OPContractsManagerMigratorABI() (*abi.ABI, error)
- func PrestateForGameType(t devtest.CommonT, gameType gameTypes.GameType) common.Hash
- func ProxyAddr(require *testreq.Assertions, urlStr string) string
- func RerunOPCMUpgrade(t devtest.T, l1EL stack.L1ELNode, l2 stack.L2Network, ...)
- func SkipOnKonaNode(t devtest.T, reason string)
- func SkipOnOpGeth(t devtest.T, reason string)
- func SkipOnOpReth(t devtest.T, reason string)
- func WithDefaultBPOBlobSchedule(_ devtest.T, _ devkeys.Keys, builder intentbuilder.Builder)
- func WithEcotoneAtGenesis(p devtest.T, _ devkeys.Keys, builder intentbuilder.Builder)
- func WithJovianAtGenesis(p devtest.T, _ devkeys.Keys, builder intentbuilder.Builder)
- func WithKarstAtGenesis(p devtest.T, _ devkeys.Keys, builder intentbuilder.Builder)
- func WithKeepKarstUpgradeGas(p devtest.T, _ devkeys.Keys, builder intentbuilder.Builder)
- func ZKDisputeGameConfigForRuntime() *opcm.ZKDisputeGameConfig
- type BatcherOption
- type ComponentTarget
- type Conductor
- type ContractPaths
- type DeployerOption
- func WithCommons(l1ChainID eth.ChainID) DeployerOption
- func WithCustomGasToken(name, symbol string, initialLiquidity *big.Int, ...) DeployerOption
- func WithDAFootprintGasScalar(scalar uint16, l2ChainIDs ...eth.ChainID) DeployerOption
- func WithDevFeatureEnabled(flag common.Hash) DeployerOption
- func WithDisputeGameFinalityDelaySeconds(seconds uint64) DeployerOption
- func WithEmbeddedContractSources() DeployerOption
- func WithFaultGameClockExtension(seconds uint64) DeployerOption
- func WithFaultGameMaxClockDuration(seconds uint64) DeployerOption
- func WithFinalizationPeriodSeconds(n uint64) DeployerOption
- func WithForkAtL1Genesis(fork forks.Fork) DeployerOption
- func WithForkAtL1Offset(fork forks.Fork, offset uint64) DeployerOption
- func WithGuardianMatchL1PAO() DeployerOption
- func WithHardforkSequentialActivation(startFork, endFork opforks.Name, delta *uint64) DeployerOption
- func WithInteropAtGenesis() DeployerOption
- func WithKarstAtOffset(offset *uint64) DeployerOption
- func WithL1BlockTime(seconds uint64) DeployerOption
- func WithL2BlockTimes(blockTimes map[eth.ChainID]uint64) DeployerOption
- func WithL2GasLimit(gasLimit uint64) DeployerOption
- func WithLocalContractSources() DeployerOption
- func WithLocalContractSourcesAt(artifactsPath string) DeployerOption
- func WithPrefundedL2(l1ChainID, l2ChainID eth.ChainID) DeployerOption
- func WithPreimageOracleChallengePeriod(seconds uint64) DeployerOption
- func WithProofMaturityDelaySeconds(n uint64) DeployerOption
- func WithSequencingWindow(n uint64) DeployerOption
- func WithUniformL2BlockTimes(seconds uint64) DeployerOption
- func WithUseInterop() DeployerOption
- func WithWithdrawalDelaySeconds(seconds uint64) DeployerOption
- type DeployerPipelineOption
- type DisputeGameConfigV2
- type DisputeMonConfig
- type DisputeMonRuntime
- type ELNodeIdentity
- type FakePoS
- type HiddenBlocks
- type InteropFilter
- type KonaNode
- type L1CLNode
- type L1ELNode
- type L1Geth
- type L1Network
- type L2Batcher
- type L2CLConfig
- type L2CLNode
- type L2CLOption
- type L2CLOptionBundle
- type L2CLOptionFn
- type L2Challenger
- type L2Deployment
- func (d *L2Deployment) DisputeGameFactoryProxyAddr() common.Address
- func (d *L2Deployment) L1StandardBridgeProxyAddr() common.Address
- func (d *L2Deployment) PermissionlessDelayedWETHProxyAddr() common.Address
- func (d *L2Deployment) ProxyAdminAddr() common.Address
- func (d *L2Deployment) SystemConfigProxyAddr() common.Address
- type L2ELConfig
- type L2ELNode
- type L2ELOption
- type L2ELOptionBundle
- type L2ELOptionFn
- type L2MetricsRegistrar
- type L2Network
- func (c *L2Network) ChainConfig() *params.ChainConfig
- func (c *L2Network) ChainID() eth.ChainID
- func (c *L2Network) Deployment() stack.L2Deployment
- func (c *L2Network) Keys() devkeys.Keys
- func (c *L2Network) L1ChainID() eth.ChainID
- func (c *L2Network) Name() string
- func (c *L2Network) RollupConfig() *rollup.Config
- type L2Proposer
- type MigrateInputV2
- type MixedL2CLKind
- type MixedL2ELKind
- type MixedSingleChainNodeRefs
- type MixedSingleChainNodeSpec
- type MixedSingleChainPresetConfig
- type MixedSingleChainRuntime
- type MultiChainNodeRuntime
- type MultiChainRuntime
- func NewSingleChainSuperRootAtGenesisRuntimeWithConfig(t devtest.T, cfg PresetConfig) *MultiChainRuntime
- func NewSingleChainSupernodeProofsRuntimeWithConfig(t devtest.T, lagoonAtGenesis bool, cfg PresetConfig) *MultiChainRuntime
- func NewSingleSupernodeWithSyncTesterRuntime(t devtest.T) *MultiChainRuntime
- func NewSingleSupernodeWithSyncTesterRuntimeWithConfig(t devtest.T, cfg PresetConfig) *MultiChainRuntime
- func NewThreeL2SupernodeProofsRuntimeWithConfig(t devtest.T, lagoonAtGenesis bool, cfg PresetConfig) *MultiChainRuntime
- func NewTwoL2SupernodeFollowL2RuntimeWithConfig(t devtest.T, delaySeconds uint64, cfg PresetConfig) *MultiChainRuntime
- func NewTwoL2SupernodeInteropRuntime(t devtest.T, delaySeconds uint64) *MultiChainRuntime
- func NewTwoL2SupernodeInteropRuntimeWithConfig(t devtest.T, delaySeconds uint64, cfg PresetConfig) *MultiChainRuntime
- func NewTwoL2SupernodeLightSequencerInteropRuntimeWithConfig(t devtest.T, delaySeconds uint64, cfg PresetConfig) *MultiChainRuntime
- func NewTwoL2SupernodeProofsRuntimeWithConfig(t devtest.T, lagoonAtGenesis bool, cfg PresetConfig) *MultiChainRuntime
- func NewTwoL2SupernodeRuntime(t devtest.T) *MultiChainRuntime
- func NewTwoL2SupernodeRuntimeWithConfig(t devtest.T, cfg PresetConfig) *MultiChainRuntime
- type OpGeth
- func (n *OpGeth) EngineRPC() string
- func (n *OpGeth) JWTPath() string
- func (n *OpGeth) Running() bool
- func (n *OpGeth) Start()
- func (n *OpGeth) StartControlled(ctx context.Context) error
- func (n *OpGeth) Stop()
- func (n *OpGeth) StopControlled(ctx context.Context) error
- func (n *OpGeth) UserRPC() string
- type OpNode
- type OpReth
- func (n *OpReth) EngineRPC() string
- func (n *OpReth) JWTPath() string
- func (n *OpReth) Running() bool
- func (n *OpReth) Start()
- func (n *OpReth) StartControlled(ctx context.Context) error
- func (n *OpReth) Stop()
- func (n *OpReth) StopControlled(ctx context.Context) error
- func (n *OpReth) UserRPC() string
- type OpRethConfig
- type OpRethOption
- type OpRethOptionBundle
- type OpRethOptionFn
- type PreGenesisSuperGameConfig
- type PresetConfig
- type PrometheusMetricsTarget
- type Proposal
- type ProposerOption
- type RpcCaller
- type SingleChainInteropSupport
- type SingleChainNodeRuntime
- type SingleChainRuntime
- func NewMinimalInteropNoSupernodeRuntime(t devtest.T) *SingleChainRuntime
- func NewMinimalNoFaultProofsRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
- func NewMinimalRuntime(t devtest.T) *SingleChainRuntime
- func NewMinimalRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
- func NewMinimalWithConductorsRuntime(t devtest.T) *SingleChainRuntime
- func NewMinimalWithConductorsRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
- func NewSimpleWithSyncTesterRuntime(t devtest.T) *SingleChainRuntime
- func NewSimpleWithSyncTesterRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
- func NewSingleChainInteropNoSupernodeSuperRootRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
- func NewSingleChainInteropNoSupernodeZKDisputeRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
- func NewSingleChainMultiNodeRuntime(t devtest.T, withP2P bool) *SingleChainRuntime
- func NewSingleChainMultiNodeRuntimeWithConfig(t devtest.T, withP2P bool, cfg PresetConfig) *SingleChainRuntime
- func NewSingleChainTwoVerifiersRuntime(t devtest.T) *SingleChainRuntime
- func NewSingleChainTwoVerifiersRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
- func NewSingleChainWithIsolatedVerifierRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
- type StallableFollowSourceProxies
- type StallableProxy
- type SubProcess
- type SuperNode
- func (n *SuperNode) InteropActivity() *interop.Interop
- func (n *SuperNode) RestartWithFreshDataDir() error
- func (n *SuperNode) Running() bool
- func (n *SuperNode) Start()
- func (n *SuperNode) StartControlled(ctx context.Context) error
- func (n *SuperNode) Stop()
- func (n *SuperNode) StopControlled(ctx context.Context) error
- func (n *SuperNode) UserRPC() string
- type SuperNodeProxy
- type SuperchainDeployment
- type SupernodeConfig
- type SupernodeOption
- type SyncTesterEL
- type SyncTesterELConfig
- type SyncTesterELOption
- type SyncTesterELOptionBundle
- type SyncTesterELOptionFn
- type SyncTesterRuntime
- type SyncTesterService
- type TestSequencerRuntime
- type ZKDisputeGameConfig
- type ZKProposerOption
- func WithZKFastFinality() ZKProposerOption
- func WithZKLogPath(path string) ZKProposerOption
- func WithZKMetrics() ZKProposerOption
- func WithZKProposalInterval(interval time.Duration) ZKProposerOption
- func WithZKRangeGasLimit(limit uint64) ZKProposerOption
- func WithZKRangeSplitCount(count uint64) ZKProposerOption
- func WithZKTestingMaxRangeChains(limit uint64) ZKProposerOption
- type ZKProposerRuntime
Constants ¶
const DefaultL1BlockTime = 3
DefaultL1BlockTime is the L1 block time in seconds, unless a test sets it with WithL1BlockTime. It is above the default 2s L2 block time, so many L1 epochs still span more than one L2 block.
const DevstackL1ELKindEnvVar = "DEVSTACK_L1EL_KIND"
const DevstackL1ForkEnvVar = "DEVSTACK_L1_FORK"
const GethExecPathEnvVar = "SYSGO_GETH_EXEC_PATH"
Variables ¶
var ( DefaultL1ID = eth.ChainIDFromUInt64(900) DefaultL2AID = eth.ChainIDFromUInt64(901) DefaultL2BID = eth.ChainIDFromUInt64(902) DefaultL2CID = eth.ChainIDFromUInt64(903) )
Functions ¶
func ConnectP2P ¶
func ConnectP2P(ctx context.Context, require *testreq.Assertions, initiator RpcCaller, acceptor RpcCaller)
ConnectP2P creates a p2p peer connection between node1 and node2. The initiator dials the acceptor and the peering is additionally registered as trusted on both nodes: with discovery disabled, an untrusted one-sided peering is unrecoverable once a session drops (the inbound side has no dialable address to re-dial). Trusted peers are never evicted; the re-dial after a drop comes from the initiator's static entry (geth) or from either side's trusted entry (reth).
func DisconnectP2P ¶
func DisconnectP2P(ctx context.Context, require *testreq.Assertions, initiator RpcCaller, acceptor RpcCaller)
DisconnectP2P disconnects a p2p peer connection between node1 and node2.
func FlakyOnKonaNode ¶
func FunderKey ¶ added in v1.19.5
func FunderKey(keys devkeys.Keys) (*ecdsa.PrivateKey, error)
FunderKey returns the private key of the genesis-prefunded funder account. Every sysgo runtime prefunds this account at genesis (see the WithPrefundedAccount calls in this package), so tests hand out funds from a prefunded EOA (dsl.NewFunderEOA) rather than a hosted faucet service. Setup transactions using this key must be included before NewFunderEOA snapshots its nonce; the FunderEOA must own the key exclusively thereafter.
func GetP2PClient ¶
func GetPeerInfo ¶
func OPContractsManagerMigratorABI ¶
OPContractsManagerMigratorABI loads the ABI for the OPContractsManagerMigrator contract from the forge artifact file.
func PrestateForGameType ¶
func RerunOPCMUpgrade ¶ added in v1.20.1
func RerunOPCMUpgrade(t devtest.T, l1EL stack.L1ELNode, l2 stack.L2Network, enabledGameTypes ...gameTypes.GameType)
RerunOPCMUpgrade re-runs OPCMv2.upgrade on a chain after setup, with the OPCM that last upgraded it, so a test can create state before an upgrade and check it after. The upgrade re-initializes the chain's contracts and keeps its respected game type. OPCMv2 requires a config for every game type, so game types not in enabledGameTypes are disabled, as with WithGameTypeAdded.
func SkipOnKonaNode ¶
SkipOnKonaNode skips the test when the L2 consensus layer is kona-node
func SkipOnOpGeth ¶
SkipOnOpGeth skips the test when the L2 execution layer is op-geth
func SkipOnOpReth ¶
SkipOnOpReth skips the test when the L2 execution layer is op-reth
func WithEcotoneAtGenesis ¶
func WithJovianAtGenesis ¶
func WithKarstAtGenesis ¶
func WithKeepKarstUpgradeGas ¶ added in v1.19.1
WithKeepKarstUpgradeGas opts the L2 chains out of reverting the Karst activation block's one-time upgrade gas, so post-activation blocks keep the inflated gas limit.
func ZKDisputeGameConfigForRuntime ¶ added in v1.17.0
func ZKDisputeGameConfigForRuntime() *opcm.ZKDisputeGameConfig
ZKDisputeGameConfigForRuntime returns a ZKDisputeGameConfig for use in devstack/test environments. AbsolutePrestate is a fixed dummy hash — ZK proofs are never verified in devstack.
Types ¶
type BatcherOption ¶
type BatcherOption func(target ComponentTarget, cfg *bss.CLIConfig)
type ComponentTarget ¶
func NewComponentTarget ¶
func NewComponentTarget(name string, chainID eth.ChainID) ComponentTarget
func (ComponentTarget) String ¶
func (t ComponentTarget) String() string
type Conductor ¶
type Conductor struct {
// contains filtered or unexported fields
}
func (*Conductor) ConsensusEndpoint ¶
func (*Conductor) HTTPEndpoint ¶
type ContractPaths ¶
type DeployerOption ¶
func WithCommons ¶
func WithCommons(l1ChainID eth.ChainID) DeployerOption
func WithCustomGasToken ¶
func WithDAFootprintGasScalar ¶
func WithDAFootprintGasScalar(scalar uint16, l2ChainIDs ...eth.ChainID) DeployerOption
WithDAFootprintGasScalar sets the DA footprint gas scalar with which the networks identified by l2ChainIDs will be launched. If there are no l2ChainIDs provided, all L2 networks are set with scalar.
func WithDevFeatureEnabled ¶
func WithDevFeatureEnabled(flag common.Hash) DeployerOption
WithDevFeatureEnabled adds a feature as enabled in the dev feature bitmap
func WithDisputeGameFinalityDelaySeconds ¶
func WithDisputeGameFinalityDelaySeconds(seconds uint64) DeployerOption
WithDisputeGameFinalityDelaySeconds sets the per-chain dispute game finality delay. The delay is bounded by the AnchorStateRegistry implementation, so the bounds are widened when the requested value falls outside the standard range. This only takes effect when the implementations are deployed by this devstack run.
func WithEmbeddedContractSources ¶
func WithEmbeddedContractSources() DeployerOption
func WithFaultGameClockExtension ¶ added in v1.19.10
func WithFaultGameClockExtension(seconds uint64) DeployerOption
WithFaultGameClockExtension overrides the fault dispute game's clock extension. Must be non-zero (DeployImplementations rejects zero) and small enough to satisfy the maxClockDuration relationship documented on WithFaultGameMaxClockDuration.
func WithFaultGameMaxClockDuration ¶ added in v1.19.10
func WithFaultGameMaxClockDuration(seconds uint64) DeployerOption
WithFaultGameMaxClockDuration overrides the fault dispute game's maximum chess-clock duration, i.e. how long an unchallenged game takes to become resolvable (dsl.StandardBridge.GameResolutionDelay). Shrinking it lets a test wait a game out in wall-clock time instead of skipping it with time travel, which matters when the test also depends on L2 origin adoption (time travel advances L1 only, so a large jump stalls deposits for the size of the jump).
The game contracts enforce `max(2*clockExtension, clockExtension+preimageOracleChallengePeriod) <= maxClockDuration`, checked in the game constructor and again in initialize(). With the standard clockExtension (10800s) and challenge period (86400s), any max clock duration below ~97200s makes game creation revert with InvalidClockExtension, so shrinking this value requires shrinking the other two as well - see WithFaultGameClockExtension and WithPreimageOracleChallengePeriod.
func WithFinalizationPeriodSeconds ¶
func WithFinalizationPeriodSeconds(n uint64) DeployerOption
WithFinalizationPeriodSeconds overrides the number of L1 blocks in a sequencing window, applied to all L2s.
func WithForkAtL1Genesis ¶
func WithForkAtL1Genesis(fork forks.Fork) DeployerOption
func WithForkAtL1Offset ¶
func WithForkAtL1Offset(fork forks.Fork, offset uint64) DeployerOption
func WithGuardianMatchL1PAO ¶
func WithGuardianMatchL1PAO() DeployerOption
func WithHardforkSequentialActivation ¶
func WithHardforkSequentialActivation(startFork, endFork opforks.Name, delta *uint64) DeployerOption
WithHardforkSequentialActivation configures a deployment such that L2 chains activate hardforks sequentially, starting from startFork and continuing until (including) endFork. Each successive fork is scheduled at an increasing offset.
func WithInteropAtGenesis ¶
func WithInteropAtGenesis() DeployerOption
WithInteropAtGenesis activates interop at genesis for all known L2s
func WithKarstAtOffset ¶
func WithKarstAtOffset(offset *uint64) DeployerOption
func WithL1BlockTime ¶ added in v1.20.2
func WithL1BlockTime(seconds uint64) DeployerOption
WithL1BlockTime sets the L1 block time in seconds.
func WithL2BlockTimes ¶
func WithL2BlockTimes(blockTimes map[eth.ChainID]uint64) DeployerOption
WithL2BlockTimes sets per-chain L2 block times. The map keys are L2 chain IDs and values are the desired block time in seconds for that chain.
func WithL2GasLimit ¶
func WithL2GasLimit(gasLimit uint64) DeployerOption
func WithLocalContractSources ¶
func WithLocalContractSources() DeployerOption
func WithLocalContractSourcesAt ¶
func WithLocalContractSourcesAt(artifactsPath string) DeployerOption
WithLocalContractSourcesAt configures the deployer to load both L1 and L2 contract artifacts from the given local contracts-bedrock checkout or forge-artifacts directory.
func WithPrefundedL2 ¶
func WithPrefundedL2(l1ChainID, l2ChainID eth.ChainID) DeployerOption
func WithPreimageOracleChallengePeriod ¶ added in v1.19.10
func WithPreimageOracleChallengePeriod(seconds uint64) DeployerOption
WithPreimageOracleChallengePeriod overrides the large-preimage-proposal challenge period of the shared PreimageOracle. It feeds the game's clock-extension bound (see WithFaultGameMaxClockDuration), so it must be shrunk alongside a shortened max clock duration.
func WithProofMaturityDelaySeconds ¶
func WithProofMaturityDelaySeconds(n uint64) DeployerOption
WithProofMaturityDelaySeconds sets the per-chain proof maturity delay. The delay is bounded by the OptimismPortal implementation, so the bounds are widened when the requested value falls outside the standard range. This only takes effect when the implementations are deployed by this devstack run.
func WithSequencingWindow ¶
func WithSequencingWindow(n uint64) DeployerOption
WithSequencingWindow overrides the number of L1 blocks in a sequencing window, applied to all L2s.
func WithUniformL2BlockTimes ¶ added in v1.19.0
func WithUniformL2BlockTimes(seconds uint64) DeployerOption
WithUniformL2BlockTimes sets the same L2 block time (in seconds) on every configured L2 chain.
func WithUseInterop ¶ added in v1.20.1
func WithUseInterop() DeployerOption
WithUseInterop deploys the L2s with the interop predeploys when Lagoon is active at genesis.
func WithWithdrawalDelaySeconds ¶ added in v1.20.1
func WithWithdrawalDelaySeconds(seconds uint64) DeployerOption
WithWithdrawalDelaySeconds sets the per-chain DelayedWETH withdrawal delay. The delay is bounded by the DelayedWETH implementation, so the bounds are widened when the requested value falls outside the standard range. This only takes effect when the implementations are deployed by this devstack run.
type DeployerPipelineOption ¶
type DeployerPipelineOption func(wb *worldBuilder, intent *state.Intent, cfg *deployer.ApplyPipelineOpts)
func WithDeployerCacheDir ¶
func WithDeployerCacheDir(dirPath string) DeployerPipelineOption
func WithDeployerMatchL1PAO ¶
func WithDeployerMatchL1PAO() DeployerPipelineOption
type DisputeGameConfigV2 ¶
V2 structs for OPCM >= 7.0.0 (using IOPContractsManagerMigrator interface)
type DisputeMonConfig ¶ added in v1.19.5
type DisputeMonRuntime ¶ added in v1.19.5
type DisputeMonRuntime struct {
// contains filtered or unexported fields
}
func StartDisputeMon ¶ added in v1.19.5
func StartDisputeMon(t devtest.T, input DisputeMonConfig) *DisputeMonRuntime
func (*DisputeMonRuntime) MetricsURL ¶ added in v1.19.5
func (r *DisputeMonRuntime) MetricsURL() string
type ELNodeIdentity ¶
type ELNodeIdentity struct {
Key *ecdsa.PrivateKey
Port int
}
func NewELNodeIdentity ¶
func NewELNodeIdentity(port int) *ELNodeIdentity
func (*ELNodeIdentity) KeyHex ¶
func (id *ELNodeIdentity) KeyHex() string
type HiddenBlocks ¶ added in v1.20.1
type HiddenBlocks struct {
// contains filtered or unexported fields
}
HiddenBlocks routes the ZK proposer's L2 EL endpoints through WebSocket JSON-RPC proxies that refuse every request naming a hidden block hash, as an EL that pruned the block, or never had it, would. Other messages pass through unchanged, so the proposer reads everything else from the real ELs.
func NewHiddenBlocks ¶ added in v1.20.1
func NewHiddenBlocks() *HiddenBlocks
func (*HiddenBlocks) ForwardedRequests ¶ added in v1.20.1
func (h *HiddenBlocks) ForwardedRequests() int64
ForwardedRequests returns the number of requests the proxies passed to an EL. Tests use it to assert the proposer's traffic flowed through the proxies, so a mis-wired option cannot pass vacuously.
func (*HiddenBlocks) Hide ¶ added in v1.20.1
func (h *HiddenBlocks) Hide(hash common.Hash)
Hide makes the proxies refuse every request with hash among its params.
func (*HiddenBlocks) RefusedRequests ¶ added in v1.20.1
func (h *HiddenBlocks) RefusedRequests() int64
RefusedRequests returns the number of requests the proxies refused because they named a hidden block.
func (*HiddenBlocks) ZKProposerOption ¶ added in v1.20.1
func (h *HiddenBlocks) ZKProposerOption() ZKProposerOption
ZKProposerOption interposes a proxy in front of every L2 EL endpoint given to the ZK proposer, which its in-process kona-host shares.
type InteropFilter ¶
type InteropFilter struct {
// contains filtered or unexported fields
}
InteropFilter wraps an in-process op-interop-filter service for devstack.
func (*InteropFilter) FailsafeEnabled ¶
func (f *InteropFilter) FailsafeEnabled() bool
FailsafeEnabled returns the current failsafe state.
func (*InteropFilter) HTTPEndpoint ¶
func (f *InteropFilter) HTTPEndpoint() string
HTTPEndpoint returns the service's actual RPC endpoint (e.g. "http://127.0.0.1:12345"). The caller is responsible for proxying if needed.
func (*InteropFilter) Ready ¶
func (f *InteropFilter) Ready() bool
Ready returns true once all chain ingesters have backfilled.
func (*InteropFilter) SetFailsafeEnabled ¶
func (f *InteropFilter) SetFailsafeEnabled(enabled bool) error
SetFailsafeEnabled toggles failsafe mode directly on the backend. No admin RPC or JWT needed — this is the in-process advantage.
func (*InteropFilter) Stop ¶
func (f *InteropFilter) Stop()
Stop gracefully shuts down the interop filter service.
func (*InteropFilter) WaitForReady ¶
func (f *InteropFilter) WaitForReady(t devtest.T, timeout time.Duration)
WaitForReady blocks until all chain ingesters have backfilled or the timeout expires. Call this after the supernode/CL layer has started so that blocks are being produced.
type KonaNode ¶
type KonaNode struct {
// contains filtered or unexported fields
}
func (*KonaNode) StartControlled ¶ added in v1.19.2
func (*KonaNode) Stop ¶
func (k *KonaNode) Stop()
Stop stops the kona node. warning: no restarts supported yet, since the RPC port is not remembered.
func (*KonaNode) StopControlled ¶ added in v1.19.2
type L1CLNode ¶
type L1CLNode struct {
// contains filtered or unexported fields
}
func (*L1CLNode) BeaconHTTPAddr ¶
type L1Network ¶
type L1Network struct {
// contains filtered or unexported fields
}
func (*L1Network) ChainConfig ¶
func (n *L1Network) ChainConfig() *params.ChainConfig
type L2CLConfig ¶
type L2CLConfig struct {
// SyncMode for op-node, if this is a sequencer. Kona accepts the recognized
// modes as compatibility inputs and uses its native adaptive EL sync behavior.
SequencerSyncMode nodeSync.Mode
// SyncMode for op-node, if this is a verifier. As above, this does not select
// a native sync mode in Kona.
VerifierSyncMode nodeSync.Mode
// VerifierL1Confs delays L1 input to derivation, independently of sequencing.
VerifierL1Confs uint64
// SafeDBPath is the path to the safe DB to use. Disabled if empty.
SafeDBPath string
IsSequencer bool
// ConductorRPC configures this node to use the conductor at the given RPC
// endpoint. Empty disables conductor integration.
ConductorRPC string
ConductorRPCTimeout time.Duration
// NoDiscovery is the flag to enable/disable discovery
NoDiscovery bool
FollowSource string
// OffsetELSafe retracts safe and finalized from the EL-sync tip by floor(OffsetELSafe / L2BlockTime) blocks.
OffsetELSafe time.Duration
// AltDAServerURL is the DA server the node reads alt-DA inputs from. Empty disables alt-DA.
AltDAServerURL string
}
func DefaultL2CLConfig ¶
func DefaultL2CLConfig() *L2CLConfig
type L2CLOption ¶
type L2CLOption interface {
Apply(p devtest.T, target ComponentTarget, cfg *L2CLConfig)
}
func L2CLFollowSource ¶
func L2CLFollowSource(source string) L2CLOption
func L2CLSequencer ¶
func L2CLSequencer() L2CLOption
type L2CLOptionBundle ¶
type L2CLOptionBundle []L2CLOption
L2CLOptionBundle a list of multiple L2CLOption, to all be applied in order.
func (L2CLOptionBundle) Apply ¶
func (l L2CLOptionBundle) Apply(p devtest.T, target ComponentTarget, cfg *L2CLConfig)
type L2CLOptionFn ¶
type L2CLOptionFn func(p devtest.T, target ComponentTarget, cfg *L2CLConfig)
func (L2CLOptionFn) Apply ¶
func (fn L2CLOptionFn) Apply(p devtest.T, target ComponentTarget, cfg *L2CLConfig)
type L2Challenger ¶
type L2Challenger struct {
// contains filtered or unexported fields
}
func (*L2Challenger) Config ¶
func (p *L2Challenger) Config() *config.Config
type L2Deployment ¶
type L2Deployment struct {
// contains filtered or unexported fields
}
func (*L2Deployment) DisputeGameFactoryProxyAddr ¶
func (d *L2Deployment) DisputeGameFactoryProxyAddr() common.Address
func (*L2Deployment) L1StandardBridgeProxyAddr ¶
func (d *L2Deployment) L1StandardBridgeProxyAddr() common.Address
func (*L2Deployment) PermissionlessDelayedWETHProxyAddr ¶
func (d *L2Deployment) PermissionlessDelayedWETHProxyAddr() common.Address
func (*L2Deployment) ProxyAdminAddr ¶
func (d *L2Deployment) ProxyAdminAddr() common.Address
func (*L2Deployment) SystemConfigProxyAddr ¶
func (d *L2Deployment) SystemConfigProxyAddr() common.Address
type L2ELConfig ¶
type L2ELConfig struct {
P2PAddr string
P2PPort int
P2PNodeKeyHex string
StaticPeers []string
TrustedPeers []string
ProofHistory bool
}
func DefaultL2ELConfig ¶
func DefaultL2ELConfig() *L2ELConfig
type L2ELOption ¶
type L2ELOption interface {
Apply(p devtest.T, target ComponentTarget, cfg *L2ELConfig)
}
func L2ELWithP2PConfig ¶
func L2ELWithP2PConfig(addr string, port int, nodeKeyHex string, staticPeers, trustedPeers []string) L2ELOption
L2ELWithP2PConfig sets deterministic P2P identity and static peers for the L2 EL.
func L2ELWithProofHistory ¶
func L2ELWithProofHistory(enable bool) L2ELOption
type L2ELOptionBundle ¶
type L2ELOptionBundle []L2ELOption
L2ELOptionBundle a list of multiple L2ELOption, to all be applied in order.
func (L2ELOptionBundle) Apply ¶
func (l L2ELOptionBundle) Apply(p devtest.T, target ComponentTarget, cfg *L2ELConfig)
type L2ELOptionFn ¶
type L2ELOptionFn func(p devtest.T, target ComponentTarget, cfg *L2ELConfig)
func (L2ELOptionFn) Apply ¶
func (fn L2ELOptionFn) Apply(p devtest.T, target ComponentTarget, cfg *L2ELConfig)
type L2MetricsRegistrar ¶
type L2MetricsRegistrar interface {
RegisterL2MetricsTargets(serviceName string, endpoints ...PrometheusMetricsTarget)
}
type L2Network ¶
type L2Network struct {
// contains filtered or unexported fields
}
func (*L2Network) ChainConfig ¶
func (c *L2Network) ChainConfig() *params.ChainConfig
func (*L2Network) Deployment ¶
func (c *L2Network) Deployment() stack.L2Deployment
func (*L2Network) RollupConfig ¶
type L2Proposer ¶
type L2Proposer struct {
// contains filtered or unexported fields
}
type MigrateInputV2 ¶
type MigrateInputV2 struct {
ChainSystemConfigs []common.Address
DisputeGameConfigs []DisputeGameConfigV2
StartingAnchorRoot Proposal
StartingRespectedGameType uint32
}
type MixedL2CLKind ¶
type MixedL2CLKind string
const ( MixedL2CLOpNode MixedL2CLKind = "op-node" MixedL2CLKona MixedL2CLKind = "kona-node" )
func ResolveMixedL2CLKind ¶ added in v1.19.1
func ResolveMixedL2CLKind() MixedL2CLKind
ResolveMixedL2CLKind returns the L2 CL kind requested via DEVSTACK_L2CL_KIND, defaulting to op-node when the variable is unset. Tests that build explicit MixedSingleChainNodeSpec lists use this so they honor the same env-driven CL selection as the higher-level single-chain presets (see startL2CLForKey).
type MixedL2ELKind ¶
type MixedL2ELKind string
const ( MixedL2ELOpGeth MixedL2ELKind = "op-geth" MixedL2ELOpReth MixedL2ELKind = "op-reth" )
type MixedSingleChainNodeRefs ¶
type MixedSingleChainNodeRefs struct {
Spec MixedSingleChainNodeSpec
EL L2ELNode
CL L2CLNode
}
type MixedSingleChainNodeSpec ¶
type MixedSingleChainNodeSpec struct {
ELKey string
CLKey string
ELKind MixedL2ELKind
CLKind MixedL2CLKind
IsSequencer bool
// IsolateFromL2P2P keeps this node off the L2 CL/EL P2P mesh: it is never peered with the
// other nodes, so it receives no gossiped or req-resp'd unsafe blocks and must advance purely
// by deriving from L1. Used to exercise the derivation/force-build path (FCU-with-attributes)
// rather than the consolidation path. Defaults to false (fully peered).
IsolateFromL2P2P bool
// OpRethOpts are per-node op-reth options applied AFTER the shared cfg.OpRethOptions, only to
// this node's EL. Use for options that must not reach every node — e.g. a per-node binary
// override (OpRethWithBinary) or a flag a single node should receive while its peers reject it.
// Ignored for non-op-reth EL kinds.
OpRethOpts []OpRethOption
// EnableSafeDB gives this node's CL a safe head database in a fresh temp dir, so it records
// the L2 safe head reached as of each L1 block and serves it over optimism_safeHeadAtL1Block.
EnableSafeDB bool
// VerifierL1Confs is the L1 confirmation distance used by derivation in either CL.
// It does not change the sequencer's L1 origin selection distance.
VerifierL1Confs uint64
}
type MixedSingleChainPresetConfig ¶
type MixedSingleChainPresetConfig struct {
NodeSpecs []MixedSingleChainNodeSpec
WithTestSequencer bool
TestSequencerName string
LocalContractArtifactsPath string
DeployerOptions []DeployerOption
BatcherOptions []BatcherOption
OpRethOptions []OpRethOption
// InteropAtGenesis activates the Lagoon hardfork at genesis on the L2 chain and provides
// the resulting dependency set to op-node CL startup. Required by any test that exercises
// interop-gated consensus features (e.g. SDM PostExec) without a supervisor.
InteropAtGenesis bool
}
type MixedSingleChainRuntime ¶
type MixedSingleChainRuntime struct {
L1Network *L1Network
L1EL *L1Geth
L1CL *L1CLNode
L2Network *L2Network
Nodes []MixedSingleChainNodeRefs
L2Batcher *L2Batcher
TestSequencer *TestSequencerRuntime
}
func NewMixedSingleChainRuntime ¶
func NewMixedSingleChainRuntime(t devtest.T, cfg MixedSingleChainPresetConfig) *MixedSingleChainRuntime
type MultiChainNodeRuntime ¶
type MultiChainNodeRuntime struct {
Name string
Network *L2Network
// EL is the chain's primary EL. In light-sequencer presets it is the
// follow-mode sequencer's own EL; in virtual-sequencer presets it is the
// same EL the supernode VN drives.
EL L2ELNode
CL L2CLNode
SupernodeCL L2CLNode
// SupernodeEL is the EL the supernode VN reads/writes. In light-sequencer
// presets it is distinct from EL (production topology: separate ELs joined
// only by L1 + P2P); in virtual-sequencer presets it equals EL.
SupernodeEL L2ELNode
Batcher *L2Batcher
Proposer *L2Proposer
Followers map[string]*SingleChainNodeRuntime
}
type MultiChainRuntime ¶
type MultiChainRuntime struct {
Keys devkeys.Keys
Migration *interopMigrationState
FullConfigSet config.FullConfigSetMerged
DependencySet coredepset.DependencySet
L1Network *L1Network
L1EL *L1Geth
L1CL *L1CLNode
Chains map[string]*MultiChainNodeRuntime
Supernode *SuperNode
TimeTravel *clock.AdvancingClock
TestSequencer *TestSequencerRuntime
L2ChallengerConfig *challengerconfig.Config
DelaySeconds uint64
InteropFilter *InteropFilter // nil if not using interop filter
SyncTester *SyncTesterRuntime
// contains filtered or unexported fields
}
func NewSingleChainSuperRootAtGenesisRuntimeWithConfig ¶
func NewSingleChainSuperRootAtGenesisRuntimeWithConfig(t devtest.T, cfg PresetConfig) *MultiChainRuntime
NewSingleChainSuperRootAtGenesisRuntimeWithConfig builds a single-chain supernode runtime with SUPER_PERMISSIONED installed in the permissioned slot at initial deploy.
func NewSingleChainSupernodeProofsRuntimeWithConfig ¶
func NewSingleChainSupernodeProofsRuntimeWithConfig(t devtest.T, lagoonAtGenesis bool, cfg PresetConfig) *MultiChainRuntime
NewSingleChainSupernodeProofsRuntimeWithConfig deploys permissionless super games with a valid genesis anchor. lagoonAtGenesis controls whether Lagoon activates interop at genesis.
func NewSingleSupernodeWithSyncTesterRuntime ¶ added in v1.19.0
func NewSingleSupernodeWithSyncTesterRuntime(t devtest.T) *MultiChainRuntime
NewSingleSupernodeWithSyncTesterRuntime builds a single-chain runtime: real sequencer op-node + EL driving the chain, sync-tester service feeding a mocked EL, and a verifier-mode supernode VN wired to that mocked EL. Interop is always on; cfg.InteropActivationDelaySeconds picks at-genesis (0) or post-genesis activation.
func NewSingleSupernodeWithSyncTesterRuntimeWithConfig ¶ added in v1.19.0
func NewSingleSupernodeWithSyncTesterRuntimeWithConfig(t devtest.T, cfg PresetConfig) *MultiChainRuntime
func NewThreeL2SupernodeProofsRuntimeWithConfig ¶ added in v1.19.10
func NewThreeL2SupernodeProofsRuntimeWithConfig(t devtest.T, lagoonAtGenesis bool, cfg PresetConfig) *MultiChainRuntime
NewThreeL2SupernodeProofsRuntimeWithConfig creates a three-chain supernode proofs runtime.
func NewTwoL2SupernodeFollowL2RuntimeWithConfig ¶
func NewTwoL2SupernodeFollowL2RuntimeWithConfig(t devtest.T, delaySeconds uint64, cfg PresetConfig) *MultiChainRuntime
func NewTwoL2SupernodeInteropRuntime ¶
func NewTwoL2SupernodeInteropRuntime(t devtest.T, delaySeconds uint64) *MultiChainRuntime
func NewTwoL2SupernodeInteropRuntimeWithConfig ¶
func NewTwoL2SupernodeInteropRuntimeWithConfig(t devtest.T, delaySeconds uint64, cfg PresetConfig) *MultiChainRuntime
func NewTwoL2SupernodeLightSequencerInteropRuntimeWithConfig ¶ added in v1.19.0
func NewTwoL2SupernodeLightSequencerInteropRuntimeWithConfig(t devtest.T, delaySeconds uint64, cfg PresetConfig) *MultiChainRuntime
func NewTwoL2SupernodeProofsRuntimeWithConfig ¶
func NewTwoL2SupernodeProofsRuntimeWithConfig(t devtest.T, lagoonAtGenesis bool, cfg PresetConfig) *MultiChainRuntime
NewTwoL2SupernodeProofsRuntimeWithConfig creates a two-chain supernode proofs runtime. lagoonAtGenesis controls whether Lagoon activates interop at genesis.
func NewTwoL2SupernodeRuntime ¶
func NewTwoL2SupernodeRuntime(t devtest.T) *MultiChainRuntime
func NewTwoL2SupernodeRuntimeWithConfig ¶
func NewTwoL2SupernodeRuntimeWithConfig(t devtest.T, cfg PresetConfig) *MultiChainRuntime
func (*MultiChainRuntime) StartZKProposer ¶ added in v1.19.5
func (r *MultiChainRuntime) StartZKProposer(t devtest.T) *ZKProposerRuntime
StartZKProposer starts the configured op-zk-proposer. It is intended for tests that seed dispute games with WithoutHonestProposer before allowing the proposer to observe them.
type OpGeth ¶
type OpGeth struct {
// contains filtered or unexported fields
}
func (*OpGeth) StartControlled ¶ added in v1.19.2
func (*OpGeth) StopControlled ¶ added in v1.19.2
type OpNode ¶
type OpNode struct {
// contains filtered or unexported fields
}
func (*OpNode) StartControlled ¶ added in v1.19.2
func (*OpNode) StopControlled ¶ added in v1.19.2
type OpReth ¶
type OpReth struct {
// contains filtered or unexported fields
}
func (*OpReth) StartControlled ¶ added in v1.19.2
func (*OpReth) StopControlled ¶ added in v1.19.2
type OpRethConfig ¶ added in v1.18.0
type OpRethConfig struct {
// ExtraArgs are appended to the generated CLI args.
ExtraArgs []string
// Binary selects the EL binary to launch. Empty means "op-reth". A CLI-compatible superset
// (any binary that accepts every op-reth subcommand/flag, plus optionally its own additive
// flags) may be selected via OpRethWithBinary.
Binary string
// DisableProofsHistory skips the proofs-history init + runtime flags for this node. The mixed
// runtime otherwise enables proofs-history on every op-reth node; some CLI-superset binaries
// reject --proofs-history in the mode under test.
DisableProofsHistory bool
}
OpRethConfig holds the configurable knobs applied to an op-reth node before it is started.
func DefaultOpRethConfig ¶ added in v1.18.0
func DefaultOpRethConfig() *OpRethConfig
DefaultOpRethConfig returns a zero-valued OpRethConfig that callers can mutate via OpRethOptions.
type OpRethOption ¶ added in v1.18.0
type OpRethOption interface {
Apply(p devtest.T, target ComponentTarget, cfg *OpRethConfig)
}
OpRethOption customises an OpRethConfig for a specific component target.
func OpRethWithBinary ¶ added in v1.19.1
func OpRethWithBinary(binary string) OpRethOption
OpRethWithBinary selects the EL binary to launch instead of the default "op-reth". The binary must be a CLI superset of op-reth (it is invoked with op-reth's subcommands and flags). A binary that lives outside this repo is resolved via the rustbin env overrides keyed off its name — RUST_BINARY_PATH_<NAME> (or RUST_SRC_DIR_<NAME> + RUST_JIT_BUILD), with <NAME> the upper-snake-cased binary name.
func OpRethWithExtraArgs ¶ added in v1.18.0
func OpRethWithExtraArgs(args ...string) OpRethOption
OpRethWithExtraArgs appends raw CLI arguments to the op-reth invocation.
func OpRethWithInteropURL ¶ added in v1.19.0
func OpRethWithInteropURL(interopURL string) OpRethOption
OpRethWithInteropURL wires the op-reth node to the given interop filter HTTP endpoint. An empty interopURL is a no-op so callers can pass the value unconditionally.
func OpRethWithoutProofsHistory ¶ added in v1.19.5
func OpRethWithoutProofsHistory() OpRethOption
OpRethWithoutProofsHistory disables the proofs-history subsystem for this node. The mixed runtime enables proofs-history on every op-reth node by default; use this for a CLI-superset binary that rejects --proofs-history in the mode under test.
func ResolveMixedL2ELOpts ¶ added in v1.19.5
func ResolveMixedL2ELOpts(t devtest.T) []OpRethOption
ResolveMixedL2ELOpts returns the op-reth options requested via the environment: DEVSTACK_L2EL_OVERRIDE_BINARY names a CLI-superset binary to launch instead of the default "op-reth", and DEVSTACK_L2EL_OVERRIDE_ARGS carries whitespace-separated extra CLI arguments for it. The returned slice is empty when both are unset, so callers get stock op-reth.
This is the EL-side counterpart to ResolveMixedL2CLKind: it lets a suite outside this repo re-run these tests against its own EL build without forking the test bodies. The named binary is resolved through the usual rustbin env overrides (see OpRethWithBinary), whose variable name derives from the binary name — "my-builder" reads RUST_BINARY_PATH_MY_BUILDER, leaving the stock verifiers' RUST_BINARY_PATH_OP_RETH untouched. Naming the override "op-reth" would collapse that distinction, but such an override selects the default binary anyway.
A superset binary that binds a listener the harness knows nothing about needs the args to move it off a fixed port, since every node here shares one host. The args only ever qualify an override binary, so naming them without one is rejected rather than ignored — a stale value in the environment would otherwise silently alter a stock run.
Proofs history is disabled whenever a binary is named: the mixed runtime enables it on every op-reth node, but a superset binary that replaces the payload service cannot host op-reth's proof-history launcher, so leaving it on would either be silently ignored or refused at startup. A suite that needs it should run stock op-reth.
type OpRethOptionBundle ¶ added in v1.18.0
type OpRethOptionBundle []OpRethOption
OpRethOptionBundle applies multiple OpRethOptions in order.
func (OpRethOptionBundle) Apply ¶ added in v1.18.0
func (b OpRethOptionBundle) Apply(p devtest.T, target ComponentTarget, cfg *OpRethConfig)
Apply runs each contained option against cfg, failing the test on a nil entry.
type OpRethOptionFn ¶ added in v1.18.0
type OpRethOptionFn func(p devtest.T, target ComponentTarget, cfg *OpRethConfig)
OpRethOptionFn adapts a plain function into an OpRethOption.
func (OpRethOptionFn) Apply ¶ added in v1.18.0
func (fn OpRethOptionFn) Apply(p devtest.T, target ComponentTarget, cfg *OpRethConfig)
Apply invokes the underlying function against the supplied config.
type PresetConfig ¶
type PresetConfig struct {
LocalContractArtifactsPath string
DeployerOptions []DeployerOption
BatcherOptions []BatcherOption
ProposerOptions []ProposerOption
OpRethOptions []OpRethOption
GlobalL2CLOptions []L2CLOption
GlobalSyncTesterELOptions []SyncTesterELOption
L1ELKind string
L1GethExecPath string
AddedGameTypes []gameTypes.GameType
RespectedGameTypes []gameTypes.GameType
EnableTimeTravel bool
MaxSequencingWindow *uint64
RequireInteropNotAtGen bool
MessageExpiryWindow *uint64
// L2ToL2MessageExpiryPeriod, if non-zero, sets the L2ToL2CrossDomainMessenger's expiry period
// in every L2 genesis, in seconds. It must exceed MessageExpiryWindow.
L2ToL2MessageExpiryPeriod uint64
UseInteropFilter bool
// InteropLogBackfillDepth, if non-zero, configures the supernode to backfill
// initiating-message logs backward from the tip by this duration at startup.
InteropLogBackfillDepth time.Duration
PreGenesisSuperGame *PreGenesisSuperGameConfig
ZKDisputeGame *ZKDisputeGameConfig
ZKProposerOptions []ZKProposerOption
// SkipHonestProposer skips starting the honest proposer (op-proposer, or op-zk-proposer for the ZK preset).
SkipHonestProposer bool
// SkipHonestChallenger skips starting the honest challenger.
SkipHonestChallenger bool
// SupernodeVerifierSyncMode overrides the supernode VN's sync mode when set.
SupernodeVerifierSyncMode *nodeSync.Mode
// InteropActivationDelaySeconds offsets Interop activation past genesis (0 = at genesis).
InteropActivationDelaySeconds uint64
// InteropAtGenesis activates Interop on the L2 chain at genesis and provisions a
// DependencySet for op-node startup (without a supervisor). Required by tests that
// exercise Interop-gated consensus features (e.g. SDM PostExec) on the default
// single-chain runtime.
InteropAtGenesis bool
// SupernodeVNSequencerForBootstrap, in the light-sequencer supernode interop preset,
// enables sequencing on the supernode VN and starts the light follow-mode ELSync
// sequencers stopped, so the VN can bootstrap the chain the light sequencers EL-sync
// from before a test hands off sequencing to them.
SupernodeVNSequencerForBootstrap bool
// ConductorFastHealthChecks runs conductor health checks every second
// instead of the effectively-disabled hourly default, so conductor-driven
// failover reacts to sequencer failures within test timescales. Health
// stays purely liveness-based: the unsafe/safe staleness windows remain at
// an hour so chain-progression hiccups under CI load cannot flip a healthy
// sequencer to unhealthy.
ConductorFastHealthChecks bool
// AltDAStore, if set, runs the L2 chain on alt-DA with keccak commitments, served by a DA server
// that keeps the inputs in this store. Only single-chain runtimes honor it, and they wire only the
// batcher and the sequencer node to the DA server.
AltDAStore altda.KVStore
}
PresetConfig captures preset constructor mutations. It is independent from orchestrator lifecycle hooks.
func NewPresetConfig ¶
func NewPresetConfig() PresetConfig
type PrometheusMetricsTarget ¶
type PrometheusMetricsTarget string
func NewPrometheusMetricsTarget ¶
func NewPrometheusMetricsTarget(host string, port string, isRunningInDocker bool) PrometheusMetricsTarget
type Proposal ¶
Proposal matches the Solidity Proposal struct: (bytes32 root, uint256 l2SequenceNumber)
type ProposerOption ¶
type ProposerOption func(target ComponentTarget, cfg *ps.CLIConfig)
type SingleChainInteropSupport ¶
type SingleChainInteropSupport struct {
Migration *interopMigrationState
FullConfigSet config.FullConfigSetMerged
DependencySet coredepset.DependencySet
}
type SingleChainNodeRuntime ¶
type SingleChainRuntime ¶
type SingleChainRuntime struct {
Keys devkeys.Keys
L1Network *L1Network
L2Network *L2Network
L1EL *L1Geth
L1CL *L1CLNode
L2EL L2ELNode
L2CL L2CLNode
L2Batcher *L2Batcher
L2Proposer *L2Proposer
L2Challenger *L2Challenger
// ZKChallengerSuperRootRPCProxy is set when the runtime starts a ZK challenger.
ZKChallengerSuperRootRPCProxy *StallableProxy
TimeTravel *clock.AdvancingClock
TestSequencer *TestSequencerRuntime
Nodes map[string]*SingleChainNodeRuntime
SyncTester *SyncTesterRuntime
Conductors map[string]*Conductor
Interop *SingleChainInteropSupport
P2PEnabled bool
}
func NewMinimalInteropNoSupernodeRuntime ¶ added in v1.19.5
func NewMinimalInteropNoSupernodeRuntime(t devtest.T) *SingleChainRuntime
NewMinimalInteropNoSupernodeRuntime constructs the single-chain interop world without supernode wiring.
func NewMinimalNoFaultProofsRuntimeWithConfig ¶ added in v1.19.0
func NewMinimalNoFaultProofsRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
NewMinimalNoFaultProofsRuntimeWithConfig returns a minimal single-chain runtime without the proposer or challenger. It is intended for tests that only exercise the sequencer + batcher + derivation loop and do not need fault proofs. Skipping the challenger also avoids requiring cannon prestate artifacts, which are expensive to build locally.
func NewMinimalRuntime ¶
func NewMinimalRuntime(t devtest.T) *SingleChainRuntime
SingleChainRuntime is the shared DAG runtime for single-chain preset topologies. It is the root for minimal, follower-node, sync-tester, conductor, and no-supernode interop variants.
func NewMinimalRuntimeWithConfig ¶
func NewMinimalRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
func NewMinimalWithConductorsRuntime ¶
func NewMinimalWithConductorsRuntime(t devtest.T) *SingleChainRuntime
func NewMinimalWithConductorsRuntimeWithConfig ¶
func NewMinimalWithConductorsRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
func NewSimpleWithSyncTesterRuntime ¶
func NewSimpleWithSyncTesterRuntime(t devtest.T) *SingleChainRuntime
func NewSimpleWithSyncTesterRuntimeWithConfig ¶
func NewSimpleWithSyncTesterRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
func NewSingleChainInteropNoSupernodeSuperRootRuntimeWithConfig ¶ added in v1.19.5
func NewSingleChainInteropNoSupernodeSuperRootRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
NewSingleChainInteropNoSupernodeSuperRootRuntimeWithConfig constructs a single-chain interop world with no supernode, running an op-challenger that plays super-cannon-kona games sourcing super roots directly from the op-node's superroot_atTimestamp endpoint. The primary op-node enables its safe DB (required by superroot_atTimestamp).
func NewSingleChainInteropNoSupernodeZKDisputeRuntimeWithConfig ¶ added in v1.19.5
func NewSingleChainInteropNoSupernodeZKDisputeRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
NewSingleChainInteropNoSupernodeZKDisputeRuntimeWithConfig constructs a single-chain interop world with no supernode, running an op-challenger that plays ZK dispute games sourcing super roots directly from the op-node's superroot_atTimestamp endpoint. The primary op-node enables its safe DB (required by superroot_atTimestamp).
func NewSingleChainMultiNodeRuntime ¶
func NewSingleChainMultiNodeRuntime(t devtest.T, withP2P bool) *SingleChainRuntime
func NewSingleChainMultiNodeRuntimeWithConfig ¶
func NewSingleChainMultiNodeRuntimeWithConfig(t devtest.T, withP2P bool, cfg PresetConfig) *SingleChainRuntime
func NewSingleChainTwoVerifiersRuntime ¶
func NewSingleChainTwoVerifiersRuntime(t devtest.T) *SingleChainRuntime
func NewSingleChainTwoVerifiersRuntimeWithConfig ¶
func NewSingleChainTwoVerifiersRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
func NewSingleChainWithIsolatedVerifierRuntimeWithConfig ¶ added in v1.19.10
func NewSingleChainWithIsolatedVerifierRuntimeWithConfig(t devtest.T, cfg PresetConfig) *SingleChainRuntime
type StallableFollowSourceProxies ¶ added in v1.19.5
type StallableFollowSourceProxies struct {
// contains filtered or unexported fields
}
StallableFollowSourceProxies routes the follow-source endpoint of every L2 CL that has one through its own StallableProxy, so tests can stall follow-source RPC traffic per chain while the follow source itself keeps running.
func NewStallableFollowSourceProxies ¶ added in v1.19.5
func NewStallableFollowSourceProxies() *StallableFollowSourceProxies
func (*StallableFollowSourceProxies) ForChain ¶ added in v1.19.5
func (s *StallableFollowSourceProxies) ForChain(p devtest.T, chainID eth.ChainID) *StallableProxy
ForChain returns the proxy interposed for the given chain's follow-source CL, failing the test if none was wired (e.g. the option was not applied).
func (*StallableFollowSourceProxies) L2CLOption ¶ added in v1.19.5
func (s *StallableFollowSourceProxies) L2CLOption() L2CLOption
L2CLOption returns the option that interposes a proxy in front of cfg.FollowSource. CLs without a follow source are left untouched.
type StallableProxy ¶ added in v1.19.5
type StallableProxy struct {
// contains filtered or unexported fields
}
StallableProxy is a reverse proxy for an HTTP RPC endpoint that can be switched into a stalled mode: while stalled, incoming requests are held open without a response until the client gives up (e.g. its call timeout) or the proxy is resumed. It lets tests simulate an unresponsive upstream without stopping the upstream itself.
func StartStallableProxy ¶ added in v1.19.5
func StartStallableProxy(p devtest.T, name string, targetURL string) *StallableProxy
StartStallableProxy starts a StallableProxy in front of targetURL. The proxy begins in passthrough mode and is shut down via test cleanup.
func (*StallableProxy) MaxConcurrentStalledRequests ¶ added in v1.19.5
func (p *StallableProxy) MaxConcurrentStalledRequests() int64
MaxConcurrentStalledRequests returns the highest number of requests that were held open by the stall at the same moment. Tests use it to pin down single-flight client behavior: a client that fires a new request on every tick while an earlier one is still blocked drives this above one.
func (*StallableProxy) Resume ¶ added in v1.19.5
func (p *StallableProxy) Resume()
Resume releases all held requests and returns to passthrough mode. Idempotent.
func (*StallableProxy) Stall ¶ added in v1.19.5
func (p *StallableProxy) Stall()
Stall holds all new requests open without a response until Resume is called. Idempotent.
func (*StallableProxy) StalledRequests ¶ added in v1.19.5
func (p *StallableProxy) StalledRequests() int64
StalledRequests returns the number of requests that have been held by the stall so far. Tests use it to assert traffic actually flowed through the stalled proxy, so a mis-wired proxy cannot pass vacuously.
func (*StallableProxy) URL ¶ added in v1.19.5
func (p *StallableProxy) URL() string
URL returns the address clients should connect to instead of the target.
func (*StallableProxy) WaitForStalledRequests ¶ added in v1.19.6
func (p *StallableProxy) WaitForStalledRequests(t devtest.T, count int64)
WaitForStalledRequests waits until at least count requests have been held by the proxy. Requiring multiple requests lets recovery tests prove that a client retried after an earlier stalled request timed out.
type SubProcess ¶
type SubProcess struct {
// contains filtered or unexported fields
}
SubProcess is a process that can be started and stopped.
func NewSubProcess ¶
func NewSubProcess(p devtest.CommonT, stdOutCallback, stdErrCallback logpipe.LogCallback) *SubProcess
func (*SubProcess) Exited ¶ added in v1.19.1
func (sp *SubProcess) Exited() <-chan struct{}
Exited returns a channel that is closed once the process has exited and its stdout/stderr have been fully flushed. It must only be called after Start.
func (*SubProcess) Start ¶
func (sp *SubProcess) Start(cmdPath string, args []string, env []string) error
func (*SubProcess) Stop ¶
func (sp *SubProcess) Stop(interrupt bool) error
Stop waits for the process to stop, interrupting the process if it has not completed and interrupt is true.
func (*SubProcess) StopControlled ¶ added in v1.19.2
type SuperNode ¶
type SuperNode struct {
// contains filtered or unexported fields
}
func (*SuperNode) InteropActivity ¶
InteropActivity returns the interop activity, or nil if the supernode is stopped or has no interop activity. The pointer is bound to the current instance; do not cache across RestartWithFreshDataDir. Test-only.
func (*SuperNode) RestartWithFreshDataDir ¶ added in v1.19.0
RestartWithFreshDataDir stops the supernode, deletes its on-disk data directory, and starts a fresh supernode against the same chain containers, virtual nodes, and externally-visible RPC address. Test-only.
func (*SuperNode) StartControlled ¶ added in v1.19.2
func (*SuperNode) StopControlled ¶ added in v1.19.2
type SuperNodeProxy ¶
type SuperNodeProxy struct {
// contains filtered or unexported fields
}
SuperNodeProxy is a thin wrapper that points to a shared supernode instance.
func (*SuperNodeProxy) Start ¶
func (n *SuperNodeProxy) Start()
func (*SuperNodeProxy) Stop ¶
func (n *SuperNodeProxy) Stop()
func (*SuperNodeProxy) UserRPC ¶
func (n *SuperNodeProxy) UserRPC() string
type SuperchainDeployment ¶
type SuperchainDeployment struct {
// contains filtered or unexported fields
}
func (*SuperchainDeployment) SuperchainConfigAddr ¶
func (d *SuperchainDeployment) SuperchainConfigAddr() common.Address
type SupernodeConfig ¶
type SupernodeConfig struct {
// InteropActivationTimestamp enables the interop activity at the given timestamp.
// Set to nil to disable interop (default). Non-nil (including 0) enables interop.
InteropActivationTimestamp *uint64
// UseGenesisInterop, when true, sets InteropActivationTimestamp to the genesis
// timestamp of the first configured chain at deploy time. Takes effect inside
// withSharedSupernodeCLsImpl after deployment, when the genesis time is known.
UseGenesisInterop bool
}
SupernodeConfig holds configuration options for the shared supernode.
type SupernodeOption ¶
type SupernodeOption func(*SupernodeConfig)
SupernodeOption is a functional option for configuring the supernode.
func WithSupernodeInterop ¶
func WithSupernodeInterop(activationTimestamp uint64) SupernodeOption
WithSupernodeInterop enables the interop activity with the given activation timestamp.
func WithSupernodeInteropAtGenesis ¶
func WithSupernodeInteropAtGenesis() SupernodeOption
WithSupernodeInteropAtGenesis enables interop at the genesis timestamp of the first configured chain. The timestamp is resolved after deployment, when genesis is known.
type SyncTesterEL ¶
type SyncTesterEL struct {
// contains filtered or unexported fields
}
SyncTesterEL is an L2ELNode implementation that runs a sync tester service. It provides RPC endpoints that can be used by CL nodes for testing sync functionality.
func (*SyncTesterEL) EngineRPC ¶
func (n *SyncTesterEL) EngineRPC() string
func (*SyncTesterEL) JWTPath ¶
func (n *SyncTesterEL) JWTPath() string
func (*SyncTesterEL) Start ¶
func (n *SyncTesterEL) Start()
func (*SyncTesterEL) Stop ¶
func (n *SyncTesterEL) Stop()
func (*SyncTesterEL) UserRPC ¶
func (n *SyncTesterEL) UserRPC() string
type SyncTesterELConfig ¶
func DefaultSyncTesterELConfig ¶
func DefaultSyncTesterELConfig() *SyncTesterELConfig
func (*SyncTesterELConfig) Path ¶
func (cfg *SyncTesterELConfig) Path() string
type SyncTesterELOption ¶
type SyncTesterELOption interface {
Apply(p devtest.T, target ComponentTarget, cfg *SyncTesterELConfig)
}
type SyncTesterELOptionBundle ¶
type SyncTesterELOptionBundle []SyncTesterELOption
SyncTesterELOptionBundle a list of multiple SyncTesterELOption, to all be applied in order.
func (SyncTesterELOptionBundle) Apply ¶
func (l SyncTesterELOptionBundle) Apply(p devtest.T, target ComponentTarget, cfg *SyncTesterELConfig)
type SyncTesterELOptionFn ¶
type SyncTesterELOptionFn func(p devtest.T, target ComponentTarget, cfg *SyncTesterELConfig)
func (SyncTesterELOptionFn) Apply ¶
func (fn SyncTesterELOptionFn) Apply(p devtest.T, target ComponentTarget, cfg *SyncTesterELConfig)
type SyncTesterRuntime ¶
type SyncTesterRuntime struct {
Service *SyncTesterService
// Node is set on the op-node-verifier path; nil on the supernode path.
Node *SingleChainNodeRuntime
// EL is the sync-tester-backed L2ELNode.
EL L2ELNode
// CL drives the sync-tester EL (op-node or SuperNodeProxy).
CL L2CLNode
}
type SyncTesterService ¶
type SyncTesterService struct {
// contains filtered or unexported fields
}
Caveat: id is binded by a single EL(chainID), but service can support multiple ELs
func (*SyncTesterService) DefaultEndpoint ¶
func (*SyncTesterService) RPC ¶
func (n *SyncTesterService) RPC() string
func (*SyncTesterService) SyncTesterRPCPath ¶
func (n *SyncTesterService) SyncTesterRPCPath(chainID eth.ChainID, withSessionID bool) string
type TestSequencerRuntime ¶
type ZKDisputeGameConfig ¶ added in v1.19.5
type ZKDisputeGameConfig struct {
MaxChallengeDuration time.Duration
MaxProveDuration time.Duration
}
ZKDisputeGameConfig configures the shared ZK dispute game installed after the interop migration. OPCM injects the release-owned SP1 adapter.
type ZKProposerOption ¶ added in v1.19.5
type ZKProposerOption func(cfg *zkProposerConfig)
ZKProposerOption configures the op-zk-proposer process started by devstack.
func WithZKFastFinality ¶ added in v1.19.5
func WithZKFastFinality() ZKProposerOption
WithZKFastFinality makes the proposer prove every game it owns while it is still unchallenged.
func WithZKLogPath ¶ added in v1.20.1
func WithZKLogPath(path string) ZKProposerOption
WithZKLogPath sets how the proposer proves logs below a local safe head: "table" (the proposer's default) or "receipts".
func WithZKMetrics ¶ added in v1.19.5
func WithZKMetrics() ZKProposerOption
WithZKMetrics enables proposer-state verification through the acceptance-test DSL. Metrics are disabled by default. The proposer owns its selected port.
func WithZKProposalInterval ¶ added in v1.19.5
func WithZKProposalInterval(interval time.Duration) ZKProposerOption
WithZKProposalInterval overrides the proposal interval passed to op-zk-proposer.
func WithZKRangeGasLimit ¶ added in v1.20.1
func WithZKRangeGasLimit(limit uint64) ZKProposerOption
WithZKRangeGasLimit sets the range and consolidation request gas limit. The mock provider proves nothing, so the limit only drives the proposer's estimate checks: a small one makes it bisect spans. Zero keeps the proposer default.
func WithZKRangeSplitCount ¶ added in v1.20.1
func WithZKRangeSplitCount(count uint64) ZKProposerOption
WithZKRangeSplitCount sets the number of chunks each game span is proven in, between 1 and 128. A span shorter than the count gets one timestamp per chunk. Zero keeps the proposer default.
func WithZKTestingMaxRangeChains ¶ added in v1.20.1
func WithZKTestingMaxRangeChains(limit uint64) ZKProposerOption
WithZKTestingMaxRangeChains sets the proposer's testing-only cap on the chains of one range request. Zero keeps the proposer default, no limit.
type ZKProposerRuntime ¶ added in v1.19.10
type ZKProposerRuntime struct {
// contains filtered or unexported fields
}
ZKProposerRuntime is the opaque handle for a running op-zk-proposer.
func (*ZKProposerRuntime) MetricsClient ¶ added in v1.19.10
func (r *ZKProposerRuntime) MetricsClient() client.HTTP
MetricsClient returns the optional process-owned metrics transport.
Source Files
¶
- add_game_type.go
- component_target.go
- config.go
- contracts.go
- control_lifecycle.go
- default_chain_ids.go
- deployer.go
- dispute_mon.go
- el_node_identity.go
- engine_client.go
- fakepos.go
- hidden_blocks_proxy.go
- interop_filter.go
- interop_helpers.go
- interop_zk_upgrade.go
- l1_network.go
- l1_nodes.go
- l1_runtime.go
- l2_altda.go
- l2_batcher.go
- l2_challenger.go
- l2_cl.go
- l2_cl_kona.go
- l2_cl_kona_config.go
- l2_cl_opnode.go
- l2_cl_p2p_config.go
- l2_cl_p2p_util.go
- l2_cl_supernode.go
- l2_conductor.go
- l2_el.go
- l2_el_opgeth.go
- l2_el_opreth.go
- l2_el_p2p_util.go
- l2_el_synctester.go
- l2_metrics_dashboard.go
- l2_network.go
- l2_proposer.go
- l2tol2_expiry_period.go
- mixed_runtime.go
- multichain_proofs.go
- multichain_super_at_genesis.go
- multichain_supernode_runtime.go
- opcm_upgrade.go
- pre_genesis_super_game.go
- preset_config.go
- proxy.go
- runtime_state.go
- singlechain_build.go
- singlechain_interop.go
- singlechain_runtime.go
- singlechain_supernode_synctester_variant.go
- singlechain_variants.go
- stallable_proxy.go
- subproc.go
- superchain.go
- superroot.go
- sync_tester.go
- util.go
- world.go
- zk_proposer.go