Skip to content

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

Merged
valentinfernandez1 merged 2 commits into
mainfrom
fix/dotted-lite-labels
Sep 8, 2026
Merged

fix(server): read lite PoP names in both their dotted and flattened forms#602
valentinfernandez1 merged 2 commits 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.

@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

@filip-parity

Copy link
Copy Markdown
Contributor Author

#275 is closed, happy to merge it @re-gius ?

@re-gius re-gius left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were some late changes in paritytech/dotns#275 which are not reflected in this PR - please address them

Comment thread rust/crates/truapi-server/src/host_logic/dotns_gateway.rs Outdated
Comment thread rust/crates/truapi-server/src/host_logic/dotns_gateway.rs Outdated
Comment thread rust/crates/truapi-server/src/host_logic/dotns_gateway.rs Outdated
Comment thread rust/crates/truapi-server/src/host_logic/dotns_gateway.rs Outdated
Comment thread rust/crates/truapi-server/src/host_logic/dotns_gateway.rs Outdated
Comment thread rust/crates/truapi-server/src/host_logic/dotns_gateway.rs Outdated
Comment thread rust/crates/truapi-server/src/host_logic/dotns_gateway.rs Outdated
Comment thread rust/crates/truapi-host-cli/tests/live_asset_hub.rs
…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.
Reflects paritytech/dotns#275: classify_labels asks the PoP controller
for issuance provenance before a label fills a username slot, the lite
stem follows the letters-only person rule, and the flattened spelling
is no longer read as a lite name. The live store test asserts
provenance for dotted survivors.
@filip-parity
filip-parity force-pushed the fix/dotted-lite-labels branch from 9e22d65 to 96ebd50 Compare September 8, 2026 04:59
@filip-parity
filip-parity requested a review from re-gius September 8, 2026 05:01
@valentinfernandez1
valentinfernandez1 added this pull request to the merge queue Sep 8, 2026
Merged via the queue into main with commit 1f10852 Sep 8, 2026
19 checks passed
@valentinfernandez1
valentinfernandez1 deleted the fix/dotted-lite-labels branch September 8, 2026 07:36
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