Skip to content

Added multi-chan keyring; added injective keys#10

Merged
a-ok123 merged 3 commits intomainfrom
inj-sig
Jan 30, 2026
Merged

Added multi-chan keyring; added injective keys#10
a-ok123 merged 3 commits intomainfrom
inj-sig

Conversation

@a-ok123
Copy link
Contributor

@a-ok123 a-ok123 commented Jan 29, 2026

No description provided.

@roomote
Copy link

roomote bot commented Jan 29, 2026

Rooviewer Clock   See task on Roo Cloud

All previously identified issues have been resolved. No new issues found.

  • Hash function mismatch in ethsecp256k1: Sign uses SHA256 but VerifySignature uses Keccak256
  • Inverted ADR-36 verification logic in ica-request-verify/main.go
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 NewMultiChainKeyring to 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 ethsecp256k1 key 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-tx now uses the multi-chain keyring and supports a --keyring-type flag, and a new ica-request-verify example 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.

@a-ok123 a-ok123 removed the request for review from akobrin1 January 29, 2026 19:41
roomote[bot]
roomote bot previously approved these changes Jan 29, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

@a-ok123 a-ok123 merged commit 65f624b into main Jan 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments