-
Notifications
You must be signed in to change notification settings - Fork 636
feat(crypto): adding secp256k1
with Ethereum format
#2534
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
Conversation
… and thread it through the code (#3517) Contributes to #2424 Precondition for #2534 This PR is inspired in the core idea of #2539, by @tac0turtle, whereby we make `privval` more flexible to generate privval files in all the curves we support in CometBFT natively. The flag `key-type`, which was only part of command `gen-validator`before this PR, is now part of all commands that _may_ generate priv validator keys (`start`, `unsafe-reset-all`, `unsafe-reset-priv-validator`, `init`). Importantly, node key, and node key file generation is still hard-coded to `ed25519` (no need to change it for the time being). Still TODO: * Add unit tests at various places to test the different key types --- #### PR checklist - [x] Tests written/updated - [x] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [x] Updated relevant documentation (`docs/` or `spec/`) and code comments - [x] Title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec --------- Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
… and thread it through the code (#3517) Contributes to #2424 Precondition for #2534 This PR is inspired in the core idea of #2539, by @tac0turtle, whereby we make `privval` more flexible to generate privval files in all the curves we support in CometBFT natively. The flag `key-type`, which was only part of command `gen-validator`before this PR, is now part of all commands that _may_ generate priv validator keys (`start`, `unsafe-reset-all`, `unsafe-reset-priv-validator`, `init`). Importantly, node key, and node key file generation is still hard-coded to `ed25519` (no need to change it for the time being). Still TODO: * Add unit tests at various places to test the different key types --- #### PR checklist - [x] Tests written/updated - [x] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [x] Updated relevant documentation (`docs/` or `spec/`) and code comments - [x] Title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec --------- Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com> (cherry picked from commit bd06fec) # Conflicts: # cmd/cometbft/commands/gen_validator.go # node/errors.go # node/node_test.go # privval/file.go
… and thread it through the code (backport #3517) (#3630) Contributes to #2424 Precondition for #2534 This PR is inspired in the core idea of #2539, by @tac0turtle, whereby we make `privval` more flexible to generate privval files in all the curves we support in CometBFT natively. The flag `key-type`, which was only part of command `gen-validator`before this PR, is now part of all commands that _may_ generate priv validator keys (`start`, `unsafe-reset-all`, `unsafe-reset-priv-validator`, `init`). Importantly, node key, and node key file generation is still hard-coded to `ed25519` (no need to change it for the time being). Still TODO: * Add unit tests at various places to test the different key types --- #### PR checklist - [x] Tests written/updated - [x] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [x] Updated relevant documentation (`docs/` or `spec/`) and code comments - [x] Title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec <hr>This is an automatic backport of pull request #3517 done by [Mergify](https://mergify.com). --------- Co-authored-by: Sergio Mena <sergio@informal.systems> Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
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.
LGTM. Only minor comments.
Thanks a lot @bermuell for taking this over the finish line! 🚀
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 PR was implemented by @bermuell and approving based on feedback from @sergio-mena and a pass over it myself. Thank you for 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.
Thanks @sergio-mena and @bermuell 👍
Co-authored-by: Sergio Mena <sergio@informal.systems>
Co-authored-by: Sergio Mena <sergio@informal.systems>
Follow-up to #2534 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Added support for the secp256k1-eth crypto codec.
This includes functionality for generating and verifying
Ethereum-compatible signatures using the secp256k1 curve.
Post Merge follow up
secp256k1eth
#4726secp256k1eth
#4725MaxSignatureSize
to include secp256k1eth #4727PR checklist
.changelog
(we use unclog to manage our changelog)docs/
orspec/
) and code comments