Deprecate AbstractRpcService and RpcServiceRequestable#8475
Merged
Conversation
In the past, `AbstractRpcService` and `RpcServiceRequestable` were added so that the fetch and Infura middleware could take either an `RpcService` or `RpcServiceChain`. However, since then, these middleware have been changed so that they do not care about a _complete_ RpcService-like interface, just the `request` method. Hence, it is no longer necessary for the two interfaces to exist. We will remove both interfaces in a future major version. For now, we release `RpcService` from implementing `AbstractRpcService`, and we deprecate both interfaces so that we do not have to update them whenever we make changes to `RpcService` or `RpcServiceChain`.
2addeae to
289df24
Compare
4 tasks
cryptodev-2s
previously approved these changes
Apr 15, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bfcb0bc. Configure here.
cryptodev-2s
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Explanation
In the past,
AbstractRpcServiceandRpcServiceRequestablewere added so that we could express that the fetch and Infura middleware supported either anRpcServiceorRpcServiceChain. However, since then, these middleware have been changed so that they do not care about a complete RPC service-like interface, just therequestmethod. Hence, it is no longer necessary for the two interfaces to exist.In fact, the existence of these interfaces create impediments for development.
RpcServiceis not public itself, butAbstractRpcServiceandRpcServiceRequestableare. So each time we make incompatible changes toRpcServicewe have to remember to keepAbstractRpcServiceandRpcServiceRequestableupdated as well, and this results in more major releases fornetwork-controllerthan we would like.To address these issues, we update
RpcServiceso that it no longer implementsAbstractRpcService, and we deprecate both interfaces so that we do not have to update them whenever we make changes toRpcServiceorRpcServiceChain. We will remove both interfaces in a future major version.References
Checklist
Note
Medium Risk
Public TypeScript surface changes deprecate exported RPC service interfaces and stop
RpcServicefrom implementing them, which may affect downstream typing even though runtime behavior is unchanged.Overview
Marks the exported
AbstractRpcServiceandRpcServiceRequestabletypes as deprecated (with guidance to accept narrower “RPC-like” shapes), and records this deprecation in thenetwork-controllerchangelog.Updates
RpcServiceto no longer implementAbstractRpcServiceand replaces interface-derived listener typings/return types with explicitServicePolicy-based types from./shared, removing thecockatielIDisposabledependency.Reviewed by Cursor Bugbot for commit 609adf8. Bugbot is set up for automated code reviews on this repo. Configure here.