Skip to content

Conversation

@martinsander00
Copy link
Contributor

@martinsander00 martinsander00 commented Feb 4, 2026

Resolves: #532

Summary of Changes

  • Multicast publishers now get dz_ips from a global multicast_publisher_block (147.51.126.0/23) instead of per-device IP blocks, enabling consistent IPs across devices
  • Activator maintains off-chain IPBlockAllocator for publisher IPs with on-chain bitmap sync for cross-activator consistency
  • Added MulticastPublisherBlock resource type with bitmap allocation/deallocation support in the on-chain program
  • CLI global-config set now accepts --multicast-publisher-block flag to configure the pool
  • IBRL users continue using device-specific blocks while publishers use the new global pool

Architecture

The multicast_publisher_block is stored in GlobalConfig (single source of truth). Both onchain and offchain allocation modes read from there—the
difference is WHO picks the IP:

  • Onchain mode: Smart contract bitmap allocates
  • Offchain mode: Activator local pool allocates

Key Files

On-chain:

  • smartcontract/.../state/globalconfig.rs - new field
  • smartcontract/.../processors/user/activate.rs - allocation logic
  • smartcontract/.../processors/user/closeaccount.rs - deallocation

Activator:

  • activator/src/processor.rs - reads from GlobalConfig, creates pool
  • activator/src/process/user.rs - allocation/deallocation logic

E2E Tests:

  • e2e/multicast_publisher_ip_test.go - new tests
  • e2e/multicast_test.go - updated to use dynamic IP lookup

Testing Verification

  • Added E2E tests (e2e/multicast_publisher_ip_test.go) covering:
    • Multiple publishers receiving unique sequential IPs from global block
    • Publishers and IBRL users coexisting with separate IP pools
    • IP deallocation and reuse when publishers disconnect
  • Existing activator unit tests updated with new parameter

@martinsander00 martinsander00 force-pushed the ms/532 branch 6 times, most recently from 36f27ce to 89bff7c Compare February 4, 2026 05:04
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants