Repository navigation
Conversation
Bundle size reportCompared with
WebAssembly modules
Changed files (1)
Commit: 7bcb41e |
|
CI Status: not green, 1 item needs attention.
All job results
Signing credentials: failure as of 2026-10-14, a release may fail Commit |
|
Seems to work on latest DotLI version |
Pending claims no longer lapse after the controller's reservationDuration: the deployed DotnsPopController removed expirePendingClaim and settles a claim of any age, so dropping week-old claims lost every user's name. When the contract labels yield no lite username, fall back to the gateway pallet's DotnsGateway.AccountNames[account].lite.label, accepted only as a dotted lite username whose DotnsGateway.LiteLabelOwner is the same account. This covers accounts onboarded before dotted labels, whose undotted claim fails isPopIssued in both spellings. Both the in-core lookup and the CLI reader go through resolve_identity. Fixes paritytech/platform-bugs#39
da6e5fe to
7bcb41e
Compare
|
Rebased onto main. The conflicts were only the formatting/comment pass in #1356; the fix itself is unchanged. fmt, clippy and This is now biting outside the pairing hosts, so asking for a review:
Could this get a review and go out in the next truapi-host / Desktop / dot.li release? |
|
do we even need to support these legacy gateway claim? |
|
Split the part everyone needs into #1419: it only stops dropping pending claims after 7 days, which is what breaks every lite name today. The legacy undotted-name fallback stays here, so whether to support it doesn't block that fix. |
Fixes paritytech/platform-bugs#39: pairing hosts (Polkadot Desktop, dot.li) return "No primary username for this session" from
getUserId.Problem
Users lose their username in pairing hosts a week after onboarding. Users onboarded before about 2026-09-08 have none at all. iOS isn't affected because it reads the name from People
Resources.Consumers.Root cause
Full analysis: https://github.com/paritytech/platform-bugs/issues/39#issuecomment-6034324294
pending_claim_labelsdropped claims withmintedAt + reservationDuration < now. That mirrored the controller at Person's usernames: read from Asset Hub dotNS instead of the People Chain (rebase of #349) #426, but dotns 31dc7544 removedexpirePendingClaim, and_settlePendingnow settles a claim of any age. On the deployed controller0xCC93…8a4b,expirePendingClaimreverts the same way an unknown selector does. Nothing callsclaimLabelStore, so names stay pending and dropped out of resolution after 7 days.tommyio01).isPopIssuedis false for bothtommyio01andtommyio.01, soclassify_labelsdropped it. The gateway pallet itself records the dotted name inDotnsGateway.AccountNames[account].lite.Fix
reservationDurationandTimestamp.Nowreads frompending_claim_labels. Docs no longer say claims lapse.gateway_lite_username: readsDotnsGateway.AccountNames[account](Blake2_128Concat,AccountNameRecord { lite: Option<NameEntry { label: BaseLabel, chat: Option<ChatKey> }>, full }; layout checked against paseo-next-v2 metadata). It decodes the lite label and accepts it only if it isis_dotted_lite_usernameandLiteLabelOwner[label] == account. Only the gateway writes either map.resolve_identity=resolve_labels→classify_labels, falling back togateway_lite_usernamewhen no lite username came from the contracts. The in-core lookup (runtime/identity.rs) and the CLIAssetHubReader::dotns_identityboth use it, so they still resolve the same way. In the in-core lookup, an account with no username at all now counts as "no record", so the root-key fallback runs.Tests
dotns_gatewayunit tests:AccountNamesLiteLabelOwnermismatch or missing entry is rejectedAccountNamesbytes for0x4caa…1a78account_names_keylayoutruntime::identityscripted-node tests:reservationDurationor timestamp scripted; it makes 10 views instead of 11legacy.01fromAccountNamesover thechainHead_v1followcargo test -p truapi: 1290 lib tests plus the integration tests pass.cargo clippy -p truapi -p truapi-host-cli --all-targetsis clean.cargo fmtapplied.Live evidence (paseo-next-v2)
New ignored test
live_asset_hub_resolves_a_legacy_lite_name_through_the_gateway_record:Before this change the same account resolved nothing: its claim is past
reservationDuration, and even without the lapse filter the contract path givescontract_only = None.Note: the existing ignored
live_asset_hub_resolves_a_settled_store_over_dotns_discoveryfails its finalclassify_labelsassertion against the current chain. None of the e2e pool's public-registrar labels are pop-issued. That test uses onlyclassify_labels, which this PR doesn't change.