-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verify GenesisValidatorRoot Matches the One in DB on Slashing Protection Import #7864
Conversation
…validateMetadata_genesis # Conflicts: # validator/client/validator.go # validator/db/kv/BUILD.bazel
if err != nil { | ||
return fmt.Errorf("%#x is not a valid root: %v", interchangeJSON.Metadata.GenesisValidatorsRoot, err) | ||
} | ||
if err = validatorDB.SaveGenesisValidatorsRoot(ctx, gvr[:]); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect, we should instead fetch the genesis validators root and compare it. We should not save what we get from the JSON file like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rauljordan save detects difference and returns error. will change to fetch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but the name is misleading though, we should just do db.GenesisValidatorsRoot and do a simple comparison
…esis_on_wait_chainstart # Conflicts: # validator/db/kv/genesis.go
Builds off #7855
Feature
What does this PR do? Why is it needed?
Genesis validator root is being used for signing attestation and block proposals
making sure beacon node use the same genesis validator root as the one that is stored in the slashing protection db makes sure we are on the right chain.
Which issues(s) does this PR fix?
Fixes #
Other notes for review