mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:50:37 +00:00
test: construct miner_tests transactions declaratively #36810
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!36810
Loading…
Reference in a new issue
No description provided.
Delete branch "test-declarative-miner"
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.
Add
MakeTx()and use it inTestPackageSelectionandTestPrioritisedMiningso each transaction is fully specified where it is created, instead of overwriting theprevoutandnValueof the previous one. Also build theCreateBigSigOpsTx()andCreateBigSigOpsCluster()transactions in place.One implicit dependency is now explicit: BulkTransaction() pads the output script of hashFreeTx2, and the next two transactions inherited it. Their size matters for the fee rate checks, so the padded script is now passed to
MakeTx()explicitly.The txid, wtxid and fee of every transaction added to the mempool are unchanged.
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.No verified findings are available from this review.
Review coverage was incomplete.
Reviewed:
8d33ffe47e38· Review report · Previous reportspermalink
ACK
546d828c93The children reusing the padded script looks incidental to me, but it has now become load-bearing for the
vtx[8]check. A comment explaining why we need this would be useful.I think this can be removed.
Done, removed.
Good point. I checked, and the vtx[8] check does depend on it. With the padded script, hashLowFeeTx2 is ~981 vB and pays a 1 sat fee, so its feerate is about blockMinFeeRate (1 sat/kvB). That's below the hashFreeTx + hashLowFeeTx package, so it's selected last. Without the padding it's 61 vB (~16 sat/kvB), it's selected ahead of that package, and the test fails at vtx[8]. I added a comment explaining this.
Addressed suggestion to add comment on children reusing the padded script in miner test.
Not sure about the CI failure here, the cause might be from macOS runner dropping socket.
It is surprising at first that
MakeTx()returns aCMutableTransaction. But then it becomes clear thattx = MakeTx()requiresoperator=support, whichCTransactionlacks, unfortunately. Anyway, when splitting the test into different cases, reassignment will no longer be an issue. But that may be done in a follow-up.ACK
8d33ffe47eACK
8d33ffe47ereview ACK
8d33ffe47e🦆Show signature
Signature: