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: cosmos-sdk x/tx not up to date #1638

Merged
merged 6 commits into from
Oct 15, 2024
Merged

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Oct 14, 2024

👮🏻👮🏻👮🏻 !!!! 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

  • Chores
    • Updated Go version from 1.22.2 to 1.22.3 for improved performance and compatibility.
    • Enhanced dependency management by updating multiple package versions to ensure the application uses the latest features and fixes.
  • Improvements
    • Adjusted default parallelism for block-stm to optimize performance.
    • Updated the ethermint module to improve API call efficiency and support for IBC channel upgrade methods.
  • Bug Fixes
    • Resolved issues with multisig account failures and corrected address query logic.
    • Fixed transaction validation issues and ensured proper handling of governance parameters.

@yihuang yihuang requested a review from a team as a code owner October 14, 2024 08:23
@yihuang yihuang requested review from JayT106 and devashishdxt and removed request for a team October 14, 2024 08:23
Copy link
Contributor

coderabbitai bot commented Oct 14, 2024

Walkthrough

The pull request includes updates to the go.mod, gomod2nix.toml, and CHANGELOG.md files, focusing on dependency management and versioning. The Go version has been updated from 1.22.2 to 1.22.3, with several dependencies modified, particularly within the cosmossdk.io module. Notable changes include updates to specific package versions and commit hashes, along with a detailed changelog reflecting the release of version v1.4.0-rc1 and various improvements, bug fixes, and breaking changes.

Changes

File Change Summary
go.mod - Updated Go version from 1.22.2 to 1.22.3
- Updated cosmossdk.io/x/tx from v0.13.5 to v0.13.6-0.20241003112805-ff8789a02871
- Updated replace directives for cosmossdk.io/store, cosmossdk.io/x/tx, and github.com/cosmos/cosmos-sdk to new commit hashes.
gomod2nix.toml - Updated version and hash values for cloud.google.com/go, cloud.google.com/go/auth, cloud.google.com/go/storage, cosmossdk.io/store, and github.com/cosmos/cosmos-sdk to match changes in go.mod. Other modules also updated but with less significance.
CHANGELOG.md - Updated to reflect release of version v1.4.0-rc1 on October 14, 2024, detailing breaking changes, improvements, and bug fixes.

Possibly related PRs

Suggested reviewers

  • leejw51crypto
  • thomas-nguy
  • mmsqe

Poem

🐰 In the garden of code, we hop and play,
With versions updated, we brighten the day.
Dependencies dance, in harmony they sing,
A joyful release, let the changes take wing!
From 1.22.2 to 1.22.3, we leap with delight,
In the world of Go, everything feels right! 🌼


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.

@yihuang yihuang requested a review from mmsqe October 14, 2024 08:24
@yihuang yihuang enabled auto-merge October 14, 2024 08:27
Copy link

codecov bot commented Oct 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.30%. Comparing base (8425423) to head (f43789e).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1638   +/-   ##
=======================================
  Coverage   36.30%   36.30%           
=======================================
  Files         123      123           
  Lines        9717     9717           
=======================================
  Hits         3528     3528           
  Misses       5775     5775           
  Partials      414      414           

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: 3

🧹 Outside diff range and nitpick comments (1)
gomod2nix.toml (1)

Line range hint 1-639: Summary: Coordinated update of Cosmos SDK and related modules using custom forks.

This update consistently upgrades the Cosmos SDK and related modules to more recent versions. The use of custom forks (github.com/crypto-org-chain/cosmos-sdk) for critical components allows for project-specific modifications but comes with responsibilities:

  1. Maintain synchronization with upstream repositories.
  2. Carefully manage custom changes to ensure ecosystem compatibility.
  3. Have a clear strategy for incorporating upstream updates and resolving conflicts.
  4. Regularly review the need for custom forks and consider contributing changes upstream when possible.

Ensure your team is aware of these custom forks and has processes in place to manage them effectively.

Consider documenting the reasons for using custom forks and the process for maintaining them in your project documentation. This will help current and future developers understand the project's architecture and maintenance requirements.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 18c337a and 6055525.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • go.mod (2 hunks)
  • gomod2nix.toml (3 hunks)
🧰 Additional context used
🔇 Additional comments (4)
go.mod (3)

Line range hint 1-5: Go version update looks good.

The toolchain has been updated to Go 1.22.3, which is a minor version update. This is a good practice as it likely includes bug fixes and performance improvements.


Line range hint 1-285: Overall, the dependency updates look appropriate.

The changes in this file align with the PR objective of updating the cosmos-sdk x/tx module. The Go version update and the coordinated updates to the cosmos-sdk related dependencies are positive improvements. Please ensure to run the suggested verification steps to confirm compatibility and correctness of the referenced commits.


257-259: Replace directive updates look consistent.

The replace directives for cosmossdk.io/store, cosmossdk.io/x/tx, and github.com/cosmos/cosmos-sdk have been updated to use the same commit hash (v0.0.0-20241014075949-ba8668a398fe). This suggests a coordinated update across these related dependencies.

To ensure the referenced commit is correct and contains the expected changes, please run the following command:

#!/bin/bash
# Description: Verify the content of the referenced commit.
for repo in "store" "x/tx" "cosmos-sdk"; do
  echo "Checking $repo:"
  git ls-remote https://github.com/crypto-org-chain/$repo.git ba8668a398fe
done
gomod2nix.toml (1)

63-65: Approved: Consistent module update with custom fork.

The cosmossdk.io/x/tx module has been updated to the same version as cosmossdk.io/store, maintaining consistency. It's also using a custom fork from the same repository. This alignment is good for compatibility, but remember to keep the fork updated with upstream changes.

#!/bin/bash
# Verify the custom fork usage for x/tx module and compare its latest commit with store module
gh repo view github.com/crypto-org-chain/cosmos-sdk
gh api repos/crypto-org-chain/cosmos-sdk/commits/main --jq '.[0].sha'

go.mod Show resolved Hide resolved
gomod2nix.toml Outdated Show resolved Hide resolved
gomod2nix.toml 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: 0

🧹 Outside diff range and nitpick comments (2)
CHANGELOG.md (2)

Line range hint 1-30: LGTM with a note on the release date.

The changelog entry for v1.4.0-rc1 is well-structured and provides a clear overview of the changes. It includes important sections such as State Machine Breaking changes, Improvements, and Bug Fixes, which is helpful for users and developers.

The release date is set to October 14, 2024, which is in the future. While this might be intentional for a release candidate, it's worth confirming if this is the intended date or if it should be adjusted to the actual release date.

🧰 Tools
🪛 Markdownlint

3-3: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


Line range hint 166-1000: LGTM - Extensive version history with detailed changelogs.

The changelog entries from v1.1.0-rc5 down to v0.5.1 provide a comprehensive history of the project's evolution over time.

The level of detail in these changelogs is commendable, including links to relevant GitHub issues and pull requests. This aids in traceability and allows users to dive deeper into specific changes if needed.

There's an interesting transition in the dates from future dates (e.g., February 28, 2024) to past dates (e.g., August 16, 2021). This could be due to the file's history or how it was compiled. It might be worth reviewing and standardizing the date format or ensuring all dates are correctly set relative to their actual release times.

🧰 Tools
🪛 Markdownlint

3-3: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 6055525 and b20f667.

📒 Files selected for processing (1)
  • CHANGELOG.md (2 hunks)
🧰 Additional context used
🪛 Markdownlint
CHANGELOG.md

3-3: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

🔇 Additional comments (3)
CHANGELOG.md (3)

Line range hint 32-67: LGTM - Significant changes noted.

The changelog entry for v1.4.0-rc0 is comprehensive and well-organized. It clearly outlines important changes across State Machine Breaking, Improvements, and Bug Fixes categories.

The changes listed in this version are substantial, including upgrades to major dependencies like SDK, IBC, and Ethermint. Users and developers should pay close attention to these changes, especially the state machine breaking ones, as they may require updates to their applications or infrastructure.

🧰 Tools
🪛 Markdownlint

32-32: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


Line range hint 69-95: LGTM - Notable addition of end-to-end encryption module.

The changelog entries for v1.3.0-rc2 and v1.3.0-rc1 are well-documented and provide clear information about the changes in each release candidate.

It's worth highlighting the addition of the end-to-end encryption module in v1.3.0-rc1, which is a State Machine Breaking change. This is a significant feature that could have important implications for security and privacy in the system. Users and developers should be aware of this addition and its potential impacts on their applications.

🧰 Tools
🪛 Markdownlint

3-3: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


Line range hint 97-164: LGTM - Consistent documentation across multiple versions.

The changelog entries from v1.2.2 down to v1.2.0-rc0 are well-documented and provide a clear history of changes across multiple versions.

It's commendable to see consistent and detailed documentation for each version, including minor releases. This level of detail helps users and developers understand the evolution of the software and any potential impacts on their systems. Pay particular attention to the State Machine Breaking changes in v1.2.0-rc0, as these may require action from users during upgrades.

🧰 Tools
🪛 Markdownlint

3-3: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

@yihuang yihuang disabled auto-merge October 14, 2024 09:04
@yihuang yihuang enabled auto-merge October 15, 2024 02:01
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 (2)
gomod2nix.toml (2)

Line range hint 1-669: Summary: Significant use of custom forks for core dependencies

This update involves several critical changes to core dependencies, notably:

  1. Custom forks are used for cosmossdk.io/store, cosmossdk.io/x/tx, the entire Cosmos SDK, and go-ethereum.
  2. These forks are based on recent commits but may diverge from their upstream repositories.

While using custom forks allows for project-specific modifications, it also introduces several challenges:

  • Increased maintenance burden to keep forks up-to-date with upstream changes.
  • Potential compatibility issues with the broader Cosmos and Ethereum ecosystems.
  • Risk of missing important updates or security fixes from the main repositories.

Recommendations:

  1. Maintain comprehensive documentation of all custom changes in these forks.
  2. Establish a regular schedule to sync custom forks with their upstream repositories.
  3. Consider contributing non-project-specific improvements back to the main repositories.
  4. Regularly assess whether custom forks are still necessary or if the project can migrate back to the main repositories.

To help manage these custom forks, consider implementing a automated fork synchronization and diff generation system. This could involve:

  1. Regular scheduled jobs to attempt merging upstream changes into your forks.
  2. Automated diff generation to highlight divergences between your forks and upstream.
  3. Alerts for the development team when significant upstream changes occur that may need manual intervention.

Would you like assistance in designing such a system?


⚠️ Custom go-ethereum Fork is Outdated

The project is using a custom fork of go-ethereum (github.com/crypto-org-chain/go-ethereum) with the latest commit from October 2021. In contrast, the official repository has a recent release (v1.14.11) as of October 1, 2024. This significant lag may introduce security vulnerabilities and compatibility issues.

Recommendations:

  • Assess Necessity: Determine if the custom fork's modifications are still essential.
  • Update Strategy: If required, establish a plan to regularly update the fork with upstream changes.
  • Consider Official Repository: Evaluate the feasibility of migrating back to the official go-ethereum to leverage ongoing support and updates.
🔗 Analysis chain

Line range hint 274-276: Custom fork of go-ethereum in use

The project is using a custom fork of go-ethereum (github.com/crypto-org-chain/go-ethereum) based on version 1.10.20 with additional changes. This is a significant dependency that affects Ethereum compatibility. Please ensure:

  1. The custom changes in the fork are well-documented and necessary for the project.
  2. There's a plan to keep this fork updated with upstream changes from the official go-ethereum repository.
  3. The implications of using an older version (1.10.20) as a base are understood and accepted.
  4. Any Ethereum compatibility features or fixes added after 1.10.20 are manually incorporated if needed.

To assess the current state of the custom go-ethereum fork, run:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check the latest commit of the custom fork
gh api repos/crypto-org-chain/go-ethereum/commits/main --jq '.sha'

# Get a summary of recent changes
gh api repos/crypto-org-chain/go-ethereum/commits --jq '.[0,1,2] | {message: .commit.message, date: .commit.author.date}'

# Compare with the official go-ethereum repository
gh api repos/ethereum/go-ethereum/releases/latest --jq '{tag_name: .tag_name, published_at: .published_at}'

Length of output: 1744

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between d6fda38 and f43789e.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • go.mod (2 hunks)
  • gomod2nix.toml (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • go.mod
🧰 Additional context used
🔇 Additional comments (3)
gomod2nix.toml (3)

176-178: Major update: Custom fork of entire Cosmos SDK

The github.com/cosmos/cosmos-sdk module has been updated to a more recent version, with a changed hash indicating significant modifications. Importantly, this update uses a custom fork (github.com/crypto-org-chain/cosmos-sdk) for the entire Cosmos SDK. This is a critical change that requires careful consideration:

  1. Ensure all custom changes in the fork are thoroughly reviewed and documented.
  2. Verify that the custom fork maintains compatibility with other Cosmos ecosystem projects.
  3. Establish a clear strategy for keeping the fork up-to-date with upstream changes.
  4. Consider the long-term maintenance implications of diverging from the main Cosmos SDK.

To assess the current state and recent changes of the custom fork, run:

#!/bin/bash
# Compare the version in gomod2nix.toml with the latest commit
gh api repos/crypto-org-chain/cosmos-sdk/commits/main --jq '.sha'
grep -A 2 'github.com/cosmos/cosmos-sdk' gomod2nix.toml

# Get a summary of recent changes
gh api repos/crypto-org-chain/cosmos-sdk/commits --jq '.[0,1,2] | {message: .commit.message, date: .commit.author.date}'

# Check for open pull requests that might affect the custom fork
gh api repos/crypto-org-chain/cosmos-sdk/pulls --jq '.[] | {title: .title, url: .html_url, updated_at: .updated_at}' | head -n 15

50-52: Custom fork update for cosmossdk.io/store

The cosmossdk.io/store module has been updated to a more recent version. Note that this module is using a custom fork (github.com/crypto-org-chain/cosmos-sdk/store) instead of the official repository. Ensure that this fork is maintained and kept up-to-date with the upstream changes.

To verify the custom fork's status, run:

#!/bin/bash
# Check the latest commit of the custom fork
gh api repos/crypto-org-chain/cosmos-sdk/commits/main --jq '.sha'
# Compare with the version in gomod2nix.toml
grep -A 2 'cosmossdk.io/store' gomod2nix.toml

63-65: Significant update for cosmossdk.io/x/tx

The cosmossdk.io/x/tx module has been updated to a more recent version, and the hash has changed, indicating significant modifications. This module is using a custom fork (github.com/crypto-org-chain/cosmos-sdk/x/tx). Please ensure:

  1. The changes in the custom fork are reviewed and align with the project requirements.
  2. The custom fork is kept up-to-date with the upstream changes.
  3. Any breaking changes are properly addressed in the project.

To verify the changes and status of the custom fork, run:

#!/bin/bash
# Check the latest commit and compare with the version in gomod2nix.toml
gh api repos/crypto-org-chain/cosmos-sdk/commits/main --jq '.sha'
grep -A 2 'cosmossdk.io/x/tx' gomod2nix.toml

# Get a summary of recent changes
gh api repos/crypto-org-chain/cosmos-sdk/commits --jq '.[0,1,2] | {message: .commit.message, date: .commit.author.date}'

@yihuang yihuang added this pull request to the merge queue Oct 15, 2024
Merged via the queue into crypto-org-chain:main with commit e06f87e Oct 15, 2024
44 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Nov 11, 2024
13 tasks
@coderabbitai coderabbitai bot mentioned this pull request Nov 21, 2024
13 tasks
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