Skip to content

fix(aztec-nr)!: bind owner address into owned state var nullifiers - #24837

Closed
nchamo wants to merge 4 commits into
merge-train/fairies-v5from
nchamo/init-nullifier
Closed

nchamo wants to merge 4 commits into
merge-train/fairies-v5from
nchamo/init-nullifier

Conversation

@nchamo

@nchamo nchamo commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Problem

The PrivateMutable and PrivateImmutable initialization nullifiers and the SingleUseClaim claim nullifier were derived only from the storage slot and a secret derived from the owner's keys. Two accounts with the same keys but different addresses (possible since an address does not depend solely on the keys) therefore shared these nullifiers, while not sharing notes. Initializing or claiming for one account blocked the other from doing the same, and is_initialized / has_claimed for one account reported the other account's state.

Fix

The owner's address is now part of the nullifier preimage in all three state variables, keeping the state of such accounts independent. Unit tests assert that each nullifier computation differs per owner for a fixed secret. The full two-account scenario is no longer constructible in TXE since #24845 makes the key store reject accounts sharing privacy keys, which is why the coverage lives at the nullifier-computation level. A migration note documents the change.

The canonical HandshakeRegistry is also re-pinned with the fix, since it stores per-account PrivateMutable state: only its artifact changes in the pin, so the other standard contracts keep their addresses (their bytecode does not embed the registry address after #24844). The registry moves to a new address, and handshakes established with the previous instance must be re-established.

Fixes #24821

@nchamo nchamo self-assigned this Jul 21, 2026
@nchamo nchamo added ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure labels Jul 21, 2026
@nchamo

nchamo commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Closing, in favor of #24892

@nchamo nchamo closed this Jul 21, 2026
nventuro added a commit that referenced this pull request Jul 21, 2026
…esting utilities (#24892)

Reimplementation of
#24837 - same
nullifier fix, this time extending `TestEnvironment` so that we can test
the fix works as intended.
nchamo pushed a commit that referenced this pull request Jul 23, 2026
…esting utilities (#24892)

Reimplementation of
#24837 - same
nullifier fix, this time extending `TestEnvironment` so that we can test
the fix works as intended.

(cherry picked from commit f66808c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant