Skip to content

chore: WIP-1002 Improvements#682

Open
Kemperino wants to merge 6 commits into
mainfrom
kempy/wip-1002-improvements
Open

chore: WIP-1002 Improvements#682
Kemperino wants to merge 6 commits into
mainfrom
kempy/wip-1002-improvements

Conversation

@Kemperino

@Kemperino Kemperino commented May 28, 2026

Copy link
Copy Markdown
Contributor
  1. Rename some functions
  2. Bettter spec out the pinned storage
  3. Save credential -> subsidy budget in bitmap to reduce storage requirements.

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: updateRecordupdateSubsidyClaim, with matching signal struct/tag (UpdateSubsidyClaimSignal), error SubsidyClaimDoesNotExist, 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 for budget / nullifiersOf, concrete keccak slot formulas for mappings and dynamic arrays, uint128 budget 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 lists updateSubsidyClaim instead of updateRecord.

Reviewed by Cursor Bugbot for commit 298e8a9. Configure here.

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.

1 participant