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

fix: add cosmos.msg.v1.service to message services #8689

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

faddat
Copy link
Member

@faddat faddat commented Sep 10, 2024

What is the purpose of the change

This pull request resolves an issue I encountered with using Osmosis modules in a third party chain:

    �service osmosis.poolmanager.v1beta1.Msg does not have cosmos.msg.v1.service proto annotation
    �service osmosis.tokenfactory.v1beta1.Msg does not have cosmos.msg.v1.service proto annotation
    �service osmosis.poolmanager.v1beta1.Msg does not have cosmos.msg.v1.service proto annotation
    �service osmosis.tokenfactory.v1beta1.Msg does not have cosmos.msg.v1.service proto annotation

I think that the difference between osmosis and the other chain is the use of appv2, so I checked IBC and cosmwasm, and found the annotation there.

Testing and Verifying

This change is already covered by existing tests. If tests don't pass, or the change doesn't make sense to maintainers, please close this PR :)

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? no
  • Changelog entry added to Unreleased section of CHANGELOG.md? shortly, yes

Where is the change documented?

  • Specification (x/{module}/README.md)
  • Osmosis documentation site
  • Code comments?
  • N/A

Copy link
Contributor

coderabbitai bot commented Sep 10, 2024

Walkthrough

This pull request updates the CHANGELOG.md file to document various changes across the Osmosis project, including version bumps for cosmwasm-optimizer and cosmwasm vm, as well as multiple bug fixes and enhancements. Additionally, it introduces a new option to the Msg service in several Protocol Buffers files, indicating their recognition as part of the Cosmos messaging framework. The existing RPC methods remain unchanged, ensuring that their functionality is preserved while enhancing the services' metadata.

Changes

Files Change Summary
CHANGELOG.md Updated with new entries for version bumps, bug fixes, and enhancements.
proto/osmosis/concentratedliquidity/v1beta1/tx.proto Added: option (cosmos.msg.v1.service) = true; in service Msg.
proto/osmosis/cosmwasmpool/v1beta1/tx.proto Added: import "cosmos/msg/v1/msg.proto"; Modified: service Msg to include service option.
proto/osmosis/gamm/v1beta1/tx.proto Added: option (cosmos.msg.v1.service) = true; in service Msg.
proto/osmosis/ibchooks/tx.proto Added: option (cosmos.msg.v1.service) = true; in service Msg.
proto/osmosis/incentives/tx.proto Added: option (cosmos.msg.v1.service) = true; in service Msg.
proto/osmosis/lockup/tx.proto Added: option (cosmos.msg.v1.service) = true; in service Msg.
proto/osmosis/poolmanager/v1beta1/tx.proto Added: option (cosmos.msg.v1.service) = true; in service Msg.
proto/osmosis/protorev/v1beta1/tx.proto Added: option (cosmos.msg.v1.service) = true; in service Msg.
proto/osmosis/smartaccount/v1beta1/tx.proto Added: option (cosmos.msg.v1.service) = true; in service Msg.
proto/osmosis/superfluid/tx.proto Added: option (cosmos.msg.v1.service) = true; in service Msg.
proto/osmosis/tokenfactory/v1beta1/tx.proto Added: option (cosmos.msg.v1.service) = true; in service Msg.
proto/osmosis/txfees/v1beta1/tx.proto Added: option (cosmos.msg.v1.service) = true; in service Msg.
proto/osmosis/valsetpref/v1beta1/tx.proto Added: option (cosmos.msg.v1.service) = true; in service Msg.

Possibly related PRs

Suggested labels

V:state/compatible/backport

Suggested reviewers

  • mattverse
  • PaddyMc
  • czarcas7ic
  • nicolaslara
  • AlpinYukseloglu

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between f607ea9 and 2c05f1e.

⛔ Files ignored due to path filters (2)
  • x/lockup/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/protorev/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
📒 Files selected for processing (3)
  • CHANGELOG.md (1 hunks)
  • proto/osmosis/lockup/tx.proto (1 hunks)
  • proto/osmosis/protorev/v1beta1/tx.proto (1 hunks)
🧰 Additional context used
🔇 Additional comments (8)
proto/osmosis/lockup/tx.proto (1)

15-15: LGTM! Enhancement for Cosmos ecosystem compatibility.

The addition of option (cosmos.msg.v1.service) = true; to the Msg service is a positive change. This option declares that the service is compliant with the Cosmos messaging framework, which enhances integration with the broader Cosmos ecosystem. This change aligns well with the PR objective of adding necessary proto annotations to improve interoperability with third-party chains.

Importantly, this modification doesn't alter any existing functionality of the service or its methods. It simply provides additional metadata that can be utilized by Cosmos-compatible tools and frameworks.

proto/osmosis/protorev/v1beta1/tx.proto (1)

14-15: LGTM: Cosmos message service option added

The addition of option (cosmos.msg.v1.service) = true; to the Msg service is a positive change. This option explicitly declares that the service adheres to the Cosmos SDK messaging standards, which can improve interoperability with other Cosmos-based chains and tools.

This change doesn't affect the existing RPC methods or their functionality, making it a safe enhancement to the service definition.

CHANGELOG.md (6)

93-94: New feature: Add missing service annotation to tx proto files

This change adds the missing cosmos.msg.v1.service annotation to the service section of transaction proto files. This is likely to improve compatibility or enable certain features related to transaction handling.


Line range hint 1-91: LGTM: Recent changelog entries are well-structured and informative

The changelog entries for recent versions (v19.2.0 and above) are well-organized and provide clear information about features, improvements, and bug fixes. This helps users and developers understand the changes in each release.


Line range hint 95-124: Important updates in v19.0.0

This release includes several significant changes:

  1. Introduction of a taker fee
  2. Fixes for mainnet bugs related to accumulation sumtrees and CL handling
  3. Performance improvements for epoch computations
  4. API changes in poolmanager and osmomath modules

These changes appear to address important issues and introduce new features. The inclusion of both state-breaking and non-state-breaking changes is clearly indicated.


Line range hint 126-170: Comprehensive updates in v18.0.0

This release introduces major features and improvements:

  1. Nitrogen release with Cosmwasm development enhancements
  2. GAMM API changes (potential breaking change for integrators)
  3. Governance changes, including superfluid staker voting
  4. IBC upgrades and interchain account support
  5. Txfees improvements
  6. Cosmwasm upgrades and new TokenFactory module

The changelog provides clear upgrade instructions and highlights potential breaking changes, which is very helpful for users and developers.


Line range hint 172-1037: Well-maintained changelog for older versions

The changelog maintains a good level of detail for older versions, providing information about features, bug fixes, and breaking changes. This historical record is valuable for understanding the project's evolution and for users who might be upgrading from much older versions.


Line range hint 1-1037: Overall excellent changelog maintenance

This CHANGELOG.md file is exemplary in its organization and detail. It provides a comprehensive history of the Osmosis project's development, clearly outlining new features, breaking changes, improvements, and bug fixes for each version. The consistent structure and informative entries make it an invaluable resource for users, developers, and maintainers of the project. Keep up the good work in maintaining this changelog!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

Important Notice

This PR modifies an in-repo Go module. It is one of:

  • osmomath
  • osmoutils
  • x/ibc-hooks
  • x/epochs

The dependent Go modules, especially the root one, will have to be
updated to reflect the changes. Failing to do so might cause e2e to fail.

Please follow the instructions below:

  1. Open https://github.com/osmosis-labs/osmosis/actions/workflows/go-mod-auto-bump.yml
  2. Provide the current branch name
  3. On success, confirm if an automated commit corretly updated the go.mod and go.sum files

Please let us know if you need any help.

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

@@ -1,6 +1,8 @@
syntax = "proto3";
package osmosis.cosmwasmpool.v1beta1;

import "cosmos/msg/v1/msg.proto";
Copy link
Contributor

@coderabbitai coderabbitai bot Sep 10, 2024

Choose a reason for hiding this comment

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

Resolve the missing import file.

The import statement import "cosmos/msg/v1/msg.proto"; is added to support the new option in the Msg service. However, the static analysis tool reports that the imported file does not exist, which could lead to compilation errors.

Please ensure that the cosmos/msg/v1/msg.proto file is available in the expected location or update the import path to point to the correct location of the file.

Do you want me to help resolve this issue? I can try to locate the missing file in the repository or suggest alternative import paths.

Tools
buf

4-4: import "cosmos/msg/v1/msg.proto": file does not exist

(COMPILE)

Copy link
Member Author

Choose a reason for hiding this comment

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

I think things are okay here Mr. Rabbit. Will wait for the team's review though.

Copy link
Contributor

Choose a reason for hiding this comment

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

@faddat Understood! I'll be here if you need any further assistance after the team's review. 😊

@faddat faddat changed the title fix: add option (cosmos.msg.v1.service) = true; fix: add cosmos.msg.v1.service to message services Sep 10, 2024
@faddat
Copy link
Member Author

faddat commented Sep 10, 2024

I'm pretty confident that the generated protofile changes job will break this.

@faddat
Copy link
Member Author

faddat commented Sep 10, 2024

I trust commit f607ea9

but not the one after it

@faddat
Copy link
Member Author

faddat commented Sep 12, 2024

package github.com/osmosis-labs/osmosis/v26/app
	imports github.com/osmosis-labs/osmosis/v26/app/keepers
	imports github.com/osmosis-labs/osmosis/v26/wasmbinding
	imports github.com/osmosis-labs/osmosis/v26/x/gamm/types
	imports github.com/osmosis-labs/osmosis/v26/x/gamm/pool-models/balancer
	imports github.com/osmosis-labs/osmosis/v26/x/gamm/pool-models/internal/cfmm_common
	imports github.com/osmosis-labs/osmosis/v26/x/gamm/types: import cycle not allowed
fatal: No names found, cannot describe anything.
package github.com/osmosis-labs/osmosis/v26/app
	imports github.com/osmosis-labs/osmosis/v26/app/keepers
	imports github.com/osmosis-labs/osmosis/v26/wasmbinding
	imports github.com/osmosis-labs/osmosis/v26/x/gamm/types
	imports github.com/osmosis-labs/osmosis/v26/x/gamm/pool-models/balancer
	imports github.com/osmosis-labs/osmosis/v26/x/gamm/pool-models/internal/cfmm_common
	imports github.com/osmosis-labs/osmosis/v26/x/gamm/types: import cycle not allowed
no Go files in /home/runner/work/osmosis/osmosis
make: *** [scripts/makefiles/tests.mk:50: test-sim-app] Error 1

This is being caused by generated protofile changes commits

@PaddyMc PaddyMc closed this Sep 12, 2024
@PaddyMc PaddyMc reopened this Sep 12, 2024
@PaddyMc PaddyMc self-requested a review September 16, 2024 07:54
@PaddyMc PaddyMc self-assigned this Sep 23, 2024
@PaddyMc
Copy link
Contributor

PaddyMc commented Sep 23, 2024

gm gm gm, would you mind merging main into your branch and I can start reviewing!

We reverted => #8710 => so the build should work now 🙏

@PaddyMc PaddyMc closed this Sep 27, 2024
@PaddyMc PaddyMc reopened this Sep 27, 2024
Copy link
Contributor

github-actions bot commented Oct 6, 2024

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

@github-actions github-actions bot added the Stale label Oct 6, 2024
@github-actions github-actions bot closed this Oct 10, 2024
@faddat
Copy link
Member Author

faddat commented Oct 10, 2024

oh sure thing!

@faddat faddat reopened this Oct 10, 2024
@github-actions github-actions bot removed the Stale label Oct 11, 2024
@PaddyMc PaddyMc closed this Oct 15, 2024
@PaddyMc PaddyMc reopened this Oct 15, 2024
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.

2 participants