Skip to content

fix(deps): update rust#16

Open
bootc-bot[bot] wants to merge 1 commit intomainfrom
bootc-renovate/rust
Open

fix(deps): update rust#16
bootc-bot[bot] wants to merge 1 commit intomainfrom
bootc-renovate/rust

Conversation

@bootc-bot
Copy link
Copy Markdown
Contributor

@bootc-bot bootc-bot bot commented Apr 12, 2026

This PR contains the following updates:

Package Type Update Change
jsonrpsee (source) dependencies minor 0.240.26
thiserror dependencies major 1.02.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)
dtolnay/thiserror (thiserror)

v2.0.18

Compare Source

v2.0.17

Compare Source

  • Use differently named __private module per patch release (#​434)

v2.0.16

Compare Source

  • Add to "no-std" crates.io category (#​429)

v2.0.15

Compare Source

  • Prevent Error::provide API becoming unavailable from a future new compiler lint (#​427)

v2.0.14

Compare Source

  • Allow build-script cleanup failure with NFSv3 output directory to be non-fatal (#​426)

v2.0.13

Compare Source

  • Documentation improvements

v2.0.12

Compare Source

  • Prevent elidable_lifetime_names pedantic clippy lint in generated impl (#​413)

v2.0.11

Compare Source

v2.0.10

Compare Source

  • Support errors containing a generic type parameter's associated type in a field (#​408)

v2.0.9

Compare Source

  • Work around missing_inline_in_public_items clippy restriction being triggered in macro-generated code (#​404)

v2.0.8

Compare Source

  • Improve support for macro-generated derive(Error) call sites (#​399)

v2.0.7

Compare Source

  • Work around conflict with #[deny(clippy::allow_attributes)] (#​397, thanks @​zertosh)

v2.0.6

Compare Source

  • Suppress deprecation warning on generated From impls (#​396)

v2.0.5

Compare Source

  • Prevent deprecation warning on generated impl for deprecated type (#​394)

v2.0.4

Compare Source

v2.0.3

Compare Source

  • Support the same Path field being repeated in both Debug and Display representation in error message (#​383)
  • Improve error message when a format trait used in error message is not implemented by some field (#​384)

v2.0.2

Compare Source

  • Fix hang on invalid input inside #[error(...)] attribute (#​382)

v2.0.1

Compare Source

  • Support errors that contain a dynamically sized final field (#​375)
  • Improve inference of trait bounds for fields that are interpolated multiple times in an error message (#​377)

v2.0.0

Compare Source

Breaking changes

  • Referencing keyword-named fields by a raw identifier like {r#type} inside a format string is no longer accepted; simply use the unraw name like {type} (#​347)

    This aligns thiserror with the standard library's formatting macros, which gained support for implicit argument capture later than the release of this feature in thiserror 1.x.

    #[derive(Error, Debug)]
    #[error("... {type} ...")]  // Before: {r#type}
    pub struct Error {
        pub r#type: Type,
    }
  • Trait bounds are no longer inferred on fields whose value is shadowed by an explicit named argument in a format message (#​345)

    // Before: impl<T: Octal> Display for Error<T>
    // After: impl<T> Display for Error<T>
    #[derive(Error, Debug)]
    #[error("{thing:o}", thing = "...")]
    pub struct Error<T> {
        thing: T,
    }
  • Tuple structs and tuple variants can no longer use numerical {0} {1} access at the same time as supplying extra positional arguments for a format message, as this makes it ambiguous whether the number refers to a tuple field vs a different positional arg (#​354)

    #[derive(Error, Debug)]
    #[error("ambiguous: {0} {}", $N)]
    //                  ^^^ Not allowed, use #[error("... {0} {n}", n = $N)]
    pub struct TupleError(i32);
  • Code containing invocations of thiserror's derive(Error) must now have a direct dependency on the thiserror crate regardless of the error data structure's contents (#​368, #​369, #​370, #​372)

Features

  • Support disabling thiserror's standard library dependency by disabling the default "std" Cargo feature: thiserror = { version = "2", default-features = false } (#​373)

  • Support using r#source as field name to opt out of a field named "source" being treated as an error's Error::source() (#​350)

    #[derive(Error, Debug)]
    #[error("{source} ==> {destination}")]
    pub struct Error {
        r#source: char,
        destination: char,
    }
    
    let error = Error { source: 'S', destination: 'D' };
  • Infinite recursion in a generated Display impl now produces an unconditional_recursion warning (#​359)

    #[derive(Error, Debug)]
    #[error("??? {self}")]
    pub struct Error;
  • A new attribute #[error(fmt = path::to::myfmt)] can be used to write formatting logic for an enum variant out-of-line (#​367)

    #[derive(Error, Debug)]
    pub enum Error {
        #[error(fmt = demo_fmt)]
        Demo { code: u16, message: Option<String> },
    }
    
    fn demo_fmt(code: &u16, message: &Option<String>, formatter: &mut fmt::Formatter) -> fmt::Result {
        write!(formatter, "{code}")?;
        if let Some(msg) = message {
            write!(formatter, " - {msg}")?;
        }
        Ok(())
    }
  • Enums with an enum-level format message are now able to have individual variants that are transparent to supersede the enum-level message (#​366)

    #[derive(Error, Debug)]
    #[error("my error {0}")]
    pub enum Error {
        Json(#[from] serde_json::Error),
        Yaml(#[from] serde_yaml::Error),
        #[error(transparent)]
        Other(#[from] anyhow::Error),
    }

Configuration

📅 Schedule: (in timezone UTC)

  • Branch creation
    • "on sunday"
  • Automerge
    • At any time (no schedule defined)

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

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


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

This PR has been generated by Renovate Bot.

Signed-off-by: bootc-bot[bot] <225049296+bootc-bot[bot]@users.noreply.github.com>
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.

0 participants