HomePhabricator

[avalanche] Add the remaining contextual transaction checks to the tx…

Description

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

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

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
FabienAuthored on Jul 15 2025, 10:46
FabienPushed on Jul 16 2025, 14:11
Reviewer
Restricted Project
Differential Revision
D18369: [avalanche] Add the remaining contextual transaction checks to the tx finalization process
Parents
rABC59f0ce41dfe6: [tests] Readability refactors for miner_tests
Branches
Unknown
Tags
Unknown