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

chore(all)!: use gogoproto/any instead of codec/types/any #21013

Merged
merged 8 commits into from
Jul 22, 2024

Conversation

facundomedica
Copy link
Member

@facundomedica facundomedica commented Jul 22, 2024

Description

This also removes completely the interfaces AnyUnpacker and UnpackInterfacesMessage, to avoid users using the wrong one.

We can leave codectypes.Any for now if we want, or we can decide to remove that too and use the one in gogoproto.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • New Features

    • Introduced gogoprotoany library for improved interface unpacking across multiple modules.
    • Enhanced support for nested multisignature keys in testing.
  • Bug Fixes

    • Addressed compatibility issues with UnpackInterfacesMessage and AnyUnpacker across various components.
  • Documentation

    • Updated upgrade instructions to reflect changes in type mapping and best practices for module developers.
  • Chores

    • Refactored interface implementations to ensure alignment with gogoprotoany standards in numerous files throughout the codebase.

Copy link
Contributor

coderabbitai bot commented Jul 22, 2024

Walkthrough

Walkthrough

The recent changes in the Cosmos SDK involve a significant transition from using codectypes to the gogoprotoany package for handling interface unpacking. This shift enhances compatibility and standardizes interface definitions across the SDK, improving functionality for developers. Code adjustments are necessary to utilize the new AnyUnpacker and UnpackInterfacesMessage types, facilitating better interaction with protocol buffers across various modules.

Changes

Files Change Summary
client/..., crypto/..., x/..., types/... Updated interface unpacking from codectypes to gogoprotoany for various types and methods.
codec/... Modified import statements and updated UnmarshalInterface to use gogoprotoany.AnyUnpacker.
testutil/... Adjusted test cases to reflect new unpacking interfaces.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant SDK
    participant gogoprotoany

    Developer->>SDK: Update code to use gogoprotoany
    SDK->>gogoprotoany: Call methods using AnyUnpacker
    gogoprotoany-->>SDK: Return unpacked interfaces
    SDK-->>Developer: Provide updated functionality and compatibility
Loading

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

Can you reword the UPGRADING.md?

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, codebase verification and nitpick comments (1)
types/result.go (1)

163-163: Update missed for UnpackInterfacesMessage type in server/v2/cometbft/client/grpc/cmtservice/service.go

The variable declaration has been correctly updated to use gogoprotoany.UnpackInterfacesMessage in most places. However, there is still an instance in server/v2/cometbft/client/grpc/cmtservice/service.go that uses codectypes.UnpackInterfacesMessage.

  • File: server/v2/cometbft/client/grpc/cmtservice/service.go
  • Line: server/v2/cometbft/client/grpc/cmtservice/service.go: _ codectypes.UnpackInterfacesMessage = &GetLatestValidatorSetResponse{}

Please update this instance to use gogoprotoany.UnpackInterfacesMessage.

Analysis chain

LGTM! But verify the usage of the new UnpackInterfacesMessage type.

The variable declaration has been correctly updated to use gogoprotoany.UnpackInterfacesMessage.

Ensure that all usages of UnpackInterfacesMessage are updated to the new type.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all usages of `UnpackInterfacesMessage` are updated to the new type.

# Test: Search for the usage of `UnpackInterfacesMessage`. Expect: Only occurrences of `gogoprotoany.UnpackInterfacesMessage`.
rg --type go -A 5 $'UnpackInterfacesMessage'

Length of output: 29646

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 331eaf4 and 5481b81.

Files selected for processing (47)
  • client/grpc/cmtservice/service.go (3 hunks)
  • client/keys/output_test.go (2 hunks)
  • codec/codec.go (2 hunks)
  • codec/types/interface_registry.go (3 hunks)
  • crypto/keyring/legacy_info.go (2 hunks)
  • crypto/keyring/record.go (2 hunks)
  • crypto/keys/multisig/multisig.go (3 hunks)
  • server/v2/cometbft/client/grpc/cmtservice/service.go (2 hunks)
  • testutil/testdata/animal.go (4 hunks)
  • testutil/testdata/grpc_query.go (2 hunks)
  • types/result.go (3 hunks)
  • types/tx/direct_aux.go (3 hunks)
  • types/tx/ext.go (1 hunks)
  • types/tx/msgs.go (2 hunks)
  • types/tx/signing/signature.go (3 hunks)
  • types/tx/types.go (5 hunks)
  • x/auth/migrations/legacytx/stdsign.go (2 hunks)
  • x/auth/migrations/legacytx/stdsignmsg.go (2 hunks)
  • x/auth/migrations/legacytx/stdtx.go (2 hunks)
  • x/auth/types/account.go (2 hunks)
  • x/auth/types/genesis.go (2 hunks)
  • x/auth/types/query.go (1 hunks)
  • x/authz/authorization_grant.go (3 hunks)
  • x/authz/genesis.go (3 hunks)
  • x/authz/msgs.go (5 hunks)
  • x/authz/simulation/operations.go (2 hunks)
  • x/evidence/types/genesis.go (2 hunks)
  • x/evidence/types/genesis_test.go (2 hunks)
  • x/evidence/types/msgs.go (3 hunks)
  • x/feegrant/filtered_fee.go (2 hunks)
  • x/feegrant/genesis.go (2 hunks)
  • x/feegrant/grant.go (2 hunks)
  • x/feegrant/msgs.go (3 hunks)
  • x/gov/types/v1/genesis.go (2 hunks)
  • x/gov/types/v1/msgs.go (3 hunks)
  • x/gov/types/v1/proposal.go (3 hunks)
  • x/gov/types/v1beta1/genesis.go (2 hunks)
  • x/gov/types/v1beta1/msgs.go (3 hunks)
  • x/gov/types/v1beta1/proposal.go (3 hunks)
  • x/group/genesis.go (2 hunks)
  • x/group/msgs.go (6 hunks)
  • x/group/proposal.go (2 hunks)
  • x/group/simulation/operations.go (2 hunks)
  • x/group/types.go (3 hunks)
  • x/staking/types/genesis.go (2 hunks)
  • x/staking/types/msg.go (4 hunks)
  • x/staking/types/validator.go (3 hunks)
Additional context used
Path-based instructions (47)
x/auth/types/query.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

types/tx/ext.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/group/proposal.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/feegrant/genesis.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/auth/migrations/legacytx/stdsignmsg.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/staking/types/genesis.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/authz/genesis.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/evidence/types/msgs.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/evidence/types/genesis.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

types/tx/msgs.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/feegrant/msgs.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

testutil/testdata/animal.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/feegrant/grant.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/authz/authorization_grant.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

types/tx/direct_aux.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/gov/types/v1beta1/genesis.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/group/genesis.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/gov/types/v1beta1/msgs.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

testutil/testdata/grpc_query.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/authz/msgs.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/gov/types/v1/genesis.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

types/tx/signing/signature.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/evidence/types/genesis_test.go (2)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

crypto/keyring/record.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/gov/types/v1/proposal.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/gov/types/v1/msgs.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/feegrant/filtered_fee.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

types/result.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/auth/migrations/legacytx/stdsign.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

client/keys/output_test.go (2)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

codec/codec.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/auth/migrations/legacytx/stdtx.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

crypto/keys/multisig/multisig.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/auth/types/genesis.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/staking/types/msg.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

types/tx/types.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/gov/types/v1beta1/proposal.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/group/msgs.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

crypto/keyring/legacy_info.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

client/grpc/cmtservice/service.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

server/v2/cometbft/client/grpc/cmtservice/service.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/auth/types/account.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

codec/types/interface_registry.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/authz/simulation/operations.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/staking/types/validator.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/group/types.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/group/simulation/operations.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

golangci-lint
types/tx/signing/signature.go

7-7: File is not gci-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order

(gci)

types/result.go

13-13: File is not gci-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order

(gci)

codec/codec.go

9-9: File is not gci-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order

(gci)

crypto/keys/multisig/multisig.go

12-12: File is not gci-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order

(gci)

types/tx/types.go

15-15: File is not gci-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order

(gci)

Additional comments not posted (135)
x/auth/types/query.go (2)

8-11: LGTM! Verify the usage of gogoprotoany.AnyUnpacker.

The method signature update to use gogoprotoany.AnyUnpacker looks good. Ensure that all usages of AnyUnpacker are updated accordingly.

Verification successful

All usages of AnyUnpacker have been successfully updated to gogoprotoany.AnyUnpacker.

The method signature update to use gogoprotoany.AnyUnpacker is consistently applied across the codebase.

  • Files and methods updated:
    • x/staking/types/validator.go
    • x/staking/types/msg.go
    • x/staking/types/genesis.go
    • x/group/proposal.go
    • x/group/types.go
    • x/group/msgs.go
    • x/group/genesis.go
    • x/group/simulation/operations.go
    • x/gov/types/v1beta1/genesis.go
    • x/gov/types/v1beta1/proposal.go
    • x/gov/types/v1beta1/msgs.go
    • x/gov/types/v1/proposal.go
    • x/gov/types/v1/msgs.go
    • x/feegrant/msgs.go
    • x/feegrant/genesis.go
    • x/feegrant/grant.go
    • x/feegrant/filtered_fee.go
    • x/authz/msgs.go
    • x/authz/genesis.go
    • x/authz/authorization_grant.go
    • x/evidence/types/msgs.go
    • x/evidence/types/genesis.go
    • x/auth/types/query.go
    • x/auth/types/genesis.go
    • x/auth/types/account.go
    • x/auth/migrations/legacytx/stdtx.go
    • x/auth/migrations/legacytx/stdsign.go
    • types/result.go
    • types/tx/types.go
    • types/tx/msgs.go
    • types/tx/ext.go
    • types/tx/direct_aux.go
    • types/tx/signing/signature.go
    • x/auth/migrations/legacytx/stdsignmsg.go
    • testutil/testdata/grpc_query.go
    • server/v2/cometbft/client/grpc/cmtservice/service.go
    • testutil/testdata/animal.go
    • crypto/keyring/legacy_info.go
    • crypto/keyring/record.go
    • crypto/keys/multisig/multisig.go
    • client/grpc/cmtservice/service.go
    • codec/codec.go
    • codec/types/interface_registry.go
    • codec/proto_codec.go
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all usages of `AnyUnpacker` are updated to `gogoprotoany.AnyUnpacker`.

# Test: Search for the usage of `AnyUnpacker`. Expect: Only occurances of `gogoprotoany.AnyUnpacker`.
rg --type go -A 5 $'AnyUnpacker'

Length of output: 25136


13-13: LGTM! Verify the usage of gogoprotoany.UnpackInterfacesMessage.

The variable declaration update to use gogoprotoany.UnpackInterfacesMessage looks good. Ensure that all usages of UnpackInterfacesMessage are updated accordingly.

Verification successful

All instances of UnpackInterfacesMessage have been successfully updated to gogoprotoany.UnpackInterfacesMessage.

The variable declaration update and subsequent usage changes have been verified and are consistent across the codebase.

  • Verified files include:
    • x/staking/types/validator.go
    • x/staking/types/msg.go
    • x/staking/types/genesis.go
    • x/group/types.go
    • x/group/proposal.go
    • x/group/msgs.go
    • x/group/genesis.go
    • x/gov/types/v1beta1/proposal.go
    • x/gov/types/v1beta1/msgs.go
    • x/gov/types/v1beta1/genesis.go
    • x/gov/types/v1/proposal.go
    • x/gov/types/v1/msgs.go
    • x/gov/types/v1/genesis.go
    • x/feegrant/msgs.go
    • x/feegrant/grant.go
    • x/feegrant/genesis.go
    • x/feegrant/filtered_fee.go
    • x/evidence/types/msgs.go
    • x/evidence/types/genesis.go
    • x/authz/msgs.go
    • x/authz/authorization_grant.go
    • x/authz/genesis.go
    • x/auth/migrations/legacytx/stdtx.go
    • x/auth/migrations/legacytx/stdsignmsg.go
    • types/result.go
    • x/auth/types/query.go
    • x/auth/types/account.go
    • types/tx/types.go
    • types/tx/signing/signature.go
    • testutil/testdata/grpc_query.go
    • testutil/testdata/animal.go
    • x/auth/types/genesis.go
    • server/v2/cometbft/client/grpc/cmtservice/service.go
    • crypto/keys/multisig/multisig.go
    • crypto/keyring/legacy_info.go
    • crypto/keyring/record.go
    • codec/types/interface_registry.go
    • codec/any_test.go
    • client/grpc/cmtservice/service.go
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all usages of `UnpackInterfacesMessage` are updated to `gogoprotoany.UnpackInterfacesMessage`.

# Test: Search for the usage of `UnpackInterfacesMessage`. Expect: Only occurances of `gogoprotoany.UnpackInterfacesMessage`.
rg --type go -A 5 $'UnpackInterfacesMessage'

Length of output: 29646

types/tx/ext.go (1)

Line range hint 12-20: LGTM! Verify the usage of gogoprotoany.AnyUnpacker.

The function signature update to use gogoprotoany.AnyUnpacker looks good. Ensure that all usages of AnyUnpacker are updated accordingly.

Verification successful

Verification successful!

All instances of AnyUnpacker have been correctly updated to gogoprotoany.AnyUnpacker across the codebase.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all usages of `AnyUnpacker` are updated to `gogoprotoany.AnyUnpacker`.

# Test: Search for the usage of `AnyUnpacker`. Expect: Only occurances of `gogoprotoany.AnyUnpacker`.
rg --type go -A 5 $'AnyUnpacker'

Length of output: 25136

x/group/proposal.go (1)

25-27: LGTM! Verify the usage of gogoprotoany.AnyUnpacker.

The method signature update to use gogoprotoany.AnyUnpacker looks good. Ensure that all usages of AnyUnpacker are updated accordingly.

Verification successful

Verification successful!

The usage of gogoprotoany.AnyUnpacker is consistent across the codebase, confirming the update from types.AnyUnpacker to gogoprotoany.AnyUnpacker has been correctly applied.

  • All instances of AnyUnpacker are now using gogoprotoany.AnyUnpacker.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all usages of `AnyUnpacker` are updated to `gogoprotoany.AnyUnpacker`.

# Test: Search for the usage of `AnyUnpacker`. Expect: Only occurances of `gogoprotoany.AnyUnpacker`.
rg --type go -A 5 $'AnyUnpacker'

Length of output: 25136

x/feegrant/genesis.go (3)

4-4: LGTM!

The import statement has been correctly updated to use gogoprotoany instead of types.


7-7: LGTM!

The variable declaration has been correctly updated to reflect the new gogoprotoany.UnpackInterfacesMessage interface.


37-37: LGTM!

The function signature has been correctly updated to use gogoprotoany.AnyUnpacker instead of types.AnyUnpacker.

x/auth/migrations/legacytx/stdsignmsg.go (3)

6-6: LGTM!

The import statement has been correctly updated to use gogoprotoany instead of types.


9-9: LGTM!

The variable declaration has been correctly updated to reflect the new gogoprotoany.UnpackInterfacesMessage interface.


23-23: LGTM!

The function signature has been correctly updated to use gogoprotoany.AnyUnpacker instead of types.AnyUnpacker.

x/staking/types/genesis.go (2)

7-7: LGTM!

The import statement has been correctly updated to use gogoprotoany instead of codectypes.


39-39: LGTM!

The function signature has been correctly updated to use gogoprotoany.AnyUnpacker instead of codectypes.AnyUnpacker.

x/authz/genesis.go (3)

6-6: Import change approved.

The import statement for cdctypes is correctly replaced with gogoprotoany.


35-35: Interface implementation change approved.

The interface implementation for GenesisState is correctly updated from cdctypes.UnpackInterfacesMessage to gogoprotoany.UnpackInterfacesMessage.


Line range hint 38-49: Method signature changes approved.

The method signatures for UnpackInterfaces in GenesisState and GrantAuthorization are correctly updated to use gogoprotoany.AnyUnpacker instead of cdctypes.AnyUnpacker.

x/evidence/types/msgs.go (3)

7-7: Import change approved.

The import statement for gogoprotoany is correctly added.


17-17: Interface implementation change approved.

The interface implementation for MsgSubmitEvidence is correctly updated from types.UnpackInterfacesMessage to gogoprotoany.UnpackInterfacesMessage.


55-55: Method signature change approved.

The method signature for UnpackInterfaces in MsgSubmitEvidence is correctly updated to use gogoprotoany.AnyUnpacker instead of types.AnyUnpacker.

x/evidence/types/genesis.go (3)

12-12: Import change approved.

The import statement for gogoprotoany is correctly added.


15-15: Interface implementation change approved.

The interface implementation for GenesisState is correctly updated from types.UnpackInterfacesMessage to gogoprotoany.UnpackInterfacesMessage.


60-60: Method signature change approved.

The method signature for UnpackInterfaces in GenesisState is correctly updated to use gogoprotoany.AnyUnpacker instead of types.AnyUnpacker.

types/tx/msgs.go (2)

8-8: Import gogoprotoany correctly.

The new import statement for gogoprotoany is correctly added.


Line range hint 57-64:
Update function signature for UnpackInterfaces.

The function signature is updated to use gogoprotoany.AnyUnpacker, which aligns with the new import. Ensure that this change is propagated throughout the codebase where this function is called.

x/feegrant/msgs.go (3)

5-5: Import gogoprotoany correctly.

The new import statement for gogoprotoany is correctly added.


15-16: Update variable declarations for MsgGrantAllowance.

The variable declarations are updated to use gogoprotoany.UnpackInterfacesMessage, which aligns with the new import. This change enhances type safety and functionality.


48-50: Update method signature for UnpackInterfaces.

The method signature for UnpackInterfaces in the MsgGrantAllowance struct is updated to use gogoprotoany.AnyUnpacker, ensuring consistency with the new import.

testutil/testdata/animal.go (7)

7-7: Import gogoprotoany correctly.

The new import statement for gogoprotoany is correctly added.


34-34: Update variable declaration for HasAnimal.

The variable declaration is updated to use gogoprotoany.UnpackInterfacesMessage, which aligns with the new import.


36-38: Update method signature for UnpackInterfaces in HasAnimal.

The method signature is updated to use gogoprotoany.AnyUnpacker, ensuring consistency with the new import.


61-61: Update variable declaration for HasHasAnimal.

The variable declaration is updated to use gogoprotoany.UnpackInterfacesMessage, which aligns with the new import.


63-65: Update method signature for UnpackInterfaces in HasHasAnimal.

The method signature is updated to use gogoprotoany.AnyUnpacker, ensuring consistency with the new import.


78-78: Update variable declaration for HasHasHasAnimal.

The variable declaration is updated to use gogoprotoany.UnpackInterfacesMessage, which aligns with the new import.


80-82: Update method signature for UnpackInterfaces in HasHasHasAnimal.

The method signature is updated to use gogoprotoany.AnyUnpacker, ensuring consistency with the new import.

x/feegrant/grant.go (3)

10-10: Import change approved.

The import of gogoprotoany is necessary for the updated interface handling.


13-13: Interface assertion change approved.

The change from types.UnpackInterfacesMessage to gogoprotoany.UnpackInterfacesMessage aligns with the new library usage.


66-69: Function signature change approved.

The update from types.AnyUnpacker to gogoprotoany.AnyUnpacker is consistent with the new library usage. The function logic remains unchanged.

x/authz/authorization_grant.go (4)

10-10: Import change approved.

The import of gogoprotoany is necessary for the updated interface handling.


24-27: Function implementation change approved.

The update from cdctypes.NewAnyWithValue to gogoprotoany.NewAnyWithCacheWithValue is consistent with the new library usage and likely improves efficiency.


34-34: Interface assertion change approved.

The change from cdctypes.UnpackInterfacesMessage to gogoprotoany.UnpackInterfacesMessage aligns with the new library usage.


37-40: Function signature change approved.

The update from cdctypes.AnyUnpacker to gogoprotoany.AnyUnpacker is consistent with the new library usage. The function logic remains unchanged.

types/tx/direct_aux.go (3)

7-7: Import change approved.

The import of gogoprotoany is necessary for the updated interface handling.


24-26: Function signature change approved.

The update from codectypes.AnyUnpacker to gogoprotoany.AnyUnpacker is consistent with the new library usage. The function logic remains unchanged.


63-65: Function signature change approved.

The update from codectypes.AnyUnpacker to gogoprotoany.AnyUnpacker is consistent with the new library usage. The function logic remains unchanged.

x/gov/types/v1beta1/genesis.go (4)

7-7: Import statement change approved.

The import statement for gogoprotoany is correctly added and necessary for the updated functionality.


68-68: Declaration change approved.

The declaration for GenesisState implementing gogoprotoany.UnpackInterfacesMessage is correct and necessary for the new package.


71-71: Method signature change approved.

The method signature for UnpackInterfaces accepting gogoprotoany.AnyUnpacker is correct and necessary for the new package.


Line range hint 72-78:
Method implementation change approved.

The method implementation for UnpackInterfaces is correct and adheres to the new package requirements.

x/group/genesis.go (3)

9-9: Import statement change approved.

The import statement for gogoprotoany is correctly added and necessary for the updated functionality.


86-86: Method signature change approved.

The method signature for UnpackInterfaces accepting gogoprotoany.AnyUnpacker is correct and necessary for the new package.


Line range hint 87-97:
Method implementation change approved.

The method implementation for UnpackInterfaces is correct and adheres to the new package requirements.

x/gov/types/v1beta1/msgs.go (4)

7-7: Import statement change approved.

The import statement for gogoprotoany is correctly added and necessary for the updated functionality.


24-24: Declaration change approved.

The declaration for MsgSubmitProposal implementing gogoprotoany.UnpackInterfacesMessage is correct and necessary for the new package.


77-77: Method signature change approved.

The method signature for UnpackInterfaces accepting gogoprotoany.AnyUnpacker is correct and necessary for the new package.


78-80: Method implementation change approved.

The method implementation for UnpackInterfaces is correct and adheres to the new package requirements.

testutil/testdata/grpc_query.go (5)

8-8: Import statement for gogoprotoany looks good.

The import statement correctly adds the necessary package for handling Any types.


53-53: Interface implementation for TestAnyRequest updated correctly.

The change aligns with the new gogoprotoany library.


55-57: UnpackInterfaces method for TestAnyRequest updated correctly.

The method signature and implementation align with the new gogoprotoany library.


60-60: Interface implementation for TestAnyResponse updated correctly.

The change aligns with the new gogoprotoany library.


62-64: UnpackInterfaces method for TestAnyResponse updated correctly.

The method signature and implementation align with the new gogoprotoany library.

x/authz/msgs.go (6)

7-7: Import statement for gogoprotoany looks good.

The import statement correctly adds the necessary package for handling Any types.


19-19: Interface implementation for MsgGrant updated correctly.

The change aligns with the new gogoprotoany library.


20-20: Interface implementation for MsgExec updated correctly.

The change aligns with the new gogoprotoany library.


48-51: SetAuthorization method in MsgGrant updated correctly.

The method signature and implementation align with the new gogoprotoany library.


Line range hint 57-64:
UnpackInterfaces method in MsgExec updated correctly.

The method signature and implementation align with the new gogoprotoany library.


70-72: UnpackInterfaces method in MsgGrant updated correctly.

The method signature and implementation align with the new gogoprotoany library.

x/gov/types/v1/genesis.go (3)

7-7: Import statement for gogoprotoany looks good.

The import statement correctly adds the necessary package for handling Any types.


109-111: Interface implementation for GenesisState updated correctly.

The change aligns with the new gogoprotoany library.


Line range hint 112-117:
UnpackInterfaces method in GenesisState updated correctly.

The method signature and implementation align with the new gogoprotoany library.

types/tx/signing/signature.go (3)

89-89: LGTM!

The variable declaration has been correctly updated to use gogoprotoany.UnpackInterfacesMessage.


Line range hint 92-100:
LGTM!

The function UnpackInterfaces in SignatureDescriptors has been correctly updated to use gogoprotoany.AnyUnpacker.


104-106: LGTM!

The function UnpackInterfaces in SignatureDescriptor has been correctly updated to use gogoprotoany.AnyUnpacker.

x/evidence/types/genesis_test.go (1)

134-136: LGTM!

The unpacker field in the testCases struct within the TestUnpackInterfaces function has been correctly updated to use gogoprotoany.AnyUnpacker.

crypto/keyring/record.go (1)

Line range hint 107-114:
LGTM!

The function UnpackInterfaces in Record has been correctly updated to use gogoprotoany.AnyUnpacker.

x/gov/types/v1/proposal.go (3)

78-79: LGTM!

The function correctly implements the new unpacking mechanism using gogoprotoany.AnyUnpacker.


85-85: LGTM!

The type assertion is correctly updated to use gogoprotoany.UnpackInterfacesMessage.


Line range hint 98-104: LGTM!

The function correctly implements the new unpacking mechanism using gogoprotoany.AnyUnpacker.

x/gov/types/v1/msgs.go (4)

16-16: LGTM!

The new message type &MsgSubmitMultipleChoiceProposal{} is correctly added to the variable declaration.


17-17: LGTM!

The type assertion is correctly updated to use gogoprotoany.UnpackInterfacesMessage.


64-65: LGTM!

The function correctly implements the new unpacking mechanism using gogoprotoany.AnyUnpacker.


124-126: LGTM!

The function correctly implements the new unpacking mechanism using gogoprotoany.AnyUnpacker.

x/feegrant/filtered_fee.go (2)

28-28: LGTM!

The type assertion is correctly updated to use gogoprotoany.UnpackInterfacesMessage.


32-34: LGTM!

The function correctly implements the new unpacking mechanism using gogoprotoany.AnyUnpacker.

types/result.go (2)

Line range hint 169-174:
LGTM! But verify the function usage in the codebase.

The UnpackInterfaces method for SearchTxsResult has been correctly updated to use gogoprotoany.AnyUnpacker.

Ensure that all function calls to UnpackInterfaces match the new signature.

Verification successful

Verified: The function usage for UnpackInterfaces in SearchTxsResult matches the new signature. No additional calls to this method were found in the codebase.

  • The method UnpackInterfaces for SearchTxsResult is correctly updated to use gogoprotoany.AnyUnpacker.
  • No other occurrences of calls to SearchTxsResult.UnpackInterfaces were found.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature for `SearchTxsResult`.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go -A 5 $'SearchTxsResult) UnpackInterfaces'

Length of output: 155


Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature for `SearchTxsResult`.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go -A 5 'func (s SearchTxsResult) UnpackInterfaces'

Length of output: 63


Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature for `SearchTxsResult`.

# Test: Search for all occurrences of `UnpackInterfaces`. Expect: Only occurrences of the new signature.
rg --type go 'UnpackInterfaces'

Length of output: 20000


Line range hint 180-185:
LGTM! But verify the function usage in the codebase.

The UnpackInterfaces method for TxResponse has been correctly updated to use gogoprotoany.AnyUnpacker.

Ensure that all function calls to UnpackInterfaces match the new signature.

Verification successful

No issues found with the UnpackInterfaces method for TxResponse.

The method has been correctly updated to use gogoprotoany.AnyUnpacker, and there are no direct calls to this method elsewhere in the codebase that would be impacted by the change.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature for `TxResponse`.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go -A 5 $'TxResponse) UnpackInterfaces'

Length of output: 140


Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature for `TxResponse`.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go -A 5 'TxResponse\) UnpackInterfaces'

Length of output: 316


Script:

#!/bin/bash
# Description: Search for any calls to `UnpackInterfaces` across the codebase, including potential interface implementations.

# Test: Search for the function usage. Expect: Any occurrences of the method being called.
rg --type go 'UnpackInterfaces'

Length of output: 20000

x/auth/migrations/legacytx/stdsign.go (1)

133-134: LGTM! But verify the function usage in the codebase.

The UnpackInterfaces method for StdSignature has been correctly updated to use gogoprotoany.AnyUnpacker.

Ensure that all function calls to UnpackInterfaces match the new signature.

Verification successful

Verification successful!

The UnpackInterfaces method for StdSignature has been correctly updated to use gogoprotoany.AnyUnpacker, and there are no additional calls to this method in the codebase that require changes.

  • No further action needed.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature for `StdSignature`.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go -A 5 $'StdSignature) UnpackInterfaces'

Length of output: 146


Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature for `StdSignature`.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go -A 5 $'StdSignature\\) UnpackInterfaces'

Length of output: 598


Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature for `StdSignature`.

# Test: Search for any calls to `UnpackInterfaces`. Expect: Only occurrences of the new signature.
rg --type go 'UnpackInterfaces'

Length of output: 20000

client/keys/output_test.go (1)

106-125: LGTM! The new test function TestNestedMultisigOutput is well-implemented.

The test function correctly validates the functionality of nested multisignature keys.

codec/codec.go (1)

80-80: LGTM!

The type definition is correctly updated to use gogoprotoany.AnyUnpacker.

x/auth/migrations/legacytx/stdtx.go (3)

17-17: LGTM!

The interface implementation check is correctly updated to use gogoprotoany.UnpackInterfacesMessage.


19-19: LGTM!

The interface implementation check is correctly updated to use gogoprotoany.UnpackInterfacesMessage.


Line range hint 173-182: LGTM!

The method signature is correctly updated to use gogoprotoany.AnyUnpacker.

crypto/keys/multisig/multisig.go (2)

17-17: LGTM!

The interface implementation check is correctly updated to use gogoprotoany.UnpackInterfacesMessage.


Line range hint 153-159: LGTM!

The method signature is correctly updated to use gogoprotoany.AnyUnpacker.

x/auth/types/genesis.go (3)

10-10: Import statement update approved.

The import statement has been updated to include the gogoprotoany package, which is necessary for the new implementation of the UnpackInterfacesMessage interface.


18-18: Variable declaration update approved.

The variable declaration has been updated to use gogoprotoany.UnpackInterfacesMessage, which is necessary for the new implementation.


Line range hint 36-43: Method signature update approved.

The method signature for UnpackInterfaces has been updated to use gogoprotoany.AnyUnpacker. The function logic remains correct and consistent.

However, ensure that all function calls to UnpackInterfaces match the new signature.

Verification successful

The review of the provided output indicates that all instances of the UnpackInterfaces function use the new signature with gogoprotoany.AnyUnpacker. Therefore, the function calls match the updated method signature.

  • Files and lines verified:
    • x/staking/types/validator.go
    • x/staking/types/msg.go
    • x/staking/types/genesis.go
    • x/group/types.go
    • x/group/proposal.go
    • x/group/msgs.go
    • x/group/genesis.go
    • x/gov/types/v1beta1/msgs.go
    • x/gov/types/v1beta1/genesis.go
    • x/gov/types/v1beta1/proposal.go
    • x/gov/types/v1/msgs.go
    • x/gov/types/v1/genesis.go
    • x/feegrant/grant.go
    • x/feegrant/msgs.go
    • x/feegrant/genesis.go
    • x/feegrant/filtered_fee.go
    • x/authz/msgs.go
    • x/authz/authorization_grant.go
    • x/auth/types/genesis.go
    • x/auth/types/query.go
    • x/auth/types/account.go
    • x/authz/simulation/operations.go
    • x/auth/migrations/legacytx/stdtx.go
    • x/auth/migrations/legacytx/stdsign.go
    • x/authz/genesis.go
    • types/result.go
    • types/tx/direct_aux.go
    • types/tx/types.go
    • types/tx/signing/signature.go
    • testutil/testdata/grpc_query.go
    • testutil/testdata/animal.go
    • tests/integration/server/grpc/server_test.go
    • x/evidence/types/msgs.go
    • x/evidence/types/genesis_test.go
    • x/evidence/types/genesis.go
    • client/grpc_query.go
    • codec/json.go
    • codec/any_test.go
    • codec/amino.go
    • client/grpc/cmtservice/service.go
    • codec/types/interface_registry.go
    • codec/types/types_test.go
    • codec/proto_codec.go

Conclusion: All function calls to UnpackInterfaces match the new signature.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go -A 5 $'UnpackInterfaces'

Length of output: 48161

x/staking/types/msg.go (5)

8-8: Import statement update approved.

The import statement has been updated to include the gogoprotoany package, which is necessary for the new implementation of the UnpackInterfacesMessage interface.


17-18: Variable declaration update approved.

The variable declaration for MsgCreateValidator has been updated to use gogoprotoany.UnpackInterfacesMessage, which is necessary for the new implementation.


93-95: Method signature update approved.

The method signature for UnpackInterfaces in MsgCreateValidator has been updated to use gogoprotoany.AnyUnpacker. The function logic remains correct and consistent.

However, ensure that all function calls to UnpackInterfaces match the new signature.

Verification successful

Method signature update confirmed.

The method signature for UnpackInterfaces in MsgCreateValidator has been correctly updated to use gogoprotoany.AnyUnpacker, and this update is consistent across all instances in the codebase.

  • Verified instances in:
    • types/result.go
    • x/staking/types/validator.go
    • x/staking/types/msg.go
    • x/staking/types/genesis.go
    • x/gov/types/v1beta1/proposal.go
    • x/gov/types/v1beta1/msgs.go
    • x/gov/types/v1/genesis.go
    • x/feegrant/msgs.go
    • x/feegrant/grant.go
    • x/feegrant/genesis.go
    • x/feegrant/filtered_fee.go
    • x/evidence/types/msgs.go
    • x/authz/msgs.go
    • x/authz/genesis.go
    • x/auth/types/query.go
    • x/auth/types/genesis.go
    • x/auth/types/account.go
    • x/group/proposal.go
    • x/group/msgs.go
    • types/tx/types.go
    • types/tx/signing/signature.go
    • types/tx/direct_aux.go
    • crypto/keys/multisig/multisig.go
    • crypto/keyring/record.go
    • crypto/keyring/legacy_info.go
    • codec/types/types_test.go
    • codec/proto_codec.go
    • codec/json.go
    • client/grpc/cmtservice/service.go
    • codec/types/interface_registry.go
    • client/grpc_query.go
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go -A 5 $'UnpackInterfaces'

Length of output: 48161


164-166: Method signature update approved.

The method signature for UnpackInterfaces in MsgRotateConsPubKey has been updated to use gogoprotoany.AnyUnpacker. The function logic remains correct and consistent.

However, ensure that all function calls to UnpackInterfaces match the new signature.

Verification successful

All function calls to UnpackInterfaces match the new signature.

The verification confirms that all instances of UnpackInterfaces across the codebase use the gogoprotoany.AnyUnpacker parameter, ensuring consistency with the updated method signature.

  • No further action required.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go -A 5 $'UnpackInterfaces'

Length of output: 48161


Line range hint 170-177: Method signature update approved.

The method signature for UnpackInterfaces in ConsPubKeyRotationHistory has been updated to use gogoprotoany.AnyUnpacker. The function logic remains correct and consistent.

However, ensure that all function calls to UnpackInterfaces match the new signature.

Verification successful

All function calls to UnpackInterfaces match the new signature.

The verification script output confirms that the function UnpackInterfaces consistently uses the gogoprotoany.AnyUnpacker type across the codebase.

  • Files and lines verified:
    • x/staking/types/validator.go
    • x/staking/types/genesis.go
    • x/staking/types/msg.go
    • x/group/types.go
    • x/group/proposal.go
    • x/group/msgs.go
    • x/group/genesis.go
    • x/gov/types/v1beta1/proposal.go
    • x/gov/types/v1beta1/msgs.go
    • x/gov/types/v1beta1/genesis.go
    • x/gov/types/v1/proposal.go
    • x/gov/types/v1/msgs.go
    • x/gov/types/v1/genesis.go
    • x/feegrant/msgs.go
    • x/feegrant/grant.go
    • x/feegrant/genesis.go
    • x/feegrant/filtered_fee.go
    • x/evidence/types/msgs.go
    • x/evidence/types/genesis.go
    • x/authz/msgs.go
    • x/authz/authorization_grant.go
    • x/authz/simulation/operations.go
    • x/authz/genesis.go
    • x/auth/types/query.go
    • x/auth/types/genesis.go
    • x/auth/types/account.go
    • x/auth/migrations/legacytx/stdtx.go
    • x/auth/migrations/legacytx/stdsignmsg.go
    • x/auth/migrations/legacytx/stdsign.go
    • types/result.go
    • types/tx/types.go
    • types/tx/msgs.go
    • types/tx/direct_aux.go
    • types/tx/signing/signature.go
    • codec/types/interface_registry.go
    • codec/types/types_test.go
    • codec/proto_codec.go
    • codec/json.go
    • codec/any_test.go
    • codec/amino.go
    • crypto/keys/multisig/multisig.go
    • crypto/keyring/record.go
    • crypto/keyring/legacy_info.go
    • client/grpc_query.go
    • client/grpc/cmtservice/service.go
    • server/v2/cometbft/client/grpc/cmtservice/service.go
    • server/v2/api/grpc/server.go
    • testutil/testdata/grpc_query.go
    • testutil/testdata/animal.go
    • tests/integration/server/grpc/server_test.go
    • tests/e2e/authz/grpc.go
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go -A 5 $'UnpackInterfaces'

Length of output: 48161

types/tx/types.go (6)

15-15: Import statement update approved.

The import statement has been updated to include the gogoprotoany package, which is necessary for the new implementation of the UnpackInterfacesMessage interface.

Tools
golangci-lint

15-15: File is not gci-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order

(gci)


23-23: Variable declaration update approved.

The variable declaration for Tx, TxBody, AuthInfo, and SignerInfo has been updated to use gogoprotoany.UnpackInterfacesMessage, which is necessary for the new implementation.


Line range hint 180-191: Method signature update approved.

The method signature for UnpackInterfaces in Tx has been updated to use gogoprotoany.AnyUnpacker. The function logic remains correct and consistent.

However, ensure that all function calls to UnpackInterfaces match the new signature.


Line range hint 195-205: Method signature update approved.

The method signature for UnpackInterfaces in TxBody has been updated to use gogoprotoany.AnyUnpacker. The function logic remains correct and consistent.

However, ensure that all function calls to UnpackInterfaces match the new signature.

Verification successful

Method signature update approved.

The method signature for UnpackInterfaces in TxBody has been updated to use gogoprotoany.AnyUnpacker. The function logic remains correct and consistent. All function calls to UnpackInterfaces in the codebase match the new signature.

  • Verified instances in:
    • x/staking/types/validator.go
    • x/staking/types/msg.go
    • x/group/types.go
    • x/gov/types/v1beta1/proposal.go
    • x/feegrant/msgs.go
    • x/authz/msgs.go
    • types/tx/types.go
    • crypto/keys/multisig/multisig.go
    • crypto/keyring/record.go
    • codec/types/interface_registry.go
    • client/grpc_query.go
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go -A 5 $'UnpackInterfaces'

Length of output: 48161


Line range hint 212-216: Method signature update approved.

The method signature for UnpackInterfaces in AuthInfo has been updated to use gogoprotoany.AnyUnpacker. The function logic remains correct and consistent.

However, ensure that all function calls to UnpackInterfaces match the new signature.

Verification successful

Ensure all function calls to UnpackInterfaces match the new signature.

The method signature for UnpackInterfaces in AuthInfo has been updated to use gogoprotoany.AnyUnpacker. The function logic remains correct and consistent. The script output shows multiple instances of UnpackInterfaces, and it appears that the new signature is being used consistently.

  • Files to verify for correct usage:
    • x/staking/types/validator.go
    • x/staking/types/msg.go
    • x/staking/types/genesis.go
    • x/group/types.go
    • x/group/proposal.go
    • x/group/msgs.go
    • x/group/genesis.go
    • x/gov/types/v1beta1/proposal.go
    • x/gov/types/v1beta1/msgs.go
    • x/gov/types/v1beta1/genesis.go
    • x/gov/types/v1/proposal.go
    • x/gov/types/v1/genesis.go
    • x/gov/types/v1/msgs.go
    • x/feegrant/msgs.go
    • x/feegrant/genesis.go
    • x/feegrant/filtered_fee.go
    • x/evidence/types/msgs.go
    • x/evidence/types/genesis.go
    • x/authz/genesis.go
    • x/authz/authorization_grant.go
    • x/authz/msgs.go
    • x/auth/types/query.go
    • x/auth/types/genesis.go
    • x/auth/types/account.go
    • types/result.go
    • types/tx/types.go
    • types/tx/msgs.go
    • types/tx/direct_aux.go
    • types/tx/signing/signature.go
    • x/auth/migrations/legacytx/stdsignmsg.go
    • x/auth/migrations/legacytx/stdsign.go
    • x/auth/migrations/legacytx/stdtx.go
    • crypto/keyring/record.go
    • crypto/keyring/legacy_info.go
    • crypto/keys/multisig/multisig.go
    • codec/types/interface_registry.go
    • codec/proto_codec.go
    • codec/json.go
    • client/grpc_query.go
    • client/grpc/cmtservice/service.go
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go -A 5 $'UnpackInterfaces'

Length of output: 48161


223-225: Method signature update approved.

The method signature for UnpackInterfaces in SignerInfo has been updated to use gogoprotoany.AnyUnpacker. The function logic remains correct and consistent.

However, ensure that all function calls to UnpackInterfaces match the new signature.

Verification successful

Method signature update approved.

The method signature for UnpackInterfaces in SignerInfo has been updated to use gogoprotoany.AnyUnpacker. The function logic remains correct and consistent. All function calls to UnpackInterfaces across the codebase match the new signature.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go -A 5 $'UnpackInterfaces'

Length of output: 48161

x/gov/types/v1beta1/proposal.go (3)

85-87: LGTM!

The change to use gogoprotoany.AnyUnpacker is consistent with the PR objectives and appears correct.


93-93: LGTM!

The change to implement gogoprotoany.UnpackInterfacesMessage for Proposals is consistent with the PR objectives and appears correct.


Line range hint 122-127:
LGTM!

The change to use gogoprotoany.AnyUnpacker is consistent with the PR objectives and appears correct.

x/group/msgs.go (5)

31-33: LGTM!

The change to implement gogoprotoany.UnpackInterfacesMessage for MsgCreateGroupPolicy, MsgUpdateGroupPolicyDecisionPolicy, and MsgCreateGroupWithPolicy is consistent with the PR objectives and appears correct.


87-89: LGTM!

The change to use gogoprotoany.AnyUnpacker is consistent with the PR objectives and appears correct.


130-132: LGTM!

The change to use gogoprotoany.AnyUnpacker is consistent with the PR objectives and appears correct.


184-186: LGTM!

The change to use gogoprotoany.AnyUnpacker is consistent with the PR objectives and appears correct.


222-224: LGTM!

The change to use gogoprotoany.AnyUnpacker is consistent with the PR objectives and appears correct.

crypto/keyring/legacy_info.go (1)

222-224: LGTM!

The change to use gogoprotoany.AnyUnpacker is consistent with the PR objectives and appears correct.

client/grpc/cmtservice/service.go (2)

8-8: Import statement for gogoprotoany looks good.

The import statement is necessary for the changes made in this file.


Line range hint 116-124: Method signature change for UnpackInterfaces looks good.

The method signature has been updated to use gogoprotoany.AnyUnpacker, and the logic remains intact.

Ensure that all calls to this method are updated to match the new signature.

Verification successful

Method signature change for UnpackInterfaces looks good.

The method signature has been updated to use gogoprotoany.AnyUnpacker, and all calls to this method in the codebase match the new signature.

  • Verified files include:
    • x/staking/types/validator.go
    • x/staking/types/msg.go
    • x/group/types.go
    • x/group/proposal.go
    • x/gov/types/v1/proposal.go
    • x/auth/types/query.go
    • x/auth/types/genesis.go
    • x/auth/migrations/legacytx/stdtx.go
    • types/result.go
    • types/tx/types.go
    • x/authz/authorization_grant.go
    • crypto/keyring/legacy_info.go
    • crypto/keys/multisig/multisig.go
    • crypto/keyring/record.go
    • codec/types/interface_registry.go
    • client/grpc_query.go
    • client/grpc/cmtservice/service.go
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all calls to `UnpackInterfaces` match the new signature.

# Test: Search for the method usage. Expect: Only occurances of the new signature.
rg --type go -A 5 $'UnpackInterfaces'

Length of output: 48161

server/v2/cometbft/client/grpc/cmtservice/service.go (2)

11-11: Import statement for gogoprotoany looks good.

The import statement is necessary for the changes made in this file.


Line range hint 135-143: Method signature change for UnpackInterfaces looks good.

The method signature has been updated to use gogoprotoany.AnyUnpacker, and the logic remains intact.

Ensure that all calls to this method are updated to match the new signature.

Verification successful

Method signature change for UnpackInterfaces is correctly implemented.

All calls to the UnpackInterfaces method have been updated to use gogoprotoany.AnyUnpacker as the parameter type.

  • server/v2/cometbft/client/grpc/cmtservice/service.go line 132
  • x/staking/types/validator.go lines 2 and 10
  • x/staking/types/msg.go lines 2, 10, 18, 26, and 34
  • x/group/types.go lines 2, 10, 18, 26, 34, and 42
  • x/group/proposal.go line 2
  • x/group/msgs.go lines 2, 10, 18, 26, 34, and 42
  • x/group/genesis.go line 2
  • x/gov/types/v1beta1/proposal.go lines 2 and 10
  • x/gov/types/v1/proposal.go lines 2 and 10
  • x/gov/types/v1/genesis.go line 2
  • x/gov/types/v1beta1/msgs.go line 2
  • x/gov/types/v1/msgs.go lines 2 and 10
  • x/feegrant/msgs.go line 2
  • x/feegrant/grant.go line 2
  • x/feegrant/genesis.go line 2
  • x/feegrant/filtered_fee.go line 2
  • x/evidence/types/genesis.go line 2
  • x/evidence/types/msgs.go line 2
  • x/authz/msgs.go lines 2 and 10
  • x/authz/genesis.go line 2
  • x/authz/authorization_grant.go line 2
  • x/auth/types/query.go line 2
  • x/auth/types/genesis.go line 2
  • x/auth/types/account.go line 2
  • x/auth/migrations/legacytx/stdtx.go line 2
  • x/auth/migrations/legacytx/stdsignmsg.go line 2
  • x/auth/migrations/legacytx/stdsign.go line 2
  • types/result.go lines 2 and 10
  • types/tx/types.go lines 2, 10, 18, 26, and 34
  • types/tx/direct_aux.go lines 2 and 10
  • types/tx/signing/signature.go lines 2 and 10
  • testutil/testdata/grpc_query.go lines 2 and 10
  • testutil/testdata/animal.go lines 2, 10, 18, and 26
  • tests/e2e/authz/grpc.go line 2
  • tests/integration/server/grpc/server_test.go line 2
  • crypto/keys/multisig/multisig.go line 2
  • crypto/keyring/record.go line 2
  • crypto/keyring/legacy_info.go line 2
  • codec/amino.go lines 2, 10, 18, and 26
  • codec/types/interface_registry.go lines 2 and 10
  • codec/types/types_test.go lines 2, 10, and 18
  • codec/proto_codec.go lines 2 and 10
  • codec/json.go line 2
  • codec/any_test.go lines 2 and 10
  • client/grpc_query.go line 2
  • client/grpc/cmtservice/service.go line 2
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all calls to `UnpackInterfaces` match the new signature.

# Test: Search for the method usage. Expect: Only occurances of the new signature.
rg --type go -A 5 $'UnpackInterfaces'

Length of output: 48161

x/auth/types/account.go (3)

14-14: Import statement for gogoprotoany looks good.

The import statement is necessary for the changes made in this file.


20-20: Interface implementation change for BaseAccount looks good.

The interface implementation has been updated to use gogoprotoany.UnpackInterfacesMessage.


136-139: Method signature change for UnpackInterfaces looks good.

The method signature has been updated to use gogoprotoany.AnyUnpacker, and the logic remains intact.

Ensure that all calls to this method are updated to match the new signature.

Verification successful

Method signature change for UnpackInterfaces is correctly implemented.

The method signature has been updated to use gogoprotoany.AnyUnpacker, and all calls to this method across the codebase have been updated to match the new signature.

  • Verified instances in:
    • x/staking/types/validator.go
    • x/staking/types/msg.go
    • x/group/types.go
    • x/group/msgs.go
    • x/group/genesis.go
    • x/group/proposal.go
    • x/gov/types/v1beta1/msgs.go
    • x/gov/types/v1beta1/proposal.go
    • x/gov/types/v1/proposal.go
    • x/gov/types/v1/msgs.go
    • x/feegrant/msgs.go
    • x/feegrant/grant.go
    • x/feegrant/genesis.go
    • x/feegrant/filtered_fee.go
    • x/evidence/types/msgs.go
    • x/evidence/types/genesis.go
    • x/authz/genesis.go
    • x/authz/authorization_grant.go
    • x/authz/msgs.go
    • x/auth/types/genesis.go
    • x/auth/types/query.go
    • x/auth/types/account.go
    • x/auth/migrations/legacytx/stdsign.go
    • x/auth/migrations/legacytx/stdsignmsg.go
    • types/result.go
    • types/tx/msgs.go
    • types/tx/types.go
    • types/tx/direct_aux.go
    • types/tx/signing/signature.go
    • codec/types/interface_registry.go
    • codec/types/types_test.go
    • codec/proto_codec.go
    • codec/json.go
    • codec/any_test.go
    • codec/amino.go
    • client/grpc_query.go
    • client/grpc/cmtservice/service.go
    • crypto/keyring/record.go
    • crypto/keyring/legacy_info.go
    • crypto/keys/multisig/multisig.go
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all calls to `UnpackInterfaces` match the new signature.

# Test: Search for the method usage. Expect: Only occurances of the new signature.
rg --type go -A 5 $'UnpackInterfaces'

Length of output: 48161

codec/types/interface_registry.go (3)

10-10: LGTM! Import statement is correct.

The import statement for gogoprotoany is correctly added.


21-22: LGTM! Function signature update is correct.

The function signature has been correctly updated to use gogoprotoany.AnyUnpacker.


33-33: LGTM! Interface modification is correct.

The gogoprotoany.AnyUnpacker has been correctly added to the InterfaceRegistry interface.

x/authz/simulation/operations.go (2)

16-16: LGTM! Import statement is correct.

The import statement for gogoprotoany is correctly added.


264-264: LGTM! Function signature update is correct.

The function signature has been correctly updated to use gogoprotoany.AnyUnpacker.

x/staking/types/validator.go (3)

20-20: LGTM! Import statement is correct.

The import statement for gogoprotoany is correctly added.


142-142: LGTM! Method signature update is correct.

The method signature has been correctly updated to use gogoprotoany.AnyUnpacker.


498-498: LGTM! Method signature update is correct.

The method signature has been correctly updated to use gogoprotoany.AnyUnpacker.

x/group/types.go (4)

290-292: LGTM! The parameter type change is appropriate.

The change of the unpacker parameter type from codectypes.AnyUnpacker to gogoprotoany.AnyUnpacker aligns with the PR objectives and does not affect the function's logic.


462-464: LGTM! The parameter type change is appropriate.

The change of the unpacker parameter type from codectypes.AnyUnpacker to gogoprotoany.AnyUnpacker aligns with the PR objectives and does not affect the function's logic.


467-469: LGTM! The parameter type change is appropriate.

The change of the unpacker parameter type from codectypes.AnyUnpacker to gogoprotoany.AnyUnpacker aligns with the PR objectives and does not affect the function's logic.


Line range hint 471-478:
LGTM! The parameter type change is appropriate.

The change of the unpacker parameter type from codectypes.AnyUnpacker to gogoprotoany.AnyUnpacker aligns with the PR objectives and does not affect the function's logic.

x/group/simulation/operations.go (1)

23-23: LGTM! The parameter type change is appropriate.

The change of the appCdc parameter type from cdctypes.AnyUnpacker to gogoprotoany.AnyUnpacker aligns with the PR objectives and does not affect the function's logic.

Also applies to: 108-110

codec/codec.go Outdated
@@ -6,6 +6,7 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"

"github.com/cosmos/cosmos-sdk/codec/types"
gogoprotoany "github.com/cosmos/gogoproto/types/any"
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix import order.

The import statement for gogoprotoany should follow the import order conventions.

-import (
	"github.com/cosmos/gogoproto/proto"
	"google.golang.org/grpc/encoding"
	"google.golang.org/protobuf/reflect/protoreflect"

	"github.com/cosmos/cosmos-sdk/codec/types"
	gogoprotoany "github.com/cosmos/gogoproto/types/any"
)
+import (
	"github.com/cosmos/gogoproto/proto"
	"google.golang.org/grpc/encoding"
	"google.golang.org/protobuf/reflect/protoreflect"

	"github.com/cosmos/cosmos-sdk/codec/types"
	gogoprotoany "github.com/cosmos/gogoproto/types/any"
)

Committable suggestion was skipped due to low confidence.

Tools
golangci-lint

9-9: File is not gci-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order

(gci)

@@ -9,13 +9,14 @@ import (
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
gogoprotoany "github.com/cosmos/gogoproto/types/any"
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix import order.

The import statement for gogoprotoany should follow the import order conventions.

-import (
	errorsmod "cosmossdk.io/errors"
	"cosmossdk.io/math"

	"github.com/cosmos/cosmos-sdk/codec/legacy"
	codectypes "github.com/cosmos/cosmos-sdk/codec/types"
	cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
	sdk "github.com/cosmos/cosmos-sdk/types"
	"github.com/cosmos/cosmos-sdk/types/tx/signing"
	gogoprotoany "github.com/cosmos/gogoproto/types/any"
)
+import (
	errorsmod "cosmossdk.io/errors"
	"cosmossdk.io/math"

	"github.com/cosmos/cosmos-sdk/codec/legacy"
	codectypes "github.com/cosmos/cosmos-sdk/codec/types"
	cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
	sdk "github.com/cosmos/cosmos-sdk/types"
	"github.com/cosmos/cosmos-sdk/types/tx/signing"
	gogoprotoany "github.com/cosmos/gogoproto/types/any"
)

Committable suggestion was skipped due to low confidence.

@@ -9,11 +9,12 @@ import (
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
multisigtypes "github.com/cosmos/cosmos-sdk/crypto/types/multisig"
"github.com/cosmos/cosmos-sdk/types/tx/signing"
gogoprotoany "github.com/cosmos/gogoproto/types/any"
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix import order.

The import statement for gogoprotoany should follow the import order conventions.

-import (
	"fmt"

	cmtcrypto "github.com/cometbft/cometbft/crypto"

	"github.com/cosmos/cosmos-sdk/codec/types"
	cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
	multisigtypes "github.com/cosmos/cosmos-sdk/crypto/types/multisig"
	"github.com/cosmos/cosmos-sdk/types/tx/signing"
	gogoprotoany "github.com/cosmos/gogoproto/types/any"
)
+import (
	"fmt"

	cmtcrypto "github.com/cometbft/cometbft/crypto"

	"github.com/cosmos/cosmos-sdk/codec/types"
	cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
	multisigtypes "github.com/cosmos/cosmos-sdk/crypto/types/multisig"
	"github.com/cosmos/cosmos-sdk/types/tx/signing"
	gogoprotoany "github.com/cosmos/gogoproto/types/any"
)

Committable suggestion was skipped due to low confidence.

Tools
golangci-lint

12-12: File is not gci-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order

(gci)

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

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5481b81 and 62e8963.

Files selected for processing (1)
  • UPGRADING.md (1 hunks)
Additional context used
Path-based instructions (1)
UPGRADING.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

Additional comments not posted (2)
UPGRADING.md (2)

173-174: Instructions are clear and correct.

The instructions for updating the buf.gen.gogo.yaml configuration files to reflect the new mapping for codectypes.Any are clear and detailed.


175-175: Instructions are clear and correct.

The instructions for replacing the interfaces AnyUnpacker and UnpackInterfacesMessage with the new interfaces in the github.com/cosmos/gogoproto/types/any package are clear and detailed.

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

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 331eaf4 and eec42ba.

Files selected for processing (48)
  • UPGRADING.md (1 hunks)
  • client/grpc/cmtservice/service.go (3 hunks)
  • client/keys/output_test.go (2 hunks)
  • codec/codec.go (2 hunks)
  • codec/types/interface_registry.go (3 hunks)
  • crypto/keyring/legacy_info.go (2 hunks)
  • crypto/keyring/record.go (2 hunks)
  • crypto/keys/multisig/multisig.go (4 hunks)
  • server/v2/cometbft/client/grpc/cmtservice/service.go (2 hunks)
  • testutil/testdata/animal.go (4 hunks)
  • testutil/testdata/grpc_query.go (2 hunks)
  • types/result.go (3 hunks)
  • types/tx/direct_aux.go (3 hunks)
  • types/tx/ext.go (1 hunks)
  • types/tx/msgs.go (2 hunks)
  • types/tx/signing/signature.go (3 hunks)
  • types/tx/types.go (6 hunks)
  • x/auth/migrations/legacytx/stdsign.go (2 hunks)
  • x/auth/migrations/legacytx/stdsignmsg.go (2 hunks)
  • x/auth/migrations/legacytx/stdtx.go (3 hunks)
  • x/auth/types/account.go (2 hunks)
  • x/auth/types/genesis.go (2 hunks)
  • x/auth/types/query.go (1 hunks)
  • x/authz/authorization_grant.go (3 hunks)
  • x/authz/genesis.go (3 hunks)
  • x/authz/msgs.go (5 hunks)
  • x/authz/simulation/operations.go (2 hunks)
  • x/evidence/types/genesis.go (2 hunks)
  • x/evidence/types/genesis_test.go (2 hunks)
  • x/evidence/types/msgs.go (3 hunks)
  • x/feegrant/filtered_fee.go (2 hunks)
  • x/feegrant/genesis.go (2 hunks)
  • x/feegrant/grant.go (2 hunks)
  • x/feegrant/msgs.go (3 hunks)
  • x/gov/types/v1/genesis.go (2 hunks)
  • x/gov/types/v1/msgs.go (4 hunks)
  • x/gov/types/v1/proposal.go (3 hunks)
  • x/gov/types/v1beta1/genesis.go (2 hunks)
  • x/gov/types/v1beta1/msgs.go (3 hunks)
  • x/gov/types/v1beta1/proposal.go (3 hunks)
  • x/group/genesis.go (2 hunks)
  • x/group/msgs.go (6 hunks)
  • x/group/proposal.go (2 hunks)
  • x/group/simulation/operations.go (2 hunks)
  • x/group/types.go (3 hunks)
  • x/staking/types/genesis.go (2 hunks)
  • x/staking/types/msg.go (4 hunks)
  • x/staking/types/validator.go (3 hunks)
Files skipped from review due to trivial changes (2)
  • x/feegrant/msgs.go
  • x/staking/types/validator.go
Files skipped from review as they are similar to previous changes (39)
  • UPGRADING.md
  • client/grpc/cmtservice/service.go
  • client/keys/output_test.go
  • codec/codec.go
  • crypto/keyring/legacy_info.go
  • crypto/keyring/record.go
  • crypto/keys/multisig/multisig.go
  • testutil/testdata/animal.go
  • testutil/testdata/grpc_query.go
  • types/result.go
  • types/tx/direct_aux.go
  • types/tx/ext.go
  • types/tx/msgs.go
  • types/tx/signing/signature.go
  • x/auth/migrations/legacytx/stdsign.go
  • x/auth/migrations/legacytx/stdsignmsg.go
  • x/auth/migrations/legacytx/stdtx.go
  • x/auth/types/account.go
  • x/auth/types/genesis.go
  • x/auth/types/query.go
  • x/authz/genesis.go
  • x/authz/simulation/operations.go
  • x/evidence/types/genesis.go
  • x/evidence/types/genesis_test.go
  • x/feegrant/filtered_fee.go
  • x/feegrant/genesis.go
  • x/feegrant/grant.go
  • x/gov/types/v1/genesis.go
  • x/gov/types/v1/msgs.go
  • x/gov/types/v1/proposal.go
  • x/gov/types/v1beta1/genesis.go
  • x/gov/types/v1beta1/msgs.go
  • x/gov/types/v1beta1/proposal.go
  • x/group/genesis.go
  • x/group/proposal.go
  • x/group/simulation/operations.go
  • x/group/types.go
  • x/staking/types/genesis.go
  • x/staking/types/msg.go
Additional context used
Path-based instructions (7)
x/evidence/types/msgs.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/authz/authorization_grant.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/authz/msgs.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

types/tx/types.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/group/msgs.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

server/v2/cometbft/client/grpc/cmtservice/service.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

codec/types/interface_registry.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

Additional comments not posted (26)
x/evidence/types/msgs.go (3)

7-7: Import change approved.

The addition of gogoprotoany is necessary for the changes made in this file.


16-17: Variable declarations updated to use gogoprotoany.UnpackInterfacesMessage.

The changes are correct and align with the new import.


55-57: Function signature updated to use gogoprotoany.AnyUnpacker.

The change is correct and aligns with the new import.

x/authz/authorization_grant.go (4)

7-7: Import change approved.

The addition of gogoprotoany is necessary for the changes made in this file.


35-35: Variable declarations updated to use gogoprotoany.UnpackInterfacesMessage.

The changes are correct and align with the new import.


38-40: Function signature updated to use gogoprotoany.AnyUnpacker.

The change is correct and aligns with the new import.


25-27: Function body updated to use gogoprotoany.NewAnyWithCacheWithValue.

The change is correct and aligns with the new import.

x/authz/msgs.go (5)

7-7: Import change approved.

The addition of gogoprotoany is necessary for the changes made in this file.


19-20: Variable declarations updated to use gogoprotoany.UnpackInterfacesMessage.

The changes are correct and align with the new import.


57-59: Function signature updated to use gogoprotoany.AnyUnpacker.

The change is correct and aligns with the new import.


70-72: Function signature updated to use gogoprotoany.AnyUnpacker.

The change is correct and aligns with the new import.


48-50: Function body updated to use gogoprotoany.NewAnyWithCacheWithValue.

The change is correct and aligns with the new import.

types/tx/types.go (5)

Line range hint 180-188:
LGTM!

The change to use gogoprotoany.AnyUnpacker in the UnpackInterfaces function of Tx is consistent with the PR objectives.


Line range hint 195-206:
LGTM!

The change to use gogoprotoany.AnyUnpacker in the UnpackInterfaces function of TxBody is consistent with the PR objectives.


Line range hint 212-217:
LGTM!

The change to use gogoprotoany.AnyUnpacker in the UnpackInterfaces function of AuthInfo is consistent with the PR objectives.


223-225: LGTM!

The change to use gogoprotoany.AnyUnpacker in the UnpackInterfaces function of SignerInfo is consistent with the PR objectives.


23-23: LGTM!

The change to use gogoprotoany.UnpackInterfacesMessage for interface implementation checks is consistent with the PR objectives.

x/group/msgs.go (5)

87-89: LGTM!

The change to use gogoprotoany.AnyUnpacker in the UnpackInterfaces function of MsgCreateGroupWithPolicy is consistent with the PR objectives.


130-132: LGTM!

The change to use gogoprotoany.AnyUnpacker in the UnpackInterfaces function of MsgUpdateGroupPolicyDecisionPolicy is consistent with the PR objectives.


184-186: LGTM!

The change to use gogoprotoany.AnyUnpacker in the UnpackInterfaces function of MsgCreateGroupPolicy is consistent with the PR objectives.


222-224: LGTM!

The change to use gogoprotoany.AnyUnpacker in the UnpackInterfaces function of MsgSubmitProposal is consistent with the PR objectives.


31-33: LGTM!

The change to use gogoprotoany.UnpackInterfacesMessage for interface implementation checks is consistent with the PR objectives.

server/v2/cometbft/client/grpc/cmtservice/service.go (1)

Line range hint 135-141:
LGTM!

The change to use gogoprotoany.AnyUnpacker in the UnpackInterfaces function of GetLatestValidatorSetResponse is consistent with the PR objectives.

codec/types/interface_registry.go (3)

10-10: Import change approved.

The import of gogoprotoany from github.com/cosmos/gogoproto/types/any is necessary for the transition to gogoprotoany interfaces.


21-22: Function signature change approved.

The UnpackInterfaces function has been updated to use gogoprotoany.AnyUnpacker, aligning with the new interface structure.


33-33: Interface change approved.

The addition of gogoprotoany.AnyUnpacker to the InterfaceRegistry interface aligns with the transition to gogoprotoany.

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

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between eec42ba and 6c3261a.

Files selected for processing (1)
  • server/v2/cometbft/client/grpc/cmtservice/service.go (3 hunks)
Additional context used
Path-based instructions (1)
server/v2/cometbft/client/grpc/cmtservice/service.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

Additional comments not posted (3)
server/v2/cometbft/client/grpc/cmtservice/service.go (3)

12-12: Import statement addition approved.

The import statement for gogoprotoany has been correctly added.


26-27: Interface implementation declaration approved.

The interface implementation declaration for gogoprotoany.UnpackInterfacesMessage has been correctly added.


Line range hint 134-143:
Function signature change approved.

The parameter type for the unpacker argument has been correctly changed from codectypes.AnyUnpacker to gogoprotoany.AnyUnpacker.

However, ensure that all function calls to UnpackInterfaces match the new signature.

Verification successful

Function signature change approved.

The parameter type for the unpacker argument has been correctly changed from codectypes.AnyUnpacker to gogoprotoany.AnyUnpacker. All instances of UnpackInterfaces in the codebase match the new signature.

  • x/staking/types/genesis.go
  • x/staking/types/validator.go
  • x/staking/types/msg.go
  • x/group/proposal.go
  • x/group/types.go
  • x/group/genesis.go
  • x/group/msgs.go
  • x/feegrant/msgs.go
  • x/feegrant/genesis.go
  • x/evidence/types/msgs.go
  • x/evidence/types/genesis.go
  • x/gov/types/v1beta1/proposal.go
  • x/gov/types/v1beta1/msgs.go
  • x/gov/types/v1/proposal.go
  • x/gov/types/v1/msgs.go
  • x/authz/genesis.go
  • x/authz/msgs.go
  • x/auth/types/query.go
  • x/auth/types/account.go
  • x/auth/types/genesis.go
  • x/auth/migrations/legacytx/stdsignmsg.go
  • x/auth/migrations/legacytx/stdtx.go
  • x/auth/migrations/legacytx/stdsign.go
  • crypto/keyring/record.go
  • crypto/keyring/legacy_info.go
  • crypto/keys/multisig/multisig.go
  • client/grpc_query.go
  • client/grpc/cmtservice/service.go
  • codec/proto_codec.go
  • codec/json.go
  • codec/types/types_test.go
  • codec/any_test.go
  • codec/amino.go
  • codec/types/interface_registry.go
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `UnpackInterfaces` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go -A 5 $'UnpackInterfaces'

Length of output: 48163

@@ -169,11 +170,6 @@ func packPubKeys(pubKeys []cryptotypes.PubKey) ([]*types.Any, error) {
return nil, err
}
anyPubKeys[i] = any

// sets the compat.aminoBz value
Copy link
Member

Choose a reason for hiding this comment

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

Should this be backported to v50? If so let's extract it in another PR

Copy link
Contributor

@raynaudoe raynaudoe left a comment

Choose a reason for hiding this comment

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

LGTM!

@facundomedica facundomedica added this pull request to the merge queue Jul 22, 2024
Merged via the queue into main with commit 9ab162d Jul 22, 2024
81 checks passed
@facundomedica facundomedica deleted the facu/showissue-unpacker branch July 22, 2024 11:27
alpe added a commit that referenced this pull request Jul 23, 2024
* main: (48 commits)
  build(deps): add missing replaces and remove unnecessary ones (#21033)
  build(deps): Bump bufbuild/buf-setup-action from 1.34.0 to 1.35.0 (#21028)
  chore: fix some comments for struct field (#21027)
  chore(x): replace `fmt.Errorf` without parameters with `errors.New` (#21032)
  chore: fix errors reported by running `make lint` (#21015)
  ci: skip spelling check in go.mod/go.sum (#21021)
  chore(all)!: use gogoproto/any instead of codec/types/any (#21013)
  chore(server/v2/cometbft): ensure consistent dash-case in app.toml (#21018)
  docs(server): wrong function comments (#21017)
  refactor(storev2): update snapshot manager and migration manager tests (#20441)
  feat(server/v2/cometbft): config (#20989)
  refactor: set `help` as default target of Makefile (#21011)
  fix(simapp): duplicated import (#21014)
  chore(docs): fix functions and struct comments (#21010)
  fix(simapp/v2): panic with testnet init-files command (#21012)
  fix: make help won't work (#21005)
  fix: NewIntegrationApp does not write default genesis to state (#21006)
  chore(x/staking,x/upgrade): replace `fmt.Errorf` without parameters with `errors.New` (#21004)
  chore: prepare depinject 1.0.0 (#21001)
  docs: Fix typos in RFC Creation Process (#20998)
  ...
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.

3 participants