Skip to content
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

As validator, check keys per epoch #3077

Open
wants to merge 1 commit into
base: albatross
Choose a base branch
from
Open

Conversation

nibhar
Copy link
Member

@nibhar nibhar commented Nov 16, 2024

Since keys can change, this PR adds a basic check to the validator which makes sure its keys are consistent with the ones the election block expects. Similar checks are introduced to signing Level updates and Micro blocks such that a validator will not produce blocks if the keys do not match and not sign any LevelUpdates.

// Compare configured validator signing key to the one in the current epoch to make sure it is the same.
if epoch_validator.signing_key != self.signing_key().public {
panic!("Invalid validator configuration: Configured signing key does not match signing key in this epoch");
}
Copy link
Member

@sisou sisou Nov 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in-person just now: the check below that checks against the staking contract can probably be removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@nibhar nibhar force-pushed the nibhar/check-keys branch 3 times, most recently from 65019c3 to c016f48 Compare November 17, 2024 22:27
@Eligioo
Copy link
Member

Eligioo commented Jan 9, 2025

@nibhar can this PR get rebased?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants