Skip to content

Comments

v1.7.7 release#1821

Merged
joe-bowman merged 8 commits intomainfrom
release/v1.7.x
Feb 17, 2025
Merged

v1.7.7 release#1821
joe-bowman merged 8 commits intomainfrom
release/v1.7.x

Conversation

@joe-bowman
Copy link
Contributor

@joe-bowman joe-bowman commented Feb 16, 2025

1. Summary

Release v1.7.7

  • fixes inverted logic relating to GC of stale ICQ records
  • fixes unbonding record GC that deletes records with nil time
  • fix linting w.r.t golang-ci 1.64 (mostly fmt.Errorf -> errors.New)
  • add v1.7.7 no-op upgrade handler

Summary by CodeRabbit

  • Chores

    • Streamlined dependency management by removing unnecessary libraries and updating others to more stable and secure versions.
  • Bug Fixes

    • Improved processing logic for periodic queries to ensure correct event emissions.
    • Enhanced handling of unbonding transactions by preventing premature record deletion and addressing gaps for specific epochs.
    • Standardized error handling across multiple functions for improved consistency and readability.
  • New Features

    • Introduced a new upgrade entry for version "v1.7.7".
  • Tests

    • Added new test cases to enhance coverage for unbonding record handling in the interchain staking module.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 16, 2025

Walkthrough

This pull request updates dependency management across multiple Go modules and refines control flow in key functions. The main go.mod file removes several indirect dependencies and adjusts replace directives. In the icq-relayer module, dependency versions are updated with one new indirect dependency added, and the local replace directive is modified. Additionally, control flow changes include reversing a periodic query check in abci.go and improving unbonding record handling in ibc_packet_handlers.go. Furthermore, error handling is standardized across numerous files by replacing fmt.Errorf with errors.New.

Changes

Files Change Summary
go.mod and icq-relayer/go.mod Updated dependency management: Removed indirect dependencies and updated replacement directives in go.mod; in icq-relayer/go.mod, multiple dependency versions were updated, a new indirect dependency (github.com/hashicorp/go-uuid) was added, and the replace directive was modified.
x/.../keeper/abci.go Reversed conditional logic in the EndBlocker function to process periodic queries based on a negative period value.
x/.../keeper/ibc_packet_handlers.go Enhanced unbonding record handling: Added condition to ensure the completion time is non-zero before deleting records, and introduced temporary record creation in the HandleUndelegate function for epochs 258–261 when an unbonding record is missing.
.../github/workflows/golangci.yml Updated golangci-lint action version from v1.62.0 to v1.64.5.
.golangci.yml Removed linter tenv and added usetesting.
app/metrics.go, app/tps_counter.go, icq-relayer/pkg/runner/run.go, icq-relayer/pkg/types/client.go, test/simulation/simtypes/account.go, third-party-chains/osmosis-types/concentrated-liquidity/keys.go, third-party-chains/osmosis-types/concentrated-liquidity/math/tick.go, third-party-chains/osmosis-types/concentrated-liquidity/model/msgs.go, third-party-chains/osmosis-types/concentrated-liquidity/params.go, third-party-chains/osmosis-types/gamm/pool-models/balancer/pool.go, third-party-chains/osmosis-types/gamm/pool-models/balancer/pool_asset.go, third-party-chains/osmosis-types/lockup/msgs.go, third-party-chains/osmosis-types/osmomath/math.go, third-party-chains/osmosis-types/osmoutils/coin_helper.go, third-party-chains/osmosis-types/osmoutils/params_validation.go, third-party-chains/osmosis-types/osmoutils/parse.go, third-party-chains/osmosis-types/osmoutils/partialord/internal/dag/dag.go, x/interchainstaking/client/cli/query.go, x/interchainstaking/keeper/ibc_packet_handlers_test.go, x/interchainstaking/keeper/msg_server.go, x/interchainstaking/keeper/redemptions.go, x/interchainstaking/keeper/withdrawal_record.go, x/interchainstaking/types/delegation.go, x/interchainstaking/types/params.go, x/interchainstaking/types/redemptions.go, x/participationrewards/keeper/distribution.go, x/supply/keeper/grpc_query.go Standardized error handling by replacing fmt.Errorf with errors.New in various methods across multiple files.
app/upgrades/types.go Added new constant V010707UpgradeName = "v1.7.7" for upgrade names.
app/upgrades/upgrades.go Added new upgrade entry for V010707UpgradeName with NoOpHandler.

Sequence Diagram(s)

sequenceDiagram
    participant Keeper
    participant Query
    Keeper->>Query: Retrieve queryInfo.Period
    alt Period is negative (periodic query)
        Keeper->>Emitter: Process periodic query emission
    else
        Keeper->>Bypass: Skip emission for non-periodic query
    end
Loading
sequenceDiagram
    participant Handler
    participant Record
    Handler->>Record: Check if current time > CompletionTime and CompletionTime ≠ zero
    alt Condition met
        Handler->>Record: Delete matured unbonding record
    else
        alt Epoch 258-261 and missing record
            Handler->>Record: Create temporary unbonding record (no txn hash)
        else
            Handler->>Handler: No action taken
        end
    end
Loading

Suggested reviewers

  • faddat
  • ajansari95
  • arhamchordia

Poem

I'm a rabbit hopping with delight,
Seeing dependencies cleaned up just right.
Logic flipped with a nifty twist,
Unbonding flows now can't be missed.
Code carrots abound—oh what a sight!
Leap forward, dear coders, into the night.
🐇💻


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d45366e and e3b5866.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (1)
  • go.mod (0 hunks)
💤 Files with no reviewable changes (1)
  • go.mod
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: build quicksilver (darwin, arm64)
  • GitHub Check: test (1.23.3, macos-latest)
  • GitHub Check: build quicksilver (amd64, darwin)
  • GitHub Check: build quicksilver (amd64, windows)
  • GitHub Check: test (1.23.3, ubuntu-latest)
  • GitHub Check: build quicksilver (amd64, linux)
  • GitHub Check: Analyze
  • GitHub Check: lint
  • GitHub Check: Analyze

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

🧹 Nitpick comments (16)
x/interchainstaking/keeper/ibc_packet_handlers.go (1)

791-806: Verify the temporary fix for epochs 258-261.

This code block adds a temporary fix for a specific bug that occurred during epochs 258-261 where unbonding records were not found. The fix creates a stub unbonding record without a related txhash, allowing the unbond transaction to be rescheduled in the next epoch.

Consider adding a TODO comment to track the removal of this temporary fix once all affected epochs are processed.

icq-relayer/go.mod (15)

15-15: Dependency Update: Quicksilver v1.7.6
The module version for github.com/quicksilver-zone/quicksilver has been updated to v1.7.6. Please verify that this update is compatible with all dependent modules within the project.


25-25: Dependency Update: cloud.google.com/go/auth v0.14.1
The dependency for cloud.google.com/go/auth has been updated to v0.14.1. Ensure that this upgrade does not affect authentication workflows or introduce incompatibilities in related modules.


118-118: New Indirect Dependency: HashiCorp go-uuid v1.0.3
A new indirect dependency github.com/hashicorp/go-uuid (v1.0.3) has been added. Confirm that this dependency is necessary for the intended functionality and that it does not introduce any conflicts.


143-143: Dependency Update: moby/sys/user v0.3.0
The dependency github.com/moby/sys/user has been updated to v0.3.0. Verify that any functionality relying on system user operations works as expected with the updated version.


146-146: Dependency Update: onsi/gomega v1.36.2
The testing framework github.com/onsi/gomega has been updated to v1.36.2. Please rerun the full test suite to ensure that no regressions or incompatibilities have been introduced.


164-164: Dependency Update: spf13/afero v1.12.0
The spf13/afero dependency has been upgraded to v1.12.0. This update may include bug fixes or improvements in file system abstractions. Ensure compatibility with file I/O operations in the project.


184-184: Dependency Update: OpenTelemetry SDK v1.34.0
The OpenTelemetry SDK go.opentelemetry.io/otel/sdk is updated to v1.34.0. Please confirm that telemetry instrumentation and related integrations continue to function correctly after this update.


188-188: Dependency Update: golang.org/x/crypto v0.33.0
The cryptography package golang.org/x/crypto has been updated to v0.33.0. Verify that all cryptographic operations remain secure and that there are no breaking changes affecting crypto functions.


190-190: Dependency Update: golang.org/x/net v0.35.0
The networking library golang.org/x/net is updated to v0.35.0. Ensure that network operations and protocols continue to behave correctly with the new version.


192-192: Dependency Update: golang.org/x/sync v0.11.0
The golang.org/x/sync package has been updated to v0.11.0. Please verify that synchronization primitives and concurrent routines function as intended.


193-193: Dependency Update: golang.org/x/sys v0.30.0
The system interface package golang.org/x/sys is updated to v0.30.0. This update could affect low-level system calls; ensure that any such interactions in the project remain stable.


194-194: Dependency Update: golang.org/x/term v0.29.0
The terminal handling library golang.org/x/term has been updated to v0.29.0. It is advisable to test any console-based operations to confirm they are unaffected by this update.


195-195: Dependency Update: golang.org/x/text v0.22.0
The text processing dependency golang.org/x/text is now at v0.22.0. Check for any changes in string processing or formatting that might impact the application's output.


197-197: Dependency Update: google.golang.org/api v0.220.0
The Google API package google.golang.org/api has been updated to v0.220.0. Please validate that all integrations with Google services work correctly with this new version.


202-202: Dependency Update: google.golang.org/protobuf v1.36.5
The protobuf library google.golang.org/protobuf is now at v1.36.5. Ensure that Protobuf serialization and deserialization remain compatible with existing definitions and data formats.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cf01d91 and 379806e.

⛔ Files ignored due to path filters (3)
  • go.sum is excluded by !**/*.sum
  • go.work.sum is excluded by !**/*.sum
  • icq-relayer/go.sum is excluded by !**/*.sum
📒 Files selected for processing (4)
  • go.mod (0 hunks)
  • icq-relayer/go.mod (7 hunks)
  • x/interchainquery/keeper/abci.go (1 hunks)
  • x/interchainstaking/keeper/ibc_packet_handlers.go (3 hunks)
💤 Files with no reviewable changes (1)
  • go.mod
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: test quicksilver (darwin, arm64)
  • GitHub Check: test quicksilver (amd64, windows)
  • GitHub Check: test quicksilver (amd64, linux)
  • GitHub Check: Analyze
  • GitHub Check: Analyze
🔇 Additional comments (4)
x/interchainquery/keeper/abci.go (1)

25-25: Verify the inverted logic for periodic query handling.

The condition has been inverted from !queryInfo.Period.IsNegative() to queryInfo.Period.IsNegative(). This changes the behavior to process non-periodic queries instead of periodic ones, which aligns with the PR objectives for fixing GC of stale ICQ records.

x/interchainstaking/keeper/ibc_packet_handlers.go (2)

563-563: LGTM! Additional check prevents deletion of records with zero completion time.

The added condition !record.CompletionTime.Equal(time.Time{}) ensures that unbonding records with a zero completion time are not erroneously deleted, which aligns with the PR objectives.


827-828: LGTM! Setting completion time for unbonding record.

The changes properly update the completion time for the unbonding record and persist it to storage.

icq-relayer/go.mod (1)

137-137: Dependency Update: mattn/go-colorable v0.1.14
The version of github.com/mattn/go-colorable has been updated to v0.1.14. This change should help with colored terminal output; please ensure downstream consumers render colors correctly.

@codecov
Copy link

codecov bot commented Feb 16, 2025

Codecov Report

Attention: Patch coverage is 63.46154% with 19 lines in your changes missing coverage. Please review.

Project coverage is 63.07%. Comparing base (75334d4) to head (e3b5866).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
utils/proofs/proofs.go 0.00% 4 Missing ⚠️
x/interchainstaking/keeper/withdrawal_record.go 40.00% 3 Missing ⚠️
x/interchainstaking/types/redemptions.go 0.00% 3 Missing ⚠️
x/interchainstaking/keeper/msg_server.go 60.00% 2 Missing ⚠️
app/metrics.go 0.00% 1 Missing ⚠️
app/tps_counter.go 0.00% 1 Missing ⚠️
x/interchainquery/keeper/abci.go 0.00% 1 Missing ⚠️
x/interchainstaking/keeper/ibc_packet_handlers.go 95.23% 1 Missing ⚠️
x/interchainstaking/keeper/redemptions.go 0.00% 1 Missing ⚠️
x/interchainstaking/types/params.go 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1821      +/-   ##
==========================================
+ Coverage   62.95%   63.07%   +0.11%     
==========================================
  Files         172      172              
  Lines       15537    15549      +12     
==========================================
+ Hits         9781     9807      +26     
+ Misses       4945     4933      -12     
+ Partials      811      809       -2     
Flag Coverage Δ
unittests 63.07% <63.46%> (+0.11%) ⬆️

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

Files with missing lines Coverage Δ
app/upgrades/types.go 50.00% <ø> (ø)
app/upgrades/upgrades.go 88.88% <100.00%> (+0.42%) ⬆️
utils/coins.go 54.16% <100.00%> (ø)
x/interchainstaking/client/cli/query.go 62.59% <100.00%> (ø)
x/interchainstaking/types/delegation.go 75.48% <100.00%> (ø)
x/supply/keeper/grpc_query.go 100.00% <100.00%> (ø)
app/metrics.go 0.00% <0.00%> (ø)
app/tps_counter.go 15.15% <0.00%> (ø)
x/interchainquery/keeper/abci.go 13.15% <0.00%> (ø)
x/interchainstaking/keeper/ibc_packet_handlers.go 61.68% <95.23%> (+1.30%) ⬆️
... and 7 more

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

🧹 Nitpick comments (6)
third-party-chains/osmosis-types/osmoutils/params_validation.go (1)

26-26: Consider preserving error context in the error message.

The change from fmt.Errorf to errors.New loses valuable debugging information about which address was invalid. Consider wrapping the original error to preserve context:

-			return errors.New("invalid address")
+			return fmt.Errorf("invalid address %q: %w", a, err)
x/supply/keeper/grpc_query.go (1)

45-45: Consider defining the reused error message as a constant.

Since the "endpoint disabled" error is used in multiple methods, consider defining it as a package-level constant:

+var errEndpointDisabled = errors.New("endpoint disabled")
+
 func (q Querier) Supply(c context.Context, _ *types.QuerySupplyRequest) (*types.QuerySupplyResponse, error) {
   // ...
-  return nil, errors.New("endpoint disabled")
+  return nil, errEndpointDisabled
 }

 func (q Querier) TopN(c context.Context, req *types.QueryTopNRequest) (*types.QueryTopNResponse, error) {
   // ...
-  return nil, errors.New("endpoint disabled")
+  return nil, errEndpointDisabled
 }

Also applies to: 57-57

app/tps_counter.go (1)

115-115: Consider improving error handling for overflow condition.

While the change to errors.New is appropriate, this error leads to a panic in the start method. Consider handling the overflow condition more gracefully.

-		if err == nil {
-			nTxn += nSuccess
-		} else {
-			panic(err)
-		}
+		if err != nil {
+			tpc.logger.Error("Error recording transaction value", "error", err)
+			continue
+		}
+		nTxn += nSuccess
third-party-chains/osmosis-types/osmoutils/coin_helper.go (1)

13-13: Consider extracting the common error message.

The same error message is duplicated across three functions. Consider extracting it to a package-level constant to improve maintainability.

+const errUnequalLengthArrays = "DecCoin arrays must be of equal length to be subtracted"

 func SubDecCoinArrays(decCoinsArrayA []sdk.DecCoins, decCoinsArrayB []sdk.DecCoins) ([]sdk.DecCoins, error) {
 	if len(decCoinsArrayA) != len(decCoinsArrayB) {
-		return []sdk.DecCoins{}, errors.New("DecCoin arrays must be of equal length to be subtracted")
+		return []sdk.DecCoins{}, errors.New(errUnequalLengthArrays)
 	}

Also applies to: 29-29, 45-45

x/interchainstaking/types/redemptions.go (1)

86-86: Fix duplicate error code in error message.

The error message at line 181 uses error code "(2)" which is already used at line 137. This could cause confusion when debugging. Consider using "(3)" instead.

Apply this diff to fix the error code:

-		return map[string]math.Int{}, errors.New("input is unexpectedly negative (2), aborting")
+		return map[string]math.Int{}, errors.New("input is unexpectedly negative (3), aborting")

Also applies to: 137-137, 181-181

.golangci.yml (1)

26-27: Addition of "usetesting" linter.
The new linter "usetesting" has been added to the enabled linters list to potentially improve test-related validations. Ensure that this linter integrates well with our existing development practices and that its checks don’t lead to unexpected warnings or false positives.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 379806e and d45366e.

📒 Files selected for processing (34)
  • .github/workflows/golangci.yml (1 hunks)
  • .golangci.yml (1 hunks)
  • app/metrics.go (2 hunks)
  • app/tps_counter.go (2 hunks)
  • app/upgrades/types.go (1 hunks)
  • app/upgrades/upgrades.go (1 hunks)
  • icq-relayer/pkg/runner/run.go (4 hunks)
  • icq-relayer/pkg/types/client.go (2 hunks)
  • test/simulation/simtypes/account.go (1 hunks)
  • third-party-chains/osmosis-types/concentrated-liquidity/keys.go (2 hunks)
  • third-party-chains/osmosis-types/concentrated-liquidity/math/tick.go (1 hunks)
  • third-party-chains/osmosis-types/concentrated-liquidity/model/msgs.go (2 hunks)
  • third-party-chains/osmosis-types/concentrated-liquidity/params.go (4 hunks)
  • third-party-chains/osmosis-types/gamm/pool-models/balancer/pool.go (4 hunks)
  • third-party-chains/osmosis-types/gamm/pool-models/balancer/pool_asset.go (2 hunks)
  • third-party-chains/osmosis-types/lockup/msgs.go (4 hunks)
  • third-party-chains/osmosis-types/osmomath/math.go (3 hunks)
  • third-party-chains/osmosis-types/osmoutils/coin_helper.go (4 hunks)
  • third-party-chains/osmosis-types/osmoutils/params_validation.go (2 hunks)
  • third-party-chains/osmosis-types/osmoutils/parse.go (2 hunks)
  • third-party-chains/osmosis-types/osmoutils/partialord/internal/dag/dag.go (3 hunks)
  • utils/coins.go (2 hunks)
  • utils/proofs/proofs.go (4 hunks)
  • x/interchainstaking/client/cli/query.go (2 hunks)
  • x/interchainstaking/keeper/ibc_packet_handlers.go (5 hunks)
  • x/interchainstaking/keeper/ibc_packet_handlers_test.go (2 hunks)
  • x/interchainstaking/keeper/msg_server.go (2 hunks)
  • x/interchainstaking/keeper/redemptions.go (1 hunks)
  • x/interchainstaking/keeper/withdrawal_record.go (5 hunks)
  • x/interchainstaking/types/delegation.go (1 hunks)
  • x/interchainstaking/types/params.go (1 hunks)
  • x/interchainstaking/types/redemptions.go (4 hunks)
  • x/participationrewards/keeper/distribution.go (2 hunks)
  • x/supply/keeper/grpc_query.go (3 hunks)
✅ Files skipped from review due to trivial changes (2)
  • third-party-chains/osmosis-types/concentrated-liquidity/math/tick.go
  • x/interchainstaking/keeper/redemptions.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • x/interchainstaking/keeper/ibc_packet_handlers.go
⏰ Context from checks skipped due to timeout of 90000ms (14)
  • GitHub Check: test quicksilver (darwin, arm64)
  • GitHub Check: test quicksilver (amd64, windows)
  • GitHub Check: test quicksilver (amd64, linux)
  • GitHub Check: build quicksilver (darwin, arm64)
  • GitHub Check: test (1.23.3, macos-latest)
  • GitHub Check: build quicksilver (amd64, darwin)
  • GitHub Check: build quicksilver (amd64, windows)
  • GitHub Check: test (1.23.3, ubuntu-latest)
  • GitHub Check: Analyze
  • GitHub Check: build quicksilver (amd64, linux)
  • GitHub Check: lint
  • GitHub Check: test (1.23.3, macos-latest)
  • GitHub Check: test (1.23.3, ubuntu-latest)
  • GitHub Check: Analyze
🔇 Additional comments (34)
third-party-chains/osmosis-types/osmoutils/parse.go (1)

27-27: LGTM!

The error messages are clear and descriptive. Since they don't require dynamic formatting, using errors.New is appropriate here.

Also applies to: 31-31

utils/coins.go (1)

22-22: LGTM!

The error message is clear and appropriate for the empty denom case. The remaining fmt.Errorf usage is correctly preserved where dynamic values are needed.

app/metrics.go (1)

38-38: LGTM! Error handling improvement.

The change from fmt.Errorf to errors.New for static error messages aligns with best practices and the codebase-wide standardization effort.

utils/proofs/proofs.go (1)

32-32: LGTM! Consistent error handling improvements.

The changes appropriately use:

  • errors.New for static error messages
  • fmt.Errorf for dynamic error messages with variables

This maintains good error handling practices while improving consistency.

Also applies to: 53-53, 57-57, 77-77

third-party-chains/osmosis-types/concentrated-liquidity/model/msgs.go (1)

50-50: LGTM! Appropriate error handling change.

The change to errors.New for the static error message is appropriate, while maintaining fmt.Errorf for error messages with dynamic content.

third-party-chains/osmosis-types/gamm/pool-models/balancer/pool_asset.go (1)

27-27: LGTM! Error handling improvement.

The change to errors.New is appropriate here as the error message is static and doesn't require formatting.

x/interchainstaking/types/params.go (1)

171-171: LGTM! Error handling improvement.

The change to errors.New is appropriate here as the error message for nil value is static and doesn't require formatting.

x/interchainstaking/types/delegation.go (1)

148-148: LGTM! Standardized error handling.

The changes simplify error creation by using errors.New instead of fmt.Errorf for static error messages, which is a good practice as it's more efficient when formatting is not needed.

Also applies to: 151-151

third-party-chains/osmosis-types/lockup/msgs.go (1)

53-53: LGTM! Standardized error handling.

The changes consistently use errors.New for static error messages across multiple ValidateBasic methods, improving code consistency and efficiency.

Also applies to: 125-125, 157-157

test/simulation/simtypes/account.go (1)

220-220: LGTM! Standardized error handling.

The change simplifies error creation by using errors.New for the static error message, consistent with the project's error handling standards.

third-party-chains/osmosis-types/osmoutils/partialord/internal/dag/dag.go (2)

64-65: LGTM! Appropriate use of errors.New for static error messages.

The change from fmt.Errorf to errors.New for static error messages is a good improvement. This is more efficient as it avoids unnecessary string formatting.

Also applies to: 78-79


67-68: LGTM! Consistent error handling improvement.

The change to errors.New maintains consistency with the other error handling changes.

third-party-chains/osmosis-types/concentrated-liquidity/params.go (1)

122-123: LGTM! Appropriate use of errors.New for static error messages.

The changes from fmt.Errorf to errors.New for static error messages in validation functions are good improvements. This is more efficient as it avoids unnecessary string formatting.

Also applies to: 175-176, 231-232

x/participationrewards/keeper/distribution.go (1)

72-74: LGTM! Appropriate use of errors.New for static error messages.

The changes from fmt.Errorf to errors.New for static error messages in pool data validation are good improvements. This is more efficient as it avoids unnecessary string formatting.

Also applies to: 133-135

x/interchainstaking/keeper/withdrawal_record.go (2)

56-58: LGTM! Appropriate use of errors.New for validation error messages.

The changes from fmt.Errorf to errors.New for static error messages in withdrawal record validation are good improvements. This is more efficient as it avoids unnecessary string formatting.

Also applies to: 90-92, 94-96


289-291: LGTM! Appropriate use of errors.New for overflow error messages.

The changes from fmt.Errorf to errors.New for static error messages in slashing event handling are good improvements. The error messages clearly indicate potential overflow conditions.

Also applies to: 305-307

third-party-chains/osmosis-types/concentrated-liquidity/keys.go (1)

274-274: LGTM! Appropriate use of errors.New.

The change from fmt.Errorf to errors.New is correct here as these are static error messages without any variable interpolation.

Also applies to: 278-278

x/interchainstaking/client/cli/query.go (1)

456-456: LGTM! Appropriate use of errors.New.

The change from fmt.Errorf to errors.New is correct here as this is a static error message without any variable interpolation.

x/interchainstaking/keeper/msg_server.go (1)

37-37: LGTM! Appropriate use of errors.New.

The changes from fmt.Errorf to errors.New are correct here as these are static error messages without any variable interpolation.

Also applies to: 190-190, 195-195, 199-199, 202-202

icq-relayer/pkg/types/client.go (1)

157-157: LGTM! Appropriate use of errors.New.

The changes from fmt.Errorf to errors.New are correct here as these are static error messages without any variable interpolation.

Also applies to: 453-453, 457-457, 461-461

icq-relayer/pkg/runner/run.go (3)

6-6: LGTM!

The addition of the errors package import is necessary for the subsequent error handling changes.


376-376: LGTM!

The change from fmt.Errorf to errors.New is appropriate here as the error message is static and doesn't require formatting.


532-532: LGTM!

The change from fmt.Errorf to errors.New is appropriate here as the error message is static and doesn't require formatting.

third-party-chains/osmosis-types/gamm/pool-models/balancer/pool.go (4)

145-145: LGTM!

The change from fmt.Errorf to errors.New is appropriate here as the error message is static and doesn't require formatting.


154-154: LGTM!

The change from fmt.Errorf to errors.New is appropriate here as the error message is static and doesn't require formatting.


226-226: LGTM!

The change from fmt.Errorf to errors.New is appropriate here as the error message is static and doesn't require formatting.


305-305: LGTM!

The change from fmt.Errorf to errors.New is appropriate here as the error message is static and doesn't require formatting.

x/interchainstaking/keeper/ibc_packet_handlers_test.go (4)

4983-5007: LGTM! Test verifies that future unbonding records are preserved.

The test ensures that unbonding records with a future completion time are not deleted when HandleMaturedUnbondings is called, which aligns with the PR's GC fixes.


5009-5033: LGTM! Test verifies that expired unbonding records are deleted.

The test confirms that unbonding records with a completion time in the past are properly deleted by the GC, which directly addresses the PR's focus on fixing GC issues.


5035-5059: LGTM! Test verifies that records with nil completion time are preserved.

The test validates that unbonding records with a zero completion time are not deleted, which aligns with the PR's fix for the GC of unbonding records that have a nil time.


5061-5085: LGTM! Test verifies creation of new unbonding records.

The test ensures that a new unbonding record is correctly created with the expected properties when no existing record is found for epoch 259. This provides coverage for the record creation logic.

.github/workflows/golangci.yml (1)

31-32: Update golangci-lint version to v1.64.5.
This update ensures that we are leveraging the latest improvements, bug fixes, and features from golangci-lint. Please verify that this newer version produces consistent linting results within our CI pipeline and that any changes in lint warnings are duly addressed.

app/upgrades/upgrades.go (1)

32-32:

Details

✅ Verification successful

Verify if NoOpHandler is appropriate for GC fixes.

The PR objectives mention fixes for garbage collection of stale ICQ records and unbonding records. Please verify if these fixes require state manipulation, as using NoOpHandler implies no state changes are needed.


🏁 Script executed:

#!/bin/bash
# Description: Search for GC-related changes in the codebase.

# Test: Search for ICQ and unbonding record changes. Expect: Changes in GC logic.
rg -A 5 'ICQ|unbonding.*record'

Length of output: 35484


No state migration required – NoOpHandler is appropriate for this upgrade

After reviewing the GC-related changes in the repository, we confirmed that:

  • Garbage collection for unbonding records is handled via runtime logic and, where necessary, through a dedicated upgrade (see the deletion logic in app/upgrades/v1_7.go).
  • The changes for stale ICQ records follow similar patterns without requiring an explicit state migration during the V010707 upgrade.

Thus, using the NoOpHandler in app/upgrades/upgrades.go for V010707 is consistent with the overall implementation and does not introduce any issues.

app/upgrades/types.go (1)

57-57: LGTM!

The new constant follows the correct version naming convention and is appropriately placed in the mainnet upgrades section.

@joe-bowman joe-bowman merged commit bd187e1 into main Feb 17, 2025
22 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Mar 31, 2025
@coderabbitai coderabbitai bot mentioned this pull request Jul 22, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant