mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 12:17:38 +00:00
test, bench: construct inputs/outputs declaratively in descriptor, bip352, group_outputs and ephemeral spends #36950
No reviewers
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!36950
Loading…
Reference in a new issue
No description provided.
Delete branch "test-declarative-descriptor-bip352"
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?
Part of #36692.
descriptor_tests:DoCheckbuilt the spending transaction withvin.resize(1)/vout.resize(1)and then wrotenSequencethroughvin[0]. It now uses literalvin/voutlists, which also makes the default input and the empty output visible.bip352_tests:bip352_p2pkh_pubkey_extraction_with_checksig_in_scriptsigsigned a transaction and then wrote the malleated scriptSig into its existing input. It is now split into an unsigned transaction used for signing and the final transaction built with the malleated scriptSig. The legacy sighash replaces the scriptSig being signed with the scriptCode, so the signature does not depend on the scriptSig.group_outputs_tests: theaddCoinhelper usedvout.resize(1)followed by writes tonValueandscriptPubKey. It now uses a literalvoutlist.bench/mempool_ephemeral_spends:tx2was built withvin.resize()followed by writes to each input'sprevout. Its inputs are now constructed from their outpoints, and the single default input oftx1and the single empty output oftx2are literal lists. The transactions are unchanged.No change in test or benchmark behavior.
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.🔵 Suggestion · The advertised
bip352_testsrefactor is absentThe title and description promise a
bip352_testsrestructuring that the series does not contain, leaving reviewers with a signing-equivalence claim but no corresponding change to assess.Location: src/test/descriptor_tests.cpp:460 (commit).
Review coverage was incomplete.
Reviewed:
5b4baa8dada1· Review report · Previous reportspermalink
ACK
3fb26984f8No remarks on this one, LGTM.
review ACK
3fb26984f8🥐Show signature
Signature:
after reviewing another pull, I don't really see the point of the second commit. It is pretty normal that signing a transaction mutates its signature. There is no need to create a full copy of it. Also
07540640aa, leaves this as-is as well.Hmm, makes sense.
Removed second commit (d6464b3) as signing a txn can mutate the signature. comment
I think it would be good to wrap up this project in a few pull requests and just focus on the important ones:
resize()in combination with immediately following field-assignment: E.g.tx.vout.resize(1); tx.vout[0].nValue=.... Everything else is probably best left as-is style-wise for now to avoid code and review churn.So I think the diff would be something like this: (unreviewed slop, need to drop the changes that are already in reviewed pulls, also should use multi-line initializer lists with trailing comma):
a diff
review ACK
5b4baa8dad🍸Show signature
Signature:
re ACK
5b4baa8dadAlright, thanks.