Skip to content

names, resolver: report until when a registration can be ended - #2087

Closed
brenzi-agent wants to merge 44 commits into
simplex-chat:masterfrom
brenzi-agent:ab/resolver-unregistered
Closed

brenzi-agent wants to merge 44 commits into
simplex-chat:masterfrom
brenzi-agent:ab/resolver-unregistered

Conversation

@brenzi-agent

@brenzi-agent brenzi-agent commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Follows simplex-network/ens-contracts#51, merged on simplex as ebf7698, which gives every registration made through the sponsor a dispute period of 14 to 120 days, until disputeUntil(id): until then, a registrar controller can end the registration, and its renewal is refused. Plan: plans/2026-11-20-names-dispute-period.md.

Resolver (scripts/resolver/service/snrc-resolve.py)

  • disputeUntil(uint256) of the 2LD's token is read in the first round, beside nameExpires, and reported in the v1 answer and in v2 registered:
    • the registrar's value while later than the block the answer was read at;
    • 0 otherwise, also when the call reverts, as on a registrar before chat: fix welcome line #51, such as .testing's;
    • null when the node answers the read with another JSON-RPC error, or with an empty answer.
  • A revert: a JSON-RPC error with code 3, or with code -32000 and the message "execution reverted", or a failed call in a multicall (CallReverted).
  • A subname is answered with its 2LD's value.
  • The v1 404 for a name with expiry 0 says "this name is not registered", since a registration ended in its dispute period has expiry 0 too.

Router (src/Simplex/Messaging/Names/Record.hs)

  • NRRegistered.disputeUntil :: Maybe SystemSeconds, passed to clients in RNAME; Nothing is left out.
  • The SMP version is unchanged: the field is optional, and routers and clients before it ignore it.

Docs

  • protocol/simplex-messaging.md: the disputeUntil field (a time after lastBlockTs, 0, or absent when unknown), the dispute period, and disputeUntil as the one field left out instead of ERR NAME RESOLVER.
  • scripts/resolver/README.md: the zero expiry of an ended registration, disputeUntil in v1 and v2, and when it is 0 or null.

Tests

  • scripts/resolver/service/test_snrc_resolve.py: the read, a time, 0, a revert by each node's encoding, a node error and an empty answer, a subname, v1 and v2 shapes, the read in the first round of a multicall and of a batch.
  • tests/SMPNamesTests.hs, tests/RSLVTests.hs: the router's answer with a time, 0 and an unknown value; RNAME direct and forwarded through a proxy.

simplex-chat at its next simplexmq bump

  • Tests that construct NRRegistered (tests/NameResolver.hs, tests/ChatTests/Names.hs) need disputeUntil = Nothing.
  • The store service's dispute-days change defines its own disputeUntil (StoreService/Names/Contracts.hs).
/Core tests/Names resolver tests/
/Core tests/RSLV functional API tests/
/Core tests/Agent core tests/resolve names/

@brenzi-agent
brenzi-agent marked this pull request as ready for review November 20, 2026 14:26
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.

2 participants