Skip to content
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

Bump subxt from 0.29.0 to 0.32.1 #1005

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 9, 2023

Bumps subxt from 0.29.0 to 0.32.1.

Release notes

Sourced from subxt's releases.

v0.31.0

[0.31.0] - 2023-08-02

This is a small release whose primary goal is to bump the versions of scale-encode, scale-decode and scale-value being used, to benefit from recent changes in those crates.

scale-decode changes how compact values are decoded as part of #1103. A compact encoded struct should now be properly decoded into a struct of matching shape (which implements DecodeAsType). This will hopefully resolve issues around structs like Perbill. When decoding the SCALE bytes for such types into scale_value::Value, the Value will now be a composite type wrapping a value, and not just the value.

We've also figured out how to sign extrinsics using browser wallets when a Subxt app is compiled to WASM; see #1067 for more on that!

The key commits:

Added

  • Add browser extension signing example (#1067)

Changed

  • Bump to latest scale-encode/decode/value and fix test running (#1103)
  • Set minimum supported rust-version to 1.70 (#1097)

Fixed

  • Tests: support 'substrate-node' too and allow multiple binary paths (#1102)

v0.30.0

[0.30.0] - 2023-07-24

This release beings with it a number of exciting additions. Let's cover a few of the most significant ones:

Light client support (unstable)

This release adds support for light clients using Smoldot, both when compiling native binaries and when compiling to WASM to run in a browser environment. This is unstable for now while we continue testing it and work on making use of the new RPC APIs.

Here's how to use it:

use subxt::{
    client::{LightClient, LightClientBuilder},
    PolkadotConfig
};
use subxt_signer::sr25519::dev;
// Create a light client:
let api = LightClient::<PolkadotConfig>::builder()
// You can also pass a chain spec directly using build, which is preferred:
.build_from_url("ws://127.0.0.1:9944")
.await?;
// Working with the interface is then the same as before:
</tr></table>

... (truncated)

Changelog

Sourced from subxt's changelog.

[0.32.1] - 2023-10-05

This is a patch release, mainly to deploy the fix #1191, which resolves an issue around codegen when runtime API definitions have an argument name "_".

We also expose an API, api.blocks().at(block_hash).account_nonce(account_id), which allows one to obtain the account nonce for some account at any block hash, and not just at the latest finalized block hash as is possible via api.tx().account_nonce(..).

The main changes are:

  • fix for when runtime API field name is _ (#1191)
  • allow getting account nonce at arbitrary blocks, too (#1182)
  • chore: improve some error messages (#1183)

[0.32.0] - 2023-09-27

This is a big release that adds quite a lot, and also introduces some slightly larger breaking changes. Let's look at the main changes:

The Backend trait and the UnstableBackend and LegacyBackend impls.

See #1126, #1137 and #1161 for more information.

The overarching idea here is that we want Subxt to be able to continue to support talking to nodes/light-clients using the "legacy" RPC APIs that are currently available, but we also want to be able to support using only the new RPC APIs once they are stabilized.

Until now, the higher level APIs in Subxt all had access to the RPCs and could call whatever they needed. Now, we've abstracted away which RPCs are called (or even that RPCs are used at all) behind a subxt::backend::Backend trait. Higher level APIs no longer have access to RPC methods and instead have access to the current Backend implementation. We then added two Backend implementations:

  • subxt::backend::legacy::LegacyBackend: This uses the "legacy" RPCs, as we've done to date, to obtain the information we need. This is still the default backend that Subxt will use.
  • subxt::backend::unstable::UnstableBackend: This backend relies on the new (and currently still unstable) chainHead based RPC APIs to obtain the information we need. This could break at any time as the RPC methods update, until they are fully stabilized. One day, this will be the default backend.

One of the significant differences between backends is that the UnstableBackend can only fetch further information about blocks that are "pinned", ie that we have signalled are still in use. To that end, the backend now hands back BlockRefs instead of plain block hashes. As long as a BlockRef exists for some block, the backend (and node) will attempt to keep it available. Thus, Subxt will keep hold of these internally as needed, and also allows you to obtain them from a Block with block.reference(), in case you need to try and hold on to any blocks for longer.

One of the main breaking changes here is in how you can access and call RPC methods.

Previously, you could access them directly from the Subxt client, since it exposed the RPC methods itself, eg:

let genesis_hash = client.rpc().genesis_hash().await?;

Now, the client only knows about a Backend (ie it has a .backend() method instead of .rpc()), and doesn't know about RPCs, but you can still manually create an RpcClient to call RPC methods like so:

use subxt::{
    config::SubstrateConfig,
    backend::rpc::RpcClient,
    backend::legacy::LegacyRpcMethods,
};
// Instantiate an RPC client pointing at some URL.
let rpc_client = RpcClient::from_url("ws://localhost:9944").await?;
// We could also call unstable RPCs with backend::unstable::UnstableRpcMethods:
</tr></table>

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Oct 9, 2023
Bumps [subxt](https://github.com/paritytech/subxt) from 0.29.0 to 0.32.1.
- [Release notes](https://github.com/paritytech/subxt/releases)
- [Changelog](https://github.com/paritytech/subxt/blob/master/CHANGELOG.md)
- [Commits](paritytech/subxt@v0.29.0...v0.32.1)

---
updated-dependencies:
- dependency-name: subxt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/cargo/subxt-0.32.1 branch from 872ee5c to c3d0081 Compare October 10, 2023 09:32
@neysofu neysofu closed this Oct 10, 2023
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Oct 10, 2023

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/cargo/subxt-0.32.1 branch October 10, 2023 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant