Skip to content

fix(server): read lite PoP names in both their dotted and flattened forms - #602

Open
filip-parity wants to merge 1 commit into
mainfrom
fix/dotted-lite-labels
Open

fix(server): read lite PoP names in both their dotted and flattened forms#602
filip-parity wants to merge 1 commit into
mainfrom
fix/dotted-lite-labels

Conversation

@filip-parity

@filip-parity filip-parity commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

TL;DR

DotNS is moving lite names from the flattened alice42 to the stored dotted form alice.42 (paritytech/dotns#273); every deployed contract still flattens, so the read path accepts both spellings:

  • classify_labels keeps a dotted stem.NN label verbatim and still re-dots flattened storage, so nothing changes against today's chains and dotted deployments work as soon as they exist.
  • bare_store_label lets a dotted lite label through the TLD strip instead of dropping it as a subname.
  • is_dotted_lite_username now bounds the dotted form itself: LiteLabelOwner is keyed by the dotted label as a 32-byte BaseLabel, so the old flattened stem+2 <= 32 bound accepted a 30-char stem the pallet can't decode.

One inherited ambiguity is documented in the code: a depth-one subname under a digit-only parent (app.42) is indistinguishable from a dotted lite name; digit-only second-level names are governance-only.

…orms

DotNS is moving lite names from the flattened alice42 to the stored
dotted form alice.42; deployed contracts still flatten. The read path
now accepts both: classify_labels keeps a dotted stem.NN label verbatim
and still re-dots flattened storage, and bare_store_label lets a dotted
lite label through the TLD strip instead of dropping it as a subname.

Also bounds the lite check by the gateway's real limit: LiteLabelOwner
is keyed by the dotted label as a 32-byte BaseLabel, so the old
stem+2<=32 flattened bound accepted a 30-char stem the pallet cannot
decode. is_dotted_lite_username now caps the dotted form itself.
@filip-parity
filip-parity requested a review from a team September 4, 2026 09:04
@filip-parity filip-parity changed the title fix(truapi): read lite PoP names in both their dotted and flattened forms fix(server): read lite PoP names in both their dotted and flattened forms Sep 4, 2026
@re-gius

re-gius commented Sep 4, 2026

Copy link
Copy Markdown

Do not merge until #275 is finalized and deployed

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.

3 participants