activator: assign multicast publisher IPs from global pool in GlobalConfig #2806
+996
−97
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: