Skip to content

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

Open
0xbigapple wants to merge 1 commit into
tronprotocol:release_v4.8.3from
0xbigapple:feature/remove-wallet-extension-service
Open

0xbigapple wants to merge 1 commit into
tronprotocol:release_v4.8.3from
0xbigapple:feature/remove-wallet-extension-service

Conversation

@0xbigapple

@0xbigapple 0xbigapple commented Sep 17, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

close #6931.
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, a solidity node registers a service with zero implemented methods (advertised via gRPC reflection when node.rpc.reflectionService is on); disabled, callers get the same UNIMPLEMENTED. 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
  • Manual Test

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.

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.
@halibobo1205 halibobo1205 added this to the GreatVoyage-v4.8.3 milestone Sep 17, 2026
@317787106
317787106 changed the base branch from develop to release_v4.8.3 September 17, 2026 07:19
}

// node.walletExtensionApi (removed): the WalletExtension gRPC service no longer exists
if (section.hasPath("walletExtensionApi")) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[NIT] First node.* key removed without a deprecation period — please record the exception in release notes

node.walletExtensionApi was a published config key (present in both shipped samples: config.conf defaulted it to true, reference.conf to false). The project config convention calls for a full deprecation cycle before removing a published key; this PR removes it in one step, with only this warn-and-ignore fallback. The practical impact is nil — old configs still boot (unknown keys are ignored) and operators get a clear warning, and ArgsTest.testRemovedWalletExtensionApiKeyIsIgnored locks that behavior in — so this reads as a documentable exception rather than a contract violation.

Suggestion: list the removal explicitly in the release notes ("Removed: WalletExtension gRPC service (4 RPCs) + node.walletExtensionApi config key") so the skipped deprecation cycle is visible to operators and future reviewers.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. Agreed on the release note, will add it.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[SHOULD] Please link the release-note/migration entry and the downstream follow-ups requested in #6931 before merge. The current diff contains no release note, and "Follow up" lists projects without tracking links. Cover the generated-code API break, reflection changes, the legacy-config warning, and the TronGrid alternative; link follow-ups for the affected protocol, clients, documentation, and deployment templates.

Please also update #6921's principle 2 and item 4 to record the agreed direct-removal exception and target release; its body still describes a two-stage deprecation plan.

Comment thread common/src/main/java/org/tron/core/config/args/NodeConfig.java

@waynercheung waynercheung left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed ca08100d717a0ba5cf97fc615ef7124eb84c213e. The removal scope matches #6931, and I found no remaining code references to the removed types. Checkstyle and the 43 targeted tests in ArgsTest, ParameterTest, and UtilMockTest pass. I found no consensus/database changes or confirmed runtime correctness defect.

[SHOULD] Please narrow the "compile-time impact only / runtime behavior is unchanged" claim in the PR description and #6931. On a solidity node with WalletExtension enabled and node.disabledApi = ["gettransactionsfromthis"], the registered method returns UNAVAILABLE through RpcApiAccessInterceptor; after removal, gRPC returns UNIMPLEMENTED without running the configured access/rate-limit interceptors. Reflection output also changes, and replacing the protocol artifact can break compiled consumers that reference the removed types. Please document these intentional compatibility changes.

Requesting changes to complete the config/gRPC regression coverage and the previously requested migration documentation and follow-up links. These do not require retaining the removed service.

* NodeConfigTest because module jacoco reports only aggregate framework execution data.
*/
@Test
public void testRemovedWalletExtensionApiKeyIsIgnored() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[SHOULD] This only verifies that walletExtensionApi = true parses; deleting the warning branch would still pass. Please cover absent / true / false and assert the removal WARN, with no WalletExtension removal warning when the key is absent.

Also add the gRPC regression requested in #6931: call all four legacy method names via explicit MethodDescriptors and assert UNIMPLEMENTED. Verify service registration using RpcApiService with isSolidityNode() == true and the legacy key present: WalletExtension must be absent and WalletSolidity retained. The existing RpcApiServicesTest covers multiple ports but does not exercise this node-mode registration branch.

}

// node.walletExtensionApi (removed): the WalletExtension gRPC service no longer exists
if (section.hasPath("walletExtensionApi")) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[SHOULD] Please link the release-note/migration entry and the downstream follow-ups requested in #6931 before merge. The current diff contains no release note, and "Follow up" lists projects without tracking links. Cover the generated-code API break, reflection changes, the legacy-config warning, and the TronGrid alternative; link follow-ups for the affected protocol, clients, documentation, and deployment templates.

Please also update #6921's principle 2 and item 4 to record the agreed direct-removal exception and target release; its body still describes a two-stage deprecation plan.

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[Feature] Remove the dead WalletExtension gRPC service and config

5 participants