This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
BEEFY: add on-chain mechanism to initialize/reset beefy pallet and client (voter) #14203
Closed
Tracked by
#2150
Labels
J0-enhancement
An additional feature request.
Comments
8 tasks
I think we should go with 1st option. BEEFY consensus can be restarted by resetting "genesisBlock" in pallet-beefy, but we don't want to also reset authority set IDs so that they are uniquely identified across the entire chain history regardless of how many times BEEFY consensus has been reset/restarted. |
acatangiu
added a commit
that referenced
this issue
May 25, 2023
BEEFY consensus can be restarted by resetting "genesisBlock" in pallet-beefy, but we don't want to also reset authority set IDs so that they are uniquely identified across the entire chain history regardless of how many times BEEFY consensus has been reset/restarted. This is why the client now also accepts initial authority_set_id != 0. BEEFY client now detects pallet-beefy reset/reinit and errors-out and asks for a restart. BEEFY client persisted state should be discarded on client restarts following pallet-beefy reset/reinit. End result is BEEFY client/voter can now completely reinitialize using "new" on-chain info following pallet-beefy reset/reinit, discarding old state. Fixes #14203 Fixes #14204 Signed-off-by: acatangiu <adrian@parity.io>
coderobe
pushed a commit
that referenced
this issue
May 25, 2023
BEEFY consensus can be restarted by resetting "genesisBlock" in pallet-beefy, but we don't want to also reset authority set IDs so that they are uniquely identified across the entire chain history regardless of how many times BEEFY consensus has been reset/restarted. This is why the client now also accepts initial authority_set_id != 0. BEEFY client now detects pallet-beefy reset/reinit and errors-out and asks for a restart. BEEFY client persisted state should be discarded on client restarts following pallet-beefy reset/reinit. End result is BEEFY client/voter can now completely reinitialize using "new" on-chain info following pallet-beefy reset/reinit, discarding old state. Fixes #14203 Fixes #14204 Signed-off-by: acatangiu <adrian@parity.io>
Ank4n
pushed a commit
that referenced
this issue
Jul 8, 2023
BEEFY consensus can be restarted by resetting "genesisBlock" in pallet-beefy, but we don't want to also reset authority set IDs so that they are uniquely identified across the entire chain history regardless of how many times BEEFY consensus has been reset/restarted. This is why the client now also accepts initial authority_set_id != 0. BEEFY client now detects pallet-beefy reset/reinit and errors-out and asks for a restart. BEEFY client persisted state should be discarded on client restarts following pallet-beefy reset/reinit. End result is BEEFY client/voter can now completely reinitialize using "new" on-chain info following pallet-beefy reset/reinit, discarding old state. Fixes #14203 Fixes #14204 Signed-off-by: acatangiu <adrian@parity.io>
nathanwhit
pushed a commit
to nathanwhit/substrate
that referenced
this issue
Jul 19, 2023
…ch#14217) BEEFY consensus can be restarted by resetting "genesisBlock" in pallet-beefy, but we don't want to also reset authority set IDs so that they are uniquely identified across the entire chain history regardless of how many times BEEFY consensus has been reset/restarted. This is why the client now also accepts initial authority_set_id != 0. BEEFY client now detects pallet-beefy reset/reinit and errors-out and asks for a restart. BEEFY client persisted state should be discarded on client restarts following pallet-beefy reset/reinit. End result is BEEFY client/voter can now completely reinitialize using "new" on-chain info following pallet-beefy reset/reinit, discarding old state. Fixes paritytech#14203 Fixes paritytech#14204 Signed-off-by: acatangiu <adrian@parity.io>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
BEEFY will be deployed on running chains so relying on
GenesisConfig
is not enough.Currently, to initialize it, sudo/governance needs to do multiple synchronized
setStorage
** calls (setting pallet genesis block and setting initial authority_set_id toGENESIS_AUTHORITY_SET_ID
).This approach doesn't allow us to set a genesis further in the future than current session because the authority-set-id is incremented every session and the client expects active.id() == GENESIS_AUTHORITY_SET_ID for the pallet genesis block; and is somewhat error-prone.
Solution(s)
GENESIS_AUTHORITY_SET_ID
. (easy)pallet-beefy
so that it only starts tracking and rotating authority-sets after pallet genesis block. (more involved)CC @andresilva
The text was updated successfully, but these errors were encountered: