Repository navigation
registrar, controller: dispute period for sponsored registrations - #51
Merged
epoberezkin merged 13 commits intoNov 20, 2026
Merged
Conversation
brenzi-agent
marked this pull request as ready for review
November 20, 2026 08:10
brenzi-agent
force-pushed
the
ab/dispute-period-v2
branch
from
November 20, 2026 08:44
05c61d0 to
f7d9741
Compare
epoberezkin
approved these changes
Nov 20, 2026
brenzi-agent
force-pushed
the
ab/dispute-period-v2
branch
from
November 20, 2026 11:00
f7d9741 to
2144f1c
Compare
brenzi-agent
force-pushed
the
ab/dispute-period-v2
branch
from
November 20, 2026 11:22
2144f1c to
0ab42b2
Compare
…plexController: clear the default resolver on unregister
…smatch; test a blocking resolver
brenzi-agent
force-pushed
the
ab/dispute-period-v2
branch
from
November 20, 2026 12:15
0ab42b2 to
78114e8
Compare
This was referenced Nov 20, 2026
This was referenced Nov 23, 2026
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.
On
simplexwith #50, the upgradeable stack, merged. Merge order: this, then #49, which is stacked on this one. The plan: https://github.com/brenzi/simplex-namespace-contract/pull/19. The names conditions with the dispute period: simplex-chat/simplex-chat#8271.A card payment can be disputed or refunded for about 120 days after the store service registered the name it paid; the money is withdrawn from the store, and the buyer kept the whole paid term. A registration made with a compromised store key was final at once.
Dispute period. A sponsored registration now defines a dispute period, and the name is registered for its whole term.
SimplexSponsor.registerWithCredit(registration, disputeDays, nonce, deadline, sig):RegisterNamegainsuint256 disputeDays, so the buyer signs it.SimplexController.registerSponsored(registration, disputeDays)refuses fewer than 14 or more than 120 days withDisputeDaysOutOfRange. The store uses 120 for card payments and in-app purchases, 14 for BTC, XMR and prepaid codes, and for a balance the largest days among the payments that funded it.register(ETH in the dApp) andregisterReservedstoredisputeUntil0, so those names are final from their first block.Unregistration.
BaseRegistrarImplementationstoresdisputeUntil[id], written at registration and deleted at unregistration, after its last state variable. Itsunregister(id, until)is for registrar controllers,live, beforedisputeUntil, and only withuntilequal to it (DisputeUntilMismatch(named, current)), so a queued or repeated call cannot end a later registration of the label whose dispute ends at another second. It sets the expiry to 0 and the registry node's owner and resolver to 0, ends theSubnameRegistrar's subnames through the subname hook, and emitsNameUnregistered.SimplexController.unregister(label, until), for the guardian or the admin, first clears the name's records on the current default resolver, whatever the node points at, and on a past default the node points at.purgeis permissionless); the next registration burns the old token, as for a lapsed name.DisputePeriodOver, so the guarantee is held by the registrar, also against another registrar controller.Renewals are final. The registrar's
renewrefuses them untildisputeUntil(DisputePeriodNotOver), for every registrar controller, so an unregistration never erases a paid renewal; the shortest term is 730 days, so a name cannot lapse meanwhile. When a payment for the name is disputed, reversed or refunded in full and its registration is not ended, the guardian reserves the name with the existingaddReservedNames, so its next renewal is refused.Delivery: this merges before run 1 of the stack (brenzi/simplex-namespace-contract#20), which deploys it and sets the terms of simplex-chat/simplex-chat#8271; #49 follows after the deployment as its first upgrade (plan D21).
As an upgrade, only if run 1 precedes the merge: the registrar, the controller, the policy and the sponsor are upgraded in one batch, with
INTENDEDnaming the replaced selectorsregisterWithLabel(string,address,uint256), the oldregisterSponsoredand the oldregisterWithCredit(docs/upgrades.md, invariant 5);docs/upgrades.mdlistsunregisteramong the registrar functions the controller calls. The changedRegisterNameandregisterWithCreditreplace the old ones in place, without the old form beside them: the batch executes before the stack's registrar step (#20, D21), so noRegisterNamein the old form is signed for v2's sponsor and sponsored registrations are interrupted for no time (the owner, 20 Nov; plan D20). By the code, the webstore signsRegisterNameand the store service sends it; no SimpleX app version signs it. Both ship the new form before the registrar step.Comments: two existing comments are corrected for the unregistration (the INVARIANT of
BaseRegistrarImplementationand the NatSpec ofSubnameRegistrar.onExpiryChanged).Sizes in bytes, limit 24,576:
Tests.
test/simplex/TestDisputePeriod.test.tscovers:registerReservedwith a dispute end of 0;unregisterrefused for it;test/ethregistrar/TestBaseRegistrar.test.tspasses the new argument. Its caseshould permit the owner to transfer a registration, which fails onsimplex, is adapted in ci: run all tests on the simplex branch and its pull requests #52.CI. Until Actions is enabled in this repository and #52 merges, the runs are on the fork's
ci/branches, which add a workflow file and #52:disputeUntilat slot 22, its last variable.Decisions are in the plan (D1–D21), each with its source; the owner confirmed the principles on 19 and 20 Nov.