Skip to content

names: available names carry the terms their buyer accepts - #2003

Open
brenzi-agent wants to merge 6 commits into
simplex-chat:masterfrom
brenzi-agent:bona-fide-names
Open

brenzi-agent wants to merge 6 commits into
simplex-chat:masterfrom
brenzi-agent:bona-fide-names

Conversation

@brenzi-agent

@brenzi-agent brenzi-agent commented Oct 28, 2026 •

Copy link
Copy Markdown

Every name can be registered only by someone who accepts the terms its name policy keeps: the community terms for a community name, the general terms for any other (simplex-network/ens-contracts#40, #42, #45, and the terms links of simplex-network/ens-contracts#47). A lookup answers an available name as plain available, so a client cannot show the buyer which terms registering it means accepting.

This PR adds those terms to name lookups, behind a new SMP version.

The first commits only change the type, for review before the rest. The name policy keeps two links, each to one file at one commit on git.simplex.chat, with the file's sha256 in the link: the general terms, and the community terms of community names, which include the relevant general ones. A buyer accepts the link's keccak256. NRAvailable gains nameTerms :: Maybe NameTerms, holding either:

  • NTGeneral with the general terms (JSON tag general);
  • NTCommunity with a community name's community terms (JSON tag community).

Either one carries a TermsDoc:

  • termsLink, the link the name policy keeps;
  • termsZstd, the linked file in one zstd frame, when it fits the answer.

A client hashes the link to accept the terms, and shows the frame's text after checking its sha256 against the link. A router that sends another link or file only makes that check or the acceptance fail: the name policy compares the accepted hash with the current one. The frame is base64url in JSON, as other bytes are. On the SMP wire it will travel outside the JSON, so it costs no base64: about 15.8 KB fits, and the 39 KB PRIVACY.md compresses to 12.4 KB at zstd 19. nameTerms is absent only from a router before v24, as expires is from one before v22. The three tests that build an NRAvailable set it to Nothing.

Still to come, after the type is agreed:

  • the SMP version bump that gates the field;
  • RNAME carrying the frame as bytes after the JSON, and the router attaching the frame by what fits the block, directly and through a proxy;
  • the resolver reading communityNames and the applicable link (generalTermsLink or communityTermsLink) from the name policy, fetching the file at the link's commit and checking its sha256;
  • the spec and the tests.
/Names resolver tests/
/RSLV functional API tests/

A bona fide community name can be registered only by someone who
accepts the community terms its name policy keeps. NRAvailable gains
bonaFideTerms_: the terms' text when it fits the answer, else the 0x
hex keccak256 of the text; Nothing for any other name. Nothing is
omitted from the JSON, so a plain name's answer is unchanged, and an
answer without the field decodes as a plain name.

Claude-Session: https://claude.ai/code/session_014JqabRiGc38JjH4KrE5LEU
…eeps

The name policy keeps the community terms' text compressed in one zstd
frame, and a buyer accepts the keccak256 of that frame. An available
bona fide name carries the frame when it fits the answer, else its hash.
ZstdTerms is base64url in JSON, as other bytes are.

Claude-Session: https://claude.ai/code/session_014JqabRiGc38JjH4KrE5LEU
Every registration accepts terms, not only a bona fide name's. The name
policy keeps the general name terms and the community terms, each as a
zstd frame. NRAvailable's nameTerms is NTName with the general terms, or
NTBonaFide with a bona fide name's community terms, which include them;
either carries the frame when it fits the answer, else its hash. It is
absent only from a router before v24.

Claude-Session: https://claude.ai/code/session_014JqabRiGc38JjH4KrE5LEU
@brenzi-agent brenzi-agent changed the title names: bona fide community terms in name lookups names: available names carry the terms their buyer accepts Oct 28, 2026
@brenzi
brenzi marked this pull request as ready for review October 29, 2026 16:50

This branch has not been deployed

No deployments
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.

1 participant