Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

BEEFY voter should have "non-authority light mode" #407

Open
acatangiu opened this issue Mar 22, 2022 · 3 comments
Open

BEEFY voter should have "non-authority light mode" #407

acatangiu opened this issue Mar 22, 2022 · 3 comments

Comments

@acatangiu
Copy link
Collaborator

These would not vote themselves, but could/should gossip votes and provide on-demand justifications.

@seunlanlege
Copy link

Wait so, Beefy justifications either via block justifications or through beefy_subscribeJustifications aren't available on non-authority nodes?

@acatangiu
Copy link
Collaborator Author

Right now the beefy worker code does not have an explicit switch between authority and non-authority. As such all nodes are gossiping votes, all nodes handle votes, and all nodes also try to vote (with non-auth ones failing to vote because no auth key available in keystore).

This translates to:

  • all nodes handle BEEFY votes so all nodes append block justifications and publish justifications to subscribers,
  • non-auth nodes waste a bit of CPU trying to vote before they realize they can't - this should be improved

@acatangiu acatangiu changed the title Support non-authority nodes Nodes should have "non-authority light mode" May 26, 2022
@acatangiu acatangiu added this to BEEFY Jun 28, 2022
@acatangiu acatangiu moved this to Backlog 🗒 in BEEFY Jun 28, 2022
@acatangiu acatangiu moved this from Backlog 🗒 to Need for Kusama in BEEFY Jul 6, 2022
@seunlanlege seunlanlege moved this to In Progress in Bridging team board Jul 7, 2022
@acatangiu
Copy link
Collaborator Author

With the new BEEFY justification import logic, BEEFY justifications are stripped at block import and passed to the voter for validation before being included in the chain backend.

If the beefy voter isn't running on the node then it doesn't include beefy justifications anymore. If we start the voter on non-auth nodes, we end up wasting a some cpu cycles trying to vote and failing (because node is not validator).

Maybe we can add extra logic to voter to explicitly skip voting for sessions it knows it's not a validator. Non-auth voter should still follow and process justifications and finality notifications and switch between auth/non-auth states at session boundaries (when validator set changes).

@acatangiu acatangiu changed the title Nodes should have "non-authority light mode" BEEFY voter should have "non-authority light mode" Aug 3, 2022
@acatangiu acatangiu moved this from Need for Kusama 🗒 to Some Day Maybe in BEEFY Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Status: Some Day Maybe
Development

No branches or pull requests

2 participants