-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: rpc::Client #4140
Merged
Merged
feat: rpc::Client #4140
Conversation
This file contains 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
14 tasks
aatifsyed
requested review from
LesnyRumcajs and
sudo-shashank
and removed request for
a team
April 4, 2024 19:32
aatifsyed
force-pushed
the
aatifsyed/rpc-client
branch
from
April 4, 2024 20:05
4df7bbc
to
081dcc8
Compare
LesnyRumcajs
reviewed
Apr 5, 2024
LesnyRumcajs
approved these changes
Apr 5, 2024
sudo-shashank
approved these changes
Apr 8, 2024
aatifsyed
force-pushed
the
aatifsyed/rpc-client
branch
from
April 8, 2024 10:13
badebee
to
ff2a81a
Compare
aatifsyed
force-pushed
the
aatifsyed/rpc-client
branch
from
April 8, 2024 10:14
ff2a81a
to
901ff3d
Compare
This reversed some of the good work done in #4148 because jsonrpsee still uses backlevel |
hanabi1224
approved these changes
Apr 8, 2024
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.
Summary of changes
rpc::Client
uses and wrapsjsonrpsee
's clients instead of rolling our own, acts as a client for all RPC callsApiInfo::call
usedglobal_http_client
for http requests, and usedjsonrpsee::ws_client
for websocket requests.This was a contributor to
ApiInfo::call
is bugged #4076.rpc::Client::from(_: ApiInfo)
, so that RPC calls can be migrated in the interim.In [tracking] RPC refactoring wishlist #4032, all instances of
ApiInfo
should be replaced byrpc::Client
.rpc::Client
operates onUrl
s, since that's whatjsonrpsee
's clients expect.multiaddr2url
has been changed to behave likemultiaddr::from_url
websocket_tests
is now opportunistic iflotus
andforest
schemes are websockets.RpcMethod::API_VERSION
so that requests know which URL they are destined for.RpcMethodExt::call
so that implementors ofRpcMethod
can actually make API callsmpool_ops
RpcTest::basic
calls have been shimmed withRpcTest::basic_raw
callsApiInfo::<method>
s have been replacedRpcMethodExt::call
forest-cli attach
methods are tracked by Define pattern for callingtrait RpcMethod
inforest-cli attach
#4141Other information and links
#4032
Change checklist