Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion op-acceptance-tests/tests/interop/contract/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import (
)

func TestMain(m *testing.M) {
presets.DoMain(m, presets.WithSimpleInterop())
presets.DoMain(m, presets.WithSimpleInterop(), presets.WithRethL2EL())
}
2 changes: 1 addition & 1 deletion op-acceptance-tests/tests/interop/message/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import (
)

func TestMain(m *testing.M) {
presets.DoMain(m, presets.WithSimpleInterop())
presets.DoMain(m, presets.WithSimpleInterop(), presets.WithRethL2EL())
}
2 changes: 1 addition & 1 deletion op-acceptance-tests/tests/interop/prep/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ func TestMain(m *testing.M) {
// Configure a system without interop activation.
// We just want to test if we can sync with a supervisor before interop is configured.
// The supervisor will not be indexing data yet before interop, and has to handle that interop is not scheduled.
presets.DoMain(m, presets.WithSimpleInterop(), presets.WithUnscheduledInterop())
presets.DoMain(m, presets.WithSimpleInterop(), presets.WithUnscheduledInterop(), presets.WithRethL2EL())
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ func TestMain(m *testing.M) {
presets.WithSingleChainSuperInteropSupernode(),
presets.WithL2NetworkCount(1),
stack.MakeCommon(sysgo.WithChallengerCannonKonaEnabled()),
presets.WithRethL2EL(),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ func TestMain(m *testing.M) {
presets.DoMain(m,
presets.WithSuperInteropSupernode(),
stack.MakeCommon(sysgo.WithChallengerCannonKonaEnabled()),
presets.WithRethL2EL(),
)
}
1 change: 1 addition & 0 deletions op-acceptance-tests/tests/interop/proofs/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ func TestMain(m *testing.M) {
presets.DoMain(m,
presets.WithSuperInteropSupernode(),
stack.MakeCommon(sysgo.WithChallengerCannonKonaEnabled()),
presets.WithRethL2EL(),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ func TestMain(m *testing.M) {
presets.DoMain(m,
presets.WithSuperInteropSupernode(),
stack.MakeCommon(sysgo.WithChallengerCannonKonaEnabled()),
presets.WithRethL2EL(),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import (
)

func TestMain(m *testing.M) {
presets.DoMain(m, presets.WithSuperInterop(), presets.WithTimeTravel())
presets.DoMain(m, presets.WithSuperInterop(), presets.WithTimeTravel(), presets.WithRethL2EL())
}
2 changes: 1 addition & 1 deletion op-acceptance-tests/tests/interop/reorgs/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ import (
// TestMain creates the test-setups against the shared backend
func TestMain(m *testing.M) {
// Other setups may be added here, hydrated from the same orchestrator
presets.DoMain(m, presets.WithSimpleInterop())
presets.DoMain(m, presets.WithSimpleInterop(), presets.WithRethL2EL())
}
3 changes: 2 additions & 1 deletion op-acceptance-tests/tests/interop/seqwindow/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ func TestMain(m *testing.M) {
// in L1 block sync considerations in batcher stop or start.
// So we end up having to encode block by block, so the full batch data does not get dropped.
cfg.BatchType = derive.SingularBatchType
})))
})),
presets.WithRethL2EL())
}
2 changes: 1 addition & 1 deletion op-acceptance-tests/tests/interop/smoke/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import (
)

func TestMain(m *testing.M) {
presets.DoMain(m, presets.WithMinimal())
presets.DoMain(m, presets.WithMinimal(), presets.WithRethL2EL())
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ func TestMain(m *testing.M) {
presets.WithLogFilter(logfilter.DefaultMute(
stack.KindSelector(stack.SupervisorKind).And(logfilter.Level(log.LevelInfo)).Show(),
logfilter.Level(log.LevelError).Show(),
)))
)),
presets.WithRethL2EL())
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import (
)

func TestMain(m *testing.M) {
presets.DoMain(m, presets.WithSimpleInterop())
presets.DoMain(m, presets.WithSimpleInterop(), presets.WithRethL2EL())
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ import (
func TestMain(m *testing.M) {
presets.DoMain(m,
presets.WithMinimalInteropNoSupervisor(),
presets.WithRethL2EL(),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ func TestMain(m *testing.M) {
presets.WithSuggestedInteropActivationOffset(30),
presets.WithInteropNotAtGenesis(),
presets.WithL2NetworkCount(1), // Specifically testing dependency set of 1 upgrade
presets.WithRethL2EL(),
)
}
3 changes: 2 additions & 1 deletion op-acceptance-tests/tests/interop/upgrade/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ func TestMain(m *testing.M) {
presets.DoMain(m,
presets.WithSimpleInterop(),
presets.WithSuggestedInteropActivationOffset(60),
presets.WithInteropNotAtGenesis())
presets.WithInteropNotAtGenesis(),
presets.WithRethL2EL())
}
6 changes: 6 additions & 0 deletions op-devstack/presets/interop.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,12 @@ func WithL2NetworkCount(count int) stack.CommonOption {
})
}

// WithRethL2EL forces all L2 EL nodes in this test suite to use op-reth instead of op-geth.
// Requires OP_RETH_EXEC_PATH environment variable to be set.
func WithRethL2EL() stack.CommonOption {
return stack.MakeCommon(sysgo.WithL2ELKind("op-reth"))
}

type MultiSupervisorInterop struct {
SimpleInterop

Expand Down
29 changes: 22 additions & 7 deletions op-devstack/sysgo/l2_el.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,31 @@ func (l L2ELOptionBundle) Apply(p devtest.P, id stack.L2ELNodeID, cfg *L2ELConfi
}
}

// WithL2ELKind sets the kind of L2 EL node to use for all L2 EL nodes in this orchestrator.
// Valid values: "op-reth", "op-geth" (default).
// This overrides the DEVSTACK_L2EL_KIND environment variable.
func WithL2ELKind(kind string) stack.Option[*Orchestrator] {
return stack.BeforeDeploy(func(o *Orchestrator) {
o.l2ELKind = kind
})
}

// WithL2ELNode adds the default type of L2 CL node.
// The default can be configured with DEVSTACK_L2EL_KIND.
// The default can be configured with DEVSTACK_L2EL_KIND env var or WithL2ELKind option.
// Tests that depend on specific types can use options like WithKonaNode and WithOpNode directly.
func WithL2ELNode(id stack.L2ELNodeID, opts ...L2ELOption) stack.Option[*Orchestrator] {
switch os.Getenv("DEVSTACK_L2EL_KIND") {
case "op-reth":
return WithOpReth(id, opts...)
default:
return WithOpGeth(id, opts...)
}
return stack.AfterDeploy(func(orch *Orchestrator) {
kind := orch.l2ELKind
if kind == "" {
kind = os.Getenv("DEVSTACK_L2EL_KIND")
}
switch kind {
case "op-reth":
WithOpReth(id, opts...).AfterDeploy(orch)
default:
WithOpGeth(id, opts...).AfterDeploy(orch)
}
})
}

func WithExtL2Node(id stack.L2ELNodeID, elRPCEndpoint string) stack.Option[*Orchestrator] {
Expand Down
1 change: 1 addition & 0 deletions op-devstack/sysgo/orchestrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type Orchestrator struct {
proposerOptions []ProposerOption
l2CLOptions L2CLOptionBundle
l2ELOptions L2ELOptionBundle
l2ELKind string
l2ChallengerOpts l2ChallengerOpts
SyncTesterELOptions SyncTesterELOptionBundle
deployerPipelineOptions []DeployerPipelineOption
Expand Down