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

V9 #468

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft

V9 #468

wants to merge 20 commits into from

Conversation

johnletey
Copy link
Member

@johnletey johnletey commented Feb 4, 2025

This PR brings the v9 work into main 🥳

IMPORTANT: It should be rebased and not squashed so that the commit history is kept from the development branch!

@johnletey johnletey self-assigned this Feb 4, 2025
Copy link

coderabbitai bot commented Feb 4, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This pull request introduces a series of updates across multiple areas of the codebase. Enhancements include improved ICA channel communication, dependency upgrades, and several new modules (Wormhole, Dollar, Swap) with associated keeper integrations. The changes also update module/version paths to v9, simplify Makefile file searching, and adjust license headers throughout. Additionally, upgrade handler functionality is enhanced with new configuration functions and the genesis script is modified to include wormhole-related settings.

Changes

File(s) Change Summary
.changelog/unreleased/bug-fixes/432-fix-ica.md Enhanced ICA channel communication between ICA Controller and ICA Host modules.
.changelog/unreleased/dependencies/455-bump-ftf.md, .changelog/unreleased/dependencies/464-autocli-maps.md Updated dependencies: removed limit check in FiatTokenFactory and enabled map returns in AutoCLI queries.
.changelog/unreleased/features/444-integrate-wormhole.md, .changelog/unreleased/features/448-integrate-dollar.md, .changelog/unreleased/features/449-integrate-swap.md Introduced custom modules for Wormhole messaging, Dollar stablecoin issuance, and token Swap functionality.
.changelog/unreleased/improvements/443-module-path.md Updated module path to align with the v9 release line.
Makefile Simplified file search command in the FILES variable to include all Go files without exclusions.
app.go, legacy.go, upgrade/constants.go, upgrade/store.go, upgrade/upgrade.go Updated application structure for v9 with new module keepers (Dollar, Swap, Wormhole), integrated Wormhole in legacy routing, and enhanced the upgrade handler with new configuration functions.
ante.go, cmd/commands.go, cmd/init.go, cmd/nobled/main.go, cmd/root.go, tools.go, export.go Updated licensing headers (Apache-2.0, 2025) and dependency versions from v8 to v9; no logic changes.
Various E2E tests (e.g., e2e/cctp_deposit_for_burn_test.go, e2e/cctp_receive_message_test.go, etc.) Updated license headers to Apache-2.0 (2025) with no functional changes.
e2e/cctp_replace_deposit_for_burn_test.go Added new transaction fields (NewMintRecipient, NewDestinationCaller) and corrected a require assertion (from require.Zerof to require.Zero).
local.sh Added commands for genesis account creation and wormhole-related configurations in the genesis file.

Sequence Diagram(s)

sequenceDiagram
    participant UH as UpgradeHandler
    participant App as Application
    participant WM as WormholeModule
    participant DM as DollarModule

    UH->>App: Trigger upgrade migration
    App->>WM: ConfigureWormholeModule(ctx, wormholeKeeper)
    WM-->>App: Return configuration status
    App->>DM: ConfigureDollarModule(ctx, dollarKeeper)
    DM-->>App: Return configuration status
    App->>UH: Complete upgrade process
Loading

Possibly related PRs

Suggested reviewers

  • g-luca

Poem

Oh, how I hop with glee,
New modules burst forth elegantly!
Wormholes, Dollars, Swaps in stride,
Upgrades and bugs now set aside.
Code leaps forward—happy and bright,
A bunny’s tune in code’s delight!
🐇🌟


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>, please review it.
    • 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 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 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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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. (Beta)
  • @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.

@johnletey
Copy link
Member Author

@coderabbitai review

Copy link

coderabbitai bot commented Feb 4, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@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: 0

🧹 Nitpick comments (2)
upgrade/constants.go (1)

20-33: Upgrade naming and ASCII
Renaming to "argentum" and introducing the ASCII art fosters a distinctive upgrade identity. If you plan to expand the art, consider organizing it in a separate file or resource.

local.sh (1)

20-21: New Genesis Account Addition for USDC
The addition of the genesis account for noble1cyyzpxplxdzkeea7kwsydadg87357qnah9s9cv with a balance of 1000000uusdc is clear and appears to be part of the enhanced module integrations. Ensure that this account and the provided balance are correctly aligned with the intended setup for the Wormhole module or any related financial configuration. A brief inline comment explaining the purpose of this account might help future 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 bd42ebf and 5584437.

⛔ Files ignored due to path filters (8)
  • .github/license.yml is excluded by !**/*.yml
  • .github/workflows/docker-publish.yaml is excluded by !**/*.yaml
  • .github/workflows/draft-release.yaml is excluded by !**/*.yaml
  • app.yaml is excluded by !**/*.yaml
  • e2e/go.mod is excluded by !**/*.mod
  • e2e/go.sum is excluded by !**/*.sum, !**/*.sum
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum, !**/*.sum
📒 Files selected for processing (34)
  • .changelog/unreleased/bug-fixes/432-fix-ica.md (1 hunks)
  • .changelog/unreleased/dependencies/455-bump-ftf.md (1 hunks)
  • .changelog/unreleased/dependencies/464-autocli-maps.md (1 hunks)
  • .changelog/unreleased/features/444-integrate-wormhole.md (1 hunks)
  • .changelog/unreleased/features/448-integrate-dollar.md (1 hunks)
  • .changelog/unreleased/features/449-integrate-swap.md (1 hunks)
  • .changelog/unreleased/improvements/443-module-path.md (1 hunks)
  • Makefile (1 hunks)
  • ante.go (1 hunks)
  • app.go (7 hunks)
  • cmd/commands.go (2 hunks)
  • cmd/init.go (2 hunks)
  • cmd/nobled/main.go (2 hunks)
  • cmd/root.go (1 hunks)
  • e2e/cctp_deposit_for_burn_test.go (1 hunks)
  • e2e/cctp_deposit_for_burn_with_caller_test.go (1 hunks)
  • e2e/cctp_receive_message_test.go (1 hunks)
  • e2e/cctp_receive_message_with_caller_test.go (1 hunks)
  • e2e/cctp_replace_deposit_for_burn_test.go (1 hunks)
  • e2e/cctp_roles_test.go (1 hunks)
  • e2e/conformance_test.go (1 hunks)
  • e2e/fiat_tf_test.go (1 hunks)
  • e2e/ibc_utils.go (1 hunks)
  • e2e/module_check_test.go (1 hunks)
  • e2e/upgrade_test.go (4 hunks)
  • e2e/upgrade_utils.go (1 hunks)
  • e2e/utils.go (1 hunks)
  • export.go (1 hunks)
  • legacy.go (3 hunks)
  • local.sh (2 hunks)
  • tools.go (1 hunks)
  • upgrade/constants.go (2 hunks)
  • upgrade/store.go (2 hunks)
  • upgrade/upgrade.go (4 hunks)
✅ Files skipped from review due to trivial changes (20)
  • .changelog/unreleased/dependencies/455-bump-ftf.md
  • .changelog/unreleased/improvements/443-module-path.md
  • ante.go
  • e2e/cctp_deposit_for_burn_with_caller_test.go
  • e2e/conformance_test.go
  • tools.go
  • e2e/ibc_utils.go
  • e2e/cctp_roles_test.go
  • e2e/cctp_receive_message_test.go
  • e2e/module_check_test.go
  • cmd/commands.go
  • e2e/utils.go
  • cmd/root.go
  • e2e/cctp_receive_message_with_caller_test.go
  • e2e/upgrade_utils.go
  • export.go
  • e2e/cctp_deposit_for_burn_test.go
  • cmd/nobled/main.go
  • cmd/init.go
  • e2e/fiat_tf_test.go
⏰ Context from checks skipped due to timeout of 90000ms (33)
  • GitHub Check: test (TestChainUpgrade)
  • GitHub Check: test (TestRestrictedModules)
  • GitHub Check: test (TestFiatTFIBCIn)
  • GitHub Check: test (TestFiatTFIBCOut)
  • GitHub Check: test (TestFiatTFBankSend)
  • GitHub Check: test (TestFiatTFAuthzSend)
  • GitHub Check: test (TestFiatTFAuthzGrant)
  • GitHub Check: test (TestFiatTFAuth)
  • GitHub Check: test (TestFiatTFBurn)
  • GitHub Check: test (TestFiatTFMint)
  • GitHub Check: test (TestFiatTFUnblacklist)
  • GitHub Check: test (TestFiatTFBlacklist)
  • GitHub Check: test (TestFiatTFUpdateBlacklister)
  • GitHub Check: test (TestFiatTFUnpause)
  • GitHub Check: test (TestFiatTFPause)
  • GitHub Check: test (TestFiatTFUpdatePauser)
  • GitHub Check: test (TestFiatTFRemoveMinter)
  • GitHub Check: test (TestFiatTFConfigureMinter)
  • GitHub Check: test (TestFiatTFRemoveMinterController)
  • GitHub Check: test (TestFiatTFConfigureMinterController)
  • GitHub Check: test (TestFiatTFUpdateMasterMinter)
  • GitHub Check: test (TestFiatTFAcceptOwner)
  • GitHub Check: test (TestFiatTFUpdateOwner)
  • GitHub Check: test (TestConformance)
  • GitHub Check: test (TestCCTP_UpdateTokenController)
  • GitHub Check: test (TestCCTP_UpdatePauser)
  • GitHub Check: test (TestCCTP_UpdateAttesterManager)
  • GitHub Check: test (TestCCTP_UpdateOwner)
  • GitHub Check: test (TestCCTP_ReplaceDepositForBurn)
  • GitHub Check: test (TestCCTP_ReceiveMessageWithCaller)
  • GitHub Check: test (TestCCTP_ReceiveMessage)
  • GitHub Check: test (TestCCTP_DepositForBurnWithCaller)
  • GitHub Check: test (TestCCTP_DepositForBurn)
🔇 Additional comments (29)
upgrade/upgrade.go (8)

1-3: SPDX license header adoption
The updated license header and year reflect best practices for open licensing and compliance.


21-21: New imports
These imports (e.g., fmt, cosmossdk.io/errors, cosmossdk.io/log, go-ethereum/common, wormhole, and dollar modules) appear purpose-driven and are used effectively in the subsequent module configuration logic.

Also applies to: 23-24, 28-28, 35-36, 38-39


45-45: Expanded function signature
Introducing logger, dollarKeeper, and wormholeKeeper into CreateUpgradeHandler aligns with your new module configuration calls and ensures clear parameter usage.

Also applies to: 47-48


60-63: Wormhole module configuration call
Delegating initialization to ConfigureWormholeModule neatly encapsulates your testnet vs. mainnet logic, making the upgrade process more modular.


64-67: Dollar module configuration call
Similarly, routing Dollar module installation to ConfigureDollarModule helps keep the upgrade logic self-contained and maintainable.


68-69: Informative logging
Adding succinct, celebratory logs can enrich operator experience and provide clear confirmation of a successful upgrade.


102-135: ConfigureWormholeModule function
• Branching on chain ID to set wormhole configuration is well-structured.
• For Testnet, referencing established addresses is good; consider using config or environment variables if these might change.
• The placeholder for Mainnet is clear, but remember to finalize it before release.

Would you like a script to search the codebase and ensure no other wormhole config references are missed?


136-162: ConfigureDollarModule function
• Similar approach for chain ID branching and error handling.
• Keep in mind to fill in the Mainnet case soon.
• Validating addresses via environment config or external references can help prevent misconfigurations.

upgrade/store.go (3)

1-3: License header
The new year and SPDX updates look consistent.


24-26: Additional module imports
Bringing in dollartypes, wormholetypes, and swaptypes supports your new upgrade paths and is consistent with changes elsewhere.


30-37: Store upgrade entries
Listing Dollar, Swap, and Wormhole modules in storeUpgrades ensures stores are properly initialized at upgrade. Verify that their store keys don’t conflict with existing modules.

upgrade/constants.go (2)

1-3: SPDX license header
Maintaining accurate licensing information is important; these changes are correct.


34-38: Chain ID constants
Defining TestnetChainID and MainnetChainID centralizes environment checks and prevents accidental typos or mismatches.

e2e/upgrade_test.go (3)

42-42: LGTM: Version update for upgrade image.

The upgrade image version has been updated from v8.0.0 to v8.0.5.


52-52: LGTM: Fixed typo in comment.

Corrected "inital" to "initial" in the comment.


99-99: LGTM: Improved upgrade naming.

Changed upgrade name from version-based "v8.1" to semantic name "argentum", which is more meaningful and follows better naming conventions.

legacy.go (2)

45-46: LGTM: Clean IBC router configuration.

The IBC router configuration is properly structured with clear route definitions.

Also applies to: 136-137


142-143: LGTM: Proper Wormhole keeper setup.

The Wormhole keeper is correctly configured with necessary IBC keepers and scoped keeper.

e2e/cctp_replace_deposit_for_burn_test.go (1)

198-198: Fixed error check function name.

Changed from require.Zerof to require.Zero for consistency.

app.go (3)

44-45: LGTM: Clean module imports.

New modules (Dollar, Wormhole, Swap) are properly imported.

Also applies to: 61-63


157-161: LGTM: Proper keeper integration.

New keepers (Dollar, Swap, Wormhole) are correctly added to the App struct.


321-324: LGTM: Updated upgrade handler.

The upgrade handler is properly configured with new keepers (Dollar, Wormhole).

.changelog/unreleased/dependencies/464-autocli-maps.md (1)

1-2: Clear Documentation for Dependency Update.
The changelog entry clearly documents the bump of cosmossdk.io/client/v2 to support returning maps inside AutoCLI queries ([#464]). The message is concise and informative.

.changelog/unreleased/features/449-integrate-swap.md (1)

1-2: Clear Documentation for Swap Module Integration.
This entry concisely notes the integration of the custom Swap module for token exchange with the appropriate PR reference ([#449]). The information is clear and follows the established format.

.changelog/unreleased/features/444-integrate-wormhole.md (1)

1-2: Clear Documentation for Wormhole Module Integration.
The changelog entry effectively details the integration of the custom Wormhole module for enabling IBC messaging, with proper referencing to PR ([#444]). The note is clear and consistent with our documentation style.

.changelog/unreleased/features/448-integrate-dollar.md (1)

1-2: Clear Documentation for Dollar Module Integration.
This changelog entry clearly documents the integration of the custom Dollar module for issuing Noble's stablecoin $USDN along with the related PR reference ([#448]). The entry is straightforward and well formatted.

.changelog/unreleased/bug-fixes/432-fix-ica.md (1)

1-2: Clear Documentation for ICA Channels Bug-Fix.
The entry clearly communicates the update to the ICA channel capabilities from the ICA Controller module back to the ICA Host module, referencing PR ([#432]). The description is succinct and effective.

Makefile (1)

67-67: Review of FILES variable assignment update
The new assignment FILES := $(shell find . -name "*.go") now collects all Go files recursively, without filtering out generated files (e.g. *.pb.go, *.pb.gw.go, *.pulsar.go). This broader scope might inadvertently include files that are not meant for license checks or linting, so please verify that this behavior is intentional and will not introduce false positives in downstream tooling.

local.sh (1)

30-33: Wormhole Module Genesis Configuration Update
The new jq commands updating the genesis configuration to set the wormhole parameters (chain_id, gov_chain, gov_address, and guardian_sets) are correctly added. Please verify that the hardcoded values (e.g., chain id 4009, gov chain 1, and the specific gov_address and guardian set values) are as intended for your deployment environment. If these values may change based on different deployment scenarios, consider parameterizing them or at least adding clarifying comments for maintainability.

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.

5 participants