BEEFY: define on-chain beefy-genesis and use it to coordinate voter initialization
In order to deploy full beefy (where 1st block in each session is beefy mandatory) we need to define an initial "genesis session" that all validators agree upon.
This PR adds an GenesisBlock: Option<BlockNumber> storage item to pallet-beefy that defaults to None keeping BEEFY disabled by default.
When we want to enable BEEFY consensus, an on-chain sudo or governance call will initialize it to the desired block number. BEEFY clients/voters will consider that to be the first mandatory block in the full BEEFY consensus protocol.
Fixes https://github.com/paritytech/substrate/issues/13156
Polkadot companion: https://github.com/paritytech/polkadot/pull/6623
@svyatonik @andresilva please take a look at the companion too 🥺
bot rebase
Rebased
bot rebase
Rebased
bot rebase
Rebased
bot merge
Error: "Check reviews" status is not passing for https://github.com/paritytech/polkadot/pull/6623
bot merge