You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Username registration: the final ownership check and the paid DPNS registration are not atomic #1663
Follow-up from #1626. thepastaclaw raised this as blocking at 6132ea75a (existing thread: #1626 (comment)). It is deferred here because the wallet can't close it on its own.
Problem
Before a replacement or retry registration, SdkTransparentUsernameCreation re-reads who owns the label (ownershipRecheck()) and then calls source.registerDpnsName() as a separate step. Within one app process the per-identity lock prevents a duplicate submission, but nothing makes the read and the registration one operation.
How it goes wrong:
Another wallet instance with the same identity registers or contests the label between the read and the registration, or a lagging but successful DAPI response reports the label as available.
The wallet submits the paid registration.
Platform rejects it only after the attempt, which can consume identity credits, contested-name prefunding or fees.
This needs two wallet instances on the same identity, or a stale DAPI reply, in a narrow window.
Proposed fix
Close the race in the SDK or Platform: a conditional registration ("register only if the label is unowned, or owned by this identity") or an idempotent one that returns success without charging when this identity already holds the label. The wallet then drops its separate recheck and relies on that result.
Review: #1626 (thepastaclaw, final review of 6132ea75a)
Activity