Skip to content

Topology creation backfill of Vpnv4 loopback FlexAlgoNodeSegments #3425

@ben-malbeclabs

Description

@ben-malbeclabs

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)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions