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: chain upgrade v1.14 #28

Merged
merged 1 commit into from
Feb 14, 2025
Merged

feat: chain upgrade v1.14 #28

merged 1 commit into from
Feb 14, 2025

Conversation

danidomi
Copy link
Contributor

@danidomi danidomi commented Feb 14, 2025

Summary by CodeRabbit

  • Chores
    • Updated the container environment to a newer base image for improved stability and performance.
    • Upgraded dependency libraries and added integrity checks to boost security and reliability.
    • Refined build configurations for enhanced compatibility with evolving standards.
    • Implemented enhancements to ensure robust deployments, improved security, and an overall smoother runtime experience for our users.

Copy link

coderabbitai bot commented Feb 14, 2025

Walkthrough

This pull request updates both the Dockerfile and go.mod. The Dockerfile now uses a more specific Golang base image version and includes newer versions of the libwasmvm_muslc libraries for both x86_64 and aarch64, along with added SHA256 checksum verifications. The go.mod file reflects an updated Go version and numerous dependency upgrades to ensure compatibility with the latest releases. The core build processes and configuration steps remain unchanged.

Changes

File(s) Change Summary
Dockerfile - Base image updated from golang:1.22-alpine to golang:1.22.5-alpine
- libwasmvm_muslc libraries updated from v1.5.0 to v2.1.2 for both x86_64 and aarch64
- Added RUN commands to verify SHA256 checksums for the new library files
go.mod - Go version updated from 1.22 to 1.22.2
- Upgraded multiple dependencies including InjectiveLabs/sdk-go, cometbft, pelletier/go-toml/v2, gRPC, cosmossdk.io modules, wasmvm, Prometheus client, zerolog, bbolt, golang.org/x modules, and google.golang.org/protobuf

Suggested reviewers

  • kalvkusk

Poem

Hop, hop, in lines of code I dance,
New versions gleam at every glance.
Patch updates and checks, a tidy spree,
Dependencies prance in harmony.
With every update, our build feels light—
A rabbit cheers for changes bright!

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 (1.62.2)

level=warning msg="[runner] Can't run linter goanalysis_metalinter: buildir: failed to load package ethsecp256k1: could not load export data: no export data for "github.com/InjectiveLabs/sdk-go/chain/crypto/ethsecp256k1""
level=error msg="Running error: can't run linter goanalysis_metalinter\nbuildir: failed to load package ethsecp256k1: could not load export data: no export data for "github.com/InjectiveLabs/sdk-go/chain/crypto/ethsecp256k1""


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.

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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd69303 and b2ef281.

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

5-8: LGTM! Security improvement with SHA256 verification.

The addition of SHA256 checksum verification for libwasmvm libraries enhances security by ensuring the integrity of downloaded artifacts.

go.mod (3)

223-236: LGTM! Consistent dependency overrides

The replace directives maintain consistency by using InjectiveLabs forks of core dependencies, which is the expected pattern for chain-specific customizations.


46-46:

✅ Verification successful

Verify compatibility between wasmvm and bbolt updates

Critical dependencies updated:

  • CosmWasm/wasmvm/v2: v2.1.2
  • go.etcd.io/bbolt: v1.4.0-alpha

These are core components. Please ensure thorough testing of state management and WASM contract execution.

Also applies to: 193-193


🌐 Web query:

Are there any known compatibility issues between CosmWasm/wasmvm v2.1.2 and bbolt v1.4.0-alpha?

💡 Result:

Based on the provided search results, there are no documented compatibility issues specifically between CosmWasm/wasmvm v2.1.2 and bbolt v1.4.0-alpha. However, here’s a breakdown of relevant findings:

Key Observations:

  1. Known Issues with bbolt (v1.x):

    • A data corruption issue exists on Linux systems with ext4’s "fast commit" feature enabled (kernel versions <5.17)[5]. This affects writes/truncates but isn’t directly tied to CosmWasm.
    • Zero-length value writes always return empty []byte{}[5].
  2. CosmWasm/wasmvm Updates:

    • Provenance blockchain updated github.com/CosmWasm/wasmvm/v2 to v2.1.3 and later v2.1.4 in its dependencies[6], suggesting incremental stability fixes but no explicit mention of bbolt-related changes.
    • A separate vulnerability (GO-2025-3449) affecting performance in older wasmvm versions (pre-2.0.6/2.1.x)[3] exists but does not involve bbolt.

Conclusion:

No direct incompatibility between wasmvm v2.1.x and bbolt v1.x is documented in the provided sources[3][5][6]. For safety:

  • Ensure your Linux kernel is ≥5.17 if using ext4[5].
  • Consider updating to newer wasmvm versions (e.g., ≥v2.1.5) for security fixes[3].

Citations:


Compatibility Check Verified: No Documented Issues

The dependency updates in go.mod—CosmWasm/wasmvm v2.1.2 and go.etcd.io/bbolt v1.4.0-alpha—do not exhibit any documented compatibility issues based on the latest available information. That said, please note the following considerations:

  • Linux File Systems: For systems using ext4, ensure the kernel is ≥5.17 if "fast commit" is enabled to avoid known bbolt issues.
  • Testing: Continue to thoroughly test state management and WASM contract execution in your environment.
  • Additional References: The same considerations apply to the similar dependency update noted at lines 193-193.

10-10:

❓ Verification inconclusive

Caution: Using release candidate version

github.com/InjectiveLabs/sdk-go v1.56.0-rc3 is a release candidate version. Consider waiting for the stable release before upgrading in production.


🌐 Web query:

Is there a stable release of InjectiveLabs/sdk-go newer than v1.56.0-rc3?

💡 Result:

Based on the search results, there is no indication of a stable release for InjectiveLabs/sdk-go newer than v1.56.0-rc3. The latest confirmed stable versions referenced in the search results are:

  • v1.55.1 (listed as the latest release on GitHub as of two weeks before February 2025) [5].
  • v1.49 (mentioned in Go SDK updates from January 2024) [3].

The search results include pre-release versions like v1.54.2-0 (December 2024) and v1.56 candidates (e.g., rc3), but no stable releases beyond these versions are documented in the provided sources[4][8].

For real-time updates, check the official GitHub repository or package registries like npm for TypeScript SDK releases[9][10].

Citations:


Caution: Release Candidate Usage in Production

The dependency in go.mod:

	github.com/InjectiveLabs/sdk-go v1.56.0-rc3

is using a release candidate version. Our investigation confirms that no stable release newer than this candidate exists – the latest stable version is v1.55.1. If this upgrade is intended for production, please ensure that:

  • Extensive testing has been performed to validate the release candidate’s stability.
  • Any compatibility or security implications with the critical updates have been thoroughly verified.
  • You consider downgrading to the stable v1.55.1 if production reliability is paramount.

@@ -1,9 +1,11 @@
#install packages for build layer
FROM golang:1.22-alpine AS builder
FROM golang:1.22.5-alpine AS builder
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Version mismatch between Dockerfile and go.mod

The Dockerfile uses Go 1.22.5 while go.mod specifies Go 1.22.2. This could lead to inconsistencies between development and build environments.


🌐 Web query:

What is the latest stable version of Go 1.22.x?

💡 Result:

The latest stable version of Go 1.22.x is Go 1.22.12, released on February 4, 2025[5][7]. This minor revision includes security fixes to the crypto/elliptic package and bug fixes to the compiler and go command[5].

Key details about Go 1.22's maintenance status:

  • Officially supported until two subsequent major releases (Go 1.24) arrive[7]
  • Follows a regular release cadence with security/bug fix updates every ~6 weeks
  • Latest patch versions address vulnerabilities while maintaining backward compatibility[5]

For production environments, using Go 1.22.12 ensures you receive critical security updates while maintaining compatibility with existing codebases targeting Go 1.22[7].

Citations:


Align Go versions in Dockerfile and go.mod for consistency

The Dockerfile currently specifies the base image as:

FROM golang:1.22.5-alpine AS builder

while the go.mod file sets Go to 1.22.2. Since the latest stable release in the Go 1.22 series is now 1.22.12 (which includes important security and bug fixes), it’s advisable to update both the Dockerfile and go.mod to reference Go 1.22.12. This alignment will help prevent any discrepancies between your build and development environments.

  • Dockerfile (line 2): Change to FROM golang:1.22.12-alpine AS builder
  • go.mod: Update the Go version specification to 1.22.12

@danidomi danidomi merged commit 5d5290d into master Feb 14, 2025
3 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