activator: assign multicast publisher IPs from global pool in GlobalConfig#2806
Open
martinsander00 wants to merge 1 commit intomainfrom
Open
activator: assign multicast publisher IPs from global pool in GlobalConfig#2806martinsander00 wants to merge 1 commit intomainfrom
martinsander00 wants to merge 1 commit intomainfrom
Conversation
36f27ce to
89bff7c
Compare
…onfig Previously, multicast publishers were assigned dz_ips from per-device IP blocks. This meant publishers couldn't easily migrate between devices or have consistent IPs across the network. This change introduces a global multicast_publisher_block in the serviceability GlobalConfig that serves as a dedicated IP pool for all multicast publishers. Off-chain (activator) changes: - New IPBlockAllocator for publisher IPs initialized from config block - Publishers allocated from global pool, IBRL users still use device blocks - Existing publisher allocations loaded on startup to prevent conflicts - Allocations synced to on-chain bitmap for cross-activator consistency - Proper deallocation when publishers disconnect or are deleted - Falls back to on-chain allocation if no local pool configured On-chain (program/CLI) changes: - multicast_publisher_block field added to GlobalConfig state - MulticastPublisherBlock resource type for bitmap allocation/deallocation - CLI --multicast-publisher-block flag for global-config set command - Activate/CloseAccount processors updated to handle new resource type Includes E2E tests verifying: - Multiple publishers get unique sequential IPs from global block - Publishers and IBRL users coexist with separate IP pools - IP deallocation and reuse works correctly
89bff7c to
78b6b13
Compare
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.
Resolves: #532
Summary of Changes
multicast_publisher_block(147.51.126.0/23) instead of per-device IP blocks, enabling consistent IPs across devicesMulticastPublisherBlockresource type with bitmap allocation/deallocation support in the on-chain programglobal-config setnow accepts--multicast-publisher-blockflag to configure the poolArchitecture
The
multicast_publisher_blockis stored in GlobalConfig (single source of truth). Both onchain and offchain allocation modes read from there—thedifference is WHO picks the IP:
Key Files
On-chain:
smartcontract/.../state/globalconfig.rs- new fieldsmartcontract/.../processors/user/activate.rs- allocation logicsmartcontract/.../processors/user/closeaccount.rs- deallocationActivator:
activator/src/processor.rs- reads from GlobalConfig, creates poolactivator/src/process/user.rs- allocation/deallocation logicE2E Tests:
e2e/multicast_publisher_ip_test.go- new testse2e/multicast_test.go- updated to use dynamic IP lookupTesting Verification
e2e/multicast_publisher_ip_test.go) covering: