Prepare for 0.43.0 release#2041
Merged
Merged
Conversation
lexnv
approved these changes
Jul 17, 2025
pkhry
approved these changes
Jul 18, 2025
This file contains hidden or 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
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.43.0] - 2025-07-17
This is a reasonably small release which is mainly bug fixing, but has a couple of changes I'd like to elaborate on:
Remove
codec::Encodeandcodec::Decodederives from generated APIs by default (#2008)When generating an API using the
#[subxt::subxt(...)]macro (or programatically viasubxt-codegen), we had always previously addedparity_scale_codec::Encodeandparity_scale_codec::Decodederives to all of the generated types. Most places in Subxt have not made use of these for a long time (relying instead onscale_encode::EncodeAsTypeandscale_decode::DecodeAsType, since they allow encoding and encoding which takes the type information into account and can more gracefully handle incompatibilities).We eventually hit an issue to which the most appropriate fix was just to remove these derives.
If you still need the
parity_scale_codec::Encodeorparity_scale_codec::Decodederives on certain types, you have two options:derive_for_typeattr to add them back where needed, eg:derive_for_all_typesattr to add them back everywhere, eg:Prefer (1) where possible to reduce the amount of generated code, and reduce the likelihood of running into issues around those derives in certain edge cases.
This PR changes some things around storage keys to remove one last requirement for
EncodeandDecodederives, and also as a side effect changesapi.storage().call_raw()slightly to no longer also try to decode the resulting type viaDecode, leaving this to the user (and also meaning it's much easier now for the user to obtain the raw bytes for some storage entry).In other words, instead of doing something like:
You would now do:
Address some issues around tx mortality (#2025)
Prior to this change, the intended behavior was that any transaction submitted via an
OnlineClientwould have a mortality of 32 blocks by default, and any transaction submitted via anOfflineClientwould be immortal by default. A couple of issues were present or cropped up however:PolkadotExtrinsicParamsBuilder::new().mortal(32).build(), theOfflineClienttransaction would still be immortal, because it didn't have enough information to properly configure the mortality as asked for (by virtue of being offline and unable to fetch it).OnlineClientby default, unless mortality was explicitly configured.OfflineClienttransaction; you'd have to do something like this:With this PR, transactions are now mortal by default using the
OnlineClient, we now return an error if you try to construct a transaction with theOfflineClientand try to useparams.mortal(..)when configuring it, and we exposeparams.mortal_from_unchecked(..)to allow configuration for offline transactions without the ugly code above.In this PR, we also discovered an issue decoding
Erasand fixed this, so that decoding the mortality of a transaction when it is mortal should now work.Add FFI example (#2037)
I'd like to do a quick shoutout to @wassimans, who submitted an excellent example for how to interact with Subxt via the C FFI in Python and Node.JS. This is something I've wanted to add for a while, so it's lovely to see this new example which highlights one of the strengths of Subxt over Javascript based compatitors in the space.
All of the non-trivial changes in this release are listed below:
Added
Changed
codec::Encodeandcodec::Decodederives from generated APIs by default (#2008)Fixed
at_latest(#2035)