Skip to content

AdminGroupBits ResourceExtension #3343

@ben-malbeclabs

Description

@ben-malbeclabs

Add persistent bitmap to track allocated admin-group bits. Bits are never reused after deletion. The UNICAST-DRAINED bit (bit 1) MUST be pre-marked in the bitmap at program initialization — this ensures it is never allocated to a user topology.

Milestone: RFC-18: Onchain Foundation
RFC: #3288


Files affected:

  • smartcontract/programs/doublezero-serviceability/src/state/resource_extension.rs
  • smartcontract/programs/doublezero-serviceability/src/processors/resource/

Size: Medium

Tests:

  • Bitmap exhaustion returns explicit error
  • Allocation always returns lowest available bit
  • Deallocated bits are not reused
  • Bit 1 pre-marked at initialization; first user topology receives bit 0, second receives bit 2

Blockers: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions