feat: rename lite/full to device and personhood names, with legacy gateway entrypoints - #321
Merged
Merged
Conversation
…teway entrypoints
Contributor
CI Summary
Per-section details omitted: combined body exceeded the 65000-char comment limit. Follow the View Report links above for each section's full output. |
10 of 27 tasks
Contributor
|
Overall looks good. Do we want to specify exact breaking like for eg.: enum PopStatus can be a breaking change? |
GHkrishna
reviewed
Sep 29, 2026
Collaborator
Author
Yes, done. The Breaking changes section now lists the break per consumer. |
GHkrishna
self-requested a review
September 29, 2026 15:08
re-gius
pushed a commit
that referenced
this pull request
Sep 30, 2026
…hanges first (#323) ## Description This PR fixes two things in the release tooling (`scripts/js/release-metadata.mjs`). **1. `changedset` no longer flags StoreFactory after comment-only edits** StoreFactory deploys other contracts with `new`, so its bytecode carries a copy of their creation code. Each copy ends with that contract's own metadata hash, and that hash changes whenever a comment or NatSpec line changes. `changedset` only stripped StoreFactory's own metadata at the end of its bytecode, so a comment edit in LabelStore made StoreFactory look changed and asked for an upgrade nobody needed. Now the hash inside each embedded copy is set to zeros before hashing. Real code changes still show up. `codehashes.json` gets a new `hashScheme` field so that files hashed the old way and the new way are never compared by mistake. `changedset` reads that field and hashes the current build the same way the previous file was hashed. **2. Release notes list breaking changes first** The "ABI changes" section of the release body is now grouped by how much each change matters: 1. Breaking changes: the ones declared in pull request descriptions, then changed function signatures, removed functions, contracts that are no longer published, and changed or removed events. 2. New contracts, new functions and new events. 3. Custom errors. A new `pulls` command reads the pull requests merged since the previous release. A pull request counts as breaking if any of these is true: its "Breaking Changes" section has text, its title has a `!`, it has the `breaking` label, or one of the breaking boxes is ticked. Its text is copied into the notes. `abi-diff.json` gets a new `declaredBreaking` list. Both publish workflows now need `pull-requests: read`. ## Type - [x] Bug fix - [x] Feature - [ ] Breaking change - [x] Documentation - [ ] Chore - [ ] Refactor - [ ] Security ## Scope - [ ] Registration - [ ] Resolver - [ ] Store - [ ] Proof of Personhood - [ ] Deployment scripts - [ ] Tests Release tooling only. No contract code changes. ## Related Issues Found in #321, whose NatSpec-only edits to LabelStore put StoreFactory in its changedset. ## Fixes Fixes #322 ## Checklist ### Code - [x] Follows project style - [x] `forge build` passes - [ ] `forge test` passes - [x] No new compiler warnings ### Testing - [ ] New tests added for changed behavior - [ ] Fuzz tests added where applicable - [ ] Invariant tests verified ### Security - [x] No new `selfdestruct` or `delegatecall` - [ ] Access control reviewed - [x] No storage layout conflicts (for upgradeable contracts) ### Documentation - [ ] NatSpec updated on changed interfaces - [x] README updated if needed ### Breaking Changes - [x] No breaking changes - [ ] Breaking changes documented below **Breaking changes:** ## How to test **changedset fix** ```bash forge build node scripts/js/release-metadata.mjs build --tag base --out /tmp/base --addresses false # change only a comment in contracts/store/LabelStore.sol forge build node scripts/js/release-metadata.mjs changedset --previous /tmp/base/codehashes.json # nothing is listed # now make a real code change in LabelStore.sol forge build node scripts/js/release-metadata.mjs changedset --previous /tmp/base/codehashes.json # LabelStore and StoreFactory are listed ``` **Release notes** ```bash # needs gh logged in with read access to the repo node scripts/js/release-metadata.mjs pulls --repo paritytech/dotns \ --base <previous-tag> --head HEAD --out /tmp/pulls.json node scripts/js/release-metadata.mjs abidiff --current <abis-dir> \ --previous <previous-abis-dir> --previous-tag <previous-tag> --pulls /tmp/pulls.json ``` ## Notes - The next release still compares against the previous release's `codehashes.json`, which was hashed the old way. So StoreFactory will show up once more in that release's changedset if any contract it deploys changed, even if only a comment changed. After that it is clean. - If we want that next release to be clean too, we can regenerate the previous release's metadata with this fix and compare against that instead. Check out the previous release tag, apply this change, run `forge build` and `release-metadata.mjs build`, then pass the new `codehashes.json` to `changedset`. If StoreFactory is not listed, its code did not change and it does not need an upgrade. - `pulls` reads every merged pull request, not only the labelled ones, because missing a breaking change is costly and a label is easy to forget. It makes one API call per commit, which is fine for our release size. If releases grow a lot, we can switch to a cheaper approach. - If reading the pull requests fails, the release step fails. It is better to re-run the step than to publish notes that miss a breaking change. - Any `@mention` in a pull request's breaking changes text will notify that person when the release is published. --------- Signed-off-by: GHkrishna <krishna@parity.io>
3 tasks
GHkrishna
approved these changes
Sep 30, 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.
Description
Renames the Proof of Personhood surface from lite/full to the vocabulary v1.0.0 launches with: devicehood and personhood for what an account has proven or a label requires, device name (
stem.NN) and personhood name for the names the gateway issues. v1.0.0 is the first mainnet launch, so this is the last moment the rename is cheap.The gateway pallet runtime shipping with this release is frozen and keeps calling today's three controller functions and decoding today's errors. The controller therefore serves both: the new entrypoints, and a separate
IDotnsPopControllerLegacythat keeps the old selectors. The next release (R2) will move the pallet to the new entrypoints and remove the legacy interface.What changes
DotnsPopController/IDotnsPopControllerreserveLiteNameissueDeviceNamereserveBaseNameissueDeviceNameWithReservationreserveBaseNameOnlyreservePersonhoodNameregisterBaseNameissuePersonhoodNamereservedBaseLabelOfreservedLabelOfLiteRegistration,BaseReservation,BaseNameReservation,FullRegistrationDeviceNameIssuance,DeviceNameIssuanceWithReservation,PersonhoodNameReservation,PersonhoodNameIssuanceLinkKind.LiteUsernameLinkKind.DeviceNameLiteNameReservedDeviceNameIssuedStandaloneNameRegistered,BaseNameClaimedPersonhoodNameIssuedon every issuance, plusReservationClaimedon a claimLiteToFullLinkedDeviceNameLinkedInvalidLiteLabel,InvalidBaseLabelInvalidDeviceLabel,InvalidPersonhoodLabelLiteNameAlreadyIssuedDeviceNameAlreadyIssuedLiteLabelNotOwnedByUserDeviceNameNotOwnedBaseNameAlreadyRegisteredPersonhoodNameUnavailable"Issue" creates a gateway name; "reserve" is only the personhood-name queue.
reserveLiteNameissued a name, which is why it is renamed.DotnsPopResolver:setLiteLinkandLiteLinkUpdatedbecomesetDeviceLinkandDeviceLinkUpdated. The getters are named by what they return, because the two directions take and return different identifiers:liteLink(personhoodNode)becomesdeviceLabelhashOf(personhoodNode), returning a device-name labelhash, andfullClaim(deviceLabelhash)becomespersonhoodNodeOf(deviceLabelhash), returning a personhood-name node.DotnsPopLens:liteNamesOf+fullNamesOfand their two counts merge intonamesOf(user, offset, limit)andnameCountOf(user): one listing of every gateway-issued name the user holds, with a single offset over store entries first and then pending claims.NameDetail.tier,liteLink,fullClaimbecomerequiredTier,deviceLabelhash,personhoodNode.Nameno longer carries adeadline, because pending claims never lapse (#324).PopRules:PopStatus.PopLite/PopFullbecomeDevicehood/Personhood(sameuint8values), andpersonhoodOfbecomespopStatusOf, since it also returns devicehood. Revert messages follow the new vocabulary.What keeps its name
IPersonhoodprecompile interface.PopRulesmaps status 1 toDevicehoodand 2 toPersonhoodin one place.isPopIssued.*BaseName*identifiers inPopRules, which the public controller and the SDK call. The prose now uses the same word: a label's base name is the label with any device suffix removed, and stem means only the letters of a device name.Legacy entrypoints for the frozen pallet
IDotnsPopControllerLegacykeepsreserveLiteName,reserveBaseNameandregisterBaseNamewith their current selectors (0x220015c0,0xd89f1bce,0x7c4b376b), checked against the gateway pallet in individuality-community (v0.3.3 andmain). Each forwards to its replacement's shared body. Called through them, label validation reverts withInvalidLiteLabel/InvalidBaseLabel(0x5c6c2eea,0x39e67d31), the errors the pallet decodes; every other error is shared.supportsInterfacereports both interfaces.Behaviour changes
ReservationClaimedandReservationEvictedare new, andReservationRelinquishedis emitted wherever a user's entry is dropped (standalone issuance and re-reservation included), exactly once, and only when an entry existed.DotnsPopLens.nameDetail(label)now returns the label and its required tier for a personhood name whose claim has not settled. It returned an empty label andNoStatus, because the registrar reads a tokenised name's label from the holder'sLabelStore.nameDetailByNodestill has no label for an unsettled name, which the node alone cannot recover.DotnsPopLens.Namedropsdeadline. It reportedmintedAt + reservationDuration, but pending claims never lapse and can be settled at any time, so the field had no meaning ([Feat]: Decide what the pending-claim deadline means #324). A claim'smintedAtis still available fromIDotnsPopController.pendingClaims.Upgrade shape
DotnsPopController,DotnsPopResolverandPopRulesproxies, plus a redeployedDotnsPopLens. No storage migration.DotnsPopResolver; every__gapstaysuint256[50].DotnsPopControlleris 23,497 bytes, 1,079 under the limit.Docs
DotnsRegistrardescription: a tokenId isuint256(node).baseLengthwas described as "digit-stripped", andclassifyNameas classifying "by the length it leaves"; every label is measured as written, less a device name's suffix.Consumers
Checked dotns-sdk, bulletin-deploy, getcash-community, host-rust-core, polkadot-ios-community, polkadot-android-community, polkadot-desktop-community, dotli-community, epoca, product-sdk: none calls a renamed selector, so nothing is affected in this release.
Type
Scope
Related Issues
#319
#324
Fixes
Closes #319
Closes #324
Checklist
Code
forge buildpassesforge testpassesTesting
Security
selfdestructordelegatecallDocumentation
Breaking Changes
Breaking changes:
InvalidLiteLabel/InvalidBaseLabelkeep theirs.NameDetail.tier,liteLink,fullClaimbecomerequiredTier,deviceLabelhash,personhoodNode, and the controller's request structs rename their fields too.PopStatus: values stayuint80 to 3, so nothing on the wire changes. Member names are not part of the ABI, so the break is limited to Solidity code importingIPopRulesand clients that hardcode the old labels (PopLite,PopFull); they needDevicehood,Personhood. The same applies toLinkKind.LiteUsername, nowLinkKind.DeviceName.PopRulesrevert strings: thePopErrormessages changed wording, so anything matching on the text breaks.liteNamesOf/fullNamesOfand their counts are replaced bynamesOf/nameCountOf, with a single offset, andNamedropsdeadline.How to test
forge testNotes
Once the dotNS gateway pallet will be updated to the new end points, we can stop supporting the legacy ones.