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: ibc-go is not up to date #1701

Merged
merged 1 commit into from
Nov 21, 2024
Merged

Conversation

mmsqe
Copy link
Collaborator

@mmsqe mmsqe commented Nov 21, 2024

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

for more info

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

  • Improvements
    • Updated the ibc-go dependency to version v8.5.2 for enhanced performance and compatibility.
  • Documentation
    • Added a new "Unreleased" section in the changelog to track ongoing improvements while preserving historical records.

@mmsqe mmsqe requested a review from a team as a code owner November 21, 2024 08:54
@mmsqe mmsqe requested review from leejw51crypto and thomas-nguy and removed request for a team November 21, 2024 08:54
Copy link
Contributor

coderabbitai bot commented Nov 21, 2024

Walkthrough

The changes in this pull request involve updates to the CHANGELOG.md and go.mod files. The CHANGELOG.md now includes an "Unreleased" section that documents the update of the ibc-go dependency to version v8.5.2. The go.mod file reflects changes in dependency versions, specifically updating ibc-go from v8.5.1 to v8.5.2 and modifying several replace directives to point to specific commits in the crypto-org-chain repository.

Changes

File Change Summary
CHANGELOG.md Added "Unreleased" section documenting the update of ibc-go to version v8.5.2.
go.mod Updated ibc-go dependency from v8.5.1 to v8.5.2. Modified replace directives for various dependencies.

Possibly related PRs

Suggested reviewers

  • leejw51crypto
  • devashishdxt
  • yihuang

🐇 In the code we hop and play,
With dependencies updated today!
Changelog shines, a new delight,
Version bumps, all feel just right.
Hopping forward, let’s code away! 🐇

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 golangci-lint

level=warning msg="The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar."


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 enabled auto-merge November 21, 2024 08:55
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 (1)
go.mod (1)

Security risk: Significantly outdated go-ethereum fork

The crypto-org-chain/go-ethereum fork is severely out of sync with upstream, with its last commit from October 2021, while upstream ethereum/go-ethereum has active development as recent as November 2024. This represents a 3-year gap of missing updates, including potential security patches.

  • crypto-org-chain/go-ethereum last commit: 2021-10-12
  • ethereum/go-ethereum last commit: 2024-11-20
  • crypto-org-chain/ethermint is relatively current (2024-11-14)
  • evmos/ethermint last commit: 2024-04-04
🔗 Analysis chain

Line range hint 290-291: Verify security patch status of ethereum-related forks

The go-ethereum and ethermint forks should maintain all security patches from their upstream repositories.


Let me try with corrected GitHub API commands to gather the necessary information.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the forks are up to date with upstream security patches

# Check recent security-related commits in upstream
for repo in "ethereum/go-ethereum" "evmos/ethermint"; do
  echo "Checking $repo security commits..."
  gh api repos/$repo/commits --query 'per_page=20' | jq -r '.[] | select(.commit.message | test("security|vulnerability|CVE"; "i")) | {message: .commit.message, date: .commit.author.date}'
done

# Compare with our forks
for repo in "go-ethereum" "ethermint"; do
  echo "Checking crypto-org-chain/$repo security commits..."
  gh api repos/crypto-org-chain/$repo/commits --query 'per_page=20' | jq -r '.[] | select(.commit.message | test("security|vulnerability|CVE"; "i")) | {message: .commit.message, date: .commit.author.date}'
done

Length of output: 6924


Script:

#!/bin/bash
# Description: Check if the forks are up to date with upstream security patches

# Check recent security-related commits in upstream
for repo in "ethereum/go-ethereum" "evmos/ethermint"; do
  echo "Checking $repo security commits..."
  gh api "repos/$repo/commits?per_page=20" | jq -r '.[] | select(.commit.message | test("security|vulnerability|CVE"; "i")) | {message: .commit.message, date: .commit.author.date}'
done

# Compare with our forks
for repo in "go-ethereum" "ethermint"; do
  echo "Checking crypto-org-chain/$repo security commits..."
  gh api "repos/crypto-org-chain/$repo/commits?per_page=20" | jq -r '.[] | select(.commit.message | test("security|vulnerability|CVE"; "i")) | {message: .commit.message, date: .commit.author.date}'
done

# Also check the latest commit dates to understand sync status
echo -e "\nLatest commit dates:"
for repo in "ethereum/go-ethereum" "evmos/ethermint"; do
  echo "Latest commit in $repo:"
  gh api "repos/$repo/commits?per_page=1" | jq -r '.[0].commit.author.date'
done

for repo in "go-ethereum" "ethermint"; do
  echo "Latest commit in crypto-org-chain/$repo:"
  gh api "repos/crypto-org-chain/$repo/commits?per_page=1" | jq -r '.[0].commit.author.date'
done

Length of output: 2506

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 601bd52 and 8a669f7.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • CHANGELOG.md (1 hunks)
  • go.mod (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • CHANGELOG.md
🔇 Additional comments (3)
go.mod (3)

Line range hint 292-297: LGTM: Security-focused replace directives are properly maintained

The replace directives addressing known vulnerabilities (GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h) are properly maintained with secure versions.


26-26: Verify ibc-go v8.5.2 release notes and security advisories

The update from v8.5.1 to v8.5.2 appears to be a minor version bump. Let's verify there are no breaking changes or security concerns.

✅ Verification successful

✅ ibc-go v8.5.2 update appears safe to proceed

The version update from v8.5.1 to v8.5.2 includes:

  • A bug fix to avoid invalid identifier errors during genesis validation
  • Test improvements for block proposer handling
  • No breaking changes identified

The security advisories show:

  • Two vulnerabilities that affect much older versions (<=1.5.0 and <4.6.0)
  • No security issues affecting v8.5.x series
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the changelog and security advisories for ibc-go between v8.5.1 and v8.5.2

# Get the changelog between versions
gh api repos/cosmos/ibc-go/compare/v8.5.1...v8.5.2 | jq -r '.commits[].commit.message'

# Check for any security advisories
gh api graphql -f query='
{
  securityVulnerabilities(first: 5, ecosystem: GO, package: "github.com/cosmos/ibc-go") {
    nodes {
      advisory {
        summary
        severity
        publishedAt
      }
      vulnerableVersionRange
      firstPatchedVersion {
        identifier
      }
    }
  }
}'

Length of output: 2221


Line range hint 269-273: Verify stability of crypto-org-chain fork commits

The replace directives point to specific commits in the crypto-org-chain forks. These commits are recent and need verification for stability.

✅ Verification successful

Fork commit is stable and on a maintenance branch

The commit ce418f845d9a in the crypto-org-chain/cometbft fork is:

  • On the stable v0.38.x maintenance branch
  • Contains only dependency updates and minor fixes backported from upstream
  • Part of regular maintenance work with proper review and testing

The replace directive is safe to use as it points to a commit on a stable maintenance branch rather than a development branch.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the stability and nature of the referenced commits

# Check commit messages and tags around these commits
for repo in "cosmos-sdk" "cosmos-sdk/store" "cosmos-sdk/x/tx"; do
  echo "Checking $repo..."
  gh api repos/crypto-org-chain/$repo/commits/$(echo $repo | grep -o '[^/]*$')/v0.0.0-20241114020021-3300cc8f3836 | jq -r '.commit.message'
  
  # Check if commit is on a release branch
  gh api repos/crypto-org-chain/$repo/branches | jq -r '.[] | select(.commit.sha | contains("3300cc8f3836")) | .name'
done

Length of output: 1582


Script:

#!/bin/bash
# Let's correct the script to check the specific commit mentioned in go.mod

# First, let's extract the exact commit hash from go.mod
echo "Checking go.mod content..."
cat go.mod | grep -A 2 "cometbft =>"

# Now let's check this specific commit
echo -e "\nChecking commit details..."
gh api repos/crypto-org-chain/cometbft/commits/ce418f845d9a | jq -r '.commit.message'

# Check if this commit is on any branch
echo -e "\nChecking branch information..."
gh api repos/crypto-org-chain/cometbft/branches | jq -r '.[] | select(.commit.sha | contains("ce418f845d9a")) | .name'

Length of output: 20918

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 35.47%. Comparing base (a3c2f70) to head (8a669f7).
Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1701       +/-   ##
===========================================
+ Coverage   16.87%   35.47%   +18.59%     
===========================================
  Files          72      124       +52     
  Lines        6163    11897     +5734     
===========================================
+ Hits         1040     4220     +3180     
- Misses       5000     7253     +2253     
- Partials      123      424      +301     

see 71 files with indirect coverage changes

---- 🚨 Try these New Features:

@yihuang yihuang added this pull request to the merge queue Nov 21, 2024
Merged via the queue into crypto-org-chain:main with commit a921fd0 Nov 21, 2024
44 checks passed
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