chore: WIP-1002 Improvements#682
Open
Kemperino wants to merge 6 commits into
Open
Conversation
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.
Note
Low Risk
Documentation-only changes to a draft WIP; no implementation or on-chain behavior in this PR.
Overview
This PR refines WIP-1002 (World ID subsidy accounting spec) with clearer naming, a formal pinned-storage contract, and small editorial fixes—no runtime code in the diff.
API and terminology:
updateRecord→updateSubsidyClaim, with matching signal struct/tag (UpdateSubsidyClaimSignal), errorSubsidyClaimDoesNotExist, and view renames:getRemainingBudget,getAvailableBudget,getAuthorizedNullifiers,hasClaimedCredential. Examples, replay-protection text, and the per-tx debit pseudocode are updated to match.Pinned storage (main substantive addition): New ERC-7201-style section defines
PinnedSubsidyStorage,PINNED_STORAGE_LOCATION, namespace derivation, fixed offsets forbudget/nullifiersOf, concrete keccak slot formulas for mappings and dynamic arrays,uint128budget encoding rules, and a requirement that Solidity and the revm extension share this layout (with golden tests recommended). Non-pinned maps (auth,authorized,claimed, etc.) are called out separately; security text now lists the full pinned commitment set.Minor: Typos/clarity (
storage layout is, debit hook references pinned derivation); architecture bullet listsupdateSubsidyClaiminstead ofupdateRecord.Reviewed by Cursor Bugbot for commit 298e8a9. Configure here.