Skip to content

Commit

Permalink
Merge branch 'secp256k1' (#278)
Browse files Browse the repository at this point in the history
* secp256k1:
  fix spelling of 'features' in Cargo.toml
  realign cargo/wasm integrity
  changelog: add #278
  test: allow to sign and verify secp256k1
  client: add check on validator consensus key
  shared: optional secp256k1 signing and verification to avoid wasm bloat
  pick scheme for generating validator keys
  must use ed25519 for validator consensus key and node ID
  update rustdoc on PKH
  make fmt
  deps: enable secp256k1 in tendermint-rs
  handle secp256k1 in key_to_tendermint()
  fmt && clippy
  use heliaxdev/libsecp256k1 crate fork as dependency for now
  new test for zeroizing secp256k1 keys
  wrap libsecp256k1::SecretKey in a Box within SecretKey struct
  add a test to zeroize secp256k1
  fix bug in supplying args to test_genesis_validators()
  make validator_key_to_json() compatible with ed25519 and secp256k1 keys
  fix bug to prevent generating keys with common SchemeType
  fix bug where we were generating a key with common scheme
  make fmt
  fix unit test test_toml_roundtrip to supply good validator keys
  e2e test_genesis_validators(): make each validator have different key scheme
  fix some comments
  fix bug in supplying keypair to Tendermint
  clean and simplify code in id_from_pk()
  allow CL specification of a specific key scheme for the TxInitValidator
  improve write_tendermint_node_key() to produce the proper json given the underlying key scheme
  convert from common to underlying key type in id_from_pk() when constructing the TendermintNodeId
  change variable names in fns try_to_sk() and try_to_sig() to reduce confusion
  clean up code implementing Serialize/Deserialize, comment on certain implementations
  remove Result layering for id_from_pk
  drop 'Consensus' from SchemeType enum variants
  incorporate options into key generation functions
  command line options for specifying key scheme
  initial commit for supporting secp256k1 keys
  clean and simplify code in id_from_pk()
  allow CL specification of a specific key scheme for the TxInitValidator
  improve write_tendermint_node_key() to produce the proper json given the underlying key scheme
  convert from common to underlying key type in id_from_pk() when constructing the TendermintNodeId
  change variable names in fns try_to_sk() and try_to_sig() to reduce confusion
  clean up code implementing Serialize/Deserialize, comment on certain implementations
  remove Result layering for id_from_pk
  drop 'Consensus' from SchemeType enum variants
  make libsecp256k1 objects public when wrapped within our own Key and Sig objects
  remove clippy::bind_instead_of_map now that we will use wildcard
  incorporate options into key generation functions
  command line options for specifying key scheme
  initial commit for supporting secp256k1 keys
  • Loading branch information
Raymond E. Pasco committed Aug 20, 2022
2 parents 7397870 + bda02c2 commit c1c9a3d
Show file tree
Hide file tree
Showing 23 changed files with 1,917 additions and 160 deletions.
1 change: 1 addition & 0 deletions .changelog/unreleased/features/278-secp256k1-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Added secp256k1 support ([#278](https://github.com/anoma/anoma/pull/278))
222 changes: 217 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ std = ["ed25519-consensus/std", "rand/std", "rand_core/std"]
testing = ["dev"]

[dependencies]
namada = {path = "../shared", features = ["wasm-runtime", "ferveo-tpke", "rand"]}
namada = {path = "../shared", features = ["wasm-runtime", "ferveo-tpke", "rand", "secp256k1-sign-verify"]}
ark-serialize = "0.3.0"
ark-std = "0.3.0"
async-std = {version = "1.9.0", features = ["unstable"]}
Expand Down Expand Up @@ -105,7 +105,7 @@ sparse-merkle-tree = {git = "https://github.com/heliaxdev/sparse-merkle-tree", b
sysinfo = {version = "=0.21.1", default-features = false}
tar = "0.4.37"
# temporarily using fork work-around
tendermint = {git = "https://github.com/heliaxdev/tendermint-rs", rev = "95c52476bc37927218374f94ac8e2a19bd35bec9"}
tendermint = {git = "https://github.com/heliaxdev/tendermint-rs", rev = "95c52476bc37927218374f94ac8e2a19bd35bec9", features = ["secp256k1"]}
tendermint-config = {git = "https://github.com/heliaxdev/tendermint-rs", rev = "95c52476bc37927218374f94ac8e2a19bd35bec9"}
tendermint-proto = {git = "https://github.com/heliaxdev/tendermint-rs", rev = "95c52476bc37927218374f94ac8e2a19bd35bec9"}
tendermint-rpc = {git = "https://github.com/heliaxdev/tendermint-rs", rev = "95c52476bc37927218374f94ac8e2a19bd35bec9", features = ["http-client", "websocket-client"]}
Expand Down
Loading

0 comments on commit c1c9a3d

Please sign in to comment.