HomePhabricator

bench: BlockAssembler on a mempool with packages

Description

bench: BlockAssembler on a mempool with packages

Summary:

Performance of block template building matters as miners likely want to be able to start mining on a block with transactions asap after a block is found. We would want to know if a mempool PR accidentally caused, for example, a 100x slowdown. An AssembleBlock() bench exists, but it operates on a mempool with 101 transactions, each with 0 ancestors or descendants and with the same fee. Adding a bench with a more complex mempool is useful because (1) it's more realistic (2) updating packages can potentially cause the algorithm to take a long time.

Backport of core#26695.

This has been slightly adapted to match our codebase and the use of the BlockFitter class.

Depends on D18313.

Test Plan:

ninja check
ninja bench-bitcoin

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D18314

Details

Provenance
FabienAuthored on Jul 2 2025, 15:38
FabienPushed on Jul 3 2025, 07:16
Reviewer
Restricted Project
Differential Revision
D18314: bench: BlockAssembler on a mempool with packages
Parents
rABCfd29b02579d5: test: Misc refactor to get rid of &foo[0] raw pointers
Branches
Unknown
Tags
Unknown