refactor(op-devstack): migrate Orchestrator to unified Registry (Phase 4)#18875
Merged
refactor(op-devstack): migrate Orchestrator to unified Registry (Phase 4)#18875
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## teddyknox/id-refactor-phase3 #18875 +/- ##
===============================================================
- Coverage 76.3% 73.2% -3.2%
===============================================================
Files 188 190 +2
Lines 10943 10966 +23
===============================================================
- Hits 8356 8030 -326
- Misses 2441 2792 +351
+ Partials 146 144 -2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
cad37f6 to
eb6a9ec
Compare
39c42cd to
650d744
Compare
650d744 to
a4fa90c
Compare
a4fa90c to
615316f
Compare
pcw109550
reviewed
Feb 3, 2026
pcw109550
reviewed
Feb 3, 2026
eb6a9ec to
b22581a
Compare
Contributor
|
This pr has been automatically marked as stale and will be closed in 5 days if no updates |
615316f to
1f978e3
Compare
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
46d41bf to
9a4caac
Compare
Introduce L2ELCapable interface that captures shared behavior across
L2ELNode, RollupBoostNode, and OPRBuilderNode without requiring them to
share an ID() method signature.
This enables polymorphic lookups where code can find any L2 EL-capable
component by key+chainID, regardless of concrete type:
sequencer, ok := FindL2ELCapableByKey(registry, "sequencer", chainID)
Previously this required manual multi-registry lookups checking each
type separately.
…e 4)
Replace 15 separate locks.RWMap registry fields in Orchestrator with a
single unified *stack.Registry. This completes the ID type system refactor
by consolidating all component storage into one registry with secondary
indexes for efficient lookups by kind and chainID.
Key changes:
- Remove l1ELs, l1CLs, l1Nets, l2ELs, l2CLs, l2Nets, batchers, proposers,
challengers, rollupBoosts, oprbuilderNodes, supervisors, clusters,
superchains, and faucets fields from Orchestrator
- Add single registry *stack.Registry field
- Update GetL2EL to use FindL2ELCapableByKey for polymorphic lookups
- Update Hydrate to iterate by kind with explicit ordering
- Update ControlPlane methods to use registry lookups
- Migrate ~24 files to use registry.Register() and registry.Get() patterns
- Change l2MetricsEndpoints from locks.RWMap to map with sync.RWMutex
All 54 stack tests pass.
9a4caac to
d2a572e
Compare
b22581a to
6c7c339
Compare
pcw109550
approved these changes
Feb 21, 2026
Member
pcw109550
left a comment
There was a problem hiding this comment.
Approving with a single comment about handling supernodeIDs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR completes Phase 4 of the ID type system refactor by migrating the Orchestrator from 15 separate
locks.RWMapregistry fields to a single unified*stack.Registry.Key changes:
l1ELs,l2CLs,batchers, etc.) with singleregistry *stack.RegistryGetL2ELto useFindL2ELCapableByKeyfor polymorphic lookups across L2ELNode, RollupBoostNode, and OPRBuilderNodeHydratemethod to iterate components by kind with explicit orderingControlPlanemethods to use registry lookups with type assertionsregistry.Register()andregistry.Get()patternsMotivation
The previous Orchestrator maintained 15 separate
locks.RWMapfields, each keyed by its own ID type:This led to:
Solution
Consolidate all component storage into a single registry:
The registry provides:
ComponentID -> componentComponentKind -> []ComponentIDChainID -> []ComponentIDMigration Patterns
Registration:
Lookup:
Polymorphic Lookup (using Phase 3 capabilities):
Files Changed
sysgo/orchestrator.go,sysgo/control_plane.go,sysgo/deployer.gosysgo/l2_el_opgeth.go,sysgo/l2_el_opreth.go,sysgo/l2_el_synctester.go,sysgo/rollup_boost.go,sysgo/op_rbuilder.gosysgo/l2_cl_opnode.go,sysgo/l2_cl_kona.go,sysgo/l2_cl_supernode.go,sysgo/l2_cl_p2p_util.gosysgo/l2_batcher.go,sysgo/l2_proposer.go,sysgo/l2_challenger.go,sysgo/faucet.gosysgo/supervisor.go,sysgo/supervisor_op.go,sysgo/supervisor_kona.go,sysgo/sync_tester.go,sysgo/test_sequencer.gosysgo/add_game_type.go,sysgo/l2_metrics_dashboard.go,sysgo/l2_network_superchain_registry.goSpecial Cases
l2MetricsEndpoints: This field stores Prometheus scrape targets, not components, so it remains separate. Changed from
locks.RWMaptomap[string][]PrometheusMetricsTargetwithsync.RWMutex.Test Plan
Related