Skip to content

Conversation

@JayT106
Copy link
Contributor

@JayT106 JayT106 commented May 17, 2025

Integrated ibc-go v10.1.1
For the integration tests, using hermes relayer 1.13.1 instead of the customized ibc-go-relayer. So the relayer precompiled contract and the ica precompiled contract will not working with the hermes relayer.

ref #1731

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

Summary by CodeRabbit

  • New Features
    • Support for IBC-Go v10 with updated protobufs and new IBC v2 protocol features.
    • Enhanced token handling in EVM contracts and events supporting denomination traces and multiple tokens per packet.
    • Added Cosmos token structures in Solidity and Go contract bindings.
  • Breaking Changes
    • Removal of IBC fee module (ICS29) and incentivized transfer features.
    • Channel upgrade functionality and related queries/transactions removed.
    • Major API changes in IBC transfer, channel, and client modules with renamed or removed protobuf messages and services.
    • Incentivized transfer and fee-related IBC tests are now skipped or disabled.
  • Improvements
    • Relayer event logs now use structured tokens for better traceability.
    • Dependency upgrades including Go 1.23 and updated Hermes relayer binary.
    • Middleware and keeper code updated to use new IBC runtime KVStoreService and simplified denom handling.
    • IBC callbacks and middleware now accept channel version parameters for improved packet processing.
    • Updated ICA registration and IBC transfer version handling for improved compatibility.
  • Bug Fixes
    • Fixed denom trace handling and event decoding in IBC transfers.
    • Corrected denom trace queries to query the correct chain in integration tests.
  • Chores
    • Updated build and Nix configurations, including Go and Hermes package updates.
    • Removed deprecated code, tests, protobuf files, and fee-related logic.
    • Cleaned up precompile relayer code by removing fee module dependencies.
    • Removed legacy upgrade handlers and streamlined upgrade plan to v1.5.
  • Documentation
    • Updated changelog with state machine breaking changes due to IBC-Go v10 upgrade.

@JayT106 JayT106 self-assigned this May 17, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 17, 2025

"""

Walkthrough

This change upgrades the IBC-Go dependency from v8 to v10, removes the IBC fee and capability modules, and adapts the codebase to the new IBC-Go APIs. It updates protobuf definitions, removes related fee logic, adjusts middleware and relayer contracts, and revises integration tests and configuration for compatibility with the upgraded IBC protocol.

Changes

File(s) / Group Change Summary
app/app.go, app/sim_test.go, app/upgrades.go, app/upgrades_test.go, app/versiondb.go, app/versiondb_placeholder.go Remove IBC fee/capability modules, memory store keys, and related logic; update to IBC-Go v10; update upgrade handler logic; remove expedited governance param upgrade code and tests.
cmd/cronosd/cmd/versiondb.go, versiondb/client/restore_app_db.go, versiondb/client/verify.go, versiondb/go.mod Remove capability module references and memory store key handling from versiondb logic.
default.nix, flake.nix, nix/build_overlay.nix, nix/default.nix, nix/hermes.nix, nix/sources.json, gomod2nix.toml Update package versions, overlays, and sources for Go 1.23.10, Hermes, and other dependencies; switch Hermes to prebuilt binary and update source repo.
go.mod, proto/buf.yaml, third_party/proto/buf.yaml Upgrade Go module and dependency versions, including Cosmos SDK and IBC-Go v10.
integration_tests/configs/ibc_timeout.jsonnet, integration_tests/configs/ibc_timeout_hermes.jsonnet, integration_tests/configs/upgrade-test-package.nix Update IBC test configs for feegrants and upgrade plan naming.
integration_tests/cosmoscli.py, integration_tests/ibc_utils.py, integration_tests/test_ibc.py, integration_tests/test_ibc_rly.py, integration_tests/test_ibc_rly_gas.py, integration_tests/test_ibc_timeout.py, integration_tests/test_ibc_update_client.py, integration_tests/test_ica.py, integration_tests/test_ica_incentivized.py, integration_tests/test_ica_precompile.py, integration_tests/test_upgrade.py Update integration tests for IBC-Go v10, Hermes relayer, fee module removal, and protocol changes; skip or adjust unsupported tests.
proto/cronos/query.proto, proto/cronos/tx.proto, proto/e2ee/genesis.proto, proto/e2ee/query.proto, proto/e2ee/tx.proto, proto/memiavl/changeset.proto, proto/memiavl/wal.proto Minor formatting and whitespace changes in protobuf files.
third_party/proto/ethermint/evm/v1/query.proto, third_party/proto/ethermint/evm/v1/tx.proto Add/rename fields for EVM txs (add raw, deprecate hash).
third_party/proto/ibc/applications/fee/v1/ack.proto, third_party/proto/ibc/applications/fee/v1/fee.proto, third_party/proto/ibc/applications/fee/v1/genesis.proto, third_party/proto/ibc/applications/fee/v1/metadata.proto, third_party/proto/ibc/applications/fee/v1/query.proto, third_party/proto/ibc/applications/fee/v1/tx.proto Remove all ICS29 IBC fee module protobuf definitions.
third_party/proto/ibc/applications/interchain_accounts/... (multiple files) Update go_package options to v10.
third_party/proto/ibc/applications/transfer/v1/... (multiple files) Redesign denom tracing: add token.proto, update queries, remove DenomTrace, introduce Denom/Token/Hop messages, update service methods.
third_party/proto/ibc/core/channel/v1/..., third_party/proto/ibc/core/channel/v2/... Remove channel upgrade proto definitions and related fields; add v2 channel proto files for new packet/message/query types.
third_party/proto/ibc/core/client/v1/..., third_party/proto/ibc/core/client/v2/... Remove deprecated client upgrade proposals, add v2 client proto files for counterparty/config, update queries and messages.
third_party/proto/ibc/core/commitment/v1/commitment.proto, third_party/proto/ibc/core/commitment/v2/commitment.proto Remove v1 MerklePath, add v2 MerklePath with bytes key path.
third_party/proto/ibc/lightclients/localhost/v2/localhost.proto Remove localhost v2 client proto.
x/cronos/client/cli/tx.go, x/cronos/keeper/keeper.go, x/cronos/keeper/precompiles/relayer.go, x/cronos/middleware/conversion_middleware.go, x/cronos/types/interfaces.go Remove IBC fee logic, update interfaces and keeper/middleware for IBC-Go v10, update denom/trace handling and method signatures.
x/cronos/events/bindings/cosmos/lib/cosmos_types.abigen.go, x/cronos/events/bindings/cosmos/precompile/relayer/i_relayer_module.abigen.go, x/cronos/events/bindings/src/CosmosTypes.sol, x/cronos/events/bindings/src/Relayer.sol, x/cronos/events/decoders.go Update EVM/Cosmos event bindings and Solidity contracts for new denom/token structure, remove fee and denom trace event logic.

Sequence Diagram(s)

sequenceDiagram
    participant App
    participant IBC-Go v10
    participant RelayerContract
    participant Middleware
    participant Keeper

    App->>IBC-Go v10: Initialize IBC modules (no fee/capability modules)
    App->>Middleware: Set up conversion middleware (v10 API)
    RelayerContract->>IBC-Go v10: Relay IBC packets (no fee registration)
    Middleware->>Keeper: Handle OnRecvPacket/OnAcknowledgement/OnTimeout (with new version param)
    Keeper->>Middleware: Process packet, convert tokens (new denom/trace structure)
    Middleware->>IBC-Go v10: Return ack/errors as needed
Loading

Possibly related PRs

  • crypto-org-chain/cronos#1665: Adds support for registering payees/counterparty payees in the relayer precompile; this PR removes that logic, making them directly related but with opposite effects.
  • crypto-org-chain/cronos#1623: Adds expedited governance parameter upgrade logic and tests, which this PR removes, making them directly related and opposite in scope.
  • crypto-org-chain/cronos#1519: Upgrades ibc-go and removes obsolete modules; related in scope but modifies different modules and logic.

Suggested labels

ci

Suggested reviewers

  • leejw51crypto
  • mmsqe

Poem

Upgrading the chain, we leap and we bound,
Old fee and mem keys are nowhere to be found.
Hops and denoms now neatly in place,
IBC v10 sets a brisker pace!
Solidity and Go, in harmony sing,
As rabbits rejoice in the changes we bring.
🐇✨
"""


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@JayT106 JayT106 requested review from mmsqe, thomas-nguy and yihuang May 17, 2025 02:05
@socket-security
Copy link

socket-security bot commented May 17, 2025

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@codecov
Copy link

codecov bot commented May 17, 2025

Codecov Report

Attention: Patch coverage is 12.09677% with 109 lines in your changes missing coverage. Please review.

Project coverage is 35.78%. Comparing base (a3c2f70) to head (3fd313f).
Report is 89 commits behind head on main.

Files with missing lines Patch % Lines
x/cronos/middleware/conversion_middleware.go 0.00% 50 Missing ⚠️
x/cronos/events/decoders.go 0.00% 35 Missing ⚠️
.../events/bindings/cosmos/lib/cosmos_types.abigen.go 0.00% 12 Missing ⚠️
x/cronos/keeper/precompiles/utils.go 0.00% 5 Missing ⚠️
x/cronos/keeper/precompiles/relayer.go 25.00% 3 Missing ⚠️
app/upgrades.go 50.00% 1 Missing ⚠️
versiondb/client/verify.go 0.00% 1 Missing ⚠️
x/cronos/keeper/keeper.go 0.00% 1 Missing ⚠️
x/cronos/keeper/mock/ibckeeper_mock.go 91.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1804       +/-   ##
===========================================
+ Coverage   16.87%   35.78%   +18.91%     
===========================================
  Files          72      127       +55     
  Lines        6163    11811     +5648     
===========================================
+ Hits         1040     4227     +3187     
- Misses       5000     7161     +2161     
- Partials      123      423      +300     
Files with missing lines Coverage Δ
app/versiondb.go 82.35% <ø> (-1.44%) ⬇️
app/versiondb_placeholder.go 0.00% <ø> (ø)
versiondb/client/restore_app_db.go 0.00% <ø> (ø)
x/cronos/client/cli/tx.go 39.26% <ø> (+0.39%) ⬆️
...smos/precompile/relayer/i_relayer_module.abigen.go 0.00% <ø> (ø)
x/cronos/events/events.go 23.07% <ø> (ø)
x/cronos/keeper/ibc.go 80.43% <ø> (+80.43%) ⬆️
x/cronos/keeper/params.go 73.52% <100.00%> (+73.52%) ⬆️
x/cronos/keeper/precompiles/ica.go 14.55% <ø> (+6.96%) ⬆️
app/upgrades.go 31.25% <50.00%> (+25.91%) ⬆️
... and 8 more

... and 61 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JayT106 JayT106 force-pushed the jt/ibc-go-v10 branch 2 times, most recently from cd8f46a to ea1599d Compare May 24, 2025 02:28
@JayT106 JayT106 force-pushed the jt/ibc-go-v10 branch 2 times, most recently from e2fa02e to 03b2b6e Compare May 27, 2025 15:51
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
integration_tests/ibc_utils.py (1)

217-224: Verify ICA version should be "ics27-1" instead of "ics20-1".

The ICA version is still set to "ics20-1" in the channel_version dictionary. Based on the previous review comment and IBC protocol standards, this should likely be "ics27-1" for ICA (Interchain Accounts) rather than "ics20-1" which is for token transfers.

What is the correct ICA (Interchain Accounts) version string for ibc-go v10? Should it be "ics27-1" or "ics20-1"?
🧹 Nitpick comments (1)
nix/hermes.nix (1)

84-90: Add missing maintainer information.

The meta section has an empty maintainers list. Consider adding appropriate maintainers for this package.

-    maintainers = with maintainers; [ ];
+    maintainers = with maintainers; [ /* add appropriate maintainers */ ];
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb05761 and 47dbe30.

📒 Files selected for processing (3)
  • integration_tests/ibc_utils.py (10 hunks)
  • integration_tests/test_ibc_rly.py (11 hunks)
  • nix/hermes.nix (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • integration_tests/test_ibc_rly.py
⏰ Context from checks skipped due to timeout of 90000ms (18)
  • GitHub Check: integration_tests (ibc_timeout)
  • GitHub Check: integration_tests (ibc_update_client)
  • GitHub Check: integration_tests (ica)
  • GitHub Check: integration_tests (gas)
  • GitHub Check: integration_tests (gov)
  • GitHub Check: integration_tests (upgrade)
  • GitHub Check: integration_tests (ibc)
  • GitHub Check: integration_tests (unmarked)
  • GitHub Check: integration_tests (slow)
  • GitHub Check: integration_tests (ibc_rly_gas)
  • GitHub Check: integration_tests (ibc_rly_evm)
  • GitHub Check: unittest
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (ubuntu-latest)
  • GitHub Check: gomod2nix
  • GitHub Check: Run golangci-lint
  • GitHub Check: Analyze (go)
🔇 Additional comments (8)
nix/hermes.nix (2)

12-35: LGTM: Platform detection and hash handling look correct.

The platform detection logic properly handles Darwin (both x86_64 and aarch64) and Linux architectures. The conditional SHA256 hash selection is appropriate for the multi-platform approach.


63-82: Verify QEMU emulation approach for ARM64 Linux.

The QEMU wrapper approach for ARM64 Linux is interesting - it wraps the x86_64 binary with qemu-x86_64 emulation. While this should work, it may have performance implications.

Consider documenting this approach in the meta description or comments, as it's not immediately obvious why ARM64 Linux uses x86_64 binaries with emulation rather than native ARM64 binaries (if available).

#!/bin/bash
# Check if native ARM64 Linux binaries are available for Hermes v1.13.1
curl -s "https://api.github.com/repos/informalsystems/hermes/releases/tags/v1.13.1" | jq -r '.assets[].name' | grep -i aarch64 || echo "No native ARM64 binaries found"
integration_tests/ibc_utils.py (6)

58-58: LGTM: New parameter for transfer type differentiation.

The is_ibc_transfer parameter addition allows proper differentiation between regular IBC transfers and other channel types, which is essential for correct version handling.


94-100: Correct version format handling for different transfer types.

The conditional logic properly handles the version format based on transfer type - using string format for IBC transfers and JSON format for other types. This aligns with the protocol requirements.


165-173: Good config file remapping logic for Hermes compatibility.

The logic to remap config files when using Hermes relayer (e.g., ibc_rly_evmibc_rly, ibc_timeoutibc_timeout_hermes) ensures proper configuration handling for different relayer types.


215-215: Connection ID is now properly configurable.

The change from hardcoded "connection-0" to os.getenv("CONNECTION_ID", "connection-0") addresses the previous review comment about making the connection ID configurable.


419-419: User count reduction in multi-transfer tests.

The reduction from 100 to 49 users (range(1, 50)) in multi-transfer tests may be intentional for performance reasons or to align with new test requirements.

Could you clarify the reason for reducing the user count in multi-transfer tests? Is this for performance optimization or due to protocol limitations in IBC-Go v10?


459-459: Denom trace query correctly targets chainmain node.

The change to use ibc.chainmain.node_rpc(0) as the RPC endpoint for denom trace queries is correct, ensuring queries are directed to the appropriate chain for trace information.

Also applies to: 564-564

@JayT106 JayT106 mentioned this pull request Jul 2, 2025
13 tasks
@JayT106 JayT106 requested a review from a team July 3, 2025 14:58
@thomas-nguy thomas-nguy requested a review from songgaoye July 4, 2025 01:30
Copy link
Collaborator

@thomas-nguy thomas-nguy left a comment

Choose a reason for hiding this comment

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

first parse looks good

@thomas-nguy thomas-nguy added this pull request to the merge queue Jul 18, 2025
Merged via the queue into crypto-org-chain:main with commit de23491 Jul 18, 2025
42 of 44 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Sep 4, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants