From 6c8d878eeec805ce6a37ba14fb2018baf5119ef2 Mon Sep 17 00:00:00 2001 From: Tadeo Hepperle <62739623+tadeohepperle@users.noreply.github.com> Date: Fri, 21 Jul 2023 19:10:05 +0200 Subject: [PATCH 1/6] Remove `substrate-compat` default feature flag (#1078) * remove defautl feature, add target cfg, change CI job waml * adjust CI job * Adjust docs * adjust the CI job * add wasm targe to ci again * remove the unresolved links from the book * Update subxt/src/book/usage/transactions.rs --------- Co-authored-by: James Wilson --- .github/workflows/rust.yml | 13 ++++------- examples/wasm-example/Cargo.lock | 8 +++---- subxt/Cargo.toml | 2 +- subxt/src/book/setup/config.rs | 32 ++++++++++++++-------------- subxt/src/book/usage/transactions.rs | 9 +++++--- subxt/src/tx/signer.rs | 2 +- 6 files changed, 32 insertions(+), 34 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index dcf78a48b2..e71653e640 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -71,9 +71,9 @@ jobs: # check it without. We can't enable subxt or web features here, so no cargo hack. - name: Cargo check subxt-signer run: | - cargo check -p subxt-signer - cargo check -p subxt-signer --no-default-features --features sr25519 - cargo check -p subxt-signer --no-default-features --features ecdsa + cargo check -p subxt-signer + cargo check -p subxt-signer --no-default-features --features sr25519 + cargo check -p subxt-signer --no-default-features --features ecdsa # We can't enable web features here, so no cargo hack. - name: Cargo check subxt-lightclient @@ -83,11 +83,6 @@ jobs: - name: Cargo hack; check each feature/crate on its own run: cargo hack --exclude subxt --exclude subxt-signer --exclude subxt-lightclient --exclude-all-features --each-feature check --workspace - # Check examples, which aren't a part of the workspace and so are otherwise missed: - - name: Cargo check examples - run: | - cargo check --manifest-path examples/parachain-example/Cargo.toml - wasm_check: name: Cargo check (WASM) runs-on: ubuntu-latest @@ -109,7 +104,7 @@ jobs: # Check WASM examples, which aren't a part of the workspace and so are otherwise missed: - name: Cargo check WASM examples run: | - cargo check --manifest-path examples/wasm-example/Cargo.toml --target wasm32-unknown-unknown + cargo check --manifest-path examples/wasm-example/Cargo.toml --target wasm32-unknown-unknown fmt: name: Cargo fmt diff --git a/examples/wasm-example/Cargo.lock b/examples/wasm-example/Cargo.lock index ee32aa6735..cde42f2546 100644 --- a/examples/wasm-example/Cargo.lock +++ b/examples/wasm-example/Cargo.lock @@ -2154,9 +2154,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.171" +version = "1.0.173" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" +checksum = "e91f70896d6720bc714a4a57d22fc91f1db634680e65c8efe13323f1fa38d53f" dependencies = [ "serde_derive", ] @@ -2174,9 +2174,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.171" +version = "1.0.173" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +checksum = "a6250dde8342e0232232be9ca3db7aa40aceb5a3e5dd9bddbc00d99a007cde49" dependencies = [ "proc-macro2", "quote", diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index d4fa845d27..5165254a54 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -17,7 +17,7 @@ keywords = ["parity", "substrate", "blockchain"] [features] # For dev and documentation reasons we enable more features than are often desired. # it's recommended to use `--no-default-features` and then select what you need. -default = ["jsonrpsee", "native", "substrate-compat"] +default = ["jsonrpsee", "native"] # Enable this for native (ie non web/wasm builds). # Exactly 1 of "web" and "native" is expected. diff --git a/subxt/src/book/setup/config.rs b/subxt/src/book/setup/config.rs index 255130704d..85cbf84dfa 100644 --- a/subxt/src/book/setup/config.rs +++ b/subxt/src/book/setup/config.rs @@ -34,17 +34,17 @@ //! at the time of writing. The `AccountId`, `Hash` and `Header` types of the [frame_system::pallet::Config](https://docs.rs/frame-system/latest/frame_system/pallet/trait.Config.html) //! correspond to the ones we want to use for implementing [crate::Config]. In the Case of Statemint (Asset Hub) they are: //! -//! - AccountId: [`sp_core::crypto::AccountId32`] -//! - Hash: [`sp_core::H256`] -//! - Hasher (type `Hashing` in [frame_system::pallet::Config](https://docs.rs/frame-system/latest/frame_system/pallet/trait.Config.html)): [`sp_runtime::traits::BlakeTwo256`] -//! - Header: [`sp_runtime::generic::Header`](sp_runtime::generic::Header) +//! - AccountId: `sp_core::crypto::AccountId32` +//! - Hash: `sp_core::H256` +//! - Hasher (type `Hashing` in [frame_system::pallet::Config](https://docs.rs/frame-system/latest/frame_system/pallet/trait.Config.html)): `sp_runtime::traits::BlakeTwo256` +//! - Header: `sp_runtime::generic::Header` //! //! Subxt has its own versions of some of these types in order to avoid needing to pull in Substrate dependencies: //! -//! - [`sp_core::crypto::AccountId32`] can be swapped with [`crate::utils::AccountId32`]. -//! - [`sp_core::H256`] is a re-export which subxt also provides as [`crate::config::substrate::H256`]. -//! - [`sp_runtime::traits::BlakeTwo256`] can be swapped with [`crate::config::substrate::BlakeTwo256`]. -//! - [`sp_runtime::generic::Header`] can be swapped with [`crate::config::substrate::SubstrateHeader`]. +//! - `sp_core::crypto::AccountId32` can be swapped with [`crate::utils::AccountId32`]. +//! - `sp_core::H256` is a re-export which subxt also provides as [`crate::config::substrate::H256`]. +//! - `sp_runtime::traits::BlakeTwo256` can be swapped with [`crate::config::substrate::BlakeTwo256`]. +//! - `sp_runtime::generic::Header` can be swapped with [`crate::config::substrate::SubstrateHeader`]. //! //! Having a look at how those types are implemented can give some clues as to how to implement other custom types that //! you may need to use as part of your config. @@ -53,20 +53,20 @@ //! //! A Substrate runtime is typically constructed by using the [frame_support::construct_runtime](https://docs.rs/frame-support/latest/frame_support/macro.construct_runtime.html) macro. //! In this macro, we need to specify the type of an `UncheckedExtrinsic`. Most of the time, the `UncheckedExtrinsic` will be of the type -//! [sp_runtime::generic::UncheckedExtrinsic](sp_runtime::generic::UncheckedExtrinsic). +//! `sp_runtime::generic::UncheckedExtrinsic`. //! The generic parameters `Address` and `Signature` specified when declaring the `UncheckedExtrinsic` type //! are the types for `Address` and `Signature` we should use when implementing the [crate::Config] trait. This information can //! also be obtained from the metadata (see [`frame_metadata::v15::ExtrinsicMetadata`]). In case of Statemint (Polkadot Asset Hub) //! we see the following types being used in `UncheckedExtrinsic`: //! -//! - Address: [sp_runtime::MultiAddress](sp_runtime::MultiAddress) -//! - Signature: [sp_runtime::MultiSignature] +//! - Address: `sp_runtime::MultiAddress](sp_runtime::MultiAddress` +//! - Signature: `sp_runtime::MultiSignature` //! //! As above, Subxt has its own versions of these types that can be used instead to avoid pulling in Substrate dependencies. //! Using the Subxt versions also makes interacting with generated code (which uses them in some places) a little nicer: //! -//! - [`sp_runtime::MultiAddress`] can be swapped with [`crate::utils::MultiAddress`]. -//! - [`sp_runtime::MultiSignature`] can be swapped with [`crate::utils::MultiSignature`]. +//! - `sp_runtime::MultiAddress` can be swapped with [`crate::utils::MultiAddress`]. +//! - `sp_runtime::MultiSignature` can be swapped with [`crate::utils::MultiSignature`]. //! //! ### ExtrinsicParams //! @@ -100,7 +100,7 @@ //! ); //! ``` //! -//! Each element of the `SignedExtra` tuple implements [codec::Encode] and [sp_runtime::traits::SignedExtension] +//! Each element of the `SignedExtra` tuple implements [codec::Encode] and `sp_runtime::traits::SignedExtension` //! which has an associated type `AdditionalSigned` that also implements [codec::Encode]. Let's look at the underlying types //! for each tuple element. All zero-sized types have been replaced by `()` for simplicity. //! @@ -109,8 +109,8 @@ //! | [`frame_system::CheckNonZeroSender`](https://docs.rs/frame-system/latest/frame_system/struct.CheckNonZeroSender.html) | () | () | //! | [`frame_system::CheckSpecVersion`](https://docs.rs/frame-system/latest/frame_system/struct.CheckSpecVersion.html) | () | [u32] | //! | [`frame_system::CheckTxVersion`](https://docs.rs/frame-system/latest/frame_system/struct.CheckTxVersion.html) | () | [u32] | -//! | [`frame_system::CheckGenesis`](https://docs.rs/frame-system/latest/frame_system/struct.CheckGenesis.html) | () | `Config::Hash` = [sp_core::H256] | -//! | [`frame_system::CheckMortality`](https://docs.rs/frame-system/latest/frame_system/struct.CheckMortality.html) | [sp_runtime::generic::Era] | `Config::Hash` = [sp_core::H256] | +//! | [`frame_system::CheckGenesis`](https://docs.rs/frame-system/latest/frame_system/struct.CheckGenesis.html) | () | `Config::Hash` = `sp_core::H256` | +//! | [`frame_system::CheckMortality`](https://docs.rs/frame-system/latest/frame_system/struct.CheckMortality.html) | `sp_runtime::generic::Era` | `Config::Hash` = `sp_core::H256` | //! | [`frame_system::CheckNonce`](https://docs.rs/frame-system/latest/frame_system/struct.CheckNonce.html) | `frame_system::pallet::Config::Index` = u32 | () | //! | [`frame_system::CheckWeight`](https://docs.rs/frame-system/latest/frame_system/struct.CheckWeight.html) | () | () | //! | [`frame_system::ChargeAssetTxPayment`](https://docs.rs/frame-system/latest/frame_system/struct.ChargeAssetTxPayment.html) | [pallet_asset_tx_payment::ChargeAssetTxPayment](https://docs.rs/pallet-asset-tx-payment/latest/pallet_asset_tx_payment/struct.ChargeAssetTxPayment.html) | () | diff --git a/subxt/src/book/usage/transactions.rs b/subxt/src/book/usage/transactions.rs index a4abbeaad9..6cbae2fa4c 100644 --- a/subxt/src/book/usage/transactions.rs +++ b/subxt/src/book/usage/transactions.rs @@ -66,8 +66,8 @@ //! There are two main ways to create a compatible signer instance: //! 1. The `subxt_signer` crate provides a WASM compatible implementation of [`crate::tx::Signer`] //! for chains which require sr25519 or ecdsa signatures (requires the `subxt` feature to be enabled). -//! 2. Alternately, Subxt can use instances of Substrate's [`sp_core::Pair`] to sign things by wrapping -//! them in a [`crate::tx::PairSigner`] (requires the `substrate-compat` feature to be enabled). +//! 2. Alternately, Subxt can use instances of Substrate's `sp_core::Pair` to sign things by wrapping +//! them in a `crate::tx::PairSigner` (requires the `substrate-compat` feature to be enabled). //! //! Going for 1 leads to fewer dependencies being imported and WASM compatibility out of the box via //! the `web` feature flag. Going for 2 is useful if you're already using the Substrate dependencies or @@ -77,6 +77,8 @@ //! Let's see how to use each of these approaches: //! //! ```rust +//! # #[cfg(feature = "substrate-compat")] +//! # { //! use subxt::config::PolkadotConfig; //! use std::str::FromStr; //! @@ -111,9 +113,10 @@ //! # is_subxt_signer(subxt_signer::sr25519::dev::alice()); //! # is_subxt_signer(subxt_signer::ecdsa::dev::alice()); //! # is_subxt_signer(PairSigner::::new(sp_keyring::AccountKeyring::Alice.pair())); +//! # } //! ``` //! -//! See the `subxt_signer` crate or the [`sp_core::Pair`] docs for more ways to construct +//! See the `subxt_signer` crate or the `sp_core::Pair` docs for more ways to construct //! and work with key pairs. //! //! If this isn't suitable/available, you can either implement [`crate::tx::Signer`] yourself to use diff --git a/subxt/src/tx/signer.rs b/subxt/src/tx/signer.rs index 487df6af72..b007cbb256 100644 --- a/subxt/src/tx/signer.rs +++ b/subxt/src/tx/signer.rs @@ -50,7 +50,7 @@ mod pair_signer { where T: Config, Pair: PairT, - // We go via an sp_runtime::MultiSignature. We can probably generalise this + // We go via an `sp_runtime::MultiSignature`. We can probably generalise this // by implementing some of these traits on our built-in MultiSignature and then // requiring them on all T::Signatures, to avoid any go-between. ::Signer: From, From 560432b92b863e89c073ea0f80b166ff18593e7e Mon Sep 17 00:00:00 2001 From: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Date: Mon, 24 Jul 2023 17:18:55 +0300 Subject: [PATCH 2/6] chainHead: Adjust `chainHead_storage` api (#1087) * types: Add storage ChainHeadStorageEvent Signed-off-by: Alexandru Vasile * rpc: Keep up with the spec for chainHead_storage Signed-off-by: Alexandru Vasile * testing: Adjust the chainHead_storage Signed-off-by: Alexandru Vasile * rpc: Fix types typo Signed-off-by: Alexandru Vasile --------- Signed-off-by: Alexandru Vasile --- subxt/src/rpc/rpc.rs | 16 +++- subxt/src/rpc/types.rs | 81 ++++++++++++++++++- .../src/full_client/client/mod.rs | 23 +++++- 3 files changed, 111 insertions(+), 9 deletions(-) diff --git a/subxt/src/rpc/rpc.rs b/subxt/src/rpc/rpc.rs index cf966b59a0..7e8ddff797 100644 --- a/subxt/src/rpc/rpc.rs +++ b/subxt/src/rpc/rpc.rs @@ -39,7 +39,7 @@ use crate::{error::Error, utils::PhantomDataSendSync, Config, Metadata}; use super::{ rpc_params, - types::{self, ChainHeadEvent, FollowEvent}, + types::{self, ChainHeadEvent, ChainHeadStorageEvent, FollowEvent, StorageQuery}, RpcClient, RpcClientT, Subscription, }; @@ -555,14 +555,22 @@ impl Rpc { &self, subscription_id: String, hash: T::Hash, - key: &[u8], + items: Vec>, child_key: Option<&[u8]>, - ) -> Result>>, Error> { + ) -> Result>>, Error> { + let items: Vec> = items + .into_iter() + .map(|item| StorageQuery { + key: to_hex(item.key), + query_type: item.query_type, + }) + .collect(); + let subscription = self .client .subscribe( "chainHead_unstable_storage", - rpc_params![subscription_id, hash, to_hex(key), child_key.map(to_hex)], + rpc_params![subscription_id, hash, items, child_key.map(to_hex)], "chainHead_unstable_stopStorage", ) .await?; diff --git a/subxt/src/rpc/types.rs b/subxt/src/rpc/types.rs index 9881bcbbb3..d5ded7d634 100644 --- a/subxt/src/rpc/types.rs +++ b/subxt/src/rpc/types.rs @@ -489,7 +489,7 @@ pub struct ChainHeadResult { pub result: T, } -/// The event generated by the body / call / storage methods. +/// The event generated by the body and call methods. #[derive(Debug, Clone, PartialEq, Eq, Deserialize)] #[serde(rename_all = "camelCase")] #[serde(tag = "event")] @@ -728,6 +728,85 @@ mod as_string { } } +/// The storage item received as paramter. +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct StorageQuery { + /// The provided key. + pub key: Key, + /// The type of the storage query. + #[serde(rename = "type")] + pub query_type: StorageQueryType, +} + +/// The type of the storage query. +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "kebab-case")] +pub enum StorageQueryType { + /// Fetch the value of the provided key. + Value, + /// Fetch the hash of the value of the provided key. + Hash, + /// Fetch the closest descendant merkle value. + ClosestDescendantMerkleValue, + /// Fetch the values of all descendants of they provided key. + DescendantsValues, + /// Fetch the hashes of the values of all descendants of they provided key. + DescendantsHashes, +} + +/// The storage result. +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct StorageResult { + /// The hex-encoded key of the result. + pub key: String, + /// The result of the query. + #[serde(flatten)] + pub result: StorageResultType, +} + +/// The type of the storage query. +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "kebab-case")] +pub enum StorageResultType { + /// Fetch the value of the provided key. + Value(T), + /// Fetch the hash of the value of the provided key. + Hash(T), + /// Fetch the closest descendant merkle value. + ClosestDescendantMerkleValue(T), +} + +/// The event generated by storage method. +#[derive(Debug, Clone, PartialEq, Deserialize)] +#[serde(rename_all = "kebab-case")] +#[serde(tag = "event")] +pub enum ChainHeadStorageEvent { + /// The request produced multiple result items. + Items(ItemsEvent), + /// The request produced multiple result items. + WaitForContinue, + /// The request completed successfully and all the results were provided. + Done, + /// The resources requested are inaccessible. + /// + /// Resubmitting the request later might succeed. + Inaccessible, + /// An error occurred. This is definitive. + Error(ErrorEvent), + /// The provided subscription ID is stale or invalid. + Disjoint, +} + +/// The request produced multiple result items. +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct ItemsEvent { + /// The resulting items. + pub items: Vec>, +} + #[cfg(test)] mod test { use super::*; diff --git a/testing/integration-tests/src/full_client/client/mod.rs b/testing/integration-tests/src/full_client/client/mod.rs index 65f9ea4ec1..88c9be6592 100644 --- a/testing/integration-tests/src/full_client/client/mod.rs +++ b/testing/integration-tests/src/full_client/client/mod.rs @@ -12,8 +12,9 @@ use sp_core::storage::well_known_keys; use subxt::{ error::{DispatchError, Error, TokenError}, rpc::types::{ - ChainHeadEvent, DryRunResult, DryRunResultBytes, FollowEvent, Initialized, RuntimeEvent, - RuntimeVersionEvent, + ChainHeadEvent, ChainHeadStorageEvent, DryRunResult, DryRunResultBytes, FollowEvent, + Initialized, RuntimeEvent, RuntimeVersionEvent, StorageQuery, StorageQueryType, + StorageResultType, }, utils::AccountId32, }; @@ -544,14 +545,28 @@ async fn chainhead_unstable_storage() { let addr = node_runtime::storage().system().account(alice); let addr_bytes = api.storage().address_bytes(&addr).unwrap(); + let items = vec![StorageQuery { + key: addr_bytes.as_slice(), + query_type: StorageQueryType::Value, + }]; let mut sub = api .rpc() - .chainhead_unstable_storage(sub_id, hash, &addr_bytes, None) + .chainhead_unstable_storage(sub_id, hash, items, None) .await .unwrap(); let event = sub.next().await.unwrap().unwrap(); - assert_matches!(event, ChainHeadEvent::>::Done(done) if done.result.is_some()); + match event { + ChainHeadStorageEvent::>::Items(event) => { + assert_eq!(event.items.len(), 1); + assert_eq!(event.items[0].key, format!("0x{}", hex::encode(addr_bytes))); + assert_matches!(&event.items[0].result, StorageResultType::Value(value) if value.is_some()); + } + _ => panic!("unexpected ChainHeadStorageEvent"), + }; + + let event = sub.next().await.unwrap().unwrap(); + assert_matches!(event, ChainHeadStorageEvent::>::Done); } #[tokio::test] From 770483d9cdf57f0aa6aa778b29cf0962101bae61 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 24 Jul 2023 15:59:45 +0100 Subject: [PATCH 3/6] Add `LightClient::builder()` (#1088) * Add LightClient::build() * newline * fmt * Tweaks to make LightClient more like OnlineClient in interface --- .gitignore | 1 + .../unstable_light_client_tx_basic.rs | 15 ++-- subxt/src/client/lightclient/builder.rs | 19 +++--- subxt/src/client/lightclient/mod.rs | 68 ++++++++++++++++++- 4 files changed, 81 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index b92643636e..0dde365146 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ cargo-timing* /examples/wasm-example/target /examples/parachain-example/target /examples/parachain-example/metadata/target +.vscode diff --git a/subxt/examples/unstable_light_client_tx_basic.rs b/subxt/examples/unstable_light_client_tx_basic.rs index e6384c5644..750a7c2c7a 100644 --- a/subxt/examples/unstable_light_client_tx_basic.rs +++ b/subxt/examples/unstable_light_client_tx_basic.rs @@ -1,9 +1,5 @@ -use sp_keyring::AccountKeyring; -use subxt::{ - client::{LightClient, LightClientBuilder, OfflineClientT}, - tx::PairSigner, - PolkadotConfig, -}; +use subxt::{client::LightClient, PolkadotConfig}; +use subxt_signer::sr25519::dev; // Generate an interface that we can use from the node's metadata. #[subxt::subxt(runtime_metadata_path = "../artifacts/polkadot_metadata_small.scale")] @@ -11,6 +7,7 @@ pub mod polkadot {} #[tokio::main] async fn main() -> Result<(), Box> { + // The smoldot logs are informative: tracing_subscriber::fmt::init(); // Create a light client by fetching the chain spec of a local running node. @@ -20,7 +17,7 @@ async fn main() -> Result<(), Box> { // The `12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp` is the P2P address // from a local polkadot node starting with // `--node-key 0000000000000000000000000000000000000000000000000000000000000001` - let api: LightClient = LightClientBuilder::new() + let api = LightClient::::builder() .bootnodes([ "/ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp", ]) @@ -28,12 +25,12 @@ async fn main() -> Result<(), Box> { .await?; // Build a balance transfer extrinsic. - let dest = AccountKeyring::Bob.to_account_id().into(); + let dest = dev::bob().public_key().into(); let balance_transfer_tx = polkadot::tx().balances().transfer(dest, 10_000); // Submit the balance transfer extrinsic from Alice, and wait for it to be successful // and in a finalized block. We get back the extrinsic events if all is well. - let from = PairSigner::new(AccountKeyring::Alice.pair()); + let from = dev::alice(); let events = api .tx() .sign_and_submit_then_watch_default(&balance_transfer_tx, &from) diff --git a/subxt/src/client/lightclient/builder.rs b/subxt/src/client/lightclient/builder.rs index 56e3696ffa..51e72c4b60 100644 --- a/subxt/src/client/lightclient/builder.rs +++ b/subxt/src/client/lightclient/builder.rs @@ -12,14 +12,15 @@ use std::sync::Arc; /// Builder for [`LightClient`]. #[derive(Clone, Debug)] -pub struct LightClientBuilder { +pub struct LightClientBuilder { max_pending_requests: NonZeroU32, max_subscriptions: u32, bootnodes: Option>, potential_relay_chains: Option>, + _marker: std::marker::PhantomData, } -impl Default for LightClientBuilder { +impl Default for LightClientBuilder { fn default() -> Self { Self { max_pending_requests: NonZeroU32::new(128) @@ -27,13 +28,14 @@ impl Default for LightClientBuilder { max_subscriptions: 1024, bootnodes: None, potential_relay_chains: None, + _marker: std::marker::PhantomData, } } } -impl LightClientBuilder { +impl LightClientBuilder { /// Create a new [`LightClientBuilder`]. - pub fn new() -> LightClientBuilder { + pub fn new() -> LightClientBuilder { LightClientBuilder::default() } @@ -90,10 +92,7 @@ impl LightClientBuilder { /// /// Panics if being called outside of `tokio` runtime context. #[cfg(feature = "jsonrpsee")] - pub async fn build_from_url>( - self, - url: Url, - ) -> Result, Error> { + pub async fn build_from_url>(self, url: Url) -> Result, Error> { let chain_spec = fetch_url(url.as_ref()).await?; self.build_client(chain_spec).await @@ -120,7 +119,7 @@ impl LightClientBuilder { /// ## Panics /// /// Panics if being called outside of `tokio` runtime context. - pub async fn build(self, chain_spec: &str) -> Result, Error> { + pub async fn build(self, chain_spec: &str) -> Result, Error> { let chain_spec = serde_json::from_str(chain_spec) .map_err(|_| Error::LightClient(LightClientError::InvalidChainSpec))?; @@ -128,7 +127,7 @@ impl LightClientBuilder { } /// Build the light client. - async fn build_client( + async fn build_client( self, mut chain_spec: serde_json::Value, ) -> Result, Error> { diff --git a/subxt/src/client/lightclient/mod.rs b/subxt/src/client/lightclient/mod.rs index c77ffa4fc2..63bb48a0b6 100644 --- a/subxt/src/client/lightclient/mod.rs +++ b/subxt/src/client/lightclient/mod.rs @@ -8,8 +8,14 @@ mod builder; mod rpc; use crate::{ + blocks::BlocksClient, client::{OfflineClientT, OnlineClientT}, config::Config, + constants::ConstantsClient, + events::EventsClient, + runtime_api::RuntimeApiClient, + storage::StorageClient, + tx::TxClient, OnlineClient, }; pub use builder::LightClientBuilder; @@ -49,6 +55,62 @@ pub enum LightClientError { #[derivative(Clone(bound = ""))] pub struct LightClient(OnlineClient); +impl LightClient { + /// Construct a [`LightClient`] using its builder interface. + pub fn builder() -> LightClientBuilder { + LightClientBuilder::new() + } + + // We add the below impls so that we don't need to + // think about importing the OnlineClientT/OfflineClientT + // traits to use these things: + + /// Return the [`crate::Metadata`] used in this client. + fn metadata(&self) -> crate::Metadata { + self.0.metadata() + } + + /// Return the genesis hash. + fn genesis_hash(&self) -> ::Hash { + self.0.genesis_hash() + } + + /// Return the runtime version. + fn runtime_version(&self) -> crate::rpc::types::RuntimeVersion { + self.0.runtime_version() + } + + /// Work with transactions. + pub fn tx(&self) -> TxClient { + >::tx(self) + } + + /// Work with events. + pub fn events(&self) -> EventsClient { + >::events(self) + } + + /// Work with storage. + pub fn storage(&self) -> StorageClient { + >::storage(self) + } + + /// Access constants. + pub fn constants(&self) -> ConstantsClient { + >::constants(self) + } + + /// Work with blocks. + pub fn blocks(&self) -> BlocksClient { + >::blocks(self) + } + + /// Work with runtime API. + pub fn runtime_api(&self) -> RuntimeApiClient { + >::runtime_api(self) + } +} + impl OnlineClientT for LightClient { fn rpc(&self) -> &crate::rpc::Rpc { self.0.rpc() @@ -57,14 +119,14 @@ impl OnlineClientT for LightClient { impl OfflineClientT for LightClient { fn metadata(&self) -> crate::Metadata { - self.0.metadata() + self.metadata() } fn genesis_hash(&self) -> ::Hash { - self.0.genesis_hash() + self.genesis_hash() } fn runtime_version(&self) -> crate::rpc::types::RuntimeVersion { - self.0.runtime_version() + self.runtime_version() } } From e6a703e79f50329a2db7c5ffa95b96652736ad43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 17:37:26 +0200 Subject: [PATCH 4/6] Bump serde_json from 1.0.100 to 1.0.103 (#1086) Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.100 to 1.0.103. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.100...v1.0.103) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: James Wilson --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba18410806..8c0e9b2333 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3425,9 +3425,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.100" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" +checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" dependencies = [ "itoa", "ryu", diff --git a/Cargo.toml b/Cargo.toml index 7ad456e3e3..0e0635cf68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,7 +67,7 @@ scale-bits = "0.3" scale-decode = "0.7.0" scale-encode = "0.3.0" serde = { version = "1.0.171" } -serde_json = { version = "1.0.100" } +serde_json = { version = "1.0.103" } syn = { version = "2.0.15", features = ["full", "extra-traits"] } thiserror = "1.0.40" tokio = { version = "1.29", default-features = false } From c66cbe736cf4a1452e20b1f788b22701d628ea65 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 24 Jul 2023 17:01:49 +0100 Subject: [PATCH 5/6] Prep for 0.30 release (#1089) --- CHANGELOG.md | 151 +++++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.lock | 22 ++++---- Cargo.toml | 14 ++--- 3 files changed, 169 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30d0f0e880..c117c05c03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,157 @@ 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.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: + +```rust +use subxt::{ + client::{LightClient, LightClientBuilder}, + PolkadotConfig +}; +use subxt_signer::sr25519::dev; + +// Create a light client: +let api = LightClient::::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: +let dest = dev::bob().public_key().into(); +let balance_transfer_tx = polkadot::tx().balances().transfer(dest, 10_000); +let events = api + .tx() + .sign_and_submit_then_watch_default(&balance_transfer_tx, &dev::alice()) + .await? + .wait_for_finalized_success() + .await?; +``` + +At the moment you may encounter certain things that don't work; please file an issue if you do! + +### V15 Metadata + +This release stabilizes the metadata V15 interface, which brings a few changes but primarily allows you to interact with Runtime APIs via an ergonomic Subxt interface: + +```rust +// We can use the static interface to interact in a type safe way: +#[subxt::subxt(runtime_metadata_path = "path/to/metadata.scale")] +pub mod polkadot {} + +let runtime_call = polkadot::apis() + .metadata() + .metadata_versions(); + +// Or we can use the dynamic interface like so: +use subxt::dynamic::Value; + +let runtime_call = subxt::dynamic::runtime_api_call( + "Metadata", + "metadata_versions", + Vec::>::new() +); +``` + +This is no longer behind a feature flag, but if the chain you're connecting to doesn't use V15 metadata yet then the above will be unavailable. + +### `subxt-signer` + +The new `subxt-signer` crate provides the ability to sign transactions using either sr25519 or ECDSA. It's WASM compatible, and brings in fewer dependencies than using `sp_core`/`sp_keyring` does, while having an easy to use interface. Here's an example of signing a transaction using it: + +```rust +use subxt::{OnlineClient, PolkadotConfig}; +use subxt_signer::sr25519::dev; + +let api = OnlineClient::::new().await?; + +// Build the extrinsic; a transfer to bob: +let dest = dev::bob().public_key().into(); +let balance_transfer_tx = polkadot::tx().balances().transfer(dest, 10_000); + +// Sign and submit the balance transfer extrinsic from Alice: +let from = dev::alice(); +let events = api + .tx() + .sign_and_submit_then_watch_default(&balance_transfer_tx, &from) + .await? + .wait_for_finalized_success() + .await?; +``` + +Dev keys should only be used for tests since they are publicly known. Actual keys can be generated from URIs, phrases or raw entropy, and derived using soft/hard junctions: + +```rust +use subxt_signer::{ SecretUri, sr25519::Keypair }; +use std::str::FromStr; + +// From a phrase (see `bip39` crate on generating phrases): +let phrase = bip39::Mnemonic::parse(phrase).unwrap(); +let keypair = Keypair::from_phrase(&phrase, Some("Password")).unwrap(); + +// Or from a URI: +let uri = SecretUri::from_str("//Alice").unwrap(); +let keypair = Keypair::from_uri(&uri).unwrap(); + +// Deriving a new key from an existing one: +let keypair = keypair.derive([ + DeriveJunction::hard("Alice"), + DeriveJunction::soft("stash") +]); +``` + +### Breaking changes + +A few small breaking changes have occurred: + +- There is no longer a need for an `Index` associated type in your `Config` implementations; we now work it out dynamically where needed. +- The "substrate-compat" feature flag is no longer enabled by default. `subxt-signer` added native signing support and can be used instead of bringing in Substrate dependencies to sign transactions now. You can still enable this feature flag as before to make use of them if needed. + - **Note:** Be aware that Substrate crates haven't been published in a while and have fallen out of date, though. This will be addressed eventually, and when it is we can bring the Substrate crates back uptodate here. + +For anything else that crops up, the compile errors and API docs will hopefully point you in the right direction, but please raise an issue if not. + +For a full list of changes, see below: + +### Added + +- Example: How to connect to parachain ([#1043](https://github.com/paritytech/subxt/pull/1043)) +- ECDSA Support in signer ([#1064](https://github.com/paritytech/subxt/pull/1064)) +- Add `subxt_signer` crate for native & WASM compatible signing ([#1016](https://github.com/paritytech/subxt/pull/1016)) +- Add light client platform WASM compatible ([#1026](https://github.com/paritytech/subxt/pull/1026)) +- light-client: Add experimental light-client support ([#965](https://github.com/paritytech/subxt/pull/965)) +- Add `diff` command to CLI tool to visualize metadata changes ([#1015](https://github.com/paritytech/subxt/pull/1015)) +- CLI: Allow output to be written to file ([#1018](https://github.com/paritytech/subxt/pull/1018)) + +### Changed + +- Remove `substrate-compat` default feature flag ([#1078](https://github.com/paritytech/subxt/pull/1078)) +- runtime API: Substitute `UncheckedExtrinsic` with custom encoding ([#1076](https://github.com/paritytech/subxt/pull/1076)) +- Remove `Index` type from Config trait ([#1074](https://github.com/paritytech/subxt/pull/1074)) +- Utilize Metadata V15 ([#1041](https://github.com/paritytech/subxt/pull/1041)) +- chain_getBlock extrinsics encoding ([#1024](https://github.com/paritytech/subxt/pull/1024)) +- Make tx payload details public ([#1014](https://github.com/paritytech/subxt/pull/1014)) +- CLI tool tests ([#977](https://github.com/paritytech/subxt/pull/977)) +- Support NonZero numbers ([#1012](https://github.com/paritytech/subxt/pull/1012)) +- Get account nonce via state_call ([#1002](https://github.com/paritytech/subxt/pull/1002)) +- add `#[allow(rustdoc::broken_intra_doc_links)]` to subxt-codegen ([#998](https://github.com/paritytech/subxt/pull/998)) + +### Fixed + +- remove parens in hex output for CLI tool ([#1017](https://github.com/paritytech/subxt/pull/1017)) +- Prevent bugs when reusing type ids in hashing ([#1075](https://github.com/paritytech/subxt/pull/1075)) +- Fix invalid generation of types with >1 generic parameters ([#1023](https://github.com/paritytech/subxt/pull/1023)) +- Fix jsonrpsee web features ([#1025](https://github.com/paritytech/subxt/pull/1025)) +- Fix codegen validation when Runtime APIs are stripped ([#1000](https://github.com/paritytech/subxt/pull/1000)) +- Fix hyperlink ([#994](https://github.com/paritytech/subxt/pull/994)) +- Remove invalid redundant clone warning ([#996](https://github.com/paritytech/subxt/pull/996)) + ## [0.29.0] - 2023-06-01 This is another big release for Subxt with a bunch of awesome changes. Let's talk about some of the notable ones: diff --git a/Cargo.lock b/Cargo.lock index 8c0e9b2333..5d88f2cf1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1954,7 +1954,7 @@ dependencies = [ [[package]] name = "integration-tests" -version = "0.29.0" +version = "0.30.0" dependencies = [ "assert_matches", "frame-metadata 16.0.0", @@ -4150,7 +4150,7 @@ dependencies = [ [[package]] name = "substrate-runner" -version = "0.29.0" +version = "0.30.0" [[package]] name = "subtle" @@ -4166,7 +4166,7 @@ checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" [[package]] name = "subxt" -version = "0.29.0" +version = "0.30.0" dependencies = [ "assert_matches", "base58", @@ -4207,7 +4207,7 @@ dependencies = [ [[package]] name = "subxt-cli" -version = "0.29.0" +version = "0.30.0" dependencies = [ "clap 4.3.11", "color-eyre", @@ -4228,7 +4228,7 @@ dependencies = [ [[package]] name = "subxt-codegen" -version = "0.29.0" +version = "0.30.0" dependencies = [ "bitvec", "frame-metadata 16.0.0", @@ -4248,7 +4248,7 @@ dependencies = [ [[package]] name = "subxt-lightclient" -version = "0.29.0" +version = "0.30.0" dependencies = [ "either", "futures", @@ -4274,7 +4274,7 @@ dependencies = [ [[package]] name = "subxt-macro" -version = "0.29.0" +version = "0.30.0" dependencies = [ "darling 0.20.1", "proc-macro-error", @@ -4284,7 +4284,7 @@ dependencies = [ [[package]] name = "subxt-metadata" -version = "0.29.0" +version = "0.30.0" dependencies = [ "assert_matches", "bitvec", @@ -4298,7 +4298,7 @@ dependencies = [ [[package]] name = "subxt-signer" -version = "0.29.0" +version = "0.30.0" dependencies = [ "bip39", "getrandom 0.2.10", @@ -4364,7 +4364,7 @@ dependencies = [ [[package]] name = "test-runtime" -version = "0.29.0" +version = "0.30.0" dependencies = [ "hex", "impl-serde", @@ -4738,7 +4738,7 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ui-tests" -version = "0.29.0" +version = "0.30.0" dependencies = [ "frame-metadata 16.0.0", "parity-scale-codec", diff --git a/Cargo.toml b/Cargo.toml index 0e0635cf68..ea21d9af17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ resolver = "2" [workspace.package] authors = ["Parity Technologies "] edition = "2021" -version = "0.29.0" +version = "0.30.0" rust-version = "1.64.0" license = "Apache-2.0 OR GPL-3.0" repository = "https://github.com/paritytech/subxt" @@ -103,12 +103,12 @@ sp-keyring = "24.0.0" sp-version = "22.0.0" # Subxt workspace crates: -subxt = { version = "0.29.0", path = "subxt", default-features = false } -subxt-macro = { version = "0.29.0", path = "macro" } -subxt-metadata = { version = "0.29.0", path = "metadata" } -subxt-codegen = { version = "0.29.0", path = "codegen" } -subxt-signer = { version = "0.29.0", path = "signer" } -subxt-lightclient = { version = "0.29.0", path = "lightclient", default-features = false } +subxt = { version = "0.30.0", path = "subxt", default-features = false } +subxt-macro = { version = "0.30.0", path = "macro" } +subxt-metadata = { version = "0.30.0", path = "metadata" } +subxt-codegen = { version = "0.30.0", path = "codegen" } +subxt-signer = { version = "0.30.0", path = "signer" } +subxt-lightclient = { version = "0.30.0", path = "lightclient", default-features = false } test-runtime = { path = "testing/test-runtime" } substrate-runner = { path = "testing/substrate-runner" } From 44b1690170cab9a77e920a8bd713e247ddaf6254 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 24 Jul 2023 17:51:12 +0100 Subject: [PATCH 6/6] Fixes to make release work (#1090) --- Cargo.lock | 468 +++++++++++++++++++++++++---------------------- RELEASING.md | 1 + subxt/Cargo.toml | 2 +- 3 files changed, 253 insertions(+), 218 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5d88f2cf1f..172f7de917 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,6 +21,15 @@ dependencies = [ "gimli", ] +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", +] + [[package]] name = "adler" version = "1.0.2" @@ -141,15 +150,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" dependencies = [ "utf8parse", ] @@ -175,9 +184,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" [[package]] name = "array-bytes" @@ -220,9 +229,9 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", "event-listener", @@ -269,7 +278,7 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.20", + "rustix 0.37.23", "slab", "socket2", "waker-fn", @@ -309,7 +318,7 @@ dependencies = [ "cfg-if", "event-listener", "futures-lite", - "rustix 0.37.20", + "rustix 0.37.23", "signal-hook", "windows-sys 0.48.0", ] @@ -322,13 +331,13 @@ checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -362,16 +371,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ - "addr2line", + "addr2line 0.20.0", "cc", "cfg-if", "libc", "miniz_oxide", - "object", + "object 0.31.1", "rustc-demangle", ] @@ -395,9 +404,9 @@ checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] name = "basic-toml" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c0de75129aa8d0cceaf750b89013f0e08804d6ec61416da787b35ad0d7cddf1" +checksum = "7bfc506e7a2370ec239e1d072507b2a80c833083699d3c6fa176fbb4de8448c6" dependencies = [ "serde", ] @@ -443,6 +452,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + [[package]] name = "bitvec" version = "1.0.1" @@ -693,17 +708,17 @@ version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ - "bitflags", + "bitflags 1.3.2", "clap_lex 0.2.4", - "indexmap", + "indexmap 1.9.3", "textwrap", ] [[package]] name = "clap" -version = "4.3.11" +version = "4.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1640e5cc7fb47dbb8338fd471b105e7ed6c3cb2aeb00c2e067127ffd3764a05d" +checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" dependencies = [ "clap_builder", "clap_derive", @@ -712,9 +727,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.11" +version = "4.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c59138d527eeaf9b53f35a77fcc1fad9d883116070c63d5de1c7dc7b00c72b" +checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" dependencies = [ "anstream", "anstyle", @@ -725,14 +740,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.2" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -846,9 +861,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -1070,12 +1085,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ - "darling_core 0.20.1", - "darling_macro 0.20.1", + "darling_core 0.20.3", + "darling_macro 0.20.3", ] [[package]] @@ -1094,16 +1109,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -1119,13 +1134,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ - "darling_core 0.20.1", + "darling_core 0.20.3", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -1216,9 +1231,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" [[package]] name = "ed25519" @@ -1257,9 +1272,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "environmental" @@ -1267,6 +1282,12 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" version = "0.3.1" @@ -1459,7 +1480,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -1562,7 +1583,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ "fallible-iterator", - "indexmap", + "indexmap 1.9.3", "stable_deref_trait", ] @@ -1625,9 +1646,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -1635,7 +1656,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -1707,18 +1728,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -1802,9 +1814,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -1925,6 +1937,16 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + [[package]] name = "indexmap-nostd" version = "0.4.0" @@ -1970,7 +1992,7 @@ dependencies = [ "subxt-codegen", "subxt-metadata", "subxt-signer", - "syn 2.0.25", + "syn 2.0.27", "test-runtime", "tokio", "tracing", @@ -1991,20 +2013,19 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.2", "libc", "windows-sys 0.48.0", ] [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix 0.37.20", + "hermit-abi 0.3.2", + "rustix 0.38.4", "windows-sys 0.48.0", ] @@ -2019,9 +2040,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" @@ -2143,9 +2164,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.146" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libm" @@ -2219,6 +2240,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" + [[package]] name = "lock_api" version = "0.4.10" @@ -2237,9 +2264,9 @@ checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "lru" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03f1160296536f10c833a82dca22267d5486734230d47bf00bf435885814ba1e" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" [[package]] name = "mach" @@ -2271,7 +2298,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.37.20", + "rustix 0.37.23", ] [[package]] @@ -2333,9 +2360,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] @@ -2434,20 +2461,20 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] @@ -2459,7 +2486,16 @@ checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "crc32fast", "hashbrown 0.13.2", - "indexmap", + "indexmap 1.9.3", + "memchr", +] + +[[package]] +name = "object" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +dependencies = [ "memchr", ] @@ -2523,9 +2559,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.1" +version = "3.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2287753623c76f953acd29d15d8100bcab84d29db78fb6f352adb3c53e83b967" +checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -2538,9 +2574,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.1" +version = "3.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b6937b5e67bfba3351b87b040d48352a2fcb6ad72f81855412ce97b45c8f110" +checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2580,14 +2616,14 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" @@ -2624,29 +2660,29 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -2695,7 +2731,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", - "bitflags", + "bitflags 1.3.2", "cfg-if", "concurrent-queue", "libc", @@ -2810,9 +2846,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.31" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] @@ -2922,27 +2958,27 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] name = "ref-cast" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" +checksum = "61ef7e18e8841942ddb1cf845054f8008410030a3997875d9e49b7a363063df1" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" +checksum = "2dfaf0c85b766276c797f3791f5bc6d5bd116b41d53049af2789666b0c0bc9fa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -2953,8 +2989,8 @@ checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.2", - "regex-syntax 0.7.3", + "regex-automata 0.3.3", + "regex-syntax 0.7.4", ] [[package]] @@ -2968,13 +3004,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83d3daa6976cffb758ec878f108ba0e062a45b2d6ca3a2cca965338855476caf" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.3", + "regex-syntax 0.7.4", ] [[package]] @@ -2985,9 +3021,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "ring" @@ -3033,11 +3069,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.14" +version = "0.36.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e4d67015953998ad0eb82887a0eb0129e18a7e2f3b7b0f6c422fddcd503d62" +checksum = "c37f1bd5ef1b5422177b7646cba67430579cfe2ace80f284fee876bca52ad941" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -3047,11 +3083,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.20" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -3059,6 +3095,19 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "rustix" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys 0.4.3", + "windows-sys 0.48.0", +] + [[package]] name = "rustls" version = "0.20.8" @@ -3085,18 +3134,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ "base64 0.21.2", ] [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ruzstd" @@ -3111,9 +3160,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -3239,11 +3288,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -3294,9 +3343,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -3355,11 +3404,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -3368,9 +3417,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -3378,9 +3427,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "send_wrapper" @@ -3396,31 +3445,31 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.171" +version = "1.0.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" +checksum = "5d25439cd7397d044e2748a6fe2432b5e85db703d6d097bd014b3c0ad1ebff0b" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.9" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.171" +version = "1.0.175" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +checksum = "b23f7ade6f110613c0d63858ddb8b94c1041f550eab58a16b371bdf2c9c80ab4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -3504,9 +3553,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ "libc", "signal-hook-registry", @@ -3544,9 +3593,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "smol" @@ -3723,7 +3772,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f18d9e2f67d8661f9729f35347069ac29d92758b59135176799db966947a7336" dependencies = [ "array-bytes", - "bitflags", + "bitflags 1.3.2", "blake2", "bounded-collections", "bs58 0.4.0", @@ -3785,7 +3834,7 @@ dependencies = [ "proc-macro2", "quote", "sp-core-hashing", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -3796,7 +3845,7 @@ checksum = "c7f531814d2f16995144c74428830ccf7d94ff4a7749632b83ad8199b181140c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -3927,7 +3976,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -4035,7 +4084,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -4082,9 +4131,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "ss58-registry" -version = "1.40.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47a8ad42e5fc72d5b1eb104a5546937eaf39843499948bb666d6e93c62423b" +checksum = "bfc443bad666016e012538782d9e3006213a7db43e9fb1dda91657dc06a6fa08" dependencies = [ "Inflector", "num-format", @@ -4209,7 +4258,7 @@ dependencies = [ name = "subxt-cli" version = "0.30.0" dependencies = [ - "clap 4.3.11", + "clap 4.3.19", "color-eyre", "frame-metadata 16.0.0", "hex", @@ -4222,7 +4271,7 @@ dependencies = [ "subxt", "subxt-codegen", "subxt-metadata", - "syn 2.0.25", + "syn 2.0.27", "tokio", ] @@ -4241,7 +4290,7 @@ dependencies = [ "quote", "scale-info", "subxt-metadata", - "syn 2.0.25", + "syn 2.0.27", "thiserror", "tokio", ] @@ -4276,10 +4325,10 @@ dependencies = [ name = "subxt-macro" version = "0.30.0" dependencies = [ - "darling 0.20.1", + "darling 0.20.3", "proc-macro-error", "subxt-codegen", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -4332,9 +4381,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.25" +version = "2.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" +checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" dependencies = [ "proc-macro2", "quote", @@ -4349,9 +4398,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.7" +version = "0.12.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" +checksum = "1d2faeef5759ab89935255b1a4cd98e0baf99d1085e37d36599c625dac49ae8e" [[package]] name = "termcolor" @@ -4385,9 +4434,9 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] @@ -4414,13 +4463,13 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -4512,7 +4561,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -4554,17 +4603,17 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" [[package]] name = "toml_edit" -version = "0.19.10" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap", + "indexmap 2.0.0", "toml_datetime", "winnow", ] @@ -4589,13 +4638,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.25" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8803eee176538f94ae9a14b55b2804eb7e1441f8210b1c31290b3bccdccff73b" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] [[package]] @@ -4705,9 +4754,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "trybuild" -version = "1.0.81" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04366e99ff743345622cd00af2af01d711dc2d1ef59250d7347698d21b546729" +checksum = "a84e0202ea606ba5ebee8507ab2bfbe89b98551ed9b8f0be198109275cff284b" dependencies = [ "basic-toml", "glob 0.3.1", @@ -4768,9 +4817,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -4913,7 +4962,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", "wasm-bindgen-shared", ] @@ -4947,7 +4996,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4996,7 +5045,7 @@ version = "0.102.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" dependencies = [ - "indexmap", + "indexmap 1.9.3", "url", ] @@ -5018,10 +5067,10 @@ dependencies = [ "anyhow", "bincode", "cfg-if", - "indexmap", + "indexmap 1.9.3", "libc", "log", - "object", + "object 0.30.4", "once_cell", "paste", "psm", @@ -5052,9 +5101,9 @@ dependencies = [ "anyhow", "cranelift-entity", "gimli", - "indexmap", + "indexmap 1.9.3", "log", - "object", + "object 0.30.4", "serde", "target-lexicon", "thiserror", @@ -5068,14 +5117,14 @@ version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" dependencies = [ - "addr2line", + "addr2line 0.19.0", "anyhow", "bincode", "cfg-if", "cpp_demangle", "gimli", "log", - "object", + "object 0.30.4", "rustc-demangle", "serde", "target-lexicon", @@ -5114,7 +5163,7 @@ dependencies = [ "anyhow", "cc", "cfg-if", - "indexmap", + "indexmap 1.9.3", "libc", "log", "mach", @@ -5122,7 +5171,7 @@ dependencies = [ "memoffset 0.8.0", "paste", "rand 0.8.5", - "rustix 0.36.14", + "rustix 0.36.15", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -5218,22 +5267,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "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", + "windows-targets 0.48.1", ] [[package]] @@ -5251,7 +5285,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] @@ -5271,9 +5305,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm 0.48.0", "windows_aarch64_msvc 0.48.0", @@ -5370,9 +5404,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.7" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448" +checksum = "81fac9742fd1ad1bd9643b991319f72dd031016d44b77039a26977eb667141e7" dependencies = [ "memchr", ] @@ -5415,5 +5449,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.27", ] diff --git a/RELEASING.md b/RELEASING.md index e8d4b8d138..c70d5170fc 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -73,6 +73,7 @@ We also assume that ongoing work done is being merged directly to the `master` b ``` (cd metadata && cargo publish) && \ + (cd lightclient && cargo publish) && \ (cd codegen && cargo publish) && \ (cd macro && cargo publish) && \ (cd subxt && cargo publish) && \ diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 5165254a54..53d586318f 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -116,7 +116,7 @@ sp-runtime = { workspace = true } sp-keyring = { workspace = true } sp-version = { workspace = true } assert_matches = { workspace = true } -subxt-signer = { workspace = true, features = ["subxt"] } +subxt-signer = { path = "../signer", features = ["subxt"] } # Tracing subscriber is useful for light-client examples to ensure that # the `bootNodes` and chain spec are configured correctly. If all is fine, then # the light-client wlll emit INFO logs with