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

feat(ica): ICA Host / Controller integration #1820

Merged
merged 13 commits into from
Apr 23, 2024

Conversation

Segfaultd
Copy link
Contributor

@Segfaultd Segfaultd commented Mar 12, 2024

Purpose / Abstract

This PR introduces the ICA integration to the Nibiru Chain.

  • ICA Host allows for remote operations to be triggered on Nibiru side. I've defined an arbitrary set of allowed message URLs, but feel free to add more, or put a wildcard there to allow for everything.
  • ICA Controller allows to trigger actions locally on a remote ICAHost enabled chain. It's unused for now, but present.
  • I've added an arbitrary upgrade handler just so we don't forget to run ICA-specific upgrade code (especially adding new store keys) but feel free to target another version.
  • Last, i've added a make format command to your makefile to clean up the code following Golang principles.

Tests

Unit tests are running fine, but the upgrade must be tested properly by trying to execute ICA operations on Nibiru testnet.

Summary by CodeRabbit

  • New Features

    • Integrated support for interchain accounts, enhancing cross-chain interactions.
    • Added upgrade paths for the application to ensure seamless transitions between versions.
  • Refactor

    • Improved code formatting and import ordering to enhance code maintainability and readability.
  • Chores

    • Updated application configurations and module initializations to support new functionalities.

Copy link
Contributor

coderabbitai bot commented Mar 12, 2024

Walkthrough

The updates encompass integrating the interchain accounts module into a blockchain application framework. Notable improvements include adding keepers and store keys for interchain accounts, updating the IBC router for new routes, and preparing for upgrades related to interchain accounts. Additionally, a new formatting target in the build process enhances code consistency.

Changes

Files Changes
app/keepers.go Integrated interchain accounts with new imports, keepers, store keys, stack updates, and router configurations.
app/upgrades.go & .../upgrades/v1_3_0 Added upgrade logic for new versions, focusing on initializing and configuring interchain accounts.
contrib/make/format.mk Introduced a format target for code styling and import ordering.

🐇✨
In the land of code, where logic threads weave,
A rabbit hopped in, new features to conceive.
With a leap and a bound, keepers in place,
Routes set, and upgrades face to face.
Oh, how the modules dance and twine,
In this digital burrow of mine!
🌟🐾


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between b5cbc17 and 877dc36.
Files selected for processing (1)
  • CHANGELOG.md (1 hunks)
Additional comments not posted (1)
CHANGELOG.md (1)

60-60: Ensure the changelog entry for PR #1820 is categorized correctly.

Please verify if the entry for PR #1820 should be under "State Machine Breaking" or another more appropriate category based on the nature of the changes introduced.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

@k-yang k-yang requested a review from jgimeno March 20, 2024 07:08
@jgimeno
Copy link
Contributor

jgimeno commented Mar 21, 2024

Looks good also clean.

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.65%. Comparing base (c557272) to head (a348bac).
Report is 33 commits behind head on main.

❗ Current head a348bac differs from pull request most recent head 877dc36. Consider uploading reports for the commit 877dc36 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1820      +/-   ##
==========================================
- Coverage   73.07%   69.65%   -3.43%     
==========================================
  Files         196      199       +3     
  Lines       15564    11987    -3577     
==========================================
- Hits        11374     8350    -3024     
+ Misses       3526     3090     -436     
+ Partials      664      547     -117     
Files Coverage Δ
app/keepers.go 99.14% <100.00%> (-0.05%) ⬇️
app/upgrades.go 60.00% <ø> (+4.44%) ⬆️

... and 191 files with indirect coverage changes

@Segfaultd Segfaultd marked this pull request as ready for review April 10, 2024 08:15
@Segfaultd Segfaultd requested a review from a team as a code owner April 10, 2024 08:15
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

app/upgrades.go Outdated Show resolved Hide resolved
@k-yang k-yang changed the title ICA Host / Controller integration feat(ica): ICA Host / Controller integration Apr 17, 2024
app/upgrades.go Outdated Show resolved Hide resolved
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

app/upgrades/v1_3_0/constants.go Show resolved Hide resolved
@k-yang k-yang enabled auto-merge (squash) April 23, 2024 18:39
@k-yang k-yang merged commit c60c806 into NibiruChain:main Apr 23, 2024
12 checks passed
@Segfaultd Segfaultd deleted the ica-integration branch April 23, 2024 18:44
k-yang added a commit that referenced this pull request Apr 23, 2024
* ICA Host / Controller integration. Added upgrade constants. Added make format command

* Fixed required message URLs

* Code import fix

* Fixed upgrade name

* Fixed upgrade target

* Changed version number

* Update CHANGELOG.md

---------

Co-authored-by: Jonathan Gimeno <jgimeno@gmail.com>
Co-authored-by: Kevin Yang <5478483+k-yang@users.noreply.github.com>
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.

None yet

3 participants