-
Notifications
You must be signed in to change notification settings - Fork 248
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
Prep for v0.33.0 release #1311
Merged
Merged
Prep for v0.33.0 release #1311
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
niklasad1
reviewed
Dec 6, 2023
tadeohepperle
approved these changes
Dec 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice write up, a lot of improvements that got added :)
niklasad1
reviewed
Dec 6, 2023
niklasad1
reviewed
Dec 6, 2023
niklasad1
reviewed
Dec 6, 2023
niklasad1
reviewed
Dec 6, 2023
niklasad1
reviewed
Dec 6, 2023
niklasad1
reviewed
Dec 6, 2023
niklasad1
reviewed
Dec 6, 2023
niklasad1
approved these changes
Dec 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
lexnv
approved these changes
Dec 7, 2023
Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: Tadeo Hepperle <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[0.33.0] - 2023-12-06
This release makes a bunch of small QoL improvements and changes. Let's look at the main ones.
Add support for configuring multiple chains (#1238)
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.See this example for more on how to do this.
We'll likely refine this over time and add a slightly higher level interface to make common operations much easier to do.
Support decoding signed extensions (#1209 and #1235)
This PR makes it possible to decode the signed extensions in extrinsics. This looks something like:
See the API docs for more.
ChargeAssetTxPayment: Add support for generic AssetId
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 aMultiLocation
instead). To address this, we added anAssetId
type to oursubxt::Config
, which can now be configured.One example of doing that can be found here.
This example uses a generated
MultiLocation
type to be used as theAssetId
. Currently it requires a rather hideous set of manual clones like so:This is something we plan to address in the next version of Subxt.
Change SignedExtension matching logic (#1283)
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 thesigned_extensions::AnyOf
type.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.So now, for a given signed extension, we go from:
To:
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.
Remove
wait_for_in_block
helper method (#1237)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 newchainHead
APIs, we will no longer be able to reliably obtain any details about the block that the transaction made it into.In other words, the following sort of thing would often fail:
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.
That said, you can still achieve the same via the lower level APIs like so:
Subxt-codegen: Tidy crate interface (#1225)
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 #1211.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:
#[subxt]
macro.subxt codegen
CLI command.subxt-codegen
crate.Each method aims to expose a similar and consistent set of options.
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.
That sums up the most significant changes. A summary of all of the relevant changes is as follows:
Added
Arc<T>
andBox<T>
(#1277)u32
orMultiLocation
) (#1227)Changed
0.14.0
and smoldot-light to0.12.0
(#1307)substrate-compat
impls to accept any valid hasher/header impl (#1265)wait_for_in_block
helper method (#1237)subxt
feature insubxt-signer
crate to default features (#1193)Fixed
is_codegen_valid_for
(#1306)