diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fd143aaee..e48e82ac0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,116 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.28.0] - 2022-04-11 + +This is a fairly significant change; what follows is a description of the main changes to be aware of: + +### Unify how we encode and decode static and dynamic types ([#842](https://github.com/paritytech/subxt/pull/842)) + +Prior to this, static types generated by codegen (ie subxt macro) would implement `Encode` and `Decode` from the `parity-scale-codec` library. This meant that they woule be encoded-to and decoded-from based on their shape. Dynamic types (eg the `subxt::dynamic::Value` type) would be encoded and decoded based on the node metadata instead. + +This change makes use of the new `scale-encode` and `scale-decode` crates to auto-implement `EncodeAsType` and `DecodeAsType` on all of our static types. These traits allow types to take the node metadata into account when working out how best to encode and decode into them. By using metadata, we can be much more flexible/robust about how to encode/decode various types (as an example, nested transactions will now be portable across runtimes). Additionally, we can merge our codepaths for static and dynamic encoding/decoding, since both static and dynamic types can implement these traits. Read [the PR description](https://github.com/paritytech/subxt/pull/842) for more info. + +A notable impact of this is that any types you wish to substitute when performing codegen (via the CLI tool or `#[subxt]` macro) must also implement `EncodeAsType` and `DecodeAsType` too. Substrate types, for instance, generally do not. To work around this, [#886](https://github.com/paritytech/subxt/pull/886) introduces a `Static` type and enhances the type substitution logic so that you're able to wrap any types which only implement `Encode` and `Decode` to work (note that you lose out on the improvements from `EncodeAsType` and `DecodeAsType` when you do this): + +```rust +#[subxt::subxt( + runtime_metadata_path = "/path/to/metadata.scale", + substitute_type( + type = "sp_runtime::multiaddress::MultiAddress", + with = "::subxt::utils::Static<::sp_runtime::multiaddress::MultiAddress>" + ) +)] +pub mod node_runtime {} +``` + +So, if you want to substitute in Substrate types, wrap them in `::subxt::utils::Static` in the type substitution, as above. [#886](https://github.com/paritytech/subxt/pull/886) also generally improves type substitution so that you can substitute the generic params in nested types, since it's required in the above. + +Several types have been renamed as a result of this unification (though they aren't commonly made explicit use of). Additionally, to obtain the bytes from a storage address, instead of doing: + +```rust +let addr_bytes = storage_address.to_bytes() +``` + +You must now do: + +```rust +let addr_bytes = cxt.client().storage().address_bytes(&storage_address).unwrap(); +``` + +This is because the address on it's own no longer requires as much static information, and relies more heavily now on the node metadata to encode it to bytes. + +### Expose Signer payload ([#861](https://github.com/paritytech/subxt/pull/861)) + +This is not a breaking change, but notable in that is adds `create_partial_signed_with_nonce` and `create_partial_signed` to the `TxClient` to allow you to break extrinsic creation into two steps: + +1. building a payload, and then +2. when a signature is provided, getting back an extrinsic ready to be submitted. + +This allows a signer payload to be obtained from Subxt, handed off to some external application, and then once a signature has been obtained, that can be passed back to Subxt to complete the creation of an extrinsic. This opens the door to using browser wallet extensions, for instance, to sign Subxt payloads. + +### Stripping unneeded pallets from metadata ([#879](https://github.com/paritytech/subxt/pull/879)) + +This is not a breaking change, but adds the ability to use the Subxt CLI tool to strip out all but some named list of pallets from a metadata bundle. Aside from allowing you to store a significantly smaller metadata bundle with only the APIs you need in it, it will also lead to faster codegen, since there's much less of it to do. + +Use a command like `subxt metadata --pallets Balances,System` to select specific pallets. You can provide an existing metadata file to take that and strip it, outputting a smaller bundle. Alternately it will grab the metadata from a local node and strip that before outputting. + +### Dispatch error changes ([#878](https://github.com/paritytech/subxt/pull/878)) + +The `DispatchError` returned from either attempting to submit an extrinsic, or from calling `.dry_run()` has changed. It's now far more complete with respect to the information it returns in each case, and the interface has been tidied up. Changes include: + +- For `ModuleError`'s, instead of `err.pallet` and `err.error`, you can obtain error details using `let details = err.details()?` and then `details.pallet()` and `details.error()`. +- `DryRunResult` is now a custom enum with 3 states, `Success`, `DispatchError` or `TransactionValidityError`. The middle of these contains much more information than previously. +- Errors in general have been marked `#[non_exahustive]` since they could grow and change at any time. (Owing to our use of `scale-decode` internally, we are not so contrained when it comes to having precise variant indexes or anything now, and can potentially deprecate rather than remove old variants as needed). +- On a lower level, the `rpc.dry_run()` RPC call now returns the raw dry run bytes which can then be decoded with the help of metadata into our `DryRunResult`. + +### Extrinsic submission changes ([#897](https://github.com/paritytech/subxt/pull/897)) + +It was found by [@furoxr](https://github.com/furoxr) that Substrate nodes will stop sending transaction progress events under more circumstances than we originally expected. Thus, now calls like `wait_for_finalized()` and `wait_for_in_block()` will stop waiting for events when any of the following is sent from the node: + +- `Usurped` +- `Finalized` +- `FinalityTimeout` +- `Invalid` +- `Dropped` + +Previously we'd only close the subscription and stop waiting when we saw a `Finalized` or `FinalityTimeout` event. Thanks for digging into this [@furoxr](https://github.com/furoxr)! + +### Add `at_latest()` method ([#900](https://github.com/paritytech/subxt/pull/900) and [#904](https://github.com/paritytech/subxt/pull/904)) + +A small breaking change; previously we had `.at(None)` or `.at(Some(block_hash))` methods in a few places to obtain things at either the latest block or some specific block hash. + +This API has been clarified; we now have `.at_latest()` to obtain the thing at the latest block, or `.at(block_hash)` (note; no more option) to obtain the thing at some fixed block hash. In a few instances this has allowed us to ditch the `async` from the `.at()` call. + +That covers the larger changes in this release. For more details, have a look at all of the notable PRs since the last release here: + +### Added + +- added at_latest ([#900](https://github.com/paritytech/subxt/pull/900) and [#904](https://github.com/paritytech/subxt/pull/904)) +- Metadata: Retain a subset of metadata pallets ([#879](https://github.com/paritytech/subxt/pull/879)) +- Expose signer payload to allow external signing ([#861](https://github.com/paritytech/subxt/pull/861)) +- Add ink! as a user of `subxt` ([#837](https://github.com/paritytech/subxt/pull/837)) +- codegen: Add codegen error ([#841](https://github.com/paritytech/subxt/pull/841)) +- codegen: allow documentation to be opted out of ([#843](https://github.com/paritytech/subxt/pull/843)) +- re-export `sp_core` and `sp_runtime` ([#853](https://github.com/paritytech/subxt/pull/853)) +- Allow generating only runtime types in subxt macro ([#845](https://github.com/paritytech/subxt/pull/845)) +- Add 'Static' type and improve type substitution codegen to accept it ([#886](https://github.com/paritytech/subxt/pull/886)) + +### Changed + +- Improve Dispatch Errors ([#878](https://github.com/paritytech/subxt/pull/878)) +- Use scale-encode and scale-decode to encode and decode based on metadata ([#842](https://github.com/paritytech/subxt/pull/842)) +- For smoldot: support deserializing block number in header from hex or number ([#863](https://github.com/paritytech/subxt/pull/863)) +- Bump Substrate dependencies to latest ([#905](https://github.com/paritytech/subxt/pull/905)) + +### Fixed + +- wait_for_finalized behavior if the tx dropped, usurped or invalid ([#897](https://github.com/paritytech/subxt/pull/897)) + + ## [0.27.1] - 2022-02-15 -## Added +### Added - Add `find_last` for block types ([#825](https://github.com/paritytech/subxt/pull/825)) @@ -18,15 +125,16 @@ The main breaking change is fairly small: [#804](https://github.com/paritytech/s Note worthy PRs merged since the last release: -## Added +### Added - Add find last function ([#821](https://github.com/paritytech/subxt/pull/821)) - Doc: first item is current version comment ([#817](https://github.com/paritytech/subxt/pull/817)) -## Changed +### Changed - Remove unneeded Config bounds and BlockNumber associated type ([#804](https://github.com/paritytech/subxt/pull/804)) + ## [0.26.0] - 2022-01-24 This release adds a number of improvements, most notably: @@ -167,6 +275,7 @@ Some other note worthy PRs that were merged since the last release: - Fix decoding events via `.as_root_event()` and add test ([#767](https://github.com/paritytech/subxt/pull/767)) - Retain Rust code items from `mod` decorated with `subxt` attribute ([#721](https://github.com/paritytech/subxt/pull/721)) + ## [0.25.0] - 2022-11-16 This release resolves the `parity-util-mem crate` several version guard by updating substrate related dependencies which makes @@ -200,6 +309,7 @@ Notable PRs merged: - expose jsonrpc-core client ([#672](https://github.com/paritytech/subxt/pull/672)) - Upgrade clap to v4 ([#678](https://github.com/paritytech/subxt/pull/678)) + ## [0.24.0] - 2022-09-22 This release has a bunch of smaller changes and fixes. The breaking changes are fairly minor and should be easy to address if encountered. Notable additions are: @@ -234,6 +344,7 @@ Notable PRs merged: - Fix codegen for `codec::Compact` as type parameters ([#651](https://github.com/paritytech/subxt/pull/651)) - Support latest substrate release ([#653](https://github.com/paritytech/subxt/pull/653)) + ## [0.23.0] - 2022-08-11 This is one of the most significant releases to date in Subxt, and carries with it a number of significant breaking changes, but in exchange, a number of significant improvements. The most significant PR is [#593](https://github.com/paritytech/subxt/pull/593); the fundamental change that this makes is to separate creating a query/transaction/address from submitting it. This gives us flexibility when creating queries; they can be either dynamically or statically generated, but also flexibility in our client, enabling methods to be exposed for online or offline use. @@ -441,6 +552,7 @@ For more details about all of the changes, the full commit history since the las - Bump Swatinem/rust-cache from 1.4.0 to 2.0.0 ([#597](https://github.com/paritytech/subxt/pull/597)) - Update jsonrpsee requirement from 0.14.0 to 0.15.1 ([#603](https://github.com/paritytech/subxt/pull/603)) + ## [0.22.0] - 2022-06-20 With this release, subxt can subscribe to the node's runtime upgrades to ensure that the metadata is updated and @@ -479,6 +591,7 @@ bytes instead of the JSON format. - Replace `log` with `tracing` and record extrinsic info ([#535](https://github.com/paritytech/subxt/pull/535)) - Bump jsonrpsee ([#528](https://github.com/paritytech/subxt/pull/528)) + ## [0.21.0] - 2022-05-02 This release adds static metadata validation, via comparing the statically generated API with the target node's runtime @@ -515,6 +628,7 @@ The number of dependencies is reduced for individual subxt crates. - Export `BaseExtrinsicParams` ([#516](https://github.com/paritytech/subxt/pull/516)) - bump jsonrpsee to v0.10.1 ([#504](https://github.com/paritytech/subxt/pull/504)) + ## [0.20.0] - 2022-04-06 The most significant change in this release is how we create and sign extrinsics, and how we manage the @@ -550,6 +664,7 @@ is to make it easier to customise this for your own chains, and provide a simple - Add `dev_getBlockStats` RPC ([#489](https://github.com/paritytech/subxt/pull/489)) - scripts: Hardcode github subxt pull link for changelog consistency ([#482](https://github.com/paritytech/subxt/pull/482)) + ## [0.19.0] - 2022-03-21 ### Changed @@ -560,12 +675,14 @@ is to make it easier to customise this for your own chains, and provide a simple - README updates ([#472](https://github.com/paritytech/subxt/pull/472)) - Make EventSubscription and FilterEvents Send-able ([#471](https://github.com/paritytech/subxt/pull/471)) + ## [0.18.1] - 2022-03-04 # Fixed - Remove unused `sp_version` dependency to fix duplicate `parity-scale-codec` deps ([#466](https://github.com/paritytech/subxt/pull/466)) + ## [0.18.0] - 2022-03-02 ### Added @@ -589,6 +706,7 @@ is to make it easier to customise this for your own chains, and provide a simple - Fix conversion of `Call` struct names to UpperCamelCase ([#441](https://github.com/paritytech/subxt/pull/441)) - Update release documentation with dry-run ([#435](https://github.com/paritytech/subxt/pull/435)) + ## [0.17.0] - 2022-02-04 ### Added @@ -605,6 +723,7 @@ is to make it easier to customise this for your own chains, and provide a simple - Move Subxt crate into a subfolder ([#424](https://github.com/paritytech/subxt/pull/424)) - Add release checklist ([#418](https://github.com/paritytech/subxt/pull/418)) + ## [0.16.0] - 2022-02-01 *Note*: This is a significant release which introduces support for V14 metadata and macro based codegen, as well as making many breaking changes to the API. @@ -674,6 +793,7 @@ is to make it easier to customise this for your own chains, and provide a simple - update jsonrpsee ([#251](https://github.com/paritytech/subxt/pull/251)) - return none if subscription returns early ([#250](https://github.com/paritytech/subxt/pull/250)) + ## [0.15.0] - 2021-03-15 ### Added @@ -691,6 +811,7 @@ is to make it easier to customise this for your own chains, and provide a simple - Add hooks to register event types for decoding - [#227](https://github.com/paritytech/subxt/pull/227) - Substrate 3.0 - [#232](https://github.com/paritytech/subxt/pull/232) + ## [0.14.0] - 2021-02-05 - Refactor event type decoding and declaration [#221](https://github.com/paritytech/subxt/pull/221) @@ -705,6 +826,7 @@ is to make it easier to customise this for your own chains, and provide a simple - propagate 'RuntimeError's to 'decode_raw_bytes' caller [#189](https://github.com/paritytech/subxt/pull/189) - Derive `Clone` for `PairSigner` [#184](https://github.com/paritytech/subxt/pull/184) + ## [0.13.0] - Make the contract call extrinsic work [#165](https://github.com/paritytech/subxt/pull/165) @@ -719,6 +841,7 @@ is to make it easier to customise this for your own chains, and provide a simple - Decode option event arg [#158](https://github.com/paritytech/subxt/pull/158) - Remove unnecessary Sync bound [#172](https://github.com/paritytech/subxt/pull/172) + ## [0.12.0] - Only return an error if the extrinsic failed. [#156](https://github.com/paritytech/subxt/pull/156) @@ -729,6 +852,7 @@ is to make it easier to customise this for your own chains, and provide a simple - Implement the `concat` in `twox_64_concat` [#150](https://github.com/paritytech/subxt/pull/150) - Storage map iter [#148](https://github.com/paritytech/subxt/pull/148) + ## [0.11.0] - Fix build error, wabt 0.9.2 is yanked [#146](https://github.com/paritytech/subxt/pull/146) @@ -739,15 +863,18 @@ is to make it easier to customise this for your own chains, and provide a simple - Document the #[module] macro [#135](https://github.com/paritytech/subxt/pull/135) - Support authors api. [#134](https://github.com/paritytech/subxt/pull/134) + ## [0.10.1] - 2020-06-19 - Release client v0.2.0 [#133](https://github.com/paritytech/subxt/pull/133) + ## [0.10.0] - 2020-06-19 - Upgrade to substrate rc4 release [#131](https://github.com/paritytech/subxt/pull/131) - Support unsigned extrinsics. [#130](https://github.com/paritytech/subxt/pull/130) + ## [0.9.0] - 2020-06-25 - Events sub [#126](https://github.com/paritytech/subxt/pull/126) @@ -757,12 +884,14 @@ is to make it easier to customise this for your own chains, and provide a simple - Fix optional store items. [#120](https://github.com/paritytech/subxt/pull/120) - Make signing fallable and asynchronous [#119](https://github.com/paritytech/subxt/pull/119) + ## [0.8.0] - 2020-05-26 - Update to Substrate release candidate [#116](https://github.com/paritytech/subxt/pull/116) - Update to alpha.8 [#114](https://github.com/paritytech/subxt/pull/114) - Refactors the api [#113](https://github.com/paritytech/subxt/pull/113) + ## [0.7.0] - 2020-05-13 - Split subxt [#102](https://github.com/paritytech/subxt/pull/102) @@ -771,6 +900,7 @@ is to make it easier to customise this for your own chains, and provide a simple - Double map and plain storage support, introduce macros [#93](https://github.com/paritytech/subxt/pull/93) - Raw payload return SignedPayload struct [#92](https://github.com/paritytech/subxt/pull/92) + ## [0.6.0] - 2020-04-15 - Raw extrinsic payloads in Client [#83](https://github.com/paritytech/subxt/pull/83) @@ -778,6 +908,7 @@ is to make it easier to customise this for your own chains, and provide a simple - Wrap and export BlockNumber [#87](https://github.com/paritytech/subxt/pull/87) - All substrate dependencies upgraded to `alpha.6` + ## [0.5.0] - 2020-03-25 - First release diff --git a/Cargo.lock b/Cargo.lock index 1e10eedd12..8f5ae31cf6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,7 +42,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", "once_cell", "version_check", ] @@ -54,7 +54,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", - "getrandom 0.2.8", + "getrandom 0.2.9", "once_cell", "version_check", ] @@ -92,6 +92,46 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "342258dd14006105c2b75ab1bd7543a03bdf0cfc94383303ac212a04939dff6f" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-wincon", + "concolor-override", + "concolor-query", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2" + +[[package]] +name = "anstyle-parse" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7d1bb534e9efed14f3e5f44e7dd1a4f709384023a4165199a4241e18dff0116" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-wincon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3127af6145b149f3287bb9a0d10ad9c5692dba8c53ad48285e5bec4063834fa" +dependencies = [ + "anstyle", + "windows-sys 0.45.0", +] + [[package]] name = "anyhow" version = "1.0.70" @@ -139,13 +179,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.67" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ea188f25f0255d8f92797797c97ebf5631fa88178beb1a46fdf5622c9a00e4" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.4", + "syn 2.0.14", ] [[package]] @@ -231,12 +271,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "bitflags" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487f1e0fcbe47deb8b0574e646def1c903389d95241dd1bbcc6ce4a715dfc0c1" - [[package]] name = "bitvec" version = "1.0.1" @@ -258,6 +292,17 @@ dependencies = [ "digest 0.10.6", ] +[[package]] +name = "blake2b_simd" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" +dependencies = [ + "arrayref", + "arrayvec 0.7.2", + "constant_time_eq", +] + [[package]] name = "block-buffer" version = "0.7.3" @@ -276,7 +321,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -285,7 +330,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -309,6 +354,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + [[package]] name = "bumpalo" version = "3.12.0" @@ -402,7 +453,7 @@ version = "3.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ - "bitflags 1.3.2", + "bitflags", "clap_lex 0.2.4", "indexmap", "textwrap", @@ -410,30 +461,39 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.11" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42dfd32784433290c51d92c438bb72ea5063797fc3cc9a21a8c4346bebbb2098" +checksum = "046ae530c528f252094e4a77886ee1374437744b2bff1497aa898bbddbbb29b3" dependencies = [ - "bitflags 2.0.2", + "clap_builder", "clap_derive", - "clap_lex 0.3.3", - "is-terminal", + "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "223163f58c9a40c3b0a43e1c4b50a9ce09f007ea2cb1ec258a687945b4b7929f" +dependencies = [ + "anstream", + "anstyle", + "bitflags", + "clap_lex 0.4.1", "once_cell", "strsim", - "termcolor", ] [[package]] name = "clap_derive" -version = "4.1.9" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fddf67631444a3a3e3e5ac51c36a5e01335302de677bd78759eaa90ab1f46644" +checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.14", ] [[package]] @@ -447,18 +507,15 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.3.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033f6b7a4acb1f358c742aaca805c939ee73b4c6209ae4318ec7aca81c42e646" -dependencies = [ - "os_str_bytes", -] +checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" [[package]] name = "cmake" -version = "0.1.49" +version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" dependencies = [ "cc", ] @@ -500,6 +557,27 @@ dependencies = [ "tracing-error", ] +[[package]] +name = "concolor-override" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a855d4a1978dc52fb0536a04d384c2c0c1aa273597f08b77c8c4d3b2eec6037f" + +[[package]] +name = "concolor-query" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d11d52c3d7ca2e6d0040212be9e4dbbcd78b6447f535b6b561f449427944cf" +dependencies = [ + "windows-sys 0.45.0", +] + +[[package]] +name = "constant_time_eq" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" + [[package]] name = "core-foundation" version = "0.9.3" @@ -512,9 +590,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpp_demangle" @@ -527,9 +605,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" dependencies = [ "libc", ] @@ -590,9 +668,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ "cfg-if", "crossbeam-utils", @@ -643,7 +721,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "typenum", ] @@ -653,7 +731,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -663,7 +741,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -705,9 +783,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c00419335c41018365ddf7e4d5f1c12ee3659ddcf3e01974650ba1de73d038" +checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" dependencies = [ "cc", "cxxbridge-flags", @@ -717,9 +795,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8307ad413a98fff033c8545ecf133e3257747b3bae935e7602aab8aa92d4ca" +checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" dependencies = [ "cc", "codespan-reporting", @@ -727,24 +805,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.4", + "syn 2.0.14", ] [[package]] name = "cxxbridge-flags" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc52e2eb08915cb12596d29d55f0b5384f00d697a646dbd269b6ecb0fbd9d31" +checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" [[package]] name = "cxxbridge-macro" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "631569015d0d8d54e6c241733f944042623ab6df7bc3be7466874b05fcdb1c5f" +checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.4", + "syn 2.0.14", ] [[package]] @@ -825,7 +903,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -921,13 +999,13 @@ checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" [[package]] name = "errno" -version = "0.2.8" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -1015,9 +1093,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -1030,9 +1108,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -1040,15 +1118,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -1058,32 +1136,32 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.14", ] [[package]] name = "futures-sink" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-timer" @@ -1097,9 +1175,9 @@ dependencies = [ [[package]] name = "futures-util" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -1124,9 +1202,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1145,9 +1223,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ "cfg-if", "js-sys", @@ -1256,9 +1334,9 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "hash-db" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4" [[package]] name = "hash256-std-hasher" @@ -1359,7 +1437,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.6", + "generic-array 0.14.7", "hmac 0.8.1", ] @@ -1439,9 +1517,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.54" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c17cc76786e99f8d2f055c11159e7f0091c42474dcc3189fbab96072e873e6d" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1514,9 +1592,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -1534,7 +1612,7 @@ dependencies = [ [[package]] name = "integration-tests" -version = "0.27.1" +version = "0.28.0" dependencies = [ "assert_matches", "frame-metadata", @@ -1560,25 +1638,25 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" +checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" dependencies = [ "hermit-abi 0.3.1", "libc", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "is-terminal" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8687c819457e979cc940d09cb16e42a1bf70aa6b60a549de6d3a62a0ee90c69e" +checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", - "rustix", - "windows-sys 0.45.0", + "rustix 0.37.11", + "windows-sys 0.48.0", ] [[package]] @@ -1716,9 +1794,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.140" +version = "0.2.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" +checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" [[package]] name = "libm" @@ -1789,6 +1867,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "linux-raw-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" + [[package]] name = "lock_api" version = "0.4.9" @@ -1834,11 +1918,11 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memfd" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" +checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix", + "rustix 0.37.11", ] [[package]] @@ -1861,12 +1945,11 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" +checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ "hash-db", - "hashbrown 0.12.3", ] [[package]] @@ -2277,9 +2360,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.55" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d0dd4be24fcdcfeaa12a432d588dc59bbad6cad3510c67e74a2b6b2fc950564" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] @@ -2367,7 +2450,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", ] [[package]] @@ -2407,7 +2490,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] @@ -2427,7 +2510,7 @@ checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.4", + "syn 2.0.14", ] [[package]] @@ -2473,9 +2556,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d4a36c42d1873f9a77c53bde094f9664d9891bc604a45b4798fd2c389ed12e5b" [[package]] name = "rustc-hash" @@ -2491,18 +2574,32 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustix" -version = "0.36.11" +version = "0.36.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" +checksum = "e0af200a3324fa5bcd922e84e9b55a298ea9f431a489f01961acdebc6e908f25" dependencies = [ - "bitflags 1.3.2", + "bitflags", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.1.4", "windows-sys 0.45.0", ] +[[package]] +name = "rustix" +version = "0.37.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.1", + "windows-sys 0.48.0", +] + [[package]] name = "rustls" version = "0.20.8" @@ -2759,7 +2856,7 @@ version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -2784,22 +2881,22 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" -version = "1.0.159" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" +checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.159" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" +checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.4", + "syn 2.0.14", ] [[package]] @@ -2929,9 +3026,9 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "19.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e5d5ec374fc23f4e1b87219be18e01080d8a21a2dee3b49df8befeddbf5780" +checksum = "8cf23435a4bbd6eeec2bbbc346719ba4f3200e0ddb5f9e9f06c1724db03a8410" dependencies = [ "parity-scale-codec", "scale-info", @@ -2943,9 +3040,9 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "13.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3dd56a02ca86de62dc9485d95830a5fed56fd7e4a22b13c01e62e73bc2094d2" +checksum = "2c3d3507a803e8bc332fa290ed3015a7b51d4436ce2b836744642fc412040456" dependencies = [ "integer-sqrt", "num-traits", @@ -2958,15 +3055,15 @@ dependencies = [ [[package]] name = "sp-core" -version = "18.0.0" +version = "20.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea27a1d8de728306d17502ba13127a1b1149c66e0ef348f67dafad630b50c1d" +checksum = "7789372146f8ad40d0b40fad0596cb1db5771187a258eabe19b06f00767fcbd6" dependencies = [ "array-bytes", - "base58", - "bitflags 1.3.2", + "bitflags", "blake2", "bounded-collections", + "bs58", "dyn-clonable", "ed25519-zebra", "futures", @@ -3002,11 +3099,11 @@ dependencies = [ [[package]] name = "sp-core-hashing" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d607f7209b1b9571177fc3722a03312df03606bb65f89317ba686d5fa59d438f" +checksum = "27449abdfbe41b473e625bce8113745e81d65777dd1d5a8462cf24137930dad8" dependencies = [ - "blake2", + "blake2b_simd", "byteorder", "digest 0.10.6", "sha2 0.10.6", @@ -3017,9 +3114,9 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86d231d36b86d5d433c3e439e0dcaa9192861eee30158ee12c7bc009e02bdbb" +checksum = "23061dbb10975058aaca7965991386d93d0ffa1c4316094357ce65814a0a2a1e" dependencies = [ "proc-macro2", "quote", @@ -3052,9 +3149,9 @@ dependencies = [ [[package]] name = "sp-io" -version = "19.0.0" +version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be5c4b33aa06da7745be99da2380a500d2f5ccf9b2df5b344d5d1c675adedaa" +checksum = "bd3431c245992fe51b8256c838fc2e981f8d3b0afc1d1377ca7dbe0a3287a764" dependencies = [ "bytes", "ed25519", @@ -3063,6 +3160,7 @@ dependencies = [ "libsecp256k1", "log", "parity-scale-codec", + "rustversion", "secp256k1", "sp-core", "sp-externalities", @@ -3078,9 +3176,9 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "20.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1772c353908e9f5333c04b22137430f3b11c9efa50ad4521e05ef5ccf349596c" +checksum = "f5f0fc76f89011d39243e87650e3bf747ee4b19abaaeb2702988a2e0b0a7d77c" dependencies = [ "lazy_static", "sp-core", @@ -3090,11 +3188,10 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.24.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "811b1f0e8fc5b71fa359f5b4b67adedeba5dc313415e2923f8055e72c172a6ce" +checksum = "452d079f592c97369c9ca8a5083b25f146751c6b5af10cbcacc2b24dc53fd72a" dependencies = [ - "async-trait", "futures", "merlin", "parity-scale-codec", @@ -3118,9 +3215,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "20.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f02650b39d4bf5966fcd80a5b11e0cc871620952ab9be901edf1fdf1460b1ea9" +checksum = "6220216caa67e3d931c693b06a3590dfcaa255f19bb3c3e3150f1672b8bc53f6" dependencies = [ "either", "hash256-std-hasher", @@ -3141,9 +3238,9 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "15.0.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2446ea08a1ae6dac4218b26e01c7aad6dbf47eb506f4f2b1efa821aa418a07d2" +checksum = "ca5d0cd80200bf85b8b064238b2508b69b6146b13adf36066ec5d924825af737" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -3173,9 +3270,9 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.24.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779f737342d849205b97e2aacd729695614d86ccb05604e34f0ffe6391d7a4ce" +checksum = "b1e49c3bfcc8c832c34552cd8194180cc60508c6d3d9b0b9615d6b7c3e275019" dependencies = [ "hash-db", "log", @@ -3227,13 +3324,13 @@ dependencies = [ [[package]] name = "sp-trie" -version = "18.0.0" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b5f3e730d26923d699766a9ca065ec39161f7af815c19acfb89c73f0402bf9" +checksum = "58401c53c08b6ecad83acd7e14534c8bbcb3fa73e81e26685e0ac70e51b00c56" dependencies = [ "ahash 0.8.3", "hash-db", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "lazy_static", "memory-db", "nohash-hasher", @@ -3251,9 +3348,9 @@ dependencies = [ [[package]] name = "sp-version" -version = "18.0.0" +version = "21.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53ebad12a51b507859dc2978f1a6b101b403d1544403a17a1b7c17eeed20cb0c" +checksum = "34be5b74199bdda63e9ec48dc1e9dd605af947b76fba0c738a422a6d4ae14f47" dependencies = [ "impl-serde", "parity-scale-codec", @@ -3281,9 +3378,9 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "12.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510bdd9ade55508e5aa05b99ab79aaa4b74a1f7476351b6ce0f3aab3b1cb2524" +checksum = "153b7374179439e2aa783c66ed439bd86920c67bbc95d34c76390561972bc02f" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -3296,9 +3393,9 @@ dependencies = [ [[package]] name = "sp-weights" -version = "16.0.0" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c4a96e53621ae435981fb6037d8b0be7cf32fae627780094a94ef89f194715" +checksum = "123c661915e1bf328e21f8ecbe4e5247feba86f9149b782ea4348004547ce8ef" dependencies = [ "parity-scale-codec", "scale-info", @@ -3392,7 +3489,7 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subxt" -version = "0.27.1" +version = "0.28.0" dependencies = [ "base58", "bitvec", @@ -3401,7 +3498,7 @@ dependencies = [ "either", "frame-metadata", "futures", - "getrandom 0.2.8", + "getrandom 0.2.9", "hex", "impl-serde", "jsonrpsee", @@ -3429,9 +3526,9 @@ dependencies = [ [[package]] name = "subxt-cli" -version = "0.27.1" +version = "0.28.0" dependencies = [ - "clap 4.1.11", + "clap 4.2.1", "color-eyre", "frame-metadata", "hex", @@ -3447,7 +3544,7 @@ dependencies = [ [[package]] name = "subxt-codegen" -version = "0.27.1" +version = "0.28.0" dependencies = [ "bitvec", "darling", @@ -3468,7 +3565,7 @@ dependencies = [ [[package]] name = "subxt-examples" -version = "0.27.1" +version = "0.28.0" dependencies = [ "futures", "hex", @@ -3483,7 +3580,7 @@ dependencies = [ [[package]] name = "subxt-macro" -version = "0.27.1" +version = "0.28.0" dependencies = [ "darling", "proc-macro-error", @@ -3493,7 +3590,7 @@ dependencies = [ [[package]] name = "subxt-metadata" -version = "0.27.1" +version = "0.28.0" dependencies = [ "bitvec", "criterion", @@ -3516,27 +3613,15 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.4" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c622ae390c9302e214c31013517c2061ecb2699935882c60a9b37f82f8625ae" +checksum = "fcf316d5356ed6847742d036f8a39c3b8435cac10bd528a4bd461928a6ab34d5" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] - [[package]] name = "tap" version = "1.0.1" @@ -3560,7 +3645,7 @@ dependencies = [ [[package]] name = "test-runtime" -version = "0.27.1" +version = "0.28.0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -3593,7 +3678,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.4", + "syn 2.0.14", ] [[package]] @@ -3675,7 +3760,7 @@ checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.4", + "syn 2.0.14", ] [[package]] @@ -3712,9 +3797,9 @@ checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" [[package]] name = "toml_edit" -version = "0.19.7" +version = "0.19.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc18466501acd8ac6a3f615dd29a3438f8ca6bb3b19537138b3106e575621274" +checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" dependencies = [ "indexmap", "toml_datetime", @@ -3829,9 +3914,9 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.25.1" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3390c0409daaa6027d6681393316f4ccd3ff82e1590a1e4725014e3ae2bf1920" +checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" dependencies = [ "hash-db", "hashbrown 0.13.2", @@ -3842,9 +3927,9 @@ dependencies = [ [[package]] name = "trie-root" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" +checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" dependencies = [ "hash-db", ] @@ -3890,7 +3975,7 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ui-tests" -version = "0.27.1" +version = "0.28.0" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -3962,6 +4047,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "valuable" version = "0.1.0" @@ -4251,7 +4342,7 @@ dependencies = [ "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix", + "rustix 0.36.12", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -4343,11 +4434,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.46.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets", + "windows-targets 0.48.0", ] [[package]] @@ -4356,13 +4447,13 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -4371,7 +4462,16 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", ] [[package]] @@ -4380,13 +4480,28 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] @@ -4395,36 +4510,72 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + [[package]] name = "windows_i686_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + [[package]] name = "windows_i686_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -4432,10 +4583,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] -name = "winnow" -version = "0.3.6" +name = "windows_x86_64_msvc" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d020b441f92996c80d94ae9166e8501e59c7bb56121189dc9eab3bd8216966" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + +[[package]] +name = "winnow" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" dependencies = [ "memchr", ] @@ -4463,21 +4620,20 @@ checksum = "e2a7eb6d82a11e4d0b8e6bda8347169aff4ccd8235d039bba7c47482d977dcf7" [[package]] name = "zeroize" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure", + "syn 2.0.14", ] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 8ab5d9e48e..d3e71ee143 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subxt-cli" -version = "0.27.1" +version = "0.28.0" authors.workspace = true edition.workspace = true rust-version.workspace = true @@ -18,9 +18,9 @@ path = "src/main.rs" [dependencies] # perform subxt codegen -subxt-codegen = { version = "0.27.1", path = "../codegen" } +subxt-codegen = { version = "0.28.0", path = "../codegen" } # perform node compatibility -subxt-metadata = { version = "0.27.1", path = "../metadata" } +subxt-metadata = { version = "0.28.0", path = "../metadata" } # parse command line args clap = { version = "4.1.11", features = ["derive", "cargo"] } # colourful error reports diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index cf5f4991d4..97a298c41e 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subxt-codegen" -version = "0.27.1" +version = "0.28.0" authors.workspace = true edition.workspace = true rust-version.workspace = true @@ -21,7 +21,7 @@ proc-macro2 = "1.0.55" quote = "1.0.8" syn = "1.0.109" scale-info = "2.5.0" -subxt-metadata = { version = "0.27.1", path = "../metadata" } +subxt-metadata = { version = "0.28.0", path = "../metadata" } jsonrpsee = { version = "0.16.0", features = ["async-client", "client-ws-transport", "http-client"] } hex = "0.4.3" tokio = { version = "1.27", features = ["macros", "rt-multi-thread"] } diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 648f8ac31f..66491ba71f 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subxt-examples" -version = "0.27.1" +version = "0.28.0" authors.workspace = true edition.workspace = true rust-version.workspace = true @@ -15,10 +15,10 @@ description = "Subxt example usage" [dev-dependencies] subxt = { path = "../subxt" } tokio = { version = "1.27", features = ["rt-multi-thread", "macros", "time"] } -sp-keyring = "20.0.0" futures = "0.3.27" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } hex = "0.4.3" tracing-subscriber = "0.3.11" -sp-core = { version = "18.0.0", default-features = false } -sp-runtime = "20.0.0" +sp-keyring = "23.0.0" +sp-core = { version = "20.0.0", default-features = false } +sp-runtime = "23.0.0" diff --git a/examples/examples/concurrent_storage_requests.rs b/examples/examples/concurrent_storage_requests.rs index f03bf291ee..ccfc673f89 100644 --- a/examples/examples/concurrent_storage_requests.rs +++ b/examples/examples/concurrent_storage_requests.rs @@ -29,8 +29,8 @@ async fn main() -> Result<(), Box> { // For storage requests, we can join futures together to // await multiple futures concurrently: - let a_fut = api.storage().at(None).await?.fetch(&staking_bonded); - let b_fut = api.storage().at(None).await?.fetch(&staking_ledger); + let a_fut = api.storage().at_latest().await?.fetch(&staking_bonded); + let b_fut = api.storage().at_latest().await?.fetch(&staking_ledger); let (a, b) = join!(a_fut, b_fut); println!("{a:?}, {b:?}"); diff --git a/examples/examples/dynamic_queries.rs b/examples/examples/dynamic_queries.rs index 51510f1ff8..c7c69fe66e 100644 --- a/examples/examples/dynamic_queries.rs +++ b/examples/examples/dynamic_queries.rs @@ -61,7 +61,7 @@ async fn main() -> Result<(), Box> { ); let account = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&storage_address) .await? @@ -73,7 +73,7 @@ async fn main() -> Result<(), Box> { let storage_address = subxt::dynamic::storage_root("System", "Account"); let mut iter = api .storage() - .at(None) + .at_latest() .await? .iter(storage_address, 10) .await?; diff --git a/examples/examples/fetch_all_accounts.rs b/examples/examples/fetch_all_accounts.rs index 80c61d8239..2bc140aa06 100644 --- a/examples/examples/fetch_all_accounts.rs +++ b/examples/examples/fetch_all_accounts.rs @@ -23,7 +23,7 @@ async fn main() -> Result<(), Box> { let address = polkadot::storage().system().account_root(); - let mut iter = api.storage().at(None).await?.iter(address, 10).await?; + let mut iter = api.storage().at_latest().await?.iter(address, 10).await?; while let Some((key, account)) = iter.next().await? { println!("{}: {}", hex::encode(key), account.data.free); diff --git a/examples/examples/fetch_staking_details.rs b/examples/examples/fetch_staking_details.rs index 0b9ffedc86..980b430528 100644 --- a/examples/examples/fetch_staking_details.rs +++ b/examples/examples/fetch_staking_details.rs @@ -27,7 +27,7 @@ async fn main() -> Result<(), Box> { let active_era_addr = polkadot::storage().staking().active_era(); let era = api .storage() - .at(None) + .at_latest() .await? .fetch(&active_era_addr) .await? @@ -51,7 +51,7 @@ async fn main() -> Result<(), Box> { let controller_acc_addr = polkadot::storage().staking().bonded(&alice_stash_id); let controller_acc = api .storage() - .at(None) + .at_latest() .await? .fetch(&controller_acc_addr) .await? @@ -61,7 +61,7 @@ async fn main() -> Result<(), Box> { let era_reward_addr = polkadot::storage().staking().eras_reward_points(era.index); let era_result = api .storage() - .at(None) + .at_latest() .await? .fetch(&era_reward_addr) .await?; diff --git a/examples/examples/storage_iterating.rs b/examples/examples/storage_iterating.rs index e128ab46f9..ae439e0510 100644 --- a/examples/examples/storage_iterating.rs +++ b/examples/examples/storage_iterating.rs @@ -28,7 +28,7 @@ async fn main() -> Result<(), Box> { { let key_addr = polkadot::storage().xcm_pallet().version_notifiers_root(); - let mut iter = api.storage().at(None).await?.iter(key_addr, 10).await?; + let mut iter = api.storage().at_latest().await?.iter(key_addr, 10).await?; println!("\nExample 1. Obtained keys:"); while let Some((key, value)) = iter.next().await? { @@ -45,7 +45,7 @@ async fn main() -> Result<(), Box> { // Fetch at most 10 keys from below the prefix XcmPallet' VersionNotifiers. let keys = api .storage() - .at(None) + .at_latest() .await? .fetch_keys(&key_addr.to_root_bytes(), 10, None) .await?; @@ -54,7 +54,7 @@ async fn main() -> Result<(), Box> { for key in keys.iter() { println!("Key: 0x{}", hex::encode(key)); - if let Some(storage_data) = api.storage().at(None).await?.fetch_raw(&key.0).await? { + if let Some(storage_data) = api.storage().at_latest().await?.fetch_raw(&key.0).await? { // We know the return value to be `QueryId` (`u64`) from inspecting either: // - polkadot code // - polkadot.rs generated file under `version_notifiers()` fn @@ -85,7 +85,7 @@ async fn main() -> Result<(), Box> { let keys = api .storage() - .at(None) + .at_latest() .await? .fetch_keys(&query_key, 10, None) .await?; @@ -94,7 +94,7 @@ async fn main() -> Result<(), Box> { for key in keys.iter() { println!("Key: 0x{}", hex::encode(key)); - if let Some(storage_data) = api.storage().at(None).await?.fetch_raw(&key.0).await? { + if let Some(storage_data) = api.storage().at_latest().await?.fetch_raw(&key.0).await? { // We know the return value to be `QueryId` (`u64`) from inspecting either: // - polkadot code // - polkadot.rs generated file under `version_notifiers()` fn diff --git a/macro/Cargo.toml b/macro/Cargo.toml index cabbc12c47..6a3c8c3e54 100644 --- a/macro/Cargo.toml +++ b/macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subxt-macro" -version = "0.27.1" +version = "0.28.0" authors.workspace = true edition.workspace = true rust-version.workspace = true @@ -21,4 +21,4 @@ darling = "0.14.4" proc-macro-error = "1.0.4" syn = "1.0.109" -subxt-codegen = { path = "../codegen", version = "0.27.1" } +subxt-codegen = { path = "../codegen", version = "0.28.0" } diff --git a/metadata/Cargo.toml b/metadata/Cargo.toml index a51d718d91..d72d8fa6db 100644 --- a/metadata/Cargo.toml +++ b/metadata/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subxt-metadata" -version = "0.27.1" +version = "0.28.0" authors.workspace = true edition.workspace = true rust-version.workspace = true @@ -17,7 +17,7 @@ description = "Command line utilities for checking metadata compatibility betwee codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] } frame-metadata = { version = "15.1.0", features = ["v14", "v15-unstable", "std"] } scale-info = "2.5.0" -sp-core-hashing = "7.0.0" +sp-core-hashing = "8.0.0" [dev-dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 07d3e2c814..2bda203b42 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subxt" -version = "0.27.1" +version = "0.28.0" authors.workspace = true edition.workspace = true rust-version.workspace = true @@ -53,21 +53,21 @@ frame-metadata = { version = "15.1.0", features = ["v14", "v15-unstable", "std"] derivative = "2.2.0" either = "1.8.1" -subxt-macro = { version = "0.27.1", path = "../macro" } -subxt-metadata = { version = "0.27.1", path = "../metadata" } +subxt-macro = { version = "0.28.0", path = "../macro" } +subxt-metadata = { version = "0.28.0", path = "../metadata" } # Provides some deserialization, types like U256/H256 and hashing impls like twox/blake256: impl-serde = { version = "0.4.0" } primitive-types = { version = "0.12.1", default-features = false, features = ["codec", "scale-info", "serde"] } -sp-core-hashing = "7.0.0" +sp-core-hashing = "8.0.0" # For ss58 encoding AccountId32 to serialize them properly: base58 = { version = "0.2.0" } blake2 = { version = "0.10.4", default-features = false } # These are only included is "substrate-compat" is enabled. -sp-core = { version = "18.0.0", default-features = false, optional = true } -sp-runtime = { version = "20.0.0", optional = true } +sp-core = { version = "20.0.0", default-features = false, optional = true } +sp-runtime = { version = "23.0.0", optional = true } [target.wasm32-unknown-unknown.dependencies] getrandom = { version = "0.2", features = ["js"] } @@ -77,7 +77,7 @@ bitvec = "1" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } scale-info = { version = "2.5.0", features = ["bit-vec"] } tokio = { version = "1.27", features = ["macros", "time", "rt-multi-thread"] } -sp-core = { version = "18.0.0", default-features = false } -sp-runtime = "20.0.0" -sp-keyring = "20.0.0" -sp-version = "18.0.0" +sp-core = { version = "20.0.0", default-features = false } +sp-runtime = "23.0.0" +sp-keyring = "23.0.0" +sp-version = "21.0.0" diff --git a/subxt/src/blocks/block_types.rs b/subxt/src/blocks/block_types.rs index 4a1d671edc..3c98e40d39 100644 --- a/subxt/src/blocks/block_types.rs +++ b/subxt/src/blocks/block_types.rs @@ -287,7 +287,7 @@ where Some(events) => events.clone(), None => { events::EventsClient::new(client.clone()) - .at(Some(block_hash)) + .at(block_hash) .await? } }; diff --git a/subxt/src/blocks/blocks_client.rs b/subxt/src/blocks/blocks_client.rs index c604c48e22..0f535c5caf 100644 --- a/subxt/src/blocks/blocks_client.rs +++ b/subxt/src/blocks/blocks_client.rs @@ -39,8 +39,7 @@ where T: Config, Client: OnlineClientT, { - /// Obtain block details given the provided block hash, or the latest block if `None` is - /// provided. + /// Obtain block details given the provided block hash. /// /// # Warning /// @@ -48,6 +47,22 @@ where /// runtime upgrade. You can attempt to retrieve older blocks, /// but may run into errors attempting to work with them. pub fn at( + &self, + block_hash: T::Hash, + ) -> impl Future, Error>> + Send + 'static { + self.at_or_latest(Some(block_hash)) + } + + /// Obtain block details of the latest block hash. + pub fn at_latest( + &self, + ) -> impl Future, Error>> + Send + 'static { + self.at_or_latest(None) + } + + /// Obtain block details given the provided block hash, or the latest block if `None` is + /// provided. + fn at_or_latest( &self, block_hash: Option, ) -> impl Future, Error>> + Send + 'static { diff --git a/subxt/src/events/events_client.rs b/subxt/src/events/events_client.rs index f66d97ec0f..0a30f2dc6a 100644 --- a/subxt/src/events/events_client.rs +++ b/subxt/src/events/events_client.rs @@ -37,6 +37,19 @@ where /// runtime upgrade. You can attempt to retrieve events from older blocks, /// but may run into errors attempting to work with them. pub fn at( + &self, + block_hash: T::Hash, + ) -> impl Future, Error>> + Send + 'static { + self.at_or_latest(Some(block_hash)) + } + + /// Obtain events at the latest block hash. + pub fn at_latest(&self) -> impl Future, Error>> + Send + 'static { + self.at_or_latest(None) + } + + /// Obtain events at some block hash. + fn at_or_latest( &self, block_hash: Option, ) -> impl Future, Error>> + Send + 'static { diff --git a/subxt/src/runtime_api/runtime_client.rs b/subxt/src/runtime_api/runtime_client.rs index c48737e648..a785a4259f 100644 --- a/subxt/src/runtime_api/runtime_client.rs +++ b/subxt/src/runtime_api/runtime_client.rs @@ -31,23 +31,25 @@ where T: Config, Client: OnlineClientT, { - /// Obtain a runtime API at some block hash. - pub fn at( + /// Obtain a runtime API interface at some block hash. + pub fn at(&self, block_hash: T::Hash) -> RuntimeApi { + RuntimeApi::new(self.client.clone(), block_hash) + } + + /// Obtain a runtime API interface at the latest block hash. + pub fn at_latest( &self, - block_hash: Option, ) -> impl Future, Error>> + Send + 'static { // Clone and pass the client in like this so that we can explicitly // return a Future that's Send + 'static, rather than tied to &self. let client = self.client.clone(); async move { - // If block hash is not provided, get the hash - // for the latest block and use that. - let block_hash = match block_hash { - Some(hash) => hash, - None => client.rpc().block_hash(None).await?.expect( - "substrate RPC returns the best block when no block number is provided; qed", - ), - }; + // get the hash for the latest block and use that. + let block_hash = client + .rpc() + .block_hash(None) + .await? + .expect("didn't pass a block number; qed"); Ok(RuntimeApi::new(client, block_hash)) } diff --git a/subxt/src/storage/storage_client.rs b/subxt/src/storage/storage_client.rs index 79c0ba739e..64a0af8a00 100644 --- a/subxt/src/storage/storage_client.rs +++ b/subxt/src/storage/storage_client.rs @@ -71,24 +71,24 @@ where Client: OnlineClientT, { /// Obtain storage at some block hash. - pub fn at( + pub fn at(&self, block_hash: T::Hash) -> Storage { + Storage::new(self.client.clone(), block_hash) + } + + /// Obtain storage at the latest block hash. + pub fn at_latest( &self, - block_hash: Option, ) -> impl Future, Error>> + Send + 'static { // Clone and pass the client in like this so that we can explicitly // return a Future that's Send + 'static, rather than tied to &self. let client = self.client.clone(); async move { - // If block hash is not provided, get the hash - // for the latest block and use that. - let block_hash = match block_hash { - Some(hash) => hash, - None => client - .rpc() - .block_hash(None) - .await? - .expect("didn't pass a block number; qed"), - }; + // get the hash for the latest block and use that. + let block_hash = client + .rpc() + .block_hash(None) + .await? + .expect("didn't pass a block number; qed"); Ok(Storage::new(client, block_hash)) } diff --git a/subxt/src/storage/storage_type.rs b/subxt/src/storage/storage_type.rs index 6033b00bf6..84c554af6c 100644 --- a/subxt/src/storage/storage_type.rs +++ b/subxt/src/storage/storage_type.rs @@ -75,7 +75,7 @@ where /// // Fetch just the keys, returning up to 10 keys. /// let value = api /// .storage() - /// .at(None) + /// .at_latest() /// .await /// .unwrap() /// .fetch(&address) @@ -185,7 +185,7 @@ where /// // Iterate over keys and values at that address. /// let mut iter = api /// .storage() - /// .at(None) + /// .at_latest() /// .await /// .unwrap() /// .iter(address, 10) diff --git a/subxt/src/tx/tx_progress.rs b/subxt/src/tx/tx_progress.rs index 248b0bda15..09a5a40119 100644 --- a/subxt/src/tx/tx_progress.rs +++ b/subxt/src/tx/tx_progress.rs @@ -397,7 +397,7 @@ impl> TxInBlock { .ok_or(Error::Transaction(TransactionError::BlockNotFound))?; let events = EventsClient::new(self.client.clone()) - .at(Some(self.block_hash)) + .at(self.block_hash) .await?; Ok(crate::blocks::ExtrinsicEvents::new( diff --git a/testing/integration-tests/Cargo.toml b/testing/integration-tests/Cargo.toml index c321ff5013..f74e6f9583 100644 --- a/testing/integration-tests/Cargo.toml +++ b/testing/integration-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "integration-tests" -version = "0.27.1" +version = "0.28.0" authors.workspace = true edition.workspace = true rust-version.workspace = true @@ -23,13 +23,13 @@ futures = "0.3.27" hex = "0.4.3" regex = "1.7.3" scale-info = { version = "2.5.0", features = ["bit-vec"] } -sp-core = { version = "18.0.0", default-features = false } -sp-runtime = "20.0.0" -sp-keyring = "20.0.0" +sp-core = { version = "20.0.0", default-features = false } +sp-runtime = "23.0.0" +sp-keyring = "23.0.0" syn = "1.0.109" -subxt = { version = "0.27.1", path = "../../subxt" } -subxt-codegen = { version = "0.27.1", path = "../../codegen" } -subxt-metadata = { version = "0.27.1", path = "../../metadata" } +subxt = { version = "0.28.0", path = "../../subxt" } +subxt-codegen = { version = "0.28.0", path = "../../codegen" } +subxt-metadata = { version = "0.28.0", path = "../../metadata" } test-runtime = { path = "../test-runtime" } tokio = { version = "1.27", features = ["macros", "time"] } tracing = "0.1.34" diff --git a/testing/integration-tests/src/client/mod.rs b/testing/integration-tests/src/client/mod.rs index 34afcf2d4d..1748c47709 100644 --- a/testing/integration-tests/src/client/mod.rs +++ b/testing/integration-tests/src/client/mod.rs @@ -111,7 +111,7 @@ async fn fetch_keys() { let addr = node_runtime::storage().system().account_root(); let keys = api .storage() - .at(None) + .at_latest() .await .unwrap() .fetch_keys(&addr.to_root_bytes(), 4, None) @@ -128,7 +128,7 @@ async fn test_iter() { let addr = node_runtime::storage().system().account_root(); let mut iter = api .storage() - .at(None) + .at_latest() .await .unwrap() .iter(addr, 10) diff --git a/testing/integration-tests/src/frame/balances.rs b/testing/integration-tests/src/frame/balances.rs index 7ef0217070..8868d84697 100644 --- a/testing/integration-tests/src/frame/balances.rs +++ b/testing/integration-tests/src/frame/balances.rs @@ -27,13 +27,13 @@ async fn tx_basic_transfer() -> Result<(), subxt::Error> { let alice_pre = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&alice_account_addr) .await?; let bob_pre = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&bob_account_addr) .await?; @@ -64,13 +64,13 @@ async fn tx_basic_transfer() -> Result<(), subxt::Error> { let alice_post = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&alice_account_addr) .await?; let bob_post = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&bob_account_addr) .await?; @@ -102,13 +102,13 @@ async fn tx_dynamic_transfer() -> Result<(), subxt::Error> { let alice_pre = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&alice_account_addr) .await?; let bob_pre = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&bob_account_addr) .await?; @@ -152,13 +152,13 @@ async fn tx_dynamic_transfer() -> Result<(), subxt::Error> { let alice_post = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&alice_account_addr) .await?; let bob_post = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&bob_account_addr) .await?; @@ -211,7 +211,7 @@ async fn multiple_transfers_work_nonce_incremented() -> Result<(), subxt::Error> let bob_pre = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&bob_account_addr) .await?; @@ -231,7 +231,7 @@ async fn multiple_transfers_work_nonce_incremented() -> Result<(), subxt::Error> let bob_post = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&bob_account_addr) .await?; @@ -248,7 +248,7 @@ async fn storage_total_issuance() { let addr = node_runtime::storage().balances().total_issuance(); let total_issuance = api .storage() - .at(None) + .at_latest() .await .unwrap() .fetch_or_default(&addr) @@ -283,7 +283,7 @@ async fn storage_balance_lock() -> Result<(), subxt::Error> { let locks = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&locks_addr) .await?; diff --git a/testing/integration-tests/src/frame/contracts.rs b/testing/integration-tests/src/frame/contracts.rs index 63e15287d4..ba6a3a3907 100644 --- a/testing/integration-tests/src/frame/contracts.rs +++ b/testing/integration-tests/src/frame/contracts.rs @@ -212,7 +212,7 @@ async fn tx_call() { let contract_info = cxt .client() .storage() - .at(None) + .at_latest() .await .unwrap() .fetch(&info_addr) @@ -222,7 +222,7 @@ async fn tx_call() { let keys = cxt .client() .storage() - .at(None) + .at_latest() .await .unwrap() .fetch_keys(&info_addr_bytes, 10, None) diff --git a/testing/integration-tests/src/frame/staking.rs b/testing/integration-tests/src/frame/staking.rs index c3e4c338ca..8c89fec42b 100644 --- a/testing/integration-tests/src/frame/staking.rs +++ b/testing/integration-tests/src/frame/staking.rs @@ -146,7 +146,7 @@ async fn chill_works_for_controller_only() -> Result<(), Error> { let ledger_addr = node_runtime::storage().staking().ledger(alice.account_id()); let ledger = api .storage() - .at(None) + .at_latest() .await? .fetch(&ledger_addr) .await? @@ -234,7 +234,7 @@ async fn storage_current_era() -> Result<(), Error> { let current_era_addr = node_runtime::storage().staking().current_era(); let _current_era = api .storage() - .at(None) + .at_latest() .await? .fetch(¤t_era_addr) .await? @@ -249,7 +249,7 @@ async fn storage_era_reward_points() -> Result<(), Error> { let reward_points_addr = node_runtime::storage().staking().eras_reward_points(0); let current_era_result = api .storage() - .at(None) + .at_latest() .await? .fetch(&reward_points_addr) .await; diff --git a/testing/integration-tests/src/frame/system.rs b/testing/integration-tests/src/frame/system.rs index 246362e1dc..b8777025ac 100644 --- a/testing/integration-tests/src/frame/system.rs +++ b/testing/integration-tests/src/frame/system.rs @@ -20,7 +20,7 @@ async fn storage_account() -> Result<(), subxt::Error> { let account_info = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&account_info_addr) .await; diff --git a/testing/integration-tests/src/frame/timestamp.rs b/testing/integration-tests/src/frame/timestamp.rs index 24ac717637..d291042ae5 100644 --- a/testing/integration-tests/src/frame/timestamp.rs +++ b/testing/integration-tests/src/frame/timestamp.rs @@ -11,7 +11,7 @@ async fn storage_get_current_timestamp() { let timestamp = api .storage() - .at(None) + .at_latest() .await .unwrap() .fetch(&node_runtime::storage().timestamp().now()) diff --git a/testing/integration-tests/src/storage/mod.rs b/testing/integration-tests/src/storage/mod.rs index 28f52525a2..eb2a1021c4 100644 --- a/testing/integration-tests/src/storage/mod.rs +++ b/testing/integration-tests/src/storage/mod.rs @@ -18,7 +18,7 @@ async fn storage_plain_lookup() -> Result<(), subxt::Error> { let addr = node_runtime::storage().timestamp().now(); let entry = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&addr) .await?; @@ -47,7 +47,7 @@ async fn storage_map_lookup() -> Result<(), subxt::Error> { let nonce_addr = node_runtime::storage().system().account(alice); let entry = api .storage() - .at(None) + .at_latest() .await? .fetch_or_default(&nonce_addr) .await?; @@ -121,7 +121,7 @@ async fn storage_n_map_storage_lookup() -> Result<(), subxt::Error> { // The actual test; look up this approval in storage: let addr = node_runtime::storage().assets().approvals(99, alice, bob); - let entry = api.storage().at(None).await?.fetch(&addr).await?; + let entry = api.storage().at_latest().await?.fetch(&addr).await?; assert_eq!(entry.map(|a| a.amount), Some(123)); Ok(()) } diff --git a/testing/test-runtime/Cargo.toml b/testing/test-runtime/Cargo.toml index d2e4902c6b..e78c5e1cc2 100644 --- a/testing/test-runtime/Cargo.toml +++ b/testing/test-runtime/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "test-runtime" -version = "0.27.1" +version = "0.28.0" edition = "2021" publish = false [dependencies] subxt = { path = "../../subxt" } -sp-runtime = "20.0.0" +sp-runtime = "23.0.0" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } [build-dependencies] diff --git a/testing/ui-tests/Cargo.toml b/testing/ui-tests/Cargo.toml index ce614e208b..200d45aa98 100644 --- a/testing/ui-tests/Cargo.toml +++ b/testing/ui-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ui-tests" -version = "0.27.1" +version = "0.28.0" edition = "2021" publish = false