Skip to content

Land the dotNS-on-Asset-Hub username migration #397

Description

@re-gius

Context

paritytech/individuality#755 moves username reservation and registration off the People Chain: the dotNS contracts on Asset Hub become the ground truth. Personhood attestation stays on PC, and PC keeps its username storage only for backwards compatibility until clients are upgraded. Only usernames move.

The chain side is settled. pallet_dotns_gateway is final and the production Asset Hub runtime will ship it as-is, so both of its flows are part of the mainnet architecture:

  • reserve_name is attester-signed, with candidate consent proven by signature. It deliberately needs no ring proof, so that reservations do not wait on ring-root propagation.
  • register_name is gated on Origin::PersonRegistration, the anonymous alias derived from a ring membership proof against the People collection.

The dotNS contracts implement the matching behaviour from #755: a reservation queue with permissionless expiry and natural promotion, lite-to-full linking that inherits the lite name's chat key rather than trusting the caller, and standalone registration that auto-relinquishes a pending reservation. DotnsPopController is deployed on paseo-assethub.

What is missing is the client side. Until truapi reads usernames from Asset Hub, the migration is only half-deployed: the contracts are authoritative on chain and nothing currently reads them.

Current work

#349, "Person's usernames - read from AH dotNS instead of PC", is the truapi side of the migration. It replaces the People Chain Resources.Consumers lookup with dotNS contract reads, adds register-name, and adds Asset Hub genesis config and a previewnet preset.

Its state is CONFLICTING / DIRTY. It no longer merges and needs a rebase.

Open items

Rebase and review of #349 are blocking.

  • Rebase onto main and resolve conflicts.
  • Get a review, with particular attention to statement_allowance/ring.rs and extension.rs.
  • Make CI build and test this PR. Right now nothing verifies that it compiles.
  • Stale contract address in the docs and the fallback. HOST_CLI_DOTNS_POP_CONTROLLER is documented as 0x1c858C31497a7715C0D56A11208feB6b74FaB2aB in both the CLI README and the source comment. That is the pre-reset value; the live DotnsPopController on paseo-assethub is different. Same failure mode as CLI paseo-v2 environment points at the pre-reset contracts dotns#221.
  • Nothing settles a pending label-store claim. The contract defers LabelStore deployment for gateway-registered users: the entry sits in a pending queue until a user-signed claimLabelStore() settles it, with expirePendingClaim sweeping lapsed ones. This PR reads pendingClaim and pendingClaims on the cold path but never calls claimLabelStore. Confirm whether that settlement belongs to the App rather than the host; if it belongs here, it is missing. Tracked on the dotNS side as [Feat]: UI and CLI surfaces for submitting and tracking name claims dotns#206.
  • No mainnet preset. The presets added are previewnet and paseo. Mainnet addresses do not exist until the deploy runs, so this lands immediately after it, matching [Bug]: The CLI and the UI cannot target mainnet: no mainnet configuration exists dotns#223.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions