Skip to content

Bump subxt-signer from 0.38.1 to 0.41.0 #1401

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

Merged
merged 1 commit into from
Apr 16, 2025

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Apr 16, 2025

Bumps subxt-signer from 0.38.1 to 0.41.0.

Release notes

Sourced from subxt-signer's releases.

v0.41.0

[0.41.0] - 2025-03-10

This release makes two main changes:

Add subxt-rpcs crate.

Previously, if you wanted to make raw RPC calls but weren't otherwise interested in using the higher level Subxt interface, you still needed to include the entire Subxt crate.

Now, one can depend on subxt-rpcs directly. This crate implements the new RPC-V2 chainHead/transaction endpoints as well as the currently unstable archive endpoints. it also implements various legacy endpoints that Subxt uses as a fallback to the modern ones. It also provides several feature gated clients for interacting with them:

  • jsonrpsee: A jsonrpsee based RPC client for connecting to individual RPC nodes.
  • unstable-light-client: A Smoldot based light client which connects to multiple nodes in chains via p2p and verifies everything handed back, removing the need to trust any individual nodes.
  • reconnecting-rpc-client: Another jsonrpsee based client which handles reconnecting automatically in the event of network issues.
  • mock-rpc-client: A mock RPC client that can be used in tests.

Custom clients can be implemented if preferred.

Example usage via jsonrpsee feature:

use subxt_rpcs::{RpcClient, ChainHeadRpcMethods};
// Connect to a local node:
let client = RpcClient::("ws://127.0.0.1:9944").await?;
// Use chainHead/archive V2 methods:
let methods = ChainHeadRpcMethods::new(client);
// Call some RPC methods (in this case a subscription):
let mut follow_subscription = methods.chainhead_v1_follow(false).await.unwrap();
while let Some(follow_event) = follow_subscription.next().await {
// do something with events..
}

Support creating V5 transactions.

Subxt has supported decoding V5 transactions from blocks since 0.38.0, but now it also supports constructing V5 transactions where allowed. Some naming changes have also taken place to align with the Substrate terminology now around transactions (see #1931 for more!).

The main changes here are:

  • subxt_core now contains versioned methods for creating each of the possible types of transaction (V4 unsigned, V4 signed, V5 "bare" or V5 "general"), enabling the APIs to be tailored for each case.
  • subxt exposes higher level wrappers these (ie api.tx().create_v4_unsigned(..), api.tx().create_v5_bare(..)), but also continues to expose the same standard APIs for creating transactions which will, under the hood, decide what to create based on the chain we're connected to.
  • APIs like sign_and_submit now take a T::AccountId rather than a T::Address since it was found to not be useful to provide the latter, and V5 transactions only expect an T::AccountId.
  • Signed Extensions are now referred to as Transaction Extensions, and we've tweaked the interface around how these work slightly to accomodate the fact that in V5 transactions, the signature is passed into a transaction extension where applicable (VerifySignature).
  • As a side effect, it's simpler to set mortality on transactions; no more block hash needs to be provided; only the number of blocks you would like a transaction to live for.

A full list of the relevant changes is as follows:

Added

... (truncated)

Changelog

Sourced from subxt-signer's changelog.

[0.41.0] - 2025-03-10

This release makes two main changes:

Add subxt-rpcs crate.

Previously, if you wanted to make raw RPC calls but weren't otherwise interested in using the higher level Subxt interface, you still needed to include the entire Subxt crate.

Now, one can depend on subxt-rpcs directly. This crate implements the new RPC-V2 chainHead/transaction endpoints as well as the currently unstable archive endpoints. it also implements various legacy endpoints that Subxt uses as a fallback to the modern ones. It also provides several feature gated clients for interacting with them:

  • jsonrpsee: A jsonrpsee based RPC client for connecting to individual RPC nodes.
  • unstable-light-client: A Smoldot based light client which connects to multiple nodes in chains via p2p and verifies everything handed back, removing the need to trust any individual nodes.
  • reconnecting-rpc-client: Another jsonrpsee based client which handles reconnecting automatically in the event of network issues.
  • mock-rpc-client: A mock RPC client that can be used in tests.

Custom clients can be implemented if preferred.

Example usage via jsonrpsee feature:

use subxt_rpcs::{RpcClient, ChainHeadRpcMethods};
// Connect to a local node:
let client = RpcClient::from_url("ws://127.0.0.1:9944").await?;
// Use chainHead/archive V2 methods:
let methods = ChainHeadRpcMethods::new(client);
// Call some RPC methods (in this case a subscription):
let mut follow_subscription = methods.chainhead_v1_follow(false).await.unwrap();
while let Some(follow_event) = follow_subscription.next().await {
// do something with events..
}

Support creating V5 transactions.

Subxt has supported decoding V5 transactions from blocks since 0.38.0, but now it also supports constructing V5 transactions where allowed. Some naming changes have also taken place to align with the Substrate terminology now around transactions (see #1931 for more!).

The main changes here are:

  • subxt_core now contains versioned methods for creating each of the possible types of transaction (V4 unsigned, V4 signed, V5 "bare" or V5 "general"), enabling the APIs to be tailored for each case.
  • subxt exposes higher level wrappers these (ie api.tx().create_v4_unsigned(..), api.tx().create_v5_bare(..)), but also continues to expose the same standard APIs for creating transactions which will, under the hood, decide what to create based on the chain we're connected to.
  • APIs like sign_and_submit now take a T::AccountId rather than a T::Address since it was found to not be useful to provide the latter, and V5 transactions only expect an T::AccountId.
  • Signed Extensions are now referred to as Transaction Extensions, and we've tweaked the interface around how these work slightly to accomodate the fact that in V5 transactions, the signature is passed into a transaction extension where applicable (VerifySignature).
  • As a side effect, it's simpler to set mortality on transactions; no more block hash needs to be provided; only the number of blocks you would like a transaction to live for.

A full list of the relevant changes is as follows:

Added

... (truncated)

Commits
  • 4c32ee1 Prepare for 0.41.0 release (#1952)
  • 16c5084 Map finality timeout to Dropped instead of Invalid (#1953)
  • b6b9ac6 Support constructing and submitting V5 transactions (#1931)
  • dcb9c27 build(deps): bump ring from 0.17.8 to 0.17.13 (#1951)
  • 93cf4b4 Update Artifacts (auto-generated) (#1950)
  • 08a3801 build(deps): bump ring in /examples/parachain-example (#1949)
  • 49c66a0 Wrap the subxt::events::Events type to avoid exposing subxt_core errors and t...
  • c29edf6 Bump frame-metadata to 20.0.0 (#1944)
  • 23c0651 Add archive RPCs to subxt-rpcs (#1940)
  • e59eef2 Allow transaction timeout in ChainheadBackend to be configured (#1943)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [subxt-signer](https://github.com/paritytech/subxt) from 0.38.1 to 0.41.0.
- [Release notes](https://github.com/paritytech/subxt/releases)
- [Changelog](https://github.com/paritytech/subxt/blob/master/CHANGELOG.md)
- [Commits](paritytech/subxt@v0.38.1...v0.41.0)

---
updated-dependencies:
- dependency-name: subxt-signer
  dependency-version: 0.41.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Apr 16, 2025
@ameba23 ameba23 merged commit c92d2ae into master Apr 16, 2025
9 checks passed
@ameba23 ameba23 deleted the dependabot/cargo/subxt-signer-0.41.0 branch April 16, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant