substrate icon indicating copy to clipboard operation
substrate copied to clipboard

BEEFY: define on-chain beefy-genesis and use it to coordinate voter initialization

Open acatangiu opened this issue 2 years ago • 1 comments

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

acatangiu avatar Jan 23 '23 14:01 acatangiu

@svyatonik @andresilva please take a look at the companion too 🥺

acatangiu avatar Jan 26 '23 09:01 acatangiu

bot rebase

acatangiu avatar Jan 30 '23 09:01 acatangiu

Rebased

bot rebase

acatangiu avatar Jan 30 '23 16:01 acatangiu

Rebased

bot rebase

acatangiu avatar Feb 01 '23 10:02 acatangiu

Rebased

bot merge

acatangiu avatar Feb 03 '23 10:02 acatangiu

Error: "Check reviews" status is not passing for https://github.com/paritytech/polkadot/pull/6623

bot merge

acatangiu avatar Feb 03 '23 10:02 acatangiu