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 proto services for balancer and superfluid module #1672

Merged
merged 2 commits into from
Jun 5, 2022

Conversation

mattverse
Copy link
Member

What is the purpose of the change

This fix is necessary in order to support ORM.

The legacy problem with proto package for balancer has been a problem for a long time, which has been fixed and addressed over multiple PRs(#1208, #1469). The latest decision that has been made upon this legacy package issue was to change the tx.proto(https://github.com/osmosis-labs/osmosis/blob/main/proto/osmosis/gamm/pool-models/balancer/tx.proto) to the correct package while leaving balacerPool.proto under the legacy wrong package so that we wouldn't have to deal with migration logic.

Even though such decision has fixed duplicate package issue that has been a blocker for typescript proto generation, it is now an issue with orm support, as protoc does not allow one package path to have different packages within the protofiles(ex. protoc-gen-go-grpc: Go package "github.com/osmosis-labs/osmosis/api/osmosis/gamm/pool-models/balancer" has inconsistent names gammv1beta1 (osmosis/gamm/pool-models/balancer/balancerPool.proto) and balancerv1beta1 (osmosis/gamm/pool-models/balancer/tx.proto)).

There would be multiple ways to fix this problem, open to other ways of fixing this as well.

The way this PR solves it is physically creating a new folder for the tx.proto file under the proto/gamm/pool-models/balancer folder to avoid the problem stated above.


As for the superfluid module, we have had inconsistency with the packages as well proto package for gov.proto set to osmosis.superfluid.v1beta, while the other proto packages have the proto package of osmosis.superfluid. The suggested fix in this PR is creating a new folder under proto/superfluid to fix the duplicate proto package path issue.

Brief Changelog

  • Change proto package for proto/gamm/pool-models/balancer/tx.proto and proto/superfluid/gov.proto

Testing and Verifying

Additional testing needed that this fix does not break unknown unknowns in the state side.

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? yes
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md?no
  • How is the feature or change documented? (not applicable / specification (x/<module>/spec/) / Osmosis docs repo / not documented)

@mattverse mattverse requested a review from a team June 5, 2022 12:26
@github-actions github-actions bot added C:x/gamm Changes, features and bugs related to the gamm module. C:x/superfluid labels Jun 5, 2022
Copy link
Member

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

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

Oh wow, yikes, thanks for doing this!

Looks correct to me! Can we add a quite readme in the balancer proto folder explaining the situation?

@mergify mergify bot merged commit 88786c4 into main Jun 5, 2022
@mergify mergify bot deleted the mattverse/fix-proto branch June 5, 2022 23:35
@mattverse mattverse mentioned this pull request Jun 6, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge C:x/gamm Changes, features and bugs related to the gamm module. C:x/superfluid
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants