mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 12:20:38 +00:00
psbt: add new test vectors #36329
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36329
Loading…
Reference in a new issue
No description provided.
Delete branch "2026/09/psbt-test-vectors"
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?
Add the two new test vectors from:
https://github.com/bitcoin/bips/pull/2275 additionally requires existing
Combinevectors to run in both orders, so we do that here too.The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.cc @brunoerg
ACK f2a0db6
I tested the code locally and also did some code tracing to understand that the updates to combiner test are meant to run an additional test case where the last psbt is the first processed. The purpose is to ensure that no matter the order the psbts are processed, the underlying merge logic is order-independent
Personal note: I now understand that the combinepsbt method uses dynamic dispatch to handle the RPC command "combinepsbt" received by the node and runs the C++ code from psbt.cpp line 838 where the merge takes place.
The addition of the invalid psbt test data with not matching the expected for the psbt, checks that this code from psbt.h line 134 runs with expected behavior:
if (remaining_after + expected_size != remaining_before) { throw std::ios_base::failure("Size of value was not the stated size");nit: could move it to
invalid_with_msgwith its expected error.ACK
f2a0db6309I'm re-running a mutation analysis for psbt, will have a result soon.
Done
reACK
6fa2f3974cWould there be any reason to do the same for the other "invalid" without a message for further clarity?
reACK 6fa2f39
For what it's worth, I ran the two new vectors at
6fa2f3974cthrough btclib-wallet: combining the sighash vector gives the expected PSBT byte for byte in both orders, and the new invalid PSBT is rejected.ACK
Base:
a829aeaac1aff6cb786aab7d2514b49eb233334bHead:
6fa2f3974cbb69fb2086a8f89d300deec4486662No verified findings are available from this partial review.
Review coverage was incomplete. The adversarial review had incomplete evidence. The adversarial_glm review did not complete.
Full review report
ACK
6fa2f3974c