-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
refactor(proto): use buf registry for cometbft protos #19366
Conversation
Note Reviews PausedUse the following commands to manage reviews:
WalkthroughThe project has undergone a significant update, focusing on cleaning up dependencies, reorganizing imports, and updating import paths across various packages. Notably, explicit downloading of protobuf files has been removed from the Makefile, and new dependencies have been added to various Changes
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 4
Configuration used: .coderabbit.yml
Files selected for processing (32)
- Makefile (1 hunks)
- api/cosmos/base/abci/v1beta1/abci.pulsar.go (1 hunks)
- api/cosmos/base/tendermint/v1beta1/query.pulsar.go (1 hunks)
- api/cosmos/base/tendermint/v1beta1/types.pulsar.go (1 hunks)
- api/cosmos/consensus/v1/query.pulsar.go (1 hunks)
- api/cosmos/consensus/v1/tx.pulsar.go (1 hunks)
- api/cosmos/staking/v1beta1/staking.pulsar.go (1 hunks)
- api/cosmos/store/streaming/abci/grpc.pulsar.go (1 hunks)
- api/cosmos/store/v1beta1/listening.pulsar.go (1 hunks)
- api/cosmos/tx/v1beta1/service.pulsar.go (1 hunks)
- api/go.mod (2 hunks)
- api/go.sum (1 hunks)
- go.mod (1 hunks)
- go.sum (1 hunks)
- proto/buf.gen.pulsar.yaml (1 hunks)
- proto/buf.lock (1 hunks)
- proto/buf.yaml (1 hunks)
- simapp/go.mod (1 hunks)
- simapp/go.sum (1 hunks)
- simapp/gomod2nix.toml (1 hunks)
- tests/go.mod (1 hunks)
- tests/go.sum (1 hunks)
- tests/starship/tests/go.mod (1 hunks)
- tests/starship/tests/go.sum (1 hunks)
- x/accounts/go.mod (1 hunks)
- x/accounts/go.sum (1 hunks)
- x/authz/go.mod (1 hunks)
- x/authz/go.sum (1 hunks)
- x/gov/go.mod (1 hunks)
- x/gov/go.sum (1 hunks)
- x/group/go.mod (1 hunks)
- x/group/go.sum (1 hunks)
Files not reviewed due to errors (2)
- (no review received)
- (no review received)
Files skipped from review due to trivial changes (2)
- Makefile
- proto/buf.gen.pulsar.yaml
Additional comments: 41
proto/buf.yaml (1)
- 5-5: LGTM!
api/go.mod (2)
- 6-6: LGTM!
- 15-15: LGTM!
proto/buf.lock (3)
- 12-13: LGTM!
- 17-18: LGTM!
- 24-28: LGTM!
api/go.sum (1)
- 1-4: LGTM!
x/accounts/go.mod (1)
- 21-22: LGTM!
x/authz/go.mod (1)
- 30-33: LGTM!
x/gov/go.mod (1)
- 36-39: LGTM!
x/group/go.mod (1)
- 39-40: LGTM!
go.mod (1)
- 69-70: LGTM!
tests/go.mod (1)
- 52-53: LGTM!
tests/starship/tests/go.mod (1)
- 53-54: The addition of
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go
andbuf.build/gen/go/tendermint/tendermint/protocolbuffers/go
dependencies aligns with the PR objectives to leverage buf registry for protobuf management. Ensure the specified versions are the latest stable releases compatible with the project.simapp/go.mod (1)
- 51-52: The inclusion of
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go
andbuf.build/gen/go/tendermint/tendermint/protocolbuffers/go
dependencies is consistent with the PR's goal to utilize the buf registry for protobuf file management. Confirm that the versions used are up-to-date and compatible with the rest of the project's dependencies.simapp/gomod2nix.toml (1)
- 4-9: Ensure the versions and hashes for
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go
andbuf.build/gen/go/tendermint/tendermint/protocolbuffers/go
are correctly aligned with the intended versions from the buf registry. The formatting and structure of these additions are consistent with the rest of the file.api/cosmos/consensus/v1/query.pulsar.go (1)
- 5-5: The import path for
types
has been updated to"buf.build/gen/go/tendermint/tendermint/protocolbuffers/go/tendermint/types"
. Confirm this path aligns with the new structure and location of the protobuf definitions as per the buf registry adoption.api/cosmos/consensus/v1/tx.pulsar.go (1)
- 5-5: The import path for the
types
package has been updated tobuf.build/gen/go/tendermint/tendermint/protocolbuffers/go/tendermint/types
. Ensure this path correctly points to the intended buf-generated protobuf definitions as per the PR objectives.api/cosmos/store/v1beta1/listening.pulsar.go (1)
- 5-5: The import path for the
abci
package has been updated to usebuf.build/gen/go/tendermint/tendermint/protocolbuffers/go/tendermint/abci
. Ensure this new path correctly points to the intendedabci
package and matches the project's dependency management and build configurations.api/cosmos/store/streaming/abci/grpc.pulsar.go (1)
- 5-5: Ensure the new import paths
buf.build/gen/go/tendermint/tendermint/protocolbuffers/go/tendermint/abci
andcosmossdk.io/api/cosmos/store/v1beta1
are correct and accessible within the project's dependencies.api/cosmos/base/tendermint/v1beta1/types.pulsar.go (1)
- 5-6: The import paths for
types
andversion
packages have been updated to usebuf.build
URLs. Confirm that these URLs are correctly pointing to the intended modules and that they are accessible in your build environment.x/authz/go.sum (3)
- 1-4: Added new versions for
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go
andbuf.build/gen/go/tendermint/tendermint/protocolbuffers/go
. Ensure these versions are compatible with the project's requirements and do not introduce breaking changes.- 5-6: Updated versions for
cloud.google.com/go
. Verify compatibility and check for any required code changes due to this update.- 1-7: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [7-8]
Updated versions for
cosmossdk.io/collections
. Confirm that the new version's changes are compatible with the project's usage of this dependency.x/group/go.sum (3)
- 1-4: Ensure the added
buf.build
dependencies are compatible with the project's existing modules and do not introduce any known security vulnerabilities.- 5-5: Verify the update of
cloud.google.com/go
fromv0.26.0
tov0.34.0
does not break any existing functionality or introduce performance regressions.- 7-7: Confirm the update of
cosmossdk.io/collections
tov0.4.0
is necessary and does not introduce breaking changes to the project.x/gov/go.sum (3)
- 1-4: Ensure the added versions of
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go
andbuf.build/gen/go/tendermint/tendermint/protocolbuffers/go
are compatible with the project's requirements and do not introduce breaking changes or known security vulnerabilities.- 3-4: The addition of
buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1
should be verified for compatibility and security. Ensure it aligns with the project's dependencies and does not conflict with other modules.- 1-4: Check for consistency in module versioning and ensure that the updates to
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go
andbuf.build/gen/go/tendermint/tendermint/protocolbuffers/go
do not cause conflicts with other dependencies.tests/go.sum (2)
- 1-4: Ensure compatibility and absence of known issues with the newly added versions of
cosmos/gogo-proto
andtendermint/tendermint
generated Go packages.- 1-7: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [5-8]
Verify that the updated versions of
cloud.google.com/go
do not introduce breaking changes or compatibility issues with the project's existing codebase and dependencies.tests/starship/tests/go.sum (2)
- 1-4: Ensure the newly added versions of
cosmos/gogo-proto
andtendermint/tendermint
protocol buffers are compatible with the rest of the project dependencies and do not introduce breaking changes.- 4-4: The addition of
buf.build/gen/go/tendermint/tendermint/protocolbuffers/go
with versionv1.32.0-20231117195010-33ed361a9051.1
aligns with the PR's objective to leverage the buf registry for protobuf management. Confirm that this version is the latest or most stable for the project's requirements.simapp/go.sum (2)
- 1-4: Ensure that the versions and hashes for
buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go
andbuf.build/gen/go/tendermint/tendermint/protocolbuffers/go
are correct and align with the project's dependency management strategy. The addition of these dependencies should directly support the PR's objectives of utilizing the buf registry for protobuf management.- 1-4: The addition of multiple versions of
cloud.google.com/go
in thego.sum
file indicates updates to dependencies. However, without the correspondinggo.mod
file changes in the provided code fragment, it's not possible to assess the impact of these updates. Ensure that these updates are necessary and do not introduce version conflicts with other dependencies.api/cosmos/base/abci/v1beta1/abci.pulsar.go (1)
- 5-6: Ensure the new import paths for
abci
andtypes
usingbuf.build
are correctly pointing to the intended protobuf definitions. Confirm that these paths are accessible and valid within the project's dependency management setup.api/cosmos/tx/v1beta1/service.pulsar.go (1)
- 5-5: Ensure the new import path
buf.build/gen/go/tendermint/tendermint/protocolbuffers/go/tendermint/types
is accessible and correctly references the intendedtypes
package. This change aligns with the PR's goal to use the buf registry for protobuf management but requires verification to ensure the path is valid and the package is correctly utilized within the codebase.api/cosmos/base/tendermint/v1beta1/query.pulsar.go (1)
- 5-6: Ensure the new import paths for
p2p
andtypes
packages are correct and accessible. Verify that these changes do not introduce any package initialization order issues or dependency cycles.api/cosmos/staking/v1beta1/staking.pulsar.go (2)
- 5-6: Ensure the updated import paths for
abci
andtypes
packages are correctly pointing to the intended buf-generated protobuf files. This change is crucial for aligning with the PR's objectives.- 5-9: Confirm that the imports prefixed with an underscore are intentionally used for their side effects only, as per Go's convention for imports that are necessary but not directly used in the code.
@coderabbitai pause |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left a small question
Description
Purposely ignoring the result of this action: https://github.com/cosmos/cosmos-sdk/actions/runs/7802154284/job/21278920476?pr=19366 as tendermint protos aren't sdk protos, and now that cometbft has a buf module, this isn't breaking. We've only included cometbft protos in the past because they didn't use buf.
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...
!
in the type prefix if API or client breaking changeCHANGELOG.md
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.
I have...
Summary by CodeRabbit
Refactor
Chores
Documentation