Skip to content

feat: implement BLE swarm registry system with dual-chain support#99

Draft
aliXsed wants to merge 11 commits intomainfrom
aliX/swarm-manager
Draft

feat: implement BLE swarm registry system with dual-chain support#99
aliXsed wants to merge 11 commits intomainfrom
aliX/swarm-manager

Conversation

@aliXsed
Copy link
Collaborator

@aliXsed aliXsed commented Feb 6, 2026

  • Add FleetIdentity (ERC721) for BLE fleet ownership via Proximity UUID

  • Add ServiceProvider (ERC721) for service endpoint URL ownership

  • Add SwarmRegistryL1 with SSTORE2 for Ethereum L1 optimization

  • Add SwarmRegistryUniversal with native bytes storage for ZkSync Era compatibility

  • Implement XOR filter-based tag membership verification

  • Add deterministic swarm IDs derived from (fleetId, providerId, filter)

  • Support orphan detection and permissionless purging of burned NFT swarms

  • Include comprehensive test suites (157 tests total)

  • Add Solady dependency for SSTORE2 functionality

  • Give more thought to buildHighestBondedUUIDBundle for the case we have incomplete tiers vs full tiers in all levels

  • Give more thought to offering low open tier as the default for registering fleets

  • Update docs

  • Review tests

- Add FleetIdentity (ERC721) for BLE fleet ownership via Proximity UUID
- Add ServiceProvider (ERC721) for service endpoint URL ownership
- Add SwarmRegistryL1 with SSTORE2 for Ethereum L1 optimization
- Add SwarmRegistryUniversal with native bytes storage for ZkSync Era compatibility
- Implement XOR filter-based tag membership verification
- Add deterministic swarm IDs derived from (fleetId, providerId, filter)
- Support orphan detection and permissionless purging of burned NFT swarms
- Include comprehensive test suites (157 tests total)
- Add Solady dependency for SSTORE2 functionality
@aliXsed aliXsed force-pushed the aliX/swarm-manager branch from 52bb4af to 538047d Compare February 6, 2026 07:55
Algorithm: Greedy All-or-Nothing with Level Priority. When bonds
tie across admin/country/global levels, try each level in priority
order (admin → country → global). Include the entire tier only if
all members fit in the remaining room; otherwise skip that tier
entirely. Cursors always advance regardless, preventing starvation
of lower-priority levels when a larger tier is skipped.

This guarantees every included tier is complete (no partial tiers),
respects geographic priority, and avoids starving smaller levels.
Improved readability by replacing cryptic 'sc' abbreviation with
descriptive 'tierCount' name across all 10 occurrences in:
- highestActiveTier
- discoverHighestBondedTier (3 level checks)
- buildHighestBondedUUIDBundle (3 cursor inits)
- _openTier
- _findOpenTierView
- _trimTierCount
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.

1 participant