Skip to content

Commit 4c32ee1

Browse files
jsdwniklasad1
andauthored
Prepare for 0.41.0 release (#1952)
* Prepare for 0.41.0 release * Example fmt tweak and remove small entry from changes Co-authored-by: Niklas Adolfsson <[email protected]> --------- Co-authored-by: Niklas Adolfsson <[email protected]>
1 parent 16c5084 commit 4c32ee1

File tree

3 files changed

+100
-27
lines changed

3 files changed

+100
-27
lines changed

CHANGELOG.md

+73
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,79 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.41.0] - 2025-03-10
8+
9+
This release makes two main changes:
10+
11+
### Add `subxt-rpcs` crate.
12+
13+
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.
14+
15+
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:
16+
17+
- **jsonrpsee**: A `jsonrpsee` based RPC client for connecting to individual RPC nodes.
18+
- **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.
19+
- **reconnecting-rpc-client**: Another `jsonrpsee` based client which handles reconnecting automatically in the event of network issues.
20+
- **mock-rpc-client**: A mock RPC client that can be used in tests.
21+
22+
Custom clients can be implemented if preferred.
23+
24+
Example usage via `jsonrpsee` feature:
25+
26+
```rust
27+
use subxt_rpcs::{RpcClient, ChainHeadRpcMethods};
28+
29+
// Connect to a local node:
30+
let client = RpcClient::("ws://127.0.0.1:9944").await?;
31+
// Use chainHead/archive V2 methods:
32+
let methods = ChainHeadRpcMethods::new(client);
33+
34+
// Call some RPC methods (in this case a subscription):
35+
let mut follow_subscription = methods.chainhead_v1_follow(false).await.unwrap();
36+
while let Some(follow_event) = follow_subscription.next().await {
37+
// do something with events..
38+
}
39+
```
40+
41+
### Support creating V5 transactions.
42+
43+
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](https://github.com/paritytech/subxt/pull/1931) for more!).
44+
45+
The main changes here are:
46+
47+
- `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.
48+
- `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.
49+
- 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`.
50+
- 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`).
51+
- 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.
52+
53+
A full list of the relevant changes is as follows:
54+
55+
### Added
56+
57+
- Support constructing and submitting V5 transactions ([#1931](https://github.com/paritytech/subxt/pull/1931))
58+
- Add archive RPCs to subxt-rpcs ([#1940](https://github.com/paritytech/subxt/pull/1940))
59+
- Document generating interface from Runtime WASM and change feature to `runtime-wasm-path` ([#1936](https://github.com/paritytech/subxt/pull/1936))
60+
- Split RPCs into a separate crate ([#1910](https://github.com/paritytech/subxt/pull/1910))
61+
62+
### Changed
63+
64+
- Wrap the subxt::events::Events type to avoid exposing subxt_core errors and types unnecessarily ([#1948](https://github.com/paritytech/subxt/pull/1948))
65+
- Allow transaction timeout in ChainheadBackend to be configured ([#1943](https://github.com/paritytech/subxt/pull/1943))
66+
- refactor: make ExtrinsicEvents::new public for external access ([#1933](https://github.com/paritytech/subxt/pull/1933))
67+
68+
## [0.40.0] - 2025-03-06
69+
70+
This release reverts the usage of the `polkadot-sdk` umbrella crate, which was causing issues such as an increased number of dependencies in Cargo.lock. For more details, see [#1925](https://github.com/paritytech/subxt/issues/1925).
71+
72+
Additionally, this update bumps the Polkadot SDK-related dependencies to their latest versions, ensuring compatibility and stability.
73+
74+
### Fixed
75+
76+
- Remove usage of polkadot-sdk umbrella crate ([#1926](https://github.com/paritytech/subxt/pull/1926))
77+
78+
**Full Changelog**: https://github.com/paritytech/subxt/compare/v0.39.0...v0.40.0
79+
780
## [0.39.0] - 2025-02-04
881

982
This release is mostly bug fixes and changes. The only change that should be a breaking change is removing the `substrate-compat` feature flag (see [#1850](https://github.com/paritytech/subxt/pull/1850)), which we'll go into more detail about.

Cargo.lock

+17-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+10-10
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ resolver = "2"
3535
[workspace.package]
3636
authors = ["Parity Technologies <[email protected]>"]
3737
edition = "2021"
38-
version = "0.39.0"
38+
version = "0.41.0"
3939
rust-version = "1.81.0"
4040
license = "Apache-2.0 OR GPL-3.0"
4141
repository = "https://github.com/paritytech/subxt"
@@ -151,15 +151,15 @@ sp-state-machine = { version = "0.44.0", default-features = false }
151151
sp-runtime = { version = "40.0.1", default-features = false }
152152

153153
# Subxt workspace crates:
154-
subxt = { version = "0.39.0", path = "subxt", default-features = false }
155-
subxt-core = { version = "0.39.0", path = "core", default-features = false }
156-
subxt-macro = { version = "0.39.0", path = "macro" }
157-
subxt-metadata = { version = "0.39.0", path = "metadata", default-features = false }
158-
subxt-codegen = { version = "0.39.0", path = "codegen" }
159-
subxt-signer = { version = "0.39.0", path = "signer", default-features = false }
160-
subxt-rpcs = { version = "0.39.0", path = "rpcs", default-features = false }
161-
subxt-lightclient = { version = "0.39.0", path = "lightclient", default-features = false }
162-
subxt-utils-fetchmetadata = { version = "0.39.0", path = "utils/fetch-metadata", default-features = false }
154+
subxt = { version = "0.41.0", path = "subxt", default-features = false }
155+
subxt-core = { version = "0.41.0", path = "core", default-features = false }
156+
subxt-macro = { version = "0.41.0", path = "macro" }
157+
subxt-metadata = { version = "0.41.0", path = "metadata", default-features = false }
158+
subxt-codegen = { version = "0.41.0", path = "codegen" }
159+
subxt-signer = { version = "0.41.0", path = "signer", default-features = false }
160+
subxt-rpcs = { version = "0.41.0", path = "rpcs", default-features = false }
161+
subxt-lightclient = { version = "0.41.0", path = "lightclient", default-features = false }
162+
subxt-utils-fetchmetadata = { version = "0.41.0", path = "utils/fetch-metadata", default-features = false }
163163
test-runtime = { path = "testing/test-runtime" }
164164
substrate-runner = { path = "testing/substrate-runner" }
165165

0 commit comments

Comments
 (0)