Skip to content

feat: cross-chain org name and username registry#117

Open
hudsonhrh wants to merge 4 commits intomainfrom
hudsonhrh/cross-chain-registry
Open

feat: cross-chain org name and username registry#117
hudsonhrh wants to merge 4 commits intomainfrom
hudsonhrh/cross-chain-registry

Conversation

@hudsonhrh
Copy link
Member

Summary

Implement global name uniqueness across chains using a hub-satellite architecture. Users and orgs can now register globally unique usernames and org names across all connected chains via Hyperlane cross-chain messaging.

Key Changes

New Contracts:

  • NameRegistryHub: Coordinates cross-chain username and org name claims on home chain
  • RegistryRelay: Satellite-chain relay for dispatching name claims to hub
  • StoringMailbox: Test mock for bidirectional Hyperlane message verification

Modified Contracts:

  • OrgRegistry: Validates org names via hub (home-chain path only, synchronous)
  • UniversalAccountRegistry: Validates usernames via hub (home-chain and cross-chain paths)

Deployment & Scripts:

  • DeployNameRegistryHub.s.sol, DeployRegistryRelay.s.sol: Standalone deployment scripts
  • TestnetE2EHomeChain.s.sol, TestnetE2ESatellite.s.sol: E2E infrastructure with name registry
  • DispatchNameRegistryTest.s.sol, VerifyNameRegistry.s.sol: Cross-chain test dispatchers
  • testnet-e2e.sh: Updated with name registry dispatch and verification steps

Design Details

  • Home-chain path: OrgRegistry.registerOrg()hub.claimOrgNameLocal() (instant, reverts if taken)
  • Cross-chain path: RegistryRelay.registerAccountDirect() → Hyperlane dispatch → hub.claimUsername() → confirm/reject reply
  • Security: Cross-chain org name changes removed due to ownership verification gap; only home-chain path supported
  • Relay owner access control: Satellite org name claims require relay owner (prevents squatting)
  • Namespaces: Separate reserved (usernames) vs reservedOrgNames maps for independent registration

Testing

  • 75 cross-chain tests covering username/org name registration, renaming, burning, race conditions
  • Tests for home-chain and satellite blocking scenarios
  • Full round-trip tests with StoringMailbox mock
  • E2E testnet verification on Sepolia + Base Sepolia

🤖 Generated with Claude Code

Implement global name uniqueness across chains using hub-satellite architecture:

NameRegistryHub (home): Coordinates cross-chain username and org name claims via Hyperlane
RegistryRelay (satellite): Dispatches name claims from satellite chains to hub
OrgRegistry: Integrates org name uniqueness check with hub (home-chain path only)
UniversalAccountRegistry: Integrates username uniqueness check with hub

Includes 75 cross-chain tests covering username/org name registration, renaming,
burning, race conditions, and cross-chain vs home-chain blocking scenarios.

Updated e2e testnet script to dispatch and verify cross-chain name registry flows
via Hyperlane relay on Sepolia <-> Base Sepolia.

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

Coverage Report

Metric Coverage
Lines 100.00% (0/0)
Statements 100.00% (0/0)
Branches 100.00% (0/0)
Functions 100.00% (0/0)
Coverage by file
File Lines Statements Branches Functions

hudsonhrh and others added 3 commits March 8, 2026 18:42
Convert all 4 cross-chain contracts (PoaManagerHub, PoaManagerSatellite,
NameRegistryHub, RegistryRelay) from bare contracts to the upgradeable
BeaconProxy pattern with ERC-7201 namespaced storage, matching the
existing core infrastructure conventions. Update all deploy scripts,
e2e scripts, and tests to use the new initialize() + BeaconProxy flow.
Add double-initialization prevention and zero-address validation tests.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add infrastructure for deploying orgs on satellite chains with globally
unique names enforced by NameRegistryHub on the home chain.

- NameClaimAdapter: bridges OrgRegistry's sync INameRegistryHubOrgNames
  interface to RegistryRelay's async confirmed-names cache on satellites
- SatelliteOnboardingHelper: per-org contract coordinating two-step
  register+join flow (async Hyperlane username confirmation)
- QuickJoin.quickJoinForUser(address): new onlyMasterDeploy function
  allowing helper contracts to onboard users on their behalf
- DeploySatellite: full satellite org infrastructure (OrgRegistry,
  OrgDeployer, PaymasterHub, factories, PasskeyFactory, solidarity fund)
- DeployHelper: adds NameClaimAdapter + SatelliteOnboardingHelper to
  deterministic contract type registry (13 → 15 types)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
…t expansion

Extend cross-chain name registry with SatelliteOnboardingHelper improvements,
NameClaimAdapter enhancements, expanded RegistryRelay functionality, and
comprehensive E2E testnet scripts for satellite org deployment and name verification.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
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