Repository navigation
SimplexNamePolicy: holder-only renewal, accepting the terms again - #49
Merged
epoberezkin merged 8 commits intoNov 20, 2026
Merged
Conversation
This was referenced Nov 14, 2026
Merged
brenzi-agent
force-pushed
the
ab/holder-renewal-terms
branch
3 times, most recently
from
November 20, 2026 11:00
9f54b6f to
5e8bfaf
Compare
brenzi-agent
force-pushed
the
ab/holder-renewal-terms
branch
from
November 20, 2026 11:22
5e8bfaf to
25df912
Compare
brenzi-agent
force-pushed
the
ab/holder-renewal-terms
branch
from
November 20, 2026 12:15
25df912 to
de8a8a2
Compare
brenzi-agent
force-pushed
the
ab/holder-renewal-terms
branch
from
November 20, 2026 12:20
de8a8a2 to
1e49007
Compare
epoberezkin
approved these changes
Nov 20, 2026
2 of 4 tasks
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, and #51, the dispute period, merged; run 1 of the deployment (https://github.com/brenzi/simplex-namespace-contract/pull/20) deploys them, and this merges after it. This change ships as the deployment's first upgrade, of the policy, controller and sponsor proxies (#20, decision D19), prepared with the batch extension ofprepare-upgrade.mjsin https://github.com/brenzi/simplex-namespace-contract/pull/18.The upgrade path for the live
.simplex: https://github.com/brenzi/simplex-namespace-contract/pull/18Only the holder of a name renews it, and every renewal accepts the current terms again.
Who renews.
SimplexController.renewrenews for its caller, and only when the caller holds the name.SimplexSponsor.renewWithCredittakes the holder as a new last argument,holder, and passes it torenewSponsored.SimplexNamePolicy.consumeRenewalrevertsNotHolder(name)unless that address holds the name. Before expiry the holder is the registrar'sownerOf; in the 90-day grace period, whenownerOfreverts, it is found in the registrar'sERC721Enumerableindex of the address's names.Terms at renewal. Each renewal consumes the holder's acceptance of the current terms of the name's kind, made for the name's current expiry and that duration.
acceptGeneralTermsForRenewal(tokenId, expires, duration, termsHash)andacceptCommunityTermsForRenewal(tokenId, expires, duration, termsHash), each with aWithSigvariant. The EIP-712 types areAcceptGeneralTermsForRenewal(uint256 tokenId,uint256 expires,uint256 duration,bytes32 termsHash,uint256 nonce,uint256 deadline)andAcceptCommunityTermsForRenewal(…), on the policy's per-signer nonce.ExpiryMismatch(named, current); a signed one carries the expiry inside the signature, so one relayed after a renewal reverts before the signer's nonce is spent. It is stored for the name, the acceptor, that expiry and the duration, and a renewal consumes the one for the name's current expiry. One of the other kind, of a replaced link, by another address, for another duration or from an earlier term revertsTermsNotAccepted(name)at renewal. On mainnet the general and community links are the same placeholder today, so the kind matters once distinct links are set, as for registration and claims.GeneralTermsAcceptedorCommunityTermsAcceptedwith the holder, as registration and claim do. A reserved name still revertsNameReservedfirst.Storage.
SimplexNamePolicy, behind its own proxy in #50, appendsacceptedRenewalTermsat slot 8, and__gapshrinks from 42 to 41; a test reads the slot on the proxy, and the layout snapshot lists it.SimplexControlleradds no storage.docs/upgrades.mdhas the new layout.Deployment. The policy, the controller and the sponsor are upgraded in place through their ProxyAdmins, in one Safe MultiSend batch simulated as a whole on a mainnet fork:
renewSponsoredandrenewWithCreditgainholder, so in separate transactions every sponsored renewal reverts between the two.INTENDEDnames the replaced selectors. The store service calls onlyregisterWithCrediton the sponsor (simplex-chatnames@ 0410929,Worker.hs:311), so it needs no change for this upgrade. Sizes in bytes, limit 24,576, on #51: SimplexController 18,934 (was 18,666), SimplexNamePolicy 18,177 (was 15,792), SimplexSponsor 5,856 (was 5,795).Tests.
acceptGeneralTermsForRenewalandsignGeneralTermsForRenewalor local ones, and passes the holder torenewWithCredit.ExpiryMismatch; new terms between acceptance and renewal; the relayed signature andrenewWithCreditnaming a non-holder; a transfer between acceptance and renewal; the grace period on both paths, with the holder lookup passing over another name; for each kind, the other kind's acceptance for the same name, a zero or wrong hash, a signature from the wrong signer, replayed or expired, and an unset link; the pinned type hashes; slot 8.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: