WIP: Sig all fixes #1208
No reviewers
Labels
No labels
DB & Storage
Deployment
Error Handling & Logging
Maintenance
Payment Backend
backport
backport v0.13.x
backport v0.14.x
backport v0.15.x
bindings
blocked
bug
cdk-sql
ci
cli
deps
documentation
duplicate
enhancement
good first issue
help wanted
invalid
keep-open
ldk-node-ui
migrations
mint
mutation-testing
needs rebase
needs review
new nut
nut change
question
ready
rust-version
rustfmt
stacked hold
stale
testing
wallet
weekly-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cashubtc/cdk!1208
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "sig_all_fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
anyone can payproofs)Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just final-checkbefore committingDuplicate of https://github.com/cashubtc/cdk/pull/1206?
seems like it
I'm doing a bit more by fixing swaps signing and allowing for melts. Plus added the new Test Vectors.
We also have https://github.com/cashubtc/cdk/pull/1212 is this over lapping as well?
lol, it seems over lapping, that pr changes quite a bit of stuff though
A lot of overlap in my PR #1212 yes 😀
When I started working on SIG_ALL stuff a week or two ago for the Spillman channel, I found a few bugs and so I ended up doing #1212 to fix it all, in particular with a single Rust trait and a single function to do all the verification of any spending condition:
I guess you're finding some or all of the same issues
Hi,
I've finally made time to look at this in more detail. First, I copied your tests into my PR and they were very helpful, including exposing an error in my code. I had forgotten to do the hex conversion of the preimage
I've now checked out your PR, and ran all my tests against them. My PR has a bunch of new tests defined in
crates/cdk/src/mint/swap/spending_conditions. There are 29 of them, and they pass when they are run within that PR.Using the code in this PR, some of those tests fail. I'll pick one of them now to do a deeper dive. Of course, maybe my code - or my test - is wrong 😀
cargo test -p cdk mint::swap::spending_conditions:: -- --show-outputI see one of the problems now, @lescuer97
None of the SIG_ALL tests (the ones I copied from my PR into this PR's cod) pass. This is because the code doesn't do SIG_ALL verification. This is an older pre-existing bug.
process_swap_requestcallsverify_inputs. This doesn't understand SIG_ALL, and therefore it immediately rejects it and the swap is rejected. This happens before the code reaches any SIG_ALL-checking code.That problem, and a few other problems, are why I did a rewrite of all the verification of spending conditions
The current iteration of the spec removed the keyset_id.
close for https://github.com/cashubtc/cdk/pull/1212
Pull request closed