HomePhabricator

[consensus + avalanche] Move miner fund from consensus to policy

Description

[consensus + avalanche] Move miner fund from consensus to policy

Summary:
Moving the miner fund from consensus to policy makes it possible to do the following without a flag day upgrade:

  • Change fund address
  • Change fund amount
  • Add staking rewards

This iteration of the patch (initial feedback in D12806) implements the policy after ConnectBlock but before the UTXO updates are flushed because alternatives are higher risk:

  • Before ConnectTip/ConnectBlock - Parking a block before checking consensus rules would prevent a node from banning peers sending invalid blocks.
  • After ConnectTip - Rewinding the in-progress state changes is fragile and prone to complications while backporting.

After Wellington activates, the miner fund will no longer be enforced as a consensus rule. Blocks not including the miner fund will be parked and voted on by avalanche.

Depends on D13150 and D13207

Test Plan:

ninja check check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
sdulfariAuthored on Jan 20 2023, 19:17
sdulfariPushed on Mar 3 2023, 08:21
Reviewer
Restricted Project
Differential Revision
D13118: [consensus + avalanche] Move miner fund from consensus to policy
Parents
rABC2b1b8600d88d: Fix a flakiness in abc_p2p_avalanche_proof_voting
Branches
Unknown
Tags
Unknown