Skip to content

[Feature] Remove the dead WalletExtension gRPC service and config #6931

Description

@0xbigapple

Summary

The WalletExtension gRPC service has been registered but not implemented since Odyssey-v3.7 (2020-03): all four of its RPCs return UNIMPLEMENTED. This proposal removes the unused Java implementation, the node.walletExtensionApi configuration item that controls it, and the service WalletExtension definition in api.proto. It also removes the messages that are no longer used without this service: AccountPaginated, TransactionList, TransactionListExtention, TimeMessage, and TimePaginatedMessage.

Problem

Motivation

java-tron still includes a gRPC service, a config switch, and a set of proto RPC definitions that do not work. The in-memory index that once supported these RPCs was removed long ago because it used too many node resources for the value it provided; transaction information by account address is now provided by TronGrid. The config name may make node operators think it controls whether a working API is exposed, while the proto definitions cause SDK code generators to create client stubs for methods that can never succeed.

Current State

  1. Proto definitions: protocol/src/main/protos/api/api.proto still defines four WalletExtension RPCs, all of which take AccountPaginated. GetTransactionsFromThis and GetTransactionsToThis return TransactionList; their *2 versions return TransactionListExtention. These RPCs are the only users of the three message types in any .proto file in the repository. TimePaginatedMessage and the TimeMessage it contains are also unused after their *ByTimestamp RPCs were removed in Rm api #909.
  2. Runtime behavior: RpcApiService.WalletExtensionApi provides no RPC implementation: it extends WalletExtensionGrpc.WalletExtensionImplBase but overrides none of its RPC methods, and its only private helper, transactionList2Extention(), has no callers. Every request therefore uses the generated default handler and returns UNIMPLEMENTED. Registration does not change this behavior. The service is added only on a solidity node when node.walletExtensionApi = true; reference.conf sets the key to false by default, but the bundled framework/src/main/resources/config.conf sets it to true. The old HTTP endpoints were removed with the RPC implementations in Feature/multi_module meger to develop #2533, leaving only unused integration-test helpers.

Limitations or Risks

This does not add a new runtime risk. The main issue is unnecessary confusion. Node operators may think node.walletExtensionApi controls a working API, while generated SDKs still include methods that always return UNIMPLEMENTED. The remaining code and proto definitions also require maintenance.

Proposed Solution

Proposed Design

  1. Remove the Java implementation: Delete the WalletExtensionApi class, its registration branch in RpcApiService.addService(), and the WalletExtensionGrpc import.
  2. Delete the proto definitions: Remove service WalletExtension and its four RPCs from api.proto, together with the five messages listed above.
  3. Remove the configuration item: Delete node.walletExtensionApi from CommonParameter, NodeConfig, Args, and all bundled .conf files. If the old key is still present in an operator config, log a removal warning at startup.
  4. Clean up the remaining unused code: Remove Util.printTransactionList() from main sources, whose only caller is its own unit test; remove the unused WalletExtension test code from GrpcClient, WalletClient, and HttpMethed; and delete the getter/setter assertions for the removed parameter from ParameterTest.

Key Changes

  • Modules: framework, common, protocol, and related test code
  • API / Behavior Surface: The four service WalletExtension RPCs are no longer registered. Their gRPC status remains UNIMPLEMENTED; only the status description changes, from unimplemented-method wording to unregistered-service wording.

Impact

The change keeps the same gRPC status code and has no performance effect other than registering one fewer service at startup. It makes the node configuration and code easier to understand and maintain: it removes a config item that looks like an API switch but does not control a working service, stops generating SDK stubs for methods that can never succeed, and removes unused code from about a dozen files.

Compatibility

  • Breaking Change: Yes, for clients that use the removed definitions. Runtime behavior and the wire format do not change because all four RPCs already return UNIMPLEMENTED. Clients such as wallet-cli or Trident may keep their own copy of api.proto or generated gRPC code; if that code uses WalletExtensionGrpc or the five messages listed above, it must be updated when the new proto is adopted.
  • Default Behavior Change: No.
  • Migration Required: Only for clients that use the removed definitions; no action is required for node operators. Existing walletExtensionApi entries are ignored with a startup warning.

Additional Notes

  • Do you have ideas regarding implementation? Yes
  • Are you willing to implement this feature? Yes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions