HomePhabricator

[avalanche] Rewind Avalanche finalization if a finalized block is found to be…

Description

[avalanche] Rewind Avalanche finalization if a finalized block is found to be invalid

Summary:
It is not expected for an invalid block to ever finalize but if it occurs due to a bug the node can partially recover by reverting the finalization. This leaves the door open for future Avalanche polling to switch to the correct chain.

Padding was added to BadBlock() so that the transaction passes checks in AcceptBlock and is added to the block index. There is no change in behavior for the other tests that call BadBlock().

Test Plan:

ninja check check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
sdulfariAuthored on Jan 25 2023, 00:24
sdulfariPushed on Jan 26 2023, 16:55
Reviewer
Restricted Project
Differential Revision
D13063: [avalanche] Rewind Avalanche finalization if a finalized block is found to be invalid
Parents
rABCb9d13cdd9a55: Bump version to 0.26.12
Branches
Unknown
Tags
Unknown