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

0X
7d ago
+22879-1691

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 so the API surface stops advertising a service that always returns UNIMPLEMENTED. The old config key is now ignored and logs a warning; runtime behavior is unchanged. The branch also carries the 4.8.2.3 release line: a TVM storage optimization gated by the new ALLOW_OPTIMIZE_TVM_STORAGE proposal, CPU-time checks for self-destructed and invalid-delegated-V2 accounts, dependency upgrades (grpc 1.83.1, netty 4.2.15, jackson 2.18.10, logback 1.3.16; joda-time and commons-math dropped), and sanitized HTTP/JSON-RPC error responses that no longer leak stack traces or exception class names.

  • Refactors
    • Deleted service WalletExtension and its messages from api.proto, the empty WalletExtensionApi, and the dead helpers (Util.printTransactionList, gRPC stubs, /walletextension/* HTTP methods).
    • Dropped node.walletExtensionApi bindings/defaults; NodeConfig.fromConfig warns when the key is still present.
  • Migration
    • Remove downstream references to WalletExtensionGrpc and the removed messages; the old config key is ignored with a warning.

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.