Page MenuHomePhabricator

[avalanche] Add the remaining contextual transaction checks to the tx finalization process
ClosedPublic

Authored by Fabien on Jul 15 2025, 14:00.

Details

Summary

These contextual (based on block height) checks are currently done in the miner when the block template is generated.
We can move these checks to happen earlier in the process thanks to avalanche preconsensus, and apply them during the tx finalization. This ensures that all the checks are still present after we start mining only the finalized transactions, while offloading them from the miner.
These contextual checks are the last ones remaining since the min feerate and the size checks have been already added.

Note that all these txs would be rejected from the mempool already so the only way to test this is via unit tests.

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_finalization_safety_nets
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33883
Build 67239: Build Difflint-circular-dependencies · build-without-wallet · build-diff · build-debug · build-clang-tidy · build-clang
Build 67238: arc lint + arc unit