-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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(server/v2/grpc): simplify node service #22728
Conversation
📝 WalkthroughWalkthroughThe pull request includes the removal of a gRPC service and related protobuf definitions for querying node configuration in the Cosmos SDK framework. It also updates the protobuf version in the build scripts and modifies the gRPC server implementation to eliminate the registration of the removed service. Additionally, changes were made to enhance configuration handling in the gRPC service, including the introduction of a gRPC gateway configuration while removing outdated pruning options. The updates reflect a restructuring of service management and configuration handling within the server. Changes
Possibly related PRs
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
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, can you remove key changes values related to store.options.ss
here: https://github.com/cosmos/cosmos-sdk/blob/main/tools/confix/migrations.go#L41
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
Yep, good point! Done. |
b05ac25
to
684fe67
Compare
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
tools/confix/data/v2-app.toml (1)
44-48
: Consider security implications of the gRPC gateway configurationThe default configuration binds to localhost, which is secure for development but may need adjustment for production environments. Consider adding:
- TLS configuration options
- Configurable bind address for different environments
- Rate limiting settings
server/v2/cometbft/grpc.go (1)
Line range hint
124-186
: Consider standardizing error message formatThe implementation looks good with thorough error handling and backwards compatibility support. Consider standardizing the error message format:
- return nil, status.Error(codes.InvalidArgument, "invalid empty tx") + return nil, status.Error(codes.InvalidArgument, "invalid tx: empty request")
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
⛔ Files ignored due to path filters (2)
server/v2/api/grpc/nodeservice/query.pb.go
is excluded by!**/*.pb.go
server/v2/api/grpc/nodeservice/query.pb.gw.go
is excluded by!**/*.pb.gw.go
📒 Files selected for processing (8)
proto/cosmos/base/node/v2/query.proto
(0 hunks)scripts/build/protobuf.mk
(1 hunks)server/v2/api/grpc/nodeservice/service.go
(0 hunks)server/v2/api/grpc/server.go
(0 hunks)server/v2/cometbft/grpc.go
(3 hunks)server/v2/go.mod
(1 hunks)tools/confix/data/v2-app.toml
(1 hunks)tools/confix/migrations.go
(0 hunks)
💤 Files with no reviewable changes (4)
- server/v2/api/grpc/nodeservice/service.go
- proto/cosmos/base/node/v2/query.proto
- server/v2/api/grpc/server.go
- tools/confix/migrations.go
✅ Files skipped from review due to trivial changes (1)
- scripts/build/protobuf.mk
🧰 Additional context used
📓 Path-based instructions (1)
server/v2/cometbft/grpc.go (1)
Pattern **/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
🔇 Additional comments (3)
server/v2/go.mod (1)
115-116
: LGTM: Dependency updates are consistent
The changes to google.golang.org/genproto dependencies reflect their indirect usage status and include version updates.
server/v2/cometbft/grpc.go (2)
5-5
: LGTM: Required imports added
The new imports support the enhanced configuration handling in the Config method.
Also applies to: 19-19
213-221
: LGTM: Improved configuration handling
The changes improve type safety by:
- Using proper unmarshaling of store configuration
- Adding appropriate error handling
- Using typed values for pruning options
(cherry picked from commit af4b7d2) # Conflicts: # server/v2/api/grpc/server.go # server/v2/go.mod
Description
Should not be merged before the target PR.
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.
Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.
I have...
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Chores