HomePhabricator

[avalanche] Enforce min UTXO age in avalanche proofs

Description

[avalanche] Enforce min UTXO age in avalanche proofs

Summary:
This diff requires each UTXO in a proof to have a minimum age expressed as a number of confirmations.

Depends on D11664

Co-authored-by: Fabien <fabcien@gmail.com>
Co-authored-by: Skuli Dulfari <sdulfari@protonmail.com>

Test Plan:

ninja check-extended
ninja bitcoind
./src/bitcoind # defaults works
./src/bitcoind -avaproofstakeutxoconfirmations=-1 -regtest # fail
./src/bitcoind -avaproofstakeutxoconfirmations=0 -regtest # fail
./src/bitcoind -avaproofstakeutxoconfirmations=1 # fail
./src/bitcoind -avaproofstakeutxoconfirmations=2015 # fail
./src/bitcoind -avaproofstakeutxoconfirmations=2016 # succeed
./src/bitcoind -avaproofstakeutxoconfirmations=2017 # fail

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: deadalnix

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

Details

Provenance
FabienAuthored on Jun 13 2022, 22:19
sdulfariCommitted on Jun 24 2022, 17:33
sdulfariPushed on Jun 24 2022, 17:33
Reviewer
Restricted Project
Differential Revision
D11622: [avalanche] Enforce min UTXO age in avalanche proofs
Parents
rABC80b91691e44b: [avalanche] Cleanup dangling proofs
Branches
Unknown
Tags
Unknown