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

Adding key generation algorithm for "eth_secp256k1" #1071

Closed
leejw51crypto opened this issue Jun 10, 2021 · 4 comments · Fixed by #1295
Closed

Adding key generation algorithm for "eth_secp256k1" #1071

leejw51crypto opened this issue Jun 10, 2021 · 4 comments · Fixed by #1295
Labels
I: CLI Internal: related to the relayer's CLI I: dependencies Internal: related to dependencies O: new-feature Objective: cause to add a new feature or support
Milestone

Comments

@leejw51crypto
Copy link
Contributor

leejw51crypto commented Jun 10, 2021

currently, we can generate keys like this, default algo is secp256k1

hermes keys restore ethermint-2  -m "my mnemocnis.." -t 60

that's different from ethermint's one.

ethermintd keys add $KEY --keyring-backend test --algo "eth_secp256k1"

so we can add like this

hermes keys restore ethermint-2  -m "my mnemocnis.." -t 60 --algo "eth_secp256k1"

so user can freely designate 20 payload address representaion algorithm.

for example

secp256k1:   pubkey->sha256->last 20 bytes
eth_secp256k1: pubkey->sha256->ripemd160->20 bytes

also we can support other cosmos network which uses different address logic.

@adizere
Copy link
Member

adizere commented Aug 3, 2021

This seems related to #1155.

@leejw51crypto we plan to get to this by end of October. Please let us know if that timeline is OK, or if you have more specific time constraints in mind.

@adizere adizere added this to the 10.2021 milestone Aug 3, 2021
@adizere adizere added I: CLI Internal: related to the relayer's CLI I: dependencies Internal: related to dependencies O: new-feature Objective: cause to add a new feature or support labels Aug 3, 2021
@xlab
Copy link

xlab commented Aug 9, 2021

We at InjectiveLabs also run Ethermint-compatible chain, implemented full support for the eth_secp256k1 keys here
InjectiveLabs@28e7c65

@devashishdxt
Copy link

@xlab How do you handle 2nd point in #1267?

@xlab
Copy link

xlab commented Aug 9, 2021

@devashishdxt I just got up to the 2nd point. Debugging to see what's wrong there on the ibc-rs side.

tomtau added a commit to tomtau/ibc-rs that referenced this issue Aug 17, 2021
)

- collected changes from informalsystems#1267 (comment)
- EthAccount definition was directly pasted into the proto library
(as different chains the same proto definition, but under a different package path)
- added a new configuration option that allows specifying the address derivation
as well as the proto type of public keys
(e.g. "/injective.crypto.v1beta1.ethsecp256k1.PubKey"
or "/ethermint.crypto.v1alpha1.ethsecp256k1.PubKey")
@tomtau tomtau mentioned this issue Aug 17, 2021
5 tasks
tomtau added a commit to tomtau/ibc-rs that referenced this issue Aug 17, 2021
)

- collected changes from informalsystems#1267 (comment)
- EthAccount definition was directly pasted into the proto library
(as different chains the same proto definition, but under a different package path)
- added a new configuration option that allows specifying the address derivation
as well as the proto type of public keys
(e.g. "/injective.crypto.v1beta1.ethsecp256k1.PubKey"
or "/ethermint.crypto.v1alpha1.ethsecp256k1.PubKey")
@adizere adizere linked a pull request Aug 17, 2021 that will close this issue
5 tasks
tomtau added a commit to tomtau/ibc-rs that referenced this issue Aug 23, 2021
)

- collected changes from informalsystems#1267 (comment)
- EthAccount definition was directly pasted into the proto library
(as different chains the same proto definition, but under a different package path)
- added a new configuration option that allows specifying the address derivation
as well as the proto type of public keys
(e.g. "/injective.crypto.v1beta1.ethsecp256k1.PubKey"
or "/ethermint.crypto.v1alpha1.ethsecp256k1.PubKey")
@adizere adizere modified the milestones: 10.2021, 09.2021 Sep 9, 2021
adizere pushed a commit that referenced this issue Sep 10, 2021
* added Ethermint support (fixes #1267 #1071)

- collected changes from #1267 (comment)
- EthAccount definition was directly pasted into the proto library
(as different chains the same proto definition, but under a different package path)
- added a new configuration option that allows specifying the address derivation
as well as the proto type of public keys
(e.g. "/injective.crypto.v1beta1.ethsecp256k1.PubKey"
or "/ethermint.crypto.v1alpha1.ethsecp256k1.PubKey")

* added a comment for eth address and change query_account return type back to BaseAccount

* check the public key type in ethermint address generation

* added a check on `sign_msg`

* added comments + reordered example config

* added links with information for testing Ethermint

* adjusted a comment for `EthAccount`

Co-authored-by: Romain Ruetschi <romain@informal.systems>
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this issue Sep 13, 2022
* added Ethermint support (fixes informalsystems#1267 informalsystems#1071)

- collected changes from informalsystems#1267 (comment)
- EthAccount definition was directly pasted into the proto library
(as different chains the same proto definition, but under a different package path)
- added a new configuration option that allows specifying the address derivation
as well as the proto type of public keys
(e.g. "/injective.crypto.v1beta1.ethsecp256k1.PubKey"
or "/ethermint.crypto.v1alpha1.ethsecp256k1.PubKey")

* added a comment for eth address and change query_account return type back to BaseAccount

* check the public key type in ethermint address generation

* added a check on `sign_msg`

* added comments + reordered example config

* added links with information for testing Ethermint

* adjusted a comment for `EthAccount`

Co-authored-by: Romain Ruetschi <romain@informal.systems>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: CLI Internal: related to the relayer's CLI I: dependencies Internal: related to dependencies O: new-feature Objective: cause to add a new feature or support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants