You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Prep for v0.33.0 release
* only ignore failing test on unstable-backend-client
* Fix typos and wee grammar things
Co-authored-by: Niklas Adolfsson <[email protected]>
Co-authored-by: Tadeo Hepperle <[email protected]>
* omit uninteresting PRs and issue link for ignored test
---------
Co-authored-by: Niklas Adolfsson <[email protected]>
Co-authored-by: Tadeo Hepperle <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+206-1Lines changed: 206 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,212 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
7
-
## [0.32.1] - 2023-10-05
7
+
## [0.33.0] - 2023-12-06
8
+
9
+
This release makes a bunch of small QoL improvements and changes. Let's look at the main ones.
10
+
11
+
### Add support for configuring multiple chains ([#1238](https://github.com/paritytech/subxt/pull/1238))
12
+
13
+
The light client support previously provided a high level interface for connecting to single chains (ie relay chains). This PR exposes a "low level" interface which allows smoldot (the light client implementation we use) to be configured somewhat more arbitrarily, and then converted into a valid subxt `OnlineClient` to be used.
14
+
15
+
See [this example](https://github.com/paritytech/subxt/blob/418c3afc923cacd17501f374fdee0d8f588e14fd/subxt/examples/light_client_parachains.rs) for more on how to do this.
16
+
17
+
We'll likely refine this over time and add a slightly higher level interface to make common operations much easier to do.
18
+
19
+
### Support decoding signed extensions ([#1209](https://github.com/paritytech/subxt/pull/1209) and [#1235](https://github.com/paritytech/subxt/pull/1235))
20
+
21
+
This PR makes it possible to decode the signed extensions in extrinsics. This looks something like:
// Or we can dynamically decode it into a `scale_value::Value`:
63
+
ifletOk(value) =signed_ext.value() {
64
+
println!("Decoded extension: {value}");
65
+
}
66
+
}
67
+
}
68
+
}
69
+
```
70
+
71
+
See the API docs for more.
72
+
73
+
### ChargeAssetTxPayment: Add support for generic AssetId
74
+
75
+
Still on the topic of signed extensions, the `ChargeAssetTxPayment` extension was previously not able to be used with a generic AssetId, which prohibited it from being used on the Asset Hub (which uses a `MultiLocation` instead). To address this, we added an `AssetId` type to our `subxt::Config`, which can now be configured.
76
+
77
+
One example of doing that [can be found here](https://github.com/paritytech/subxt/blob/master/subxt/examples/setup_config_custom.rs).
78
+
79
+
This example uses a generated `MultiLocation` type to be used as the `AssetId`. Currently it requires a rather hideous set of manual clones like so:
Before this release, each signed extension had a unique name (`SignedExtension::NAME`). We'd use this name to figure out which signed extensions to apply for a given chain inside the `signed_extensions::AnyOf` type.
102
+
103
+
However, we recently ran into a new signed extension in Substrate called `SkipCheckIfFeeless`. This extension would wrap another signed extension, but maintained its own name. It has since been "hidden" from the public Substrate interface again, but a result of encountering this is that we have generalised the way that we "match" on signed extensions, so that we can be smarter about it going forwards.
On the whole, we continue matching by name, as in the example above, but this allows an author to inspect the type of the signed extension (and subtypes of it) too if they want the signed extension to match (and thus be used) only in certain cases.
One can no longer use `tx.wait_for_in_block` to wait for a transaction to enter a block. The reason for this removal is that, especially when we migrate to the new `chainHead` APIs, we will no longer be able to reliably obtain any details about the block that the transaction made it into.
130
+
131
+
In other words, the following sort of thing would often fail:
132
+
133
+
```rust
134
+
tx.wait_for_in_block()
135
+
.await?
136
+
.wait_for_success()
137
+
.await?;
138
+
```
139
+
140
+
The reason for this is that the block announced in the transaction status may not have been "pinned" yet in the new APIs. In the old APIs, errors would occasionally be encountered because the block announced may have been pruned by the time we ask for details for it. Overall; having an "unreliable" higher level API felt like a potential foot gun.
141
+
142
+
That said, you can still achieve the same via the lower level APIs like so:
The `subxt-codegen` crate has always been a bit of a mess because it wasn't really supposed to be used outside of the subxt crates, which had led to issues like https://github.com/paritytech/subxt/issues/1211.
164
+
165
+
This PR tidies up the interface to that crate so that it's much easier now to programmatically generate the Subxt interface. Now, we have three properly supported ways to do this, depending on your needs:
166
+
167
+
1. Using the `#[subxt]` macro.
168
+
2. Using the `subxt codegen` CLI command.
169
+
3. Programmatically via the `subxt-codegen` crate.
170
+
171
+
Each method aims to expose a similar and consistent set of options.
172
+
173
+
If you were previously looking to use parts of the type generation logic to, for instance, generate runtime types but not the rest of the Subxt interface, then the https://github.com/paritytech/scale-typegen crate will aim to fill this role eventually.
174
+
175
+
That sums up the most significant changes. A summary of all of the relevant changes is as follows:
176
+
177
+
### Added
178
+
179
+
- CLI: Add command to fetch chainSpec and optimize its size ([#1278](https://github.com/paritytech/subxt/pull/1278))
180
+
- Add legacy RPC usage example ([#1279](https://github.com/paritytech/subxt/pull/1279))
181
+
- impl RpcClientT for `Arc<T>` and `Box<T>` ([#1277](https://github.com/paritytech/subxt/pull/1277))
- Lightclient: Fix wasm socket closure called after being dropped ([#1289](https://github.com/paritytech/subxt/pull/1289))
210
+
- Fix parachain example ([#1228](https://github.com/paritytech/subxt/pull/1228))
211
+
212
+
## [0.33.0] - 2023-10-05
8
213
9
214
This is a patch release, mainly to deploy the fix [#1191](https://github.com/paritytech/subxt/pull/1191), which resolves an issue around codegen when runtime API definitions have an argument name "_".
0 commit comments