When a new TopologyInfo account is created, the creation processor MUST iterate all existing Interface accounts with loopback_type = Vpnv4 and allocate a FlexAlgoNodeSegment entry for the new topology on each.
Each entry stores (topology: Pubkey, node_segment_idx: u16) — the index is allocated from the SegmentRoutingIds ResourceExtension, following the same pattern as the existing node_segment_idx. This is automatic — no operator action is required. The controller picks up the new entries on its next cycle and pushes updated node-segment config to all devices.
This ensures all devices always advertise a node-SID for every defined topology, maintaining the universal participation requirement.
Milestone: RFC-18: Onchain Foundation
RFC: #3288
Files affected:
smartcontract/programs/doublezero-serviceability/src/processors/topology/create.rs
Size: Medium
Tests:
- Creating a new topology allocates a
FlexAlgoNodeSegment entry on every existing Vpnv4 loopback
- Each allocated entry has a unique
node_segment_idx from SegmentRoutingIds
- Existing
node_segment_idx (algo-0) values on loopbacks are unchanged
- Backfill is correct when multiple loopbacks exist
Blockers: #3344 (TopologyInfo account)
When a new
TopologyInfoaccount is created, the creation processor MUST iterate all existingInterfaceaccounts withloopback_type = Vpnv4and allocate aFlexAlgoNodeSegmententry for the new topology on each.Each entry stores
(topology: Pubkey, node_segment_idx: u16)— the index is allocated from theSegmentRoutingIdsResourceExtension, following the same pattern as the existingnode_segment_idx. This is automatic — no operator action is required. The controller picks up the new entries on its next cycle and pushes updatednode-segmentconfig to all devices.This ensures all devices always advertise a node-SID for every defined topology, maintaining the universal participation requirement.
Milestone: RFC-18: Onchain Foundation
RFC: #3288
Files affected:
smartcontract/programs/doublezero-serviceability/src/processors/topology/create.rsSize: Medium
Tests:
FlexAlgoNodeSegmententry on every existing Vpnv4 loopbacknode_segment_idxfromSegmentRoutingIdsnode_segment_idx(algo-0) values on loopbacks are unchangedBlockers: #3344 (TopologyInfo account)