informalsystems / tendermint-rs

Client libraries for Tendermint/CometBFT in Rust!
Apache License 2.0
588 stars 215 forks source link

Add support for secp256k1 consensus keys #1358

Closed mkaczanowski closed 9 months ago

mkaczanowski commented 9 months ago

Closes: #1364

This adds the support for parsing secp256k1 consensus key from priv_validator_key.json.

A while ago I've merged support for secp256k1 consensus key type to tmkms mainly for band protocol network. It came out that the functionality to import the private key from tendermint format to tmkms doesn't work due to lack of support in tendermint-rs.

codecov-commenter commented 9 months ago

Codecov Report

Merging #1358 (f9b0a55) into main (4d81b67) will increase coverage by 0.5%. Report is 1 commits behind head on main. The diff coverage is 44.7%.

:exclamation: Current head f9b0a55 differs from pull request most recent head 7ff521d. Consider uploading reports for the commit 7ff521d to get more accurate results

@@           Coverage Diff           @@
##            main   #1358     +/-   ##
=======================================
+ Coverage   59.8%   60.4%   +0.5%     
=======================================
  Files        274     275      +1     
  Lines      27254   27062    -192     
=======================================
+ Hits       16314   16361     +47     
+ Misses     10940   10701    -239     
Files Changed Coverage Δ
tendermint/src/abci/response/process_proposal.rs 0.0% <0.0%> (ø)
...dermint/src/abci/response/verify_vote_extension.rs 0.0% <0.0%> (ø)
tendermint/src/abci/types.rs 0.2% <0.0%> (-0.1%) :arrow_down:
tools/proto-compiler/src/constants.rs 0.0% <ø> (ø)
tendermint/src/private_key.rs 45.0% <50.0%> (+19.0%) :arrow_up:
config/tests/mod.rs 100.0% <100.0%> (ø)
tendermint/src/public_key.rs 79.5% <100.0%> (+3.1%) :arrow_up:

... and 6 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more