Skip to content

Commit 5416d68

Browse files
authored
refactor(op-devstack): remove backward compatibility type aliases to align on single ComponentID type (ethereum-optimism#18877)
* stack: remove backward compatibility type aliases for Phase 6 cleanup Complete the ID type system refactor by removing all backward compatibility code. All code now uses ComponentID directly with typed constructor functions. Changes: - Remove 19 type aliases from component_id.go (L1ELNodeID, L2BatcherID, etc.) - Remove Kind = ComponentKind alias - Update KindProvider interface to use ComponentKind return type - Update context.go functions to use ComponentKind instead of Kind - Fix test files using incorrect constructor patterns The type system is now fully unified: - Single ComponentID type with kind, shape, key, and chainID fields - Typed constructors (NewL2BatcherID, NewL2ELNodeID, etc.) return ComponentID - ComponentKind enum for type discrimination - Simplified Matcher[E] interface with single type parameter * fix(op-devstack): drop misplaced kona tests and finalize componentid cleanup * fix(op-devstack): restore Go build after ComponentID refactor
1 parent c489321 commit 5416d68

File tree

151 files changed

+1798
-3269
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+1798
-3269
lines changed

op-acceptance-tests/tests/base/conductor/leadership_transfer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TestConductorLeadershipTransfer(gt *testing.T) {
5050

5151
idToConductor := make(map[string]conductorWithInfo)
5252
for _, conductor := range conductors {
53-
conductorId := strings.TrimPrefix(conductor.String(), stack.ConductorKind.String()+"-")
53+
conductorId := strings.TrimPrefix(conductor.String(), stack.KindConductor.String()+"-")
5454
idToConductor[conductorId] = conductorWithInfo{conductor, consensus.ServerInfo{}}
5555
}
5656
for _, memberInfo := range membership.Servers {

op-acceptance-tests/tests/batcher/init_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestMain(m *testing.M) {
1717
presets.WithCompatibleTypes(compat.SysGo),
1818
presets.WithNoDiscovery(),
1919
presets.WithTimeTravel(),
20-
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.L2BatcherID, cfg *bss.CLIConfig) {
20+
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.ComponentID, cfg *bss.CLIConfig) {
2121
cfg.Stopped = true
2222

2323
// set the blob max size to 40_000 bytes for test purposes

op-acceptance-tests/tests/batcher/throttling/init_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestMain(m *testing.M) {
1818
presets.DoMain(m,
1919
presets.WithMinimal(),
2020
presets.WithCompatibleTypes(compat.SysGo),
21-
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.L2BatcherID, cfg *bss.CLIConfig) {
21+
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.ComponentID, cfg *bss.CLIConfig) {
2222
// Enable throttling with step controller for predictable behavior
2323
cfg.ThrottleConfig.LowerThreshold = 99 // > 0 enables the throttling loop.
2424
cfg.ThrottleConfig.UpperThreshold = 100

op-acceptance-tests/tests/depreqres/reqressyncdisabled/clsync/init_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestMain(m *testing.M) {
1616
presets.WithCompatibleTypes(compat.SysGo),
1717
presets.WithReqRespSyncDisabled(),
1818
presets.WithNoDiscovery(),
19-
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.L2BatcherID, cfg *bss.CLIConfig) {
19+
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.ComponentID, cfg *bss.CLIConfig) {
2020
cfg.Stopped = true
2121
})),
2222
)

op-acceptance-tests/tests/depreqres/reqressyncdisabled/divergence/divergence_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func TestMain(m *testing.M) {
2121
presets.WithExecutionLayerSyncOnVerifiers(),
2222
presets.WithReqRespSyncDisabled(),
2323
presets.WithNoDiscovery(),
24-
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.L2BatcherID, cfg *bss.CLIConfig) {
24+
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.ComponentID, cfg *bss.CLIConfig) {
2525
cfg.Stopped = true
2626
})),
2727
)

op-acceptance-tests/tests/depreqres/reqressyncdisabled/elsync/init_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestMain(m *testing.M) {
1616
presets.WithCompatibleTypes(compat.SysGo),
1717
presets.WithReqRespSyncDisabled(),
1818
presets.WithNoDiscovery(),
19-
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.L2BatcherID, cfg *bss.CLIConfig) {
19+
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.ComponentID, cfg *bss.CLIConfig) {
2020
cfg.Stopped = true
2121
})),
2222
)

op-acceptance-tests/tests/depreqres/reqressyncdisabled/init_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestMain(m *testing.M) {
1616
presets.WithCompatibleTypes(compat.SysGo),
1717
presets.WithReqRespSyncDisabled(),
1818
presets.WithNoDiscovery(),
19-
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.L2BatcherID, cfg *bss.CLIConfig) {
19+
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.ComponentID, cfg *bss.CLIConfig) {
2020
cfg.Stopped = true
2121
})),
2222
)

op-acceptance-tests/tests/depreqres/syncmodereqressync/clsync/init_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestMain(m *testing.M) {
1616
presets.WithCompatibleTypes(compat.SysGo),
1717
presets.WithSyncModeReqRespSync(),
1818
presets.WithNoDiscovery(),
19-
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.L2BatcherID, cfg *bss.CLIConfig) {
19+
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.ComponentID, cfg *bss.CLIConfig) {
2020
cfg.Stopped = true
2121
})),
2222
)

op-acceptance-tests/tests/depreqres/syncmodereqressync/elsync/init_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestMain(m *testing.M) {
1616
presets.WithCompatibleTypes(compat.SysGo),
1717
presets.WithSyncModeReqRespSync(),
1818
presets.WithNoDiscovery(),
19-
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.L2BatcherID, cfg *bss.CLIConfig) {
19+
stack.MakeCommon(sysgo.WithBatcherOption(func(id stack.ComponentID, cfg *bss.CLIConfig) {
2020
cfg.Stopped = true
2121
})),
2222
)

op-acceptance-tests/tests/fusaka/init_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestMain(m *testing.M) {
2424
sysgo.WithForkAtL1Offset(forks.Osaka, 0),
2525
sysgo.WithForkAtL1Offset(forks.BPO1, 1),
2626
),
27-
sysgo.WithBatcherOption(func(_ stack.L2BatcherID, cfg *batcher.CLIConfig) {
27+
sysgo.WithBatcherOption(func(_ stack.ComponentID, cfg *batcher.CLIConfig) {
2828
cfg.DataAvailabilityType = flags.BlobsType
2929
cfg.TxMgrConfig.CellProofTime = 0 // Force cell proofs to be used
3030
}),

0 commit comments

Comments
 (0)