refactor(api): remove dead WalletExtension gRPC service and config - #17
refactor(api): remove dead WalletExtension gRPC service and config#170xbigapple wants to merge 1 commit into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughThe 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. ChangesWallet Extension API removal
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
|
1203572 to
097c797
Compare
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.
097c797 to
ca08100
Compare
What does this PR do?
Removes the dead
WalletExtensiongRPC service and everything reachable only from it:api.proto:service WalletExtension(GetTransactionsFromThis/2,GetTransactionsToThis/2), plus messagesAccountPaginated,TransactionList,TransactionListExtention(referenced only by these four RPCs) andTimeMessage/TimePaginatedMessage(request types of the WalletExtension*ByTimestampRPCs deleted in 2018, orphaned ever since)RpcApiService: the registration branch and the emptyWalletExtensionApiinner classnode.walletExtensionApiconfig item:CommonParameter/NodeConfigfields, theArgsbinding, and the key inreference.conf/config.conf/config-shield.conf. Following the retirement convention fornode.*keys,NodeConfig.fromConfignow logs a removal warning when the old key is still present in an operator configUtil.printTransactionList(sole caller was its own mock test), the WalletExtension stub and wrappers in test utilitiesGrpcClient/WalletClient,HttpMethed.getTransactions{From,To}ThisFromSolidity(targets/walletextension/*HTTP paths that have no servlet), and commented-outgetTransactionsByTimestamp/getAssetIssueListByTimestampblocksWhy are these changes required?
WalletExtensionhas had no implementation in any release since v3.7 (2020-03):RpcApiService$WalletExtensionApioverrides none of the four RPCs, so every call falls through to the generatedImplBasedefault handlers and returnsUNIMPLEMENTED. This makesnode.walletExtensionApibehavior-irrelevant — enabled, it registers a service with zero implemented methods; disabled, callers get the sameUNIMPLEMENTED. 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 betweenconfig.conf(true) andreference.conf(false).Six years of unconditional
UNIMPLEMENTEDrules 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:
ParameterTest(2),ArgsTest(21),UtilMockTest(19) all green;./gradlew clean build -x test+ Checkstyle pass; regenerated protobuf no longer containsWalletExtensionGrpcor the three messages; full-repo grep forWalletExtension|walletExtensionApi|AccountPaginated|TransactionsFromThis|TransactionsToThishas zero hitsnode.walletExtensionApi = truekey in its config — the node starts normally with zero log mentions (the key is silently ignored, sinceConfigBeanFactoryonly validates bean-side properties), andgrpcurlreflection lists onlyprotocol.Database/protocol.WalletFollow up
Ecosystem code that still compiles against the removed stubs/messages needs a sync: the
tronprotocol/protocolmirror, the documentation site, and older wallet-cli/trident versions. Compile-time impact only — runtime behavior is unchanged (UNIMPLEMENTEDbefore and after).Extra details
None.
Summary by cubic
Removed the dead
WalletExtensiongRPC service and thenode.walletExtensionApiconfig to simplify the API and delete unused code. The old config key is now ignored and logs a warning; runtime behavior is unchanged.Refactors
service WalletExtensionand messagesAccountPaginated,TransactionList,TransactionListExtention,TimeMessage,TimePaginatedMessagefromapi.proto.WalletExtensionApifromRpcApiService.node.walletExtensionApibindings/defaults;NodeConfig.fromConfigwarns when present, and the key is removed fromreference.conf,config.conf, andconfig-shield.conf.Util.printTransactionList, gRPC stubs inGrpcClient/WalletClient, and HTTP methods for/walletextension/*.Migration
WalletExtensionGrpc,AccountPaginated,TransactionList,TransactionListExtention,TimeMessage,TimePaginatedMessage.node.walletExtensionApifrom configs; it is ignored with a warning.Written for commit ca08100. Summary will update on new commits.
Summary by CodeRabbit
walletExtensionApisetting from supported configuration files.