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

Problem: sdk v50 is not outdated #1614

Merged
merged 3 commits into from
Sep 30, 2024
Merged

Conversation

mmsqe
Copy link
Collaborator

@mmsqe mmsqe commented Sep 30, 2024

for more info

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

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

Release Notes

  • New Features

    • Enhanced performance with adjusted default parallelism for block-stm.
    • Updated ethermint module to improve API call efficiency.
    • Introduced new methods for IBC channel upgrades.
    • Upgraded cosmos-sdk to version v0.50.10.
  • Bug Fixes

    • Resolved address query issues and multisig account encoding failures.
    • Fixed invalid chain ID errors during RPC calls.
  • Improvements

    • Upgraded multiple dependencies for better compatibility and performance.
    • Integrated testground for benchmarking and optimized gas handling.

@mmsqe mmsqe requested a review from a team as a code owner September 30, 2024 02:38
@mmsqe mmsqe requested review from yihuang and leejw51crypto and removed request for a team September 30, 2024 02:38
Copy link
Contributor

coderabbitai bot commented Sep 30, 2024

Walkthrough

The changes encompass various enhancements and bug fixes across multiple modules in the software. Key updates include adjustments to the block-stm parallelism, improvements to the ethermint module, and synchronization of the e2ee module. The cosmos-sdk version has been upgraded to v0.50.10, and new methods for IBC channel upgrades have been introduced. Additionally, the keyring dependency has been removed from the CLI command setup, and several Go module dependencies have been updated to their latest versions.

Changes

Files Change Summary
CHANGELOG.md Updated to reflect improvements and bug fixes, including performance enhancements and version bumps.
cmd/cronosd/cmd/root.go Removed keyring import and associated initialization logic from the command setup.
go.mod Updated various dependency versions and replaced certain dependencies to ensure compatibility.
gomod2nix.toml Updated versions and hashes for several Go modules, reflecting the latest available versions.

Possibly related PRs

Suggested reviewers

  • devashishdxt
  • calvinaco
  • yihuang

Poem

🐇 In the code where bunnies hop,
Changes made, we won't stop!
With upgrades bright and bugs all gone,
Our software dances, sings a song!
From keyrings lost to modules new,
A joyful leap in all we do! 🌟


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 08edb94 and d1e21ab.

📒 Files selected for processing (1)
  • go.mod (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • go.mod

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

@mmsqe mmsqe changed the title Problem: sdk v50 is not used Problem: sdk v50 is not outdated Sep 30, 2024
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: 0

🧹 Outside diff range and nitpick comments (11)
go.mod (1)

257-259: Replace directives are well-managed, consider ongoing maintenance

The replace directives are well-organized and serve several important purposes:

  1. Using specific commits of forked repositories for fine-grained control.
  2. Addressing security vulnerabilities (e.g., replacing github.com/dgrijalva/jwt-go).
  3. Using custom versions of important dependencies like github.com/ethereum/go-ethereum and github.com/evmos/ethermint.

These changes demonstrate good dependency management practices.

To ensure long-term maintainability:

  1. Regularly review and update these replace directives, especially those addressing security vulnerabilities.
  2. Consider creating a document or comments in the codebase explaining the reasons for each custom fork or replacement, which will help future maintainers understand the decisions made.
  3. Set up automated dependency scanning tools to alert you when official updates are available for the packages you've forked or pinned to specific versions.

Also applies to: 266-270, 272-284

CHANGELOG.md (10)

Line range hint 13-32: Consider adding more details to the v1.1.0 entry.

While the v1.1.0 entry covers the main points, it could benefit from more detailed explanations of the changes, especially for significant updates like the upgrade to Cosmos-SDK v0.47.5 and ibc-go to v7.2.0. Consider adding brief descriptions of the impact of these upgrades.


Line range hint 69-75: Consider adding more context to v0.8.0 entry.

The v0.8.0 entry is quite brief. It would be helpful to provide more context about why the change to selfdestruct behavior was made and its potential impact on existing contracts.


Line range hint 91-126: Ensure all breaking changes in v0.7.0 are highlighted.

The v0.7.0 entry contains several state machine breaking changes. It would be beneficial to clearly mark all breaking changes, perhaps with a "BREAKING" prefix, to ensure users are aware of the potential impact on their systems.


Line range hint 140-146: Consider adding more context to v0.6.4 entry.

The v0.6.4 entry is quite brief. It would be helpful to provide more context about why the revert was necessary and its potential impact.


Line range hint 163-180: Ensure consistency in formatting across all entries.

While most entries follow a consistent format, there are some minor inconsistencies in how GitHub issues are referenced (e.g., some use full URLs, others use shorthand). Consider standardizing this across all entries for better readability.


Line range hint 197-220: Consider adding migration guide for v0.6.0.

The removal of gravity-bridge in v0.6.0 is a significant change. Consider adding a link to a migration guide or more detailed instructions for users updating from previous versions.


Line range hint 244-252: Consider adding more details to v0.5.4 entry.

While the v0.5.4 entry describes the bug fixes, it would be helpful to provide more context about the impact of these fixes on users.


Line range hint 254-285: Ensure all breaking changes in v0.5.3 are clearly marked.

The v0.5.3 entry contains several significant changes, including upgrades to ethermint. Ensure all breaking changes are clearly marked and consider providing guidance for users upgrading from previous versions.


Line range hint 305-337: Consider adding more context to v0.5.1 entry.

The v0.5.1 entry contains several technical changes. Consider providing more context about the impact of these changes, especially for the consensus breaking changes.


Gravity module still referenced in codebase

Multiple references to the gravity module were found in the codebase, indicating that its removal may be incomplete. Please ensure that all dependencies and references to the gravity module are fully removed.

  • x/cronos/types/types_test.go
  • x/cronos/types/types.go
  • x/cronos/types/messages_test.go
  • x/cronos/handler_test.go
  • x/cronos/genesis_test.go
  • x/cronos/keeper/keeper_test.go
  • x/cronos/client/cli/tx.go
🔗 Analysis chain

Line range hint 34-50: Verify the impact of removing the gravity module.

The removal of the gravity module in v1.0.0 is a significant change. It would be helpful to add a note explaining the implications of this removal for users and any migration steps required.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any remaining references to the gravity module in the codebase
rg --type go 'gravity'

Length of output: 2564

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 1226cce and 26a2462.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (4)
  • CHANGELOG.md (1 hunks)
  • cmd/cronosd/cmd/root.go (0 hunks)
  • go.mod (4 hunks)
  • gomod2nix.toml (5 hunks)
💤 Files with no reviewable changes (1)
  • cmd/cronosd/cmd/root.go
🔇 Additional comments (16)
go.mod (2)

Line range hint 1-5: LGTM: Module declaration and Go version are up-to-date

The module declaration is correct, and the Go version (1.22.2) is recent. The addition of the toolchain directive (go1.22.3) ensures consistency across different development environments, which is a good practice.


8-9: Dependency updates look good, verify compatibility

The updates to various dependencies, especially the cosmossdk.io packages and related projects, are good for incorporating the latest features, bug fixes, and security patches. The use of a specific commit for github.com/cosmos/cosmos-sdk (v0.50.6-0.20240930015419-f4ea363b3fdf) suggests custom changes or a pre-release version.

Please ensure that these updates are compatible with your project and don't introduce any breaking changes. Run the following script to check for any compatibility issues:

Also applies to: 12-12, 15-15, 60-60, 94-94

gomod2nix.toml (6)

23-24: Cosmos SDK ecosystem updates approved

The following cosmossdk.io modules have been updated:

  • cosmossdk.io/api from v0.7.5 to v0.7.6
  • cosmossdk.io/client/v2 from v2.0.0-20240927054437-c2a1e0678f4b to v2.0.0-beta.5
  • cosmossdk.io/log from v1.4.0 to v1.4.1
  • cosmossdk.io/store and cosmossdk.io/x/tx to v0.0.0-20240930015419-f4ea363b3fdf

These updates appear to be part of a coordinated upgrade of the Cosmos SDK ecosystem. The changes are consistent and seem intentional.

Also applies to: 26-27, 41-42, 50-51, 63-64


176-177: Cosmos SDK core update and custom fork usage approved

The github.com/cosmos/cosmos-sdk module has been updated to v0.50.6-0.20240930015419-f4ea363b3fdf. Additionally, it's being replaced with a custom fork at github.com/crypto-org-chain/cosmos-sdk.

This update aligns with the other Cosmos SDK ecosystem updates. The use of a custom fork suggests that there might be specific modifications needed for this project.


189-190: IAVL module update approved

The github.com/cosmos/iavl module has been updated from v1.1.2 to v1.2.0. This minor version update likely includes new features or improvements without breaking changes, aligning with the overall Cosmos SDK ecosystem updates.


Line range hint 258-260: Custom forks for Ethereum and Ethermint modules approved

Two important Ethereum-related modules are using custom forks:

  1. github.com/ethereum/go-ethereum is replaced with github.com/crypto-org-chain/go-ethereum
  2. github.com/evmos/ethermint is replaced with github.com/crypto-org-chain/ethermint

The use of custom forks for both Ethereum and Ethermint suggests that this project requires specific modifications or features not available in the main repositories. This is a common practice in blockchain projects that need to adapt existing technologies to their specific needs.

Also applies to: 261-263


Line range hint 506-508: Custom fork for btree module approved

The github.com/tidwall/btree module has been updated to v0.0.0-20240406140148-2687063b042c and is being replaced with a custom fork at github.com/crypto-org-chain/btree.

The use of a custom fork for the btree module suggests that there might be specific performance optimizations or features needed for this project that are not available in the main repository. This aligns with the project's approach of using custom forks for other critical components.


Line range hint 1-594: Summary of dependency updates

This update includes several key changes to the project's dependencies:

  1. Coordinated updates to the Cosmos SDK ecosystem, including core SDK, IAVL, and related modules.
  2. Use of custom forks for critical components such as Ethereum, Ethermint, and btree modules.
  3. Various other dependency updates and version bumps.

These changes reflect a comprehensive update of the project's dependencies, with a focus on maintaining custom modifications where necessary. The use of custom forks allows for specific optimizations and features but may require additional maintenance effort to keep in sync with upstream changes.

Overall, these updates appear to be well-considered and aligned with the project's requirements. However, it's recommended to:

  1. Ensure thorough testing of the updated dependencies, especially the custom forks.
  2. Keep documentation up-to-date regarding the use of custom forks and any specific features or modifications they introduce.
  3. Regularly review and sync custom forks with their upstream repositories to incorporate bug fixes and improvements.
CHANGELOG.md (8)

Line range hint 1-11: LGTM: Unreleased changes are well-documented.

The unreleased section properly documents recent improvements and bug fixes. The format is consistent with the rest of the changelog.


Line range hint 52-67: LGTM: v0.9.0 changes are well-documented.

The v0.9.0 entry provides a comprehensive list of state machine breaking changes, bug fixes, and improvements. The format is consistent and informative.


Line range hint 77-89: LGTM: v0.7.1 bug fixes are clearly described.

The v0.7.1 entry provides clear descriptions of the bug fixes and improvements. The inclusion of GitHub issue numbers is helpful for tracking the changes.


Line range hint 128-138: LGTM: v0.6.5 bug fixes are well-documented.

The v0.6.5 entry clearly describes the bug fixes with appropriate references to GitHub issues.


Line range hint 148-161: LGTM: v0.6.3 changes are well-documented.

The v0.6.3 entry provides a good balance of bug fixes and improvements with clear descriptions and GitHub issue references.


Line range hint 182-195: LGTM: v0.6.1 changes are clearly described.

The v0.6.1 entry provides clear descriptions of the state machine breaking changes and bug fixes with appropriate GitHub issue references.


Line range hint 222-242: LGTM: v0.5.5 changes are well-documented.

The v0.5.5 entry provides a good overview of bug fixes and new features with clear GitHub issue references.


Line range hint 287-303: LGTM: v0.5.2 changes are well-documented.

The v0.5.2 entry clearly describes the consensus breaking changes, improvements, and bug fixes with appropriate GitHub issue references.

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.88%. Comparing base (1226cce) to head (d1e21ab).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1614   +/-   ##
=======================================
  Coverage   36.88%   36.88%           
=======================================
  Files         102      102           
  Lines        8055     8055           
=======================================
  Hits         2971     2971           
  Misses       4706     4706           
  Partials      378      378           

go.mod Show resolved Hide resolved
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.

2 participants