Conversation
Contributor
Author
|
Closing, in favor of #24892 |
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.
Problem
The
PrivateMutableandPrivateImmutableinitialization nullifiers and theSingleUseClaimclaim 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, andis_initialized/has_claimedfor 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
HandshakeRegistryis also re-pinned with the fix, since it stores per-accountPrivateMutablestate: 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