Skip to content

refactor(protocol): prune grpc-gateway related proto#72

Open
317787106 wants to merge 1 commit intodevelopfrom
feature/prune_proto
Open

refactor(protocol): prune grpc-gateway related proto#72
317787106 wants to merge 1 commit intodevelopfrom
feature/prune_proto

Conversation

@317787106
Copy link
Copy Markdown
Owner

@317787106 317787106 commented Apr 17, 2026

What does this PR do?

Why are these changes required?

This PR has been tested by:

  • Unit Tests
  • Manual Testing

Follow up

Extra details


Summary by cubic

Removed grpc-gateway support from the protocol by stripping all google.api.http mappings and go_package options, and deleted unused core/tron/* protos. gRPC APIs stay the same; only REST bindings and Go codegen settings are removed.

  • Refactors

    • Removed all google.api.http annotations from Wallet, WalletSolidity, WalletExtension, and Monitor.
    • Dropped option go_package from API and contract protos.
    • Deleted legacy files under protocol/src/main/protos/core/tron/*.
  • Migration

    • If you used REST routes (e.g., /wallet/*), call the gRPC methods directly or run your own gateway.
    • Regenerate clients; Go codegen via protoc-gen-go is no longer supported by these protos.

Written for commit 04821b8. Summary will update on new commits.

Summary by CodeRabbit

  • Chores
    • Cleaned up protobuf configuration across multiple service definitions. All RPC methods, service interfaces, and message structures remain unchanged and fully functional.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 89998f22-edc5-419f-be98-87fa135c8f48

📥 Commits

Reviewing files that changed from the base of the PR and between 2de63bb and 04821b8.

📒 Files selected for processing (22)
  • protocol/src/main/protos/api/api.proto
  • protocol/src/main/protos/api/zksnark.proto
  • protocol/src/main/protos/core/contract/account_contract.proto
  • protocol/src/main/protos/core/contract/asset_issue_contract.proto
  • protocol/src/main/protos/core/contract/balance_contract.proto
  • protocol/src/main/protos/core/contract/common.proto
  • protocol/src/main/protos/core/contract/exchange_contract.proto
  • protocol/src/main/protos/core/contract/market_contract.proto
  • protocol/src/main/protos/core/contract/proposal_contract.proto
  • protocol/src/main/protos/core/contract/shield_contract.proto
  • protocol/src/main/protos/core/contract/smart_contract.proto
  • protocol/src/main/protos/core/contract/storage_contract.proto
  • protocol/src/main/protos/core/contract/vote_asset_contract.proto
  • protocol/src/main/protos/core/contract/witness_contract.proto
  • protocol/src/main/protos/core/tron/account.proto
  • protocol/src/main/protos/core/tron/block.proto
  • protocol/src/main/protos/core/tron/delegated_resource.proto
  • protocol/src/main/protos/core/tron/p2p.proto
  • protocol/src/main/protos/core/tron/proposal.proto
  • protocol/src/main/protos/core/tron/transaction.proto
  • protocol/src/main/protos/core/tron/vote.proto
  • protocol/src/main/protos/core/tron/witness.proto
💤 Files with no reviewable changes (14)
  • protocol/src/main/protos/core/contract/proposal_contract.proto
  • protocol/src/main/protos/core/contract/common.proto
  • protocol/src/main/protos/core/contract/storage_contract.proto
  • protocol/src/main/protos/core/contract/account_contract.proto
  • protocol/src/main/protos/core/contract/shield_contract.proto
  • protocol/src/main/protos/api/zksnark.proto
  • protocol/src/main/protos/core/contract/market_contract.proto
  • protocol/src/main/protos/core/contract/balance_contract.proto
  • protocol/src/main/protos/core/contract/vote_asset_contract.proto
  • protocol/src/main/protos/core/contract/exchange_contract.proto
  • protocol/src/main/protos/core/contract/smart_contract.proto
  • protocol/src/main/protos/core/contract/asset_issue_contract.proto
  • protocol/src/main/protos/core/contract/witness_contract.proto
  • protocol/src/main/protos/api/api.proto

📝 Walkthrough

Walkthrough

This pull request removes Go package generation directives and HTTP/REST gateway annotations from proto files. The go_package option is deleted from 15 proto files across API and contract modules. Additionally, all google.api.http annotations (including HTTP method mappings and bindings) are removed from the Wallet, WalletSolidity, WalletExtension, and Monitor services in the main API proto file.

Changes

Cohort / File(s) Summary
API Gateway HTTP Mappings
protocol/src/main/protos/api/api.proto
Removed go_package option and all google.api.http annotations (post/get, body, additional_bindings) from Wallet, WalletSolidity, WalletExtension, and Monitor RPC methods. RPC signatures unchanged; HTTP/REST gateway routes no longer declared.
ZkSnark Service Configuration
protocol/src/main/protos/api/zksnark.proto
Removed go_package option from proto file. Service and RPC declarations remain unchanged.
Contract Proto Package Configuration
protocol/src/main/protos/core/contract/*.proto (account_contract, asset_issue_contract, balance_contract, common, exchange_contract, market_contract, proposal_contract, shield_contract, smart_contract, storage_contract, vote_asset_contract, witness_contract)
Removed go_package option from 12 contract proto files. Message definitions and java_package options remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hops of joy!
HTTP routes now drift away,
Go packages freed from chains,
Proto files spring-cleaned today,
Cleaner code in our veins! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing grpc-gateway related proto options across multiple files. It is concise, specific, and clearly summarizes the primary refactoring objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/prune_proto

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 22 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant