Skip to content

chore(deps): update rust crate jsonrpsee to 0.26.0#1004

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/jsonrpsee-0.x
Open

chore(deps): update rust crate jsonrpsee to 0.26.0#1004
renovate[bot] wants to merge 1 commit intomainfrom
renovate/jsonrpsee-0.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Apr 13, 2026

This PR contains the following updates:

Package Type Update Change
jsonrpsee (source) workspace.dependencies minor 0.24.00.26.0

Release Notes

paritytech/jsonrpsee (jsonrpsee)

v0.26.0

Compare Source

This is just a small release; the only breaking change is the addition of max_frame_size to WsTransportClientBuilder, which necessitates a minor version bump.

The other changes are as follows:

[Changed]
  • Fix new Rust 1.89 lifetime warnings and impl ToRpcParams on serde_json::Map (#​1594)
  • feat(keepalive): expose tcp keep-alive options (#​1583)
  • chore: expose TowerServiceNoHttp type (#​1588)
  • chore(deps): update socket2 requirement from 0.5.1 to 0.6.0 (#​1587)
  • Allow max websocket frame size to be set (#​1585)
  • chore(deps): update pprof requirement from 0.14 to 0.15 (#​1577)
  • Expose jsonrpsee_http_client::RpcService (#​1574)
[Fixed]
  • fix: Remove username and password from URL after building Authorization header (#​1581)

v0.25.1

Compare Source

A small follow-up patch release that adds a Clone impl for the middleware RpcLogger which was missing
and broke the Clone impl for the HttpClient.

v0.25.0

Compare Source

A new breaking release which has been in the making for a while and the biggest change is that the
RpcServiceT trait has been changed to support both the client and server side:

pub trait RpcServiceT {
	/// Response type for `RpcServiceT::call`.
	type MethodResponse;
	/// Response type for `RpcServiceT::notification`.
	type NotificationResponse;
	/// Response type for `RpcServiceT::batch`.
	type BatchResponse;

	/// Processes a single JSON-RPC call, which may be a subscription or regular call.
	fn call<'a>(&self, request: Request<'a>) -> impl Future<Output = Self::MethodResponse> + Send + 'a;

	/// Processes multiple JSON-RPC calls at once, similar to `RpcServiceT::call`.
	///
	/// This method wraps `RpcServiceT::call` and `RpcServiceT::notification`,
	/// but the root RPC service does not inherently recognize custom implementations
	/// of these methods.
	///
	/// As a result, if you have custom logic for individual calls or notifications,
	/// you must duplicate that implementation in this method or no middleware will be applied
	/// for calls inside the batch.
	fn batch<'a>(&self, requests: Batch<'a>) -> impl Future<Output = Self::BatchResponse> + Send + 'a;

	/// Similar to `RpcServiceT::call` but processes a JSON-RPC notification.
	fn notification<'a>(&self, n: Notification<'a>) -> impl Future<Output = Self::NotificationResponse> + Send + 'a;
}

The reason for this change is to make it work for the client-side as well as make it easier to
implement performantly by relying on impl Future instead of requiring an associated type for the Future (which in many cases requires boxing).

The downside of this change is that one has to duplicate the logic in the batch and call method to achieve the same
functionality as before. Thus, call or notification is not being invoked in the batch method and one has to implement
them separately.
For example now it's possible to write middleware that counts the number of method calls as follows (both client and server):

#[derive(Clone)]
pub struct Counter<S> {
	service: S,
	count: Arc<AtomicUsize>,
	role: &'static str,
}

impl<S> RpcServiceT for Counter<S>
where
	S: RpcServiceT + Send + Sync + Clone + 'static,
{
	type MethodResponse = S::MethodResponse;
	type NotificationResponse = S::NotificationResponse;
	type BatchResponse = S::BatchResponse;

	fn call<'a>(&self, req: Request<'a>) -> impl Future<Output = Self::MethodResponse> + Send + 'a {
		let count = self.count.clone();
		let service = self.service.clone();
		let role = self.role;

		async move {
			let rp = service.call(req).await;
			count.fetch_add(1, Ordering::SeqCst);
			println!("{role} processed calls={} on the connection", count.load(Ordering::SeqCst));
			rp
		}
	}

	fn batch<'a>(&self, batch: Batch<'a>) -> impl Future<Output = Self::BatchResponse> + Send + 'a {
		let len = batch.len();
		self.count.fetch_add(len, Ordering::SeqCst);
		println!("{} processed calls={} on the connection", self.role, self.count.load(Ordering::SeqCst));
		self.service.batch(batch)
	}

	fn notification<'a>(&self, n: Notification<'a>) -> impl Future<Output = Self::NotificationResponse> + Send + 'a {
		self.service.notification(n)
	}
}

In addition because this middleware is quite powerful it's possible to
modify requests and specifically the request ID which should be avoided
because it may break the response verification especially for the client-side.
See #​1565 for further information.

There are also a couple of other changes see the detailed changelog below.

[Added]
  • middleware: RpcServiceT distinct return types for notif, batch, call (#​1564)
  • middleware: add support for client-side (#​1521)
  • feat: add namespace_separator option for RPC methods (#​1544)
  • feat: impl Into for Infallible (#​1542)
  • client: add request timeout getter (#​1533)
  • server: add example how to close a connection from a rpc handler (method call or subscription) (#​1488)
  • server: add missing ServerConfigBuilder::build (#​1484)
[Fixed]
  • chore(macros): fix typo in proc-macro example (#​1482)
  • chore(macros): fix typo in internal type name (#​1507)
  • http middleware: preserve the URI query in ProxyGetRequest::call (#​1512)
  • http middlware: send original error in ProxyGetRequest (#​1516)
  • docs: update comment for TOO_BIG_BATCH_RESPONSE_CODE error (#​1531)
  • fix http request body log (#​1540)
[Changed]
  • unify usage of JSON via Box<RawValue> (#​1545)
  • server: ServerConfigBuilder/ServerConfig replaces ServerBuilder duplicate setter methods (#​1487)
  • server: make ProxyGetRequestLayer http middleware support multiple path-method pairs (#​1492)
  • server: propagate extensions in http response (#​1514)
  • server: add assert set_message_buffer_capacity (#​1530)
  • client: add #[derive(Clone)] for HttpClientBuilder (#​1498)
  • client: add Error::Closed for ws close (#​1497)
  • client: use native async fn in traits instead async_trait crate (#​1551)
  • refactor: move to rust edition 2024 (MSRV 1.85) (#​1528)
  • chore(deps): update tower requirement from 0.4.13 to 0.5.1 (#​1455)
  • chore(deps): update tower-http requirement from 0.5.2 to 0.6.1 (#​1463)
  • chore(deps): update pprof requirement from 0.13 to 0.14 (#​1493)
  • chore(deps): update rustls-platform-verifier requirement from 0.3 to 0.4 (#​1489)
  • chore(deps): update thiserror requirement from 1 to 2 (#​1491)
  • chore(deps): bump soketto to 0.8.1 (#​1501)
  • chore(deps): update rustls-platform-verifier requirement from 0.4 to 0.5 (#​1506)
  • chore(deps): update fast-socks5 requirement from 0.9.1 to 0.10.0 (#​1505)
  • chore(deps): tokio ^1.42 (#​1511)
  • chore: use cargo workspace dependencies (#​1502)
  • chore(deps): update rand requirement from 0.8 to 0.9 (#​1523)

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • "before 6am on Monday"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 13, 2026

Coverage Report for CI Build 24856375327

Coverage remained the same at 71.383%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 14778
Covered Lines: 10549
Line Coverage: 71.38%
Coverage Strength: 114.44 hits per line

💛 - Coveralls

@renovate renovate Bot force-pushed the renovate/jsonrpsee-0.x branch 6 times, most recently from bd09b75 to acd1c5b Compare April 20, 2026 05:49
@renovate renovate Bot force-pushed the renovate/jsonrpsee-0.x branch 7 times, most recently from ba3e216 to 489f987 Compare April 20, 2026 19:58
@renovate renovate Bot force-pushed the renovate/jsonrpsee-0.x branch from 489f987 to f044153 Compare April 23, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant