refactor(protocol): prune grpc-gateway related proto#6726
Open
317787106 wants to merge 5 commits intotronprotocol:developfrom
Open
refactor(protocol): prune grpc-gateway related proto#6726317787106 wants to merge 5 commits intotronprotocol:developfrom
317787106 wants to merge 5 commits intotronprotocol:developfrom
Conversation
Collaborator
|
Why haven’t the |
Collaborator
Author
@lvs0075 To support compiling these proto files in Go, update go_package to point to the repository currently in use : github.com/tronprotocol/protocol. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #6548.
Removes all
google.api.httpoption annotations from gRPC service definitions, deletes eight unused empty proto files underprotocol/src/main/protos/core/tron/, and updatesoption go_packageacross all proto files to point to the canonical tronprotocol/protocol repository. No RPC method signatures, message types, or service interfaces are changed.Background
The grpc-gateway project, which relied on
google.api.httpmappings to translate HTTP requests into gRPC calls, has been deprecated and is no longer maintained. Every gRPC API already has a dedicated HTTP implementation inFullNodeHttpApiService, making the dual HTTP-REST route definitions redundant.The existing
option go_packagevalues pointed to the deprecatedgrpc-gatewayrepository (github.com/tronprotocol/grpc-gateway/...). They are updated here to point to the canonical protocol repository (github.com/tronprotocol/protocol/...), which is the correct home for Go code generated from these proto files.Changes
protocol/src/main/protos/api/api.protogoogle.api.httpoption blocks from 56 RPC methods across theWallet,WalletSolidity,WalletExtension, andMonitorservices.option go_packagefromgithub.com/tronprotocol/grpc-gateway/apitogithub.com/tronprotocol/protocol/api.Other proto files —
go_packageupdatesapi/zksnark.protogrpc-gateway/apiprotocol/apicore/Tron.proto,core/Discover.proto,core/TronInventoryItems.protogrpc-gateway/coreprotocol/corecore/contract/*.proto(12 files)grpc-gateway/coreor absentprotocol/core/contractDeleted files (
protocol/src/main/protos/core/tron/)Eight empty proto files that served no purpose after grpc-gateway was abandoned:
account.proto,block.proto,delegated_resource.proto,p2p.proto,proposal.proto,transaction.proto,vote.proto,witness.protoImpact
FullNodeHttpApiServiceand are unaffected.option go_packagenow points togithub.com/tronprotocol/protocol. Go consumers should generate stubs from the tronprotocol/protocol repository (ago.modwill be added there to complete Go module support).Test
NA — this is a pure proto cleanup with no logic changes. The generated Java/gRPC stubs are functionally identical.