Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2534 +/- ##
==========================================
+ Coverage 79.88% 79.93% +0.04%
==========================================
Files 387 387
Lines 106600 106744 +144
==========================================
+ Hits 85158 85321 +163
+ Misses 21442 21423 -19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Collaborator
|
Duplicate of #2511? |
thesimplekid
added a commit
to thesimplekid/cdk
that referenced
this pull request
Sep 12, 2026
Adapt the receive regression tests from cashubtc#2534 to check invalid DLEQ, amount, keyset, and signature counts, preserved pending state, successful recovery, and valid signatures with and without optional DLEQ proofs. Validate against existing premint messages to avoid cloning the requested outputs while retaining contextual warnings. Co-authored-by: asmo <asmogo@protonmail.com>
Collaborator
|
Few better tests I took from here and put on #2511 |
thesimplekid
added a commit
to thesimplekid/cdk
that referenced
this pull request
Sep 15, 2026
Adapt the receive regression tests from cashubtc#2534 to check invalid DLEQ, amount, keyset, and signature counts, preserved pending state, successful recovery, and valid signatures with and without optional DLEQ proofs. Validate against existing premint messages to avoid cloning the requested outputs while retaining contextual warnings. Co-authored-by: asmo <asmogo@protonmail.com>
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.
Description
Receiving ecash could accept a mint swap response with an invalid DLEQ proof or a mismatched amount or keyset, credit unusable proofs, and delete the recovery record. Validate returned blind signatures against the requested outputs before constructing or storing proofs.
Invalid responses now leave the receive saga and transaction pending so recovery can obtain valid signatures later. Valid responses remain supported with or without optional DLEQ proofs.
Notes to the reviewers
Reproduced on upstream main
e294f845before applying the fix. Five regression tests cover invalid DLEQ proofs, amount/keyset/count mismatches, preserved recovery, and valid responses with and without DLEQ proofs. This is independent of #2516, which adds Nostr payment-request validation and operation linkage.Local validation:
cargo fmt --all -- --checkcargo clippy -p cdk --all-targets --offline -- -D warningscargo test -p cdk --lib --offline: 693 tests passed in the sandbox; the three tests requiring local TCP listeners passed when rerun with the necessary permissions (696 total).Suggested CHANGELOG Updates
FIXED
Checklist
just quick-checkbefore committing. Scoped formatting, Clippy, and CDK library tests were run as listed above.