Skip to content

Conversation

@joe-bowman
Copy link
Contributor

@joe-bowman joe-bowman commented Jul 21, 2025

1. Summary

Releases v1.9.0

Adds upgrade handler, and bumps depdendencies ahead of v1.9.0 release.

Summary by CodeRabbit

  • New Features

    • Added a new upgrade handler for version 1.9.0, introducing protocol data setup for mainnet during upgrades.
  • Chores

    • Updated multiple dependencies across the project and related modules to their latest versions.
    • Improved internal memory allocation for error handling.
    • Updated GitHub Actions workflow to use the latest golangci-lint version.

@joe-bowman joe-bowman self-assigned this Jul 21, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 21, 2025

Walkthrough

This update introduces a new upgrade handler for version 1.9.0, optimizes error slice allocation, and refreshes dependencies across the main project and submodules. The GitHub Actions workflow for golangci-lint is also updated to use a newer action version. No changes to public APIs except for the new upgrade handler.

Changes

File(s) Change Summary
app/upgrades/v1_9.go Added V010900UpgradeHandler for v1.9.0 upgrade, handling module migrations and protocol data setup.
utils/error.go Optimized error slice allocation in ErrorMapToSlice for improved memory usage.
.github/workflows/golangci.yml Updated golangci-lint-action version from v2.1.2 to v2.2.2 in all jobs.
go.mod Bumped numerous direct and indirect dependencies to newer versions.
icq-relayer/go.mod Upgraded direct and indirect dependencies; no logic or replace directive changes.
xcclookup/go.mod Upgraded direct and indirect dependencies; updated replace directives and retracted v1.7.0.

Sequence Diagram(s)

sequenceDiagram
    participant App as App
    participant Handler as V010900UpgradeHandler
    participant Rewards as ParticipationRewardsKeeper
    participant MM as ModuleManager
    participant Config as Configurator

    App->>Handler: Invoke upgrade handler
    Handler->>Handler: Log start of migrations
    Handler->>Handler: Check if mainnet
    alt If mainnet
        Handler->>Handler: Create MembraneProtocolData
        Handler->>Handler: Marshal to JSON
        Handler->>Rewards: SetProtocolData(key, data)
    end
    Handler->>Handler: Log completion
    Handler->>MM: RunMigrations(Config)
    MM-->>Handler: Return versionMap, err
    Handler-->>App: Return versionMap, err
Loading

Estimated code review effort

2 (~15 minutes)

Suggested labels

ci, dependencies

Suggested reviewers

  • faddat
  • ajansari95

Poem

A hop, a skip, a version bump,
New handler set for upgrade jump!
Linting shines with fresher code,
Dependencies light the load.
Bugs beware, the garden's neat—
This rabbit's work is quite the treat!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

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

🧹 Nitpick comments (2)
go.mod (2)

277-277: Fix the malformed comment syntax.

There's a missing space in the comment separator on this line.

-	github.com/petermattis/goid v0.0.0-20250508124226-395b08cebbdb //indirect
+	github.com/petermattis/goid v0.0.0-20250508124226-395b08cebbdb // indirect

356-356: Fix the malformed comment syntax.

There's a missing space in the comment separator on this line.

-	golang.org/x/exp/typeparams v0.0.0-20250718183923-645b1fa84792 //indirect
+	golang.org/x/exp/typeparams v0.0.0-20250718183923-645b1fa84792 // indirect
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9403bfc and 2c13742.

⛔ Files ignored due to path filters (4)
  • go.sum is excluded by !**/*.sum
  • go.work.sum is excluded by !**/*.sum
  • icq-relayer/go.sum is excluded by !**/*.sum
  • xcclookup/go.sum is excluded by !**/*.sum
📒 Files selected for processing (6)
  • .github/workflows/golangci.yml (3 hunks)
  • app/upgrades/v1_9.go (1 hunks)
  • go.mod (16 hunks)
  • icq-relayer/go.mod (6 hunks)
  • utils/error.go (1 hunks)
  • xcclookup/go.mod (11 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/upgrades/v1_9.go (2)
x/participationrewards/types/protocol_data.go (1)
  • NewProtocolData (13-15)
x/participationrewards/types/participationrewards.pb.go (2)
  • ProtocolDataType_name (52-70)
  • ProtocolDataTypeMembraneParams (38-38)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: lint
  • GitHub Check: build (1.24.5, ubuntu-latest)
  • GitHub Check: build quicksilver (amd64, linux)
  • GitHub Check: test (1.24.5, ubuntu-latest)
  • GitHub Check: build quicksilver (amd64, darwin)
  • GitHub Check: test (1.24.5, macos-latest)
  • GitHub Check: test quicksilver (amd64, windows)
  • GitHub Check: build quicksilver (amd64, windows)
  • GitHub Check: build (1.24.5, macos-latest)
  • GitHub Check: build quicksilver (darwin, arm64)
  • GitHub Check: test quicksilver (darwin, arm64)
  • GitHub Check: test quicksilver (amd64, linux)
  • GitHub Check: Analyze
  • GitHub Check: test (1.24.5, macos-latest)
  • GitHub Check: build (1.24.5, macos-latest)
🔇 Additional comments (15)
utils/error.go (1)

9-9: LGTM! Good performance optimization.

Pre-allocating the slice capacity based on the map size prevents multiple reallocations during the append operations, which improves performance.

.github/workflows/golangci.yml (1)

31-31: LGTM! Consistent version update across all jobs.

The golangci-lint-action version is properly updated to v2.2.2 across all jobs, including the commented-out configuration, maintaining consistency.

Also applies to: 46-46, 63-63

app/upgrades/v1_9.go (2)

15-41: Well-structured upgrade handler with proper mainnet-specific logic.

The upgrade handler follows the standard pattern with appropriate error handling and module migrations. The mainnet-specific setup for membrane protocol data is properly isolated and uses the correct type system.


23-23: isMainnet implementation verified
The function isMainnet(ctx sdk.Context) bool is defined in app/upgrades/types.go (lines 65–67) and correctly returns ctx.ChainID() == ProductionChainID. No further changes required.

xcclookup/go.mod (2)

11-11: LGTM! Direct dependency updates look appropriate.

The updates to key direct dependencies like golangci-lint/v2 (v2.2.2) and golang.org/x/tools (v0.35.0) are incremental and align with the broader dependency refresh effort.

Also applies to: 16-16


24-319: Dependency refresh verified – build and tests passed

Ran in xcclookup:
• go mod tidy
• go build ./...
• go test ./...

All commands succeeded with no errors or failures. No breaking changes detected.

icq-relayer/go.mod (2)

8-8: LGTM! Direct dependency updates are incremental and safe.

The updates to avast/retry-go/v4 (v4.6.1) and rs/zerolog (v1.34.0) are incremental version bumps that should be safe to adopt.

Also applies to: 17-17


23-214: Extensive indirect dependency refresh aligns with project-wide updates.

The comprehensive update of indirect dependencies across OpenTelemetry, Google Cloud libraries, cryptography, and core Go packages is consistent with the coordinated dependency refresh effort seen across other modules.

go.mod (7)

37-41: LGTM! Core dependency updates look good.

The updates to golang.org/x/exp, golang.org/x/tools, and google.golang.org/genproto packages represent standard maintenance updates that should be compatible with the existing codebase.


51-57: Approve Google Cloud dependency updates.

The Google Cloud SDK dependencies have been updated to newer versions, which is good for security and feature improvements. These are patch/minor version updates that should maintain compatibility.


143-144: Note the addition of new indirect dependency.

The addition of github.com/dgraph-io/ristretto/v2 v2.2.0 as a new indirect dependency suggests that dgraph-io/badger/v4 now uses ristretto v2 for caching. This is expected with the badger upgrade to v4.8.0.


263-263: Note the addition of new indirect dependency.

The addition of github.com/moby/sys/user v0.4.0 as a new indirect dependency is likely pulled in by one of the updated dependencies. This is a standard system utility package from the Moby project.


343-351: Action Required: Confirm OpenTelemetry Version Compatibility

Automated scans did not detect any direct imports or telemetry configuration files referencing go.opentelemetry.io. Please manually verify that upgrading all OpenTelemetry modules to v1.37.0 is compatible with your project’s instrumentation code and telemetry requirements.


23-23: Verify golangci-lint v2.2.2 upgrade impact on CI

  • No .golangci.yml/.yaml/.toml configuration file found in the repo, so both workflows will run golangci-lint with default settings.
  • Two GitHub Actions workflows (.github/workflows/golangci.yml) are pinned to version v2.2.2.

Please review the golangci-lint v2.2.2 release notes for any newly enabled default linters or rule changes that could break your CI pipeline.


90-90: No AWS SDK imports detected – indirect only
A search for github.com/aws/aws-sdk-go in Go files returned no direct or service-subpackage imports, so the SDK is only an indirect dependency. There’s no code relying on AWS APIs to break.

if isMainnet(ctx) {
// add MembraneParams protocol data
membranePd := prtypes.MembraneProtocolData{
ContractAddress: "osmo1gy5gpqqlth0jpm9ydxlmff6g5mpnfvrfxd3mfc8dhyt03waumtzqt8exxr",
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify the hardcoded contract address.

The contract address is hardcoded in the upgrade handler. Please ensure this address is correct for the mainnet membrane protocol deployment and consider documenting its purpose.


🏁 Script executed:

#!/bin/bash
# Verify if this contract address is referenced elsewhere or documented
rg -A 3 -B 3 "osmo1gy5gpqqlth0jpm9ydxlmff6g5mpnfvrfxd3mfc8dhyt03waumtzqt8exxr"

Length of output: 4525


Extract and Document the Membrane Contract Address

The address “osmo1gy5gpqqlth0jpm9ydxlmff6g5mpnfvrfxd3mfc8dhyt03waumtzqt8exxr” is used in multiple places:

  • app/upgrades/v1_9.go (upgrade handler)
  • x/participationrewards/keeper/submodule_membrane_test.go
  • utils/cw_test.go

To avoid duplication and ensure correctness:

• Extract this literal into a single constant (for example prtypes.MembraneContractAddress) in your module’s types or config package.
• Replace the hardcoded strings in the upgrade handler and both test files with that constant:

- ContractAddress: "osmo1gy5gpqqlth0jpm9ydxlmff6g5mpnfvrfxd3mfc8dhyt03waumtzqt8exxr",
+ ContractAddress: prtypes.MembraneContractAddress,

• Add a doc comment on the constant explaining its origin (mainnet deployment tx or protocol spec) and its role in the Membrane protocol.
• Optionally, update your module’s README or upgrade notes to reference this constant and its purpose.

This centralizes future updates and makes the address’s provenance clear.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ContractAddress: "osmo1gy5gpqqlth0jpm9ydxlmff6g5mpnfvrfxd3mfc8dhyt03waumtzqt8exxr",
ContractAddress: prtypes.MembraneContractAddress,
🤖 Prompt for AI Agents
In app/upgrades/v1_9.go at line 26 and the related test files, the Membrane
contract address is hardcoded multiple times. Extract this address into a single
constant named MembraneContractAddress in your module’s types or config package.
Replace all occurrences of the hardcoded string in the upgrade handler and test
files with this constant. Add a doc comment to the constant explaining its
origin and role in the Membrane protocol. Optionally, update the module’s README
or upgrade notes to reference this constant and its purpose.

@codecov
Copy link

codecov bot commented Jul 21, 2025

Codecov Report

Attention: Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.

Project coverage is 57.63%. Comparing base (9403bfc) to head (2c13742).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
app/upgrades/v1_9.go 0.00% 17 Missing ⚠️
utils/error.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1931      +/-   ##
==========================================
- Coverage   57.70%   57.63%   -0.07%     
==========================================
  Files         171      172       +1     
  Lines       15251    15268      +17     
==========================================
  Hits         8800     8800              
- Misses       5685     5702      +17     
  Partials      766      766              
Flag Coverage Δ
unittests 57.63% <0.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
utils/error.go 0.00% <0.00%> (ø)
app/upgrades/v1_9.go 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@ajansari95 ajansari95 left a comment

Choose a reason for hiding this comment

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

LGTM

@joe-bowman joe-bowman merged commit 0758178 into main Jul 22, 2025
24 of 26 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Jul 22, 2025
1 task
@coderabbitai coderabbitai bot mentioned this pull request Nov 6, 2025
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.

3 participants