Skip to content
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

rpc: upgrade jsonrpsee v0.23 #4730

Merged
merged 32 commits into from
Jun 26, 2024
Merged

rpc: upgrade jsonrpsee v0.23 #4730

merged 32 commits into from
Jun 26, 2024

Conversation

niklasad1
Copy link
Member

@niklasad1 niklasad1 commented Jun 7, 2024

This is PR updates jsonrpsee v0.23 which mainly changes:

  • Add Extensions which we now is using to get the connection id (used by the rpc spec v2 impl)
  • Update hyper to v1.0, http v1.0, soketto and related crates (hyper::service::make_service_fn is removed)
  • The subscription API for the client is modified to know why a subscription was closed.

Full changelog here: https://github.com/paritytech/jsonrpsee/releases/tag/v0.23.0

@niklasad1 niklasad1 added T0-node This PR/Issue is related to the topic “node”. A0-needs_burnin Pull request needs to be tested on a live validator node before merge. DevOps is notified via matrix labels Jun 12, 2024
};

let make_service = make_service_fn(move |addr: &AddrStream| {
Copy link
Member Author

@niklasad1 niklasad1 Jun 12, 2024

Choose a reason for hiding this comment

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

hyper::service::make_service_fn is removed and we need to manage to socket ourselves.

Using to low-level API should easy to add support for ipv6 sockets but I'll fix it another PR.

@@ -124,7 +124,7 @@ pub struct LightClientRpcWorker {
}

fn handle_notification(
maybe_header: Option<Result<RelayHeader, Error>>,
maybe_header: Option<Result<RelayHeader, serde_json::Error>>,
Copy link
Member Author

Choose a reason for hiding this comment

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

//cc @skunert

This is slightly modified and only decoding can cause this error now.
Since this API was confusing before i.e, the subscription could be closed because it lagged (i.e, couldn't keep with server) or just closed.

We have added another API https://docs.rs/jsonrpsee-core/0.23.1/jsonrpsee_core/client/struct.Subscription.html#method.close_reason but not sure whether you care here....

@niklasad1 niklasad1 requested a review from lexnv June 12, 2024 13:19
@niklasad1 niklasad1 removed the A0-needs_burnin Pull request needs to be tested on a live validator node before merge. DevOps is notified via matrix label Jun 18, 2024
@niklasad1 niklasad1 marked this pull request as ready for review June 18, 2024 17:06
@niklasad1 niklasad1 requested a review from a team as a code owner June 18, 2024 17:06
@paritytech-review-bot paritytech-review-bot bot requested a review from a team June 18, 2024 17:07
niklasad1 and others added 2 commits June 21, 2024 14:47
…cast.rs

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
niklasad1 and others added 6 commits June 21, 2024 14:47
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
…cast.rs

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
@niklasad1 niklasad1 enabled auto-merge June 24, 2024 11:03
Copy link
Contributor

@lexnv lexnv left a comment

Choose a reason for hiding this comment

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

LGTM!

@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-clippy
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6547746

@niklasad1 niklasad1 added this pull request to the merge queue Jun 26, 2024
Merged via the queue into master with commit 7a2592e Jun 26, 2024
154 of 159 checks passed
@niklasad1 niklasad1 deleted the na-jsonrpsee-v0.23 branch June 26, 2024 10:56
TarekkMA pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this pull request Aug 2, 2024
This is PR updates jsonrpsee v0.23 which mainly changes:
- Add `Extensions` which we now is using to get the connection id (used
by the rpc spec v2 impl)
- Update hyper to v1.0, http v1.0, soketto and related crates
(hyper::service::make_service_fn is removed)
- The subscription API for the client is modified to know why a
subscription was closed.

Full changelog here:
https://github.com/paritytech/jsonrpsee/releases/tag/v0.23.0

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T0-node This PR/Issue is related to the topic “node”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants