Merged
Conversation
lexnv
approved these changes
May 16, 2024
niklasad1
reviewed
May 16, 2024
niklasad1
approved these changes
May 16, 2024
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.36.0] - 2024-05-16
This release adds a few new features, which I'll go over below in more detail.
subxt-coreWe now have a brand new
subxt-corecrate, which is#[no-std]compatible, and contains a lot of the core logic that is needed in Subxt. Using this crate, you can do things in a no-std environment like:blocks: decode and explore block bodies.constants: access and validate the constant addresses in some metadata.custom_values: access and validate the custom value addresses in some metadata.metadata: decode bytes into the metadata used throughout this library.storage: construct storage request payloads and decode the results you'd get back.tx: construct and sign transactions (extrinsics).runtime_api: construct runtime API request payloads and decode the results you'd get back.events: decode and explore events.Check out the docs for more, including examples of each case.
A breaking change that comes from migrating a bunch of logic to this new crate is that the
ExtrinsicParamstrait is now handed&ClientState<T>rather than aClient.ClientStateis just a concrete struct containing the state that one needs for things like signed extensions.Support for reconnecting
We've baked in a bunch of support for automatically reconnecting after a connection loss into Subxt. This comes in three parts:
unstable-reconnecting-rpc-clientfeature flag at the moment, andDisconnectedWillReconnecterror to the user where it cannot. Note that the individualLegacyRpcMethodsandUnstableRpcMethodsare not automatically retried on reconnection. Which leads us to..subxt::backend::retryandsubxt::backend::retry_stream) which can be used in conjunction with a reconnecting RPC client to make it easy to automatically retry RPC method calls where needed.We'd love feedback on this reconnecting work! To try it out, enable the
unstable-reconnecting-rpc-clientfeature flag and then you can make use of this like so:Check out the full example here.
Better Ethereum support
We've added built-in support for Ethereum style chains (eg Frontier and Moonbeam) in
subxt-signer, making it easier to sign transactions for these chains now.Check out a full example here.
We plan to improve on this in the future, baking in better Ethereum support if possible so that it's as seamless to use
AccountId20as it isAccountId32.Stabilizing the new V2 RPCs (#1540, #1539, #1538)
A bunch of the new RPCs are now stable in the spec, and have consequently been stabilized here, bringing the
unstable-backenda step closer to being stabilized itself! We'll probably first remove the feature flag and next make it the default backend, in upcoming releases.All of the notable changes in this release are as follows:
Added
frontier/ethereumexample (#1557)subxt-corecrate (#1466)Changed
scale-type-resolver0.2 (#1565)Fixed
subxt-signer::eth(#1553)