Repository navigation
Conversation
95b791d to
f8bf376
Compare
Coverage Report for CI Build 43187531181Coverage increased (+0.07%) to 53.905%Details
Uncovered Changes
Coverage Regressions35 previously-covered lines in 5 files lost coverage.
Coverage Stats
💛 - Coveralls |
2a9a931 to
996c4d3
Compare
996c4d3 to
28b7587
Compare
88fa441 to
8a4fe70
Compare
|
This is great work and very welcome. However, BIP-375 specifies exclusion for PSBTv0, so this will not be compatible with other PSBT libraries/wallets. Imho it would be best to focus on adding support for PSBTv2 first (#2328). |
8a4fe70 to
dc6f721
Compare
dc6f721 to
a2a18af
Compare
|
Hey, just wanted to drop a quick note as an LND user who's been following this PR and the overall silent payments effort. I understand that PSBTv2 support (#2328) would be needed for full BIP375 compliance and interoperability with external signers/hardware wallets. But even without that, having SP send support land in btcutil would already be a huge step forward, since it would unblock LND PR lightningnetwork/lnd#9398 and allow LND users to send to silent payment addresses using LND's internal wallet and signer. Would love to see this land. Thanks for all the great work on this @guggero! |
yyforyongyu
left a comment
There was a problem hiding this comment.
Fired some agents to review it while catching up with the bip🤓
|
I currently use Is it maybe a good idea to add a more generic |
Hmm, that's a valid point. But I'm not sure what would be best here. Adding anything to the existing So perhaps a simple |
|
Thanks a lot for the review, @yyforyongyu! I addressed all your points and did a full (agentic) review against the three updated BIPs and made sure all updated test vectors also pass. Should be quite solid now. |
Yeah, that would help already! Anything to make the process easier is very much appreciated. |
Okay, I've added |
9b9a51b to
55d755d
Compare
fametrano
left a comment
There was a problem hiding this comment.
Reviewed at 55d755d.
I checked the sending side against btclib-wallet on 200 random cases: P2PKH, P2WPKH, P2SH-P2WPKH and P2TR inputs with odd and even keys, 1 to 5 inputs, 1 to 6 addresses, labels including m = 0 and 2^32-1, repeated addresses. CreateOutputs gives the same 730 output keys. 200 BIP374 proofs, half with a message, are byte-equal to btclib's and pass DLEQVerify. The 28 BIP352 sending vectors run, and go test passes in silentpayments and psbt.
Findings are inline. One more, on the test data: two vector files are behind bitcoin/bips master (927b6de). bip-0374_test_vectors_verify_proof.csv lacks rows 15 and 16 (e = n, s = n); all 17 upstream rows pass. bip375_test_vectors.json lacks the valid vector "bare OP_2 script is not a segwit v2 witness program" (e726d13) and the invalid one for a wrong PSBT_OUT_SP_V0_LABEL length (7ccde10). With the upstream file, ReadSilentPaymentLabel rejects that vector and the SP fields of all 20 valid vectors round-trip.
55d755d to
35b72df
Compare
|
Thank you very much for your review, @fametrano! |
|
I re-checked my seven earlier comments on 35b72df, and all are fixed. The test vector files now match bitcoin/bips master, and |
35b72df to
94eecd6
Compare
|
Great catch, thank you! I've updated the |
Fixes an independent issue discovered while reviewing and testing the code that failed to detect duplicate xPubs because the wrong variable (keyData holding the nil value of the global unsigned TX, instead of the lowercase keydata that's the loop variable).
94eecd6 to
bdeaa78
Compare
Adds library/API functionality for Silent Payment send support.
Implements the following BIPs (or pull requests to BIPs):
Goal is to address send support first as that's rather straightforward. Receive support is much more involved as it requires scanning the chain in a specific manner.