Repository navigation
names: available names carry the terms their buyer accepts - #2003
Draft
brenzi-agent wants to merge 3 commits into
Draft
brenzi-agent wants to merge 3 commits into
brenzi-agent wants to merge 3 commits into
Conversation
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
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bona fide community name can be registered only by someone who accepts the community terms its name policy keeps (simplex-network/ens-contracts#40, #42, #45). A lookup answers such a name as plain
available, so a client cannot tell the buyer that registering it means accepting those terms.This PR adds that status to name lookups, behind a new SMP version.
The first commits only change the type, for review before the rest. Every registration accepts terms. The name policy keeps two sets: the general name terms, and the community terms of bona fide community names, which include the general ones. It keeps each as its text in one zstd frame, and a buyer accepts the frame's keccak256.
NRAvailablegainsnameTerms :: Maybe NameTerms, holding either:NTNamewith the general terms;NTBonaFidewith a bona fide name's community terms.Either one carries a
TermsDoc:TDZstdwith the frame, when it fits the answer;TDHashwith the frame's 0x hex keccak256, when it does not.A client decompresses the frame to show the terms, and hashes it to accept them. 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.mdcompresses to 12.4 KB at zstd 19.nameTermsis absent only from a router before v24, asexpiresis from one before v22. The three tests that build anNRAvailableset it toNothing.Still to come, after the type is agreed:
RNAMEcarrying the frame as bytes after the JSON, and the router choosing the frame or the hash by what fits the block, directly and through a proxy;bonaFideNamesand the applicable frame from the name policy, which needs the contracts to keep both sets of terms as frames (SimplexNamePolicy: keep the community terms' text on chain simplex-network/ens-contracts#45 keeps the community terms' text now);https://claude.ai/code/session_014JqabRiGc38JjH4KrE5LEU