Repository navigation
Audit v14: balance counts only owned notes (SCAN-841), VK-751 sender check - #9
Merged
Merged
Conversation
…ent only when it created it (SCAN-841, VK-751) open_note reported any envelope whose receiver part opened as received and verified, with a nullifier, and any whose sender part opened as sent. Opening is neither ownership nor authorship: anyone can seal a note it owns itself to a published address, and anyone holding a viewing key holds its ovk. classify() now restates the wallet's and the node's rule and adds the creator check: received iff the receiver part opens and note.pk == pk(nk); else sent iff the sender part opens and note.from == pk(nk); else sent_unverified iff the sender part opens and note.from is a chain-fixed word (zero, rpl-mint, rpl2-pay, rpl3-pay: a relayed deposit, a mint, a payout); else null. tests/ownership.rs seals its own envelopes (the keyless SCAN-841 test uses only the victim's address). frontend/public/viewing rebuilt with wasm-pack from this source. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…s; unverified-sender label (SCAN-841, VK-751) lib/history.ts restates the owner and creator comparisons on the page's side (admit, isOwned, spendableNotes), so the spendable balance, the received count and the nullifier match no longer rest on the role string alone: a received row owned by another pk is dropped, a sent row created by another pk is never shown as Sent. RoleBadge gains sent_unverified (components.openedNotes.sentUnverified, English in every locale until translated). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Fixes for the audit v14 addendum.
Changes
Tests
randscan-viewing: 19 passed. Frontend: 85 tests, 84 pass, 1 skipped.🤖 Generated with Claude Code
https://claude.ai/code/session_01GFs5h2CVCmdBKerZzH2Xrx