Skip to content

feat: backport #21351 — move storage_slot from partial commitment to completion hash#21587

Merged
benesjan merged 2 commits into
backport-to-v4-next-stagingfrom
claudebox/backport-21351-storage-slot-v4-next
Mar 17, 2026
Merged

feat: backport #21351 — move storage_slot from partial commitment to completion hash#21587
benesjan merged 2 commits into
backport-to-v4-next-stagingfrom
claudebox/backport-21351-storage-slot-v4-next

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Summary

Backport of #21351 to v4-next.

Moves storage_slot from the partial note commitment (first hash round) to the completion hash (second round). With the Owned state variable, the storage slot no longer encodes the owner and can be safely revealed publicly.

  • Partial commitment: hash(owner, randomness) instead of hash(owner, storage_slot, randomness)
  • Completion hash: hash(commitment, storage_slot, value) instead of hash(commitment, value)
  • storage_slot removed from private message encoding; extracted from public completion log during note discovery

Cherry-pick conflicts

The only conflict was a modify/delete on noir-projects/protocol-fuzzer/contracts/side_effect_contract/src/main.nr — this file is not tracked in v4-next (protocol fuzzer contract was removed), so the resolution was to delete it.

Verification

All affected Noir packages compile successfully: uint_note, nft_contract, simple_token_contract, token_contract, test_contract.

ClaudeBox log: https://claudebox.work/s/abba570993edc904?run=1

@AztecBot AztecBot added the claudebox Owned by claudebox. it can push to this PR. label Mar 16, 2026
benesjan and others added 2 commits March 16, 2026 11:55
…etion hash (#21351)

Cherry-pick of merge commit 936ab03 with modify/delete conflict in
noir-projects/protocol-fuzzer/contracts/side_effect_contract/src/main.nr
(file not tracked in v4-next).
Remove noir-projects/protocol-fuzzer/contracts/side_effect_contract/src/main.nr
which was modified in the original PR but is not tracked in v4-next (the protocol
fuzzer contract was removed from v4-next).
@AztecBot AztecBot force-pushed the claudebox/backport-21351-storage-slot-v4-next branch from fc4b454 to 0f17d07 Compare March 16, 2026 11:56

@benesjan benesjan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff looks good

@benesjan benesjan marked this pull request as ready for review March 16, 2026 12:09
@benesjan benesjan requested a review from nventuro as a code owner March 16, 2026 12:09

@benesjan benesjan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff looks good

@benesjan benesjan merged commit a8bb050 into backport-to-v4-next-staging Mar 17, 2026
22 of 23 checks passed
@benesjan benesjan deleted the claudebox/backport-21351-storage-slot-v4-next branch March 17, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants