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

validate consensus key during createValidator #2430

Closed
ttarsi opened this issue Nov 8, 2024 · 0 comments
Closed

validate consensus key during createValidator #2430

ttarsi opened this issue Nov 8, 2024 · 0 comments
Assignees
Labels
cantina sprint: ad hoc PRs or issues included mid-sprint

Comments

@ttarsi
Copy link
Contributor

ttarsi commented Nov 8, 2024

Problem to Solve

Validator pubkey is unchecked during registration. This is fine for now since the validator set is whitelisted and validation happens on the cosmos side, but this is required for permissionless validators.

Proposed Solution

require and verify consensus private key signature field in Staking.sol::createValidator. Might want to change to uncompressed pubkey for simplicity of verification

@ttarsi ttarsi added this to the 1.3 - Staking rewards [Dec 11] milestone Nov 8, 2024
@fabtreb fabtreb added the sprint: ad hoc PRs or issues included mid-sprint label Nov 11, 2024
@Zodomo Zodomo assigned Zodomo and unassigned corverroos Nov 11, 2024
corverroos added a commit that referenced this issue Nov 11, 2024
Verify pubkey are valid when converting types. This prevent invalid
pubkeys being registered in evmstaking. Which will halt the chain.

issue: #2430
Zodomo added a commit that referenced this issue Nov 12, 2024
Implemented secp256k1 signature verification in Staking.sol's
createValidator function.

issue: #2430
Zodomo added a commit that referenced this issue Nov 12, 2024
The Staking.sol contract was updated, so the `updatedStaking` routine
was updated to use the new initializer function, and additional tests
were added.

issue: #2430
@Zodomo Zodomo closed this as completed Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cantina sprint: ad hoc PRs or issues included mid-sprint
Projects
None yet
Development

No branches or pull requests

4 participants