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

Determine validator_set_id at BeefyWorker startup #95

Closed
adoerr opened this issue Mar 2, 2021 · 1 comment · Fixed by #111
Closed

Determine validator_set_id at BeefyWorker startup #95

adoerr opened this issue Mar 2, 2021 · 1 comment · Fixed by #111
Assignees
Labels
enhancement New feature or request M-gadget The client code of the gadget.

Comments

@adoerr
Copy link
Contributor

adoerr commented Mar 2, 2021

BeefyWorker needs to be initialized with the current valid validator_set_id. Right now this id is hard coded to the genesis validator set id '0' (zero).

@adoerr
Copy link
Contributor Author

adoerr commented Mar 3, 2021

I think this should be an Option and we should skip voting if it's not set. Otherwise I'm afraid that BEEFY validators will start signing bullshit commitments. Later on that should obviously be penalized, but currently I think it's safer to just wait for the beginning of the session. Not sure how this will work initially though (i.e. if we ever produce the first commitment) - perhaps special casing empty chain will be required (setting Some(0) instead of None).

Comment from @tomusdrw on #94.

Currently we always use Some(0) as the validator_set_id, otherwise the test deployment would never vote on anything. Reason is that the test deployment always starts with genesis, so we need to implement the empty chain test at the very least for the test deployments.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request M-gadget The client code of the gadget.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant