HomePhabricator

[avalanche] Only mine the finalized txs

Description

[avalanche] Only mine the finalized txs

Summary:
This diff adds an option to the block assembler to use the finalized transactions radix avalanche_preconsensus_mine_radix_tree
for building the block template. This code is actually unreachable outside of tests so there is no change in behavior.

A follow-up diff will add a flag and a functional test for the feature. For now the tests are made of:

  • A benchmark to demonstrate the performance gain of this approach (about 15x faster on my machine)
  • Unit tests in the form of the actual miner tests running with preconsensus to check for regression. There are a few behavioral changes in the miner tests (e.g. due to CTOR, which is NOT enforced in the tests) but this is kept minimal.

Test Plan:

ninja all check-all
ninja bench-bitcoin

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

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

Details

Provenance
FabienAuthored on Jun 5 2025, 14:44
FabienPushed on Jul 17 2025, 12:45
Reviewer
Restricted Project
Differential Revision
D18377: [avalanche] Only mine the finalized txs
Parents
rABCefd57c97e999: [Cashtab] Patch send button overflow issue
Branches
Unknown
Tags
Unknown