presets

package
v1.14.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoMain

func DoMain(m TestingM, opts ...stack.CommonOption)

DoMain runs M with the pre- and post-processing of tests, to setup the default global orchestrator and global logger. This will os.Exit(code) and not return.

func Orchestrator

func Orchestrator() stack.Orchestrator

Orchestrator returns the globally configured orchestrator.

Add a TestMain to your test package init the orchestrator:

func TestMain(m *testing.M) {
    presets.DoMain(m)
}

func WithCompatibleTypes added in v1.13.4

func WithCompatibleTypes(t ...compat.Type) stack.CommonOption

WithCompatibleTypes is a common option that can be used to ensure that the orchestrator is compatible with the preset. If the orchestrator is not compatible, the test will either: - fail with a non-zero exit code (42) if DEVNET_EXPECT_PRECONDITIONS_MET is non-empty - skip the whole test otherwise This is useful to ensure that the preset is only used with the correct orchestrator type. Do yourself a favor, if you use this option, add a good comment (or a TODO) justifying it!

func WithConsensusLayerSync added in v1.13.5

func WithConsensusLayerSync() stack.CommonOption

func WithDeployerMatchL1PAO added in v1.13.4

func WithDeployerMatchL1PAO() stack.CommonOption

TODO(infra#401): Implement support in the sysext toolset

func WithDisputeGameFinalityDelaySeconds added in v1.13.4

func WithDisputeGameFinalityDelaySeconds(seconds uint64) stack.CommonOption

TODO(infra#401): Implement support in the sysext toolset

func WithDisputeGameV2 added in v1.14.1

func WithDisputeGameV2() stack.CommonOption

func WithELSyncActive added in v1.14.3

func WithELSyncActive() stack.CommonOption

func WithExecutionLayerSyncOnVerifiers added in v1.13.5

func WithExecutionLayerSyncOnVerifiers() stack.CommonOption

func WithExternalELWithSuperchainRegistry added in v1.13.7

func WithExternalELWithSuperchainRegistry(networkPreset stack.ExtNetworkConfig) stack.CommonOption

func WithFastGame added in v1.13.4

func WithFastGame() stack.CommonOption

TODO(infra#401): Implement support in the sysext toolset

func WithFinalizationPeriodSeconds added in v1.13.4

func WithFinalizationPeriodSeconds(n uint64) stack.CommonOption

TODO(infra#401): Implement support in the sysext toolset

func WithGuardianMatchL1PAO added in v1.13.4

func WithGuardianMatchL1PAO() stack.CommonOption

TODO(infra#401): Implement support in the sysext toolset

func WithHardforkSequentialActivation added in v1.13.6

func WithHardforkSequentialActivation(startFork, endFork rollup.ForkName, delta uint64) stack.CommonOption

func WithInteropNotAtGenesis

func WithInteropNotAtGenesis() stack.CommonOption

WithInteropNotAtGenesis adds a test-gate that checks if the interop hardfork is configured at a non-genesis time.

func WithIsthmusSuper added in v1.13.6

func WithIsthmusSuper() stack.CommonOption

func WithJovianAtGenesis added in v1.13.7

func WithJovianAtGenesis() stack.CommonOption

WithJovianAtGenesis configures all L2s to activate the Jovian fork at genesis in sysgo mode.

func WithL2NetworkCount added in v1.13.4

func WithL2NetworkCount(count int) stack.CommonOption

func WithLogFilter added in v1.13.4

func WithLogFilter(filter logfilter.Filter) stack.CommonOption

WithLogFilter replaces the default log filter with the provided additive filters. This completely overrides the default INFO-level filtering.

func WithLogLevel added in v1.13.4

func WithLogLevel(minLevel slog.Level) stack.CommonOption

WithLogLevel sets the global minimum log-level.

func WithMinimal added in v1.13.4

func WithMinimal() stack.CommonOption

func WithMinimalWithConductors added in v1.13.4

func WithMinimalWithConductors() stack.CommonOption

TODO(#16418): shift this to a different sysgo constructor once the sysgo implementation supports conductors

func WithMinimalWithSyncTester added in v1.13.6

func WithMinimalWithSyncTester(fcu eth.FCUState) stack.CommonOption

func WithMultiSupervisorInterop added in v1.13.4

func WithMultiSupervisorInterop() stack.CommonOption

func WithNewSingleChainMultiNodeWithTestSeq added in v1.14.3

func WithNewSingleChainMultiNodeWithTestSeq() stack.CommonOption

func WithNoDiscovery added in v1.14.3

func WithNoDiscovery() stack.CommonOption

func WithPkgLogFilter added in v1.13.4

func WithPkgLogFilter(filter logfilter.Filter) stack.CommonOption

WithPkgLogFilter applies the log filters to package-scope interactions (i.e. to things like DSL interactions, not to background services). Calling this overrides the default INFO-level filtering.

func WithProofMaturityDelaySeconds added in v1.13.4

func WithProofMaturityDelaySeconds(seconds uint64) stack.CommonOption

TODO(infra#401): Implement support in the sysext toolset

func WithProofs added in v1.14.3

func WithProofs() stack.CommonOption

WithProofs enables a minimal system with permissionless proofs enabled

func WithProposerGameType added in v1.13.4

func WithProposerGameType(gameType faultTypes.GameType) stack.CommonOption

func WithReqRespSyncDisabled added in v1.14.0

func WithReqRespSyncDisabled() stack.CommonOption

func WithSafeDBEnabled added in v1.13.5

func WithSafeDBEnabled() stack.CommonOption

func WithSequencingWindow added in v1.13.4

func WithSequencingWindow(suggestedSequencingWindow uint64, maxSequencingWindow uint64) stack.CommonOption

WithSequencingWindow suggests a sequencing window to use, and checks the maximum sequencing window. The sequencing windows are expressed in number of L1 execution-layer blocks till sequencing window expiry. This is applied e.g. to the chain configuration setup if running against sysgo.

func WithSimpleFlashblocks added in v1.13.4

func WithSimpleFlashblocks() stack.CommonOption

func WithSimpleInterop

func WithSimpleInterop() stack.CommonOption

WithSimpleInterop specifies a system that meets the SimpleInterop criteria.

func WithSimpleWithSyncTester added in v1.13.6

func WithSimpleWithSyncTester() stack.CommonOption

func WithSingleChainInterop added in v1.13.4

func WithSingleChainInterop() stack.CommonOption

WithSingleChainInterop specifies a system that meets the SingleChainInterop criteria.

func WithSingleChainMultiNode added in v1.13.5

func WithSingleChainMultiNode() stack.CommonOption

func WithSingleChainMultiNodeWithoutP2P added in v1.14.0

func WithSingleChainMultiNodeWithoutP2P() stack.CommonOption

func WithSuggestedInteropActivationOffset

func WithSuggestedInteropActivationOffset(offset uint64) stack.CommonOption

WithSuggestedInteropActivationOffset suggests a hardfork time offset to use. This is applied e.g. to the deployment if running against sysgo.

func WithSuperInterop added in v1.13.4

func WithSuperInterop() stack.CommonOption

WithSuperInterop specifies a super root system that meets the SimpleInterop criteria.

func WithSyncTesterELInitialState added in v1.13.7

func WithSyncTesterELInitialState(fcu eth.FCUState) stack.CommonOption

func WithTestLogFilter added in v1.13.4

func WithTestLogFilter(filter logfilter.Filter) stack.CommonOption

WithTestLogFilter applies the log filters to test-scope interactions (i.e. to things like DSL interactions, not to background services). Calling this overrides the default INFO-level filtering.

func WithTimeTravel added in v1.13.4

func WithTimeTravel() stack.Option[stack.Orchestrator]

func WithTwoL2 added in v1.14.3

func WithTwoL2() stack.CommonOption

func WithTwoL2Supernode added in v1.14.3

func WithTwoL2Supernode() stack.CommonOption

func WithUnscheduledInterop added in v1.13.4

func WithUnscheduledInterop() stack.CommonOption

WithUnscheduledInterop adds a test-gate to not run the test if the interop upgrade is scheduled. If the backend is sysgo, it will disable the interop configuration

Types

type Minimal added in v1.13.4

type Minimal struct {
	Log          log.Logger
	T            devtest.T
	ControlPlane stack.ControlPlane

	L1Network *dsl.L1Network
	L1EL      *dsl.L1ELNode

	L2Chain   *dsl.L2Network
	L2Batcher *dsl.L2Batcher
	L2EL      *dsl.L2ELNode
	L2CL      *dsl.L2CLNode

	Wallet *dsl.HDWallet

	FaucetL1 *dsl.Faucet
	FaucetL2 *dsl.Faucet
	FunderL1 *dsl.Funder
	FunderL2 *dsl.Funder
}

func NewMinimal added in v1.13.4

func NewMinimal(t devtest.T) *Minimal

func (*Minimal) DisputeGameFactory added in v1.14.1

func (m *Minimal) DisputeGameFactory() *proofs.DisputeGameFactory

func (*Minimal) L2Networks added in v1.13.4

func (m *Minimal) L2Networks() []*dsl.L2Network

func (*Minimal) StandardBridge added in v1.13.5

func (m *Minimal) StandardBridge() *dsl.StandardBridge

type MinimalExternalEL added in v1.13.7

type MinimalExternalEL struct {
	Log          log.Logger
	T            devtest.T
	ControlPlane stack.ControlPlane

	L1Network *dsl.L1Network
	L1EL      *dsl.L1ELNode

	L2Chain      *dsl.L2Network
	L2CL         *dsl.L2CLNode
	L2EL         *dsl.L2ELNode
	L2ELReadOnly *dsl.L2ELNode

	SyncTester *dsl.SyncTester
}

func (*MinimalExternalEL) L2Networks added in v1.13.7

func (m *MinimalExternalEL) L2Networks() []*dsl.L2Network

type MinimalWithConductors added in v1.13.4

type MinimalWithConductors struct {
	*Minimal

	ConductorSets map[stack.L2NetworkID]dsl.ConductorSet
}

once kurtosis and sysgo supports conductors, we can merge this with minimal

func NewMinimalWithConductors added in v1.13.4

func NewMinimalWithConductors(t devtest.T) *MinimalWithConductors

type MinimalWithSyncTester added in v1.13.6

type MinimalWithSyncTester struct {
	Minimal

	SyncTester *dsl.SyncTester
}

func NewMinimalWithSyncTester added in v1.13.6

func NewMinimalWithSyncTester(t devtest.T) *MinimalWithSyncTester

type MultiSupervisorInterop added in v1.13.4

type MultiSupervisorInterop struct {
	SimpleInterop

	// Supervisor does not support multinode so need a additional supervisor for verifier nodes
	SupervisorSecondary *dsl.Supervisor

	L2ELA2 *dsl.L2ELNode
	L2CLA2 *dsl.L2CLNode
	L2ELB2 *dsl.L2ELNode
	L2CLB2 *dsl.L2CLNode
}

func NewMultiSupervisorInterop added in v1.13.4

func NewMultiSupervisorInterop(t devtest.T) *MultiSupervisorInterop

NewMultiSupervisorInterop initializes below scenario: Two supervisor initialized, each managing two L2CLs per chains. Primary supervisor manages sequencer L2CLs for chain A, B. Secondary supervisor manages verifier L2CLs for chain A, B. Each L2CLs per chain is connected via P2P.

type SimpleFlashblocks added in v1.13.4

type SimpleFlashblocks struct {
	*Minimal

	ConductorSets               map[stack.L2NetworkID]dsl.ConductorSet
	FlashblocksBuilderSets      map[stack.L2NetworkID]dsl.FlashblocksBuilderSet
	FlashblocksWebsocketProxies map[stack.L2NetworkID]dsl.FlashblocksWebsocketProxySet

	Faucets   map[stack.L2NetworkID]*dsl.Faucet
	Funders   map[stack.L2NetworkID]*dsl.Funder
	L2ELNodes map[stack.L2NetworkID]*dsl.L2ELNode
}

func NewSimpleFlashblocks added in v1.13.4

func NewSimpleFlashblocks(t devtest.T) *SimpleFlashblocks

type SimpleInterop

type SimpleInterop struct {
	SingleChainInterop

	L2ChainB   *dsl.L2Network
	L2BatcherB *dsl.L2Batcher
	L2ELB      *dsl.L2ELNode
	L2CLB      *dsl.L2CLNode

	FaucetB *dsl.Faucet
	FunderB *dsl.Funder
}

func NewSimpleInterop

func NewSimpleInterop(t devtest.T) *SimpleInterop

func (*SimpleInterop) DisputeGameFactory added in v1.13.5

func (s *SimpleInterop) DisputeGameFactory() *proofs.DisputeGameFactory

func (*SimpleInterop) L2Networks

func (s *SimpleInterop) L2Networks() []*dsl.L2Network

type SimpleWithSyncTester added in v1.13.6

type SimpleWithSyncTester struct {
	Minimal

	SyncTester     *dsl.SyncTester
	SyncTesterL2EL *dsl.L2ELNode
	L2CL2          *dsl.L2CLNode
}

func NewSimpleWithSyncTester added in v1.13.6

func NewSimpleWithSyncTester(t devtest.T) *SimpleWithSyncTester

type SingleChainInterop added in v1.13.4

type SingleChainInterop struct {
	Log log.Logger
	T   devtest.T

	Supervisor    *dsl.Supervisor
	TestSequencer *dsl.TestSequencer
	ControlPlane  stack.ControlPlane

	L1Network *dsl.L1Network
	L1EL      *dsl.L1ELNode

	L2ChainA   *dsl.L2Network
	L2BatcherA *dsl.L2Batcher
	L2ELA      *dsl.L2ELNode
	L2CLA      *dsl.L2CLNode

	Wallet *dsl.HDWallet

	FaucetA  *dsl.Faucet
	FaucetL1 *dsl.Faucet
	FunderL1 *dsl.Funder
	FunderA  *dsl.Funder
	// contains filtered or unexported fields
}

func NewSingleChainInterop added in v1.13.4

func NewSingleChainInterop(t devtest.T) *SingleChainInterop

func (*SingleChainInterop) AdvanceTime added in v1.13.4

func (s *SingleChainInterop) AdvanceTime(amount time.Duration)

func (*SingleChainInterop) L2Networks added in v1.13.4

func (s *SingleChainInterop) L2Networks() []*dsl.L2Network

func (*SingleChainInterop) StandardBridge added in v1.13.5

func (s *SingleChainInterop) StandardBridge(l2Chain *dsl.L2Network) *dsl.StandardBridge

type SingleChainMultiNode added in v1.13.5

type SingleChainMultiNode struct {
	Minimal

	L2ELB *dsl.L2ELNode
	L2CLB *dsl.L2CLNode
}

func NewSingleChainMultiNode added in v1.13.5

func NewSingleChainMultiNode(t devtest.T) *SingleChainMultiNode

func NewSingleChainMultiNodeWithoutCheck added in v1.14.0

func NewSingleChainMultiNodeWithoutCheck(t devtest.T) *SingleChainMultiNode

type SingleChainMultiNodeWithTestSeq added in v1.14.3

type SingleChainMultiNodeWithTestSeq struct {
	SingleChainMultiNode

	TestSequencer *dsl.TestSequencer
}

func NewSingleChainMultiNodeWithTestSeq added in v1.14.3

func NewSingleChainMultiNodeWithTestSeq(t devtest.T) *SingleChainMultiNodeWithTestSeq

type TestingM added in v1.13.6

type TestingM interface {
	Run() int
}

type TwoL2 added in v1.14.3

type TwoL2 struct {
	Log          log.Logger
	T            devtest.T
	ControlPlane stack.ControlPlane

	L1Network *dsl.L1Network
	L1EL      *dsl.L1ELNode

	L2A   *dsl.L2Network
	L2B   *dsl.L2Network
	L2ACL *dsl.L2CLNode
	L2BCL *dsl.L2CLNode
}

TwoL2 represents a two-L2 setup without interop considerations. It is useful for testing components which bridge multiple L2s without necessarily using interop.

func NewTwoL2 added in v1.14.3

func NewTwoL2(t devtest.T) *TwoL2

Jump to

Keyboard shortcuts

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