Conversation
All previously identified issues have been resolved. No new issues found.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
There was a problem hiding this comment.
Pull request overview
This PR introduces a multi-chain-aware keyring that can handle both standard Cosmos secp256k1 and Injective-style ethsecp256k1 keys, and adds an ICA example that verifies app-level signatures (including ADR-36) along with the necessary crypto implementation and dependencies.
Changes:
- Added
NewMultiChainKeyringto create a Cosmos keyring with a codec that knows both standard secp256k1 and Injective ethsecp256k1 key types, with basic~expansion for the keyring directory. - Implemented an
ethsecp256k1key type (PrivKey/PubKey) wired to Injective’s proto type URLs, using go-ethereum crypto for signing, verification, and address derivation, plus associated go-ethereum dependencies. - Extended ICA examples:
ica-request-txnow uses the multi-chain keyring and supports a--keyring-typeflag, and a newica-request-verifyexample builds the same ICS-27 payload while additionally verifying app-level and ADR-36 signatures; the Makefile is updated to build the new example.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
pkg/crypto/multichain_keyring.go |
Introduces NewMultiChainKeyring, constructing a proto codec that registers both Cosmos secp256k1 and Injective ethsecp256k1 key implementations and wiring it into a Cosmos keyring instance with basic ~/ path expansion. |
pkg/crypto/ethsecp256k1/ethsecp256k1.go |
Adds an ethsecp256k1 PrivKey/PubKey implementation using go-ethereum’s crypto package, including proto integration and an interface registration helper, but with issues in the Equals/Sign/Verify methods and lacking tests. |
go.mod |
Adds github.com/ethereum/go-ethereum (direct) and github.com/holiman/uint256 (indirect) to support the new ethsecp256k1 implementation. |
examples/ica-request-verify/main.go |
New example that mirrors ica-request-tx but additionally decodes Cascade metadata, parses and coerces signatures, and verifies both direct and ADR-36-style app signatures, with a small logic bug in the ADR-36 verification branch. |
examples/ica-request-tx/main.go |
Switches from NewKeyring to NewMultiChainKeyring and adds a --keyring-type flag to choose app name (lumera vs injectived) for multi-chain keyring usage. |
Makefile |
Extends the EXAMPLES list to include the new ica-request-verify example so it’s built by make examples. |
…ify in 'modified' inj keyring
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.