Skip to content

refactor(api): remove dead WalletExtension gRPC service and config - #17

Open
0xbigapple wants to merge 1 commit into
developfrom
feature/remove-wallet-extension-service
Open

refactor(api): remove dead WalletExtension gRPC service and config#17
0xbigapple wants to merge 1 commit into
developfrom
feature/remove-wallet-extension-service

Conversation

@0xbigapple

@0xbigapple 0xbigapple commented Aug 7, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

Removes the dead WalletExtension gRPC service and everything reachable only from it:

  • api.proto: service WalletExtension (GetTransactionsFromThis/2, GetTransactionsToThis/2), plus messages AccountPaginated, TransactionList, TransactionListExtention (referenced only by these four RPCs) and TimeMessage / TimePaginatedMessage (request types of the WalletExtension *ByTimestamp RPCs deleted in 2018, orphaned ever since)
  • RpcApiService: the registration branch and the empty WalletExtensionApi inner class
  • The node.walletExtensionApi config item: CommonParameter / NodeConfig fields, the Args binding, and the key in reference.conf / config.conf / config-shield.conf. Following the retirement convention for node.* keys, NodeConfig.fromConfig now logs a removal warning when the old key is still present in an operator config
  • Dead code only reachable from the above: Util.printTransactionList (sole caller was its own mock test), the WalletExtension stub and wrappers in test utilities GrpcClient / WalletClient, HttpMethed.getTransactions{From,To}ThisFromSolidity (targets /walletextension/* HTTP paths that have no servlet), and commented-out getTransactionsByTimestamp / getAssetIssueListByTimestamp blocks

Why are these changes required?

WalletExtension has had no implementation in any release since v3.7 (2020-03): RpcApiService$WalletExtensionApi overrides none of the four RPCs, so every call falls through to the generated ImplBase default handlers and returns UNIMPLEMENTED. This makes node.walletExtensionApi behavior-irrelevant — enabled, it registers a service with zero implemented methods; disabled, callers get the same UNIMPLEMENTED. The only observable effect of enabling it is that gRPC reflection advertises a service that always fails. Removing it also resolves the default-value inconsistency between config.conf (true) and reference.conf (false).

Six years of unconditional UNIMPLEMENTED rules out any functional dependency, so the service is removed directly without a deprecation period, following existing practice for dead interfaces.

This PR has been tested by:

  • Unit Tests: ParameterTest (2), ArgsTest (21), UtilMockTest (19) all green; ./gradlew clean build -x test + Checkstyle pass; regenerated protobuf no longer contains WalletExtensionGrpc or the three messages; full-repo grep for WalletExtension|walletExtensionApi|AccountPaginated|TransactionsFromThis|TransactionsToThis has zero hits
  • Manual Testing: smoke-tested a FullNode with a leftover node.walletExtensionApi = true key in its config — the node starts normally with zero log mentions (the key is silently ignored, since ConfigBeanFactory only validates bean-side properties), and grpcurl reflection lists only protocol.Database / protocol.Wallet

Follow up

Ecosystem code that still compiles against the removed stubs/messages needs a sync: the tronprotocol/protocol mirror, the documentation site, and older wallet-cli/trident versions. Compile-time impact only — runtime behavior is unchanged (UNIMPLEMENTED before and after).

Extra details

None.


Summary by cubic

Removed the dead WalletExtension gRPC service and the node.walletExtensionApi config to simplify the API and delete unused code. The old config key is now ignored and logs a warning; runtime behavior is unchanged.

  • Refactors

    • Deleted service WalletExtension and messages AccountPaginated, TransactionList, TransactionListExtention, TimeMessage, TimePaginatedMessage from api.proto.
    • Removed service registration and the empty WalletExtensionApi from RpcApiService.
    • Dropped node.walletExtensionApi bindings/defaults; NodeConfig.fromConfig warns when present, and the key is removed from reference.conf, config.conf, and config-shield.conf.
    • Pruned dead helpers/tests: Util.printTransactionList, gRPC stubs in GrpcClient/WalletClient, and HTTP methods for /walletextension/*.
    • Added a guard test to ensure the removed config key is ignored with a warning.
  • Migration

    • Remove downstream references to WalletExtensionGrpc, AccountPaginated, TransactionList, TransactionListExtention, TimeMessage, TimePaginatedMessage.
    • Delete node.walletExtensionApi from configs; it is ignored with a warning.

Written for commit ca08100. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Breaking Changes
    • Removed the Wallet Extension API and its transaction-query endpoints.
    • Removed related transaction-list response types and client request methods.
  • Configuration
    • Removed the walletExtensionApi setting from supported configuration files.
    • Existing configurations using this setting are ignored with a warning.
  • Maintenance
    • Retained database, wallet, Solidity wallet, and monitoring services.
    • Updated supporting utilities and tests to reflect the retired API surface.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request removes the Wallet Extension gRPC service, transaction-list protocol messages, related configuration, server integration, utility methods, client helpers, and obsolete tests. Removed configuration keys are ignored with a warning.

Changes

Wallet Extension API removal

Layer / File(s) Summary
Protocol contract removal
protocol/src/main/protos/api/api.proto
Removes the WalletExtension service and the TransactionList, TimeMessage, AccountPaginated, and TransactionListExtention messages.
Runtime configuration and server cleanup
common/src/main/java/org/tron/common/parameter/CommonParameter.java, common/src/main/java/org/tron/core/config/args/NodeConfig.java, common/src/main/resources/reference.conf, framework/src/main/java/org/tron/core/config/args/Args.java, framework/src/main/java/org/tron/core/services/RpcApiService.java, framework/src/main/java/org/tron/core/services/http/Util.java, framework/src/main/resources/config.conf
Removes the wallet extension configuration, parameter propagation, RPC integration, and transaction-list JSON serialization helper. NodeConfig ignores the removed configuration key and logs a warning.
Client and test cleanup
framework/src/test/java/org/tron/common/utils/client/*, framework/src/test/java/org/tron/common/utils/client/utils/HttpMethed.java, framework/src/test/java/org/tron/common/ParameterTest.java, framework/src/test/java/org/tron/core/services/http/UtilMockTest.java, framework/src/test/resources/config-shield.conf, common/src/test/java/org/tron/core/config/args/NodeConfigTest.java
Removes extension stubs and address transaction-query helpers. Removes obsolete configuration entries and tests. Adds coverage for ignoring the removed configuration key.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: 317787106

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the removal of the dead WalletExtension gRPC service and related configuration.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/remove-wallet-extension-service

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.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 14 files

Re-trigger cubic

@0xbigapple

0xbigapple commented Aug 7, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@0xbigapple
0xbigapple force-pushed the feature/remove-wallet-extension-service branch from 1203572 to 097c797 Compare August 10, 2026 07:14
@0xbigapple 0xbigapple changed the title feat(api): remove dead WalletExtension gRPC service and config refactor(api): remove dead WalletExtension gRPC service and config Aug 10, 2026
The four WalletExtension RPCs have returned UNIMPLEMENTED since 2019;
the service was only registered on solidity nodes behind
node.walletExtensionApi, which config.conf enabled but reference.conf
disabled. Remove the service, its now-unreferenced messages (including
the TimeMessage/TimePaginatedMessage orphans left by the 2018 RPC
removal), the config key, and the dead client/test helpers. Log a
removal warning when the old key is still present in operator configs.
@0xbigapple
0xbigapple force-pushed the feature/remove-wallet-extension-service branch from 097c797 to ca08100 Compare August 10, 2026 07:51
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