fix(note): check spent nullifiers during transport import - #2434
Closed
wodesiku wants to merge 2 commits into
Closed
fix(note): check spent nullifiers during transport import#2434wodesiku wants to merge 2 commits into
wodesiku wants to merge 2 commits into
Conversation
Collaborator
|
Thanks! This is already covered by #2438 (which will do a bit more than this), so closing this PR for now. |
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.
What does this PR do?
Marks note-transport imports as
ConsumedExternalwhen their nullifiers were already committed on-chain before the client imported them.Related Issue
Fixes #2422
Root Cause
Notes delivered through the note transport enter
import_note_records_by_detailsviaNoteFile::ExpectedNote. That path discovers and authenticates the note commitment, but it did not query historical nullifier state. The existingget_nullifier_commit_heightscheck was only used by the inclusion-proof import path.When a restored client has already synced past a note's spend block, forward nullifier sync starts after the checkpoint and can never observe that historical spend. The transport-imported record therefore remained
Committedand was returned as consumable even though the node would reject it as already spent.Changes Made
InputNoteRecord::consumed_externallystate transition.Expectedunchanged and avoid an RPC call when no committed details are found.How to Test
Command attempted:
The test was blocked before compilation by the Windows environment while building the existing
miden-node-proto-build v0.16.0-rc.1dependency:cargo check --locked -p miden-client --features testinghit the same pre-test build-script failure. WSL Ubuntu-22.04 is installed but has no Cargo toolchain. No test assertion failure was observed.Scope
Cargo.lockunchanged.