From a9673c7a70996a05ee708bb5e24dd8a9ec125f4b Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 13 Sep 2023 16:49:59 +1000 Subject: [PATCH 01/98] improve metadata docs --- .../frame/support/src/traits/metadata.rs | 52 ++++++++++++------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/substrate/frame/support/src/traits/metadata.rs b/substrate/frame/support/src/traits/metadata.rs index 85d8f9a5a74e..64245ed1d3cc 100644 --- a/substrate/frame/support/src/traits/metadata.rs +++ b/substrate/frame/support/src/traits/metadata.rs @@ -240,41 +240,53 @@ impl Add for StorageVersion { } } -/// Special marker struct if no storage version is set for a pallet. +/// Special marker struct used when [`storage_version`](crate::pallet_macros::storage_version) is +/// not defined for a pallet. /// /// If you (the reader) end up here, it probably means that you tried to compare /// [`GetStorageVersion::on_chain_storage_version`] against /// [`GetStorageVersion::current_storage_version`]. This basically means that the -/// [`storage_version`](crate::pallet_macros::storage_version) is missing in the pallet where the -/// mentioned functions are being called. +/// [`storage_version`](crate::pallet_macros::storage_version) is missing from the pallet where the +/// mentioned functions are being called, and needs to be defined. #[derive(Debug, Default)] pub struct NoStorageVersionSet; -/// Provides information about the storage version of a pallet. +/// Provides information about a pallet's storage versions. /// -/// It differentiates between current and on-chain storage version. Both should be only out of sync -/// when a new runtime upgrade was applied and the runtime migrations did not yet executed. -/// Otherwise it means that the pallet works with an unsupported storage version and unforeseen -/// stuff can happen. +/// Every pallet has two storage versions: +/// 1. An current storage version +/// 2. An on-chain storage version /// -/// The current storage version is the version of the pallet as supported at runtime. The active -/// storage version is the version of the pallet in the storage. +/// The current storage version is the version of the pallet as defined in the local development +/// environment, and the on-chain storage version is the version of the pallet actually deployed +/// on-chain. /// -/// It is required to update the on-chain storage version manually when a migration was applied. +/// Storage versions should be only ever be out of sync when a migration has been written locally +/// which increments the current version of a pallet, but the migration has not yet been executed +/// on-chain as part of a runtime upgrade. +/// +/// It is the responsibility of the developer to ensure that the on-chain storage version is set +/// correctly during a migration so that it matches the current storage version. pub trait GetStorageVersion { - /// This will be filled out by the [`pallet`](crate::pallet) macro. + /// This type is generated by the [`pallet`](crate::pallet) macro. + /// + /// If the [`storage_version`](crate::pallet_macros::storage_version) attribute isn't specified, + /// this is set to [`NoStorageVersionSet`] to signify that it is missing. + /// + /// If the [`storage_version`](crate::pallet_macros::storage_version) attribute is specified, + /// this is be set to a [`StorageVersion`] corresponding to the attribute. /// - /// If the [`storage_version`](crate::pallet_macros::storage_version) attribute isn't given - /// this is set to [`NoStorageVersionSet`] to inform the user that the attribute is missing. - /// This should prevent that the user forgets to set a storage version when required. However, - /// this will only work when the user actually tries to call [`Self::current_storage_version`] - /// to compare it against the [`Self::on_chain_storage_version`]. If the attribute is given, - /// this will be set to [`StorageVersion`]. + /// The intention of using [`NoStorageVersionSet`] instead of defaulting to a [`StorageVersion`] + /// of zero is to prevent developers from forgetting to set + /// [`storage_version`](crate::pallet_macros::storage_version) when it is required, like in the + /// case that they wish to compare the current storage version to the on-chain storage version. type CurrentStorageVersion; - /// Returns the current storage version as supported by the pallet. + /// Returns the current storage version as specified in the + /// [`storage_version`](crate::pallet_macros::storage_version) attribute, or + /// [`NoStorageVersionSet`] if the attribute is missing. fn current_storage_version() -> Self::CurrentStorageVersion; - /// Returns the on-chain storage version of the pallet as stored in the storage. + /// Returns the storage version of the pallet as last set in the actual on-chain storage. fn on_chain_storage_version() -> StorageVersion; } From e22a2e23991ce2fec440e2eec032a01f66e1b555 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 13 Sep 2023 16:50:26 +1000 Subject: [PATCH 02/98] improve hooks docs --- substrate/frame/support/src/traits/hooks.rs | 66 ++++++++++++--------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/substrate/frame/support/src/traits/hooks.rs b/substrate/frame/support/src/traits/hooks.rs index 6acecb8928d8..22ab69ae7cad 100644 --- a/substrate/frame/support/src/traits/hooks.rs +++ b/substrate/frame/support/src/traits/hooks.rs @@ -90,7 +90,7 @@ impl OnIdle for Tuple { /// /// Implementing this trait for a pallet let's you express operations that should /// happen at genesis. It will be called in an externalities provided environment and -/// will see the genesis state after all pallets have written their genesis state. +/// will set the genesis state root after all pallets have written their genesis state. #[cfg_attr(all(not(feature = "tuples-96"), not(feature = "tuples-128")), impl_for_tuples(64))] #[cfg_attr(all(feature = "tuples-96", not(feature = "tuples-128")), impl_for_tuples(96))] #[cfg_attr(feature = "tuples-128", impl_for_tuples(128))] @@ -279,19 +279,23 @@ pub trait IntegrityTest { /// end /// ``` /// -/// * `OnRuntimeUpgrade` is only executed before everything else if a code -/// * `OnRuntimeUpgrade` is mandatorily at the beginning of the block body (extrinsics) being -/// processed. change is detected. -/// * Extrinsics start with inherents, and continue with other signed or unsigned extrinsics. -/// * `OnIdle` optionally comes after extrinsics. -/// `OnFinalize` mandatorily comes after `OnIdle`. +/// * [`OnRuntimeUpgrade`](Hooks::OnRuntimeUpgrade) hooks are only executed when a code change is +/// detected. +/// * [`OnRuntimeUpgrade`](Hooks::OnRuntimeUpgrade) hooks are mandatorily executed at the very +/// beginning of the block body, before any extrinsics are processed. +/// * [`Inherents`](sp_inherents) are always executed before any other other signed or unsigned +/// extrinsics. +/// * [`OnIdle`](Hooks::OnIdle) hooks are executed after extrinsics if there is weight remaining in +/// the block. +/// * [`OnFinalize`](Hooks::OnFinalize) hooks are mandatorily executed after +/// [`OnIdle`](Hooks::OnIdle). /// -/// > `OffchainWorker` is not part of this flow, as it is not really part of the consensus/main -/// > block import path, and is called optionally, and in other circumstances. See -/// > [`crate::traits::misc::OffchainWorker`] for more information. +/// > [`OffchainWorker`](crate::traits::misc::OffchainWorker) hooks are not part of this flow, +/// > because they are not part of the consensus/main block building logic. See +/// > [`OffchainWorker`](crate::traits::misc::OffchainWorker) for more information. /// -/// To learn more about the execution of hooks see `frame-executive` as this component is is charge -/// of dispatching extrinsics and placing the hooks in the correct order. +/// To learn more about the execution of hooks see the FRAME [`Executive`](frame_executive) pallet +/// which is in charge of dispatching extrinsics and calling hooks in the correct order. pub trait Hooks { /// Block initialization hook. This is called at the very beginning of block execution. /// @@ -343,30 +347,36 @@ pub trait Hooks { Weight::zero() } - /// Hook executed when a code change (aka. a "runtime upgrade") is detected by FRAME. + /// Hook executed when a code change (aka. a "runtime upgrade") is detected by the + /// [`Executive`](frame_executive) pallet. /// /// Be aware that this is called before [`Hooks::on_initialize`] of any pallet; therefore, a lot /// of the critical storage items such as `block_number` in system pallet might have not been - /// set. + /// set yet. /// - /// Vert similar to [`Hooks::on_initialize`], any code in this block is mandatory and MUST - /// execute. Use with care. + /// Similar to [`Hooks::on_initialize`], any code in this block is mandatory and MUST execute. + /// It is strongly recommended to dry-run the execution of these hooks using + /// [try-runtime-cli](https://github.com/paritytech/try-runtime-cli) to ensure they will not + /// produce and overweight block which can brick your chain. Use with care! /// - /// ## Implementation Note: Versioning + /// ## Implementation Note: Standalone Migrations /// - /// 1. An implementation of this should typically follow a pattern where the version of the - /// pallet is checked against the onchain version, and a decision is made about what needs to be - /// done. This is helpful to prevent accidental repetitive execution of this hook, which can be - /// catastrophic. - /// - /// Alternatively, [`frame_support::migrations::VersionedMigration`] can be used to assist with - /// this. - /// - /// ## Implementation Note: Runtime Level Migration + /// An increasingly common way to define migrations is /// /// Additional "upgrade hooks" can be created by pallets by a manual implementation of /// [`Hooks::on_runtime_upgrade`] which can be passed on to `Executive` at the top level /// runtime. + /// + /// ## Implementation Note: Pallet Versioning + /// + /// Implementations of this hook are typically wrapped in + /// [`crate::migrations::VersionedMigration`] to ensure the migration is executed exactly + /// once and only when it is supposed to. + /// + /// Alternatively, developers can manually implement version checks. + /// + /// Failure to adequately check storage versions can result in accidental repetitive execution + /// of the hook, which can be catastrophic. fn on_runtime_upgrade() -> Weight { Weight::zero() } @@ -376,7 +386,7 @@ pub trait Hooks { /// It should focus on certain checks to ensure that the state is sensible. This is never /// executed in a consensus code-path, therefore it can consume as much weight as it needs. /// - /// This hook should not alter any storage. + /// This hook must not alter any storage. #[cfg(feature = "try-runtime")] fn try_state(_n: BlockNumber) -> Result<(), TryRuntimeError> { Ok(()) @@ -388,7 +398,7 @@ pub trait Hooks { /// which will be passed to `post_upgrade` after upgrading for post-check. An empty vector /// should be returned if there is no such need. /// - /// This hook is never meant to be executed on-chain but is meant to be used by testing tools. + /// This hook is never executed on-chain but instead used by testing tools. #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, TryRuntimeError> { Ok(Vec::new()) From c6a6984570da815f1b6d2d28d6f141bca8d5f48c Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 13 Sep 2023 16:50:40 +1000 Subject: [PATCH 03/98] add storage_alias docs --- substrate/frame/support/procedural/src/lib.rs | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/substrate/frame/support/procedural/src/lib.rs b/substrate/frame/support/procedural/src/lib.rs index 9957cf1cff85..9032630a01c8 100644 --- a/substrate/frame/support/procedural/src/lib.rs +++ b/substrate/frame/support/procedural/src/lib.rs @@ -546,6 +546,42 @@ pub fn __create_tt_macro(input: TokenStream) -> TokenStream { tt_macro::create_tt_return_macro(input) } +/// Allows accessing on-chain pallet storage that is no longer accessible via the pallet. +/// +/// This is especially useful when writing storage migraitons, when types of storage items are +/// modified or outright removed, but the previous definition is required to perform the migration. +/// +/// ## Example +/// +/// Imagine a pallet with the following storage definition: +/// ```ignore +/// #[pallet::storage] +/// pub type Value = StorageValue<_, u32>; +/// ``` +/// `Value` can be accessed by calling `Value::::get()`. +/// +/// Now imagine the defintiion of `Value` is updated to a `(u32, u32)`: +/// ```ignore +/// #[pallet::storage] +/// pub type Value = StorageValue<_, (u32, u32)>; +/// ``` +/// The on-chain value of `Value` is `u32`, but `Value::::get()` expects it to be `(u32, u32)`. +/// +/// In this instance the developer must write a storage migration to reading the old value of +/// `Value` and writing it back to storage in the new format, so that the on-chain storage layout is +/// consistent with what is defined in the pallet. +/// +/// We can read the old value of `Value` in the migration by creating a `storage_alias`: +/// ```ignore +/// pub(crate) mod old { +/// use super::*; +/// +/// #[storage_alias] +/// pub type Value = StorageValue, u32>; +/// } +/// ``` +/// +/// The developer can now access the old value of `Value` by calling `old::Value::::get()`. #[proc_macro_attribute] pub fn storage_alias(attributes: TokenStream, input: TokenStream) -> TokenStream { storage_alias::storage_alias(attributes.into(), input.into()) From b617ce9219b1f54369fcadfc5283f0c56e562ee7 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 13 Sep 2023 16:57:11 +1000 Subject: [PATCH 04/98] wip: storage migrations example pallet --- Cargo.lock | 19 ++ Cargo.toml | 1 + substrate/frame/examples/Cargo.toml | 1 + substrate/frame/examples/src/lib.rs | 3 + .../examples/storage-migrations/Cargo.toml | 55 +++++ .../examples/storage-migrations/src/lib.rs | 210 ++++++++++++++++++ .../storage-migrations/src/migrations/mod.rs | 1 + .../storage-migrations/src/migrations/v1.rs | 109 +++++++++ 8 files changed, 399 insertions(+) create mode 100644 substrate/frame/examples/storage-migrations/Cargo.toml create mode 100644 substrate/frame/examples/storage-migrations/src/lib.rs create mode 100644 substrate/frame/examples/storage-migrations/src/migrations/mod.rs create mode 100644 substrate/frame/examples/storage-migrations/src/migrations/v1.rs diff --git a/Cargo.lock b/Cargo.lock index 3ba7edafbda1..9ef0239009ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9613,6 +9613,24 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-example-storage-migrations" +version = "4.0.0-dev" +dependencies = [ + "docify", + "frame-executive", + "frame-support", + "frame-system", + "frame-try-runtime", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-examples" version = "4.0.0-dev" @@ -9623,6 +9641,7 @@ dependencies = [ "pallet-example-kitchensink", "pallet-example-offchain-worker", "pallet-example-split", + "pallet-example-storage-migrations", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 8a9c2afe1d1b..50e5d0ad8fa6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -294,6 +294,7 @@ members = [ "substrate/frame/examples/kitchensink", "substrate/frame/examples/offchain-worker", "substrate/frame/examples/split", + "substrate/frame/examples/storage-migrations", "substrate/frame/executive", "substrate/frame/fast-unstake", "substrate/frame/glutton", diff --git a/substrate/frame/examples/Cargo.toml b/substrate/frame/examples/Cargo.toml index b072416b6121..1bd04f470a8d 100644 --- a/substrate/frame/examples/Cargo.toml +++ b/substrate/frame/examples/Cargo.toml @@ -18,6 +18,7 @@ pallet-example-offchain-worker = { path = "offchain-worker", default-features = pallet-example-kitchensink = { path = "kitchensink", default-features = false} pallet-dev-mode = { path = "dev-mode", default-features = false} pallet-example-split = { path = "split", default-features = false} +pallet-example-storage-migrations = { path = "storage-migrations", default-features = false} [features] default = [ "std" ] diff --git a/substrate/frame/examples/src/lib.rs b/substrate/frame/examples/src/lib.rs index d1cd32bb50f2..f0d83dd802fb 100644 --- a/substrate/frame/examples/src/lib.rs +++ b/substrate/frame/examples/src/lib.rs @@ -38,3 +38,6 @@ //! //! - [**`pallet-example-split`**](./split): A simple example of a FRAME pallet demonstrating the //! ability to split sections across multiple files. +//! +//! - [**`pallet-example-storage-migrations`**](./storage-migrations): An example pallet +//! demonstrating best-practices for writing storage migrations. diff --git a/substrate/frame/examples/storage-migrations/Cargo.toml b/substrate/frame/examples/storage-migrations/Cargo.toml new file mode 100644 index 000000000000..c128412bed01 --- /dev/null +++ b/substrate/frame/examples/storage-migrations/Cargo.toml @@ -0,0 +1,55 @@ +[package] +name = "pallet-example-storage-migrations" +version = "4.0.0-dev" +authors.workspace = true +edition.workspace = true +license = "MIT-0" +homepage = "https://substrate.io" +repository.workspace = true +description = "FRAME example pallet demonstrating best-practices for writing storage migrations." + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[dependencies] +docify = "0.2.1" +log = { version = "0.4.20", default-features = false } +codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [ + "derive", +] } +scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } +frame-support = { path = "../../support", default-features = false} +frame-executive = { path = "../../executive", default-features = false} +frame-system = { path = "../../system", default-features = false} +frame-try-runtime = { path = "../../try-runtime", default-features = false, optional = true} +sp-std = { path = "../../../primitives/std", default-features = false} +sp-runtime = { path = "../../../primitives/runtime" } +sp-core = { path = "../../../primitives/core" } +sp-io = { path = "../../../primitives/io" } + +[features] +default = [ "std" ] +std = [ + "codec/std", + "frame-support/std", + "frame-system/std", + "frame-try-runtime/std", + "frame-executive/std", + "scale-info/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", +] +runtime-benchmarks = [ + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime/try-runtime", + "frame-executive/try-runtime", + "sp-runtime/try-runtime", +] diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs new file mode 100644 index 000000000000..f0faba4aaae7 --- /dev/null +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -0,0 +1,210 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! # Storage Migrations Example Pallet +//! +//! An example pallet explaining why storage migrations are necessary and demonstrating +//! best-practices for writing them. +//! +//! It is intended to be used as a reference for writing migrations in other pallets, and is not +//! meant to be used in production. +//! +//! ## Prerequisites +//! +//! Before writing pallet storage migrations, you should be familiar with: +//! - [`Runtime upgrades`](https://docs.substrate.io/maintain/runtime-upgrades/) +//! - The [`GetStorageVersion`](frame_support::traits::GetStorageVersion) trait, and the difference +//! between current and on-chain [`StorageVersion`]s + +//! ## How to read these docs +//! - Run `cargo doc --features try-runtime --package pallet-example-storage-migrations --open` +//! to view the documentation in your browser. +//! - Follow along reading the source code referenced in the docs. +//! +//! ## Pallet Overview +//! +//! This example pallet contains a single storage item [`Value`](pallet::Value), which may be set by +//! any signed origin by calling the [`set_value`](crate::Call::set_value) extrinsic. +//! +//! For the purposes of this exercise, we imagine that in [`StorageVersion`] V0 of this pallet +//! [`Value`](pallet::Value) is a `u32`, and this what is currently stored on-chain. +//! +//! ```ignore +//! // V0 Storage Value +//! pub type Value = StorageValue<_, u32>; +//! ``` +//! +//! +//! In [`StorageVersion`] V1 of the pallet a new struct [`CurrentAndPreviousValue`] is introduced: +//! +//! ```ignore +//! pub struct CurrentAndPreviousValue { +//! /// The most recently set value. +//! pub current: u32, +//! /// The previous value, if one existed. +//! pub previous: Option, +//! } +//! ``` +//! +//! and [`Value`](pallet::Value) is updated to store this new struct instead of a `u32`: +//! +//! ```ignore +//! // V1 Storage Value +//! pub type Value = StorageValue<_, CurrentAndPreviousValue>; +//! ``` +//! +//! In StorageVersion V1 of the pallet when [`set_value`](crate::Call::set_value) is called, the +//! new value is stored in the `current` field of [`CurrentAndPreviousValue`], and the previous +//! value (if it exists) is stored in the `previous` field. +//! +//! ## Why a migration is necessary +//! +//! There now exists a discrepancy between the on-chain storage for [`Value`] (in V0 it is a `u32`) +//! and the current storage for [`Value`] (in V1 it is a [`CurrentAndPreviousValue`] struct). +//! +//! If this pallet was deployed without a migration, the on-chain storage for [`Value`] would be a +//! `u32` but the runtime would try to read it as a [`CurrentAndPreviousValue`]. This would +//! result in unacceptable undefined behavior. +//! +//! ## Adding a migration module +//! +//! Writing a migration module is not required, but highly recommended. +//! +//! Here's how we structure our migration module for this pallet: +//! +//! ```text +//! substrate/frame/examples/storage-migrations/src/ +//! ├── lib.rs <-- pallet definition +//! ├── Cargo.toml <-- pallet manifest +//! └── migrations/ +//! ├── mod.rs <-- migrations module definition +//! └── v1.rs <-- migration logic for the V0 to V1 transition +//! ``` +//! +//! This structure allows us to keep the migration logic separate from the pallet definition, and +//! easily add new migrations in the future. +//! +//! ## Writing the Migration +//! +//! All code related to our migration can be found under +//! [`v1.rs`](crate::migrations::v1). See the migration source code for detailed comments. +//! +//! **First**, we define a [`storage_alias`](frame_support::storage_alias) for the old [`Value`] +//! format. +//! +//! This allows reading the old value from storage during the migration. +//! +//! **Second**, we define a struct +//! [`VersionUncheckedV0ToV1`](crate::migrations::v1::VersionUncheckedV0ToV1) which implements the +//! [`OnRuntimeUpgrade`](frame_support::traits::OnRuntimeUpgrade) trait and write basic unit tests. +//! +//! **Finally**, we wrap [`VersionUncheckedV0ToV1`](crate::migrations::v1::VersionUncheckedV0ToV1) +//! in a [`VersionedMigration`](frame_support::migrations::VersionedMigration) to create +//! [`VersionCheckedV0ToV1`](crate::migrations::v1::VersionCheckedV0ToV1). +//! +//! [`VersionedMigration`](frame_support::migrations::VersionedMigration) ensures that +//! - The migration only runs once, when the storage version is 0 +//! - The version is updated to 1 after the migration is run +//! +//! ## Scheduling the Migration to run next runtime upgrade +//! +//! We're almost done! The last step is to schedule the migration to run next runtime upgrade +//! passing it as a generic parameter to your [`Executive`](frame_executive) pallet. +//! +//! e.g. +//! ```ignore +//! type Migrations = ( +//! pallet_example_storage_migration::migrations::v1::VersionedV0ToV1 +//! // ...schedule additional migrations by adding them here +//! ); +//! pub type Executive = frame_executive::Executive< +//! Runtime, +//! Block, +//! frame_system::ChainContext, +//! Runtime, +//! AllPalletsWithSystem, +//! Migrations, +//! >; +//! ``` +//! +//! ## IMPORTANT: Testing your migration with real state +//! +//! - Dry-running migrations with real state using [`try-runtime-cli`](https://paritytech.github.io/try-runtime-cli/try_runtime_core/commands/enum.Action.html#variant.OnRuntimeUpgrade) + +// We make sure this pallet uses `no_std` for compiling to Wasm. +#![cfg_attr(not(feature = "std"), no_std)] + +// Re-export pallet items so that they can be accessed from the crate namespace. +pub use pallet::*; + +// We export the migrations so they may be used in the runtime. +pub mod migrations; +use codec::{Decode, Encode, MaxEncodedLen}; +use frame_support::traits::StorageVersion; +use sp_runtime::RuntimeDebug; + +/// Example struct holding the most recently set [`u32`] and the second most recently set [`u32`] +/// (if one existed). +#[docify::export] +#[derive( + Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, scale_info::TypeInfo, MaxEncodedLen, +)] +pub struct CurrentAndPreviousValue { + /// The most recently set value. + pub current: u32, + /// The previous value, if one existed. + pub previous: Option, +} + +// All pallet logic is defined in its own module and must be annotated by the `pallet` attribute. +#[frame_support::pallet(dev_mode)] +pub mod pallet { + // Import various useful types required by all FRAME pallets. + use super::*; + use frame_support::pallet_prelude::*; + use frame_system::pallet_prelude::*; + + /// Here we define the current [`StorageVersion`] of the pallet. + const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); + + #[pallet::pallet] + #[pallet::storage_version(STORAGE_VERSION)] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config {} + + /// [`StorageVersion`] V1 of [`Value`]. + #[pallet::storage] + pub type Value = StorageValue<_, CurrentAndPreviousValue>; + + #[pallet::call] + impl Pallet { + #[pallet::call_index(0)] + pub fn set_value(origin: OriginFor, value: u32) -> DispatchResult { + // Check that the extrinsic was signed. + ensure_signed(origin)?; + + // Set the value in storage. + let previous = Value::::get().map(|v| v.current); + let new_struct = CurrentAndPreviousValue { current: value, previous }; + >::put(new_struct); + + Ok(()) + } + } +} diff --git a/substrate/frame/examples/storage-migrations/src/migrations/mod.rs b/substrate/frame/examples/storage-migrations/src/migrations/mod.rs new file mode 100644 index 000000000000..a3a6d96c3f59 --- /dev/null +++ b/substrate/frame/examples/storage-migrations/src/migrations/mod.rs @@ -0,0 +1 @@ +pub mod v1; diff --git a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs new file mode 100644 index 000000000000..c3810ede8f31 --- /dev/null +++ b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs @@ -0,0 +1,109 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use frame_support::{ + storage_alias, + traits::{Get, OnRuntimeUpgrade}, +}; + +/// Collection of storage item formats from the previous storage version. +/// +/// Required so we can read values in the old storage format during the migration. +pub(crate) mod old { + use super::*; + + /// V0 type for [`crate::Value`]. + #[storage_alias] + pub type Value = StorageValue, u32>; +} + +/// Implements [`OnRuntimeUpgrade`], migrating the state of this pallet from V0 to V1. +/// +/// In V0 of the template [`crate::Value`] is just a `u32`. +/// In V1, it has been upgraded to contain the struct [`crate::CurrentAndPreviousValue`]. +/// +/// In this migration, update the on-chain storage for the pallet to reflect the new storage layout. + +pub struct VersionUncheckedV0ToV1(sp_std::marker::PhantomData); + +impl OnRuntimeUpgrade for VersionUncheckedV0ToV1 { + /// Return the existing [`crate::Value`] so we can check that it was correctly set in + /// [`VersionUncheckedV0ToV1::post_upgrade`]. + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + use codec::Encode; + + // Access the old value using the `storage_alias` type + let old_value = old::Value::::get(); + // Return it as an encoded `Vec` + Ok(old_value.encode()) + } + + /// Migrate the storage from V0 to V1. + /// + /// If the value doesn't exist, there is nothing to do. + /// + /// If the value exists, it is read and then written back to storage inside a + /// [`crate::SomethingEntry`] with the `maybe_account_id` field set to `None`. + fn on_runtime_upgrade() -> frame_support::weights::Weight { + // Read the old value from storage + if let Some(old_value) = old::Value::::get() { + // Write the new value to storage + let new = crate::CurrentAndPreviousValue { previous: None, current: old_value }; + crate::Value::::put(new); + // One read for the old value, one write for the new value + T::DbWeight::get().reads_writes(1, 1) + } else { + // One read for trying to access the old value + T::DbWeight::get().reads(1) + } + } + + /// Verifies the storage was migrated correctly. + /// + /// If there was no old value, the new value should not be set. + /// + /// If there was an old value, the new value should be a + /// [`crate::SomethingEntry`] with the `maybe_account_id` field set to `None` + #[cfg(feature = "try-runtime")] + fn post_upgrade(state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + use codec::Decode; + use frame_support::ensure; + + let maybe_old_value = Option::::decode(&mut &state[..]).map_err(|_| { + sp_runtime::TryRuntimeError::Other("Failed to decode old value from storage") + })?; + + match maybe_old_value { + Some(old_value) => { + let expected_new_value = + crate::CurrentAndPreviousValue { current: old_value, previous: None }; + let actual_new_value = crate::Value::::get(); + + ensure!(actual_new_value.is_some(), "New value not set"); + ensure!( + actual_new_value == Some(expected_new_value), + "New value not set correctly" + ); + }, + None => { + ensure!(crate::Value::::get().is_none(), "New value unexpectedly set"); + }, + }; + Ok(()) + } +} From 37e45d4442392dba75db09064cd8df1e0aac4e73 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 13 Sep 2023 17:59:59 +1000 Subject: [PATCH 05/98] dont export unversioned migrations --- Cargo.lock | 1 + .../examples/storage-migrations/Cargo.toml | 4 + .../examples/storage-migrations/src/lib.rs | 6 +- .../storage-migrations/src/migrations/v1.rs | 220 +++++++++++++----- .../examples/storage-migrations/src/mock.rs | 72 ++++++ 5 files changed, 236 insertions(+), 67 deletions(-) create mode 100644 substrate/frame/examples/storage-migrations/src/mock.rs diff --git a/Cargo.lock b/Cargo.lock index 9ef0239009ba..89343a7d2f91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9623,6 +9623,7 @@ dependencies = [ "frame-system", "frame-try-runtime", "log", + "pallet-balances", "parity-scale-codec", "scale-info", "sp-core", diff --git a/substrate/frame/examples/storage-migrations/Cargo.toml b/substrate/frame/examples/storage-migrations/Cargo.toml index c128412bed01..c422b4a9e8fa 100644 --- a/substrate/frame/examples/storage-migrations/Cargo.toml +++ b/substrate/frame/examples/storage-migrations/Cargo.toml @@ -22,6 +22,7 @@ frame-support = { path = "../../support", default-features = false} frame-executive = { path = "../../executive", default-features = false} frame-system = { path = "../../system", default-features = false} frame-try-runtime = { path = "../../try-runtime", default-features = false, optional = true} +pallet-balances = { path = "../../balances", default-features = false} sp-std = { path = "../../../primitives/std", default-features = false} sp-runtime = { path = "../../../primitives/runtime" } sp-core = { path = "../../../primitives/core" } @@ -35,6 +36,7 @@ std = [ "frame-system/std", "frame-try-runtime/std", "frame-executive/std", + "pallet-balances/std", "scale-info/std", "sp-core/std", "sp-io/std", @@ -44,6 +46,7 @@ std = [ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", "sp-runtime/runtime-benchmarks", ] try-runtime = [ @@ -51,5 +54,6 @@ try-runtime = [ "frame-system/try-runtime", "frame-try-runtime/try-runtime", "frame-executive/try-runtime", + "pallet-balances/try-runtime", "sp-runtime/try-runtime", ] diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index f0faba4aaae7..503b27a77212 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -123,13 +123,12 @@ //! ## Scheduling the Migration to run next runtime upgrade //! //! We're almost done! The last step is to schedule the migration to run next runtime upgrade -//! passing it as a generic parameter to your [`Executive`](frame_executive) pallet. +//! passing it as a generic parameter to your [`Executive`](frame_executive) pallet: //! -//! e.g. //! ```ignore //! type Migrations = ( //! pallet_example_storage_migration::migrations::v1::VersionedV0ToV1 -//! // ...schedule additional migrations by adding them here +//! // ...more migrations here //! ); //! pub type Executive = frame_executive::Executive< //! Runtime, @@ -153,6 +152,7 @@ pub use pallet::*; // We export the migrations so they may be used in the runtime. pub mod migrations; +mod mock; use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::traits::StorageVersion; use sp_runtime::RuntimeDebug; diff --git a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs index c3810ede8f31..45c10abfb47b 100644 --- a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs +++ b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs @@ -31,79 +31,171 @@ pub(crate) mod old { pub type Value = StorageValue, u32>; } -/// Implements [`OnRuntimeUpgrade`], migrating the state of this pallet from V0 to V1. -/// -/// In V0 of the template [`crate::Value`] is just a `u32`. -/// In V1, it has been upgraded to contain the struct [`crate::CurrentAndPreviousValue`]. -/// -/// In this migration, update the on-chain storage for the pallet to reflect the new storage layout. +/// Put all unversioned logic in a private module so it cannot be accidentally used in the runtime. +mod unversioned { + use super::*; -pub struct VersionUncheckedV0ToV1(sp_std::marker::PhantomData); + /// Implements [`OnRuntimeUpgrade`], migrating the state of this pallet from V0 to V1. + /// + /// In V0 of the template [`crate::Value`] is just a `u32`. + /// In V1, it has been upgraded to contain the struct [`crate::CurrentAndPreviousValue`]. + /// + /// In this migration, update the on-chain storage for the pallet to reflect the new storage + /// layout. -impl OnRuntimeUpgrade for VersionUncheckedV0ToV1 { - /// Return the existing [`crate::Value`] so we can check that it was correctly set in - /// [`VersionUncheckedV0ToV1::post_upgrade`]. - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - use codec::Encode; + pub struct MigrateV0ToV1(sp_std::marker::PhantomData); - // Access the old value using the `storage_alias` type - let old_value = old::Value::::get(); - // Return it as an encoded `Vec` - Ok(old_value.encode()) - } + impl OnRuntimeUpgrade for MigrateV0ToV1 { + /// Return the existing [`crate::Value`] so we can check that it was correctly set in + /// [`VersionUncheckedV0ToV1::post_upgrade`]. + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + use codec::Encode; - /// Migrate the storage from V0 to V1. - /// - /// If the value doesn't exist, there is nothing to do. - /// - /// If the value exists, it is read and then written back to storage inside a - /// [`crate::SomethingEntry`] with the `maybe_account_id` field set to `None`. - fn on_runtime_upgrade() -> frame_support::weights::Weight { - // Read the old value from storage - if let Some(old_value) = old::Value::::get() { - // Write the new value to storage - let new = crate::CurrentAndPreviousValue { previous: None, current: old_value }; - crate::Value::::put(new); - // One read for the old value, one write for the new value - T::DbWeight::get().reads_writes(1, 1) - } else { - // One read for trying to access the old value - T::DbWeight::get().reads(1) + // Access the old value using the `storage_alias` type + let old_value = old::Value::::get(); + // Return it as an encoded `Vec` + Ok(old_value.encode()) + } + + /// Migrate the storage from V0 to V1. + /// + /// If the value doesn't exist, there is nothing to do. + /// + /// If the value exists, it is read and then written back to storage inside a + /// [`crate::SomethingEntry`] with the `maybe_account_id` field set to `None`. + fn on_runtime_upgrade() -> frame_support::weights::Weight { + // Read the old value from storage + if let Some(old_value) = old::Value::::get() { + // Write the new value to storage + let new = crate::CurrentAndPreviousValue { previous: None, current: old_value }; + crate::Value::::put(new); + // One read for the old value, one write for the new value + T::DbWeight::get().reads_writes(1, 1) + } else { + // One read for trying to access the old value + T::DbWeight::get().reads(1) + } + } + + /// Verifies the storage was migrated correctly. + /// + /// If there was no old value, the new value should not be set. + /// + /// If there was an old value, the new value should be a + /// [`crate::SomethingEntry`] with the `maybe_account_id` field set to `None` + #[cfg(feature = "try-runtime")] + fn post_upgrade(state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + use codec::Decode; + use frame_support::ensure; + + let maybe_old_value = Option::::decode(&mut &state[..]).map_err(|_| { + sp_runtime::TryRuntimeError::Other("Failed to decode old value from storage") + })?; + + match maybe_old_value { + Some(old_value) => { + let expected_new_value = + crate::CurrentAndPreviousValue { current: old_value, previous: None }; + let actual_new_value = crate::Value::::get(); + + ensure!(actual_new_value.is_some(), "New value not set"); + ensure!( + actual_new_value == Some(expected_new_value), + "New value not set correctly" + ); + }, + None => { + ensure!(crate::Value::::get().is_none(), "New value unexpectedly set"); + }, + }; + Ok(()) } } - /// Verifies the storage was migrated correctly. - /// - /// If there was no old value, the new value should not be set. + /// Tests for our migration. /// - /// If there was an old value, the new value should be a - /// [`crate::SomethingEntry`] with the `maybe_account_id` field set to `None` - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - use codec::Decode; - use frame_support::ensure; - - let maybe_old_value = Option::::decode(&mut &state[..]).map_err(|_| { - sp_runtime::TryRuntimeError::Other("Failed to decode old value from storage") - })?; - - match maybe_old_value { - Some(old_value) => { - let expected_new_value = - crate::CurrentAndPreviousValue { current: old_value, previous: None }; - let actual_new_value = crate::Value::::get(); + /// When writing migration tests, it is important to check: + /// 1. `on_runtime_upgrade` returns the expected weight + /// 2. `post_upgrade` succeeds when given the bytes returned by `pre_upgrade` + /// 3. The storage is in the expected state after the migration + #[cfg(all(feature = "try-runtime", test))] + mod test { + use super::*; + use crate::mock::{new_test_ext, Test}; + use frame_support::assert_ok; + + #[test] + fn handles_no_existing_value() { + new_test_ext().execute_with(|| { + // By default, no value should be set. Verify this assumption. + assert!(crate::Value::::get().is_none()); + assert!(old::Value::::get().is_none()); - ensure!(actual_new_value.is_some(), "New value not set"); - ensure!( - actual_new_value == Some(expected_new_value), - "New value not set correctly" + // Get the pre_upgrade bytes + let bytes = match MigrateV0ToV1::::pre_upgrade() { + Ok(bytes) => bytes, + Err(e) => panic!("pre_upgrade failed: {:?}", e), + }; + + // Execute the migration + let weight = MigrateV0ToV1::::on_runtime_upgrade(); + + // Verify post_upgrade succeeds + assert_ok!(MigrateV0ToV1::::post_upgrade(bytes)); + + // The weight should be just 1 read for trying to access the old value. + assert_eq!(weight, ::DbWeight::get().reads(1)); + + // After the migration, no value should have been set. + assert!(crate::Value::::get().is_none()); + }) + } + + #[test] + fn handles_existing_value() { + new_test_ext().execute_with(|| { + // Set up an initial value + let initial_value = 42; + old::Value::::put(initial_value); + + // Get the pre_upgrade bytes + let bytes = match MigrateV0ToV1::::pre_upgrade() { + Ok(bytes) => bytes, + Err(e) => panic!("pre_upgrade failed: {:?}", e), + }; + + // Execute the migration + let weight = MigrateV0ToV1::::on_runtime_upgrade(); + + // Verify post_upgrade succeeds + assert_ok!(MigrateV0ToV1::::post_upgrade(bytes)); + + // The weight used should be 1 read for the old value, and 1 write for the new + // value. + assert_eq!( + weight, + ::DbWeight::get().reads_writes(1, 1) ); - }, - None => { - ensure!(crate::Value::::get().is_none(), "New value unexpectedly set"); - }, - }; - Ok(()) + + // After the migration, the new value should be set as the `current` value. + let expected_new_value = + crate::CurrentAndPreviousValue { current: initial_value, previous: None }; + assert_eq!(crate::Value::::get(), Some(expected_new_value)); + }) + } } } + +/// Versioned migration logic in a public module, for use in runtimes. +pub mod versioned { + use super::*; + + pub type MigrateV0ToV1 = frame_support::migrations::VersionedMigration< + 0, + 1, + unversioned::MigrateV0ToV1, + crate::pallet::Pallet, + ::DbWeight, + >; +} diff --git a/substrate/frame/examples/storage-migrations/src/mock.rs b/substrate/frame/examples/storage-migrations/src/mock.rs new file mode 100644 index 000000000000..538d56cd1939 --- /dev/null +++ b/substrate/frame/examples/storage-migrations/src/mock.rs @@ -0,0 +1,72 @@ +use crate::*; +use frame_support::{traits::ConstU64, weights::constants::ParityDbWeight}; +use sp_core::H256; +use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; +// Reexport crate as its pallet name for construct_runtime. +use crate as pallet_example_storage_migration; + +type Block = frame_system::mocking::MockBlock; + +// For testing the pallet, we construct a mock runtime. +frame_support::construct_runtime!( + pub enum Test + { + System: frame_system::{Pallet, Call, Config, Storage, Event}, + Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, + Example: pallet_example_storage_migration::{Pallet, Call, Storage}, + } +); + +impl frame_system::Config for Test { + type BaseCallFilter = frame_support::traits::Everything; + type BlockWeights = (); + type BlockLength = (); + type DbWeight = ParityDbWeight; + type RuntimeOrigin = RuntimeOrigin; + type Nonce = u64; + type Hash = H256; + type RuntimeCall = RuntimeCall; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + type Block = Block; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = ConstU64<250>; + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = pallet_balances::AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = (); + type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; +} + +impl pallet_balances::Config for Test { + type MaxLocks = (); + type MaxReserves = (); + type ReserveIdentifier = [u8; 8]; + type Balance = u64; + type DustRemoval = (); + type RuntimeEvent = RuntimeEvent; + type ExistentialDeposit = ConstU64<1>; + type AccountStore = System; + type WeightInfo = (); + type FreezeIdentifier = (); + type MaxFreezes = (); + type RuntimeHoldReason = RuntimeHoldReason; + type MaxHolds = (); +} + +impl Config for Test {} + +#[cfg(all(feature = "try-runtime", test))] +pub fn new_test_ext() -> sp_io::TestExternalities { + use sp_runtime::BuildStorage; + + let t = RuntimeGenesisConfig { system: Default::default(), balances: Default::default() } + .build_storage() + .unwrap(); + t.into() +} From 22fe8998a03d787a481087b35a658869cc6fae16 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 10:28:58 +1000 Subject: [PATCH 06/98] patterns preventing accidental usage of unversioned migrations --- .../storage-migrations/src/migrations/v1.rs | 174 ++++++++++-------- substrate/frame/support/src/migrations.rs | 44 +++-- 2 files changed, 125 insertions(+), 93 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs index 45c10abfb47b..f6b228ba3ac2 100644 --- a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs +++ b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs @@ -23,7 +23,7 @@ use frame_support::{ /// Collection of storage item formats from the previous storage version. /// /// Required so we can read values in the old storage format during the migration. -pub(crate) mod old { +mod old { use super::*; /// V0 type for [`crate::Value`]. @@ -31,8 +31,17 @@ pub(crate) mod old { pub type Value = StorageValue, u32>; } -/// Put all unversioned logic in a private module so it cannot be accidentally used in the runtime. -mod unversioned { +/// Private module containing *version unchecked* migration logic. +/// +/// Should only be used by the [`VersionedMigration`] type in this module to create something to +/// export. +/// +/// We keep this private so the unversioned migration cannot accidentally be used in any runtimes. +/// +/// For more about this pattern of keeping items private, see +/// - https://github.com/rust-lang/rust/issues/30905 +/// - https://internals.rust-lang.org/t/lang-team-minutes-private-in-public-rules/4504/40 +mod version_unchecked { use super::*; /// Implements [`OnRuntimeUpgrade`], migrating the state of this pallet from V0 to V1. @@ -112,90 +121,93 @@ mod unversioned { Ok(()) } } - - /// Tests for our migration. - /// - /// When writing migration tests, it is important to check: - /// 1. `on_runtime_upgrade` returns the expected weight - /// 2. `post_upgrade` succeeds when given the bytes returned by `pre_upgrade` - /// 3. The storage is in the expected state after the migration - #[cfg(all(feature = "try-runtime", test))] - mod test { - use super::*; - use crate::mock::{new_test_ext, Test}; - use frame_support::assert_ok; - - #[test] - fn handles_no_existing_value() { - new_test_ext().execute_with(|| { - // By default, no value should be set. Verify this assumption. - assert!(crate::Value::::get().is_none()); - assert!(old::Value::::get().is_none()); - - // Get the pre_upgrade bytes - let bytes = match MigrateV0ToV1::::pre_upgrade() { - Ok(bytes) => bytes, - Err(e) => panic!("pre_upgrade failed: {:?}", e), - }; - - // Execute the migration - let weight = MigrateV0ToV1::::on_runtime_upgrade(); - - // Verify post_upgrade succeeds - assert_ok!(MigrateV0ToV1::::post_upgrade(bytes)); - - // The weight should be just 1 read for trying to access the old value. - assert_eq!(weight, ::DbWeight::get().reads(1)); - - // After the migration, no value should have been set. - assert!(crate::Value::::get().is_none()); - }) - } - - #[test] - fn handles_existing_value() { - new_test_ext().execute_with(|| { - // Set up an initial value - let initial_value = 42; - old::Value::::put(initial_value); - - // Get the pre_upgrade bytes - let bytes = match MigrateV0ToV1::::pre_upgrade() { - Ok(bytes) => bytes, - Err(e) => panic!("pre_upgrade failed: {:?}", e), - }; - - // Execute the migration - let weight = MigrateV0ToV1::::on_runtime_upgrade(); - - // Verify post_upgrade succeeds - assert_ok!(MigrateV0ToV1::::post_upgrade(bytes)); - - // The weight used should be 1 read for the old value, and 1 write for the new - // value. - assert_eq!( - weight, - ::DbWeight::get().reads_writes(1, 1) - ); - - // After the migration, the new value should be set as the `current` value. - let expected_new_value = - crate::CurrentAndPreviousValue { current: initial_value, previous: None }; - assert_eq!(crate::Value::::get(), Some(expected_new_value)); - }) - } - } } -/// Versioned migration logic in a public module, for use in runtimes. -pub mod versioned { +/// Public module containing *version checked* migration logic. +/// +/// This is the only module that should be exported from this module. +/// +/// See [`VersionedMigration`](frame_support::migrations::VersionedMigration) docs for more about +/// how it works. +pub mod version_checked { use super::*; pub type MigrateV0ToV1 = frame_support::migrations::VersionedMigration< - 0, - 1, - unversioned::MigrateV0ToV1, + 0, // The migration will only execute when the on-chain storage version is 0 + 1, // The on-chain storage version will be set to 1 after the migration is complete + version_unchecked::MigrateV0ToV1, crate::pallet::Pallet, ::DbWeight, >; } + +/// Tests for our migration. +/// +/// When writing migration tests, it is important to check: +/// 1. `on_runtime_upgrade` returns the expected weight +/// 2. `post_upgrade` succeeds when given the bytes returned by `pre_upgrade` +/// 3. The storage is in the expected state after the migration +#[cfg(all(feature = "try-runtime", test))] +mod test { + use super::*; + use crate::mock::{new_test_ext, Test}; + use frame_support::assert_ok; + use version_unchecked::MigrateV0ToV1; + + #[test] + fn handles_no_existing_value() { + new_test_ext().execute_with(|| { + // By default, no value should be set. Verify this assumption. + assert!(crate::Value::::get().is_none()); + assert!(old::Value::::get().is_none()); + + // Get the pre_upgrade bytes + let bytes = match MigrateV0ToV1::::pre_upgrade() { + Ok(bytes) => bytes, + Err(e) => panic!("pre_upgrade failed: {:?}", e), + }; + + // Execute the migration + let weight = MigrateV0ToV1::::on_runtime_upgrade(); + + // Verify post_upgrade succeeds + assert_ok!(MigrateV0ToV1::::post_upgrade(bytes)); + + // The weight should be just 1 read for trying to access the old value. + assert_eq!(weight, ::DbWeight::get().reads(1)); + + // After the migration, no value should have been set. + assert!(crate::Value::::get().is_none()); + }) + } + + #[test] + fn handles_existing_value() { + new_test_ext().execute_with(|| { + // Set up an initial value + let initial_value = 42; + old::Value::::put(initial_value); + + // Get the pre_upgrade bytes + let bytes = match MigrateV0ToV1::::pre_upgrade() { + Ok(bytes) => bytes, + Err(e) => panic!("pre_upgrade failed: {:?}", e), + }; + + // Execute the migration + let weight = MigrateV0ToV1::::on_runtime_upgrade(); + + // Verify post_upgrade succeeds + assert_ok!(MigrateV0ToV1::::post_upgrade(bytes)); + + // The weight used should be 1 read for the old value, and 1 write for the new + // value. + assert_eq!(weight, ::DbWeight::get().reads_writes(1, 1)); + + // After the migration, the new value should be set as the `current` value. + let expected_new_value = + crate::CurrentAndPreviousValue { current: initial_value, previous: None }; + assert_eq!(crate::Value::::get(), Some(expected_new_value)); + }) + } +} diff --git a/substrate/frame/support/src/migrations.rs b/substrate/frame/support/src/migrations.rs index 6fc1834f01ad..f602cd435a66 100644 --- a/substrate/frame/support/src/migrations.rs +++ b/substrate/frame/support/src/migrations.rs @@ -48,24 +48,44 @@ use sp_std::marker::PhantomData; /// ### Examples /// ```ignore /// // In file defining migrations -/// pub struct VersionUncheckedMigrateV5ToV6(sp_std::marker::PhantomData); -/// impl OnRuntimeUpgrade for VersionUncheckedMigrateV5ToV6 { -/// // OnRuntimeUpgrade implementation... +/// +/// /// Private module containing *version unchecked* migration logic. +/// /// +/// /// Should only be used by the [`VersionedMigration`] type in this module to create something to +/// /// export. +/// /// +/// /// We keep this private so the unversioned migration cannot accidentally be used in any runtimes. +/// /// +/// /// For more about this pattern of keeping items private, see +/// /// - https://github.com/rust-lang/rust/issues/30905 +/// /// - https://internals.rust-lang.org/t/lang-team-minutes-private-in-public-rules/4504/40 +/// mod version_unchecked { +/// use super::*; +/// pub struct MigrateV5ToV6(sp_std::marker::PhantomData); +/// impl OnRuntimeUpgrade for VersionUncheckedMigrateV5ToV6 { +/// // OnRuntimeUpgrade implementation... +/// } /// } /// -/// pub type VersionCheckedMigrateV5ToV6 = -/// VersionedMigration< -/// 5, -/// 6, -/// VersionUncheckedMigrateV5ToV6, -/// crate::pallet::Pallet, -/// ::DbWeight -/// >; +/// /// Public module containing *version checked* migration logic. +/// /// +/// /// This is the only module that should be exported from a migration module. +/// pub mod version_checked { +/// use super::*; +/// pub type VersionCheckedMigrateV5ToV6 = +/// VersionedMigration< +/// 5, +/// 6, +/// VersionUncheckedMigrateV5ToV6, +/// crate::pallet::Pallet, +/// ::DbWeight +/// >; +/// } /// /// // Migrations tuple to pass to the Executive pallet: /// pub type Migrations = ( /// // other migrations... -/// VersionCheckedMigrateV5ToV6, +/// version_checked::MigrateV5ToV6, /// // other migrations... /// ); /// ``` From 76c9150c153828b8a4ba0c2b33927ff37099cda0 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 11:04:47 +1000 Subject: [PATCH 07/98] private unversioned migrations --- .../common/src/assigned_slots/migration.rs | 89 +-- .../common/src/paras_registrar/migration.rs | 84 +-- polkadot/runtime/kusama/src/lib.rs | 4 +- polkadot/runtime/kusama/src/past_payouts.rs | 2 +- polkadot/runtime/polkadot/src/lib.rs | 2 +- polkadot/runtime/rococo/src/lib.rs | 6 +- polkadot/runtime/westend/src/lib.rs | 4 +- polkadot/xcm/pallet-xcm/src/migration.rs | 76 +-- .../examples/storage-migrations/src/lib.rs | 2 +- .../storage-migrations/src/migrations/v1.rs | 2 +- substrate/frame/society/src/migrations.rs | 618 +++++++++--------- substrate/frame/support/src/migrations.rs | 18 +- 12 files changed, 471 insertions(+), 436 deletions(-) diff --git a/polkadot/runtime/common/src/assigned_slots/migration.rs b/polkadot/runtime/common/src/assigned_slots/migration.rs index 0e88b27a1ff8..233e0c386f97 100644 --- a/polkadot/runtime/common/src/assigned_slots/migration.rs +++ b/polkadot/runtime/common/src/assigned_slots/migration.rs @@ -23,51 +23,62 @@ use frame_support::ensure; use sp_std::vec::Vec; pub mod v1 { - use super::*; - pub struct MigrateToV1(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateToV1 { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - let onchain_version = Pallet::::on_chain_storage_version(); - ensure!(onchain_version < 1, "assigned_slots::MigrateToV1 migration can be deleted"); - Ok(Default::default()) - } - fn on_runtime_upgrade() -> frame_support::weights::Weight { - let onchain_version = Pallet::::on_chain_storage_version(); - if onchain_version < 1 { - const MAX_PERMANENT_SLOTS: u32 = 100; - const MAX_TEMPORARY_SLOTS: u32 = 100; + mod version_unchecked { + use super::*; - >::put(MAX_PERMANENT_SLOTS); - >::put(MAX_TEMPORARY_SLOTS); - // Return the weight consumed by the migration. - T::DbWeight::get().reads_writes(1, 3) - } else { - log::info!(target: LOG_TARGET, "MigrateToV1 should be removed"); - T::DbWeight::get().reads(1) + pub struct MigrateV0ToV1(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for MigrateV0ToV1 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + let onchain_version = Pallet::::on_chain_storage_version(); + ensure!( + onchain_version < 1, + "assigned_slots::MigrateToV1 migration can be deleted" + ); + Ok(Default::default()) } - } - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - let onchain_version = Pallet::::on_chain_storage_version(); - ensure!(onchain_version == 1, "assigned_slots::MigrateToV1 needs to be run"); - assert_eq!(>::get(), 100); - assert_eq!(>::get(), 100); - Ok(()) + fn on_runtime_upgrade() -> frame_support::weights::Weight { + let onchain_version = Pallet::::on_chain_storage_version(); + if onchain_version < 1 { + const MAX_PERMANENT_SLOTS: u32 = 100; + const MAX_TEMPORARY_SLOTS: u32 = 100; + + >::put(MAX_PERMANENT_SLOTS); + >::put(MAX_TEMPORARY_SLOTS); + // Return the weight consumed by the migration. + T::DbWeight::get().reads_writes(1, 3) + } else { + log::info!(target: LOG_TARGET, "MigrateToV1 should be removed"); + T::DbWeight::get().reads(1) + } + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + let onchain_version = Pallet::::on_chain_storage_version(); + ensure!(onchain_version == 1, "assigned_slots::MigrateToV1 needs to be run"); + assert_eq!(>::get(), 100); + assert_eq!(>::get(), 100); + Ok(()) + } } } - /// [`MigrateToV1`] wrapped in a - /// [`VersionedMigration`](frame_support::migrations::VersionedMigration), ensuring the - /// migration is only performed when on-chain version is 0. - pub type VersionCheckedMigrateToV1 = frame_support::migrations::VersionedMigration< - 0, - 1, - MigrateToV1, - Pallet, - ::DbWeight, - >; + pub mod versioned { + use super::*; + + /// [`version_unchecked::MigrateToV1`] wrapped in a + /// [`VersionedMigration`](frame_support::migrations::VersionedMigration), ensuring the + /// migration is only performed when on-chain version is 0. + pub type MigrateV0ToV1 = frame_support::migrations::VersionedMigration< + 0, + 1, + version_unchecked::MigrateV0ToV1, + Pallet, + ::DbWeight, + >; + } } diff --git a/polkadot/runtime/common/src/paras_registrar/migration.rs b/polkadot/runtime/common/src/paras_registrar/migration.rs index b767985489d3..3f2e347cfb32 100644 --- a/polkadot/runtime/common/src/paras_registrar/migration.rs +++ b/polkadot/runtime/common/src/paras_registrar/migration.rs @@ -24,47 +24,55 @@ pub struct ParaInfoV1 { locked: bool, } -pub struct VersionUncheckedMigrateToV1( - sp_std::marker::PhantomData<(T, UnlockParaIds)>, -); -impl> OnRuntimeUpgrade - for VersionUncheckedMigrateToV1 -{ - fn on_runtime_upgrade() -> Weight { - let mut count = 0u64; - Paras::::translate::>, _>(|key, v1| { - count.saturating_inc(); - Some(ParaInfo { - manager: v1.manager, - deposit: v1.deposit, - locked: if UnlockParaIds::contains(&key) { None } else { Some(v1.locked) }, - }) - }); +pub mod v1 { + use super::*; - log::info!(target: "runtime::registrar", "Upgraded {} storages to version 1", count); - T::DbWeight::get().reads_writes(count, count) - } + mod version_unchecked { + use super::*; - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - Ok((Paras::::iter_keys().count() as u32).encode()) - } + pub struct MigrateV0ToV1(sp_std::marker::PhantomData<(T, UnlockParaIds)>); + impl> OnRuntimeUpgrade + for MigrateV0ToV1 + { + fn on_runtime_upgrade() -> Weight { + let mut count = 0u64; + Paras::::translate::>, _>(|key, v1| { + count.saturating_inc(); + Some(ParaInfo { + manager: v1.manager, + deposit: v1.deposit, + locked: if UnlockParaIds::contains(&key) { None } else { Some(v1.locked) }, + }) + }); + + log::info!(target: "runtime::registrar", "Upgraded {} storages to version 1", count); + T::DbWeight::get().reads_writes(count, count) + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + Ok((Paras::::iter_keys().count() as u32).encode()) + } - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - let old_count = u32::decode(&mut &state[..]).expect("Known good"); - let new_count = Paras::::iter_values().count() as u32; + #[cfg(feature = "try-runtime")] + fn post_upgrade(state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + let old_count = u32::decode(&mut &state[..]).expect("Known good"); + let new_count = Paras::::iter_values().count() as u32; - ensure!(old_count == new_count, "Paras count should not change"); - Ok(()) + ensure!(old_count == new_count, "Paras count should not change"); + Ok(()) + } + } } -} -pub type VersionCheckedMigrateToV1 = - frame_support::migrations::VersionedMigration< - 0, - 1, - VersionUncheckedMigrateToV1, - super::Pallet, - ::DbWeight, - >; + pub mod versioned { + use super::*; + pub type MigrateV0ToV1 = frame_support::migrations::VersionedMigration< + 0, + 1, + version_unchecked::MigrateV0ToV1, + super::Pallet, + ::DbWeight, + >; + } +} diff --git a/polkadot/runtime/kusama/src/lib.rs b/polkadot/runtime/kusama/src/lib.rs index 659a7052d2b7..c6ecbaba21d9 100644 --- a/polkadot/runtime/kusama/src/lib.rs +++ b/polkadot/runtime/kusama/src/lib.rs @@ -1727,7 +1727,7 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( init_state_migration::InitMigrate, - pallet_society::migrations::VersionCheckedMigrateToV2< + pallet_society::migrations::v2::versioned::MigrateV0ToV2< Runtime, (), past_payouts::PastPayouts, @@ -1756,7 +1756,7 @@ pub mod migrations { parachains_configuration::migration::v9::MigrateToV9, // Migrate parachain info format - paras_registrar::migration::VersionCheckedMigrateToV1, + paras_registrar::migration::v1::versioned::MigrateV0ToV1, ); } diff --git a/polkadot/runtime/kusama/src/past_payouts.rs b/polkadot/runtime/kusama/src/past_payouts.rs index 2d8b67902b89..a3524d6a45dd 100644 --- a/polkadot/runtime/kusama/src/past_payouts.rs +++ b/polkadot/runtime/kusama/src/past_payouts.rs @@ -17,7 +17,7 @@ use super::*; use hex_literal::hex; -use pallet_society::migrations::from_raw_past_payouts; +use pallet_society::migrations::v2::from_raw_past_payouts; parameter_types! { pub PastPayouts: Vec<(AccountId, Balance)> = from_raw_past_payouts::(vec![ diff --git a/polkadot/runtime/polkadot/src/lib.rs b/polkadot/runtime/polkadot/src/lib.rs index 45ea561b33fa..c16a39ac15ec 100644 --- a/polkadot/runtime/polkadot/src/lib.rs +++ b/polkadot/runtime/polkadot/src/lib.rs @@ -1540,7 +1540,7 @@ pub mod migrations { parachains_configuration::migration::v9::MigrateToV9, // Migrate parachain info format - paras_registrar::migration::VersionCheckedMigrateToV1, + paras_registrar::migration::v1::versioned::MigrateV0ToV1, ); } diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index e043852901f1..af87cd9c785d 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1544,14 +1544,14 @@ pub mod migrations { /// Unreleased migrations. Add new ones here: pub type Unreleased = ( - pallet_society::migrations::VersionCheckedMigrateToV2, + pallet_society::migrations::v2::versioned::MigrateV0ToV2, pallet_im_online::migration::v1::Migration, parachains_configuration::migration::v7::MigrateToV7, - assigned_slots::migration::v1::VersionCheckedMigrateToV1, + assigned_slots::migration::v1::versioned::MigrateV0ToV1, parachains_scheduler::migration::v1::MigrateToV1, parachains_configuration::migration::v8::MigrateToV8, parachains_configuration::migration::v9::MigrateToV9, - paras_registrar::migration::VersionCheckedMigrateToV1, + paras_registrar::migration::v1::versioned::MigrateV0ToV1, ); } diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 7dfc781d2467..50314740e347 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -1421,12 +1421,12 @@ pub mod migrations { pub type Unreleased = ( pallet_im_online::migration::v1::Migration, parachains_configuration::migration::v7::MigrateToV7, - assigned_slots::migration::v1::VersionCheckedMigrateToV1, + assigned_slots::migration::v1::versioned::MigrateV0ToV1, parachains_scheduler::migration::v1::MigrateToV1, parachains_configuration::migration::v8::MigrateToV8, UpgradeSessionKeys, parachains_configuration::migration::v9::MigrateToV9, - paras_registrar::migration::VersionCheckedMigrateToV1, + paras_registrar::migration::v1::versioned::MigrateV0ToV1, ); } diff --git a/polkadot/xcm/pallet-xcm/src/migration.rs b/polkadot/xcm/pallet-xcm/src/migration.rs index ba3cdb5c51ed..919e5c32183d 100644 --- a/polkadot/xcm/pallet-xcm/src/migration.rs +++ b/polkadot/xcm/pallet-xcm/src/migration.rs @@ -27,49 +27,51 @@ pub mod v1 { use super::*; use crate::{CurrentMigration, VersionMigrationStage}; - /// Named with the 'VersionUnchecked'-prefix because although this implements some version - /// checking, the version checking is not complete as it will begin failing after the upgrade is - /// enacted on-chain. - /// - /// Use experimental [`VersionCheckedMigrateToV1`] instead. - pub struct VersionUncheckedMigrateToV1(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for VersionUncheckedMigrateToV1 { - fn on_runtime_upgrade() -> Weight { - let mut weight = T::DbWeight::get().reads(1); + mod version_unchecked { + use super::*; - if StorageVersion::get::>() != 0 { - log::warn!("skipping v1, should be removed"); - return weight - } + pub struct MigrateV0ToV1(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for MigrateV0ToV1 { + fn on_runtime_upgrade() -> Weight { + let mut weight = T::DbWeight::get().reads(1); + + if StorageVersion::get::>() != 0 { + log::warn!("skipping v1, should be removed"); + return weight + } - weight.saturating_accrue(T::DbWeight::get().writes(1)); - CurrentMigration::::put(VersionMigrationStage::default()); + weight.saturating_accrue(T::DbWeight::get().writes(1)); + CurrentMigration::::put(VersionMigrationStage::default()); - let translate = |pre: (u64, u64, u32)| -> Option<(u64, Weight, u32)> { - weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1)); - let translated = (pre.0, Weight::from_parts(pre.1, DEFAULT_PROOF_SIZE), pre.2); - log::info!("Migrated VersionNotifyTarget {:?} to {:?}", pre, translated); - Some(translated) - }; + let translate = |pre: (u64, u64, u32)| -> Option<(u64, Weight, u32)> { + weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1)); + let translated = (pre.0, Weight::from_parts(pre.1, DEFAULT_PROOF_SIZE), pre.2); + log::info!("Migrated VersionNotifyTarget {:?} to {:?}", pre, translated); + Some(translated) + }; - VersionNotifyTargets::::translate_values(translate); + VersionNotifyTargets::::translate_values(translate); - log::info!("v1 applied successfully"); - weight.saturating_accrue(T::DbWeight::get().writes(1)); - StorageVersion::new(1).put::>(); - weight + log::info!("v1 applied successfully"); + weight.saturating_accrue(T::DbWeight::get().writes(1)); + StorageVersion::new(1).put::>(); + weight + } } } - /// Version checked migration to v1. - /// - /// Wrapped in [`frame_support::migrations::VersionedMigration`] so the pre/post checks don't - /// begin failing after the upgrade is enacted on-chain. - pub type VersionCheckedMigrateToV1 = frame_support::migrations::VersionedMigration< - 0, - 1, - VersionUncheckedMigrateToV1, - crate::pallet::Pallet, - ::DbWeight, - >; + pub mod versioned { + /// Version checked migration to v1. + /// + /// Wrapped in [`frame_support::migrations::VersionedMigration`] so the pre/post checks + /// don't begin failing after the upgrade is enacted on-chain. + use super::*; + pub type VersionCheckedMigrateToV1 = frame_support::migrations::VersionedMigration< + 0, + 1, + version_unchecked::MigrateV0ToV1, + crate::pallet::Pallet, + ::DbWeight, + >; + } } diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index 503b27a77212..5d1236d6a8bf 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -127,7 +127,7 @@ //! //! ```ignore //! type Migrations = ( -//! pallet_example_storage_migration::migrations::v1::VersionedV0ToV1 +//! pallet_example_storage_migration::migrations::v1::versioned::MigrateV0ToV1 //! // ...more migrations here //! ); //! pub type Executive = frame_executive::Executive< diff --git a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs index f6b228ba3ac2..32082268609e 100644 --- a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs +++ b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs @@ -129,7 +129,7 @@ mod version_unchecked { /// /// See [`VersionedMigration`](frame_support::migrations::VersionedMigration) docs for more about /// how it works. -pub mod version_checked { +pub mod versioned { use super::*; pub type MigrateV0ToV1 = frame_support::migrations::VersionedMigration< diff --git a/substrate/frame/society/src/migrations.rs b/substrate/frame/society/src/migrations.rs index 553eea1a7952..5dc3db1b8bd1 100644 --- a/substrate/frame/society/src/migrations.rs +++ b/substrate/frame/society/src/migrations.rs @@ -27,330 +27,340 @@ use sp_runtime::TryRuntimeError; /// The log target. const TARGET: &'static str = "runtime::society::migration"; -/// This migration moves all the state to v2 of Society. -pub struct VersionUncheckedMigrateToV2, I: 'static, PastPayouts>( - sp_std::marker::PhantomData<(T, I, PastPayouts)>, -); - -impl< - T: Config, - I: Instance + 'static, - PastPayouts: Get::AccountId, BalanceOf)>>, - > OnRuntimeUpgrade for VersionUncheckedMigrateToV2 -{ - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, TryRuntimeError> { - let current = Pallet::::current_storage_version(); - let onchain = Pallet::::on_chain_storage_version(); - ensure!(onchain == 0 && current == 2, "pallet_society: invalid version"); - - Ok((old::Candidates::::get(), old::Members::::get()).encode()) - } - - fn on_runtime_upgrade() -> Weight { - let onchain = Pallet::::on_chain_storage_version(); - if onchain < 2 { - log::info!( - target: TARGET, - "Running migration against onchain version {:?}", - onchain - ); - from_original::(&mut PastPayouts::get()).defensive_unwrap_or(Weight::MAX) - } else { - log::warn!("Unexpected onchain version: {:?} (expected 0)", onchain); - T::DbWeight::get().reads(1) - } - } +pub mod v2 { + use super::*; - #[cfg(feature = "try-runtime")] - fn post_upgrade(data: Vec) -> Result<(), TryRuntimeError> { - let old: ( - Vec::AccountId, BalanceOf>>, - Vec<::AccountId>, - ) = Decode::decode(&mut &data[..]).expect("Bad data"); - let mut old_candidates = - old.0.into_iter().map(|x| (x.who, x.kind, x.value)).collect::>(); - let mut old_members = old.1; - let mut candidates = - Candidates::::iter().map(|(k, v)| (k, v.kind, v.bid)).collect::>(); - let mut members = Members::::iter_keys().collect::>(); - - old_candidates.sort_by_key(|x| x.0.clone()); - candidates.sort_by_key(|x| x.0.clone()); - assert_eq!(candidates, old_candidates); - - members.sort(); - old_members.sort(); - assert_eq!(members, old_members); - - ensure!( - Pallet::::on_chain_storage_version() == 2, - "The onchain version must be updated after the migration." + mod version_unchecked { + /// This migration moves all the state to v2 of Society. + use super::*; + pub struct MigrateV0ToV2, I: 'static, PastPayouts>( + sp_std::marker::PhantomData<(T, I, PastPayouts)>, ); - assert_internal_consistency::(); - Ok(()) - } -} + impl< + T: Config, + I: Instance + 'static, + PastPayouts: Get::AccountId, BalanceOf)>>, + > OnRuntimeUpgrade for MigrateV0ToV2 + { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, TryRuntimeError> { + let current = Pallet::::current_storage_version(); + let onchain = Pallet::::on_chain_storage_version(); + ensure!(onchain == 0 && current == 2, "pallet_society: invalid version"); -/// [`VersionUncheckedMigrateToV2`] wrapped in a [`frame_support::migrations::VersionedMigration`], -/// ensuring the migration is only performed when on-chain version is 0. -pub type VersionCheckedMigrateToV2 = - frame_support::migrations::VersionedMigration< - 0, - 2, - VersionUncheckedMigrateToV2, - crate::pallet::Pallet, - ::DbWeight, - >; - -pub(crate) mod old { - use super::*; - use frame_support::storage_alias; - - /// A vote by a member on a candidate application. - #[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] - pub enum Vote { - /// The member has been chosen to be skeptic and has not yet taken any action. - Skeptic, - /// The member has rejected the candidate's application. - Reject, - /// The member approves of the candidate's application. - Approve, - } + Ok((old::Candidates::::get(), old::Members::::get()).encode()) + } - #[storage_alias] - pub type Bids, I: 'static> = StorageValue< - Pallet, - Vec::AccountId, BalanceOf>>, - ValueQuery, - >; - #[storage_alias] - pub type Candidates, I: 'static> = StorageValue< - Pallet, - Vec::AccountId, BalanceOf>>, - ValueQuery, - >; - #[storage_alias] - pub type Votes, I: 'static> = StorageDoubleMap< - Pallet, - Twox64Concat, - ::AccountId, - Twox64Concat, - ::AccountId, - Vote, - >; - #[storage_alias] - pub type SuspendedCandidates, I: 'static> = StorageMap< - Pallet, - Twox64Concat, - ::AccountId, - (BalanceOf, BidKind<::AccountId, BalanceOf>), - >; - #[storage_alias] - pub type Members, I: 'static> = - StorageValue, Vec<::AccountId>, ValueQuery>; - #[storage_alias] - pub type Vouching, I: 'static> = StorageMap< - Pallet, - Twox64Concat, - ::AccountId, - VouchingStatus, - >; - #[storage_alias] - pub type Strikes, I: 'static> = StorageMap< - Pallet, - Twox64Concat, - ::AccountId, - StrikeCount, - ValueQuery, - >; - #[storage_alias] - pub type Payouts, I: 'static> = StorageMap< - Pallet, - Twox64Concat, - ::AccountId, - Vec<(frame_system::pallet_prelude::BlockNumberFor, BalanceOf)>, - ValueQuery, - >; - #[storage_alias] - pub type SuspendedMembers, I: 'static> = StorageMap< - Pallet, - Twox64Concat, - ::AccountId, - bool, - ValueQuery, - >; - #[storage_alias] - pub type Defender, I: 'static> = - StorageValue, ::AccountId>; - #[storage_alias] - pub type DefenderVotes, I: 'static> = - StorageMap, Twox64Concat, ::AccountId, Vote>; -} + fn on_runtime_upgrade() -> Weight { + let onchain = Pallet::::on_chain_storage_version(); + if onchain < 2 { + log::info!( + target: TARGET, + "Running migration against onchain version {:?}", + onchain + ); + from_original::(&mut PastPayouts::get()).defensive_unwrap_or(Weight::MAX) + } else { + log::warn!("Unexpected onchain version: {:?} (expected 0)", onchain); + T::DbWeight::get().reads(1) + } + } -/// Will panic if there are any inconsistencies in the pallet's state or old keys remaining. -pub fn assert_internal_consistency, I: Instance + 'static>() { - // Check all members are valid data. - let mut members = vec![]; - for m in Members::::iter_keys() { - let r = Members::::get(&m).expect("Member data must be valid"); - members.push((m, r)); - } - assert_eq!(MemberCount::::get(), members.len() as u32); - for (who, record) in members.iter() { - assert_eq!(MemberByIndex::::get(record.index).as_ref(), Some(who)); - } - if let Some(founder) = Founder::::get() { - assert_eq!(Members::::get(founder).expect("founder is member").index, 0); - } - if let Some(head) = Head::::get() { - assert!(Members::::contains_key(head)); - } - // Check all votes are valid data. - for (k1, k2) in Votes::::iter_keys() { - assert!(Votes::::get(k1, k2).is_some()); - } - // Check all defender votes are valid data. - for (k1, k2) in DefenderVotes::::iter_keys() { - assert!(DefenderVotes::::get(k1, k2).is_some()); - } - // Check all candidates are valid data. - for k in Candidates::::iter_keys() { - assert!(Candidates::::get(k).is_some()); + #[cfg(feature = "try-runtime")] + fn post_upgrade(data: Vec) -> Result<(), TryRuntimeError> { + let old: ( + Vec::AccountId, BalanceOf>>, + Vec<::AccountId>, + ) = Decode::decode(&mut &data[..]).expect("Bad data"); + let mut old_candidates = + old.0.into_iter().map(|x| (x.who, x.kind, x.value)).collect::>(); + let mut old_members = old.1; + let mut candidates = + Candidates::::iter().map(|(k, v)| (k, v.kind, v.bid)).collect::>(); + let mut members = Members::::iter_keys().collect::>(); + + old_candidates.sort_by_key(|x| x.0.clone()); + candidates.sort_by_key(|x| x.0.clone()); + assert_eq!(candidates, old_candidates); + + members.sort(); + old_members.sort(); + assert_eq!(members, old_members); + + ensure!( + Pallet::::on_chain_storage_version() == 2, + "The onchain version must be updated after the migration." + ); + + assert_internal_consistency::(); + Ok(()) + } + } } - // Check all suspended members are valid data. - for m in SuspendedMembers::::iter_keys() { - assert!(SuspendedMembers::::get(m).is_some()); + + pub mod versioned { + use super::*; + /// [`version_unchecked::MigrateV0ToV2`] wrapped in a + /// [`frame_support::migrations::VersionedMigration`], ensuring the migration is only + /// performed when on-chain version is 0. + pub type MigrateV0ToV2 = frame_support::migrations::VersionedMigration< + 0, + 2, + version_unchecked::MigrateV0ToV2, + crate::pallet::Pallet, + ::DbWeight, + >; } - // Check all payouts are valid data. - for p in Payouts::::iter_keys() { - let k = Payouts::::hashed_key_for(&p); - let v = frame_support::storage::unhashed::get_raw(&k[..]).expect("value is in map"); - assert!(PayoutRecordFor::::decode(&mut &v[..]).is_ok()); + + pub(crate) mod old { + use super::*; + use frame_support::storage_alias; + + /// A vote by a member on a candidate application. + #[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] + pub enum Vote { + /// The member has been chosen to be skeptic and has not yet taken any action. + Skeptic, + /// The member has rejected the candidate's application. + Reject, + /// The member approves of the candidate's application. + Approve, + } + + #[storage_alias] + pub type Bids, I: 'static> = StorageValue< + Pallet, + Vec::AccountId, BalanceOf>>, + ValueQuery, + >; + #[storage_alias] + pub type Candidates, I: 'static> = StorageValue< + Pallet, + Vec::AccountId, BalanceOf>>, + ValueQuery, + >; + #[storage_alias] + pub type Votes, I: 'static> = StorageDoubleMap< + Pallet, + Twox64Concat, + ::AccountId, + Twox64Concat, + ::AccountId, + Vote, + >; + #[storage_alias] + pub type SuspendedCandidates, I: 'static> = StorageMap< + Pallet, + Twox64Concat, + ::AccountId, + (BalanceOf, BidKind<::AccountId, BalanceOf>), + >; + #[storage_alias] + pub type Members, I: 'static> = + StorageValue, Vec<::AccountId>, ValueQuery>; + #[storage_alias] + pub type Vouching, I: 'static> = StorageMap< + Pallet, + Twox64Concat, + ::AccountId, + VouchingStatus, + >; + #[storage_alias] + pub type Strikes, I: 'static> = StorageMap< + Pallet, + Twox64Concat, + ::AccountId, + StrikeCount, + ValueQuery, + >; + #[storage_alias] + pub type Payouts, I: 'static> = StorageMap< + Pallet, + Twox64Concat, + ::AccountId, + Vec<(frame_system::pallet_prelude::BlockNumberFor, BalanceOf)>, + ValueQuery, + >; + #[storage_alias] + pub type SuspendedMembers, I: 'static> = StorageMap< + Pallet, + Twox64Concat, + ::AccountId, + bool, + ValueQuery, + >; + #[storage_alias] + pub type Defender, I: 'static> = + StorageValue, ::AccountId>; + #[storage_alias] + pub type DefenderVotes, I: 'static> = + StorageMap, Twox64Concat, ::AccountId, Vote>; } - // We don't use these - make sure they don't exist. - assert_eq!(old::SuspendedCandidates::::iter().count(), 0); - assert_eq!(old::Strikes::::iter().count(), 0); - assert_eq!(old::Vouching::::iter().count(), 0); - assert!(!old::Defender::::exists()); - assert!(!old::Members::::exists()); -} + /// Will panic if there are any inconsistencies in the pallet's state or old keys remaining. + pub fn assert_internal_consistency, I: Instance + 'static>() { + // Check all members are valid data. + let mut members = vec![]; + for m in Members::::iter_keys() { + let r = Members::::get(&m).expect("Member data must be valid"); + members.push((m, r)); + } + assert_eq!(MemberCount::::get(), members.len() as u32); + for (who, record) in members.iter() { + assert_eq!(MemberByIndex::::get(record.index).as_ref(), Some(who)); + } + if let Some(founder) = Founder::::get() { + assert_eq!(Members::::get(founder).expect("founder is member").index, 0); + } + if let Some(head) = Head::::get() { + assert!(Members::::contains_key(head)); + } + // Check all votes are valid data. + for (k1, k2) in Votes::::iter_keys() { + assert!(Votes::::get(k1, k2).is_some()); + } + // Check all defender votes are valid data. + for (k1, k2) in DefenderVotes::::iter_keys() { + assert!(DefenderVotes::::get(k1, k2).is_some()); + } + // Check all candidates are valid data. + for k in Candidates::::iter_keys() { + assert!(Candidates::::get(k).is_some()); + } + // Check all suspended members are valid data. + for m in SuspendedMembers::::iter_keys() { + assert!(SuspendedMembers::::get(m).is_some()); + } + // Check all payouts are valid data. + for p in Payouts::::iter_keys() { + let k = Payouts::::hashed_key_for(&p); + let v = frame_support::storage::unhashed::get_raw(&k[..]).expect("value is in map"); + assert!(PayoutRecordFor::::decode(&mut &v[..]).is_ok()); + } + + // We don't use these - make sure they don't exist. + assert_eq!(old::SuspendedCandidates::::iter().count(), 0); + assert_eq!(old::Strikes::::iter().count(), 0); + assert_eq!(old::Vouching::::iter().count(), 0); + assert!(!old::Defender::::exists()); + assert!(!old::Members::::exists()); + } -pub fn from_original, I: Instance + 'static>( - past_payouts: &mut [(::AccountId, BalanceOf)], -) -> Result { - // Migrate Bids from old::Bids (just a trunctation). - Bids::::put(BoundedVec::<_, T::MaxBids>::truncate_from(old::Bids::::take())); - - // Initialise round counter. - RoundCount::::put(0); - - // Migrate Candidates from old::Candidates - for Bid { who: candidate, kind, value } in old::Candidates::::take().into_iter() { - let mut tally = Tally::default(); - // Migrate Votes from old::Votes - // No need to drain, since we're overwriting values. - for (voter, vote) in old::Votes::::iter_prefix(&candidate) { - Votes::::insert( + pub fn from_original, I: Instance + 'static>( + past_payouts: &mut [(::AccountId, BalanceOf)], + ) -> Result { + // Migrate Bids from old::Bids (just a trunctation). + Bids::::put(BoundedVec::<_, T::MaxBids>::truncate_from(old::Bids::::take())); + + // Initialise round counter. + RoundCount::::put(0); + + // Migrate Candidates from old::Candidates + for Bid { who: candidate, kind, value } in old::Candidates::::take().into_iter() { + let mut tally = Tally::default(); + // Migrate Votes from old::Votes + // No need to drain, since we're overwriting values. + for (voter, vote) in old::Votes::::iter_prefix(&candidate) { + Votes::::insert( + &candidate, + &voter, + Vote { approve: vote == old::Vote::Approve, weight: 1 }, + ); + match vote { + old::Vote::Approve => tally.approvals.saturating_inc(), + old::Vote::Reject => tally.rejections.saturating_inc(), + old::Vote::Skeptic => Skeptic::::put(&voter), + } + } + Candidates::::insert( &candidate, - &voter, - Vote { approve: vote == old::Vote::Approve, weight: 1 }, + Candidacy { round: 0, kind, tally, skeptic_struck: false, bid: value }, ); - match vote { - old::Vote::Approve => tally.approvals.saturating_inc(), - old::Vote::Reject => tally.rejections.saturating_inc(), - old::Vote::Skeptic => Skeptic::::put(&voter), - } } - Candidates::::insert( - &candidate, - Candidacy { round: 0, kind, tally, skeptic_struck: false, bid: value }, - ); - } - // Migrate Members from old::Members old::Strikes old::Vouching - let mut member_count = 0; - for member in old::Members::::take() { - let strikes = old::Strikes::::take(&member); - let vouching = old::Vouching::::take(&member); - let record = MemberRecord { index: member_count, rank: 0, strikes, vouching }; - Members::::insert(&member, record); - MemberByIndex::::insert(member_count, &member); - - // The founder must be the first member in Society V2. If we find the founder not in index - // zero, we swap it with the first member. - if member == Founder::::get().defensive_ok_or("founder must always be set")? && - member_count > 0 - { - let member_to_swap = MemberByIndex::::get(0) - .defensive_ok_or("member_count > 0, we must have at least 1 member")?; - // Swap the founder with the first member in MemberByIndex. - MemberByIndex::::swap(0, member_count); - // Update the indicies of the swapped member MemberRecords. - Members::::mutate(&member, |m| { - if let Some(member) = m { - member.index = 0; - } else { - frame_support::defensive!( - "Member somehow disapeared from storage after it was inserted" - ); - } - }); - Members::::mutate(&member_to_swap, |m| { - if let Some(member) = m { - member.index = member_count; - } else { - frame_support::defensive!( - "Member somehow disapeared from storage after it was queried" - ); - } - }); + // Migrate Members from old::Members old::Strikes old::Vouching + let mut member_count = 0; + for member in old::Members::::take() { + let strikes = old::Strikes::::take(&member); + let vouching = old::Vouching::::take(&member); + let record = MemberRecord { index: member_count, rank: 0, strikes, vouching }; + Members::::insert(&member, record); + MemberByIndex::::insert(member_count, &member); + + // The founder must be the first member in Society V2. If we find the founder not in + // index zero, we swap it with the first member. + if member == Founder::::get().defensive_ok_or("founder must always be set")? && + member_count > 0 + { + let member_to_swap = MemberByIndex::::get(0) + .defensive_ok_or("member_count > 0, we must have at least 1 member")?; + // Swap the founder with the first member in MemberByIndex. + MemberByIndex::::swap(0, member_count); + // Update the indicies of the swapped member MemberRecords. + Members::::mutate(&member, |m| { + if let Some(member) = m { + member.index = 0; + } else { + frame_support::defensive!( + "Member somehow disapeared from storage after it was inserted" + ); + } + }); + Members::::mutate(&member_to_swap, |m| { + if let Some(member) = m { + member.index = member_count; + } else { + frame_support::defensive!( + "Member somehow disapeared from storage after it was queried" + ); + } + }); + } + member_count.saturating_inc(); } - member_count.saturating_inc(); - } - MemberCount::::put(member_count); - - // Migrate Payouts from: old::Payouts and raw info (needed since we can't query old chain - // state). - past_payouts.sort(); - for (who, mut payouts) in old::Payouts::::iter() { - payouts.truncate(T::MaxPayouts::get() as usize); - // ^^ Safe since we already truncated. - let paid = past_payouts - .binary_search_by_key(&&who, |x| &x.0) - .ok() - .map(|p| past_payouts[p].1) - .unwrap_or(Zero::zero()); - match BoundedVec::try_from(payouts) { - Ok(payouts) => Payouts::::insert(who, PayoutRecord { paid, payouts }), - Err(_) => debug_assert!(false, "Truncation of Payouts ineffective??"), + MemberCount::::put(member_count); + + // Migrate Payouts from: old::Payouts and raw info (needed since we can't query old chain + // state). + past_payouts.sort(); + for (who, mut payouts) in old::Payouts::::iter() { + payouts.truncate(T::MaxPayouts::get() as usize); + // ^^ Safe since we already truncated. + let paid = past_payouts + .binary_search_by_key(&&who, |x| &x.0) + .ok() + .map(|p| past_payouts[p].1) + .unwrap_or(Zero::zero()); + match BoundedVec::try_from(payouts) { + Ok(payouts) => Payouts::::insert(who, PayoutRecord { paid, payouts }), + Err(_) => debug_assert!(false, "Truncation of Payouts ineffective??"), + } } - } - // Migrate SuspendedMembers from old::SuspendedMembers old::Strikes old::Vouching. - for who in old::SuspendedMembers::::iter_keys() { - let strikes = old::Strikes::::take(&who); - let vouching = old::Vouching::::take(&who); - let record = MemberRecord { index: 0, rank: 0, strikes, vouching }; - SuspendedMembers::::insert(&who, record); - } + // Migrate SuspendedMembers from old::SuspendedMembers old::Strikes old::Vouching. + for who in old::SuspendedMembers::::iter_keys() { + let strikes = old::Strikes::::take(&who); + let vouching = old::Vouching::::take(&who); + let record = MemberRecord { index: 0, rank: 0, strikes, vouching }; + SuspendedMembers::::insert(&who, record); + } - // Any suspended candidates remaining are rejected. - let _ = old::SuspendedCandidates::::clear(u32::MAX, None); + // Any suspended candidates remaining are rejected. + let _ = old::SuspendedCandidates::::clear(u32::MAX, None); - // We give the current defender the benefit of the doubt. - old::Defender::::kill(); - let _ = old::DefenderVotes::::clear(u32::MAX, None); + // We give the current defender the benefit of the doubt. + old::Defender::::kill(); + let _ = old::DefenderVotes::::clear(u32::MAX, None); - Ok(T::BlockWeights::get().max_block) -} + Ok(T::BlockWeights::get().max_block) + } -pub fn from_raw_past_payouts, I: Instance + 'static>( - past_payouts_raw: impl Iterator, -) -> Vec<(::AccountId, BalanceOf)> { - past_payouts_raw - .filter_map(|(x, y)| Some((Decode::decode(&mut &x[..]).ok()?, y.try_into().ok()?))) - .collect() + pub fn from_raw_past_payouts, I: Instance + 'static>( + past_payouts_raw: impl Iterator, + ) -> Vec<(::AccountId, BalanceOf)> { + past_payouts_raw + .filter_map(|(x, y)| Some((Decode::decode(&mut &x[..]).ok()?, y.try_into().ok()?))) + .collect() + } } diff --git a/substrate/frame/support/src/migrations.rs b/substrate/frame/support/src/migrations.rs index 08ba8baff972..ffcc60b7d6ff 100644 --- a/substrate/frame/support/src/migrations.rs +++ b/substrate/frame/support/src/migrations.rs @@ -43,6 +43,10 @@ use sp_std::marker::PhantomData; /// Otherwise, a warning is logged notifying the developer that the upgrade was a noop and should /// probably be removed. /// +/// It is STRONGLY RECOMMENDED to write the unversioned migration logic in a private module and +/// only export the versioned migration logic to prevent accidentally using the unversioned +/// migration in any runtimes. +/// /// ### Examples /// ```ignore /// // In file defining migrations @@ -58,24 +62,24 @@ use sp_std::marker::PhantomData; /// /// - https://github.com/rust-lang/rust/issues/30905 /// /// - https://internals.rust-lang.org/t/lang-team-minutes-private-in-public-rules/4504/40 /// mod version_unchecked { -/// use super::*; +/// use super::*; /// pub struct MigrateV5ToV6(sp_std::marker::PhantomData); /// impl OnRuntimeUpgrade for VersionUncheckedMigrateV5ToV6 { -/// // OnRuntimeUpgrade implementation... +/// // OnRuntimeUpgrade implementation... /// } /// } /// /// /// Public module containing *version checked* migration logic. /// /// /// /// This is the only module that should be exported from a migration module. -/// pub mod version_checked { +/// pub mod versioned { /// use super::*; -/// pub type VersionCheckedMigrateV5ToV6 = +/// pub type MigrateV5ToV6 = /// VersionedMigration< /// 5, /// 6, -/// VersionUncheckedMigrateV5ToV6, -/// crate::pallet::Pallet, +/// version_unchecked::MigrateV5ToV6, +/// crate::pallet::Pallet, /// ::DbWeight /// >; /// } @@ -83,7 +87,7 @@ use sp_std::marker::PhantomData; /// // Migrations tuple to pass to the Executive pallet: /// pub type Migrations = ( /// // other migrations... -/// version_checked::MigrateV5ToV6, +/// versioned::MigrateV5ToV6, /// // other migrations... /// ); /// ``` From d98a0fdfa3cd7e0f65c7dd69a4d300f8796010aa Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 11:11:57 +1000 Subject: [PATCH 08/98] docs --- substrate/frame/examples/storage-migrations/src/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index 5d1236d6a8bf..ad8d726eba72 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -126,6 +126,7 @@ //! passing it as a generic parameter to your [`Executive`](frame_executive) pallet: //! //! ```ignore +//! // Tuple of migrations (structs that implement `OnRuntimeUpgrade`) //! type Migrations = ( //! pallet_example_storage_migration::migrations::v1::versioned::MigrateV0ToV1 //! // ...more migrations here @@ -136,7 +137,7 @@ //! frame_system::ChainContext, //! Runtime, //! AllPalletsWithSystem, -//! Migrations, +//! Migrations, // <-- pass your migrations to Executive here //! >; //! ``` //! @@ -157,9 +158,9 @@ use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::traits::StorageVersion; use sp_runtime::RuntimeDebug; -/// Example struct holding the most recently set [`u32`] and the second most recently set [`u32`] -/// (if one existed). -#[docify::export] +/// Example struct holding the most recently set [`u32`] and the +/// second most recently set [`u32`] (if one existed). +#[docify::export(test)] #[derive( Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, scale_info::TypeInfo, MaxEncodedLen, )] From 48100f0770aad7d1b3b43b54c01cb2689151481d Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 11:44:40 +1000 Subject: [PATCH 09/98] docs --- .../examples/storage-migrations/src/lib.rs | 50 +++++++++++++++---- .../storage-migrations/src/migrations/v1.rs | 28 ++++++----- substrate/frame/support/src/traits/hooks.rs | 8 +-- 3 files changed, 59 insertions(+), 27 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index ad8d726eba72..d4c87980dbdd 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -31,7 +31,8 @@ //! between current and on-chain [`StorageVersion`]s //! ## How to read these docs -//! - Run `cargo doc --features try-runtime --package pallet-example-storage-migrations --open` +//! - Run `cargo doc --features try-runtime --package pallet-example-storage-migrations +//! --document-private-items --open` //! to view the documentation in your browser. //! - Follow along reading the source code referenced in the docs. //! @@ -101,24 +102,51 @@ //! ## Writing the Migration //! //! All code related to our migration can be found under -//! [`v1.rs`](crate::migrations::v1). See the migration source code for detailed comments. +//! [`v1.rs`](migrations::v1). //! -//! **First**, we define a [`storage_alias`](frame_support::storage_alias) for the old [`Value`] +//! See the migration source code for detailed comments. +//! +//! To keep our migration logic organised, it is split across different modules: +//! +//! ### `mod old` +//! +//! Here we define a [`storage_alias`](frame_support::storage_alias) for the old [`Value`] //! format. //! //! This allows reading the old value from storage during the migration. //! -//! **Second**, we define a struct -//! [`VersionUncheckedV0ToV1`](crate::migrations::v1::VersionUncheckedV0ToV1) which implements the -//! [`OnRuntimeUpgrade`](frame_support::traits::OnRuntimeUpgrade) trait and write basic unit tests. +//! ### `mod version_unchecked` +//! +//! Here we define our raw migration logic, +//! [`MigrateV0ToV1`](crate::migrations::v1::version_unchecked::MigrateV0ToV1) which implements the +//! [`OnRuntimeUpgrade`](frame_support::traits::OnRuntimeUpgrade) trait. +//! +//! Importantly, it is kept in a private module so that it cannot be accidentally used in a runtime. //! -//! **Finally**, we wrap [`VersionUncheckedV0ToV1`](crate::migrations::v1::VersionUncheckedV0ToV1) -//! in a [`VersionedMigration`](frame_support::migrations::VersionedMigration) to create -//! [`VersionCheckedV0ToV1`](crate::migrations::v1::VersionCheckedV0ToV1). +//! ### `pub mod versioned` //! +//! Here we wrap our +//! [`version_unchecked::MigrateV0ToV1`](crate::migrations::v1::version_unchecked::MigrateV0ToV1) +//! migration in a [`VersionedMigration`](frame_support::migrations::VersionedMigration) to get +//! [`versioned::MigrateV0ToV1`](crate::migrations::v1::versioned::MigrateV0ToV1) which we can use +//! in our runtimes. +//! +//! Wrapping our raw V0 to V1 migration in //! [`VersionedMigration`](frame_support::migrations::VersionedMigration) ensures that -//! - The migration only runs once, when the storage version is 0 -//! - The version is updated to 1 after the migration is run +//! - The migration only runs once when the on-chain storage version is `0` +//! - The on-chain storage version is updated to `1` after the migration executes +//! - Reads/Writes from checking/settings the on-chain storage version are accounted for +//! +//! This is the only public module. +//! +//! ### `mod test` +//! +//! Here we define some basic unit tests for our migration. +//! +//! When writing migration tests, it is important to check: +//! - `on_runtime_upgrade` returns the expected weight +//! - `post_upgrade` succeeds when given the bytes returned by `pre_upgrade` +//! - The storage is in the expected state after the migration //! //! ## Scheduling the Migration to run next runtime upgrade //! diff --git a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs index 32082268609e..4a46ece6f27b 100644 --- a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs +++ b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs @@ -23,7 +23,7 @@ use frame_support::{ /// Collection of storage item formats from the previous storage version. /// /// Required so we can read values in the old storage format during the migration. -mod old { +pub(crate) mod old { use super::*; /// V0 type for [`crate::Value`]. @@ -33,21 +33,21 @@ mod old { /// Private module containing *version unchecked* migration logic. /// -/// Should only be used by the [`VersionedMigration`] type in this module to create something to -/// export. +/// Should only be used by the [`VersionedMigration`](frame_support::migrations::VersionedMigration) +/// type in this module to create something to export. /// /// We keep this private so the unversioned migration cannot accidentally be used in any runtimes. /// /// For more about this pattern of keeping items private, see -/// - https://github.com/rust-lang/rust/issues/30905 -/// - https://internals.rust-lang.org/t/lang-team-minutes-private-in-public-rules/4504/40 -mod version_unchecked { +/// - +/// - +pub(crate) mod version_unchecked { use super::*; /// Implements [`OnRuntimeUpgrade`], migrating the state of this pallet from V0 to V1. /// - /// In V0 of the template [`crate::Value`] is just a `u32`. - /// In V1, it has been upgraded to contain the struct [`crate::CurrentAndPreviousValue`]. + /// In V0 of the template [`crate::Value`] is just a `u32`. In V1, it has been upgraded to + /// contain the struct [`crate::CurrentAndPreviousValue`]. /// /// In this migration, update the on-chain storage for the pallet to reflect the new storage /// layout. @@ -56,7 +56,7 @@ mod version_unchecked { impl OnRuntimeUpgrade for MigrateV0ToV1 { /// Return the existing [`crate::Value`] so we can check that it was correctly set in - /// [`VersionUncheckedV0ToV1::post_upgrade`]. + /// [`version_unchecked::MigrateV0ToV1::post_upgrade`]. #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { use codec::Encode; @@ -72,7 +72,7 @@ mod version_unchecked { /// If the value doesn't exist, there is nothing to do. /// /// If the value exists, it is read and then written back to storage inside a - /// [`crate::SomethingEntry`] with the `maybe_account_id` field set to `None`. + /// [`crate::CurrentAndPreviousValue`]. fn on_runtime_upgrade() -> frame_support::weights::Weight { // Read the old value from storage if let Some(old_value) = old::Value::::get() { @@ -91,8 +91,7 @@ mod version_unchecked { /// /// If there was no old value, the new value should not be set. /// - /// If there was an old value, the new value should be a - /// [`crate::SomethingEntry`] with the `maybe_account_id` field set to `None` + /// If there was an old value, the new value should be a [`crate::CurrentAndPreviousValue`]. #[cfg(feature = "try-runtime")] fn post_upgrade(state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { use codec::Decode; @@ -132,6 +131,11 @@ mod version_unchecked { pub mod versioned { use super::*; + /// [`version_unchecked::MigrateV0ToV1`] wrapped in a + /// [`VersionedMigration`](frame_support::migrations::VersionedMigration), which ensures that: + /// - The migration only runs once when the on-chain storage version is 0 + /// - The on-chain storage version is updated to `1` after the migration executes + /// - Reads/Writes from checking/settings the on-chain storage version are accounted for pub type MigrateV0ToV1 = frame_support::migrations::VersionedMigration< 0, // The migration will only execute when the on-chain storage version is 0 1, // The on-chain storage version will be set to 1 after the migration is complete diff --git a/substrate/frame/support/src/traits/hooks.rs b/substrate/frame/support/src/traits/hooks.rs index 22ab69ae7cad..163c5f568f4a 100644 --- a/substrate/frame/support/src/traits/hooks.rs +++ b/substrate/frame/support/src/traits/hooks.rs @@ -294,8 +294,8 @@ pub trait IntegrityTest { /// > because they are not part of the consensus/main block building logic. See /// > [`OffchainWorker`](crate::traits::misc::OffchainWorker) for more information. /// -/// To learn more about the execution of hooks see the FRAME [`Executive`](frame_executive) pallet -/// which is in charge of dispatching extrinsics and calling hooks in the correct order. +/// To learn more about the execution of hooks see the FRAME `Executive` pallet which is in charge +/// of dispatching extrinsics and calling hooks in the correct order. pub trait Hooks { /// Block initialization hook. This is called at the very beginning of block execution. /// @@ -347,8 +347,8 @@ pub trait Hooks { Weight::zero() } - /// Hook executed when a code change (aka. a "runtime upgrade") is detected by the - /// [`Executive`](frame_executive) pallet. + /// Hook executed when a code change (aka. a "runtime upgrade") is detected by the FRAME + /// `Executive` pallet. /// /// Be aware that this is called before [`Hooks::on_initialize`] of any pallet; therefore, a lot /// of the critical storage items such as `block_number` in system pallet might have not been From 986f0bde10166346cdf38b624d0575cba70705bb Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 11:46:41 +1000 Subject: [PATCH 10/98] note about pub(crate) --- .../frame/examples/storage-migrations/src/migrations/v1.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs index 4a46ece6f27b..85ea2e447716 100644 --- a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs +++ b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs @@ -23,6 +23,9 @@ use frame_support::{ /// Collection of storage item formats from the previous storage version. /// /// Required so we can read values in the old storage format during the migration. +/// +/// Note: this is only `pub(crate)` visibility so it can be referenced in the tutorial docs. +/// In regular migrations the visibility would just be `mod`. pub(crate) mod old { use super::*; @@ -41,6 +44,9 @@ pub(crate) mod old { /// For more about this pattern of keeping items private, see /// - /// - +/// +/// Note: this is only `pub(crate)` visibility so it can be referenced in the tutorial docs. +/// In regular migrations the visibility would just be `mod`. pub(crate) mod version_unchecked { use super::*; From 548316cc3cfb09ab07ca6a4d783ea87351f82f2a Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 12:43:01 +1000 Subject: [PATCH 11/98] migration safely docs --- .../examples/storage-migrations/src/lib.rs | 60 ++++++++++++++++--- 1 file changed, 51 insertions(+), 9 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index d4c87980dbdd..2ee962aac55c 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -44,7 +44,7 @@ //! For the purposes of this exercise, we imagine that in [`StorageVersion`] V0 of this pallet //! [`Value`](pallet::Value) is a `u32`, and this what is currently stored on-chain. //! -//! ```ignore +//! ```rust //! // V0 Storage Value //! pub type Value = StorageValue<_, u32>; //! ``` @@ -52,7 +52,7 @@ //! //! In [`StorageVersion`] V1 of the pallet a new struct [`CurrentAndPreviousValue`] is introduced: //! -//! ```ignore +//! ```rust //! pub struct CurrentAndPreviousValue { //! /// The most recently set value. //! pub current: u32, @@ -63,7 +63,7 @@ //! //! and [`Value`](pallet::Value) is updated to store this new struct instead of a `u32`: //! -//! ```ignore +//! ```rust //! // V1 Storage Value //! pub type Value = StorageValue<_, CurrentAndPreviousValue>; //! ``` @@ -99,6 +99,13 @@ //! This structure allows us to keep the migration logic separate from the pallet definition, and //! easily add new migrations in the future. //! +//! Note that we're opting to write our storage migration logic attached to a standalone struct +//! implementing [`OnRuntimeUpgrade`](frame_support::traits::OnRuntimeUpgrade), rather +//! than implementing the +//! [`Hooks::on_runtime_upgrade`](frame_support::traits::Hooks::on_runtime_upgrade) hook directly on +//! our pallet. The pallet hook is better suited for executing other types of logic that needs to +//! execute on runtime upgrade, but not so much storage migrations. +//! //! ## Writing the Migration //! //! All code related to our migration can be found under @@ -128,14 +135,15 @@ //! Here we wrap our //! [`version_unchecked::MigrateV0ToV1`](crate::migrations::v1::version_unchecked::MigrateV0ToV1) //! migration in a [`VersionedMigration`](frame_support::migrations::VersionedMigration) to get -//! [`versioned::MigrateV0ToV1`](crate::migrations::v1::versioned::MigrateV0ToV1) which we can use -//! in our runtimes. +//! [`versioned::MigrateV0ToV1`](crate::migrations::v1::versioned::MigrateV0ToV1) which may be used +//! in runtimes. //! //! Wrapping our raw V0 to V1 migration in //! [`VersionedMigration`](frame_support::migrations::VersionedMigration) ensures that //! - The migration only runs once when the on-chain storage version is `0` //! - The on-chain storage version is updated to `1` after the migration executes -//! - Reads/Writes from checking/settings the on-chain storage version are accounted for +//! - Reads and writes from checking and setting the on-chain storage version are accounted for in +//! the final [`Weight`](frame_support::weights::Weight) //! //! This is the only public module. //! @@ -153,7 +161,7 @@ //! We're almost done! The last step is to schedule the migration to run next runtime upgrade //! passing it as a generic parameter to your [`Executive`](frame_executive) pallet: //! -//! ```ignore +//! ```rust //! // Tuple of migrations (structs that implement `OnRuntimeUpgrade`) //! type Migrations = ( //! pallet_example_storage_migration::migrations::v1::versioned::MigrateV0ToV1 @@ -169,9 +177,43 @@ //! >; //! ``` //! -//! ## IMPORTANT: Testing your migration with real state +//! ## Ensuring Migraiton Safety +//! +//! We've written unit tests for our migration and they pass, so it should be safe to deploy right? +//! +//! No! Unit tests execute the migration in a very simple test environment, and cannot account +//! for the complexities of a real runtime or real on-chain state. +//! +//! Prior to deploying our migrations, we must perform additional checks to ensure that when run +//! in our real runtime they will not: +//! - Panic, bricking our parachain +//! - Touch too many storage keys resulting an excessively large PoV, bricking our parachain +//! - Take too long to execute, bricking our parachain +//! +//! The [`try-runtime-cli`](https://github.com/paritytech/try-runtime-cli) tool has a sub-command +//! [`on-runtime-upgrade`](https://paritytech.github.io/try-runtime-cli/try_runtime_core/commands/enum.Action.html#variant.OnRuntimeUpgrade) +//! which is designed to help with exactly this. +//! +//! Developers MUST run this command before deploying migrations to ensure they will not +//! inadvertently result in a bricked chain. +//! +//! ### A Note on the Manipulability of PoV Size and Execution Time +//! +//! While [`try-runtime-cli`](https://github.com/paritytech/try-runtime-cli) can help ensure with +//! very high certianty that a migration will succeed given **existing** on-chain state, it cannot +//! prevent a malicious actor from manipulating state in a way that will cause the migration to take +//! longer or produce a PoV much larger than previously measured. +//! +//! Therefore, it is important to write migrations in such a way that the execution time or PoV size +//! it adds to the block cannot be easily manipulated. e.g., in your migration, do not iterate over +//! storage that can quickly or cheaply be bloated. +//! +//! ### A Note on Multi-Block Migrations //! -//! - Dry-running migrations with real state using [`try-runtime-cli`](https://paritytech.github.io/try-runtime-cli/try_runtime_core/commands/enum.Action.html#variant.OnRuntimeUpgrade) +//! For large migrations that cannot be safely executed in a single block, a feature for writing +//! simple and safe [multi-block migrations](https://github.com/paritytech/polkadot-sdk/issues/198) +//! feature is [under active development](https://github.com/paritytech/substrate/pull/14275) and +//! planned for release before the end of 2023. // We make sure this pallet uses `no_std` for compiling to Wasm. #![cfg_attr(not(feature = "std"), no_std)] From 49252434b1ec44cf32d4aa103afcda29ce38b5b9 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 12:52:03 +1000 Subject: [PATCH 12/98] typo --- polkadot/xcm/pallet-xcm/src/migration.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/polkadot/xcm/pallet-xcm/src/migration.rs b/polkadot/xcm/pallet-xcm/src/migration.rs index 919e5c32183d..8962e307ecce 100644 --- a/polkadot/xcm/pallet-xcm/src/migration.rs +++ b/polkadot/xcm/pallet-xcm/src/migration.rs @@ -61,12 +61,13 @@ pub mod v1 { } pub mod versioned { + use super::*; + /// Version checked migration to v1. /// - /// Wrapped in [`frame_support::migrations::VersionedMigration`] so the pre/post checks - /// don't begin failing after the upgrade is enacted on-chain. - use super::*; - pub type VersionCheckedMigrateToV1 = frame_support::migrations::VersionedMigration< + /// Wrapped in [`VersionedMigration`](frame_support::migrations::VersionedMigration) so + /// the pre/post checks don't begin failing after the upgrade is enacted on-chain. + pub type MigrateV0ToV1 = frame_support::migrations::VersionedMigration< 0, 1, version_unchecked::MigrateV0ToV1, From 7d75a7566b7031c447b2f59f61cf9310fbe64dec Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 13:07:45 +1000 Subject: [PATCH 13/98] docs --- .../examples/storage-migrations/src/lib.rs | 90 +++++++++---------- .../storage-migrations/src/migrations/mod.rs | 2 + .../examples/storage-migrations/src/mock.rs | 3 +- 3 files changed, 48 insertions(+), 47 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index 2ee962aac55c..577b24c5948e 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -20,8 +20,8 @@ //! An example pallet explaining why storage migrations are necessary and demonstrating //! best-practices for writing them. //! -//! It is intended to be used as a reference for writing migrations in other pallets, and is not -//! meant to be used in production. +//! It is intended to be a resource for guiding a developer from knowing nothing about storage +//! migrations to being able to write safe, well tested, versioned migrations for their own pallets. //! //! ## Prerequisites //! @@ -34,7 +34,7 @@ //! - Run `cargo doc --features try-runtime --package pallet-example-storage-migrations //! --document-private-items --open` //! to view the documentation in your browser. -//! - Follow along reading the source code referenced in the docs. +//! - Read the relevant source code as your read the docs. //! //! ## Pallet Overview //! @@ -74,18 +74,18 @@ //! //! ## Why a migration is necessary //! -//! There now exists a discrepancy between the on-chain storage for [`Value`] (in V0 it is a `u32`) -//! and the current storage for [`Value`] (in V1 it is a [`CurrentAndPreviousValue`] struct). +//! Without a migration, there will be a discrepancy between the on-chain storage for [`Value`] (in +//! V0 it is a `u32`) and the current storage for [`Value`] (in V1 it was changed to a +//! [`CurrentAndPreviousValue`] struct). //! -//! If this pallet was deployed without a migration, the on-chain storage for [`Value`] would be a -//! `u32` but the runtime would try to read it as a [`CurrentAndPreviousValue`]. This would -//! result in unacceptable undefined behavior. +//! The on-chain storage for [`Value`] would be a `u32` but the runtime would try to read it as a +//! [`CurrentAndPreviousValue`]. This would result in unacceptable undefined behavior. //! //! ## Adding a migration module //! -//! Writing a migration module is not required, but highly recommended. +//! Containing a pallets migrations in a seperate module is strongly recommended. //! -//! Here's how we structure our migration module for this pallet: +//! Here's how the migration module is defined for this pallet: //! //! ```text //! substrate/frame/examples/storage-migrations/src/ @@ -96,24 +96,17 @@ //! └── v1.rs <-- migration logic for the V0 to V1 transition //! ``` //! -//! This structure allows us to keep the migration logic separate from the pallet definition, and -//! easily add new migrations in the future. -//! -//! Note that we're opting to write our storage migration logic attached to a standalone struct -//! implementing [`OnRuntimeUpgrade`](frame_support::traits::OnRuntimeUpgrade), rather -//! than implementing the -//! [`Hooks::on_runtime_upgrade`](frame_support::traits::Hooks::on_runtime_upgrade) hook directly on -//! our pallet. The pallet hook is better suited for executing other types of logic that needs to -//! execute on runtime upgrade, but not so much storage migrations. +//! This structure allows keeping migration logic separate from the pallet logic and +//! easily adding new migrations in the future. //! //! ## Writing the Migration //! -//! All code related to our migration can be found under +//! All code related to the migration can be found under //! [`v1.rs`](migrations::v1). //! //! See the migration source code for detailed comments. //! -//! To keep our migration logic organised, it is split across different modules: +//! To keep the migration logic organised, it is split across additional modules: //! //! ### `mod old` //! @@ -130,36 +123,44 @@ //! //! Importantly, it is kept in a private module so that it cannot be accidentally used in a runtime. //! +//! #### Standalone Struct or Pallet Hook? +//! +//! Note that the storage migration logic is attached to a standalone struct implementing +//! [`OnRuntimeUpgrade`](frame_support::traits::OnRuntimeUpgrade), rather than implementing the +//! [`Hooks::on_runtime_upgrade`](frame_support::traits::Hooks::on_runtime_upgrade) hook directly on +//! the pallet. The pallet hook is better suited for executing other types of logic that needs to +//! execute on runtime upgrade, but not so much storage migrations. +//! //! ### `pub mod versioned` //! -//! Here we wrap our -//! [`version_unchecked::MigrateV0ToV1`](crate::migrations::v1::version_unchecked::MigrateV0ToV1) -//! migration in a [`VersionedMigration`](frame_support::migrations::VersionedMigration) to get -//! [`versioned::MigrateV0ToV1`](crate::migrations::v1::versioned::MigrateV0ToV1) which may be used +//! Here, +//! [`version_unchecked::MigrateV0ToV1`](crate::migrations::v1::version_unchecked::MigrateV0ToV1) is +//! wrapped in a [`VersionedMigration`](frame_support::migrations::VersionedMigration) to define +//! [`versioned::MigrateV0ToV1`](crate::migrations::v1::versioned::MigrateV0ToV1), which may be used //! in runtimes. //! -//! Wrapping our raw V0 to V1 migration in +//! Using //! [`VersionedMigration`](frame_support::migrations::VersionedMigration) ensures that //! - The migration only runs once when the on-chain storage version is `0` //! - The on-chain storage version is updated to `1` after the migration executes //! - Reads and writes from checking and setting the on-chain storage version are accounted for in //! the final [`Weight`](frame_support::weights::Weight) //! -//! This is the only public module. +//! This is the only public module exported from `v1`. //! //! ### `mod test` //! -//! Here we define some basic unit tests for our migration. +//! Here basic unit tests are defined for the migration. //! -//! When writing migration tests, it is important to check: +//! When writing migration tests, don't forget to check: //! - `on_runtime_upgrade` returns the expected weight //! - `post_upgrade` succeeds when given the bytes returned by `pre_upgrade` -//! - The storage is in the expected state after the migration +//! - Pallet storage is in the expected state after the migration //! -//! ## Scheduling the Migration to run next runtime upgrade +//! ## Scheduling the Migration to Run Next Runtime Upgrade //! -//! We're almost done! The last step is to schedule the migration to run next runtime upgrade -//! passing it as a generic parameter to your [`Executive`](frame_executive) pallet: +//! Almost done! The last step is to schedule the migration to run next runtime upgrade passing it +//! as a generic parameter to your [`Executive`](frame_executive) pallet: //! //! ```rust //! // Tuple of migrations (structs that implement `OnRuntimeUpgrade`) @@ -179,16 +180,17 @@ //! //! ## Ensuring Migraiton Safety //! -//! We've written unit tests for our migration and they pass, so it should be safe to deploy right? +//! "My migration unit tests pass, so it should be safe to deploy right?" //! //! No! Unit tests execute the migration in a very simple test environment, and cannot account //! for the complexities of a real runtime or real on-chain state. //! -//! Prior to deploying our migrations, we must perform additional checks to ensure that when run -//! in our real runtime they will not: -//! - Panic, bricking our parachain -//! - Touch too many storage keys resulting an excessively large PoV, bricking our parachain -//! - Take too long to execute, bricking our parachain +//! Prior to deploying migrations, it is CRITICAL to perform additional checks to ensure that when +//! run in our real runtime they will not: +//! - Panic (bricking the chain!) +//! - Touch too many storage keys resulting an excessively large PoV (potentially bricking the +//! chain) +//! - Take too long to execute (potentially bricking the chain) //! //! The [`try-runtime-cli`](https://github.com/paritytech/try-runtime-cli) tool has a sub-command //! [`on-runtime-upgrade`](https://paritytech.github.io/try-runtime-cli/try_runtime_core/commands/enum.Action.html#variant.OnRuntimeUpgrade) @@ -221,7 +223,7 @@ // Re-export pallet items so that they can be accessed from the crate namespace. pub use pallet::*; -// We export the migrations so they may be used in the runtime. +// Export migrations so they may be used in the runtime. pub mod migrations; mod mock; use codec::{Decode, Encode, MaxEncodedLen}; @@ -230,7 +232,6 @@ use sp_runtime::RuntimeDebug; /// Example struct holding the most recently set [`u32`] and the /// second most recently set [`u32`] (if one existed). -#[docify::export(test)] #[derive( Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, scale_info::TypeInfo, MaxEncodedLen, )] @@ -241,15 +242,14 @@ pub struct CurrentAndPreviousValue { pub previous: Option, } -// All pallet logic is defined in its own module and must be annotated by the `pallet` attribute. +// Pallet for demonstrating storage migrations. #[frame_support::pallet(dev_mode)] pub mod pallet { - // Import various useful types required by all FRAME pallets. use super::*; use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; - /// Here we define the current [`StorageVersion`] of the pallet. + /// Define the current [`StorageVersion`] of the pallet. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::pallet] @@ -267,10 +267,8 @@ pub mod pallet { impl Pallet { #[pallet::call_index(0)] pub fn set_value(origin: OriginFor, value: u32) -> DispatchResult { - // Check that the extrinsic was signed. ensure_signed(origin)?; - // Set the value in storage. let previous = Value::::get().map(|v| v.current); let new_struct = CurrentAndPreviousValue { current: value, previous }; >::put(new_struct); diff --git a/substrate/frame/examples/storage-migrations/src/migrations/mod.rs b/substrate/frame/examples/storage-migrations/src/migrations/mod.rs index a3a6d96c3f59..19f1ac92220d 100644 --- a/substrate/frame/examples/storage-migrations/src/migrations/mod.rs +++ b/substrate/frame/examples/storage-migrations/src/migrations/mod.rs @@ -1 +1,3 @@ +/// Module containing all logic associated with the example migration from +/// [`StorageVersion`](frame_support::traits::StorageVersion) V0 to V1. pub mod v1; diff --git a/substrate/frame/examples/storage-migrations/src/mock.rs b/substrate/frame/examples/storage-migrations/src/mock.rs index 538d56cd1939..b27d8950c213 100644 --- a/substrate/frame/examples/storage-migrations/src/mock.rs +++ b/substrate/frame/examples/storage-migrations/src/mock.rs @@ -2,7 +2,8 @@ use crate::*; use frame_support::{traits::ConstU64, weights::constants::ParityDbWeight}; use sp_core::H256; use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; -// Reexport crate as its pallet name for construct_runtime. + +// Re-export crate as its pallet name for construct_runtime. use crate as pallet_example_storage_migration; type Block = frame_system::mocking::MockBlock; From 6858f3caa5cf9df9e4e6c13370f337294be70a05 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 13:11:16 +1000 Subject: [PATCH 14/98] docs --- substrate/frame/examples/storage-migrations/src/lib.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index 577b24c5948e..729cf238b142 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -186,11 +186,10 @@ //! for the complexities of a real runtime or real on-chain state. //! //! Prior to deploying migrations, it is CRITICAL to perform additional checks to ensure that when -//! run in our real runtime they will not: -//! - Panic (bricking the chain!) -//! - Touch too many storage keys resulting an excessively large PoV (potentially bricking the -//! chain) -//! - Take too long to execute (potentially bricking the chain) +//! run in our real runtime they will not brick the chain due to: +//! - Panicing +//! - Touching too many storage keys and resulting in an excessively large PoV +//! - Taking too long to execute //! //! The [`try-runtime-cli`](https://github.com/paritytech/try-runtime-cli) tool has a sub-command //! [`on-runtime-upgrade`](https://paritytech.github.io/try-runtime-cli/try_runtime_core/commands/enum.Action.html#variant.OnRuntimeUpgrade) From 8446ad27c36b455bb9fc4767c00991243d4c3638 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 13:18:54 +1000 Subject: [PATCH 15/98] doctest false --- substrate/frame/examples/storage-migrations/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/substrate/frame/examples/storage-migrations/Cargo.toml b/substrate/frame/examples/storage-migrations/Cargo.toml index c422b4a9e8fa..1809088c43e2 100644 --- a/substrate/frame/examples/storage-migrations/Cargo.toml +++ b/substrate/frame/examples/storage-migrations/Cargo.toml @@ -8,6 +8,9 @@ homepage = "https://substrate.io" repository.workspace = true description = "FRAME example pallet demonstrating best-practices for writing storage migrations." +[lib] +doctest = false + [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] From bdb1ae55ea7133342da508a97080dc37e8ac0d9e Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 13:19:02 +1000 Subject: [PATCH 16/98] note on chopsticks --- .../examples/storage-migrations/src/lib.rs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index 729cf238b142..656b101bb65e 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -44,7 +44,7 @@ //! For the purposes of this exercise, we imagine that in [`StorageVersion`] V0 of this pallet //! [`Value`](pallet::Value) is a `u32`, and this what is currently stored on-chain. //! -//! ```rust +//! ``` //! // V0 Storage Value //! pub type Value = StorageValue<_, u32>; //! ``` @@ -52,7 +52,7 @@ //! //! In [`StorageVersion`] V1 of the pallet a new struct [`CurrentAndPreviousValue`] is introduced: //! -//! ```rust +//! ``` //! pub struct CurrentAndPreviousValue { //! /// The most recently set value. //! pub current: u32, @@ -63,7 +63,7 @@ //! //! and [`Value`](pallet::Value) is updated to store this new struct instead of a `u32`: //! -//! ```rust +//! ``` //! // V1 Storage Value //! pub type Value = StorageValue<_, CurrentAndPreviousValue>; //! ``` @@ -162,7 +162,7 @@ //! Almost done! The last step is to schedule the migration to run next runtime upgrade passing it //! as a generic parameter to your [`Executive`](frame_executive) pallet: //! -//! ```rust +//! ``` //! // Tuple of migrations (structs that implement `OnRuntimeUpgrade`) //! type Migrations = ( //! pallet_example_storage_migration::migrations::v1::versioned::MigrateV0ToV1 @@ -198,7 +198,7 @@ //! Developers MUST run this command before deploying migrations to ensure they will not //! inadvertently result in a bricked chain. //! -//! ### A Note on the Manipulability of PoV Size and Execution Time +//! ### Note on the Manipulability of PoV Size and Execution Time //! //! While [`try-runtime-cli`](https://github.com/paritytech/try-runtime-cli) can help ensure with //! very high certianty that a migration will succeed given **existing** on-chain state, it cannot @@ -209,12 +209,18 @@ //! it adds to the block cannot be easily manipulated. e.g., in your migration, do not iterate over //! storage that can quickly or cheaply be bloated. //! -//! ### A Note on Multi-Block Migrations +//! ### Note on Multi-Block Migrations //! //! For large migrations that cannot be safely executed in a single block, a feature for writing //! simple and safe [multi-block migrations](https://github.com/paritytech/polkadot-sdk/issues/198) //! feature is [under active development](https://github.com/paritytech/substrate/pull/14275) and //! planned for release before the end of 2023. +//! +//! ### Note on Other Tools +//! +//! [`Chopsticks`](https://github.com/AcalaNetwork/chopsticks) is another tool in the Substrate +//! ecosystem which developers may find useful to use in addition to `try-runtime-cli` when testing +//! their migrations. // We make sure this pallet uses `no_std` for compiling to Wasm. #![cfg_attr(not(feature = "std"), no_std)] @@ -224,6 +230,7 @@ pub use pallet::*; // Export migrations so they may be used in the runtime. pub mod migrations; +#[doc(hidden)] mod mock; use codec::{Decode, Encode, MaxEncodedLen}; use frame_support::traits::StorageVersion; From 35b08fd3a32a435ecb56b724d9529dece29fd775 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 14:35:28 +1000 Subject: [PATCH 17/98] fix society tests --- substrate/frame/society/src/mock.rs | 2 +- substrate/frame/society/src/tests.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/substrate/frame/society/src/mock.rs b/substrate/frame/society/src/mock.rs index a318c2e794b7..32c84df77c07 100644 --- a/substrate/frame/society/src/mock.rs +++ b/substrate/frame/society/src/mock.rs @@ -160,7 +160,7 @@ impl EnvBuilder { assert!(Society::found_society(Origin::signed(1), 10, 10, 8, 2, 25, r).is_ok()); } let r = f(); - migrations::assert_internal_consistency::(); + migrations::v2::assert_internal_consistency::(); r }) } diff --git a/substrate/frame/society/src/tests.rs b/substrate/frame/society/src/tests.rs index ea2afef3b32b..1ce1bf005db9 100644 --- a/substrate/frame/society/src/tests.rs +++ b/substrate/frame/society/src/tests.rs @@ -18,7 +18,7 @@ //! Tests for the module. use super::*; -use migrations::old; +use migrations::v2::old; use mock::*; use frame_support::{assert_noop, assert_ok}; @@ -77,8 +77,8 @@ fn migration_works() { .collect::>(); old::Bids::::put(bids); - migrations::from_original::(&mut [][..]).expect("migration failed"); - migrations::assert_internal_consistency::(); + migrations::v2::from_original::(&mut [][..]).expect("migration failed"); + migrations::v2::assert_internal_consistency::(); assert_eq!( membership(), From 1fa52078cbb7eb6d35257c1fce9853b7c9dc0e11 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 14:40:20 +1000 Subject: [PATCH 18/98] zepter --- substrate/frame/examples/storage-migrations/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/Cargo.toml b/substrate/frame/examples/storage-migrations/Cargo.toml index 1809088c43e2..f2bac61c6c12 100644 --- a/substrate/frame/examples/storage-migrations/Cargo.toml +++ b/substrate/frame/examples/storage-migrations/Cargo.toml @@ -35,10 +35,10 @@ sp-io = { path = "../../../primitives/io" } default = [ "std" ] std = [ "codec/std", + "frame-executive/std", "frame-support/std", "frame-system/std", "frame-try-runtime/std", - "frame-executive/std", "pallet-balances/std", "scale-info/std", "sp-core/std", @@ -53,10 +53,10 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", ] try-runtime = [ + "frame-executive/try-runtime", "frame-support/try-runtime", "frame-system/try-runtime", "frame-try-runtime/try-runtime", - "frame-executive/try-runtime", "pallet-balances/try-runtime", "sp-runtime/try-runtime", ] From ebf4cd597ff0d52fa622a88c1c5a9c921cab78e5 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 14:43:50 +1000 Subject: [PATCH 19/98] fix feature propagation --- substrate/frame/examples/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/substrate/frame/examples/Cargo.toml b/substrate/frame/examples/Cargo.toml index 1bd04f470a8d..cef51cceb0b1 100644 --- a/substrate/frame/examples/Cargo.toml +++ b/substrate/frame/examples/Cargo.toml @@ -37,4 +37,5 @@ try-runtime = [ "pallet-example-kitchensink/try-runtime", "pallet-example-offchain-worker/try-runtime", "pallet-example-split/try-runtime", + "pallet-example-storage-migrations/try-runtime" ] From 3f55db70dd2fbb8303bdfd5169713ae7ecc3e6ad Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 14:45:50 +1000 Subject: [PATCH 20/98] add licences --- .../storage-migrations/src/migrations/mod.rs | 17 +++++++++++++++++ .../examples/storage-migrations/src/mock.rs | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/substrate/frame/examples/storage-migrations/src/migrations/mod.rs b/substrate/frame/examples/storage-migrations/src/migrations/mod.rs index 19f1ac92220d..80a33f69941a 100644 --- a/substrate/frame/examples/storage-migrations/src/migrations/mod.rs +++ b/substrate/frame/examples/storage-migrations/src/migrations/mod.rs @@ -1,3 +1,20 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + /// Module containing all logic associated with the example migration from /// [`StorageVersion`](frame_support::traits::StorageVersion) V0 to V1. pub mod v1; diff --git a/substrate/frame/examples/storage-migrations/src/mock.rs b/substrate/frame/examples/storage-migrations/src/mock.rs index b27d8950c213..87ebcf1a3c1d 100644 --- a/substrate/frame/examples/storage-migrations/src/mock.rs +++ b/substrate/frame/examples/storage-migrations/src/mock.rs @@ -1,3 +1,20 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + use crate::*; use frame_support::{traits::ConstU64, weights::constants::ParityDbWeight}; use sp_core::H256; From ca0e4e343e892a150c4366d9f71e7515f896028b Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 14:54:51 +1000 Subject: [PATCH 21/98] format features --- Cargo.lock | 8 ++++---- substrate/frame/examples/Cargo.toml | 2 +- substrate/frame/examples/storage-migrations/Cargo.toml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6ce68f33778f..4ff3552d4db6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4455,18 +4455,18 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "docify" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029de870d175d11969524d91a3fb2cbf6d488b853bff99d41cf65e533ac7d9d2" +checksum = "8c69c651fd3125396ad00fca5abd4b2681708bfe486a91b81fdbeed583888756" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac43324656a1b05eb0186deb51f27d2d891c704c37f34de281ef6297ba193e5" +checksum = "50c5fd210c8f0446a9d4768cdd125a0de528f159dd71d301891f7e2b8fe40b0d" dependencies = [ "common-path", "derive-syn-parse", diff --git a/substrate/frame/examples/Cargo.toml b/substrate/frame/examples/Cargo.toml index cef51cceb0b1..15dbb9c859ea 100644 --- a/substrate/frame/examples/Cargo.toml +++ b/substrate/frame/examples/Cargo.toml @@ -37,5 +37,5 @@ try-runtime = [ "pallet-example-kitchensink/try-runtime", "pallet-example-offchain-worker/try-runtime", "pallet-example-split/try-runtime", - "pallet-example-storage-migrations/try-runtime" + "pallet-example-storage-migrations/try-runtime", ] diff --git a/substrate/frame/examples/storage-migrations/Cargo.toml b/substrate/frame/examples/storage-migrations/Cargo.toml index f2bac61c6c12..dbc92cc8ddbf 100644 --- a/substrate/frame/examples/storage-migrations/Cargo.toml +++ b/substrate/frame/examples/storage-migrations/Cargo.toml @@ -15,7 +15,7 @@ doctest = false targets = ["x86_64-unknown-linux-gnu"] [dependencies] -docify = "0.2.1" +docify = "0.2.2" log = { version = "0.4.20", default-features = false } codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [ "derive", From 34da4a0c1f66510f0ec42b34ad3ebc7121ee64f7 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 15:00:50 +1000 Subject: [PATCH 22/98] fix doc visibility issue --- .../examples/storage-migrations/src/lib.rs | 3 +-- .../storage-migrations/src/migrations/v1.rs | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index 656b101bb65e..757e0fa6b225 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -31,8 +31,7 @@ //! between current and on-chain [`StorageVersion`]s //! ## How to read these docs -//! - Run `cargo doc --features try-runtime --package pallet-example-storage-migrations -//! --document-private-items --open` +//! - Run `cargo doc --features try-runtime --package pallet-example-storage-migrations --open` //! to view the documentation in your browser. //! - Read the relevant source code as your read the docs. //! diff --git a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs index 85ea2e447716..5bb1998e136d 100644 --- a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs +++ b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs @@ -24,9 +24,10 @@ use frame_support::{ /// /// Required so we can read values in the old storage format during the migration. /// -/// Note: this is only `pub(crate)` visibility so it can be referenced in the tutorial docs. -/// In regular migrations the visibility would just be `mod`. -pub(crate) mod old { +/// This module is `pub` so it can be referenced in the docs of this example pallet. +/// +/// Regular migrations should declare this module as private. +pub mod old { use super::*; /// V0 type for [`crate::Value`]. @@ -36,18 +37,20 @@ pub(crate) mod old { /// Private module containing *version unchecked* migration logic. /// +/// This module is `pub` so it can be referenced in the docs of this example pallet. +/// +/// Regular migrations should declare this module as private. +/// /// Should only be used by the [`VersionedMigration`](frame_support::migrations::VersionedMigration) /// type in this module to create something to export. /// -/// We keep this private so the unversioned migration cannot accidentally be used in any runtimes. +/// The unversioned migration should be kept private so the unversioned migration cannot +/// accidentally be used in any runtimes. /// /// For more about this pattern of keeping items private, see /// - /// - -/// -/// Note: this is only `pub(crate)` visibility so it can be referenced in the tutorial docs. -/// In regular migrations the visibility would just be `mod`. -pub(crate) mod version_unchecked { +pub mod version_unchecked { use super::*; /// Implements [`OnRuntimeUpgrade`], migrating the state of this pallet from V0 to V1. From 009a958f72b64833e2c1965ad6f647e486e2837f Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 15:02:47 +1000 Subject: [PATCH 23/98] improve docs --- .../frame/examples/storage-migrations/src/migrations/v1.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs index 5bb1998e136d..b3d5f95d791e 100644 --- a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs +++ b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs @@ -26,7 +26,8 @@ use frame_support::{ /// /// This module is `pub` so it can be referenced in the docs of this example pallet. /// -/// Regular migrations should declare this module as private. +/// Real migrations should declare this module as private by declaring `mod old` +/// instead of `pub mod old`. pub mod old { use super::*; @@ -39,7 +40,8 @@ pub mod old { /// /// This module is `pub` so it can be referenced in the docs of this example pallet. /// -/// Regular migrations should declare this module as private. +/// Real migrations should declare this module as private by declaring `mod version_unchecked` +/// instead of `pub mod version_unchecked`. /// /// Should only be used by the [`VersionedMigration`](frame_support::migrations::VersionedMigration) /// type in this module to create something to export. From 1aa35555ec565d8e6c84d77b144836d204708985 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 15:06:50 +1000 Subject: [PATCH 24/98] fix std propagataion --- substrate/frame/examples/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/substrate/frame/examples/Cargo.toml b/substrate/frame/examples/Cargo.toml index 15dbb9c859ea..a64e49ed5b50 100644 --- a/substrate/frame/examples/Cargo.toml +++ b/substrate/frame/examples/Cargo.toml @@ -29,6 +29,7 @@ std = [ "pallet-example-kitchensink/std", "pallet-example-offchain-worker/std", "pallet-example-split/std", + "pallet-example-storage-migrations/std" ] try-runtime = [ "pallet-default-config-example/try-runtime", From fc08b0e594c989ed45da991259fae5f388b24f05 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 15:10:24 +1000 Subject: [PATCH 25/98] zepter --- substrate/frame/examples/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/examples/Cargo.toml b/substrate/frame/examples/Cargo.toml index a64e49ed5b50..a3ac6b0b92cf 100644 --- a/substrate/frame/examples/Cargo.toml +++ b/substrate/frame/examples/Cargo.toml @@ -29,7 +29,7 @@ std = [ "pallet-example-kitchensink/std", "pallet-example-offchain-worker/std", "pallet-example-split/std", - "pallet-example-storage-migrations/std" + "pallet-example-storage-migrations/std", ] try-runtime = [ "pallet-default-config-example/try-runtime", From 01b780ab6f5f39d510d9085e3cc5f71b654aae88 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 15:17:19 +1000 Subject: [PATCH 26/98] fix broken link --- polkadot/runtime/common/src/assigned_slots/migration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polkadot/runtime/common/src/assigned_slots/migration.rs b/polkadot/runtime/common/src/assigned_slots/migration.rs index 233e0c386f97..9e5570a33557 100644 --- a/polkadot/runtime/common/src/assigned_slots/migration.rs +++ b/polkadot/runtime/common/src/assigned_slots/migration.rs @@ -70,7 +70,7 @@ pub mod v1 { pub mod versioned { use super::*; - /// [`version_unchecked::MigrateToV1`] wrapped in a + /// [`version_unchecked::MigrateV0ToV1`] wrapped in a /// [`VersionedMigration`](frame_support::migrations::VersionedMigration), ensuring the /// migration is only performed when on-chain version is 0. pub type MigrateV0ToV1 = frame_support::migrations::VersionedMigration< From adcfeaf330a9915b0d78d001089983028c5e15c8 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 15:18:51 +1000 Subject: [PATCH 27/98] dont ref private item --- substrate/frame/society/src/migrations.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/society/src/migrations.rs b/substrate/frame/society/src/migrations.rs index 5dc3db1b8bd1..39918ee630d6 100644 --- a/substrate/frame/society/src/migrations.rs +++ b/substrate/frame/society/src/migrations.rs @@ -101,7 +101,7 @@ pub mod v2 { pub mod versioned { use super::*; - /// [`version_unchecked::MigrateV0ToV2`] wrapped in a + /// `version_unchecked::MigrateV0ToV2` wrapped in a /// [`frame_support::migrations::VersionedMigration`], ensuring the migration is only /// performed when on-chain version is 0. pub type MigrateV0ToV2 = frame_support::migrations::VersionedMigration< From 655b376635d5a140fca027975b55b08368d96e7a Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 15:25:44 +1000 Subject: [PATCH 28/98] dont ref private doc item --- polkadot/runtime/common/src/assigned_slots/migration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polkadot/runtime/common/src/assigned_slots/migration.rs b/polkadot/runtime/common/src/assigned_slots/migration.rs index 9e5570a33557..e9c7e89a065e 100644 --- a/polkadot/runtime/common/src/assigned_slots/migration.rs +++ b/polkadot/runtime/common/src/assigned_slots/migration.rs @@ -70,7 +70,7 @@ pub mod v1 { pub mod versioned { use super::*; - /// [`version_unchecked::MigrateV0ToV1`] wrapped in a + /// `version_unchecked::MigrateV0ToV1` wrapped in a /// [`VersionedMigration`](frame_support::migrations::VersionedMigration), ensuring the /// migration is only performed when on-chain version is 0. pub type MigrateV0ToV1 = frame_support::migrations::VersionedMigration< From 833517168baba2751e5bb8ca95e00cad9c8f9edb Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 14 Sep 2023 16:30:46 +1000 Subject: [PATCH 29/98] doc build --- substrate/frame/examples/storage-migrations/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index 757e0fa6b225..6e0e69aa62ea 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -43,7 +43,7 @@ //! For the purposes of this exercise, we imagine that in [`StorageVersion`] V0 of this pallet //! [`Value`](pallet::Value) is a `u32`, and this what is currently stored on-chain. //! -//! ``` +//! ```ignore //! // V0 Storage Value //! pub type Value = StorageValue<_, u32>; //! ``` @@ -51,7 +51,7 @@ //! //! In [`StorageVersion`] V1 of the pallet a new struct [`CurrentAndPreviousValue`] is introduced: //! -//! ``` +//! ```ignore //! pub struct CurrentAndPreviousValue { //! /// The most recently set value. //! pub current: u32, @@ -62,7 +62,7 @@ //! //! and [`Value`](pallet::Value) is updated to store this new struct instead of a `u32`: //! -//! ``` +//! ```ignore //! // V1 Storage Value //! pub type Value = StorageValue<_, CurrentAndPreviousValue>; //! ``` @@ -161,7 +161,7 @@ //! Almost done! The last step is to schedule the migration to run next runtime upgrade passing it //! as a generic parameter to your [`Executive`](frame_executive) pallet: //! -//! ``` +//! ```ignore //! // Tuple of migrations (structs that implement `OnRuntimeUpgrade`) //! type Migrations = ( //! pallet_example_storage_migration::migrations::v1::versioned::MigrateV0ToV1 From 3fff7fb7765c4e3ccf5ed57f3b935604abdffc04 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Sat, 16 Sep 2023 18:47:20 +1000 Subject: [PATCH 30/98] Update substrate/frame/examples/storage-migrations/src/mock.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> --- substrate/frame/examples/storage-migrations/src/mock.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/mock.rs b/substrate/frame/examples/storage-migrations/src/mock.rs index 87ebcf1a3c1d..6da526605bbf 100644 --- a/substrate/frame/examples/storage-migrations/src/mock.rs +++ b/substrate/frame/examples/storage-migrations/src/mock.rs @@ -27,8 +27,7 @@ type Block = frame_system::mocking::MockBlock; // For testing the pallet, we construct a mock runtime. frame_support::construct_runtime!( - pub enum Test - { + pub struct Test { System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, Example: pallet_example_storage_migration::{Pallet, Call, Storage}, From 3bd0ef2298d402f8f353227a28567b9410952151 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 18 Sep 2023 04:30:34 +1000 Subject: [PATCH 31/98] Update substrate/frame/examples/src/lib.rs Co-authored-by: Juan --- substrate/frame/examples/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/examples/src/lib.rs b/substrate/frame/examples/src/lib.rs index f0d83dd802fb..4b25cdf8ab66 100644 --- a/substrate/frame/examples/src/lib.rs +++ b/substrate/frame/examples/src/lib.rs @@ -39,5 +39,5 @@ //! - [**`pallet-example-split`**](./split): A simple example of a FRAME pallet demonstrating the //! ability to split sections across multiple files. //! -//! - [**`pallet-example-storage-migrations`**](./storage-migrations): An example pallet +//! - [`pallet-example-storage-migrations`]: An example pallet //! demonstrating best-practices for writing storage migrations. From 1a5475506704e88788cfeeebe4af3680b74072e8 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 18 Sep 2023 04:50:41 +1000 Subject: [PATCH 32/98] docify --- Cargo.lock | 8 ++++---- .../examples/storage-migrations/Cargo.toml | 2 +- .../examples/storage-migrations/src/lib.rs | 20 +++++-------------- 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4ff3552d4db6..c8b1e7b35ec1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4455,18 +4455,18 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "docify" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c69c651fd3125396ad00fca5abd4b2681708bfe486a91b81fdbeed583888756" +checksum = "ff509d6aa8e7ca86b36eb3d593132e64204597de3ccb763ffd8bfd2264d54cf3" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c5fd210c8f0446a9d4768cdd125a0de528f159dd71d301891f7e2b8fe40b0d" +checksum = "b135598b950330937f3a0ddfbe908106ee2ecd5fa95d8ae7952a3c3863efe8da" dependencies = [ "common-path", "derive-syn-parse", diff --git a/substrate/frame/examples/storage-migrations/Cargo.toml b/substrate/frame/examples/storage-migrations/Cargo.toml index dbc92cc8ddbf..366a250b07e5 100644 --- a/substrate/frame/examples/storage-migrations/Cargo.toml +++ b/substrate/frame/examples/storage-migrations/Cargo.toml @@ -15,7 +15,7 @@ doctest = false targets = ["x86_64-unknown-linux-gnu"] [dependencies] -docify = "0.2.2" +docify = "0.2.3" log = { version = "0.4.20", default-features = false } codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [ "derive", diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index 6e0e69aa62ea..6f9596e54b7a 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -45,27 +45,15 @@ //! //! ```ignore //! // V0 Storage Value +//! #[pallet::storage] //! pub type Value = StorageValue<_, u32>; //! ``` //! //! //! In [`StorageVersion`] V1 of the pallet a new struct [`CurrentAndPreviousValue`] is introduced: -//! -//! ```ignore -//! pub struct CurrentAndPreviousValue { -//! /// The most recently set value. -//! pub current: u32, -//! /// The previous value, if one existed. -//! pub previous: Option, -//! } -//! ``` -//! +#![doc = docify::embed!("src/lib.rs", CurrentAndPreviousValue)] //! and [`Value`](pallet::Value) is updated to store this new struct instead of a `u32`: -//! -//! ```ignore -//! // V1 Storage Value -//! pub type Value = StorageValue<_, CurrentAndPreviousValue>; -//! ``` +#![doc = docify::embed!("src/lib.rs", Value)] //! //! In StorageVersion V1 of the pallet when [`set_value`](crate::Call::set_value) is called, the //! new value is stored in the `current` field of [`CurrentAndPreviousValue`], and the previous @@ -237,6 +225,7 @@ use sp_runtime::RuntimeDebug; /// Example struct holding the most recently set [`u32`] and the /// second most recently set [`u32`] (if one existed). +#[docify::export] #[derive( Clone, Eq, PartialEq, Encode, Decode, RuntimeDebug, scale_info::TypeInfo, MaxEncodedLen, )] @@ -265,6 +254,7 @@ pub mod pallet { pub trait Config: frame_system::Config {} /// [`StorageVersion`] V1 of [`Value`]. + #[docify::export] #[pallet::storage] pub type Value = StorageValue<_, CurrentAndPreviousValue>; From 222ed3acba8b27d571a2a85d1678cf481f17d042 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Mon, 18 Sep 2023 04:51:00 +1000 Subject: [PATCH 33/98] derive_impl --- .../examples/storage-migrations/src/mock.rs | 27 ++----------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/mock.rs b/substrate/frame/examples/storage-migrations/src/mock.rs index 6da526605bbf..3ec26632ef35 100644 --- a/substrate/frame/examples/storage-migrations/src/mock.rs +++ b/substrate/frame/examples/storage-migrations/src/mock.rs @@ -16,9 +16,7 @@ // limitations under the License. use crate::*; -use frame_support::{traits::ConstU64, weights::constants::ParityDbWeight}; -use sp_core::H256; -use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; +use frame_support::{derive_impl, traits::ConstU64}; // Re-export crate as its pallet name for construct_runtime. use crate as pallet_example_storage_migration; @@ -34,30 +32,9 @@ frame_support::construct_runtime!( } ); +#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = (); - type BlockLength = (); - type DbWeight = ParityDbWeight; - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type Hash = H256; - type RuntimeCall = RuntimeCall; - type Hashing = BlakeTwo256; - type AccountId = u64; - type Lookup = IdentityLookup; type Block = Block; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = ConstU64<250>; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type SS58Prefix = (); - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; } impl pallet_balances::Config for Test { From 4a070fd8b7c0fbae2cc7d0f534a9791d855a5415 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 05:55:26 +0100 Subject: [PATCH 34/98] fix derive_impl --- substrate/frame/examples/storage-migrations/src/mock.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/substrate/frame/examples/storage-migrations/src/mock.rs b/substrate/frame/examples/storage-migrations/src/mock.rs index 3ec26632ef35..ddc1fbbb980f 100644 --- a/substrate/frame/examples/storage-migrations/src/mock.rs +++ b/substrate/frame/examples/storage-migrations/src/mock.rs @@ -32,9 +32,10 @@ frame_support::construct_runtime!( } ); -#[derive_impl(frame_system::config_preludes::TestDefaultConfig)] +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Test { type Block = Block; + type AccountData = pallet_balances::AccountData; } impl pallet_balances::Config for Test { From f66f9e2d82b443c1acd58155a1f48dfbcb51a9e1 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 06:52:18 +0100 Subject: [PATCH 35/98] improve docs --- .../examples/storage-migrations/src/lib.rs | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index 6f9596e54b7a..fc160f46e9d1 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -42,12 +42,7 @@ //! //! For the purposes of this exercise, we imagine that in [`StorageVersion`] V0 of this pallet //! [`Value`](pallet::Value) is a `u32`, and this what is currently stored on-chain. -//! -//! ```ignore -//! // V0 Storage Value -//! #[pallet::storage] -//! pub type Value = StorageValue<_, u32>; -//! ``` +#![doc = docify::embed!("src/lib.rs", Value__V0)] //! //! //! In [`StorageVersion`] V1 of the pallet a new struct [`CurrentAndPreviousValue`] is introduced: @@ -58,6 +53,7 @@ //! In StorageVersion V1 of the pallet when [`set_value`](crate::Call::set_value) is called, the //! new value is stored in the `current` field of [`CurrentAndPreviousValue`], and the previous //! value (if it exists) is stored in the `previous` field. +#![doc = docify::embed!("src/lib.rs", pallet_calls)] //! //! ## Why a migration is necessary //! @@ -211,6 +207,8 @@ // We make sure this pallet uses `no_std` for compiling to Wasm. #![cfg_attr(not(feature = "std"), no_std)] +// allow non-camel-case names for storage version V0 value +#![allow(non_camel_case_types)] // Re-export pallet items so that they can be accessed from the crate namespace. pub use pallet::*; @@ -253,11 +251,21 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config {} + /// [`StorageVersion`] V0 of [`Value`]. + /// + /// Not used anywhere anymore. Here for demonstration purposes only. + #[docify::export] + #[pallet::storage] + pub type Value__V0 = StorageValue<_, u32>; + /// [`StorageVersion`] V1 of [`Value`]. + /// + /// Currently used. #[docify::export] #[pallet::storage] pub type Value = StorageValue<_, CurrentAndPreviousValue>; + #[docify::export(pallet_calls)] #[pallet::call] impl Pallet { #[pallet::call_index(0)] From 70a9da422baceb1a8e896c476a8d68145bdc5a9a Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 07:04:29 +0100 Subject: [PATCH 36/98] set dbweight --- substrate/frame/examples/storage-migrations/src/mock.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/substrate/frame/examples/storage-migrations/src/mock.rs b/substrate/frame/examples/storage-migrations/src/mock.rs index ddc1fbbb980f..65a61258cbdb 100644 --- a/substrate/frame/examples/storage-migrations/src/mock.rs +++ b/substrate/frame/examples/storage-migrations/src/mock.rs @@ -16,7 +16,7 @@ // limitations under the License. use crate::*; -use frame_support::{derive_impl, traits::ConstU64}; +use frame_support::{derive_impl, traits::ConstU64, weights::constants::ParityDbWeight}; // Re-export crate as its pallet name for construct_runtime. use crate as pallet_example_storage_migration; @@ -36,6 +36,7 @@ frame_support::construct_runtime!( impl frame_system::Config for Test { type Block = Block; type AccountData = pallet_balances::AccountData; + type DbWeight = ParityDbWeight; } impl pallet_balances::Config for Test { From d915026fa33cc929b6a80bd5c63b3984bd91e747 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 07:08:04 +0100 Subject: [PATCH 37/98] clean up pallet --- .../frame/examples/storage-migrations/src/lib.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index fc160f46e9d1..5890ddcc96e1 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -42,8 +42,12 @@ //! //! For the purposes of this exercise, we imagine that in [`StorageVersion`] V0 of this pallet //! [`Value`](pallet::Value) is a `u32`, and this what is currently stored on-chain. -#![doc = docify::embed!("src/lib.rs", Value__V0)] //! +//! ```ignore +//! // (Old) Storage Version V0 representation of `Value` +//! #[pallet::storage] +//! pub type Value = StorageValue<_, u32>; +//! ``` //! //! In [`StorageVersion`] V1 of the pallet a new struct [`CurrentAndPreviousValue`] is introduced: #![doc = docify::embed!("src/lib.rs", CurrentAndPreviousValue)] @@ -251,13 +255,6 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config {} - /// [`StorageVersion`] V0 of [`Value`]. - /// - /// Not used anywhere anymore. Here for demonstration purposes only. - #[docify::export] - #[pallet::storage] - pub type Value__V0 = StorageValue<_, u32>; - /// [`StorageVersion`] V1 of [`Value`]. /// /// Currently used. From a596074f2f7d24e2722d2760ed0268f2295920da Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 07:27:40 +0100 Subject: [PATCH 38/98] module visibility --- .../examples/storage-migrations/src/lib.rs | 9 +++++---- .../storage-migrations/src/migrations/v1.rs | 20 +++++-------------- .../examples/storage-migrations/src/mock.rs | 3 ++- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index 5890ddcc96e1..4b7c31f7bdfb 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -105,11 +105,13 @@ //! ### `mod version_unchecked` //! //! Here we define our raw migration logic, -//! [`MigrateV0ToV1`](crate::migrations::v1::version_unchecked::MigrateV0ToV1) which implements the +//! `version_unchecked::MigrateV0ToV1` which implements the //! [`OnRuntimeUpgrade`](frame_support::traits::OnRuntimeUpgrade) trait. //! //! Importantly, it is kept in a private module so that it cannot be accidentally used in a runtime. //! +//! Private modules cannot be referenced in docs, so please read the code directly. +//! //! #### Standalone Struct or Pallet Hook? //! //! Note that the storage migration logic is attached to a standalone struct implementing @@ -120,9 +122,8 @@ //! //! ### `pub mod versioned` //! -//! Here, -//! [`version_unchecked::MigrateV0ToV1`](crate::migrations::v1::version_unchecked::MigrateV0ToV1) is -//! wrapped in a [`VersionedMigration`](frame_support::migrations::VersionedMigration) to define +//! Here, `version_unchecked::MigrateV0ToV1` is wrapped in a +//! [`VersionedMigration`](frame_support::migrations::VersionedMigration) to define //! [`versioned::MigrateV0ToV1`](crate::migrations::v1::versioned::MigrateV0ToV1), which may be used //! in runtimes. //! diff --git a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs index b3d5f95d791e..8e2f0da35dd9 100644 --- a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs +++ b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs @@ -23,12 +23,7 @@ use frame_support::{ /// Collection of storage item formats from the previous storage version. /// /// Required so we can read values in the old storage format during the migration. -/// -/// This module is `pub` so it can be referenced in the docs of this example pallet. -/// -/// Real migrations should declare this module as private by declaring `mod old` -/// instead of `pub mod old`. -pub mod old { +mod old { use super::*; /// V0 type for [`crate::Value`]. @@ -38,11 +33,6 @@ pub mod old { /// Private module containing *version unchecked* migration logic. /// -/// This module is `pub` so it can be referenced in the docs of this example pallet. -/// -/// Real migrations should declare this module as private by declaring `mod version_unchecked` -/// instead of `pub mod version_unchecked`. -/// /// Should only be used by the [`VersionedMigration`](frame_support::migrations::VersionedMigration) /// type in this module to create something to export. /// @@ -52,7 +42,7 @@ pub mod old { /// For more about this pattern of keeping items private, see /// - /// - -pub mod version_unchecked { +mod version_unchecked { use super::*; /// Implements [`OnRuntimeUpgrade`], migrating the state of this pallet from V0 to V1. @@ -67,7 +57,7 @@ pub mod version_unchecked { impl OnRuntimeUpgrade for MigrateV0ToV1 { /// Return the existing [`crate::Value`] so we can check that it was correctly set in - /// [`version_unchecked::MigrateV0ToV1::post_upgrade`]. + /// `version_unchecked::MigrateV0ToV1::post_upgrade`. #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { use codec::Encode; @@ -142,7 +132,7 @@ pub mod version_unchecked { pub mod versioned { use super::*; - /// [`version_unchecked::MigrateV0ToV1`] wrapped in a + /// `version_unchecked::MigrateV0ToV1` wrapped in a /// [`VersionedMigration`](frame_support::migrations::VersionedMigration), which ensures that: /// - The migration only runs once when the on-chain storage version is 0 /// - The on-chain storage version is updated to `1` after the migration executes @@ -162,7 +152,7 @@ pub mod versioned { /// 1. `on_runtime_upgrade` returns the expected weight /// 2. `post_upgrade` succeeds when given the bytes returned by `pre_upgrade` /// 3. The storage is in the expected state after the migration -#[cfg(all(feature = "try-runtime", test))] +#[cfg(any(all(feature = "try-runtime", test), doc))] mod test { use super::*; use crate::mock::{new_test_ext, Test}; diff --git a/substrate/frame/examples/storage-migrations/src/mock.rs b/substrate/frame/examples/storage-migrations/src/mock.rs index 65a61258cbdb..8a788e05fcbb 100644 --- a/substrate/frame/examples/storage-migrations/src/mock.rs +++ b/substrate/frame/examples/storage-migrations/src/mock.rs @@ -15,6 +15,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#![cfg(any(all(feature = "try-runtime", test), doc))] + use crate::*; use frame_support::{derive_impl, traits::ConstU64, weights::constants::ParityDbWeight}; @@ -57,7 +59,6 @@ impl pallet_balances::Config for Test { impl Config for Test {} -#[cfg(all(feature = "try-runtime", test))] pub fn new_test_ext() -> sp_io::TestExternalities { use sp_runtime::BuildStorage; From 0cf19ac984f6b7323a83af7fc946da843618cf77 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 09:52:39 +0100 Subject: [PATCH 39/98] fix comment --- substrate/frame/support/procedural/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/substrate/frame/support/procedural/src/lib.rs b/substrate/frame/support/procedural/src/lib.rs index 9032630a01c8..4bacf316df1b 100644 --- a/substrate/frame/support/procedural/src/lib.rs +++ b/substrate/frame/support/procedural/src/lib.rs @@ -555,15 +555,15 @@ pub fn __create_tt_macro(input: TokenStream) -> TokenStream { /// /// Imagine a pallet with the following storage definition: /// ```ignore -/// #[pallet::storage] -/// pub type Value = StorageValue<_, u32>; +/// #[pallet::storage] +/// pub type Value = StorageValue<_, u32>; /// ``` /// `Value` can be accessed by calling `Value::::get()`. /// -/// Now imagine the defintiion of `Value` is updated to a `(u32, u32)`: +/// Now imagine the definition of `Value` is updated to a `(u32, u32)`: /// ```ignore -/// #[pallet::storage] -/// pub type Value = StorageValue<_, (u32, u32)>; +/// #[pallet::storage] +/// pub type Value = StorageValue<_, (u32, u32)>; /// ``` /// The on-chain value of `Value` is `u32`, but `Value::::get()` expects it to be `(u32, u32)`. /// From fe92288b0664e23f1a36ac60ca566bb30c5cff9c Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 09:52:48 +0100 Subject: [PATCH 40/98] fix comment --- substrate/frame/support/src/traits/metadata.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/frame/support/src/traits/metadata.rs b/substrate/frame/support/src/traits/metadata.rs index 64245ed1d3cc..ddbd4d70d411 100644 --- a/substrate/frame/support/src/traits/metadata.rs +++ b/substrate/frame/support/src/traits/metadata.rs @@ -261,8 +261,8 @@ pub struct NoStorageVersionSet; /// environment, and the on-chain storage version is the version of the pallet actually deployed /// on-chain. /// -/// Storage versions should be only ever be out of sync when a migration has been written locally -/// which increments the current version of a pallet, but the migration has not yet been executed +/// Storage versions should be only ever be out of sync when a pallet has been updated to a new +/// version and the current version is incremented, but the migration has not yet been executed /// on-chain as part of a runtime upgrade. /// /// It is the responsibility of the developer to ensure that the on-chain storage version is set From 0dc8a6033ba18b0442e6f8e9288964feb3a084f3 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 09:53:01 +0100 Subject: [PATCH 41/98] fix comment --- substrate/frame/examples/storage-migrations/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/storage-migrations/src/lib.rs index 4b7c31f7bdfb..78a96b6400e6 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/storage-migrations/src/lib.rs @@ -44,9 +44,9 @@ //! [`Value`](pallet::Value) is a `u32`, and this what is currently stored on-chain. //! //! ```ignore -//! // (Old) Storage Version V0 representation of `Value` -//! #[pallet::storage] -//! pub type Value = StorageValue<_, u32>; +//! // (Old) Storage Version V0 representation of `Value` +//! #[pallet::storage] +//! pub type Value = StorageValue<_, u32>; //! ``` //! //! In [`StorageVersion`] V1 of the pallet a new struct [`CurrentAndPreviousValue`] is introduced: From e3e4940141605136bf4734b41bc80b0769869dcf Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 10:16:16 +0100 Subject: [PATCH 42/98] better naming --- .../frame/examples/storage-migrations/src/mock.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/mock.rs b/substrate/frame/examples/storage-migrations/src/mock.rs index 8a788e05fcbb..17aecf2c94a3 100644 --- a/substrate/frame/examples/storage-migrations/src/mock.rs +++ b/substrate/frame/examples/storage-migrations/src/mock.rs @@ -23,11 +23,11 @@ use frame_support::{derive_impl, traits::ConstU64, weights::constants::ParityDbW // Re-export crate as its pallet name for construct_runtime. use crate as pallet_example_storage_migration; -type Block = frame_system::mocking::MockBlock; +type Block = frame_system::mocking::MockBlock; // For testing the pallet, we construct a mock runtime. frame_support::construct_runtime!( - pub struct Test { + pub struct MockRuntime { System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, Example: pallet_example_storage_migration::{Pallet, Call, Storage}, @@ -35,13 +35,13 @@ frame_support::construct_runtime!( ); #[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] -impl frame_system::Config for Test { +impl frame_system::Config for MockRuntime { type Block = Block; type AccountData = pallet_balances::AccountData; type DbWeight = ParityDbWeight; } -impl pallet_balances::Config for Test { +impl pallet_balances::Config for MockRuntime { type MaxLocks = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -57,7 +57,7 @@ impl pallet_balances::Config for Test { type MaxHolds = (); } -impl Config for Test {} +impl Config for MockRuntime {} pub fn new_test_ext() -> sp_io::TestExternalities { use sp_runtime::BuildStorage; From 0fe21d504a3f50bd839f14ac5a44af102c0d0351 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 10:16:25 +0100 Subject: [PATCH 43/98] better naming --- .../storage-migrations/src/migrations/v1.rs | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs index 8e2f0da35dd9..fdd097a865fd 100644 --- a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs +++ b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs @@ -70,15 +70,14 @@ mod version_unchecked { /// Migrate the storage from V0 to V1. /// - /// If the value doesn't exist, there is nothing to do. - /// - /// If the value exists, it is read and then written back to storage inside a + /// - If the value doesn't exist, there is nothing to do. + /// - If the value exists, it is read and then written back to storage inside a /// [`crate::CurrentAndPreviousValue`]. fn on_runtime_upgrade() -> frame_support::weights::Weight { // Read the old value from storage if let Some(old_value) = old::Value::::get() { // Write the new value to storage - let new = crate::CurrentAndPreviousValue { previous: None, current: old_value }; + let new = crate::CurrentAndPreviousValue { current: old_value, previous: None }; crate::Value::::put(new); // One read for the old value, one write for the new value T::DbWeight::get().reads_writes(1, 1) @@ -90,9 +89,9 @@ mod version_unchecked { /// Verifies the storage was migrated correctly. /// - /// If there was no old value, the new value should not be set. - /// - /// If there was an old value, the new value should be a [`crate::CurrentAndPreviousValue`]. + /// - If there was no old value, the new value should not be set. + /// - If there was an old value, the new value should be a + /// [`crate::CurrentAndPreviousValue`]. #[cfg(feature = "try-runtime")] fn post_upgrade(state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { use codec::Decode; @@ -155,7 +154,7 @@ pub mod versioned { #[cfg(any(all(feature = "try-runtime", test), doc))] mod test { use super::*; - use crate::mock::{new_test_ext, Test}; + use crate::mock::{new_test_ext, MockRuntime}; use frame_support::assert_ok; use version_unchecked::MigrateV0ToV1; @@ -163,26 +162,26 @@ mod test { fn handles_no_existing_value() { new_test_ext().execute_with(|| { // By default, no value should be set. Verify this assumption. - assert!(crate::Value::::get().is_none()); - assert!(old::Value::::get().is_none()); + assert!(crate::Value::::get().is_none()); + assert!(old::Value::::get().is_none()); // Get the pre_upgrade bytes - let bytes = match MigrateV0ToV1::::pre_upgrade() { + let bytes = match MigrateV0ToV1::::pre_upgrade() { Ok(bytes) => bytes, Err(e) => panic!("pre_upgrade failed: {:?}", e), }; // Execute the migration - let weight = MigrateV0ToV1::::on_runtime_upgrade(); + let weight = MigrateV0ToV1::::on_runtime_upgrade(); // Verify post_upgrade succeeds - assert_ok!(MigrateV0ToV1::::post_upgrade(bytes)); + assert_ok!(MigrateV0ToV1::::post_upgrade(bytes)); // The weight should be just 1 read for trying to access the old value. - assert_eq!(weight, ::DbWeight::get().reads(1)); + assert_eq!(weight, ::DbWeight::get().reads(1)); // After the migration, no value should have been set. - assert!(crate::Value::::get().is_none()); + assert!(crate::Value::::get().is_none()); }) } @@ -191,28 +190,31 @@ mod test { new_test_ext().execute_with(|| { // Set up an initial value let initial_value = 42; - old::Value::::put(initial_value); + old::Value::::put(initial_value); // Get the pre_upgrade bytes - let bytes = match MigrateV0ToV1::::pre_upgrade() { + let bytes = match MigrateV0ToV1::::pre_upgrade() { Ok(bytes) => bytes, Err(e) => panic!("pre_upgrade failed: {:?}", e), }; // Execute the migration - let weight = MigrateV0ToV1::::on_runtime_upgrade(); + let weight = MigrateV0ToV1::::on_runtime_upgrade(); // Verify post_upgrade succeeds - assert_ok!(MigrateV0ToV1::::post_upgrade(bytes)); + assert_ok!(MigrateV0ToV1::::post_upgrade(bytes)); // The weight used should be 1 read for the old value, and 1 write for the new // value. - assert_eq!(weight, ::DbWeight::get().reads_writes(1, 1)); + assert_eq!( + weight, + ::DbWeight::get().reads_writes(1, 1) + ); // After the migration, the new value should be set as the `current` value. let expected_new_value = crate::CurrentAndPreviousValue { current: initial_value, previous: None }; - assert_eq!(crate::Value::::get(), Some(expected_new_value)); + assert_eq!(crate::Value::::get(), Some(expected_new_value)); }) } } From 92e43acdd36d50b8b6b0b4e5364061380218938f Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 10:59:10 +0100 Subject: [PATCH 44/98] fix wasm build --- .../examples/storage-migrations/Cargo.toml | 24 +++++++++---------- .../storage-migrations/src/migrations/v1.rs | 3 +++ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/substrate/frame/examples/storage-migrations/Cargo.toml b/substrate/frame/examples/storage-migrations/Cargo.toml index 366a250b07e5..fb3981478e72 100644 --- a/substrate/frame/examples/storage-migrations/Cargo.toml +++ b/substrate/frame/examples/storage-migrations/Cargo.toml @@ -8,32 +8,30 @@ homepage = "https://substrate.io" repository.workspace = true description = "FRAME example pallet demonstrating best-practices for writing storage migrations." -[lib] -doctest = false - [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] [dependencies] -docify = "0.2.3" +docify = { version = "0.2.3", default-features = false } log = { version = "0.4.20", default-features = false } codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [ "derive", ] } scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -frame-support = { path = "../../support", default-features = false} -frame-executive = { path = "../../executive", default-features = false} -frame-system = { path = "../../system", default-features = false} -frame-try-runtime = { path = "../../try-runtime", default-features = false, optional = true} -pallet-balances = { path = "../../balances", default-features = false} -sp-std = { path = "../../../primitives/std", default-features = false} -sp-runtime = { path = "../../../primitives/runtime" } -sp-core = { path = "../../../primitives/core" } -sp-io = { path = "../../../primitives/io" } +frame-support = { path = "../../support", default-features = false } +frame-executive = { path = "../../executive", default-features = false } +frame-system = { path = "../../system", default-features = false } +frame-try-runtime = { path = "../../try-runtime", default-features = false, optional = true } +pallet-balances = { path = "../../balances", default-features = false } +sp-std = { path = "../../../primitives/std", default-features = false } +sp-runtime = { path = "../../../primitives/runtime", default-features = false } +sp-core = { path = "../../../primitives/core", default-features = false } +sp-io = { path = "../../../primitives/io", default-features = false } [features] default = [ "std" ] std = [ + "log/std", "codec/std", "frame-executive/std", "frame-support/std", diff --git a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs index fdd097a865fd..534a1e143f6e 100644 --- a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs +++ b/substrate/frame/examples/storage-migrations/src/migrations/v1.rs @@ -20,6 +20,9 @@ use frame_support::{ traits::{Get, OnRuntimeUpgrade}, }; +#[cfg(feature = "try-runtime")] +use sp_std::vec::Vec; + /// Collection of storage item formats from the previous storage version. /// /// Required so we can read values in the old storage format during the migration. From 55f876d8529c8290d3ccba64cb45bdcf302b9ed0 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 11:04:43 +0100 Subject: [PATCH 45/98] cargo fmt --- substrate/frame/examples/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/frame/examples/src/lib.rs b/substrate/frame/examples/src/lib.rs index 4b25cdf8ab66..c0de24c3938e 100644 --- a/substrate/frame/examples/src/lib.rs +++ b/substrate/frame/examples/src/lib.rs @@ -39,5 +39,5 @@ //! - [**`pallet-example-split`**](./split): A simple example of a FRAME pallet demonstrating the //! ability to split sections across multiple files. //! -//! - [`pallet-example-storage-migrations`]: An example pallet -//! demonstrating best-practices for writing storage migrations. +//! - [`pallet-example-storage-migrations`]: An example pallet demonstrating best-practices for +//! writing storage migrations. From 481920908e0b1b018d7298c7d508133796a2e316 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 11:05:38 +0100 Subject: [PATCH 46/98] format features --- substrate/frame/examples/storage-migrations/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/examples/storage-migrations/Cargo.toml b/substrate/frame/examples/storage-migrations/Cargo.toml index fb3981478e72..056e76d8b290 100644 --- a/substrate/frame/examples/storage-migrations/Cargo.toml +++ b/substrate/frame/examples/storage-migrations/Cargo.toml @@ -31,12 +31,12 @@ sp-io = { path = "../../../primitives/io", default-features = false } [features] default = [ "std" ] std = [ - "log/std", "codec/std", "frame-executive/std", "frame-support/std", "frame-system/std", "frame-try-runtime/std", + "log/std", "pallet-balances/std", "scale-info/std", "sp-core/std", From 59d73529c159dd09415b686ceaee9f0f702a1197 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 11:16:49 +0100 Subject: [PATCH 47/98] set uniques storage version --- substrate/frame/uniques/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/substrate/frame/uniques/src/lib.rs b/substrate/frame/uniques/src/lib.rs index 1b75d0b078ba..8334a8d943e1 100644 --- a/substrate/frame/uniques/src/lib.rs +++ b/substrate/frame/uniques/src/lib.rs @@ -69,7 +69,10 @@ pub mod pallet { use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; + const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); + #[pallet::pallet] + #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); #[cfg(feature = "runtime-benchmarks")] From f16f6286d60188a1f9692e0fb7924de321f13ebd Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 20 Sep 2023 11:20:39 +0100 Subject: [PATCH 48/98] fix asset hub storage versions --- .../assets/asset-hub-polkadot/src/lib.rs | 49 ++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs index 0051af21f9a3..d22d7713ac2e 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs @@ -796,7 +796,10 @@ pub type SignedExtra = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = (pallet_collator_selection::migration::v1::MigrateToV1,); +pub type Migrations = ( + pallet_collator_selection::migration::v1::MigrateToV1, + InitStorageVersions +); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< @@ -808,6 +811,50 @@ pub type Executive = frame_executive::Executive< Migrations, >; +/// Migration to initialize storage versions for pallets added after genesis. +/// +/// Ideally this would be done automatically (see +/// ), but it probably won't be ready for some +/// time and it's beneficial to get try-runtime-cli on-runtime-upgrade checks into the CI, so we're +/// doing it manually. +pub struct InitStorageVersions; + +impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions { + fn on_runtime_upgrade() -> Weight { + use frame_support::traits::{GetStorageVersion, StorageVersion}; + use sp_runtime::traits::Saturating; + + let mut writes = 0; + + if PolkadotXcm::on_chain_storage_version() == StorageVersion::new(0) { + StorageVersion::new(1).put::(); + writes.saturating_inc(); + } + + if Uniques::on_chain_storage_version() == StorageVersion::new(0) { + StorageVersion::new(1).put::(); + writes.saturating_inc(); + } + + if Nfts::on_chain_storage_version() == StorageVersion::new(0) { + StorageVersion::new(1).put::(); + writes.saturating_inc(); + } + + if ForeignAssets::on_chain_storage_version() == StorageVersion::new(0) { + StorageVersion::new(1).put::(); + writes.saturating_inc(); + } + + if Multisig::on_chain_storage_version() == StorageVersion::new(0) { + StorageVersion::new(1).put::(); + writes.saturating_inc(); + } + + ::DbWeight::get().reads_writes(5, writes) + } +} + #[cfg(feature = "runtime-benchmarks")] #[macro_use] extern crate frame_benchmarking; From 7d4da68b0a1a07f985ea256c2e0d716477616a9e Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 28 Nov 2023 10:48:19 +0400 Subject: [PATCH 49/98] merge --- substrate/frame/examples/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/substrate/frame/examples/src/lib.rs b/substrate/frame/examples/src/lib.rs index c15adf9c697c..f9e45d1debd6 100644 --- a/substrate/frame/examples/src/lib.rs +++ b/substrate/frame/examples/src/lib.rs @@ -37,13 +37,13 @@ //! - [`pallet_example_kitchensink`]: This pallet demonstrates a catalog of all FRAME macros in use //! and their various syntax options. //! -//! - [`pallet-example-storage-migrations`]: An example pallet demonstrating best-practices for -//! writing storage migrations. -//! //! - [`pallet_example_split`]: A simple example of a FRAME pallet demonstrating the ability to //! split sections across multiple files. //! //! - [`pallet_example_frame_crate`]: Example pallet showcasing how one can be //! built using only the `frame` umbrella crate. //! +//! - [`pallet-example-storage-migrations`]: An example pallet demonstrating best-practices for +//! writing storage migrations. +//! //! **Tip**: Use `cargo doc --package --open` to view each pallet's documentation. From eaa6acaebb209a2a042d60820743e425e9dbf64f Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 28 Nov 2023 10:48:26 +0400 Subject: [PATCH 50/98] update cargo.lock --- Cargo.lock | 3615 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 2221 insertions(+), 1394 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c8b1e7b35ec1..521ba8b97456 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -116,7 +116,7 @@ dependencies = [ "cipher 0.3.0", "ctr 0.8.0", "ghash 0.4.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -130,7 +130,7 @@ dependencies = [ "cipher 0.4.4", "ctr 0.9.2", "ghash 0.5.0", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -229,9 +229,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.5.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", @@ -267,9 +267,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "2.1.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -317,33 +317,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" [[package]] -name = "ark-algebra-test-templates" -version = "0.4.2" +name = "ark-bls12-377" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "400bd3a79c741b1832f1416d4373ae077ef82ca14a8b4cee1248a2f11c8b9172" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" dependencies = [ "ark-ec", "ark-ff", - "ark-serialize", "ark-std", - "hex", - "num-bigint", - "num-integer", - "num-traits", - "serde", - "serde_derive", - "serde_json", - "sha2 0.10.7", ] [[package]] -name = "ark-bls12-377" -version = "0.4.0" +name = "ark-bls12-377-ext" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55" dependencies = [ + "ark-bls12-377", "ark-ec", - "ark-ff", + "ark-models-ext", "ark-std", ] @@ -359,6 +351,20 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-bls12-381-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-serialize", + "ark-std", +] + [[package]] name = "ark-bw6-761" version = "0.4.0" @@ -371,6 +377,19 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-bw6-761-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" +dependencies = [ + "ark-bw6-761", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ec" version = "0.4.2" @@ -385,6 +404,7 @@ dependencies = [ "hashbrown 0.13.2", "itertools 0.10.5", "num-traits", + "rayon", "zeroize", ] @@ -400,6 +420,19 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-ed-on-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ed-on-bls12-381-bandersnatch" version = "0.4.0" @@ -412,6 +445,19 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ff" version = "0.4.2" @@ -456,64 +502,49 @@ dependencies = [ ] [[package]] -name = "ark-poly" -version = "0.4.2" +name = "ark-models-ext" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" dependencies = [ + "ark-ec", "ark-ff", "ark-serialize", "ark-std", "derivative", - "hashbrown 0.13.2", ] [[package]] -name = "ark-r1cs-std" -version = "0.4.0" +name = "ark-poly" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de1d1472e5cb020cb3405ce2567c91c8d43f21b674aef37b0202f5c3304761db" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ec", "ark-ff", - "ark-relations", + "ark-serialize", "ark-std", "derivative", - "num-bigint", - "num-integer", - "num-traits", - "tracing", -] - -[[package]] -name = "ark-relations" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00796b6efc05a3f48225e59cb6a2cda78881e7c390872d5786aaf112f31fb4f0" -dependencies = [ - "ark-ff", - "ark-std", - "tracing", - "tracing-subscriber", + "hashbrown 0.13.2", ] [[package]] name = "ark-scale" -version = "0.0.10" +version = "0.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b08346a3e38e2be792ef53ee168623c9244d968ff00cd70fb9932f6fe36393" +checksum = "51bd73bb6ddb72630987d37fa963e99196896c0d0ea81b7c894567e74a2f83af" dependencies = [ "ark-ec", "ark-ff", "ark-serialize", "ark-std", "parity-scale-codec", + "scale-info", ] [[package]] name = "ark-secret-scalar" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" +source = "git+https://github.com/w3f/ring-vrf?rev=3ddc205#3ddc2051066c4b3f0eadd0ba5700df12500d9754" dependencies = [ "ark-ec", "ark-ff", @@ -556,12 +587,13 @@ checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", "rand 0.8.5", + "rayon", ] [[package]] name = "ark-transcript" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" +source = "git+https://github.com/w3f/ring-vrf?rev=3ddc205#3ddc2051066c4b3f0eadd0ba5700df12500d9754" dependencies = [ "ark-ff", "ark-serialize", @@ -571,6 +603,12 @@ dependencies = [ "sha3", ] +[[package]] +name = "array-bytes" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" + [[package]] name = "array-bytes" version = "6.1.0" @@ -693,31 +731,81 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] -name = "asset-hub-kusama-integration-tests" -version = "1.0.0" +name = "asset-hub-kusama-runtime" +version = "0.9.420" dependencies = [ - "assert_matches", - "asset-hub-kusama-runtime", + "asset-test-utils", + "assets-common", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", "frame-support", "frame-system", - "integration-tests-common", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", "pallet-asset-conversion", + "pallet-asset-conversion-tx-payment", "pallet-assets", + "pallet-aura", + "pallet-authorship", "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-multisig", + "pallet-nft-fractionalization", + "pallet-nfts", + "pallet-nfts-runtime-api", + "pallet-proxy", + "pallet-session", + "pallet-state-trie-migration", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-uniques", + "pallet-utility", "pallet-xcm", + "pallet-xcm-benchmarks", "parachains-common", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", - "polkadot-runtime", - "polkadot-runtime-parachains", + "polkadot-runtime-common", + "primitive-types", + "scale-info", + "smallvec", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", "sp-runtime", + "sp-session", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-transaction-pool", + "sp-version", + "sp-weights", + "staging-parachain-info", "staging-xcm", - "xcm-emulator", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", ] [[package]] -name = "asset-hub-kusama-runtime" +name = "asset-hub-polkadot-runtime" version = "0.9.420" dependencies = [ "asset-test-utils", @@ -738,22 +826,19 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", - "kusama-runtime-constants", "log", - "pallet-asset-conversion", - "pallet-asset-conversion-tx-payment", + "pallet-asset-tx-payment", "pallet-assets", "pallet-aura", "pallet-authorship", "pallet-balances", "pallet-collator-selection", + "pallet-message-queue", "pallet-multisig", - "pallet-nft-fractionalization", "pallet-nfts", "pallet-nfts-runtime-api", "pallet-proxy", "pallet-session", - "pallet-state-trie-migration", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", @@ -761,28 +846,28 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", - "parachain-info", "parachains-common", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", - "primitive-types", "scale-info", "smallvec", "sp-api", "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-version", "sp-weights", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -790,36 +875,55 @@ dependencies = [ ] [[package]] -name = "asset-hub-polkadot-integration-tests" +name = "asset-hub-rococo-emulated-chain" +version = "0.0.0" +dependencies = [ + "asset-hub-rococo-runtime", + "cumulus-primitives-core", + "emulated-integration-tests-common", + "frame-support", + "parachains-common", + "rococo-emulated-chain", + "serde_json", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "asset-hub-rococo-integration-tests" version = "1.0.0" dependencies = [ - "asset-hub-kusama-runtime", + "assert_matches", + "asset-hub-rococo-runtime", + "asset-test-utils", + "emulated-integration-tests-common", "frame-support", - "frame-system", - "integration-tests-common", "pallet-asset-conversion", "pallet-assets", "pallet-balances", + "pallet-message-queue", "pallet-xcm", "parachains-common", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime", - "polkadot-runtime-parachains", + "penpal-runtime", + "rococo-runtime", + "rococo-system-emulated-network", "sp-runtime", "staging-xcm", - "xcm-emulator", + "staging-xcm-executor", ] [[package]] -name = "asset-hub-polkadot-runtime" +name = "asset-hub-rococo-runtime" version = "0.9.420" dependencies = [ "asset-test-utils", "assets-common", + "bp-asset-hub-rococo", + "bp-asset-hub-westend", + "bp-bridge-hub-rococo", + "bp-bridge-hub-westend", "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", @@ -835,17 +939,21 @@ dependencies = [ "frame-try-runtime", "hex-literal", "log", - "pallet-asset-tx-payment", + "pallet-asset-conversion", + "pallet-asset-conversion-tx-payment", "pallet-assets", "pallet-aura", "pallet-authorship", "pallet-balances", "pallet-collator-selection", + "pallet-message-queue", "pallet-multisig", + "pallet-nft-fractionalization", "pallet-nfts", "pallet-nfts-runtime-api", "pallet-proxy", "pallet-session", + "pallet-state-trie-migration", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", @@ -853,56 +961,82 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", - "parachain-info", + "pallet-xcm-bridge-hub-router", "parachains-common", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", - "polkadot-runtime-constants", + "primitive-types", + "rococo-runtime-constants", "scale-info", "smallvec", "sp-api", "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-version", "sp-weights", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", ] +[[package]] +name = "asset-hub-westend-emulated-chain" +version = "0.0.0" +dependencies = [ + "asset-hub-westend-runtime", + "cumulus-primitives-core", + "emulated-integration-tests-common", + "frame-support", + "parachains-common", + "serde_json", + "sp-core", + "sp-runtime", + "westend-emulated-chain", +] + [[package]] name = "asset-hub-westend-integration-tests" version = "1.0.0" dependencies = [ "assert_matches", "asset-hub-westend-runtime", + "asset-test-utils", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "emulated-integration-tests-common", "frame-support", "frame-system", - "integration-tests-common", "pallet-asset-conversion", + "pallet-asset-rate", "pallet-assets", "pallet-balances", + "pallet-message-queue", + "pallet-treasury", "pallet-xcm", "parachains-common", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime", - "polkadot-runtime-parachains", + "penpal-runtime", + "polkadot-runtime-common", "sp-runtime", "staging-xcm", - "xcm-emulator", + "staging-xcm-builder", + "staging-xcm-executor", + "westend-runtime", + "westend-runtime-constants", + "westend-system-emulated-network", ] [[package]] @@ -911,6 +1045,10 @@ version = "0.9.420" dependencies = [ "asset-test-utils", "assets-common", + "bp-asset-hub-rococo", + "bp-asset-hub-westend", + "bp-bridge-hub-rococo", + "bp-bridge-hub-westend", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -935,6 +1073,7 @@ dependencies = [ "pallet-authorship", "pallet-balances", "pallet-collator-selection", + "pallet-message-queue", "pallet-multisig", "pallet-nft-fractionalization", "pallet-nfts", @@ -948,7 +1087,7 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", - "parachain-info", + "pallet-xcm-bridge-hub-router", "parachains-common", "parity-scale-codec", "polkadot-core-primitives", @@ -961,15 +1100,16 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", - "sp-io", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -982,7 +1122,6 @@ name = "asset-test-utils" version = "1.0.0" dependencies = [ "assets-common", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", @@ -996,7 +1135,7 @@ dependencies = [ "pallet-collator-selection", "pallet-session", "pallet-xcm", - "parachain-info", + "pallet-xcm-bridge-hub-router", "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", @@ -1005,8 +1144,10 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", + "staging-parachain-info", "staging-xcm", + "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", ] @@ -1027,7 +1168,7 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -1130,17 +1271,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "async-recursion" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.32", -] - [[package]] name = "async-stream" version = "0.3.5" @@ -1160,7 +1290,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -1177,7 +1307,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -1239,8 +1369,8 @@ dependencies = [ [[package]] name = "bandersnatch_vrfs" -version = "0.0.1" -source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" +version = "0.0.4" +source = "git+https://github.com/w3f/ring-vrf?rev=3ddc205#3ddc2051066c4b3f0eadd0ba5700df12500d9754" dependencies = [ "ark-bls12-381", "ark-ec", @@ -1255,6 +1385,8 @@ dependencies = [ "rand_core 0.6.4", "ring 0.1.0", "sha2 0.10.7", + "sp-ark-bls12-381", + "sp-ark-ed-on-bls12-381-bandersnatch", "zeroize", ] @@ -1316,7 +1448,7 @@ dependencies = [ name = "binary-merkle-tree" version = "4.0.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "env_logger 0.9.3", "hash-db", "log", @@ -1351,7 +1483,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -1361,6 +1493,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", ] [[package]] @@ -1389,10 +1525,23 @@ checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", "radium", + "serde", "tap", "wyz", ] +[[package]] +name = "blake2" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330" +dependencies = [ + "byte-tools", + "crypto-mac 0.7.0", + "digest 0.8.1", + "opaque-debug 0.2.3", +] + [[package]] name = "blake2" version = "0.10.6" @@ -1436,16 +1585,15 @@ dependencies = [ [[package]] name = "blake3" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" +checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" dependencies = [ "arrayref", "arrayvec 0.7.4", "cc", "cfg-if", "constant_time_eq 0.3.0", - "digest 0.10.7", ] [[package]] @@ -1540,7 +1688,7 @@ dependencies = [ ] [[package]] -name = "bp-asset-hub-kusama" +name = "bp-asset-hub-rococo" version = "0.1.0" dependencies = [ "bp-xcm-bridge-hub-router", @@ -1550,14 +1698,13 @@ dependencies = [ ] [[package]] -name = "bp-asset-hub-polkadot" +name = "bp-asset-hub-westend" version = "0.1.0" dependencies = [ "bp-xcm-bridge-hub-router", "frame-support", "parity-scale-codec", "scale-info", - "sp-runtime", ] [[package]] @@ -1571,7 +1718,7 @@ dependencies = [ "frame-system", "polkadot-primitives", "sp-api", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -1584,7 +1731,7 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -1597,7 +1744,7 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -1610,11 +1757,11 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] -name = "bp-bridge-hub-wococo" +name = "bp-bridge-hub-westend" version = "0.1.0" dependencies = [ "bp-bridge-hub-cumulus", @@ -1623,7 +1770,7 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -1642,7 +1789,7 @@ dependencies = [ "sp-consensus-grandpa", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -1654,7 +1801,7 @@ dependencies = [ "bp-runtime", "frame-support", "sp-api", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -1670,7 +1817,7 @@ dependencies = [ "scale-info", "serde", "sp-core", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -1686,7 +1833,7 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -1698,7 +1845,24 @@ dependencies = [ "bp-runtime", "frame-support", "sp-api", - "sp-std", + "sp-std 8.0.0", +] + +[[package]] +name = "bp-polkadot-bulletin" +version = "0.1.0" +dependencies = [ + "bp-header-chain", + "bp-messages", + "bp-polkadot-core", + "bp-runtime", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std 8.0.0", ] [[package]] @@ -1716,7 +1880,7 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -1731,7 +1895,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -1743,7 +1907,7 @@ dependencies = [ "bp-runtime", "frame-support", "sp-api", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -1764,7 +1928,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", "sp-trie", "trie-db", ] @@ -1784,21 +1948,20 @@ dependencies = [ "sp-consensus-grandpa", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-trie", ] [[package]] -name = "bp-wococo" +name = "bp-westend" version = "0.1.0" dependencies = [ "bp-header-chain", "bp-polkadot-core", - "bp-rococo", "bp-runtime", "frame-support", "sp-api", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -1832,12 +1995,12 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", - "kusama-runtime-constants", "log", "pallet-aura", "pallet-authorship", "pallet-balances", "pallet-collator-selection", + "pallet-message-queue", "pallet-multisig", "pallet-session", "pallet-timestamp", @@ -1846,7 +2009,6 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", - "parachain-info", "parachains-common", "parity-scale-codec", "polkadot-core-primitives", @@ -1859,15 +2021,17 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -1900,6 +2064,7 @@ dependencies = [ "pallet-authorship", "pallet-balances", "pallet-collator-selection", + "pallet-message-queue", "pallet-multisig", "pallet-session", "pallet-timestamp", @@ -1908,13 +2073,11 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", - "parachain-info", "parachains-common", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", - "polkadot-runtime-constants", "scale-info", "serde", "smallvec", @@ -1922,48 +2085,68 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", ] +[[package]] +name = "bridge-hub-rococo-emulated-chain" +version = "0.0.0" +dependencies = [ + "bridge-hub-rococo-runtime", + "cumulus-primitives-core", + "emulated-integration-tests-common", + "frame-support", + "parachains-common", + "serde_json", + "sp-core", + "sp-runtime", +] + [[package]] name = "bridge-hub-rococo-integration-tests" version = "1.0.0" dependencies = [ + "asset-test-utils", "bp-messages", + "bridge-hub-rococo-runtime", "cumulus-pallet-dmp-queue", "cumulus-pallet-xcmp-queue", + "emulated-integration-tests-common", "frame-support", - "integration-tests-common", + "pallet-assets", + "pallet-balances", "pallet-bridge-messages", + "pallet-message-queue", "pallet-xcm", "parachains-common", "parity-scale-codec", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-runtime", - "polkadot-runtime-parachains", + "rococo-westend-system-emulated-network", "staging-xcm", - "xcm-emulator", + "staging-xcm-executor", ] [[package]] name = "bridge-hub-rococo-runtime" version = "0.1.0" dependencies = [ + "bp-asset-hub-rococo", + "bp-asset-hub-westend", "bp-bridge-hub-rococo", - "bp-bridge-hub-wococo", + "bp-bridge-hub-westend", "bp-header-chain", "bp-messages", "bp-parachains", @@ -1971,11 +2154,10 @@ dependencies = [ "bp-relayers", "bp-rococo", "bp-runtime", - "bp-wococo", + "bp-westend", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", @@ -1999,6 +2181,7 @@ dependencies = [ "pallet-bridge-parachains", "pallet-bridge-relayers", "pallet-collator-selection", + "pallet-message-queue", "pallet-multisig", "pallet-session", "pallet-timestamp", @@ -2007,7 +2190,6 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", - "parachain-info", "parachains-common", "parity-scale-codec", "polkadot-core-primitives", @@ -2021,16 +2203,18 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-keyring", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -2042,10 +2226,7 @@ dependencies = [ name = "bridge-hub-test-utils" version = "0.1.0" dependencies = [ - "assert_matches", "asset-test-utils", - "bp-bridge-hub-rococo", - "bp-bridge-hub-wococo", "bp-header-chain", "bp-messages", "bp-parachains", @@ -2054,7 +2235,6 @@ dependencies = [ "bp-runtime", "bp-test-utils", "bridge-runtime-common", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", "frame-benchmarking", @@ -2072,7 +2252,6 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", - "parachain-info", "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", @@ -2080,11 +2259,133 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", + "sp-tracing 10.0.0", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", ] +[[package]] +name = "bridge-hub-westend-emulated-chain" +version = "0.0.0" +dependencies = [ + "bridge-hub-westend-runtime", + "cumulus-primitives-core", + "emulated-integration-tests-common", + "frame-support", + "parachains-common", + "serde_json", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "bridge-hub-westend-integration-tests" +version = "1.0.0" +dependencies = [ + "asset-test-utils", + "bp-messages", + "bridge-hub-westend-runtime", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-xcmp-queue", + "emulated-integration-tests-common", + "frame-support", + "pallet-assets", + "pallet-balances", + "pallet-bridge-messages", + "pallet-message-queue", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "rococo-westend-system-emulated-network", + "staging-xcm", + "staging-xcm-executor", +] + +[[package]] +name = "bridge-hub-westend-runtime" +version = "0.1.0" +dependencies = [ + "bp-asset-hub-westend", + "bp-bridge-hub-rococo", + "bp-bridge-hub-westend", + "bp-header-chain", + "bp-messages", + "bp-parachains", + "bp-polkadot-core", + "bp-relayers", + "bp-rococo", + "bp-runtime", + "bp-westend", + "bridge-hub-test-utils", + "bridge-runtime-common", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-bridge-grandpa", + "pallet-bridge-messages", + "pallet-bridge-parachains", + "pallet-bridge-relayers", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-multisig", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parachains-common", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", + "scale-info", + "serde", + "smallvec", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "static_assertions", + "substrate-wasm-builder", + "westend-runtime-constants", +] + [[package]] name = "bridge-runtime-common" version = "0.1.0" @@ -2114,7 +2415,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-trie", "staging-xcm", "staging-xcm-builder", @@ -2203,6 +2504,16 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "c2-chacha" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" +dependencies = [ + "cipher 0.2.5", + "ppv-lite86", +] + [[package]] name = "camino" version = "1.1.6" @@ -2259,7 +2570,7 @@ checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" dependencies = [ "aead 0.3.2", "cipher 0.2.5", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -2292,6 +2603,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddf3c081b5fba1e5615640aae998e0fbd10c24cbd897ee39ed754a77601a4862" +dependencies = [ + "byteorder", + "keystream", +] + [[package]] name = "chacha20" version = "0.8.2" @@ -2328,20 +2649,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "chain-spec-builder" -version = "2.0.0" -dependencies = [ - "ansi_term", - "clap 4.4.3", - "node-cli", - "rand 0.8.5", - "sc-chain-spec", - "sc-keystore", - "sp-core", - "sp-keystore", -] - [[package]] name = "chrono" version = "0.4.30" @@ -2463,24 +2770,25 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.3" +version = "4.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ed82781cea27b43c9b106a979fe450a13a31aab0500595fb3fc06616de08e6" +checksum = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272" dependencies = [ "clap_builder", - "clap_derive 4.4.2", + "clap_derive 4.4.7", ] [[package]] name = "clap_builder" -version = "4.4.2" +version = "4.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb9faaa7c2ef94b2743a21f5a29e6f0010dff4caa69ac8e9d6cf8b6fa74da08" +checksum = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1" dependencies = [ "anstream", "anstyle", - "clap_lex 0.5.1", + "clap_lex 0.6.0", "strsim", + "terminal_size", ] [[package]] @@ -2489,7 +2797,7 @@ version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "586a385f7ef2f8b4d86bddaa0c094794e7ccbfe5ffef1f434fe928143fc783a5" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", ] [[package]] @@ -2507,14 +2815,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.2" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -2528,9 +2836,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "coarsetime" @@ -2555,32 +2863,79 @@ dependencies = [ ] [[package]] -name = "collectives-polkadot-integration-tests" -version = "0.1.0" +name = "collectives-polkadot-runtime" +version = "1.0.0" dependencies = [ - "collectives-polkadot-runtime", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", "frame-support", - "integration-tests-common", - "pallet-assets", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-alliance", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-collective", + "pallet-collective-content", "pallet-core-fellowship", + "pallet-message-queue", + "pallet-multisig", + "pallet-preimage", + "pallet-proxy", + "pallet-ranked-collective", + "pallet-referenda", "pallet-salary", + "pallet-scheduler", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", "pallet-xcm", "parachains-common", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", - "polkadot-runtime", - "polkadot-runtime-parachains", + "polkadot-runtime-common", + "scale-info", + "smallvec", + "sp-api", + "sp-arithmetic", + "sp-block-builder", + "sp-consensus-aura", "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-offchain", "sp-runtime", + "sp-session", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", "staging-xcm", - "xcm-emulator", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", ] [[package]] -name = "collectives-polkadot-runtime" +name = "collectives-westend-runtime" version = "1.0.0" dependencies = [ "cumulus-pallet-aura-ext", @@ -2606,7 +2961,9 @@ dependencies = [ "pallet-balances", "pallet-collator-selection", "pallet-collective", + "pallet-collective-content", "pallet-core-fellowship", + "pallet-message-queue", "pallet-multisig", "pallet-preimage", "pallet-proxy", @@ -2620,13 +2977,11 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "pallet-utility", "pallet-xcm", - "parachain-info", "parachains-common", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", - "polkadot-runtime-constants", "scale-info", "smallvec", "sp-api", @@ -2634,19 +2989,23 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnets-common", + "westend-runtime-constants", ] [[package]] @@ -2703,7 +3062,7 @@ dependencies = [ [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof?rev=8657210#86572101f4210647984ab4efedba6b3fcc890895" +source = "git+https://github.com/burdges/ring-proof?branch=patch-1#05a756076cb20f981a52afea3a620168de49f95f" dependencies = [ "ark-ec", "ark-ff", @@ -2815,7 +3174,6 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex-literal", - "kusama-runtime-constants", "log", "pallet-aura", "pallet-authorship", @@ -2824,6 +3182,7 @@ dependencies = [ "pallet-contracts", "pallet-contracts-primitives", "pallet-insecure-randomness-collective-flip", + "pallet-message-queue", "pallet-multisig", "pallet-session", "pallet-sudo", @@ -2832,26 +3191,28 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "pallet-utility", "pallet-xcm", - "parachain-info", "parachains-common", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", + "rococo-runtime-constants", "scale-info", "smallvec", "sp-api", "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -3085,7 +3446,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.4.3", + "clap 4.4.10", "criterion-plot", "futures", "is-terminal", @@ -3181,7 +3542,7 @@ checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -3193,7 +3554,7 @@ checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -3208,6 +3569,16 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" +dependencies = [ + "generic-array 0.12.4", + "subtle 1.0.0", +] + [[package]] name = "crypto-mac" version = "0.8.0" @@ -3215,7 +3586,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3225,7 +3596,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -3250,7 +3621,7 @@ dependencies = [ name = "cumulus-client-cli" version = "0.1.0" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", "parity-scale-codec", "sc-chain-spec", "sc-cli", @@ -3287,7 +3658,7 @@ dependencies = [ "sp-maybe-compressed-blob", "sp-runtime", "sp-state-machine", - "sp-tracing", + "sp-tracing 10.0.0", "tracing", ] @@ -3358,7 +3729,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-timestamp", - "sp-tracing", + "sp-tracing 10.0.0", "sp-trie", "substrate-prometheus-endpoint", "tracing", @@ -3509,7 +3880,7 @@ dependencies = [ "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -3517,6 +3888,7 @@ name = "cumulus-pallet-dmp-queue" version = "0.1.0" dependencies = [ "cumulus-primitives-core", + "frame-benchmarking", "frame-support", "frame-system", "log", @@ -3525,8 +3897,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-version", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "staging-xcm", ] @@ -3542,25 +3914,30 @@ dependencies = [ "cumulus-test-client", "cumulus-test-relay-sproof-builder", "environmental", + "frame-benchmarking", "frame-support", "frame-system", + "futures", "hex-literal", "impl-trait-for-tuples", "lazy_static", "log", + "pallet-message-queue", "parity-scale-codec", "polkadot-parachain-primitives", + "polkadot-runtime-parachains", + "rand 0.8.5", "sc-client-api", "scale-info", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-inherents", "sp-io", "sp-keyring", "sp-runtime", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "sp-trie", "sp-version", "staging-xcm", @@ -3574,7 +3951,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -3587,7 +3964,7 @@ dependencies = [ "pallet-session", "parity-scale-codec", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -3602,7 +3979,7 @@ dependencies = [ "polkadot-primitives", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -3616,7 +3993,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", ] @@ -3624,6 +4001,8 @@ dependencies = [ name = "cumulus-pallet-xcmp-queue" version = "0.1.0" dependencies = [ + "bounded-collections", + "bp-xcm-bridge-hub-router", "cumulus-pallet-parachain-system", "cumulus-primitives-core", "frame-benchmarking", @@ -3631,14 +4010,15 @@ dependencies = [ "frame-system", "log", "pallet-balances", + "pallet-message-queue", "parity-scale-codec", "polkadot-runtime-common", - "rand_chacha 0.3.1", + "polkadot-runtime-parachains", "scale-info", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -3655,7 +4035,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", ] @@ -3669,7 +4049,7 @@ dependencies = [ "sp-api", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -3683,7 +4063,7 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-trie", "staging-xcm", ] @@ -3704,8 +4084,8 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-trie", "tracing", ] @@ -3718,7 +4098,7 @@ dependencies = [ "futures", "parity-scale-codec", "sp-inherents", - "sp-std", + "sp-std 8.0.0", "sp-timestamp", ] @@ -3729,11 +4109,13 @@ dependencies = [ "cumulus-primitives-core", "frame-support", "log", + "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-runtime-common", + "polkadot-runtime-parachains", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -3788,7 +4170,7 @@ dependencies = [ name = "cumulus-relay-chain-minimal-node" version = "0.1.0" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", @@ -3799,22 +4181,27 @@ dependencies = [ "polkadot-core-primitives", "polkadot-network-bridge", "polkadot-node-collation-generation", + "polkadot-node-core-chain-api", + "polkadot-node-core-prospective-parachains", "polkadot-node-core-runtime-api", "polkadot-node-network-protocol", "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", "sc-authority-discovery", + "sc-client-api", "sc-network", "sc-network-common", "sc-service", "sc-tracing", "sc-utils", - "schnellru", "sp-api", + "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-runtime", + "substrate-prometheus-endpoint", + "tokio", "tracing", ] @@ -3847,7 +4234,8 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-storage 13.0.0", + "sp-version", "thiserror", "tokio", "tokio-util", @@ -3895,7 +4283,7 @@ dependencies = [ "polkadot-primitives", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", "sp-trie", ] @@ -3911,6 +4299,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "pallet-balances", "pallet-glutton", + "pallet-message-queue", "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", @@ -3919,12 +4308,13 @@ dependencies = [ "sp-api", "sp-block-builder", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -3935,7 +4325,7 @@ name = "cumulus-test-service" version = "0.1.0" dependencies = [ "async-trait", - "clap 4.4.3", + "clap 4.4.10", "criterion 0.5.1", "cumulus-client-cli", "cumulus-client-consensus-common", @@ -3985,6 +4375,7 @@ dependencies = [ "sc-transaction-pool", "sc-transaction-pool-api", "serde", + "serde_json", "sp-api", "sp-arithmetic", "sp-authority-discovery", @@ -3997,7 +4388,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-timestamp", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-test-client", "substrate-test-utils", "tempfile", @@ -4015,7 +4406,7 @@ dependencies = [ "byteorder", "digest 0.8.1", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -4028,7 +4419,7 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -4045,7 +4436,7 @@ dependencies = [ "fiat-crypto", "platforms", "rustc_version 0.4.0", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -4057,7 +4448,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -4097,7 +4488,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -4114,7 +4505,7 @@ checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -4360,14 +4751,14 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle", + "subtle 2.4.1", ] [[package]] name = "directories" -version = "4.0.1" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" +checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35" dependencies = [ "dirs-sys", ] @@ -4384,13 +4775,14 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.3.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -4412,7 +4804,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -4424,7 +4816,7 @@ checksum = "86e3bdc80eee6e16b2b6b0f87fbc98c04bee3455e35174c0de1a125d0688c632" [[package]] name = "dleq_vrf" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=f4fe253#f4fe2534ccc6d916cd10d9c16891e673728ec8b4" +source = "git+https://github.com/w3f/ring-vrf?rev=3ddc205#3ddc2051066c4b3f0eadd0ba5700df12500d9754" dependencies = [ "ark-ec", "ark-ff", @@ -4455,18 +4847,18 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "docify" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff509d6aa8e7ca86b36eb3d593132e64204597de3ccb763ffd8bfd2264d54cf3" +checksum = "4235e9b248e2ba4b92007fe9c646f3adf0ffde16dc74713eacc92b8bc58d8d2f" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b135598b950330937f3a0ddfbe908106ee2ecd5fa95d8ae7952a3c3863efe8da" +checksum = "47020e12d7c7505670d1363dd53d6c23724f71a90a3ae32ff8eba40de8404626" dependencies = [ "common-path", "derive-syn-parse", @@ -4474,7 +4866,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.32", + "syn 2.0.39", "termcolor", "toml 0.7.6", "walkdir", @@ -4628,7 +5020,7 @@ dependencies = [ "pkcs8 0.9.0", "rand_core 0.6.4", "sec1 0.3.0", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -4647,10 +5039,44 @@ dependencies = [ "pkcs8 0.10.2", "rand_core 0.6.4", "sec1 0.7.3", - "subtle", + "subtle 2.4.1", "zeroize", ] +[[package]] +name = "emulated-integration-tests-common" +version = "1.0.0" +dependencies = [ + "asset-test-utils", + "bp-messages", + "bridge-runtime-common", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "frame-support", + "pallet-assets", + "pallet-balances", + "pallet-bridge-messages", + "pallet-im-online", + "pallet-message-queue", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "paste", + "polkadot-primitives", + "polkadot-runtime-parachains", + "polkadot-service", + "sc-consensus-grandpa", + "serde_json", + "sp-authority-discovery", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-runtime", + "staging-xcm", + "xcm-emulator", +] + [[package]] name = "encode_unicode" version = "0.3.6" @@ -4695,7 +5121,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -4706,7 +5132,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -4847,11 +5273,11 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f86a749cf851891866c10515ef6c299b5c69661465e9c3bbe7e07a2b77fb0f7" dependencies = [ - "blake2", + "blake2 0.10.6", "fs-err", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -4918,11 +5344,12 @@ dependencies = [ [[package]] name = "fdlimit" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" +checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" dependencies = [ "libc", + "thiserror", ] [[package]] @@ -4948,7 +5375,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -4958,7 +5385,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -5107,11 +5534,41 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" +[[package]] +name = "frame" +version = "0.0.1-dev" +dependencies = [ + "docify", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-rpc-runtime-api", + "log", + "pallet-examples", + "parity-scale-codec", + "scale-info", + "simple-mermaid", + "sp-api", + "sp-arithmetic", + "sp-block-builder", + "sp-consensus-aura", + "sp-consensus-grandpa", + "sp-core", + "sp-inherents", + "sp-io", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std 8.0.0", + "sp-transaction-pool", + "sp-version", +] + [[package]] name = "frame-benchmarking" version = "4.0.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "frame-support", "frame-support-procedural", "frame-system", @@ -5128,9 +5585,9 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", "static_assertions", ] @@ -5139,9 +5596,9 @@ name = "frame-benchmarking-cli" version = "4.0.0-dev" dependencies = [ "Inflector", - "array-bytes", + "array-bytes 6.1.0", "chrono", - "clap 4.4.3", + "clap 4.4.10", "comfy-table", "frame-benchmarking", "frame-support", @@ -5168,15 +5625,15 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-database", - "sp-externalities", + "sp-externalities 0.19.0", "sp-inherents", "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-storage 13.0.0", "sp-trie", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0", "thiserror", "thousands", ] @@ -5192,7 +5649,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -5207,7 +5664,7 @@ dependencies = [ "quote", "scale-info", "sp-arithmetic", - "syn 2.0.32", + "syn 2.0.39", "trybuild", ] @@ -5226,14 +5683,14 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "frame-election-solution-type-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", "frame-election-provider-solution-type", "frame-election-provider-support", "frame-support", @@ -5250,7 +5707,7 @@ dependencies = [ name = "frame-executive" version = "4.0.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "frame-support", "frame-system", "frame-try-runtime", @@ -5263,8 +5720,8 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "sp-version", ] @@ -5284,7 +5741,6 @@ dependencies = [ name = "frame-remote-externalities" version = "0.10.0-dev" dependencies = [ - "async-recursion", "futures", "indicatif", "jsonrpsee", @@ -5295,7 +5751,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-tracing", + "sp-tracing 10.0.0", "spinners", "substrate-rpc-client", "tokio", @@ -5307,7 +5763,7 @@ name = "frame-support" version = "4.0.0-dev" dependencies = [ "aquamarine", - "array-bytes", + "array-bytes 6.1.0", "assert_matches", "bitflags 1.3.2", "docify", @@ -5330,7 +5786,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", - "sp-debug-derive", + "sp-debug-derive 8.0.0", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -5338,8 +5794,8 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "sp-weights", "static_assertions", "tt-call", @@ -5359,7 +5815,8 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.32", + "sp-core-hashing", + "syn 2.0.39", ] [[package]] @@ -5370,7 +5827,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -5379,7 +5836,7 @@ version = "3.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -5404,7 +5861,7 @@ dependencies = [ "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", "sp-version", "static_assertions", "trybuild", @@ -5435,22 +5892,32 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "frame-support-test-stg-frame-crate" +version = "0.1.0" +dependencies = [ + "frame", + "parity-scale-codec", + "scale-info", +] + [[package]] name = "frame-system" version = "4.0.0-dev" dependencies = [ "cfg-if", "criterion 0.4.0", + "docify", "frame-support", "log", "parity-scale-codec", "scale-info", "serde", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-version", "sp-weights", "substrate-test-runtime-client", @@ -5466,10 +5933,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-version", ] @@ -5489,7 +5956,7 @@ dependencies = [ "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -5514,7 +5981,7 @@ version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" dependencies = [ - "rustix 0.38.8", + "rustix 0.38.25", "windows-sys 0.48.0", ] @@ -5602,7 +6069,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -5722,10 +6189,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -5788,9 +6253,57 @@ dependencies = [ name = "glutton-runtime" version = "1.0.0" dependencies = [ + "cumulus-pallet-aura-ext", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcm", + "cumulus-primitives-aura", + "cumulus-primitives-core", + "cumulus-primitives-timestamp", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "pallet-aura", + "pallet-glutton", + "pallet-message-queue", + "pallet-sudo", + "pallet-timestamp", + "parachains-common", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", +] + +[[package]] +name = "glutton-westend-runtime" +version = "1.0.0" +dependencies = [ + "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", "cumulus-pallet-xcm", + "cumulus-primitives-aura", "cumulus-primitives-core", + "cumulus-primitives-timestamp", "frame-benchmarking", "frame-executive", "frame-support", @@ -5798,23 +6311,28 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", + "pallet-aura", "pallet-glutton", + "pallet-message-queue", "pallet-sudo", - "parachain-info", + "pallet-timestamp", "parachains-common", "parity-scale-codec", "scale-info", "sp-api", "sp-block-builder", + "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -5829,7 +6347,7 @@ checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff 0.12.1", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -5840,7 +6358,7 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff 0.13.0", "rand_core 0.6.4", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -5926,6 +6444,15 @@ dependencies = [ "serde", ] +[[package]] +name = "hashlink" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +dependencies = [ + "hashbrown 0.14.0", +] + [[package]] name = "heck" version = "0.4.1" @@ -6325,74 +6852,23 @@ name = "instant" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "integer-encoding" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" - -[[package]] -name = "integer-sqrt" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" -dependencies = [ - "num-traits", -] - -[[package]] -name = "integration-tests-common" -version = "1.0.0" -dependencies = [ - "asset-hub-kusama-runtime", - "asset-hub-polkadot-runtime", - "asset-hub-westend-runtime", - "bp-messages", - "bridge-hub-kusama-runtime", - "bridge-hub-polkadot-runtime", - "bridge-hub-rococo-runtime", - "bridge-runtime-common", - "collectives-polkadot-runtime", - "cumulus-pallet-dmp-queue", - "cumulus-pallet-parachain-system", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-core", - "frame-support", - "kusama-runtime-constants", - "pallet-assets", - "pallet-bridge-messages", - "pallet-im-online", - "pallet-message-queue", - "pallet-staking", - "pallet-xcm", - "parachains-common", - "parity-scale-codec", - "paste", - "penpal-runtime", - "polkadot-core-primitives", - "polkadot-parachain-primitives", - "polkadot-primitives", - "polkadot-runtime", - "polkadot-runtime-constants", - "polkadot-runtime-parachains", - "polkadot-service", - "rococo-runtime", - "rococo-runtime-constants", - "sc-consensus-grandpa", - "sp-authority-discovery", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-core", - "sp-runtime", - "staging-kusama-runtime", - "staging-xcm", - "westend-runtime", - "westend-runtime-constants", - "xcm-emulator", +dependencies = [ + "cfg-if", +] + +[[package]] +name = "integer-encoding" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" + +[[package]] +name = "integer-sqrt" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276ec31bcb4a9ee45f58bec6f9ec700ae4cf4f4f8f2fa7e06cb406bd5ffdd770" +dependencies = [ + "num-traits", ] [[package]] @@ -6456,7 +6932,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", - "rustix 0.38.8", + "rustix 0.38.25", "windows-sys 0.48.0", ] @@ -6705,6 +7181,12 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "keystream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" + [[package]] name = "kitchensink-runtime" version = "3.0.0-dev" @@ -6753,6 +7235,7 @@ dependencies = [ "pallet-lottery", "pallet-membership", "pallet-message-queue", + "pallet-mixnet", "pallet-mmr", "pallet-multisig", "pallet-nft-fractionalization", @@ -6776,6 +7259,7 @@ dependencies = [ "pallet-scheduler", "pallet-session", "pallet-session-benchmarking", + "pallet-skip-feeless-payment", "pallet-society", "pallet-staking", "pallet-staking-reward-curve", @@ -6797,40 +7281,30 @@ dependencies = [ "parity-scale-codec", "primitive-types", "scale-info", + "serde_json", "sp-api", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-grandpa", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", + "sp-mixnet", "sp-offchain", "sp-runtime", "sp-session", "sp-staking", "sp-statement-store", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-version", "static_assertions", "substrate-wasm-builder", ] -[[package]] -name = "kusama-runtime-constants" -version = "1.0.0" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", -] - [[package]] name = "kvdb" version = "0.13.0" @@ -6875,9 +7349,9 @@ dependencies = [ [[package]] name = "landlock" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520baa32708c4e957d2fc3a186bc5bd8d26637c33137f399ddfc202adb240068" +checksum = "1530c5b973eeed4ac216af7e24baf5737645a6272e361f1fb95710678b67d9cc" dependencies = [ "enumflags2", "libc", @@ -6913,9 +7387,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libflate" @@ -6937,6 +7411,17 @@ dependencies = [ "rle-decode-fast", ] +[[package]] +name = "libfuzzer-sys" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" +dependencies = [ + "arbitrary", + "cc", + "once_cell", +] + [[package]] name = "libloading" version = "0.7.4" @@ -7420,7 +7905,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -7499,9 +7984,21 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" + +[[package]] +name = "lioness" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "4ae926706ba42c425c9457121178330d75e273df2e82e28b758faf3de3a9acb9" +dependencies = [ + "arrayref", + "blake2 0.8.1", + "chacha", + "keystream", +] [[package]] name = "lite-json" @@ -7605,50 +8102,50 @@ dependencies = [ [[package]] name = "macro_magic" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aee866bfee30d2d7e83835a4574aad5b45adba4cc807f2a3bbba974e5d4383c9" +checksum = "e03844fc635e92f3a0067e25fa4bf3e3dbf3f2927bf3aa01bb7bc8f1c428949d" dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] name = "macro_magic_core" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" +checksum = "468155613a44cfd825f1fb0ffa532b018253920d404e6fca1e8d43155198a46d" dependencies = [ "const-random", "derive-syn-parse", "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] name = "macro_magic_core_macros" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c12469fc165526520dff2807c2975310ab47cf7190a45b99b49a7dc8befab17b" +checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] name = "macro_magic_macros" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" +checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -7699,9 +8196,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memfd" @@ -7813,6 +8310,58 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" +[[package]] +name = "minimal-node" +version = "4.0.0-dev" +dependencies = [ + "clap 4.4.10", + "frame", + "futures", + "futures-timer", + "jsonrpsee", + "minimal-runtime", + "sc-basic-authorship", + "sc-cli", + "sc-client-api", + "sc-consensus", + "sc-consensus-manual-seal", + "sc-executor", + "sc-network", + "sc-offchain", + "sc-rpc-api", + "sc-service", + "sc-telemetry", + "sc-transaction-pool", + "sc-transaction-pool-api", + "serde_json", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-io", + "sp-keyring", + "sp-runtime", + "sp-timestamp", + "substrate-build-script-utils", + "substrate-frame-rpc-system", +] + +[[package]] +name = "minimal-runtime" +version = "0.1.0" +dependencies = [ + "frame", + "frame-support", + "pallet-balances", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "parity-scale-codec", + "scale-info", + "sp-genesis-builder", + "substrate-wasm-builder", +] + [[package]] name = "miniz_oxide" version = "0.7.1" @@ -7833,6 +8382,31 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mixnet" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" +dependencies = [ + "arrayref", + "arrayvec 0.7.4", + "bitflags 1.3.2", + "blake2 0.10.6", + "c2-chacha", + "curve25519-dalek 4.0.0", + "either", + "hashlink", + "lioness", + "log", + "parking_lot 0.12.1", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_distr", + "subtle 2.4.1", + "thiserror", + "zeroize", +] + [[package]] name = "mmr-gadget" version = "4.0.0-dev" @@ -7851,7 +8425,7 @@ dependencies = [ "sp-core", "sp-mmr-primitives", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-test-runtime-client", "tokio", ] @@ -8124,6 +8698,17 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "nix" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +dependencies = [ + "bitflags 2.4.0", + "cfg-if", + "libc", +] + [[package]] name = "no-std-net" version = "0.6.0" @@ -8134,8 +8719,8 @@ checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" name = "node-bench" version = "0.9.0-dev" dependencies = [ - "array-bytes", - "clap 4.4.3", + "array-bytes 6.1.0", + "clap 4.4.10", "derive_more", "fs_extra", "futures", @@ -8152,161 +8737,18 @@ dependencies = [ "sc-basic-authorship", "sc-client-api", "sc-transaction-pool", - "sc-transaction-pool-api", - "serde", - "serde_json", - "sp-consensus", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", - "sp-timestamp", - "sp-tracing", - "sp-trie", - "tempfile", -] - -[[package]] -name = "node-cli" -version = "3.0.0-dev" -dependencies = [ - "array-bytes", - "assert_cmd", - "clap 4.4.3", - "clap_complete", - "criterion 0.4.0", - "frame-benchmarking-cli", - "frame-system", - "frame-system-rpc-runtime-api", - "futures", - "jsonrpsee", - "kitchensink-runtime", - "log", - "nix 0.26.2", - "node-executor", - "node-inspect", - "node-primitives", - "node-rpc", - "pallet-asset-conversion-tx-payment", - "pallet-asset-tx-payment", - "pallet-assets", - "pallet-balances", - "pallet-im-online", - "pallet-timestamp", - "parity-scale-codec", - "platforms", - "rand 0.8.5", - "regex", - "sc-authority-discovery", - "sc-basic-authorship", - "sc-block-builder", - "sc-chain-spec", - "sc-cli", - "sc-client-api", - "sc-client-db", - "sc-consensus", - "sc-consensus-babe", - "sc-consensus-epochs", - "sc-consensus-grandpa", - "sc-consensus-slots", - "sc-executor", - "sc-keystore", - "sc-network", - "sc-network-common", - "sc-network-statement", - "sc-network-sync", - "sc-offchain", - "sc-rpc", - "sc-service", - "sc-service-test", - "sc-statement-store", - "sc-storage-monitor", - "sc-sync-state-rpc", - "sc-sysinfo", - "sc-telemetry", - "sc-transaction-pool", - "sc-transaction-pool-api", - "serde", - "serde_json", - "soketto", - "sp-api", - "sp-authority-discovery", - "sp-blockchain", - "sp-consensus", - "sp-consensus-babe", - "sp-consensus-grandpa", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-keystore", - "sp-runtime", - "sp-statement-store", - "sp-timestamp", - "sp-tracing", - "sp-transaction-storage-proof", - "substrate-build-script-utils", - "substrate-cli-test-utils", - "substrate-frame-cli", - "substrate-rpc-client", - "tempfile", - "tokio", - "tokio-util", - "try-runtime-cli", - "wait-timeout", -] - -[[package]] -name = "node-executor" -version = "3.0.0-dev" -dependencies = [ - "criterion 0.4.0", - "frame-benchmarking", - "frame-support", - "frame-system", - "futures", - "kitchensink-runtime", - "node-primitives", - "node-testing", - "pallet-balances", - "pallet-contracts", - "pallet-glutton", - "pallet-im-online", - "pallet-root-testing", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-treasury", - "parity-scale-codec", - "sc-executor", - "scale-info", - "sp-application-crypto", - "sp-consensus-babe", + "sc-transaction-pool-api", + "serde", + "serde_json", + "sp-consensus", "sp-core", - "sp-externalities", - "sp-keyring", - "sp-keystore", + "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-statement-store", - "sp-tracing", + "sp-timestamp", + "sp-tracing 10.0.0", "sp-trie", - "wat", -] - -[[package]] -name = "node-inspect" -version = "0.9.0-dev" -dependencies = [ - "clap 4.4.3", - "parity-scale-codec", - "sc-cli", - "sc-client-api", - "sc-service", - "sp-blockchain", - "sp-core", - "sp-runtime", - "thiserror", + "tempfile", ] [[package]] @@ -8331,6 +8773,7 @@ dependencies = [ "sc-consensus-babe-rpc", "sc-consensus-grandpa", "sc-consensus-grandpa-rpc", + "sc-mixnet", "sc-rpc", "sc-rpc-api", "sc-rpc-spec-v2", @@ -8352,7 +8795,7 @@ dependencies = [ name = "node-runtime-generate-bags" version = "3.0.0" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", "generate-bags", "kitchensink-runtime", ] @@ -8361,7 +8804,7 @@ dependencies = [ name = "node-template" version = "4.0.0-dev" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", @@ -8384,6 +8827,7 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool", "sc-transaction-pool-api", + "serde_json", "sp-api", "sp-block-builder", "sp-blockchain", @@ -8404,7 +8848,7 @@ dependencies = [ name = "node-template-release" version = "3.0.0" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", "flate2", "fs_extra", "glob", @@ -8435,17 +8879,19 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "scale-info", + "serde_json", "sp-api", "sp-block-builder", "sp-consensus-aura", "sp-consensus-grandpa", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -8460,12 +8906,12 @@ dependencies = [ "futures", "kitchensink-runtime", "log", - "node-executor", "node-primitives", "pallet-asset-conversion", "pallet-asset-conversion-tx-payment", "pallet-asset-tx-payment", "pallet-assets", + "pallet-skip-feeless-payment", "parity-scale-codec", "sc-block-builder", "sc-client-api", @@ -8483,6 +8929,7 @@ dependencies = [ "sp-keyring", "sp-runtime", "sp-timestamp", + "staging-node-executor", "substrate-test-client", "tempfile", ] @@ -8687,6 +9134,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "orchestra" version = "0.3.3" @@ -8732,6 +9185,16 @@ dependencies = [ "num-traits", ] +[[package]] +name = "os_pipe" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae859aa07428ca9a929b936690f8b12dc5f11dd8c6992a18ca93919f28bc177" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "os_str_bytes" version = "6.5.1" @@ -8770,7 +9233,7 @@ dependencies = [ name = "pallet-alliance" version = "4.0.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "frame-benchmarking", "frame-support", "frame-system", @@ -8784,7 +9247,7 @@ dependencies = [ "sp-core-hashing", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -8804,7 +9267,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -8822,8 +9285,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", ] [[package]] @@ -8839,7 +9302,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -8860,8 +9323,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", ] [[package]] @@ -8878,7 +9341,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -8893,7 +9356,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -8911,7 +9374,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -8928,7 +9391,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -8943,7 +9406,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -8971,7 +9434,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -8991,8 +9454,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] @@ -9018,9 +9481,9 @@ dependencies = [ "pallet-staking", "sp-core", "sp-runtime", - "sp-std", - "sp-storage", - "sp-tracing", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-tracing 10.0.0", ] [[package]] @@ -9038,7 +9501,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9066,14 +9529,14 @@ dependencies = [ "sp-session", "sp-staking", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "binary-merkle-tree", "frame-support", "frame-system", @@ -9091,7 +9554,7 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9109,7 +9572,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9130,7 +9593,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-trie", ] @@ -9149,10 +9612,9 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9174,7 +9636,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-trie", ] @@ -9194,10 +9656,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-arithmetic", - "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9214,7 +9675,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9233,7 +9694,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9257,8 +9718,8 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] @@ -9274,14 +9735,29 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", +] + +[[package]] +name = "pallet-collective-content" +version = "0.1.0" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0", ] [[package]] name = "pallet-contracts" version = "4.0.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "assert_matches", "bitflags 1.3.2", "env_logger 0.9.3", @@ -9291,10 +9767,13 @@ dependencies = [ "frame-system", "impl-trait-for-tuples", "log", + "pallet-assets", "pallet-balances", + "pallet-contracts-fixtures", "pallet-contracts-primitives", "pallet-contracts-proc-macro", "pallet-insecure-randomness-collective-flip", + "pallet-message-queue", "pallet-proxy", "pallet-timestamp", "pallet-utility", @@ -9310,12 +9789,62 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 8.0.0", + "sp-tracing 10.0.0", + "staging-xcm", + "staging-xcm-builder", "wasm-instrument 0.4.0", "wasmi", "wat", ] +[[package]] +name = "pallet-contracts-fixtures" +version = "1.0.0" +dependencies = [ + "frame-system", + "sp-runtime", + "wat", +] + +[[package]] +name = "pallet-contracts-mock-network" +version = "1.0.0" +dependencies = [ + "assert_matches", + "frame-support", + "frame-system", + "pallet-assets", + "pallet-balances", + "pallet-contracts", + "pallet-contracts-fixtures", + "pallet-contracts-primitives", + "pallet-contracts-proc-macro", + "pallet-insecure-randomness-collective-flip", + "pallet-message-queue", + "pallet-proxy", + "pallet-timestamp", + "pallet-utility", + "pallet-xcm", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-parachains", + "pretty_assertions", + "scale-info", + "sp-api", + "sp-core", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-std 8.0.0", + "sp-tracing 10.0.0", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "xcm-simulator", +] + [[package]] name = "pallet-contracts-primitives" version = "24.0.0" @@ -9324,7 +9853,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-weights", ] @@ -9334,7 +9863,7 @@ version = "4.0.0-dev" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -9353,7 +9882,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9370,7 +9899,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9384,7 +9913,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9404,7 +9933,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9420,7 +9949,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9445,8 +9974,8 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] @@ -9469,8 +9998,8 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "strum", ] @@ -9484,7 +10013,7 @@ dependencies = [ "parity-scale-codec", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9503,8 +10032,8 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "substrate-test-utils", ] @@ -9522,7 +10051,16 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", +] + +[[package]] +name = "pallet-example-frame-crate" +version = "0.0.1" +dependencies = [ + "frame", + "parity-scale-codec", + "scale-info", ] [[package]] @@ -9539,7 +10077,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9556,7 +10094,7 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9571,7 +10109,7 @@ dependencies = [ "scale-info", "sp-core", "sp-io", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9590,7 +10128,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9600,6 +10138,7 @@ dependencies = [ "pallet-default-config-example", "pallet-dev-mode", "pallet-example-basic", + "pallet-example-frame-crate", "pallet-example-kitchensink", "pallet-example-offchain-worker", "pallet-example-split", @@ -9626,8 +10165,8 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "substrate-test-utils", ] @@ -9635,7 +10174,7 @@ dependencies = [ name = "pallet-glutton" version = "4.0.0-dev" dependencies = [ - "blake2", + "blake2 0.10.6", "frame-benchmarking", "frame-support", "frame-system", @@ -9646,7 +10185,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9676,7 +10215,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9693,7 +10232,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9713,7 +10252,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9730,7 +10269,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9745,7 +10284,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9762,7 +10301,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9778,7 +10317,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9798,16 +10337,35 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "sp-weights", ] +[[package]] +name = "pallet-mixnet" +version = "0.1.0-dev" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-application-crypto", + "sp-arithmetic", + "sp-io", + "sp-mixnet", + "sp-runtime", + "sp-std 8.0.0", +] + [[package]] name = "pallet-mmr" version = "4.0.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "env_logger 0.9.3", "frame-benchmarking", "frame-support", @@ -9820,7 +10378,7 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9836,7 +10394,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9855,7 +10413,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9874,7 +10432,7 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9884,6 +10442,7 @@ dependencies = [ "pallet-nfts", "parity-scale-codec", "sp-api", + "sp-std 8.0.0", ] [[package]] @@ -9898,7 +10457,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9915,7 +10474,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9930,7 +10489,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9947,8 +10506,8 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] @@ -9970,9 +10529,9 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -9987,7 +10546,7 @@ dependencies = [ "rand 0.8.5", "sp-io", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", ] [[package]] @@ -9997,7 +10556,7 @@ dependencies = [ "pallet-nomination-pools", "parity-scale-codec", "sp-api", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10020,8 +10579,8 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] @@ -10039,7 +10598,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10066,7 +10625,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10083,7 +10642,7 @@ dependencies = [ "sp-io", "sp-metadata-ir", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10126,7 +10685,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10143,7 +10702,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10160,7 +10719,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10176,7 +10735,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10198,7 +10757,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10214,7 +10773,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10235,7 +10794,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10249,13 +10808,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-safe-mode" version = "4.0.0-dev" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -10268,7 +10828,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10285,7 +10845,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10303,7 +10863,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-weights", "substrate-test-utils", ] @@ -10320,7 +10880,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10340,7 +10900,7 @@ dependencies = [ "sp-session", "sp-staking", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", "sp-trie", ] @@ -10364,7 +10924,19 @@ dependencies = [ "sp-io", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", +] + +[[package]] +name = "pallet-skip-feeless-payment" +version = "1.0.0-dev" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std 8.0.0", ] [[package]] @@ -10384,7 +10956,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10412,8 +10984,8 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "substrate-test-utils", ] @@ -10425,7 +10997,7 @@ dependencies = [ "proc-macro2", "quote", "sp-runtime", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -10442,6 +11014,7 @@ version = "4.0.0-dev" dependencies = [ "parity-scale-codec", "sp-api", + "sp-staking", ] [[package]] @@ -10461,8 +11034,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "substrate-state-trie-migration-rpc", "thousands", "tokio", @@ -10484,7 +11057,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-statement-store", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10500,7 +11073,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10515,13 +11088,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-timestamp" version = "4.0.0-dev" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -10532,8 +11106,8 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-timestamp", ] @@ -10553,8 +11127,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", ] [[package]] @@ -10571,7 +11145,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10604,7 +11178,7 @@ dependencies = [ name = "pallet-transaction-storage" version = "4.0.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "frame-benchmarking", "frame-support", "frame-system", @@ -10617,7 +11191,7 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-transaction-storage-proof", ] @@ -10625,6 +11199,7 @@ dependencies = [ name = "pallet-treasury" version = "4.0.0-dev" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -10637,13 +11212,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-tx-pause" version = "4.0.0-dev" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -10655,7 +11231,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10672,7 +11248,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10691,7 +11267,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10708,7 +11284,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10726,7 +11302,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10738,6 +11314,7 @@ dependencies = [ "frame-support", "frame-system", "log", + "pallet-assets", "pallet-balances", "parity-scale-codec", "polkadot-parachain-primitives", @@ -10747,7 +11324,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -10771,8 +11348,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -10792,29 +11369,16 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", ] -[[package]] -name = "parachain-info" -version = "0.1.0" -dependencies = [ - "cumulus-primitives-core", - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", -] - [[package]] name = "parachain-template-node" version = "0.1.0" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", "color-print", "cumulus-client-cli", "cumulus-client-collator", @@ -10852,6 +11416,7 @@ dependencies = [ "sc-transaction-pool", "sc-transaction-pool-api", "serde", + "serde_json", "sp-api", "sp-block-builder", "sp-blockchain", @@ -10892,6 +11457,7 @@ dependencies = [ "pallet-authorship", "pallet-balances", "pallet-collator-selection", + "pallet-message-queue", "pallet-parachain-template", "pallet-session", "pallet-sudo", @@ -10899,7 +11465,7 @@ dependencies = [ "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-xcm", - "parachain-info", + "parachains-common", "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-runtime-common", @@ -10909,13 +11475,15 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -10930,7 +11498,6 @@ dependencies = [ "cumulus-primitives-utility", "frame-support", "frame-system", - "kusama-runtime-constants", "log", "num-traits", "pallet-asset-tx-payment", @@ -10938,10 +11505,10 @@ dependencies = [ "pallet-authorship", "pallet-balances", "pallet-collator-selection", + "pallet-message-queue", "parity-scale-codec", "polkadot-core-primitives", "polkadot-primitives", - "polkadot-runtime-constants", "rococo-runtime-constants", "scale-info", "smallvec", @@ -10949,10 +11516,10 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", - "staging-xcm-executor", "substrate-wasm-builder", "westend-runtime-constants", ] @@ -10962,7 +11529,6 @@ name = "parachains-runtimes-test-utils" version = "1.0.0" dependencies = [ "assets-common", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", @@ -10976,7 +11542,6 @@ dependencies = [ "pallet-collator-selection", "pallet-session", "pallet-xcm", - "parachain-info", "parachains-common", "parity-scale-codec", "polkadot-parachain-primitives", @@ -10984,8 +11549,9 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", + "staging-parachain-info", "staging-xcm", "staging-xcm-executor", "substrate-wasm-builder", @@ -10997,7 +11563,7 @@ version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78f19d20a0d2cc52327a88d131fa1c4ea81ea4a04714aedcfeca2dd410049cf8" dependencies = [ - "blake2", + "blake2 0.10.6", "crc32fast", "fs2", "hex", @@ -11154,15 +11720,6 @@ dependencies = [ "crypto-mac 0.11.1", ] -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "pbkdf2" version = "0.12.2" @@ -11196,6 +11753,22 @@ dependencies = [ "base64ct", ] +[[package]] +name = "penpal-emulated-chain" +version = "0.0.0" +dependencies = [ + "cumulus-primitives-core", + "emulated-integration-tests-common", + "frame-support", + "parachains-common", + "penpal-runtime", + "rococo-emulated-chain", + "serde_json", + "sp-core", + "sp-runtime", + "westend-emulated-chain", +] + [[package]] name = "penpal-runtime" version = "0.9.27" @@ -11223,13 +11796,13 @@ dependencies = [ "pallet-authorship", "pallet-balances", "pallet-collator-selection", + "pallet-message-queue", "pallet-session", "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-xcm", - "parachain-info", "parachains-common", "parity-scale-codec", "polkadot-parachain-primitives", @@ -11241,14 +11814,16 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -11291,7 +11866,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -11332,7 +11907,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -11415,7 +11990,7 @@ dependencies = [ [[package]] name = "polkadot" -version = "1.0.0" +version = "1.1.0" dependencies = [ "assert_cmd", "color-eyre", @@ -11439,9 +12014,11 @@ name = "polkadot-approval-distribution" version = "1.0.0" dependencies = [ "assert_matches", + "bitvec", "env_logger 0.9.3", "futures", "futures-timer", + "itertools 0.10.5", "log", "polkadot-node-jaeger", "polkadot-node-metrics", @@ -11512,7 +12089,7 @@ dependencies = [ "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing", + "sp-tracing 10.0.0", "thiserror", "tracing-gum", ] @@ -11522,6 +12099,7 @@ name = "polkadot-availability-recovery" version = "1.0.0" dependencies = [ "assert_matches", + "async-trait", "env_logger 0.9.3", "fatality", "futures", @@ -11548,14 +12126,14 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "1.0.0" +version = "1.1.0" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", "frame-benchmarking-cli", "futures", "log", "polkadot-node-metrics", - "polkadot-performance-test", + "polkadot-node-primitives", "polkadot-service", "pyroscope", "pyroscope_pprofrs", @@ -11612,7 +12190,7 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -11643,7 +12221,7 @@ dependencies = [ "sp-application-crypto", "sp-keyring", "sp-keystore", - "sp-tracing", + "sp-tracing 10.0.0", "thiserror", "tracing-gum", ] @@ -11686,7 +12264,7 @@ dependencies = [ "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing", + "sp-tracing 10.0.0", "tracing-gum", ] @@ -11748,10 +12326,13 @@ dependencies = [ "async-trait", "bitvec", "derive_more", + "env_logger 0.9.3", "futures", "futures-timer", + "itertools 0.10.5", "kvdb", "kvdb-memorydb", + "log", "merlin 2.0.1", "parity-scale-codec", "parking_lot 0.12.1", @@ -11763,6 +12344,8 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "polkadot-primitives-test-helpers", + "rand 0.8.5", + "rand_chacha 0.3.1", "rand_core 0.5.1", "sc-keystore", "schnellru", @@ -11830,7 +12413,7 @@ dependencies = [ "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing", + "sp-tracing 10.0.0", "thiserror", "tracing-gum", ] @@ -11887,6 +12470,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", + "polkadot-node-subsystem-types", "polkadot-primitives", "sc-client-api", "sc-consensus-babe", @@ -11939,7 +12523,7 @@ dependencies = [ "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing", + "sp-tracing 10.0.0", "thiserror", "tracing-gum", ] @@ -12011,9 +12595,13 @@ version = "1.0.0" dependencies = [ "always-assert", "assert_matches", + "blake3", + "cfg-if", + "criterion 0.4.0", "futures", "futures-timer", "hex-literal", + "is_executable", "libc", "parity-scale-codec", "pin-project", @@ -12024,14 +12612,18 @@ dependencies = [ "polkadot-node-core-pvf-prepare-worker", "polkadot-node-metrics", "polkadot-node-primitives", + "polkadot-node-subsystem", "polkadot-parachain-primitives", "polkadot-primitives", + "procfs", "rand 0.8.5", + "rococo-runtime", + "rusty-fork", + "sc-sysinfo", "slotmap", "sp-core", "sp-maybe-compressed-blob", - "sp-wasm-interface", - "substrate-build-script-utils", + "sp-wasm-interface 14.0.0", "tempfile", "test-parachain-adder", "test-parachain-halt", @@ -12067,6 +12659,7 @@ name = "polkadot-node-core-pvf-common" version = "1.0.0" dependencies = [ "assert_matches", + "cfg-if", "cpu-time", "futures", "landlock", @@ -12077,12 +12670,14 @@ dependencies = [ "sc-executor", "sc-executor-common", "sc-executor-wasmtime", + "seccompiler", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-io", - "sp-tracing", + "sp-tracing 10.0.0", + "substrate-build-script-utils", "tempfile", - "tokio", + "thiserror", "tracing-gum", ] @@ -12091,16 +12686,13 @@ name = "polkadot-node-core-pvf-execute-worker" version = "1.0.0" dependencies = [ "cpu-time", - "futures", + "libc", + "nix 0.27.1", + "os_pipe", "parity-scale-codec", "polkadot-node-core-pvf-common", "polkadot-parachain-primitives", "polkadot-primitives", - "rayon", - "sp-core", - "sp-maybe-compressed-blob", - "sp-tracing", - "tokio", "tracing-gum", ] @@ -12108,21 +12700,23 @@ dependencies = [ name = "polkadot-node-core-pvf-prepare-worker" version = "1.0.0" dependencies = [ - "futures", + "blake3", + "cfg-if", + "criterion 0.4.0", "libc", + "nix 0.27.1", + "os_pipe", "parity-scale-codec", "polkadot-node-core-pvf-common", - "polkadot-parachain-primitives", "polkadot-primitives", "rayon", - "sc-executor", + "rococo-runtime", "sc-executor-common", "sc-executor-wasmtime", - "sp-io", "sp-maybe-compressed-blob", - "sp-tracing", + "staging-tracking-allocator", "tikv-jemalloc-ctl", - "tokio", + "tikv-jemallocator", "tracing-gum", ] @@ -12218,6 +12812,7 @@ dependencies = [ name = "polkadot-node-primitives" version = "1.0.0" dependencies = [ + "bitvec", "bounded-vec", "futures", "parity-scale-codec", @@ -12269,6 +12864,7 @@ name = "polkadot-node-subsystem-types" version = "1.0.0" dependencies = [ "async-trait", + "bitvec", "derive_more", "futures", "orchestra", @@ -12283,7 +12879,9 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", + "sp-blockchain", "sp-consensus-babe", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] @@ -12351,7 +12949,6 @@ dependencies = [ "polkadot-primitives-test-helpers", "prioritized-metered-channel", "sc-client-api", - "schnellru", "sp-api", "sp-core", "tikv-jemalloc-ctl", @@ -12360,18 +12957,21 @@ dependencies = [ [[package]] name = "polkadot-parachain-bin" -version = "1.0.0" +version = "1.1.0" dependencies = [ "assert_cmd", "asset-hub-kusama-runtime", "asset-hub-polkadot-runtime", + "asset-hub-rococo-runtime", "asset-hub-westend-runtime", "async-trait", "bridge-hub-kusama-runtime", "bridge-hub-polkadot-runtime", "bridge-hub-rococo-runtime", - "clap 4.4.3", + "bridge-hub-westend-runtime", + "clap 4.4.10", "collectives-polkadot-runtime", + "collectives-westend-runtime", "color-print", "contracts-rococo-runtime", "cumulus-client-cli", @@ -12381,18 +12981,25 @@ dependencies = [ "cumulus-client-consensus-proposer", "cumulus-client-consensus-relay-chain", "cumulus-client-service", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-interface", "frame-benchmarking", "frame-benchmarking-cli", + "frame-support", + "frame-system-rpc-runtime-api", + "frame-try-runtime", "futures", "glutton-runtime", + "glutton-westend-runtime", "hex-literal", "jsonrpsee", "log", "nix 0.26.2", + "pallet-transaction-payment", "pallet-transaction-payment-rpc", + "pallet-transaction-payment-rpc-runtime-api", "parachains-common", "parity-scale-codec", "penpal-runtime", @@ -12424,13 +13031,18 @@ dependencies = [ "sp-blockchain", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", + "sp-inherents", "sp-io", "sp-keystore", "sp-offchain", "sp-runtime", "sp-session", + "sp-std 8.0.0", "sp-timestamp", + "sp-tracing 10.0.0", "sp-transaction-pool", + "sp-version", "staging-xcm", "substrate-build-script-utils", "substrate-frame-rpc-system", @@ -12447,31 +13059,14 @@ version = "1.0.0" dependencies = [ "bounded-collections", "derive_more", - "frame-support", "parity-scale-codec", "polkadot-core-primitives", - "scale-info", - "serde", - "sp-core", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "polkadot-performance-test" -version = "1.0.0" -dependencies = [ - "env_logger 0.9.3", - "log", - "polkadot-erasure-coding", - "polkadot-node-core-pvf-prepare-worker", - "polkadot-node-primitives", - "polkadot-primitives", - "quote", - "sc-executor-common", - "sp-maybe-compressed-blob", - "staging-kusama-runtime", - "thiserror", + "scale-info", + "serde", + "sp-core", + "sp-runtime", + "sp-std 8.0.0", + "sp-weights", ] [[package]] @@ -12496,7 +13091,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -12542,110 +13137,6 @@ dependencies = [ "substrate-state-trie-migration-rpc", ] -[[package]] -name = "polkadot-runtime" -version = "1.0.0" -dependencies = [ - "bitvec", - "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", - "frame-remote-externalities", - "frame-support", - "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal", - "log", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-bags-list", - "pallet-balances", - "pallet-bounties", - "pallet-child-bounties", - "pallet-collective", - "pallet-conviction-voting", - "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", - "pallet-elections-phragmen", - "pallet-fast-unstake", - "pallet-grandpa", - "pallet-identity", - "pallet-im-online", - "pallet-indices", - "pallet-membership", - "pallet-message-queue", - "pallet-multisig", - "pallet-nomination-pools", - "pallet-nomination-pools-benchmarking", - "pallet-nomination-pools-runtime-api", - "pallet-offences", - "pallet-offences-benchmarking", - "pallet-preimage", - "pallet-proxy", - "pallet-referenda", - "pallet-scheduler", - "pallet-session", - "pallet-session-benchmarking", - "pallet-staking", - "pallet-staking-reward-curve", - "pallet-staking-runtime-api", - "pallet-timestamp", - "pallet-tips", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", - "pallet-utility", - "pallet-vesting", - "pallet-whitelist", - "pallet-xcm", - "pallet-xcm-benchmarks", - "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-constants", - "polkadot-runtime-parachains", - "rustc-hex", - "scale-info", - "separator", - "serde", - "serde_derive", - "serde_json", - "smallvec", - "sp-api", - "sp-arithmetic", - "sp-authority-discovery", - "sp-block-builder", - "sp-consensus-babe", - "sp-consensus-beefy", - "sp-core", - "sp-inherents", - "sp-io", - "sp-keyring", - "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", - "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-transaction-pool", - "sp-trie", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "static_assertions", - "substrate-wasm-builder", - "tiny-keccak", - "tokio", -] - [[package]] name = "polkadot-runtime-common" version = "1.0.0" @@ -12660,11 +13151,13 @@ dependencies = [ "impl-trait-for-tuples", "libsecp256k1", "log", + "pallet-asset-rate", "pallet-authorship", "pallet-babe", "pallet-balances", "pallet-election-provider-multi-phase", "pallet-fast-unstake", + "pallet-identity", "pallet-session", "pallet-staking", "pallet-staking-reward-fn", @@ -12672,6 +13165,7 @@ dependencies = [ "pallet-transaction-payment", "pallet-treasury", "pallet-vesting", + "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-primitives", "polkadot-primitives-test-helpers", @@ -12692,24 +13186,13 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", "static_assertions", ] -[[package]] -name = "polkadot-runtime-constants" -version = "1.0.0" -dependencies = [ - "frame-support", - "polkadot-primitives", - "polkadot-runtime-common", - "smallvec", - "sp-core", - "sp-runtime", - "sp-weights", -] - [[package]] name = "polkadot-runtime-metrics" version = "1.0.0" @@ -12718,8 +13201,8 @@ dependencies = [ "frame-benchmarking", "parity-scale-codec", "polkadot-primitives", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] @@ -12770,8 +13253,8 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "staging-xcm", "staging-xcm-executor", "static_assertions", @@ -12793,7 +13276,6 @@ dependencies = [ "futures", "hex-literal", "is_executable", - "kusama-runtime-constants", "kvdb", "kvdb-rocksdb", "log", @@ -12838,10 +13320,8 @@ dependencies = [ "polkadot-overseer", "polkadot-parachain-primitives", "polkadot-primitives", + "polkadot-primitives-test-helpers", "polkadot-rpc", - "polkadot-runtime", - "polkadot-runtime-common", - "polkadot-runtime-constants", "polkadot-runtime-parachains", "polkadot-statement-distribution", "polkadot-test-client", @@ -12892,12 +13372,11 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage", + "sp-storage 13.0.0", "sp-timestamp", "sp-transaction-pool", "sp-version", "sp-weights", - "staging-kusama-runtime", "substrate-prometheus-endpoint", "tempfile", "thiserror", @@ -12936,7 +13415,7 @@ dependencies = [ "sp-keyring", "sp-keystore", "sp-staking", - "sp-tracing", + "sp-tracing 10.0.0", "thiserror", "tracing-gum", ] @@ -12985,7 +13464,7 @@ version = "1.0.0" dependencies = [ "assert_matches", "async-trait", - "clap 4.4.3", + "clap 4.4.10", "color-eyre", "futures", "futures-timer", @@ -13055,6 +13534,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-beefy", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-keyring", @@ -13063,7 +13543,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-trie", "sp-version", @@ -13131,11 +13611,9 @@ dependencies = [ name = "polkadot-voter-bags" version = "1.0.0" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", "generate-bags", - "polkadot-runtime", "sp-io", - "staging-kusama-runtime", "westend-runtime", ] @@ -13311,7 +13789,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" dependencies = [ "proc-macro2", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -13387,24 +13865,50 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro-warning" -version = "0.4.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" +checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] +[[package]] +name = "procfs" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" +dependencies = [ + "bitflags 2.4.0", + "chrono", + "flate2", + "hex", + "lazy_static", + "procfs-core", + "rustix 0.38.25", +] + +[[package]] +name = "procfs-core" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" +dependencies = [ + "bitflags 2.4.0", + "chrono", + "hex", +] + [[package]] name = "prometheus" version = "0.13.3" @@ -13439,7 +13943,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -13830,7 +14334,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -13847,14 +14351,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.3" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.6", - "regex-syntax 0.7.4", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -13871,10 +14375,16 @@ name = "regex-automata" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" + +[[package]] +name = "regex-automata" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.4", + "regex-syntax 0.8.2", ] [[package]] @@ -13885,24 +14395,20 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "remote-ext-tests-bags-list" version = "1.0.0" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", "frame-system", - "kusama-runtime-constants", "log", "pallet-bags-list-remote-tests", - "polkadot-runtime", - "polkadot-runtime-constants", "sp-core", - "sp-tracing", - "staging-kusama-runtime", + "sp-tracing 10.0.0", "tokio", "westend-runtime", "westend-runtime-constants", @@ -13975,20 +14481,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle", + "subtle 2.4.1", ] [[package]] name = "ring" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof?rev=8657210#86572101f4210647984ab4efedba6b3fcc890895" +source = "git+https://github.com/burdges/ring-proof?branch=patch-1#05a756076cb20f981a52afea3a620168de49f95f" dependencies = [ "ark-ec", "ark-ff", "ark-poly", "ark-serialize", "ark-std", - "blake2", + "blake2 0.10.6", "common", "fflonk", "merlin 3.0.0", @@ -14035,6 +14541,25 @@ dependencies = [ "librocksdb-sys", ] +[[package]] +name = "rococo-emulated-chain" +version = "0.0.0" +dependencies = [ + "emulated-integration-tests-common", + "pallet-im-online", + "parachains-common", + "polkadot-primitives", + "rococo-runtime", + "rococo-runtime-constants", + "sc-consensus-grandpa", + "serde_json", + "sp-authority-discovery", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-runtime", +] + [[package]] name = "rococo-parachain-runtime" version = "0.1.0" @@ -14045,6 +14570,7 @@ dependencies = [ "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", "cumulus-ping", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", "frame-benchmarking", @@ -14055,27 +14581,30 @@ dependencies = [ "pallet-assets", "pallet-aura", "pallet-balances", + "pallet-message-queue", "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-xcm", - "parachain-info", "parachains-common", "parity-scale-codec", "polkadot-parachain-primitives", + "polkadot-runtime-common", "scale-info", "sp-api", "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -14097,6 +14626,7 @@ dependencies = [ "frame-try-runtime", "hex-literal", "log", + "pallet-asset-rate", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", @@ -14106,6 +14636,7 @@ dependencies = [ "pallet-bounties", "pallet-child-bounties", "pallet-collective", + "pallet-conviction-voting", "pallet-democracy", "pallet-elections-phragmen", "pallet-grandpa", @@ -14120,7 +14651,10 @@ dependencies = [ "pallet-offences", "pallet-preimage", "pallet-proxy", + "pallet-ranked-collective", "pallet-recovery", + "pallet-referenda", + "pallet-root-testing", "pallet-scheduler", "pallet-session", "pallet-society", @@ -14134,6 +14668,7 @@ dependencies = [ "pallet-treasury", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", @@ -14149,11 +14684,13 @@ dependencies = [ "serde_json", "smallvec", "sp-api", + "sp-arithmetic", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-keyring", @@ -14162,9 +14699,9 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", - "sp-storage", - "sp-tracing", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-tracing 10.0.0", "sp-transaction-pool", "sp-trie", "sp-version", @@ -14188,6 +14725,31 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", + "staging-xcm", +] + +[[package]] +name = "rococo-system-emulated-network" +version = "0.0.0" +dependencies = [ + "asset-hub-rococo-emulated-chain", + "bridge-hub-rococo-emulated-chain", + "emulated-integration-tests-common", + "penpal-emulated-chain", + "rococo-emulated-chain", +] + +[[package]] +name = "rococo-westend-system-emulated-network" +version = "0.0.0" +dependencies = [ + "asset-hub-rococo-emulated-chain", + "asset-hub-westend-emulated-chain", + "bridge-hub-rococo-emulated-chain", + "bridge-hub-westend-emulated-chain", + "emulated-integration-tests-common", + "rococo-emulated-chain", + "westend-emulated-chain", ] [[package]] @@ -14326,14 +14888,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.8" +version = "0.38.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" dependencies = [ "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.5", + "linux-raw-sys 0.4.11", "windows-sys 0.48.0", ] @@ -14430,6 +14992,7 @@ dependencies = [ "fnv", "quick-error", "tempfile", + "wait-timeout", ] [[package]] @@ -14493,7 +15056,7 @@ version = "4.1.0-dev" dependencies = [ "log", "sp-core", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0", "thiserror", ] @@ -14521,7 +15084,7 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -14557,7 +15120,6 @@ name = "sc-block-builder" version = "0.10.0-dev" dependencies = [ "parity-scale-codec", - "sc-client-api", "sp-api", "sp-block-builder", "sp-blockchain", @@ -14572,7 +15134,11 @@ dependencies = [ name = "sc-chain-spec" version = "4.0.0-dev" dependencies = [ + "array-bytes 6.1.0", + "docify", + "log", "memmap2", + "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", "sc-executor", @@ -14580,10 +15146,16 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", + "sp-application-crypto", "sp-blockchain", + "sp-consensus-babe", "sp-core", + "sp-genesis-builder", + "sp-io", + "sp-keyring", "sp-runtime", "sp-state-machine", + "substrate-test-runtime", ] [[package]] @@ -14593,19 +15165,21 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] name = "sc-cli" version = "0.10.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", + "bip39", "chrono", - "clap 4.4.3", + "clap 4.4.10", "fdlimit", "futures", "futures-timer", + "itertools 0.10.5", "libp2p-identity", "log", "names 0.13.0", @@ -14616,6 +15190,7 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-keystore", + "sc-mixnet", "sc-network", "sc-service", "sc-telemetry", @@ -14629,11 +15204,10 @@ dependencies = [ "sp-keystore", "sp-panic-handler", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "sp-version", "tempfile", "thiserror", - "tiny-bip39", "tokio", ] @@ -14654,12 +15228,13 @@ dependencies = [ "sp-consensus", "sp-core", "sp-database", - "sp-externalities", + "sp-externalities 0.19.0", "sp-runtime", "sp-state-machine", "sp-statement-store", - "sp-storage", + "sp-storage 13.0.0", "sp-test-primitives", + "sp-trie", "substrate-prometheus-endpoint", "substrate-test-runtime", "thiserror", @@ -14669,7 +15244,7 @@ dependencies = [ name = "sc-client-db" version = "0.10.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "criterion 0.4.0", "hash-db", "kitchensink-runtime", @@ -14692,7 +15267,7 @@ dependencies = [ "sp-database", "sp-runtime", "sp-state-machine", - "sp-tracing", + "sp-tracing 10.0.0", "sp-trie", "substrate-test-runtime-client", "tempfile", @@ -14753,7 +15328,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-timestamp", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tempfile", @@ -14774,17 +15349,14 @@ dependencies = [ "num-traits", "parity-scale-codec", "parking_lot 0.12.1", - "rand_chacha 0.2.2", "sc-block-builder", "sc-client-api", "sc-consensus", "sc-consensus-epochs", "sc-consensus-slots", - "sc-network", "sc-network-test", "sc-telemetry", "sc-transaction-pool-api", - "scale-info", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -14798,7 +15370,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-timestamp", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -14837,7 +15409,7 @@ dependencies = [ name = "sc-consensus-beefy" version = "4.0.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-channel", "async-trait", "fnv", @@ -14866,7 +15438,7 @@ dependencies = [ "sp-keystore", "sp-mmr-primitives", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tempfile", @@ -14913,7 +15485,7 @@ name = "sc-consensus-grandpa" version = "0.10.0-dev" dependencies = [ "ahash 0.8.3", - "array-bytes", + "array-bytes 6.1.0", "assert_matches", "async-trait", "dyn-clone", @@ -14932,6 +15504,7 @@ dependencies = [ "sc-network", "sc-network-common", "sc-network-gossip", + "sc-network-sync", "sc-network-test", "sc-telemetry", "sc-transaction-pool-api", @@ -14948,7 +15521,7 @@ dependencies = [ "sp-keyring", "sp-keystore", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -15068,7 +15641,7 @@ dependencies = [ name = "sc-executor" version = "0.10.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "assert_matches", "criterion 0.4.0", "env_logger 0.9.3", @@ -15084,17 +15657,17 @@ dependencies = [ "schnellru", "sp-api", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-io", "sp-maybe-compressed-blob", "sp-panic-handler", "sp-runtime", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0", "sp-state-machine", - "sp-tracing", + "sp-tracing 10.0.0", "sp-trie", "sp-version", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0", "substrate-test-runtime", "tempfile", "tracing", @@ -15108,7 +15681,7 @@ version = "0.10.0-dev" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0", "thiserror", "wasm-instrument 0.3.0", ] @@ -15123,14 +15696,15 @@ dependencies = [ "libc", "log", "parity-scale-codec", + "parking_lot 0.12.1", "paste", "rustix 0.36.15", "sc-allocator", "sc-executor-common", "sc-runtime-test", "sp-io", - "sp-runtime-interface", - "sp-wasm-interface", + "sp-runtime-interface 17.0.0", + "sp-wasm-interface 14.0.0", "tempfile", "wasmtime", "wat", @@ -15147,6 +15721,7 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-common", + "sc-network-sync", "sp-blockchain", "sp-runtime", ] @@ -15155,7 +15730,7 @@ dependencies = [ name = "sc-keystore" version = "4.0.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -15165,11 +15740,38 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sc-mixnet" +version = "0.1.0-dev" +dependencies = [ + "array-bytes 4.2.0", + "arrayvec 0.7.4", + "blake2 0.10.6", + "futures", + "futures-timer", + "libp2p-identity", + "log", + "mixnet", + "multiaddr", + "parity-scale-codec", + "parking_lot 0.12.1", + "sc-client-api", + "sc-network", + "sc-transaction-pool-api", + "sp-api", + "sp-consensus", + "sp-core", + "sp-keystore", + "sp-mixnet", + "sp-runtime", + "thiserror", +] + [[package]] name = "sc-network" version = "0.10.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "assert_matches", "async-channel", "async-trait", @@ -15203,7 +15805,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-test-primitives", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime", "substrate-test-runtime-client", @@ -15272,6 +15874,7 @@ dependencies = [ "quickcheck", "sc-network", "sc-network-common", + "sc-network-sync", "schnellru", "sp-runtime", "substrate-prometheus-endpoint", @@ -15284,7 +15887,7 @@ dependencies = [ name = "sc-network-light" version = "0.10.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-channel", "futures", "libp2p-identity", @@ -15304,7 +15907,7 @@ dependencies = [ name = "sc-network-statement" version = "0.10.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-channel", "futures", "libp2p", @@ -15312,6 +15915,7 @@ dependencies = [ "parity-scale-codec", "sc-network", "sc-network-common", + "sc-network-sync", "sp-consensus", "sp-statement-store", "substrate-prometheus-endpoint", @@ -15321,7 +15925,7 @@ dependencies = [ name = "sc-network-sync" version = "0.10.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-channel", "async-trait", "fork-tree", @@ -15349,11 +15953,12 @@ dependencies = [ "sp-core", "sp-runtime", "sp-test-primitives", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", "tokio", + "tokio-stream", ] [[package]] @@ -15380,7 +15985,7 @@ dependencies = [ "sp-consensus", "sp-core", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-test-runtime", "substrate-test-runtime-client", "tokio", @@ -15390,13 +15995,14 @@ dependencies = [ name = "sc-network-transactions" version = "0.10.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "futures", "libp2p", "log", "parity-scale-codec", "sc-network", "sc-network-common", + "sc-network-sync", "sc-utils", "sp-consensus", "sp-runtime", @@ -15407,7 +16013,7 @@ dependencies = [ name = "sc-offchain" version = "4.0.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "bytes", "fnv", "futures", @@ -15433,11 +16039,11 @@ dependencies = [ "sp-api", "sp-consensus", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-keystore", "sp-offchain", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-test-runtime-client", "threadpool", "tokio", @@ -15467,6 +16073,7 @@ dependencies = [ "sc-block-builder", "sc-chain-spec", "sc-client-api", + "sc-mixnet", "sc-network", "sc-network-common", "sc-rpc-api", @@ -15498,6 +16105,7 @@ dependencies = [ "jsonrpsee", "parity-scale-codec", "sc-chain-spec", + "sc-mixnet", "sc-transaction-pool-api", "scale-info", "serde", @@ -15527,7 +16135,7 @@ dependencies = [ name = "sc-rpc-spec-v2" version = "0.10.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "assert_matches", "futures", "futures-util", @@ -15549,7 +16157,9 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", + "sp-externalities 0.19.0", "sp-maybe-compressed-blob", + "sp-rpc", "sp-runtime", "sp-version", "substrate-test-runtime", @@ -15566,8 +16176,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface", - "sp-std", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", "substrate-wasm-builder", ] @@ -15586,7 +16196,6 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "rand 0.8.5", - "sc-block-builder", "sc-chain-spec", "sc-client-api", "sc-client-db", @@ -15615,12 +16224,12 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage", + "sp-storage 13.0.0", "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", @@ -15640,7 +16249,7 @@ dependencies = [ name = "sc-service-test" version = "2.0.0" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-channel", "fdlimit", "futures", @@ -15663,8 +16272,8 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-storage", - "sp-tracing", + "sp-storage 13.0.0", + "sp-tracing 10.0.0", "sp-trie", "substrate-test-runtime", "substrate-test-runtime-client", @@ -15706,7 +16315,7 @@ dependencies = [ name = "sc-storage-monitor" version = "0.1.0" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", "fs4", "log", "sc-client-db", @@ -15737,6 +16346,7 @@ dependencies = [ name = "sc-sysinfo" version = "6.0.0-dev" dependencies = [ + "derive_more", "futures", "libc", "log", @@ -15749,7 +16359,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -15781,6 +16391,7 @@ dependencies = [ "lazy_static", "libc", "log", + "parity-scale-codec", "parking_lot 0.12.1", "regex", "rustc-hash", @@ -15792,7 +16403,7 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "thiserror", "tracing", "tracing-log", @@ -15806,14 +16417,14 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "assert_matches", "async-trait", "criterion 0.4.0", @@ -15833,7 +16444,7 @@ dependencies = [ "sp-consensus", "sp-core", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "sp-transaction-pool", "substrate-prometheus-endpoint", "substrate-test-runtime", @@ -15875,9 +16486,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" +checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" dependencies = [ "bitvec", "cfg-if", @@ -15889,9 +16500,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" +checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -15933,7 +16544,7 @@ dependencies = [ "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -16007,7 +16618,7 @@ dependencies = [ "der 0.6.1", "generic-array 0.14.7", "pkcs8 0.9.0", - "subtle", + "subtle 2.4.1", "zeroize", ] @@ -16021,24 +16632,33 @@ dependencies = [ "der 0.7.8", "generic-array 0.14.7", "pkcs8 0.10.2", - "subtle", + "subtle 2.4.1", "zeroize", ] +[[package]] +name = "seccompiler" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "345a3e4dddf721a478089d4697b83c6c0a8f5bf16086f6c13397e4534eb6e2e5" +dependencies = [ + "libc", +] + [[package]] name = "secp256k1" -version = "0.24.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" +checksum = "2acea373acb8c21ecb5a23741452acd2593ed44ee3d343e72baaa143bc89d0d5" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.6.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" +checksum = "09e67c467c38fd24bd5499dc9a18183b31575c12ee549197e3e20d57aa4fe3b7" dependencies = [ "cc", ] @@ -16079,28 +16699,34 @@ dependencies = [ name = "seedling-runtime" version = "0.1.0" dependencies = [ + "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", "cumulus-pallet-solo-to-para", "cumulus-primitives-core", + "cumulus-primitives-timestamp", "frame-executive", "frame-support", "frame-system", + "pallet-aura", "pallet-balances", "pallet-sudo", - "parachain-info", + "pallet-timestamp", "parachains-common", "parity-scale-codec", "scale-info", "sp-api", "sp-block-builder", + "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "substrate-wasm-builder", ] @@ -16160,7 +16786,7 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -16174,9 +16800,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.106" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc66a619ed80bf7a0f6b17dd063a84b88f6dea1813737cf469aef1d081142c2" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -16226,7 +16852,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -16323,6 +16949,7 @@ dependencies = [ name = "shell-runtime" version = "0.1.0" dependencies = [ + "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", "cumulus-pallet-xcm", "cumulus-primitives-core", @@ -16330,20 +16957,25 @@ dependencies = [ "frame-support", "frame-system", "frame-try-runtime", - "parachain-info", + "pallet-aura", + "pallet-message-queue", + "pallet-timestamp", "parachains-common", "parity-scale-codec", "scale-info", "sp-api", "sp-block-builder", + "sp-consensus-aura", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", + "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -16408,6 +17040,11 @@ dependencies = [ "wide", ] +[[package]] +name = "simple-mermaid" +version = "0.1.0" +source = "git+https://github.com/kianenigma/simple-mermaid.git?rev=e48b187bcfd5cc75111acd9d241f1bd36604344b#e48b187bcfd5cc75111acd9d241f1bd36604344b" + [[package]] name = "siphasher" version = "0.3.11" @@ -16437,7 +17074,7 @@ dependencies = [ "parity-scale-codec", "paste", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -16575,14 +17212,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" dependencies = [ "aes-gcm 0.9.4", - "blake2", + "blake2 0.10.6", "chacha20poly1305", "curve25519-dalek 4.0.0", "rand_core 0.6.4", "ring 0.16.20", "rustc_version 0.4.0", "sha2 0.10.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -16632,11 +17269,11 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", "sp-test-primitives", "sp-trie", "sp-version", @@ -16649,12 +17286,12 @@ version = "4.0.0-dev" dependencies = [ "Inflector", "assert_matches", - "blake2", + "blake2 0.10.6", "expander 2.0.0", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -16673,7 +17310,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-tracing", + "sp-tracing 10.0.0", "sp-version", "static_assertions", "substrate-test-runtime-client", @@ -16689,7 +17326,7 @@ dependencies = [ "serde", "sp-core", "sp-io", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -16716,7 +17353,7 @@ dependencies = [ "scale-info", "serde", "sp-core", - "sp-std", + "sp-std 8.0.0", "static_assertions", ] @@ -16731,98 +17368,22 @@ dependencies = [ "sp-arithmetic", ] -[[package]] -name = "sp-ark-bls12-377" -version = "0.4.1-beta" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9b60ba7d8fbb82e21f5be499b02438c9a79365acb441a4dc3993179f09c4cc9" -dependencies = [ - "ark-bls12-377", - "ark-ff", - "ark-r1cs-std", - "ark-scale", - "ark-std", - "parity-scale-codec", - "sp-ark-models", -] - [[package]] name = "sp-ark-bls12-381" -version = "0.4.1-beta" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2cd101171d2e988a4e1b2320ad3f26f8746a263110c7153213fe86293e0552b" -dependencies = [ - "ark-bls12-381", - "ark-ff", - "ark-scale", - "ark-serialize", - "ark-std", - "parity-scale-codec", - "sp-ark-models", -] - -[[package]] -name = "sp-ark-bw6-761" -version = "0.4.1-beta" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d94d66ba98893cc42dfe81d5b5dee9142577176bdbdba80ec25a37d8cdffdbd5" -dependencies = [ - "ark-bw6-761", - "ark-ff", - "ark-scale", - "ark-std", - "parity-scale-codec", - "sp-ark-models", -] - -[[package]] -name = "sp-ark-ed-on-bls12-377" -version = "0.4.1-beta" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37f6ea96c9b1cd4cbd05d741225ff7f6328ab035bda16cf3fac105c87ad98959" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" dependencies = [ - "ark-ed-on-bls12-377", - "ark-ff", - "ark-r1cs-std", - "ark-scale", - "ark-serialize", - "ark-std", - "parity-scale-codec", - "sp-ark-models", + "ark-bls12-381-ext", + "sp-crypto-ec-utils 0.4.1 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] name = "sp-ark-ed-on-bls12-381-bandersnatch" -version = "0.4.1-beta" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4db7a801260397cd58077befcee87acfdde8c189f48718bba1bc3783c799b67b" -dependencies = [ - "ark-ec", - "ark-ed-on-bls12-381-bandersnatch", - "ark-ff", - "ark-r1cs-std", - "ark-scale", - "ark-std", - "parity-scale-codec", - "sp-ark-bls12-381", - "sp-ark-models", -] - -[[package]] -name = "sp-ark-models" -version = "0.4.1-beta" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd77599e09f12893739e1ef822ae065f2f46c3be040ba1979bb786ae21059f44" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", - "derivative", - "getrandom 0.2.10", - "itertools 0.10.5", - "num-traits", - "zeroize", + "ark-ed-on-bls12-381-bandersnatch-ext", + "sp-crypto-ec-utils 0.4.1 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] @@ -16834,7 +17395,7 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -16844,7 +17405,7 @@ dependencies = [ "sp-api", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -16891,7 +17452,7 @@ dependencies = [ "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-timestamp", ] @@ -16909,7 +17470,7 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-timestamp", ] @@ -16917,7 +17478,7 @@ dependencies = [ name = "sp-consensus-beefy" version = "4.0.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "lazy_static", "parity-scale-codec", "scale-info", @@ -16928,7 +17489,7 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "strum", "w3f-bls", ] @@ -16947,7 +17508,7 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -16958,7 +17519,7 @@ dependencies = [ "sp-api", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -16973,7 +17534,7 @@ dependencies = [ "sp-consensus-slots", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -16983,7 +17544,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 8.0.0", "sp-timestamp", ] @@ -16991,10 +17552,11 @@ dependencies = [ name = "sp-core" version = "21.0.0" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "bandersnatch_vrfs", + "bip39", "bitflags 1.3.2", - "blake2", + "blake2 0.10.6", "bounded-collections", "bs58 0.5.0", "criterion 0.4.0", @@ -17004,6 +17566,7 @@ dependencies = [ "hash-db", "hash256-std-hasher", "impl-serde", + "itertools 0.10.5", "lazy_static", "libsecp256k1", "log", @@ -17022,20 +17585,29 @@ dependencies = [ "serde_json", "sp-core-hashing", "sp-core-hashing-proc-macro", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-debug-derive 8.0.0", + "sp-externalities 0.19.0", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", "ss58-registry", "substrate-bip39", "thiserror", - "tiny-bip39", "tracing", "w3f-bls", "zeroize", ] +[[package]] +name = "sp-core-fuzz" +version = "0.0.0" +dependencies = [ + "lazy_static", + "libfuzzer-sys", + "regex", + "sp-core", +] + [[package]] name = "sp-core-hashing" version = "9.0.0" @@ -17054,34 +17626,48 @@ version = "9.0.0" dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] name = "sp-crypto-ec-utils" -version = "0.4.0" +version = "0.4.1" dependencies = [ - "ark-algebra-test-templates", "ark-bls12-377", + "ark-bls12-377-ext", "ark-bls12-381", + "ark-bls12-381-ext", "ark-bw6-761", + "ark-bw6-761-ext", "ark-ec", "ark-ed-on-bls12-377", + "ark-ed-on-bls12-377-ext", "ark-ed-on-bls12-381-bandersnatch", - "ark-ff", + "ark-ed-on-bls12-381-bandersnatch-ext", "ark-scale", - "ark-serialize", - "ark-std", - "parity-scale-codec", - "sp-ark-bls12-377", - "sp-ark-bls12-381", - "sp-ark-bw6-761", - "sp-ark-ed-on-bls12-377", - "sp-ark-ed-on-bls12-381-bandersnatch", - "sp-ark-models", - "sp-io", - "sp-runtime-interface", - "sp-std", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", +] + +[[package]] +name = "sp-crypto-ec-utils" +version = "0.4.1" +source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" +dependencies = [ + "ark-bls12-377", + "ark-bls12-377-ext", + "ark-bls12-381", + "ark-bls12-381-ext", + "ark-bw6-761", + "ark-bw6-761-ext", + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ed-on-bls12-377-ext", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ed-on-bls12-381-bandersnatch-ext", + "ark-scale", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] @@ -17098,17 +17684,38 @@ version = "8.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", +] + +[[package]] +name = "sp-debug-derive" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + +[[package]] +name = "sp-externalities" +version = "0.19.0" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 8.0.0", + "sp-storage 13.0.0", ] [[package]] name = "sp-externalities" version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", - "sp-storage", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] @@ -17118,7 +17725,7 @@ dependencies = [ "serde_json", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -17131,7 +17738,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "thiserror", ] @@ -17147,12 +17754,12 @@ dependencies = [ "rustversion", "secp256k1", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-keystore", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "sp-trie", "tracing", "tracing-core", @@ -17177,7 +17784,7 @@ dependencies = [ "rand 0.7.3", "rand_chacha 0.2.2", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "thiserror", ] @@ -17196,14 +17803,25 @@ dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std", + "sp-std 8.0.0", +] + +[[package]] +name = "sp-mixnet" +version = "0.1.0-dev" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-std 8.0.0", ] [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "ckb-merkle-mountain-range", "log", "parity-scale-codec", @@ -17211,9 +17829,9 @@ dependencies = [ "serde", "sp-api", "sp-core", - "sp-debug-derive", + "sp-debug-derive 8.0.0", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "thiserror", ] @@ -17228,7 +17846,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "substrate-test-utils", ] @@ -17236,7 +17854,7 @@ dependencies = [ name = "sp-npos-elections-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", "honggfuzz", "rand 0.8.5", "sp-npos-elections", @@ -17291,8 +17909,8 @@ dependencies = [ "sp-core", "sp-io", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "sp-weights", "substrate-test-runtime-client", "zstd 0.12.4", @@ -17308,28 +17926,58 @@ dependencies = [ "primitive-types", "rustversion", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-io", - "sp-runtime-interface-proc-macro", + "sp-runtime-interface-proc-macro 11.0.0", "sp-runtime-interface-test-wasm", "sp-state-machine", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-tracing 10.0.0", + "sp-wasm-interface 14.0.0", "static_assertions", "trybuild", ] +[[package]] +name = "sp-runtime-interface" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-runtime-interface-proc-macro 11.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "11.0.0" +dependencies = [ + "Inflector", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -17340,7 +17988,7 @@ dependencies = [ "sc-executor-common", "sp-io", "sp-runtime", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0", "sp-runtime-interface-test-wasm", "sp-runtime-interface-test-wasm-deprecated", "sp-state-machine", @@ -17355,8 +18003,8 @@ dependencies = [ "bytes", "sp-core", "sp-io", - "sp-runtime-interface", - "sp-std", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", "substrate-wasm-builder", ] @@ -17366,7 +18014,7 @@ version = "2.0.0" dependencies = [ "sp-core", "sp-io", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0", "substrate-wasm-builder", ] @@ -17381,7 +18029,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -17394,14 +18042,14 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-state-machine" version = "0.28.0" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "assert_matches", "hash-db", "log", @@ -17411,10 +18059,10 @@ dependencies = [ "rand 0.8.5", "smallvec", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-panic-handler", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-trie", "thiserror", "tracing", @@ -17436,10 +18084,10 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-runtime", - "sp-runtime-interface", - "sp-std", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", "thiserror", "x25519-dalek 2.0.0", ] @@ -17448,16 +18096,34 @@ dependencies = [ name = "sp-std" version = "8.0.0" +[[package]] +name = "sp-std" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" + +[[package]] +name = "sp-storage" +version = "13.0.0" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", +] + [[package]] name = "sp-storage" version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] @@ -17470,7 +18136,7 @@ dependencies = [ "sp-application-crypto", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -17481,7 +18147,7 @@ dependencies = [ "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "thiserror", ] @@ -17490,7 +18156,19 @@ name = "sp-tracing" version = "10.0.0" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 8.0.0", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-tracing" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" +dependencies = [ + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "tracing", "tracing-core", "tracing-subscriber", @@ -17514,7 +18192,7 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-trie", ] @@ -17523,7 +18201,7 @@ name = "sp-trie" version = "22.0.0" dependencies = [ "ahash 0.8.3", - "array-bytes", + "array-bytes 6.1.0", "criterion 0.4.0", "hash-db", "hashbrown 0.13.2", @@ -17532,11 +18210,12 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", + "rand 0.8.5", "scale-info", "schnellru", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "thiserror", "tracing", "trie-bench", @@ -17556,7 +18235,7 @@ dependencies = [ "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-version-proc-macro", "thiserror", ] @@ -17569,18 +18248,31 @@ dependencies = [ "proc-macro2", "quote", "sp-version", - "syn 2.0.32", + "syn 2.0.39", +] + +[[package]] +name = "sp-wasm-interface" +version = "14.0.0" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 8.0.0", + "wasmtime", ] [[package]] name = "sp-wasm-interface" version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "wasmtime", ] @@ -17594,8 +18286,8 @@ dependencies = [ "smallvec", "sp-arithmetic", "sp-core", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", ] [[package]] @@ -17653,128 +18345,190 @@ dependencies = [ "quote", "serde", "serde_json", - "unicode-xid", + "unicode-xid", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "staging-chain-spec-builder" +version = "2.0.0" +dependencies = [ + "clap 4.4.10", + "log", + "sc-chain-spec", + "serde_json", + "sp-tracing 10.0.0", +] + +[[package]] +name = "staging-node-cli" +version = "3.0.0-dev" +dependencies = [ + "array-bytes 6.1.0", + "assert_cmd", + "clap 4.4.10", + "clap_complete", + "criterion 0.4.0", + "frame-benchmarking-cli", + "frame-system", + "frame-system-rpc-runtime-api", + "futures", + "jsonrpsee", + "kitchensink-runtime", + "log", + "nix 0.26.2", + "node-primitives", + "node-rpc", + "pallet-asset-conversion-tx-payment", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-balances", + "pallet-im-online", + "pallet-skip-feeless-payment", + "pallet-timestamp", + "parity-scale-codec", + "platforms", + "rand 0.8.5", + "regex", + "sc-authority-discovery", + "sc-basic-authorship", + "sc-block-builder", + "sc-chain-spec", + "sc-cli", + "sc-client-api", + "sc-client-db", + "sc-consensus", + "sc-consensus-babe", + "sc-consensus-epochs", + "sc-consensus-grandpa", + "sc-consensus-slots", + "sc-executor", + "sc-keystore", + "sc-mixnet", + "sc-network", + "sc-network-common", + "sc-network-statement", + "sc-network-sync", + "sc-offchain", + "sc-rpc", + "sc-service", + "sc-service-test", + "sc-statement-store", + "sc-storage-monitor", + "sc-sync-state-rpc", + "sc-sysinfo", + "sc-telemetry", + "sc-transaction-pool", + "sc-transaction-pool-api", + "serde", + "serde_json", + "soketto", + "sp-api", + "sp-authority-discovery", + "sp-blockchain", + "sp-consensus", + "sp-consensus-babe", + "sp-consensus-grandpa", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-keystore", + "sp-mixnet", + "sp-runtime", + "sp-statement-store", + "sp-timestamp", + "sp-tracing 10.0.0", + "sp-transaction-storage-proof", + "staging-node-executor", + "staging-node-inspect", + "substrate-build-script-utils", + "substrate-cli-test-utils", + "substrate-frame-cli", + "substrate-rpc-client", + "tempfile", + "tokio", + "tokio-util", + "try-runtime-cli", + "wait-timeout", ] [[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "staging-kusama-runtime" -version = "1.0.0" +name = "staging-node-executor" +version = "3.0.0-dev" dependencies = [ - "binary-merkle-tree", - "bitvec", + "criterion 0.4.0", "frame-benchmarking", - "frame-election-provider-support", - "frame-executive", - "frame-remote-externalities", "frame-support", "frame-system", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal", - "kusama-runtime-constants", - "log", - "pallet-authority-discovery", - "pallet-authorship", - "pallet-babe", - "pallet-bags-list", + "futures", + "kitchensink-runtime", + "node-primitives", + "node-testing", "pallet-balances", - "pallet-beefy", - "pallet-beefy-mmr", - "pallet-bounties", - "pallet-child-bounties", - "pallet-collective", - "pallet-conviction-voting", - "pallet-democracy", - "pallet-election-provider-multi-phase", - "pallet-election-provider-support-benchmarking", - "pallet-elections-phragmen", - "pallet-fast-unstake", - "pallet-grandpa", - "pallet-identity", + "pallet-contracts", + "pallet-glutton", "pallet-im-online", - "pallet-indices", - "pallet-membership", - "pallet-message-queue", - "pallet-mmr", - "pallet-multisig", - "pallet-nis", - "pallet-nomination-pools", - "pallet-nomination-pools-benchmarking", - "pallet-nomination-pools-runtime-api", - "pallet-offences", - "pallet-offences-benchmarking", - "pallet-preimage", - "pallet-proxy", - "pallet-ranked-collective", - "pallet-recovery", - "pallet-referenda", - "pallet-scheduler", - "pallet-session", - "pallet-session-benchmarking", - "pallet-society", - "pallet-staking", - "pallet-staking-runtime-api", - "pallet-state-trie-migration", + "pallet-root-testing", + "pallet-sudo", "pallet-timestamp", - "pallet-tips", "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", - "pallet-utility", - "pallet-vesting", - "pallet-whitelist", - "pallet-xcm", - "pallet-xcm-benchmarks", "parity-scale-codec", - "polkadot-primitives", - "polkadot-runtime-common", - "polkadot-runtime-parachains", - "rustc-hex", + "sc-executor", "scale-info", - "separator", - "serde", - "serde_derive", "serde_json", - "smallvec", - "sp-api", "sp-application-crypto", - "sp-arithmetic", - "sp-authority-discovery", - "sp-block-builder", "sp-consensus-babe", - "sp-consensus-beefy", "sp-core", - "sp-inherents", - "sp-io", + "sp-externalities 0.19.0", "sp-keyring", - "sp-mmr-primitives", - "sp-npos-elections", - "sp-offchain", + "sp-keystore", "sp-runtime", - "sp-session", - "sp-staking", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-transaction-pool", + "sp-state-machine", + "sp-statement-store", + "sp-tracing 10.0.0", "sp-trie", - "sp-version", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "static_assertions", - "substrate-wasm-builder", - "tiny-keccak", - "tokio", + "wat", +] + +[[package]] +name = "staging-node-inspect" +version = "0.9.0-dev" +dependencies = [ + "clap 4.4.10", + "parity-scale-codec", + "sc-cli", + "sc-client-api", + "sc-service", + "sp-blockchain", + "sp-core", + "sp-runtime", + "thiserror", +] + +[[package]] +name = "staging-parachain-info" +version = "0.1.0" +dependencies = [ + "cumulus-primitives-core", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std 8.0.0", ] +[[package]] +name = "staging-tracking-allocator" +version = "1.0.0" + [[package]] name = "staging-xcm" version = "1.0.0" @@ -17818,7 +18572,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-weights", "staging-xcm", "staging-xcm-executor", @@ -17834,11 +18588,12 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", + "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-weights", "staging-xcm", ] @@ -17942,7 +18697,7 @@ dependencies = [ "md-5", "rand 0.8.5", "ring 0.16.20", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "url", @@ -17953,8 +18708,28 @@ dependencies = [ name = "subkey" version = "3.0.0" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", + "sc-cli", +] + +[[package]] +name = "substrate" +version = "1.0.0" +dependencies = [ + "frame-support", + "sc-chain-spec", "sc-cli", + "sc-consensus-aura", + "sc-consensus-babe", + "sc-consensus-beefy", + "sc-consensus-grandpa", + "sc-consensus-manual-seal", + "sc-consensus-pow", + "sc-service", + "simple-mermaid", + "sp-runtime", + "staging-chain-spec-builder", + "subkey", ] [[package]] @@ -17981,12 +18756,12 @@ dependencies = [ "assert_cmd", "futures", "nix 0.26.2", - "node-cli", "node-primitives", "regex", "sc-cli", "sc-service", "sp-rpc", + "staging-node-cli", "substrate-rpc-client", "tokio", ] @@ -17995,7 +18770,7 @@ dependencies = [ name = "substrate-frame-cli" version = "4.0.0-dev" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", "frame-support", "frame-system", "sc-cli", @@ -18016,7 +18791,7 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-storage", + "sp-storage 13.0.0", "tokio", ] @@ -18038,7 +18813,7 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-test-runtime-client", "tokio", ] @@ -18089,7 +18864,7 @@ dependencies = [ name = "substrate-test-client" version = "2.0.1" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "async-trait", "futures", "parity-scale-codec", @@ -18114,7 +18889,7 @@ dependencies = [ name = "substrate-test-runtime" version = "2.0.0" dependencies = [ - "array-bytes", + "array-bytes 6.1.0", "frame-executive", "frame-support", "frame-system", @@ -18141,7 +18916,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-grandpa", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -18150,8 +18925,8 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "sp-transaction-pool", "sp-trie", "sp-version", @@ -18228,6 +19003,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + [[package]] name = "subtle" version = "2.4.1" @@ -18344,9 +19125,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.32" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239814284fd6f1a4ffe4ca893952cdd93c224b6a1571c9a9eadd670295c0c9e2" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -18418,7 +19199,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.38.8", + "rustix 0.38.25", "windows-sys 0.48.0", ] @@ -18431,6 +19212,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "terminal_size" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +dependencies = [ + "rustix 0.38.25", + "windows-sys 0.48.0", +] + [[package]] name = "termtree" version = "0.4.1" @@ -18445,7 +19236,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "sp-io", - "sp-std", + "sp-std 8.0.0", "substrate-wasm-builder", "tiny-keccak", ] @@ -18454,7 +19245,7 @@ dependencies = [ name = "test-parachain-adder-collator" version = "1.0.0" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", "futures", "futures-timer", "log", @@ -18493,7 +19284,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "sp-io", - "sp-std", + "sp-std 8.0.0", "substrate-wasm-builder", "tiny-keccak", ] @@ -18502,7 +19293,7 @@ dependencies = [ name = "test-parachain-undying-collator" version = "1.0.0" dependencies = [ - "clap 4.4.3", + "clap 4.4.10", "futures", "futures-timer", "log", @@ -18548,6 +19339,19 @@ dependencies = [ "sp-weights", ] +[[package]] +name = "testnets-common" +version = "1.0.0" +dependencies = [ + "frame-support", + "polkadot-core-primitives", + "rococo-runtime-constants", + "smallvec", + "sp-runtime", + "substrate-wasm-builder", + "westend-runtime-constants", +] + [[package]] name = "textwrap" version = "0.16.0" @@ -18556,9 +19360,9 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.48" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] @@ -18585,13 +19389,13 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "1.0.48" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -18691,25 +19495,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny-bip39" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62cc94d358b5a1e84a5cb9109f559aa3c4d634d2b1b4de3d0fa4adc7c78e2861" -dependencies = [ - "anyhow", - "hmac 0.12.1", - "once_cell", - "pbkdf2 0.11.0", - "rand 0.8.5", - "rustc-hash", - "sha2 0.10.7", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -18771,7 +19556,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -18952,7 +19737,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -18980,7 +19765,6 @@ name = "tracing-gum" version = "1.0.0" dependencies = [ "coarsetime", - "polkadot-node-jaeger", "polkadot-primitives", "tracing", "tracing-gum-proc-macro", @@ -18995,7 +19779,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] @@ -19148,7 +19932,7 @@ version = "0.10.0-dev" dependencies = [ "assert_cmd", "async-trait", - "clap 4.4.3", + "clap 4.4.10", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -19164,8 +19948,8 @@ dependencies = [ "sp-consensus-aura", "sp-consensus-babe", "sp-core", - "sp-debug-derive", - "sp-externalities", + "sp-debug-derive 8.0.0", + "sp-externalities 0.19.0", "sp-inherents", "sp-io", "sp-keystore", @@ -19319,7 +20103,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ "generic-array 0.14.7", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -19329,7 +20113,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle", + "subtle 2.4.1", ] [[package]] @@ -19544,7 +20328,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", "wasm-bindgen-shared", ] @@ -19578,7 +20362,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -19618,9 +20402,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.114.1" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d005a95f934878a1fb446a816d51c3601a0120ff929005ba3bab3c749cfd1c7" +checksum = "fc942673e7684671f0c5708fc18993569d184265fd5223bb51fc8e5b9b6cfd52" dependencies = [ "anyhow", "libc", @@ -19634,9 +20418,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.114.1" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d04e240598162810fad3b2e96fa0dec6dba1eb65a03f3bd99a9248ab8b56caa" +checksum = "8c57b28207aa724318fcec6575fe74803c23f6f266fce10cbc9f3f116762f12e" dependencies = [ "anyhow", "cxx", @@ -19646,9 +20430,9 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.114.1" +version = "0.116.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efd2aaca519d64098c4faefc8b7433a97ed511caf4c9e516384eb6aef1ff4f9" +checksum = "8a1cce564dc768dacbdb718fc29df2dba80bd21cb47d8f77ae7e3d95ceb98cbe" dependencies = [ "anyhow", "cc", @@ -20078,7 +20862,7 @@ dependencies = [ "sha1", "sha2 0.10.7", "signature 1.6.4", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "webpki 0.21.4", @@ -20172,7 +20956,7 @@ dependencies = [ "rtcp", "rtp", "sha-1 0.9.8", - "subtle", + "subtle 2.4.1", "thiserror", "tokio", "webrtc-util", @@ -20199,6 +20983,26 @@ dependencies = [ "winapi", ] +[[package]] +name = "westend-emulated-chain" +version = "0.0.0" +dependencies = [ + "emulated-integration-tests-common", + "pallet-im-online", + "pallet-staking", + "parachains-common", + "polkadot-primitives", + "sc-consensus-grandpa", + "serde_json", + "sp-authority-discovery", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-core", + "sp-runtime", + "westend-runtime", + "westend-runtime-constants", +] + [[package]] name = "westend-runtime" version = "1.0.0" @@ -20216,6 +21020,7 @@ dependencies = [ "frame-try-runtime", "hex-literal", "log", + "pallet-asset-rate", "pallet-authority-discovery", "pallet-authorship", "pallet-babe", @@ -20224,6 +21029,7 @@ dependencies = [ "pallet-beefy", "pallet-beefy-mmr", "pallet-collective", + "pallet-conviction-voting", "pallet-democracy", "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", @@ -20245,6 +21051,8 @@ dependencies = [ "pallet-preimage", "pallet-proxy", "pallet-recovery", + "pallet-referenda", + "pallet-root-testing", "pallet-scheduler", "pallet-session", "pallet-session-benchmarking", @@ -20260,6 +21068,7 @@ dependencies = [ "pallet-treasury", "pallet-utility", "pallet-vesting", + "pallet-whitelist", "pallet-xcm", "pallet-xcm-benchmarks", "parity-scale-codec", @@ -20275,11 +21084,13 @@ dependencies = [ "smallvec", "sp-api", "sp-application-crypto", + "sp-arithmetic", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", "sp-core", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-keyring", @@ -20289,9 +21100,9 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", - "sp-storage", - "sp-tracing", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-tracing 10.0.0", "sp-transaction-pool", "sp-version", "staging-xcm", @@ -20314,6 +21125,18 @@ dependencies = [ "sp-core", "sp-runtime", "sp-weights", + "staging-xcm", +] + +[[package]] +name = "westend-system-emulated-network" +version = "0.0.0" +dependencies = [ + "asset-hub-westend-emulated-chain", + "bridge-hub-westend-emulated-chain", + "emulated-integration-tests-common", + "penpal-emulated-chain", + "westend-emulated-chain", ] [[package]] @@ -20660,6 +21483,7 @@ name = "xcm-emulator" version = "0.1.0" dependencies = [ "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-test-relay-sproof-builder", @@ -20680,8 +21504,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "staging-xcm", "staging-xcm-executor", ] @@ -20693,6 +21517,7 @@ dependencies = [ "frame-support", "frame-system", "futures", + "pallet-transaction-payment", "pallet-xcm", "parity-scale-codec", "polkadot-test-client", @@ -20702,7 +21527,7 @@ dependencies = [ "sp-keyring", "sp-runtime", "sp-state-machine", - "sp-tracing", + "sp-tracing 10.0.0", "staging-xcm", "staging-xcm-executor", ] @@ -20714,7 +21539,9 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.32", + "staging-xcm", + "syn 2.0.39", + "trybuild", ] [[package]] @@ -20728,7 +21555,7 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-runtime-parachains", "sp-io", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -20753,8 +21580,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -20780,7 +21607,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -20833,7 +21660,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.32", + "syn 2.0.39", ] [[package]] From 8cafd48c5caf7934f1ce1acf79d8e00291c3fdaf Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 28 Nov 2023 10:50:10 +0400 Subject: [PATCH 51/98] reset polkadot-asset-hub-runtime --- .../assets/asset-hub-polkadot/src/lib.rs | 49 +------------------ 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs index 7807c8cdd4f0..96abd4db9aaf 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs @@ -833,10 +833,7 @@ pub type SignedExtra = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = ( - pallet_collator_selection::migration::v1::MigrateToV1, - InitStorageVersions -); +pub type Migrations = (pallet_collator_selection::migration::v1::MigrateToV1,); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< @@ -848,50 +845,6 @@ pub type Executive = frame_executive::Executive< Migrations, >; -/// Migration to initialize storage versions for pallets added after genesis. -/// -/// Ideally this would be done automatically (see -/// ), but it probably won't be ready for some -/// time and it's beneficial to get try-runtime-cli on-runtime-upgrade checks into the CI, so we're -/// doing it manually. -pub struct InitStorageVersions; - -impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions { - fn on_runtime_upgrade() -> Weight { - use frame_support::traits::{GetStorageVersion, StorageVersion}; - use sp_runtime::traits::Saturating; - - let mut writes = 0; - - if PolkadotXcm::on_chain_storage_version() == StorageVersion::new(0) { - StorageVersion::new(1).put::(); - writes.saturating_inc(); - } - - if Uniques::on_chain_storage_version() == StorageVersion::new(0) { - StorageVersion::new(1).put::(); - writes.saturating_inc(); - } - - if Nfts::on_chain_storage_version() == StorageVersion::new(0) { - StorageVersion::new(1).put::(); - writes.saturating_inc(); - } - - if ForeignAssets::on_chain_storage_version() == StorageVersion::new(0) { - StorageVersion::new(1).put::(); - writes.saturating_inc(); - } - - if Multisig::on_chain_storage_version() == StorageVersion::new(0) { - StorageVersion::new(1).put::(); - writes.saturating_inc(); - } - - ::DbWeight::get().reads_writes(5, writes) - } -} - #[cfg(feature = "runtime-benchmarks")] mod benches { frame_benchmarking::define_benchmarks!( From a6c6781aa506bc1326473f509df5101099f678e3 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 28 Nov 2023 10:54:15 +0400 Subject: [PATCH 52/98] fix merge --- .../runtime/common/src/assigned_slots/migration.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/polkadot/runtime/common/src/assigned_slots/migration.rs b/polkadot/runtime/common/src/assigned_slots/migration.rs index 48d420c7ede7..13e2e82bad8f 100644 --- a/polkadot/runtime/common/src/assigned_slots/migration.rs +++ b/polkadot/runtime/common/src/assigned_slots/migration.rs @@ -24,14 +24,6 @@ use sp_std::vec::Vec; pub mod v1 { use super::*; - pub struct VersionUncheckedMigrateToV1(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for VersionUncheckedMigrateToV1 { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - let onchain_version = Pallet::::on_chain_storage_version(); - ensure!(onchain_version < 1, "assigned_slots::MigrateToV1 migration can be deleted"); - Ok(Default::default()) - } mod version_unchecked { use super::*; @@ -75,13 +67,13 @@ pub mod v1 { } } - /// [`VersionUncheckedMigrateToV1`] wrapped in a + /// [`version_unchecked::MigrateToV1`] wrapped in a /// [`VersionedMigration`](frame_support::migrations::VersionedMigration), ensuring the /// migration is only performed when on-chain version is 0. pub type MigrateToV1 = frame_support::migrations::VersionedMigration< 0, 1, - VersionUncheckedMigrateToV1, + version_unchecked::MigrateToV1, Pallet, ::DbWeight, >; From fbdb77c82fe3aaae7b016432bc6bcaa5b12bcdcb Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 28 Nov 2023 10:59:57 +0400 Subject: [PATCH 53/98] fix up merge --- .../assets/asset-hub-polkadot/src/lib.rs | 5 +- .../common/src/assigned_slots/migration.rs | 69 +- .../common/src/paras_registrar/migration.rs | 65 +- polkadot/xcm/pallet-xcm/src/migration.rs | 40 +- substrate/frame/society/src/migrations.rs | 591 +++++++++--------- substrate/frame/society/src/mock.rs | 2 +- substrate/frame/society/src/tests.rs | 6 +- 7 files changed, 365 insertions(+), 413 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs index 96abd4db9aaf..78721b194d03 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs @@ -833,7 +833,10 @@ pub type SignedExtra = ( pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; /// Migrations to apply on runtime upgrade. -pub type Migrations = (pallet_collator_selection::migration::v1::MigrateToV1,); +pub type Migrations = ( + // unreleased + pallet_collator_selection::migration::v1::MigrateToV1, +); /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< diff --git a/polkadot/runtime/common/src/assigned_slots/migration.rs b/polkadot/runtime/common/src/assigned_slots/migration.rs index 13e2e82bad8f..ba3108c0aa38 100644 --- a/polkadot/runtime/common/src/assigned_slots/migration.rs +++ b/polkadot/runtime/common/src/assigned_slots/migration.rs @@ -23,57 +23,50 @@ use frame_support::ensure; use sp_std::vec::Vec; pub mod v1 { - use super::*; - - mod version_unchecked { - use super::*; - pub struct MigrateV0ToV1(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateV0ToV1 { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - let onchain_version = Pallet::::on_chain_storage_version(); - ensure!( - onchain_version < 1, - "assigned_slots::MigrateToV1 migration can be deleted" - ); - Ok(Default::default()) - } + use super::*; + pub struct VersionUncheckedMigrateToV1(sp_std::marker::PhantomData); + impl OnRuntimeUpgrade for VersionUncheckedMigrateToV1 { + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + let onchain_version = Pallet::::on_chain_storage_version(); + ensure!(onchain_version < 1, "assigned_slots::MigrateToV1 migration can be deleted"); + Ok(Default::default()) + } - fn on_runtime_upgrade() -> frame_support::weights::Weight { - let onchain_version = Pallet::::on_chain_storage_version(); - if onchain_version < 1 { - const MAX_PERMANENT_SLOTS: u32 = 100; - const MAX_TEMPORARY_SLOTS: u32 = 100; + fn on_runtime_upgrade() -> frame_support::weights::Weight { + let onchain_version = Pallet::::on_chain_storage_version(); + if onchain_version < 1 { + const MAX_PERMANENT_SLOTS: u32 = 100; + const MAX_TEMPORARY_SLOTS: u32 = 100; - >::put(MAX_PERMANENT_SLOTS); - >::put(MAX_TEMPORARY_SLOTS); - // Return the weight consumed by the migration. - T::DbWeight::get().reads_writes(1, 3) - } else { - log::info!(target: LOG_TARGET, "MigrateToV1 should be removed"); - T::DbWeight::get().reads(1) - } + >::put(MAX_PERMANENT_SLOTS); + >::put(MAX_TEMPORARY_SLOTS); + // Return the weight consumed by the migration. + T::DbWeight::get().reads_writes(1, 3) + } else { + log::info!(target: LOG_TARGET, "MigrateToV1 should be removed"); + T::DbWeight::get().reads(1) } + } - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - let onchain_version = Pallet::::on_chain_storage_version(); - ensure!(onchain_version == 1, "assigned_slots::MigrateToV1 needs to be run"); - assert_eq!(>::get(), 100); - assert_eq!(>::get(), 100); - Ok(()) - } + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + let onchain_version = Pallet::::on_chain_storage_version(); + ensure!(onchain_version == 1, "assigned_slots::MigrateToV1 needs to be run"); + assert_eq!(>::get(), 100); + assert_eq!(>::get(), 100); + Ok(()) } } - /// [`version_unchecked::MigrateToV1`] wrapped in a + /// [`VersionUncheckedMigrateToV1`] wrapped in a /// [`VersionedMigration`](frame_support::migrations::VersionedMigration), ensuring the /// migration is only performed when on-chain version is 0. pub type MigrateToV1 = frame_support::migrations::VersionedMigration< 0, 1, - version_unchecked::MigrateToV1, + VersionUncheckedMigrateToV1, Pallet, ::DbWeight, >; diff --git a/polkadot/runtime/common/src/paras_registrar/migration.rs b/polkadot/runtime/common/src/paras_registrar/migration.rs index 8955be6e000c..f977674a1e4e 100644 --- a/polkadot/runtime/common/src/paras_registrar/migration.rs +++ b/polkadot/runtime/common/src/paras_registrar/migration.rs @@ -24,46 +24,41 @@ pub struct ParaInfoV1 { locked: bool, } -pub mod v1 { - use super::*; +pub struct VersionUncheckedMigrateToV1( + sp_std::marker::PhantomData<(T, UnlockParaIds)>, +); +impl> OnRuntimeUpgrade + for VersionUncheckedMigrateToV1 +{ + fn on_runtime_upgrade() -> Weight { + let mut count = 0u64; + Paras::::translate::>, _>(|key, v1| { + count.saturating_inc(); + Some(ParaInfo { + manager: v1.manager, + deposit: v1.deposit, + locked: if UnlockParaIds::contains(&key) { None } else { Some(v1.locked) }, + }) + }); - mod version_unchecked { - use super::*; - - pub struct MigrateV0ToV1(sp_std::marker::PhantomData<(T, UnlockParaIds)>); - impl> OnRuntimeUpgrade - for MigrateV0ToV1 - { - fn on_runtime_upgrade() -> Weight { - let mut count = 0u64; - Paras::::translate::>, _>(|key, v1| { - count.saturating_inc(); - Some(ParaInfo { - manager: v1.manager, - deposit: v1.deposit, - locked: if UnlockParaIds::contains(&key) { None } else { Some(v1.locked) }, - }) - }); - - log::info!(target: "runtime::registrar", "Upgraded {} storages to version 1", count); - T::DbWeight::get().reads_writes(count, count) - } + log::info!(target: "runtime::registrar", "Upgraded {} storages to version 1", count); + T::DbWeight::get().reads_writes(count, count) + } - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - Ok((Paras::::iter_keys().count() as u32).encode()) - } + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { + Ok((Paras::::iter_keys().count() as u32).encode()) + } - #[cfg(feature = "try-runtime")] - fn post_upgrade(state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - let old_count = u32::decode(&mut &state[..]).expect("Known good"); - let new_count = Paras::::iter_values().count() as u32; + #[cfg(feature = "try-runtime")] + fn post_upgrade(state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { + let old_count = u32::decode(&mut &state[..]).expect("Known good"); + let new_count = Paras::::iter_values().count() as u32; - ensure!(old_count == new_count, "Paras count should not change"); - Ok(()) - } - } + ensure!(old_count == new_count, "Paras count should not change"); + Ok(()) } +} pub type MigrateToV1 = frame_support::migrations::VersionedMigration< 0, diff --git a/polkadot/xcm/pallet-xcm/src/migration.rs b/polkadot/xcm/pallet-xcm/src/migration.rs index 237e75df5591..2793afcc9104 100644 --- a/polkadot/xcm/pallet-xcm/src/migration.rs +++ b/polkadot/xcm/pallet-xcm/src/migration.rs @@ -37,33 +37,27 @@ pub mod v1 { fn on_runtime_upgrade() -> Weight { let mut weight = T::DbWeight::get().reads(1); - pub struct MigrateV0ToV1(sp_std::marker::PhantomData); - impl OnRuntimeUpgrade for MigrateV0ToV1 { - fn on_runtime_upgrade() -> Weight { - let mut weight = T::DbWeight::get().reads(1); - - if StorageVersion::get::>() != 0 { - log::warn!("skipping v1, should be removed"); - return weight - } + if StorageVersion::get::>() != 0 { + log::warn!("skipping v1, should be removed"); + return weight + } - weight.saturating_accrue(T::DbWeight::get().writes(1)); - CurrentMigration::::put(VersionMigrationStage::default()); + weight.saturating_accrue(T::DbWeight::get().writes(1)); + CurrentMigration::::put(VersionMigrationStage::default()); - let translate = |pre: (u64, u64, u32)| -> Option<(u64, Weight, u32)> { - weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1)); - let translated = (pre.0, Weight::from_parts(pre.1, DEFAULT_PROOF_SIZE), pre.2); - log::info!("Migrated VersionNotifyTarget {:?} to {:?}", pre, translated); - Some(translated) - }; + let translate = |pre: (u64, u64, u32)| -> Option<(u64, Weight, u32)> { + weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1)); + let translated = (pre.0, Weight::from_parts(pre.1, DEFAULT_PROOF_SIZE), pre.2); + log::info!("Migrated VersionNotifyTarget {:?} to {:?}", pre, translated); + Some(translated) + }; - VersionNotifyTargets::::translate_values(translate); + VersionNotifyTargets::::translate_values(translate); - log::info!("v1 applied successfully"); - weight.saturating_accrue(T::DbWeight::get().writes(1)); - StorageVersion::new(1).put::>(); - weight - } + log::info!("v1 applied successfully"); + weight.saturating_accrue(T::DbWeight::get().writes(1)); + StorageVersion::new(1).put::>(); + weight } } diff --git a/substrate/frame/society/src/migrations.rs b/substrate/frame/society/src/migrations.rs index 478c63fe4471..a995c9d7be7f 100644 --- a/substrate/frame/society/src/migrations.rs +++ b/substrate/frame/society/src/migrations.rs @@ -27,27 +27,71 @@ use sp_runtime::TryRuntimeError; /// The log target. const TARGET: &'static str = "runtime::society::migration"; -pub mod v2 { - use super::*; +/// This migration moves all the state to v2 of Society. +pub struct VersionUncheckedMigrateToV2, I: 'static, PastPayouts>( + sp_std::marker::PhantomData<(T, I, PastPayouts)>, +); + +impl< + T: Config, + I: Instance + 'static, + PastPayouts: Get::AccountId, BalanceOf)>>, + > OnRuntimeUpgrade for VersionUncheckedMigrateToV2 +{ + #[cfg(feature = "try-runtime")] + fn pre_upgrade() -> Result, TryRuntimeError> { + let current = Pallet::::current_storage_version(); + let onchain = Pallet::::on_chain_storage_version(); + ensure!(onchain == 0 && current == 2, "pallet_society: invalid version"); + + Ok((old::Candidates::::get(), old::Members::::get()).encode()) + } + + fn on_runtime_upgrade() -> Weight { + let onchain = Pallet::::on_chain_storage_version(); + if onchain < 2 { + log::info!( + target: TARGET, + "Running migration against onchain version {:?}", + onchain + ); + from_original::(&mut PastPayouts::get()).defensive_unwrap_or(Weight::MAX) + } else { + log::warn!("Unexpected onchain version: {:?} (expected 0)", onchain); + T::DbWeight::get().reads(1) + } + } - mod version_unchecked { - /// This migration moves all the state to v2 of Society. - use super::*; - pub struct MigrateV0ToV2, I: 'static, PastPayouts>( - sp_std::marker::PhantomData<(T, I, PastPayouts)>, + #[cfg(feature = "try-runtime")] + fn post_upgrade(data: Vec) -> Result<(), TryRuntimeError> { + let old: ( + Vec::AccountId, BalanceOf>>, + Vec<::AccountId>, + ) = Decode::decode(&mut &data[..]).expect("Bad data"); + let mut old_candidates = + old.0.into_iter().map(|x| (x.who, x.kind, x.value)).collect::>(); + let mut old_members = old.1; + let mut candidates = + Candidates::::iter().map(|(k, v)| (k, v.kind, v.bid)).collect::>(); + let mut members = Members::::iter_keys().collect::>(); + + old_candidates.sort_by_key(|x| x.0.clone()); + candidates.sort_by_key(|x| x.0.clone()); + assert_eq!(candidates, old_candidates); + + members.sort(); + old_members.sort(); + assert_eq!(members, old_members); + + ensure!( + Pallet::::on_chain_storage_version() == 2, + "The onchain version must be updated after the migration." ); - impl< - T: Config, - I: Instance + 'static, - PastPayouts: Get::AccountId, BalanceOf)>>, - > OnRuntimeUpgrade for MigrateV0ToV2 - { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, TryRuntimeError> { - let current = Pallet::::current_storage_version(); - let onchain = Pallet::::on_chain_storage_version(); - ensure!(onchain == 0 && current == 2, "pallet_society: invalid version"); + assert_internal_consistency::(); + Ok(()) + } +} /// [`VersionUncheckedMigrateToV2`] wrapped in a [`frame_support::migrations::VersionedMigration`], /// ensuring the migration is only performed when on-chain version is 0. @@ -74,315 +118,238 @@ pub(crate) mod old { Approve, } - fn on_runtime_upgrade() -> Weight { - let onchain = Pallet::::on_chain_storage_version(); - if onchain < 2 { - log::info!( - target: TARGET, - "Running migration against onchain version {:?}", - onchain - ); - from_original::(&mut PastPayouts::get()).defensive_unwrap_or(Weight::MAX) - } else { - log::warn!("Unexpected onchain version: {:?} (expected 0)", onchain); - T::DbWeight::get().reads(1) - } - } + #[storage_alias] + pub type Bids, I: 'static> = StorageValue< + Pallet, + Vec::AccountId, BalanceOf>>, + ValueQuery, + >; + #[storage_alias] + pub type Candidates, I: 'static> = StorageValue< + Pallet, + Vec::AccountId, BalanceOf>>, + ValueQuery, + >; + #[storage_alias] + pub type Votes, I: 'static> = StorageDoubleMap< + Pallet, + Twox64Concat, + ::AccountId, + Twox64Concat, + ::AccountId, + Vote, + >; + #[storage_alias] + pub type SuspendedCandidates, I: 'static> = StorageMap< + Pallet, + Twox64Concat, + ::AccountId, + (BalanceOf, BidKind<::AccountId, BalanceOf>), + >; + #[storage_alias] + pub type Members, I: 'static> = + StorageValue, Vec<::AccountId>, ValueQuery>; + #[storage_alias] + pub type Vouching, I: 'static> = StorageMap< + Pallet, + Twox64Concat, + ::AccountId, + VouchingStatus, + >; + #[storage_alias] + pub type Strikes, I: 'static> = StorageMap< + Pallet, + Twox64Concat, + ::AccountId, + StrikeCount, + ValueQuery, + >; + #[storage_alias] + pub type Payouts, I: 'static> = StorageMap< + Pallet, + Twox64Concat, + ::AccountId, + Vec<(frame_system::pallet_prelude::BlockNumberFor, BalanceOf)>, + ValueQuery, + >; + #[storage_alias] + pub type SuspendedMembers, I: 'static> = StorageMap< + Pallet, + Twox64Concat, + ::AccountId, + bool, + ValueQuery, + >; + #[storage_alias] + pub type Defender, I: 'static> = + StorageValue, ::AccountId>; + #[storage_alias] + pub type DefenderVotes, I: 'static> = + StorageMap, Twox64Concat, ::AccountId, Vote>; +} - #[cfg(feature = "try-runtime")] - fn post_upgrade(data: Vec) -> Result<(), TryRuntimeError> { - let old: ( - Vec::AccountId, BalanceOf>>, - Vec<::AccountId>, - ) = Decode::decode(&mut &data[..]).expect("Bad data"); - let mut old_candidates = - old.0.into_iter().map(|x| (x.who, x.kind, x.value)).collect::>(); - let mut old_members = old.1; - let mut candidates = - Candidates::::iter().map(|(k, v)| (k, v.kind, v.bid)).collect::>(); - let mut members = Members::::iter_keys().collect::>(); - - old_candidates.sort_by_key(|x| x.0.clone()); - candidates.sort_by_key(|x| x.0.clone()); - assert_eq!(candidates, old_candidates); - - members.sort(); - old_members.sort(); - assert_eq!(members, old_members); - - ensure!( - Pallet::::on_chain_storage_version() == 2, - "The onchain version must be updated after the migration." - ); - - assert_internal_consistency::(); - Ok(()) - } - } +/// Will panic if there are any inconsistencies in the pallet's state or old keys remaining. +pub fn assert_internal_consistency, I: Instance + 'static>() { + // Check all members are valid data. + let mut members = vec![]; + for m in Members::::iter_keys() { + let r = Members::::get(&m).expect("Member data must be valid"); + members.push((m, r)); } - - pub mod versioned { - use super::*; - /// `version_unchecked::MigrateV0ToV2` wrapped in a - /// [`frame_support::migrations::VersionedMigration`], ensuring the migration is only - /// performed when on-chain version is 0. - pub type MigrateV0ToV2 = frame_support::migrations::VersionedMigration< - 0, - 2, - version_unchecked::MigrateV0ToV2, - crate::pallet::Pallet, - ::DbWeight, - >; + assert_eq!(MemberCount::::get(), members.len() as u32); + for (who, record) in members.iter() { + assert_eq!(MemberByIndex::::get(record.index).as_ref(), Some(who)); } - - pub(crate) mod old { - use super::*; - use frame_support::storage_alias; - - /// A vote by a member on a candidate application. - #[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] - pub enum Vote { - /// The member has been chosen to be skeptic and has not yet taken any action. - Skeptic, - /// The member has rejected the candidate's application. - Reject, - /// The member approves of the candidate's application. - Approve, - } - - #[storage_alias] - pub type Bids, I: 'static> = StorageValue< - Pallet, - Vec::AccountId, BalanceOf>>, - ValueQuery, - >; - #[storage_alias] - pub type Candidates, I: 'static> = StorageValue< - Pallet, - Vec::AccountId, BalanceOf>>, - ValueQuery, - >; - #[storage_alias] - pub type Votes, I: 'static> = StorageDoubleMap< - Pallet, - Twox64Concat, - ::AccountId, - Twox64Concat, - ::AccountId, - Vote, - >; - #[storage_alias] - pub type SuspendedCandidates, I: 'static> = StorageMap< - Pallet, - Twox64Concat, - ::AccountId, - (BalanceOf, BidKind<::AccountId, BalanceOf>), - >; - #[storage_alias] - pub type Members, I: 'static> = - StorageValue, Vec<::AccountId>, ValueQuery>; - #[storage_alias] - pub type Vouching, I: 'static> = StorageMap< - Pallet, - Twox64Concat, - ::AccountId, - VouchingStatus, - >; - #[storage_alias] - pub type Strikes, I: 'static> = StorageMap< - Pallet, - Twox64Concat, - ::AccountId, - StrikeCount, - ValueQuery, - >; - #[storage_alias] - pub type Payouts, I: 'static> = StorageMap< - Pallet, - Twox64Concat, - ::AccountId, - Vec<(frame_system::pallet_prelude::BlockNumberFor, BalanceOf)>, - ValueQuery, - >; - #[storage_alias] - pub type SuspendedMembers, I: 'static> = StorageMap< - Pallet, - Twox64Concat, - ::AccountId, - bool, - ValueQuery, - >; - #[storage_alias] - pub type Defender, I: 'static> = - StorageValue, ::AccountId>; - #[storage_alias] - pub type DefenderVotes, I: 'static> = - StorageMap, Twox64Concat, ::AccountId, Vote>; + if let Some(founder) = Founder::::get() { + assert_eq!(Members::::get(founder).expect("founder is member").index, 0); } - - /// Will panic if there are any inconsistencies in the pallet's state or old keys remaining. - pub fn assert_internal_consistency, I: Instance + 'static>() { - // Check all members are valid data. - let mut members = vec![]; - for m in Members::::iter_keys() { - let r = Members::::get(&m).expect("Member data must be valid"); - members.push((m, r)); - } - assert_eq!(MemberCount::::get(), members.len() as u32); - for (who, record) in members.iter() { - assert_eq!(MemberByIndex::::get(record.index).as_ref(), Some(who)); - } - if let Some(founder) = Founder::::get() { - assert_eq!(Members::::get(founder).expect("founder is member").index, 0); - } - if let Some(head) = Head::::get() { - assert!(Members::::contains_key(head)); - } - // Check all votes are valid data. - for (k1, k2) in Votes::::iter_keys() { - assert!(Votes::::get(k1, k2).is_some()); - } - // Check all defender votes are valid data. - for (k1, k2) in DefenderVotes::::iter_keys() { - assert!(DefenderVotes::::get(k1, k2).is_some()); - } - // Check all candidates are valid data. - for k in Candidates::::iter_keys() { - assert!(Candidates::::get(k).is_some()); - } - // Check all suspended members are valid data. - for m in SuspendedMembers::::iter_keys() { - assert!(SuspendedMembers::::get(m).is_some()); - } - // Check all payouts are valid data. - for p in Payouts::::iter_keys() { - let k = Payouts::::hashed_key_for(&p); - let v = frame_support::storage::unhashed::get_raw(&k[..]).expect("value is in map"); - assert!(PayoutRecordFor::::decode(&mut &v[..]).is_ok()); - } - - // We don't use these - make sure they don't exist. - assert_eq!(old::SuspendedCandidates::::iter().count(), 0); - assert_eq!(old::Strikes::::iter().count(), 0); - assert_eq!(old::Vouching::::iter().count(), 0); - assert!(!old::Defender::::exists()); - assert!(!old::Members::::exists()); + if let Some(head) = Head::::get() { + assert!(Members::::contains_key(head)); + } + // Check all votes are valid data. + for (k1, k2) in Votes::::iter_keys() { + assert!(Votes::::get(k1, k2).is_some()); + } + // Check all defender votes are valid data. + for (k1, k2) in DefenderVotes::::iter_keys() { + assert!(DefenderVotes::::get(k1, k2).is_some()); + } + // Check all candidates are valid data. + for k in Candidates::::iter_keys() { + assert!(Candidates::::get(k).is_some()); + } + // Check all suspended members are valid data. + for m in SuspendedMembers::::iter_keys() { + assert!(SuspendedMembers::::get(m).is_some()); + } + // Check all payouts are valid data. + for p in Payouts::::iter_keys() { + let k = Payouts::::hashed_key_for(&p); + let v = frame_support::storage::unhashed::get_raw(&k[..]).expect("value is in map"); + assert!(PayoutRecordFor::::decode(&mut &v[..]).is_ok()); } - pub fn from_original, I: Instance + 'static>( - past_payouts: &mut [(::AccountId, BalanceOf)], - ) -> Result { - // Migrate Bids from old::Bids (just a trunctation). - Bids::::put(BoundedVec::<_, T::MaxBids>::truncate_from(old::Bids::::take())); - - // Initialise round counter. - RoundCount::::put(0); - - // Migrate Candidates from old::Candidates - for Bid { who: candidate, kind, value } in old::Candidates::::take().into_iter() { - let mut tally = Tally::default(); - // Migrate Votes from old::Votes - // No need to drain, since we're overwriting values. - for (voter, vote) in old::Votes::::iter_prefix(&candidate) { - Votes::::insert( - &candidate, - &voter, - Vote { approve: vote == old::Vote::Approve, weight: 1 }, - ); - match vote { - old::Vote::Approve => tally.approvals.saturating_inc(), - old::Vote::Reject => tally.rejections.saturating_inc(), - old::Vote::Skeptic => Skeptic::::put(&voter), - } - } - Candidates::::insert( + // We don't use these - make sure they don't exist. + assert_eq!(old::SuspendedCandidates::::iter().count(), 0); + assert_eq!(old::Strikes::::iter().count(), 0); + assert_eq!(old::Vouching::::iter().count(), 0); + assert!(!old::Defender::::exists()); + assert!(!old::Members::::exists()); +} + +pub fn from_original, I: Instance + 'static>( + past_payouts: &mut [(::AccountId, BalanceOf)], +) -> Result { + // Migrate Bids from old::Bids (just a trunctation). + Bids::::put(BoundedVec::<_, T::MaxBids>::truncate_from(old::Bids::::take())); + + // Initialise round counter. + RoundCount::::put(0); + + // Migrate Candidates from old::Candidates + for Bid { who: candidate, kind, value } in old::Candidates::::take().into_iter() { + let mut tally = Tally::default(); + // Migrate Votes from old::Votes + // No need to drain, since we're overwriting values. + for (voter, vote) in old::Votes::::iter_prefix(&candidate) { + Votes::::insert( &candidate, - Candidacy { round: 0, kind, tally, skeptic_struck: false, bid: value }, + &voter, + Vote { approve: vote == old::Vote::Approve, weight: 1 }, ); + match vote { + old::Vote::Approve => tally.approvals.saturating_inc(), + old::Vote::Reject => tally.rejections.saturating_inc(), + old::Vote::Skeptic => Skeptic::::put(&voter), + } } + Candidates::::insert( + &candidate, + Candidacy { round: 0, kind, tally, skeptic_struck: false, bid: value }, + ); + } - // Migrate Members from old::Members old::Strikes old::Vouching - let mut member_count = 0; - for member in old::Members::::take() { - let strikes = old::Strikes::::take(&member); - let vouching = old::Vouching::::take(&member); - let record = MemberRecord { index: member_count, rank: 0, strikes, vouching }; - Members::::insert(&member, record); - MemberByIndex::::insert(member_count, &member); - - // The founder must be the first member in Society V2. If we find the founder not in - // index zero, we swap it with the first member. - if member == Founder::::get().defensive_ok_or("founder must always be set")? && - member_count > 0 - { - let member_to_swap = MemberByIndex::::get(0) - .defensive_ok_or("member_count > 0, we must have at least 1 member")?; - // Swap the founder with the first member in MemberByIndex. - MemberByIndex::::swap(0, member_count); - // Update the indicies of the swapped member MemberRecords. - Members::::mutate(&member, |m| { - if let Some(member) = m { - member.index = 0; - } else { - frame_support::defensive!( - "Member somehow disapeared from storage after it was inserted" - ); - } - }); - Members::::mutate(&member_to_swap, |m| { - if let Some(member) = m { - member.index = member_count; - } else { - frame_support::defensive!( - "Member somehow disapeared from storage after it was queried" - ); - } - }); - } - member_count.saturating_inc(); + // Migrate Members from old::Members old::Strikes old::Vouching + let mut member_count = 0; + for member in old::Members::::take() { + let strikes = old::Strikes::::take(&member); + let vouching = old::Vouching::::take(&member); + let record = MemberRecord { index: member_count, rank: 0, strikes, vouching }; + Members::::insert(&member, record); + MemberByIndex::::insert(member_count, &member); + + // The founder must be the first member in Society V2. If we find the founder not in index + // zero, we swap it with the first member. + if member == Founder::::get().defensive_ok_or("founder must always be set")? && + member_count > 0 + { + let member_to_swap = MemberByIndex::::get(0) + .defensive_ok_or("member_count > 0, we must have at least 1 member")?; + // Swap the founder with the first member in MemberByIndex. + MemberByIndex::::swap(0, member_count); + // Update the indicies of the swapped member MemberRecords. + Members::::mutate(&member, |m| { + if let Some(member) = m { + member.index = 0; + } else { + frame_support::defensive!( + "Member somehow disapeared from storage after it was inserted" + ); + } + }); + Members::::mutate(&member_to_swap, |m| { + if let Some(member) = m { + member.index = member_count; + } else { + frame_support::defensive!( + "Member somehow disapeared from storage after it was queried" + ); + } + }); } - MemberCount::::put(member_count); - - // Migrate Payouts from: old::Payouts and raw info (needed since we can't query old chain - // state). - past_payouts.sort(); - for (who, mut payouts) in old::Payouts::::iter() { - payouts.truncate(T::MaxPayouts::get() as usize); - // ^^ Safe since we already truncated. - let paid = past_payouts - .binary_search_by_key(&&who, |x| &x.0) - .ok() - .map(|p| past_payouts[p].1) - .unwrap_or(Zero::zero()); - match BoundedVec::try_from(payouts) { - Ok(payouts) => Payouts::::insert(who, PayoutRecord { paid, payouts }), - Err(_) => debug_assert!(false, "Truncation of Payouts ineffective??"), - } + member_count.saturating_inc(); + } + MemberCount::::put(member_count); + + // Migrate Payouts from: old::Payouts and raw info (needed since we can't query old chain + // state). + past_payouts.sort(); + for (who, mut payouts) in old::Payouts::::iter() { + payouts.truncate(T::MaxPayouts::get() as usize); + // ^^ Safe since we already truncated. + let paid = past_payouts + .binary_search_by_key(&&who, |x| &x.0) + .ok() + .map(|p| past_payouts[p].1) + .unwrap_or(Zero::zero()); + match BoundedVec::try_from(payouts) { + Ok(payouts) => Payouts::::insert(who, PayoutRecord { paid, payouts }), + Err(_) => debug_assert!(false, "Truncation of Payouts ineffective??"), } + } - // Migrate SuspendedMembers from old::SuspendedMembers old::Strikes old::Vouching. - for who in old::SuspendedMembers::::iter_keys() { - let strikes = old::Strikes::::take(&who); - let vouching = old::Vouching::::take(&who); - let record = MemberRecord { index: 0, rank: 0, strikes, vouching }; - SuspendedMembers::::insert(&who, record); - } + // Migrate SuspendedMembers from old::SuspendedMembers old::Strikes old::Vouching. + for who in old::SuspendedMembers::::iter_keys() { + let strikes = old::Strikes::::take(&who); + let vouching = old::Vouching::::take(&who); + let record = MemberRecord { index: 0, rank: 0, strikes, vouching }; + SuspendedMembers::::insert(&who, record); + } - // Any suspended candidates remaining are rejected. - let _ = old::SuspendedCandidates::::clear(u32::MAX, None); + // Any suspended candidates remaining are rejected. + let _ = old::SuspendedCandidates::::clear(u32::MAX, None); - // We give the current defender the benefit of the doubt. - old::Defender::::kill(); - let _ = old::DefenderVotes::::clear(u32::MAX, None); + // We give the current defender the benefit of the doubt. + old::Defender::::kill(); + let _ = old::DefenderVotes::::clear(u32::MAX, None); - Ok(T::BlockWeights::get().max_block) - } + Ok(T::BlockWeights::get().max_block) +} - pub fn from_raw_past_payouts, I: Instance + 'static>( - past_payouts_raw: impl Iterator, - ) -> Vec<(::AccountId, BalanceOf)> { - past_payouts_raw - .filter_map(|(x, y)| Some((Decode::decode(&mut &x[..]).ok()?, y.try_into().ok()?))) - .collect() - } +pub fn from_raw_past_payouts, I: Instance + 'static>( + past_payouts_raw: impl Iterator, +) -> Vec<(::AccountId, BalanceOf)> { + past_payouts_raw + .filter_map(|(x, y)| Some((Decode::decode(&mut &x[..]).ok()?, y.try_into().ok()?))) + .collect() } diff --git a/substrate/frame/society/src/mock.rs b/substrate/frame/society/src/mock.rs index 6af0ae57d842..0bee08236f74 100644 --- a/substrate/frame/society/src/mock.rs +++ b/substrate/frame/society/src/mock.rs @@ -161,7 +161,7 @@ impl EnvBuilder { assert!(Society::found_society(Origin::signed(1), 10, 10, 8, 2, 25, r).is_ok()); } let r = f(); - migrations::v2::assert_internal_consistency::(); + migrations::assert_internal_consistency::(); r }) } diff --git a/substrate/frame/society/src/tests.rs b/substrate/frame/society/src/tests.rs index 1ce1bf005db9..ea2afef3b32b 100644 --- a/substrate/frame/society/src/tests.rs +++ b/substrate/frame/society/src/tests.rs @@ -18,7 +18,7 @@ //! Tests for the module. use super::*; -use migrations::v2::old; +use migrations::old; use mock::*; use frame_support::{assert_noop, assert_ok}; @@ -77,8 +77,8 @@ fn migration_works() { .collect::>(); old::Bids::::put(bids); - migrations::v2::from_original::(&mut [][..]).expect("migration failed"); - migrations::v2::assert_internal_consistency::(); + migrations::from_original::(&mut [][..]).expect("migration failed"); + migrations::assert_internal_consistency::(); assert_eq!( membership(), From e9aa91aa8a08dc97d85bfca9fc6b563940769289 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Tue, 28 Nov 2023 11:01:18 +0400 Subject: [PATCH 54/98] remove kusama runtime --- polkadot/runtime/kusama/src/lib.rs | 2730 ---------------------------- 1 file changed, 2730 deletions(-) delete mode 100644 polkadot/runtime/kusama/src/lib.rs diff --git a/polkadot/runtime/kusama/src/lib.rs b/polkadot/runtime/kusama/src/lib.rs deleted file mode 100644 index c6ecbaba21d9..000000000000 --- a/polkadot/runtime/kusama/src/lib.rs +++ /dev/null @@ -1,2730 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -//! The Kusama runtime. This can be compiled with `#[no_std]`, ready for Wasm. - -#![cfg_attr(not(feature = "std"), no_std)] -// `construct_runtime!` does a lot of recursion and requires us to increase the limit. -#![recursion_limit = "512"] - -use pallet_nis::WithMaximumOf; -use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -use primitives::{ - slashing, AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash, - CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo, Hash, - Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, Moment, Nonce, - OccupiedCoreAssumption, PersistedValidationData, ScrapedOnChainVotes, SessionInfo, Signature, - ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, LOWEST_PUBLIC_ID, - PARACHAIN_KEY_TYPE_ID, -}; -use runtime_common::{ - auctions, claims, crowdloan, impl_runtime_weights, impls::DealWithFees, paras_registrar, - prod_or_fast, slots, BalanceToU256, BlockHashCount, BlockLength, CurrencyToVote, - SlowAdjustingFeeUpdate, U256ToBalance, -}; -use scale_info::TypeInfo; -use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*}; - -use runtime_parachains::{ - assigner_parachains as parachains_assigner_parachains, - configuration as parachains_configuration, disputes as parachains_disputes, - disputes::slashing as parachains_slashing, - dmp as parachains_dmp, hrmp as parachains_hrmp, inclusion as parachains_inclusion, - inclusion::{AggregateMessageOrigin, UmpQueueId}, - initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, - paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, - runtime_api_impl::v5 as parachains_runtime_api_impl, - scheduler as parachains_scheduler, session_info as parachains_session_info, - shared as parachains_shared, -}; - -use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; -use beefy_primitives::{ - ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature}, - mmr::{BeefyDataProvider, MmrLeafVersion}, -}; -use frame_election_provider_support::{ - bounds::ElectionBoundsBuilder, generate_solution_type, onchain, NposSolution, - SequentialPhragmen, -}; -use frame_support::{ - construct_runtime, parameter_types, - traits::{ - ConstU32, Contains, EitherOf, EitherOfDiverse, InstanceFilter, KeyOwnerProofSystem, - PrivilegeCmp, ProcessMessage, ProcessMessageError, StorageMapShim, WithdrawReasons, - }, - weights::{ConstantMultiplier, WeightMeter}, - PalletId, -}; -use frame_system::EnsureRoot; -use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId}; -use pallet_im_online::sr25519::AuthorityId as ImOnlineId; -use pallet_session::historical as session_historical; -use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo}; -use sp_core::{ConstU128, OpaqueMetadata, H256}; -use sp_runtime::{ - create_runtime_str, generic, impl_opaque_keys, - traits::{ - AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, Extrinsic as ExtrinsicT, - Keccak256, OpaqueKeys, SaturatedConversion, Verify, - }, - transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity}, - ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill, RuntimeDebug, -}; -use sp_staking::SessionIndex; -#[cfg(any(feature = "std", test))] -use sp_version::NativeVersion; -use sp_version::RuntimeVersion; -use xcm::latest::Junction; - -pub use frame_system::Call as SystemCall; -pub use pallet_balances::Call as BalancesCall; -pub use pallet_election_provider_multi_phase::Call as EPMCall; -#[cfg(feature = "std")] -pub use pallet_staking::StakerStatus; -use pallet_staking::UseValidatorsMap; -use sp_runtime::traits::Get; -#[cfg(any(feature = "std", test))] -pub use sp_runtime::BuildStorage; - -/// Constant values used within the runtime. -use kusama_runtime_constants::{currency::*, fee::*, time::*}; - -// Weights used in the runtime. -mod weights; - -// Voter bag threshold definitions. -mod bag_thresholds; - -// Historical information of society finances. -mod past_payouts; - -// XCM configurations. -pub mod xcm_config; - -// Governance configurations. -pub mod governance; -use governance::{ - pallet_custom_origins, AuctionAdmin, Fellows, GeneralAdmin, LeaseAdmin, StakingAdmin, - Treasurer, TreasurySpender, -}; - -#[cfg(test)] -mod tests; - -impl_runtime_weights!(kusama_runtime_constants); - -// Make the WASM binary available. -#[cfg(feature = "std")] -include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs")); - -/// Runtime version (Kusama). -#[sp_version::runtime_version] -pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!("kusama"), - impl_name: create_runtime_str!("parity-kusama"), - authoring_version: 2, - spec_version: 9430, - impl_version: 0, - apis: RUNTIME_API_VERSIONS, - transaction_version: 23, - state_version: 1, -}; - -/// The BABE epoch configuration at genesis. -pub const BABE_GENESIS_EPOCH_CONFIG: babe_primitives::BabeEpochConfiguration = - babe_primitives::BabeEpochConfiguration { - c: PRIMARY_PROBABILITY, - allowed_slots: babe_primitives::AllowedSlots::PrimaryAndSecondaryVRFSlots, - }; - -/// Native version. -#[cfg(any(feature = "std", test))] -pub fn native_version() -> NativeVersion { - NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } -} - -/// We currently allow all calls. -pub struct BaseFilter; -impl Contains for BaseFilter { - fn contains(_c: &RuntimeCall) -> bool { - true - } -} - -parameter_types! { - pub const Version: RuntimeVersion = VERSION; - pub const SS58Prefix: u8 = 2; -} - -impl frame_system::Config for Runtime { - type BaseCallFilter = frame_support::traits::Everything; - type BlockWeights = BlockWeights; - type BlockLength = BlockLength; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type Nonce = Nonce; - type Hash = Hash; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = AccountIdLookup; - type Block = Block; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type DbWeight = RocksDbWeight; - type Version = Version; - type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = weights::frame_system::WeightInfo; - type SS58Prefix = SS58Prefix; - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; -} - -parameter_types! { - pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * BlockWeights::get().max_block; - pub const MaxScheduledPerBlock: u32 = 50; - pub const NoPreimagePostponement: Option = Some(10); -} - -/// Used the compare the privilege of an origin inside the scheduler. -pub struct OriginPrivilegeCmp; - -impl PrivilegeCmp for OriginPrivilegeCmp { - fn cmp_privilege(left: &OriginCaller, right: &OriginCaller) -> Option { - if left == right { - return Some(Ordering::Equal) - } - - match (left, right) { - // Root is greater than anything. - (OriginCaller::system(frame_system::RawOrigin::Root), _) => Some(Ordering::Greater), - // For every other origin we don't care, as they are not used for `ScheduleOrigin`. - _ => None, - } - } -} - -impl pallet_scheduler::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type RuntimeEvent = RuntimeEvent; - type PalletsOrigin = OriginCaller; - type RuntimeCall = RuntimeCall; - type MaximumWeight = MaximumSchedulerWeight; - // The goal of having ScheduleOrigin include AuctionAdmin is to allow the auctions track of - // OpenGov to schedule periodic auctions. - // Also allow Treasurer to schedule recurring payments. - type ScheduleOrigin = EitherOf, AuctionAdmin>, Treasurer>; - type MaxScheduledPerBlock = MaxScheduledPerBlock; - type WeightInfo = weights::pallet_scheduler::WeightInfo; - type OriginPrivilegeCmp = OriginPrivilegeCmp; - type Preimages = Preimage; -} - -parameter_types! { - pub const PreimageBaseDeposit: Balance = deposit(2, 64); - pub const PreimageByteDeposit: Balance = deposit(0, 1); -} - -impl pallet_preimage::Config for Runtime { - type WeightInfo = weights::pallet_preimage::WeightInfo; - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type ManagerOrigin = EnsureRoot; - type BaseDeposit = PreimageBaseDeposit; - type ByteDeposit = PreimageByteDeposit; -} - -parameter_types! { - pub EpochDuration: u64 = prod_or_fast!( - EPOCH_DURATION_IN_SLOTS as u64, - 2 * MINUTES as u64, - "KSM_EPOCH_DURATION" - ); - pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK; - pub ReportLongevity: u64 = - BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * EpochDuration::get(); -} - -impl pallet_babe::Config for Runtime { - type EpochDuration = EpochDuration; - type ExpectedBlockTime = ExpectedBlockTime; - - // session module is the trigger - type EpochChangeTrigger = pallet_babe::ExternalTrigger; - - type DisabledValidators = Session; - - type KeyOwnerProof = - >::Proof; - - type EquivocationReportSystem = - pallet_babe::EquivocationReportSystem; - - type WeightInfo = (); - - type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; -} - -parameter_types! { - pub const IndexDeposit: Balance = 100 * CENTS; -} - -impl pallet_indices::Config for Runtime { - type AccountIndex = AccountIndex; - type Currency = Balances; - type Deposit = IndexDeposit; - type RuntimeEvent = RuntimeEvent; - type WeightInfo = weights::pallet_indices::WeightInfo; -} - -parameter_types! { - pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT; - pub const MaxLocks: u32 = 50; - pub const MaxReserves: u32 = 50; -} - -impl pallet_balances::Config for Runtime { - type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type MaxLocks = MaxLocks; - type MaxReserves = MaxReserves; - type ReserveIdentifier = [u8; 8]; - type WeightInfo = weights::pallet_balances::WeightInfo; - type FreezeIdentifier = (); - type MaxFreezes = (); - type RuntimeHoldReason = RuntimeHoldReason; - type MaxHolds = ConstU32<1>; -} - -parameter_types! { - pub BeefySetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get(); -} - -impl pallet_beefy::Config for Runtime { - type BeefyId = BeefyId; - type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; - type MaxSetIdSessionEntries = BeefySetIdSessionEntries; - type OnNewValidatorSet = BeefyMmrLeaf; - type WeightInfo = (); - type KeyOwnerProof = >::Proof; - type EquivocationReportSystem = - pallet_beefy::EquivocationReportSystem; -} - -impl pallet_mmr::Config for Runtime { - const INDEXING_PREFIX: &'static [u8] = mmr::INDEXING_PREFIX; - type Hashing = Keccak256; - type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest; - type WeightInfo = (); - type LeafData = pallet_beefy_mmr::Pallet; -} - -/// MMR helper types. -mod mmr { - use super::Runtime; - pub use pallet_mmr::primitives::*; - - pub type Leaf = <::LeafData as LeafDataProvider>::LeafData; - pub type Hashing = ::Hashing; - pub type Hash = ::Output; -} - -parameter_types! { - /// Version of the produced MMR leaf. - /// - /// The version consists of two parts; - /// - `major` (3 bits) - /// - `minor` (5 bits) - /// - /// `major` should be updated only if decoding the previous MMR Leaf format from the payload - /// is not possible (i.e. backward incompatible change). - /// `minor` should be updated if fields are added to the previous MMR Leaf, which given SCALE - /// encoding does not prevent old leafs from being decoded. - /// - /// Hence we expect `major` to be changed really rarely (think never). - /// See [`MmrLeafVersion`] type documentation for more details. - pub LeafVersion: MmrLeafVersion = MmrLeafVersion::new(0, 0); -} - -/// A BEEFY data provider that merkelizes all the parachain heads at the current block -/// (sorted by their parachain id). -pub struct ParaHeadsRootProvider; -impl BeefyDataProvider for ParaHeadsRootProvider { - fn extra_data() -> H256 { - let mut para_heads: Vec<(u32, Vec)> = Paras::parachains() - .into_iter() - .filter_map(|id| Paras::para_head(&id).map(|head| (id.into(), head.0))) - .collect(); - para_heads.sort_by_key(|k| k.0); - binary_merkle_tree::merkle_root::( - para_heads.into_iter().map(|pair| pair.encode()), - ) - .into() - } -} - -impl pallet_beefy_mmr::Config for Runtime { - type LeafVersion = LeafVersion; - type BeefyAuthorityToMerkleLeaf = pallet_beefy_mmr::BeefyEcdsaToEthereum; - type LeafExtra = H256; - type BeefyDataProvider = ParaHeadsRootProvider; -} - -parameter_types! { - pub const TransactionByteFee: Balance = 10 * MILLICENTS; - /// This value increases the priority of `Operational` transactions by adding - /// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`. - pub const OperationalFeeMultiplier: u8 = 5; -} - -impl pallet_transaction_payment::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = CurrencyAdapter>; - type OperationalFeeMultiplier = OperationalFeeMultiplier; - type WeightToFee = WeightToFee; - type LengthToFee = ConstantMultiplier; - type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; -} - -parameter_types! { - pub const MinimumPeriod: u64 = SLOT_DURATION / 2; -} -impl pallet_timestamp::Config for Runtime { - type Moment = u64; - type OnTimestampSet = Babe; - type MinimumPeriod = MinimumPeriod; - type WeightInfo = weights::pallet_timestamp::WeightInfo; -} - -impl pallet_authorship::Config for Runtime { - type FindAuthor = pallet_session::FindAccountFromAuthorIndex; - type EventHandler = (Staking, ImOnline); -} - -impl_opaque_keys! { - pub struct OldSessionKeys { - pub grandpa: Grandpa, - pub babe: Babe, - pub im_online: ImOnline, - pub para_validator: Initializer, - pub para_assignment: ParaSessionInfo, - pub authority_discovery: AuthorityDiscovery, - } -} - -impl_opaque_keys! { - pub struct SessionKeys { - pub grandpa: Grandpa, - pub babe: Babe, - pub im_online: ImOnline, - pub para_validator: Initializer, - pub para_assignment: ParaSessionInfo, - pub authority_discovery: AuthorityDiscovery, - pub beefy: Beefy, - } -} - -// remove this when removing `OldSessionKeys` -fn transform_session_keys(v: AccountId, old: OldSessionKeys) -> SessionKeys { - SessionKeys { - grandpa: old.grandpa, - babe: old.babe, - im_online: old.im_online, - para_validator: old.para_validator, - para_assignment: old.para_assignment, - authority_discovery: old.authority_discovery, - beefy: { - // From Session::upgrade_keys(): - // - // Care should be taken that the raw versions of the - // added keys are unique for every `ValidatorId, KeyTypeId` combination. - // This is an invariant that the session pallet typically maintains internally. - // - // So, produce a dummy value that's unique for the `ValidatorId, KeyTypeId` combination. - let mut id: BeefyId = sp_application_crypto::ecdsa::Public::from_raw([0u8; 33]).into(); - let id_raw: &mut [u8] = id.as_mut(); - id_raw[1..33].copy_from_slice(v.as_ref()); - id_raw[0..4].copy_from_slice(b"beef"); - id - }, - } -} - -impl pallet_session::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ValidatorId = AccountId; - type ValidatorIdOf = pallet_staking::StashOf; - type ShouldEndSession = Babe; - type NextSessionRotation = Babe; - type SessionManager = pallet_session::historical::NoteHistoricalRoot; - type SessionHandler = ::KeyTypeIdProviders; - type Keys = SessionKeys; - type WeightInfo = weights::pallet_session::WeightInfo; -} - -impl pallet_session::historical::Config for Runtime { - type FullIdentification = pallet_staking::Exposure; - type FullIdentificationOf = pallet_staking::ExposureOf; -} - -parameter_types! { - // phase durations. 1/4 of the last session for each. - // in testing: 1min or half of the session for each - pub SignedPhase: u32 = prod_or_fast!( - EPOCH_DURATION_IN_SLOTS / 4, - (1 * MINUTES).min(EpochDuration::get().saturated_into::() / 2), - "KSM_SIGNED_PHASE" - ); - pub UnsignedPhase: u32 = prod_or_fast!( - EPOCH_DURATION_IN_SLOTS / 4, - (1 * MINUTES).min(EpochDuration::get().saturated_into::() / 2), - "KSM_UNSIGNED_PHASE" - ); - - // signed config - pub const SignedMaxSubmissions: u32 = 16; - pub const SignedMaxRefunds: u32 = 16 / 4; - pub const SignedDepositBase: Balance = deposit(2, 0); - pub const SignedDepositByte: Balance = deposit(0, 10) / 1024; - // Each good submission will get 1/10 KSM as reward - pub SignedRewardBase: Balance = UNITS / 10; - pub BetterUnsignedThreshold: Perbill = Perbill::from_rational(5u32, 10_000); - - // 1 hour session, 15 minutes unsigned phase, 8 offchain executions. - pub OffchainRepeat: BlockNumber = UnsignedPhase::get() / 8; - - pub const MaxElectingVoters: u32 = 12_500; - /// We take the top 12500 nominators as electing voters and all of the validators as electable - /// targets. Whilst this is the case, we cannot and shall not increase the size of the - /// validator intentions. - pub ElectionBounds: frame_election_provider_support::bounds::ElectionBounds = - ElectionBoundsBuilder::default().voters_count(MaxElectingVoters::get().into()).build(); - pub NposSolutionPriority: TransactionPriority = - Perbill::from_percent(90) * TransactionPriority::max_value(); - /// Setup election pallet to support maximum winners upto 2000. This will mean Staking Pallet - /// cannot have active validators higher than this count. - pub const MaxActiveValidators: u32 = 2000; -} - -generate_solution_type!( - #[compact] - pub struct NposCompactSolution24::< - VoterIndex = u32, - TargetIndex = u16, - Accuracy = sp_runtime::PerU16, - MaxVoters = MaxElectingVoters, - >(24) -); - -pub struct OnChainSeqPhragmen; -impl onchain::Config for OnChainSeqPhragmen { - type System = Runtime; - type Solver = SequentialPhragmen; - type DataProvider = Staking; - type WeightInfo = weights::frame_election_provider_support::WeightInfo; - type MaxWinners = MaxActiveValidators; - type Bounds = ElectionBounds; -} - -impl pallet_election_provider_multi_phase::MinerConfig for Runtime { - type AccountId = AccountId; - type MaxLength = OffchainSolutionLengthLimit; - type MaxWeight = OffchainSolutionWeightLimit; - type Solution = NposCompactSolution24; - type MaxVotesPerVoter = < - ::DataProvider - as - frame_election_provider_support::ElectionDataProvider - >::MaxVotesPerVoter; - type MaxWinners = MaxActiveValidators; - - // The unsigned submissions have to respect the weight of the submit_unsigned call, thus their - // weight estimate function is wired to this call's weight. - fn solution_weight(v: u32, t: u32, a: u32, d: u32) -> Weight { - < - ::WeightInfo - as - pallet_election_provider_multi_phase::WeightInfo - >::submit_unsigned(v, t, a, d) - } -} - -impl pallet_election_provider_multi_phase::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EstimateCallFee = TransactionPayment; - type UnsignedPhase = UnsignedPhase; - type SignedMaxSubmissions = SignedMaxSubmissions; - type SignedMaxRefunds = SignedMaxRefunds; - type SignedRewardBase = SignedRewardBase; - type SignedDepositBase = SignedDepositBase; - type SignedDepositByte = SignedDepositByte; - type SignedDepositWeight = (); - type SignedMaxWeight = - ::MaxWeight; - type MinerConfig = Self; - type SlashHandler = (); // burn slashes - type RewardHandler = (); // nothing to do upon rewards - type SignedPhase = SignedPhase; - type BetterUnsignedThreshold = BetterUnsignedThreshold; - type BetterSignedThreshold = (); - type OffchainRepeat = OffchainRepeat; - type MinerTxPriority = NposSolutionPriority; - type DataProvider = Staking; - #[cfg(any(feature = "fast-runtime", feature = "runtime-benchmarks"))] - type Fallback = onchain::OnChainExecution; - #[cfg(not(any(feature = "fast-runtime", feature = "runtime-benchmarks")))] - type Fallback = frame_election_provider_support::NoElection<( - AccountId, - BlockNumber, - Staking, - MaxActiveValidators, - )>; - type GovernanceFallback = onchain::OnChainExecution; - type Solver = SequentialPhragmen< - AccountId, - pallet_election_provider_multi_phase::SolutionAccuracyOf, - (), - >; - type BenchmarkingConfig = runtime_common::elections::BenchmarkConfig; - type ForceOrigin = EitherOf, StakingAdmin>; - type WeightInfo = weights::pallet_election_provider_multi_phase::WeightInfo; - type MaxWinners = MaxActiveValidators; - type ElectionBounds = ElectionBounds; -} - -parameter_types! { - pub const BagThresholds: &'static [u64] = &bag_thresholds::THRESHOLDS; -} - -type VoterBagsListInstance = pallet_bags_list::Instance1; -impl pallet_bags_list::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type ScoreProvider = Staking; - type WeightInfo = weights::pallet_bags_list::WeightInfo; - type BagThresholds = BagThresholds; - type Score = sp_npos_elections::VoteWeight; -} - -pub struct EraPayout; -impl pallet_staking::EraPayout for EraPayout { - fn era_payout( - total_staked: Balance, - _total_issuance: Balance, - era_duration_millis: u64, - ) -> (Balance, Balance) { - // all para-ids that are currently active. - let auctioned_slots = Paras::parachains() - .into_iter() - // all active para-ids that do not belong to a system or common good chain is the number - // of parachains that we should take into account for inflation. - .filter(|i| *i >= LOWEST_PUBLIC_ID) - .count() as u64; - - const MAX_ANNUAL_INFLATION: Perquintill = Perquintill::from_percent(10); - const MILLISECONDS_PER_YEAR: u64 = 1000 * 3600 * 24 * 36525 / 100; - - runtime_common::impls::era_payout( - total_staked, - Nis::issuance().other, - MAX_ANNUAL_INFLATION, - Perquintill::from_rational(era_duration_millis, MILLISECONDS_PER_YEAR), - auctioned_slots, - ) - } -} - -parameter_types! { - // Six sessions in an era (6 hours). - pub const SessionsPerEra: SessionIndex = prod_or_fast!(6, 1); - - // 28 eras for unbonding (7 days). - pub BondingDuration: sp_staking::EraIndex = prod_or_fast!( - 28, - 28, - "DOT_BONDING_DURATION" - ); - // 27 eras in which slashes can be cancelled (slightly less than 7 days). - pub SlashDeferDuration: sp_staking::EraIndex = prod_or_fast!( - 27, - 27, - "DOT_SLASH_DEFER_DURATION" - ); - pub const MaxNominatorRewardedPerValidator: u32 = 512; - pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); - // 24 - pub const MaxNominations: u32 = ::LIMIT as u32; -} - -impl pallet_staking::Config for Runtime { - type Currency = Balances; - type CurrencyBalance = Balance; - type UnixTime = Timestamp; - type CurrencyToVote = CurrencyToVote; - type ElectionProvider = ElectionProviderMultiPhase; - type GenesisElectionProvider = onchain::OnChainExecution; - type RewardRemainder = Treasury; - type RuntimeEvent = RuntimeEvent; - type Slash = Treasury; - type Reward = (); - type SessionsPerEra = SessionsPerEra; - type BondingDuration = BondingDuration; - type SlashDeferDuration = SlashDeferDuration; - type AdminOrigin = EitherOf, StakingAdmin>; - type SessionInterface = Self; - type EraPayout = EraPayout; - type NextNewSession = Session; - type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; - type OffendingValidatorsThreshold = OffendingValidatorsThreshold; - type VoterList = VoterList; - type TargetList = UseValidatorsMap; - type NominationsQuota = pallet_staking::FixedNominationsQuota<{ MaxNominations::get() }>; - type MaxUnlockingChunks = frame_support::traits::ConstU32<32>; - type HistoryDepth = frame_support::traits::ConstU32<84>; - type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; - type EventListeners = NominationPools; - type WeightInfo = weights::pallet_staking::WeightInfo; -} - -impl pallet_fast_unstake::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BatchSize = frame_support::traits::ConstU32<64>; - type Deposit = frame_support::traits::ConstU128<{ CENTS * 100 }>; - type ControlOrigin = EnsureRoot; - type Staking = Staking; - type MaxErasToCheckPerBlock = ConstU32<1>; - #[cfg(feature = "runtime-benchmarks")] - type MaxBackersPerValidator = MaxNominatorRewardedPerValidator; - type WeightInfo = weights::pallet_fast_unstake::WeightInfo; -} - -parameter_types! { - pub const ProposalBond: Permill = Permill::from_percent(5); - pub const ProposalBondMinimum: Balance = 2000 * CENTS; - pub const ProposalBondMaximum: Balance = 1 * GRAND; - pub const SpendPeriod: BlockNumber = 6 * DAYS; - pub const Burn: Permill = Permill::from_perthousand(2); - pub const TreasuryPalletId: PalletId = PalletId(*b"py/trsry"); - - pub const TipCountdown: BlockNumber = 1 * DAYS; - pub const TipFindersFee: Percent = Percent::from_percent(20); - pub const TipReportDepositBase: Balance = 100 * CENTS; - pub const DataDepositPerByte: Balance = 1 * CENTS; - pub const MaxApprovals: u32 = 100; - pub const MaxAuthorities: u32 = 100_000; - pub const MaxKeys: u32 = 10_000; - pub const MaxPeerInHeartbeats: u32 = 10_000; -} - -impl pallet_treasury::Config for Runtime { - type PalletId = TreasuryPalletId; - type Currency = Balances; - type ApproveOrigin = EitherOfDiverse, Treasurer>; - type RejectOrigin = EitherOfDiverse, Treasurer>; - type RuntimeEvent = RuntimeEvent; - type OnSlash = Treasury; - type ProposalBond = ProposalBond; - type ProposalBondMinimum = ProposalBondMinimum; - type ProposalBondMaximum = ProposalBondMaximum; - type SpendPeriod = SpendPeriod; - type Burn = Burn; - type BurnDestination = Society; - type MaxApprovals = MaxApprovals; - type WeightInfo = weights::pallet_treasury::WeightInfo; - type SpendFunds = Bounties; - type SpendOrigin = TreasurySpender; -} - -parameter_types! { - pub const BountyDepositBase: Balance = 100 * CENTS; - pub const BountyDepositPayoutDelay: BlockNumber = 4 * DAYS; - pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS; - pub const MaximumReasonLength: u32 = 16384; - pub const CuratorDepositMultiplier: Permill = Permill::from_percent(50); - pub const CuratorDepositMin: Balance = 10 * CENTS; - pub const CuratorDepositMax: Balance = 500 * CENTS; - pub const BountyValueMinimum: Balance = 200 * CENTS; -} - -impl pallet_bounties::Config for Runtime { - type BountyDepositBase = BountyDepositBase; - type BountyDepositPayoutDelay = BountyDepositPayoutDelay; - type BountyUpdatePeriod = BountyUpdatePeriod; - type CuratorDepositMultiplier = CuratorDepositMultiplier; - type CuratorDepositMin = CuratorDepositMin; - type CuratorDepositMax = CuratorDepositMax; - type BountyValueMinimum = BountyValueMinimum; - type ChildBountyManager = ChildBounties; - type DataDepositPerByte = DataDepositPerByte; - type RuntimeEvent = RuntimeEvent; - type MaximumReasonLength = MaximumReasonLength; - type WeightInfo = weights::pallet_bounties::WeightInfo; -} - -parameter_types! { - pub const MaxActiveChildBountyCount: u32 = 100; - pub const ChildBountyValueMinimum: Balance = BountyValueMinimum::get() / 10; -} - -impl pallet_child_bounties::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type MaxActiveChildBountyCount = MaxActiveChildBountyCount; - type ChildBountyValueMinimum = ChildBountyValueMinimum; - type WeightInfo = weights::pallet_child_bounties::WeightInfo; -} - -impl pallet_offences::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type IdentificationTuple = pallet_session::historical::IdentificationTuple; - type OnOffenceHandler = Staking; -} - -impl pallet_authority_discovery::Config for Runtime { - type MaxAuthorities = MaxAuthorities; -} - -parameter_types! { - pub const ImOnlineUnsignedPriority: TransactionPriority = TransactionPriority::max_value(); -} - -impl pallet_im_online::Config for Runtime { - type AuthorityId = ImOnlineId; - type RuntimeEvent = RuntimeEvent; - type ValidatorSet = Historical; - type NextSessionRotation = Babe; - type ReportUnresponsiveness = Offences; - type UnsignedPriority = ImOnlineUnsignedPriority; - type WeightInfo = weights::pallet_im_online::WeightInfo; - type MaxKeys = MaxKeys; - type MaxPeerInHeartbeats = MaxPeerInHeartbeats; -} - -parameter_types! { - pub MaxSetIdSessionEntries: u32 = BondingDuration::get() * SessionsPerEra::get(); -} - -impl pallet_grandpa::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - - type WeightInfo = (); - type MaxAuthorities = MaxAuthorities; - type MaxNominators = MaxNominatorRewardedPerValidator; - type MaxSetIdSessionEntries = MaxSetIdSessionEntries; - - type KeyOwnerProof = >::Proof; - - type EquivocationReportSystem = - pallet_grandpa::EquivocationReportSystem; -} - -/// Submits transaction with the node's public and signature type. Adheres to the signed extension -/// format of the chain. -impl frame_system::offchain::CreateSignedTransaction for Runtime -where - RuntimeCall: From, -{ - fn create_transaction>( - call: RuntimeCall, - public: ::Signer, - account: AccountId, - nonce: ::Nonce, - ) -> Option<(RuntimeCall, ::SignaturePayload)> { - use sp_runtime::traits::StaticLookup; - // take the biggest period possible. - let period = - BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64; - - let current_block = System::block_number() - .saturated_into::() - // The `System::block_number` is initialized with `n+1`, - // so the actual block number is `n`. - .saturating_sub(1); - let tip = 0; - let extra: SignedExtra = ( - frame_system::CheckNonZeroSender::::new(), - frame_system::CheckSpecVersion::::new(), - frame_system::CheckTxVersion::::new(), - frame_system::CheckGenesis::::new(), - frame_system::CheckMortality::::from(generic::Era::mortal( - period, - current_block, - )), - frame_system::CheckNonce::::from(nonce), - frame_system::CheckWeight::::new(), - pallet_transaction_payment::ChargeTransactionPayment::::from(tip), - ); - let raw_payload = SignedPayload::new(call, extra) - .map_err(|e| { - log::warn!("Unable to create signed payload: {:?}", e); - }) - .ok()?; - let signature = raw_payload.using_encoded(|payload| C::sign(payload, public))?; - let (call, extra, _) = raw_payload.deconstruct(); - let address = ::Lookup::unlookup(account); - Some((call, (address, signature, extra))) - } -} - -impl frame_system::offchain::SigningTypes for Runtime { - type Public = ::Signer; - type Signature = Signature; -} - -impl frame_system::offchain::SendTransactionTypes for Runtime -where - RuntimeCall: From, -{ - type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = RuntimeCall; -} - -parameter_types! { - pub Prefix: &'static [u8] = b"Pay KSMs to the Kusama account:"; -} - -impl claims::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type VestingSchedule = Vesting; - type Prefix = Prefix; - type MoveClaimOrigin = EnsureRoot; - type WeightInfo = weights::runtime_common_claims::WeightInfo; -} - -parameter_types! { - // Minimum 100 bytes/KSM deposited (1 CENT/byte) - pub const BasicDeposit: Balance = 1000 * CENTS; // 258 bytes on-chain - pub const FieldDeposit: Balance = 250 * CENTS; // 66 bytes on-chain - pub const SubAccountDeposit: Balance = 200 * CENTS; // 53 bytes on-chain - pub const MaxSubAccounts: u32 = 100; - pub const MaxAdditionalFields: u32 = 100; - pub const MaxRegistrars: u32 = 20; -} - -impl pallet_identity::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BasicDeposit = BasicDeposit; - type FieldDeposit = FieldDeposit; - type SubAccountDeposit = SubAccountDeposit; - type MaxSubAccounts = MaxSubAccounts; - type MaxAdditionalFields = MaxAdditionalFields; - type MaxRegistrars = MaxRegistrars; - type Slashed = Treasury; - type ForceOrigin = EitherOf, GeneralAdmin>; - type RegistrarOrigin = EitherOf, GeneralAdmin>; - type WeightInfo = weights::pallet_identity::WeightInfo; -} - -impl pallet_utility::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type PalletsOrigin = OriginCaller; - type WeightInfo = weights::pallet_utility::WeightInfo; -} - -parameter_types! { - // One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes. - pub const DepositBase: Balance = deposit(1, 88); - // Additional storage item size of 32 bytes. - pub const DepositFactor: Balance = deposit(0, 32); - pub const MaxSignatories: u32 = 100; -} - -impl pallet_multisig::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type Currency = Balances; - type DepositBase = DepositBase; - type DepositFactor = DepositFactor; - type MaxSignatories = MaxSignatories; - type WeightInfo = weights::pallet_multisig::WeightInfo; -} - -parameter_types! { - pub const ConfigDepositBase: Balance = 500 * CENTS; - pub const FriendDepositFactor: Balance = 50 * CENTS; - pub const MaxFriends: u16 = 9; - pub const RecoveryDeposit: Balance = 500 * CENTS; -} - -impl pallet_recovery::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); - type RuntimeCall = RuntimeCall; - type Currency = Balances; - type ConfigDepositBase = ConfigDepositBase; - type FriendDepositFactor = FriendDepositFactor; - type MaxFriends = MaxFriends; - type RecoveryDeposit = RecoveryDeposit; -} - -parameter_types! { - pub const SocietyPalletId: PalletId = PalletId(*b"py/socie"); -} - -impl pallet_society::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type Randomness = pallet_babe::RandomnessFromOneEpochAgo; - type GraceStrikes = ConstU32<10>; - type PeriodSpend = ConstU128<{ 500 * QUID }>; - type VotingPeriod = ConstU32<{ 5 * DAYS }>; - type ClaimPeriod = ConstU32<{ 2 * DAYS }>; - type MaxLockDuration = ConstU32<{ 36 * 30 * DAYS }>; - type FounderSetOrigin = EnsureRoot; - type ChallengePeriod = ConstU32<{ 7 * DAYS }>; - type MaxPayouts = ConstU32<8>; - type MaxBids = ConstU32<512>; - type PalletId = SocietyPalletId; - type WeightInfo = weights::pallet_society::WeightInfo; -} - -parameter_types! { - pub const MinVestedTransfer: Balance = 100 * CENTS; - pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons = - WithdrawReasons::except(WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE); -} - -impl pallet_vesting::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type BlockNumberToBalance = ConvertInto; - type MinVestedTransfer = MinVestedTransfer; - type WeightInfo = weights::pallet_vesting::WeightInfo; - type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons; - const MAX_VESTING_SCHEDULES: u32 = 28; -} - -parameter_types! { - // One storage item; key size 32, value size 8; . - pub const ProxyDepositBase: Balance = deposit(1, 8); - // Additional storage item size of 33 bytes. - pub const ProxyDepositFactor: Balance = deposit(0, 33); - pub const MaxProxies: u16 = 32; - pub const AnnouncementDepositBase: Balance = deposit(1, 8); - pub const AnnouncementDepositFactor: Balance = deposit(0, 66); - pub const MaxPending: u16 = 32; -} - -/// The type used to represent the kinds of proxying allowed. -#[derive( - Copy, - Clone, - Eq, - PartialEq, - Ord, - PartialOrd, - Encode, - Decode, - RuntimeDebug, - MaxEncodedLen, - TypeInfo, -)] -pub enum ProxyType { - Any, - NonTransfer, - Governance, - Staking, - IdentityJudgement, - CancelProxy, - Auction, - Society, - NominationPools, -} - -impl Default for ProxyType { - fn default() -> Self { - Self::Any - } -} - -impl InstanceFilter for ProxyType { - fn filter(&self, c: &RuntimeCall) -> bool { - match self { - ProxyType::Any => true, - ProxyType::NonTransfer => matches!( - c, - RuntimeCall::System(..) | - RuntimeCall::Babe(..) | - RuntimeCall::Timestamp(..) | - RuntimeCall::Indices(pallet_indices::Call::claim {..}) | - RuntimeCall::Indices(pallet_indices::Call::free {..}) | - RuntimeCall::Indices(pallet_indices::Call::freeze {..}) | - // Specifically omitting Indices `transfer`, `force_transfer` - // Specifically omitting the entire Balances pallet - RuntimeCall::Staking(..) | - RuntimeCall::Session(..) | - RuntimeCall::Grandpa(..) | - RuntimeCall::ImOnline(..) | - RuntimeCall::Treasury(..) | - RuntimeCall::Bounties(..) | - RuntimeCall::ChildBounties(..) | - RuntimeCall::ConvictionVoting(..) | - RuntimeCall::Referenda(..) | - RuntimeCall::FellowshipCollective(..) | - RuntimeCall::FellowshipReferenda(..) | - RuntimeCall::Whitelist(..) | - RuntimeCall::Claims(..) | - RuntimeCall::Utility(..) | - RuntimeCall::Identity(..) | - RuntimeCall::Society(..) | - RuntimeCall::Recovery(pallet_recovery::Call::as_recovered {..}) | - RuntimeCall::Recovery(pallet_recovery::Call::vouch_recovery {..}) | - RuntimeCall::Recovery(pallet_recovery::Call::claim_recovery {..}) | - RuntimeCall::Recovery(pallet_recovery::Call::close_recovery {..}) | - RuntimeCall::Recovery(pallet_recovery::Call::remove_recovery {..}) | - RuntimeCall::Recovery(pallet_recovery::Call::cancel_recovered {..}) | - // Specifically omitting Recovery `create_recovery`, `initiate_recovery` - RuntimeCall::Vesting(pallet_vesting::Call::vest {..}) | - RuntimeCall::Vesting(pallet_vesting::Call::vest_other {..}) | - // Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer` - RuntimeCall::Scheduler(..) | - RuntimeCall::Proxy(..) | - RuntimeCall::Multisig(..) | - RuntimeCall::Nis(..) | - RuntimeCall::Registrar(paras_registrar::Call::register {..}) | - RuntimeCall::Registrar(paras_registrar::Call::deregister {..}) | - // Specifically omitting Registrar `swap` - RuntimeCall::Registrar(paras_registrar::Call::reserve {..}) | - RuntimeCall::Crowdloan(..) | - RuntimeCall::Slots(..) | - RuntimeCall::Auctions(..) | // Specifically omitting the entire XCM Pallet - RuntimeCall::VoterList(..) | - RuntimeCall::NominationPools(..) | - RuntimeCall::FastUnstake(..) - ), - ProxyType::Governance => matches!( - c, - RuntimeCall::Treasury(..) | - RuntimeCall::Bounties(..) | - RuntimeCall::Utility(..) | - RuntimeCall::ChildBounties(..) | - // OpenGov calls - RuntimeCall::ConvictionVoting(..) | - RuntimeCall::Referenda(..) | - RuntimeCall::FellowshipCollective(..) | - RuntimeCall::FellowshipReferenda(..) | - RuntimeCall::Whitelist(..) - ), - ProxyType::Staking => { - matches!( - c, - RuntimeCall::Staking(..) | - RuntimeCall::Session(..) | RuntimeCall::Utility(..) | - RuntimeCall::FastUnstake(..) | - RuntimeCall::VoterList(..) | - RuntimeCall::NominationPools(..) - ) - }, - ProxyType::NominationPools => { - matches!(c, RuntimeCall::NominationPools(..) | RuntimeCall::Utility(..)) - }, - ProxyType::IdentityJudgement => matches!( - c, - RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | - RuntimeCall::Utility(..) - ), - ProxyType::CancelProxy => { - matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })) - }, - ProxyType::Auction => matches!( - c, - RuntimeCall::Auctions(..) | - RuntimeCall::Crowdloan(..) | - RuntimeCall::Registrar(..) | - RuntimeCall::Slots(..) - ), - ProxyType::Society => matches!(c, RuntimeCall::Society(..)), - } - } - fn is_superset(&self, o: &Self) -> bool { - match (self, o) { - (x, y) if x == y => true, - (ProxyType::Any, _) => true, - (_, ProxyType::Any) => false, - (ProxyType::NonTransfer, _) => true, - _ => false, - } - } -} - -impl pallet_proxy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeCall = RuntimeCall; - type Currency = Balances; - type ProxyType = ProxyType; - type ProxyDepositBase = ProxyDepositBase; - type ProxyDepositFactor = ProxyDepositFactor; - type MaxProxies = MaxProxies; - type WeightInfo = weights::pallet_proxy::WeightInfo; - type MaxPending = MaxPending; - type CallHasher = BlakeTwo256; - type AnnouncementDepositBase = AnnouncementDepositBase; - type AnnouncementDepositFactor = AnnouncementDepositFactor; -} - -impl parachains_origin::Config for Runtime {} - -impl parachains_configuration::Config for Runtime { - type WeightInfo = weights::runtime_parachains_configuration::WeightInfo; -} - -impl parachains_shared::Config for Runtime {} - -impl parachains_session_info::Config for Runtime { - type ValidatorSet = Historical; -} - -impl parachains_inclusion::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type DisputesHandler = ParasDisputes; - type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; - type MessageQueue = MessageQueue; - type WeightInfo = weights::runtime_parachains_inclusion::WeightInfo; -} - -parameter_types! { - pub const ParasUnsignedPriority: TransactionPriority = TransactionPriority::max_value(); -} - -impl parachains_paras::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = weights::runtime_parachains_paras::WeightInfo; - type UnsignedPriority = ParasUnsignedPriority; - type QueueFootprinter = ParaInclusion; - type NextSessionRotation = Babe; - type OnNewHead = Registrar; -} - -parameter_types! { - /// Amount of weight that can be spent per block to service messages. - /// - /// # WARNING - /// - /// This is not a good value for para-chains since the `Scheduler` already uses up to 80% block weight. - pub MessageQueueServiceWeight: Weight = Perbill::from_percent(20) * BlockWeights::get().max_block; - pub const MessageQueueHeapSize: u32 = 65_536; - pub const MessageQueueMaxStale: u32 = 16; -} - -/// Message processor to handle any messages that were enqueued into the `MessageQueue` pallet. -pub struct MessageProcessor; -impl ProcessMessage for MessageProcessor { - type Origin = AggregateMessageOrigin; - - fn process_message( - message: &[u8], - origin: Self::Origin, - meter: &mut WeightMeter, - id: &mut [u8; 32], - ) -> Result { - let para = match origin { - AggregateMessageOrigin::Ump(UmpQueueId::Para(para)) => para, - }; - xcm_builder::ProcessXcmMessage::< - Junction, - xcm_executor::XcmExecutor, - RuntimeCall, - >::process_message(message, Junction::Parachain(para.into()), meter, id) - } -} - -impl pallet_message_queue::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Size = u32; - type HeapSize = MessageQueueHeapSize; - type MaxStale = MessageQueueMaxStale; - type ServiceWeight = MessageQueueServiceWeight; - #[cfg(not(feature = "runtime-benchmarks"))] - type MessageProcessor = MessageProcessor; - #[cfg(feature = "runtime-benchmarks")] - type MessageProcessor = - pallet_message_queue::mock_helpers::NoopMessageProcessor; - type QueueChangeHandler = ParaInclusion; - type QueuePausedQuery = (); - type WeightInfo = weights::pallet_message_queue::WeightInfo; -} - -impl parachains_dmp::Config for Runtime {} - -impl parachains_hrmp::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type RuntimeEvent = RuntimeEvent; - type ChannelManager = EitherOf, GeneralAdmin>; - type Currency = Balances; - type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; -} - -impl parachains_paras_inherent::Config for Runtime { - type WeightInfo = weights::runtime_parachains_paras_inherent::WeightInfo; -} - -impl parachains_scheduler::Config for Runtime { - type AssignmentProvider = ParaAssignmentProvider; -} - -impl parachains_assigner_parachains::Config for Runtime {} - -impl parachains_initializer::Config for Runtime { - type Randomness = pallet_babe::RandomnessFromOneEpochAgo; - type ForceOrigin = EnsureRoot; - type WeightInfo = weights::runtime_parachains_initializer::WeightInfo; -} - -impl parachains_disputes::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; - type SlashingHandler = parachains_slashing::SlashValidatorsForDisputes; - type WeightInfo = weights::runtime_parachains_disputes::WeightInfo; -} - -impl parachains_slashing::Config for Runtime { - type KeyOwnerProofSystem = Historical; - type KeyOwnerProof = - >::Proof; - type KeyOwnerIdentification = >::IdentificationTuple; - type HandleReports = parachains_slashing::SlashingReportHandler< - Self::KeyOwnerIdentification, - Offences, - ReportLongevity, - >; - type WeightInfo = weights::runtime_parachains_disputes_slashing::WeightInfo; - type BenchmarkingConfig = parachains_slashing::BenchConfig<1000>; -} - -parameter_types! { - pub const ParaDeposit: Balance = 40 * UNITS; -} - -impl paras_registrar::Config for Runtime { - type RuntimeOrigin = RuntimeOrigin; - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type OnSwap = (Crowdloan, Slots); - type ParaDeposit = ParaDeposit; - type DataDepositPerByte = DataDepositPerByte; - type WeightInfo = weights::runtime_common_paras_registrar::WeightInfo; -} - -parameter_types! { - // 6 weeks - pub LeasePeriod: BlockNumber = prod_or_fast!(6 * WEEKS, 6 * WEEKS, "KSM_LEASE_PERIOD"); -} - -impl slots::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type Registrar = Registrar; - type LeasePeriod = LeasePeriod; - type LeaseOffset = (); - type ForceOrigin = EitherOf, LeaseAdmin>; - type WeightInfo = weights::runtime_common_slots::WeightInfo; -} - -parameter_types! { - pub const CrowdloanId: PalletId = PalletId(*b"py/cfund"); - pub const OldSubmissionDeposit: Balance = 3 * GRAND; // ~ 10 KSM - pub const MinContribution: Balance = 3_000 * CENTS; // ~ .1 KSM - pub const RemoveKeysLimit: u32 = 1000; - // Allow 32 bytes for an additional memo to a crowdloan. - pub const MaxMemoLength: u8 = 32; -} - -impl crowdloan::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type PalletId = CrowdloanId; - type SubmissionDeposit = OldSubmissionDeposit; - type MinContribution = MinContribution; - type RemoveKeysLimit = RemoveKeysLimit; - type Registrar = Registrar; - type Auctioneer = Auctions; - type MaxMemoLength = MaxMemoLength; - type WeightInfo = weights::runtime_common_crowdloan::WeightInfo; -} - -parameter_types! { - // The average auction is 7 days long, so this will be 70% for ending period. - // 5 Days = 72000 Blocks @ 6 sec per block - pub const EndingPeriod: BlockNumber = 5 * DAYS; - // ~ 1000 samples per day -> ~ 20 blocks per sample -> 2 minute samples - pub const SampleLength: BlockNumber = 2 * MINUTES; -} - -impl auctions::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Leaser = Slots; - type Registrar = Registrar; - type EndingPeriod = EndingPeriod; - type SampleLength = SampleLength; - type Randomness = pallet_babe::RandomnessFromOneEpochAgo; - type InitiateOrigin = EitherOf, AuctionAdmin>; - type WeightInfo = weights::runtime_common_auctions::WeightInfo; -} - -type NisCounterpartInstance = pallet_balances::Instance2; -impl pallet_balances::Config for Runtime { - type Balance = Balance; - type DustRemoval = (); - type RuntimeEvent = RuntimeEvent; - type ExistentialDeposit = ConstU128<10_000_000_000>; // One KTC cent - type AccountStore = StorageMapShim< - pallet_balances::Account, - AccountId, - pallet_balances::AccountData, - >; - type MaxLocks = ConstU32<4>; - type MaxReserves = ConstU32<4>; - type ReserveIdentifier = [u8; 8]; - type WeightInfo = weights::pallet_balances_nis_counterpart_balances::WeightInfo; - type RuntimeHoldReason = RuntimeHoldReason; - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; -} - -parameter_types! { - pub const NisBasePeriod: BlockNumber = 7 * DAYS; - pub const MinBid: Balance = 100 * QUID; - pub MinReceipt: Perquintill = Perquintill::from_rational(1u64, 10_000_000u64); - pub const IntakePeriod: BlockNumber = 5 * MINUTES; - pub MaxIntakeWeight: Weight = MAXIMUM_BLOCK_WEIGHT / 10; - pub const ThawThrottle: (Perquintill, BlockNumber) = (Perquintill::from_percent(25), 5); - pub storage NisTarget: Perquintill = Perquintill::zero(); - pub const NisPalletId: PalletId = PalletId(*b"py/nis "); -} - -impl pallet_nis::Config for Runtime { - type WeightInfo = weights::pallet_nis::WeightInfo; - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type CurrencyBalance = Balance; - type FundOrigin = frame_system::EnsureSigned; - type Counterpart = NisCounterpartBalances; - type CounterpartAmount = WithMaximumOf>; - type Deficit = (); // Mint - type IgnoredIssuance = (); - type Target = NisTarget; - type PalletId = NisPalletId; - type QueueCount = ConstU32<500>; - type MaxQueueLen = ConstU32<1000>; - type FifoQueueLen = ConstU32<250>; - type BasePeriod = NisBasePeriod; - type MinBid = MinBid; - type MinReceipt = MinReceipt; - type IntakePeriod = IntakePeriod; - type MaxIntakeWeight = MaxIntakeWeight; - type ThawThrottle = ThawThrottle; - type RuntimeHoldReason = RuntimeHoldReason; -} - -parameter_types! { - pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls"); - pub const MaxPointsToBalance: u8 = 10; -} - -impl pallet_nomination_pools::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = weights::pallet_nomination_pools::WeightInfo; - type Currency = Balances; - type RewardCounter = FixedU128; - type BalanceToU256 = BalanceToU256; - type U256ToBalance = U256ToBalance; - type Staking = Staking; - type PostUnbondingPoolsWindow = ConstU32<4>; - type MaxMetadataLen = ConstU32<256>; - // we use the same number of allowed unlocking chunks as with staking. - type MaxUnbonding = ::MaxUnlockingChunks; - type PalletId = PoolsPalletId; - type MaxPointsToBalance = MaxPointsToBalance; -} - -parameter_types! { - // The deposit configuration for the singed migration. Specially if you want to allow any signed account to do the migration (see `SignedFilter`, these deposits should be high) - pub const MigrationSignedDepositPerItem: Balance = 1 * CENTS; - pub const MigrationSignedDepositBase: Balance = 20 * CENTS * 100; - pub const MigrationMaxKeyLen: u32 = 512; -} - -impl pallet_state_trie_migration::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type SignedDepositPerItem = MigrationSignedDepositPerItem; - type SignedDepositBase = MigrationSignedDepositBase; - type ControlOrigin = EnsureRoot; - type SignedFilter = frame_support::traits::NeverEnsureOrigin; - - // Use same weights as substrate ones. - type WeightInfo = pallet_state_trie_migration::weights::SubstrateWeight; - type MaxKeyLen = MigrationMaxKeyLen; -} - -construct_runtime! { - pub enum Runtime - { - // Basic stuff; balances is uncallable initially. - System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, - - // Babe must be before session. - Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 1, - - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, - Indices: pallet_indices::{Pallet, Call, Storage, Config, Event} = 3, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 4, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 33, - - // Consensus support. - // Authorship must be before session in order to note author in the correct session and era - // for im-online and staking. - Authorship: pallet_authorship::{Pallet, Storage} = 5, - Staking: pallet_staking::{Pallet, Call, Storage, Config, Event} = 6, - Offences: pallet_offences::{Pallet, Storage, Event} = 7, - Historical: session_historical::{Pallet} = 34, - - // BEEFY Bridges support. - Beefy: pallet_beefy::{Pallet, Call, Storage, Config, ValidateUnsigned} = 200, - // MMR leaf construction must be before session in order to have leaf contents - // refer to block consistently. see substrate issue #11797 for details. - Mmr: pallet_mmr::{Pallet, Storage} = 201, - BeefyMmrLeaf: pallet_beefy_mmr::{Pallet, Storage} = 202, - - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 8, - Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event, ValidateUnsigned} = 10, - ImOnline: pallet_im_online::{Pallet, Call, Storage, Event, ValidateUnsigned, Config} = 11, - AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config} = 12, - - // Governance stuff. - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 18, - ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event} = 20, - Referenda: pallet_referenda::{Pallet, Call, Storage, Event} = 21, -// pub type FellowshipCollectiveInstance = pallet_ranked_collective::Instance1; - FellowshipCollective: pallet_ranked_collective::::{ - Pallet, Call, Storage, Event - } = 22, -// pub type FellowshipReferendaInstance = pallet_referenda::Instance2; - FellowshipReferenda: pallet_referenda::::{ - Pallet, Call, Storage, Event - } = 23, - Origins: pallet_custom_origins::{Origin} = 43, - Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event} = 44, - - // Claims. Usable initially. - Claims: claims::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 19, - - // Utility module. - Utility: pallet_utility::{Pallet, Call, Event} = 24, - - // Less simple identity module. - Identity: pallet_identity::{Pallet, Call, Storage, Event} = 25, - - // Society module. - Society: pallet_society::{Pallet, Call, Storage, Event} = 26, - - // Social recovery module. - Recovery: pallet_recovery::{Pallet, Call, Storage, Event} = 27, - - // Vesting. Usable initially, but removed once all vesting is finished. - Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config} = 28, - - // System scheduler. - Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 29, - - // Proxy module. Late addition. - Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 30, - - // Multisig module. Late addition. - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 31, - - // Preimage registrar. - Preimage: pallet_preimage::{Pallet, Call, Storage, Event} = 32, - - // Bounties modules. - Bounties: pallet_bounties::{Pallet, Call, Storage, Event} = 35, - ChildBounties: pallet_child_bounties = 40, - - // Election pallet. Only works with staking, but placed here to maintain indices. - ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event, ValidateUnsigned} = 37, - - // NIS pallet. - Nis: pallet_nis::{Pallet, Call, Storage, Event, HoldReason} = 38, -// pub type NisCounterpartInstance = pallet_balances::Instance2; - NisCounterpartBalances: pallet_balances:: = 45, - - // Provides a semi-sorted list of nominators for staking. - VoterList: pallet_bags_list::::{Pallet, Call, Storage, Event} = 39, - - // nomination pools: extension to staking. - NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config} = 41, - - // Fast unstake pallet: extension to staking. - FastUnstake: pallet_fast_unstake = 42, - - // Parachains pallets. Start indices at 50 to leave room. - ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50, - Configuration: parachains_configuration::{Pallet, Call, Storage, Config} = 51, - ParasShared: parachains_shared::{Pallet, Call, Storage} = 52, - ParaInclusion: parachains_inclusion::{Pallet, Call, Storage, Event} = 53, - ParaInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent} = 54, - ParaScheduler: parachains_scheduler::{Pallet, Storage} = 55, - Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, - Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, - Dmp: parachains_dmp::{Pallet, Storage} = 58, - Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, - ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, - ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62, - ParasSlashing: parachains_slashing::{Pallet, Call, Storage, ValidateUnsigned} = 63, - ParaAssignmentProvider: parachains_assigner_parachains::{Pallet, Storage} = 64, - - // Parachain Onboarding Pallets. Start indices at 70 to leave room. - Registrar: paras_registrar::{Pallet, Call, Storage, Event} = 70, - Slots: slots::{Pallet, Call, Storage, Event} = 71, - Auctions: auctions::{Pallet, Call, Storage, Event} = 72, - Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 73, - - // State trie migration pallet, only temporary. - StateTrieMigration: pallet_state_trie_migration = 98, - - // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, - - // Generalized message queue - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 100, - } -} - -/// The address format for describing accounts. -pub type Address = sp_runtime::MultiAddress; -/// Block header type as expected by this runtime. -pub type Header = generic::Header; -/// Block type as expected by this runtime. -pub type Block = generic::Block; -/// A Block signed with a Justification -pub type SignedBlock = generic::SignedBlock; -/// `BlockId` type as expected by this runtime. -pub type BlockId = generic::BlockId; -/// The `SignedExtension` to the basic transaction logic. -pub type SignedExtra = ( - frame_system::CheckNonZeroSender, - frame_system::CheckSpecVersion, - frame_system::CheckTxVersion, - frame_system::CheckGenesis, - frame_system::CheckMortality, - frame_system::CheckNonce, - frame_system::CheckWeight, - pallet_transaction_payment::ChargeTransactionPayment, -); - -pub struct NominationPoolsMigrationV4OldPallet; -impl Get for NominationPoolsMigrationV4OldPallet { - fn get() -> Perbill { - Perbill::from_percent(10) - } -} - -/// All migrations that will run on the next runtime upgrade. -/// -/// This contains the combined migrations of the last 10 releases. It allows to skip runtime -/// upgrades in case governance decides to do so. THE ORDER IS IMPORTANT. -pub type Migrations = migrations::Unreleased; - -/// The runtime migrations per release. -#[allow(deprecated, missing_docs)] -pub mod migrations { - use super::*; - use frame_support::traits::LockIdentifier; - use frame_system::pallet_prelude::BlockNumberFor; - - parameter_types! { - pub const DemocracyPalletName: &'static str = "Democracy"; - pub const CouncilPalletName: &'static str = "Council"; - pub const TechnicalCommitteePalletName: &'static str = "TechnicalCommittee"; - pub const PhragmenElectionPalletName: &'static str = "PhragmenElection"; - pub const TechnicalMembershipPalletName: &'static str = "TechnicalMembership"; - pub const TipsPalletName: &'static str = "Tips"; - pub const PhragmenElectionPalletId: LockIdentifier = *b"phrelect"; - } - - // Special Config for Gov V1 pallets, allowing us to run migrations for them without - // implementing their configs on [`Runtime`]. - pub struct UnlockConfig; - impl pallet_democracy::migrations::unlock_and_unreserve_all_funds::UnlockConfig for UnlockConfig { - type Currency = Balances; - type MaxVotes = ConstU32<100>; - type MaxDeposits = ConstU32<100>; - type AccountId = AccountId; - type BlockNumber = BlockNumberFor; - type DbWeight = ::DbWeight; - type PalletName = DemocracyPalletName; - } - impl pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockConfig - for UnlockConfig - { - type Currency = Balances; - type MaxVotesPerVoter = ConstU32<16>; - type PalletId = PhragmenElectionPalletId; - type AccountId = AccountId; - type DbWeight = ::DbWeight; - type PalletName = PhragmenElectionPalletName; - } - impl pallet_tips::migrations::unreserve_deposits::UnlockConfig<()> for UnlockConfig { - type Currency = Balances; - type Hash = Hash; - type DataDepositPerByte = DataDepositPerByte; - type TipReportDepositBase = TipReportDepositBase; - type AccountId = AccountId; - type BlockNumber = BlockNumberFor; - type DbWeight = ::DbWeight; - type PalletName = TipsPalletName; - } - - /// Upgrade Session keys to include BEEFY key. - /// When this is removed, should also remove `OldSessionKeys`. - pub struct UpgradeSessionKeys; - impl frame_support::traits::OnRuntimeUpgrade for UpgradeSessionKeys { - fn on_runtime_upgrade() -> Weight { - Session::upgrade_keys::(transform_session_keys); - Perbill::from_percent(50) * BlockWeights::get().max_block - } - } - - pub struct ParachainsToUnlock; - impl Contains for ParachainsToUnlock { - fn contains(id: &ParaId) -> bool { - let id: u32 = (*id).into(); - // ksuama parachains/parathreads that are locked and never produced block - match id { - 2003 | 2008 | 2018 | 2077 | 2089 | 2111 | 2112 | 2120 | 2126 | 2127 | 2130 | - 2226 | 2227 | 2231 | 2233 | 2237 | 2256 | 2257 | 2261 | 2268 | 2275 => true, - _ => false, - } - } - } - - /// Unreleased migrations. Add new ones here: - pub type Unreleased = ( - init_state_migration::InitMigrate, - pallet_society::migrations::v2::versioned::MigrateV0ToV2< - Runtime, - (), - past_payouts::PastPayouts, - >, - pallet_im_online::migration::v1::Migration, - parachains_configuration::migration::v7::MigrateToV7, - parachains_scheduler::migration::v1::MigrateToV1, - parachains_configuration::migration::v8::MigrateToV8, - - // Unlock/unreserve balances from Gov v1 pallets that hold them - // https://github.com/paritytech/polkadot/issues/6749 - pallet_elections_phragmen::migrations::unlock_and_unreserve_all_funds::UnlockAndUnreserveAllFunds, - pallet_democracy::migrations::unlock_and_unreserve_all_funds::UnlockAndUnreserveAllFunds, - pallet_tips::migrations::unreserve_deposits::UnreserveDeposits, - - // Delete storage key/values from all Gov v1 pallets - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - frame_support::migrations::RemovePallet::DbWeight>, - - // Upgrade SessionKeys to include BEEFY key - UpgradeSessionKeys, - - parachains_configuration::migration::v9::MigrateToV9, - // Migrate parachain info format - paras_registrar::migration::v1::versioned::MigrateV0ToV1, - ); -} - -/// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = - generic::UncheckedExtrinsic; -/// Executive: handles dispatch to the various modules. -pub type Executive = frame_executive::Executive< - Runtime, - Block, - frame_system::ChainContext, - Runtime, - AllPalletsWithSystem, - Migrations, ->; -/// The payload being signed in the transactions. -pub type SignedPayload = generic::SignedPayload; - -#[cfg(feature = "runtime-benchmarks")] -mod benches { - frame_benchmarking::define_benchmarks!( - // Polkadot - // NOTE: Make sure to prefix these with `runtime_common::` so - // that the path resolves correctly in the generated file. - [runtime_common::auctions, Auctions] - [runtime_common::crowdloan, Crowdloan] - [runtime_common::claims, Claims] - [runtime_common::slots, Slots] - [runtime_common::paras_registrar, Registrar] - [runtime_parachains::configuration, Configuration] - [runtime_parachains::hrmp, Hrmp] - [runtime_parachains::disputes, ParasDisputes] - [runtime_parachains::disputes::slashing, ParasSlashing] - [runtime_parachains::inclusion, ParaInclusion] - [runtime_parachains::initializer, Initializer] - [runtime_parachains::paras_inherent, ParaInherent] - [runtime_parachains::paras, Paras] - // Substrate - [pallet_balances, Balances] - [pallet_balances, NisCounterpartBalances] - [pallet_bags_list, VoterList] - [frame_benchmarking::baseline, Baseline::] - [pallet_bounties, Bounties] - [pallet_child_bounties, ChildBounties] - [pallet_conviction_voting, ConvictionVoting] - [pallet_election_provider_multi_phase, ElectionProviderMultiPhase] - [frame_election_provider_support, ElectionProviderBench::] - [pallet_fast_unstake, FastUnstake] - [pallet_nis, Nis] - [pallet_identity, Identity] - [pallet_im_online, ImOnline] - [pallet_indices, Indices] - [pallet_message_queue, MessageQueue] - [pallet_multisig, Multisig] - [pallet_nomination_pools, NominationPoolsBench::] - [pallet_offences, OffencesBench::] - [pallet_preimage, Preimage] - [pallet_proxy, Proxy] - [pallet_ranked_collective, FellowshipCollective] - [pallet_recovery, Recovery] - [pallet_referenda, Referenda] - [pallet_referenda, FellowshipReferenda] - [pallet_scheduler, Scheduler] - [pallet_session, SessionBench::] - [pallet_society, Society] - [pallet_staking, Staking] - [frame_system, SystemBench::] - [pallet_timestamp, Timestamp] - [pallet_treasury, Treasury] - [pallet_utility, Utility] - [pallet_vesting, Vesting] - [pallet_whitelist, Whitelist] - // XCM - [pallet_xcm, XcmPallet] - [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] - [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] - ); -} - -sp_api::impl_runtime_apis! { - impl sp_api::Core for Runtime { - fn version() -> RuntimeVersion { - VERSION - } - - fn execute_block(block: Block) { - Executive::execute_block(block); - } - - fn initialize_block(header: &::Header) { - Executive::initialize_block(header) - } - } - - impl sp_api::Metadata for Runtime { - fn metadata() -> OpaqueMetadata { - OpaqueMetadata::new(Runtime::metadata().into()) - } - - fn metadata_at_version(version: u32) -> Option { - Runtime::metadata_at_version(version) - } - - fn metadata_versions() -> sp_std::vec::Vec { - Runtime::metadata_versions() - } - } - - impl block_builder_api::BlockBuilder for Runtime { - fn apply_extrinsic(extrinsic: ::Extrinsic) -> ApplyExtrinsicResult { - Executive::apply_extrinsic(extrinsic) - } - - fn finalize_block() -> ::Header { - Executive::finalize_block() - } - - fn inherent_extrinsics(data: inherents::InherentData) -> Vec<::Extrinsic> { - data.create_extrinsics() - } - - fn check_inherents( - block: Block, - data: inherents::InherentData, - ) -> inherents::CheckInherentsResult { - data.check_extrinsics(&block) - } - } - - impl tx_pool_api::runtime_api::TaggedTransactionQueue for Runtime { - fn validate_transaction( - source: TransactionSource, - tx: ::Extrinsic, - block_hash: ::Hash, - ) -> TransactionValidity { - Executive::validate_transaction(source, tx, block_hash) - } - } - - impl offchain_primitives::OffchainWorkerApi for Runtime { - fn offchain_worker(header: &::Header) { - Executive::offchain_worker(header) - } - } - - impl primitives::runtime_api::ParachainHost for Runtime { - fn validators() -> Vec { - parachains_runtime_api_impl::validators::() - } - - fn validator_groups() -> (Vec>, GroupRotationInfo) { - parachains_runtime_api_impl::validator_groups::() - } - - fn availability_cores() -> Vec> { - parachains_runtime_api_impl::availability_cores::() - } - - fn persisted_validation_data(para_id: ParaId, assumption: OccupiedCoreAssumption) - -> Option> { - parachains_runtime_api_impl::persisted_validation_data::(para_id, assumption) - } - - fn assumed_validation_data( - para_id: ParaId, - expected_persisted_validation_data_hash: Hash, - ) -> Option<(PersistedValidationData, ValidationCodeHash)> { - parachains_runtime_api_impl::assumed_validation_data::( - para_id, - expected_persisted_validation_data_hash, - ) - } - - fn check_validation_outputs( - para_id: ParaId, - outputs: primitives::CandidateCommitments, - ) -> bool { - parachains_runtime_api_impl::check_validation_outputs::(para_id, outputs) - } - - fn session_index_for_child() -> SessionIndex { - parachains_runtime_api_impl::session_index_for_child::() - } - - fn validation_code(para_id: ParaId, assumption: OccupiedCoreAssumption) - -> Option { - parachains_runtime_api_impl::validation_code::(para_id, assumption) - } - - fn candidate_pending_availability(para_id: ParaId) -> Option> { - parachains_runtime_api_impl::candidate_pending_availability::(para_id) - } - - fn candidate_events() -> Vec> { - parachains_runtime_api_impl::candidate_events::(|ev| { - match ev { - RuntimeEvent::ParaInclusion(ev) => { - Some(ev) - } - _ => None, - } - }) - } - - fn session_info(index: SessionIndex) -> Option { - parachains_runtime_api_impl::session_info::(index) - } - - fn session_executor_params(session_index: SessionIndex) -> Option { - parachains_runtime_api_impl::session_executor_params::(session_index) - } - - fn dmq_contents(recipient: ParaId) -> Vec> { - parachains_runtime_api_impl::dmq_contents::(recipient) - } - - fn inbound_hrmp_channels_contents( - recipient: ParaId - ) -> BTreeMap>> { - parachains_runtime_api_impl::inbound_hrmp_channels_contents::(recipient) - } - - fn validation_code_by_hash(hash: ValidationCodeHash) -> Option { - parachains_runtime_api_impl::validation_code_by_hash::(hash) - } - - fn on_chain_votes() -> Option> { - parachains_runtime_api_impl::on_chain_votes::() - } - - fn submit_pvf_check_statement( - stmt: primitives::PvfCheckStatement, - signature: primitives::ValidatorSignature, - ) { - parachains_runtime_api_impl::submit_pvf_check_statement::(stmt, signature) - } - - fn pvfs_require_precheck() -> Vec { - parachains_runtime_api_impl::pvfs_require_precheck::() - } - - fn validation_code_hash(para_id: ParaId, assumption: OccupiedCoreAssumption) - -> Option - { - parachains_runtime_api_impl::validation_code_hash::(para_id, assumption) - } - - fn disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState)> { - parachains_runtime_api_impl::get_session_disputes::() - } - - fn unapplied_slashes( - ) -> Vec<(SessionIndex, CandidateHash, slashing::PendingSlashes)> { - parachains_runtime_api_impl::unapplied_slashes::() - } - - fn key_ownership_proof( - validator_id: ValidatorId, - ) -> Option { - use parity_scale_codec::Encode; - - Historical::prove((PARACHAIN_KEY_TYPE_ID, validator_id)) - .map(|p| p.encode()) - .map(slashing::OpaqueKeyOwnershipProof::new) - } - - fn submit_report_dispute_lost( - dispute_proof: slashing::DisputeProof, - key_ownership_proof: slashing::OpaqueKeyOwnershipProof, - ) -> Option<()> { - parachains_runtime_api_impl::submit_unsigned_slashing_report::( - dispute_proof, - key_ownership_proof, - ) - } - } - - impl beefy_primitives::BeefyApi for Runtime { - fn beefy_genesis() -> Option { - Beefy::genesis_block() - } - - fn validator_set() -> Option> { - Beefy::validator_set() - } - - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: beefy_primitives::EquivocationProof< - BlockNumber, - BeefyId, - BeefySignature, - >, - key_owner_proof: beefy_primitives::OpaqueKeyOwnershipProof, - ) -> Option<()> { - let key_owner_proof = key_owner_proof.decode()?; - - Beefy::submit_unsigned_equivocation_report( - equivocation_proof, - key_owner_proof, - ) - } - - fn generate_key_ownership_proof( - _set_id: beefy_primitives::ValidatorSetId, - authority_id: BeefyId, - ) -> Option { - use parity_scale_codec::Encode; - - Historical::prove((beefy_primitives::KEY_TYPE, authority_id)) - .map(|p| p.encode()) - .map(beefy_primitives::OpaqueKeyOwnershipProof::new) - } - } - - impl mmr::MmrApi for Runtime { - fn mmr_root() -> Result { - Ok(Mmr::mmr_root()) - } - - fn mmr_leaf_count() -> Result { - Ok(Mmr::mmr_leaves()) - } - - fn generate_proof( - block_numbers: Vec, - best_known_block_number: Option, - ) -> Result<(Vec, mmr::Proof), mmr::Error> { - Mmr::generate_proof(block_numbers, best_known_block_number).map( - |(leaves, proof)| { - ( - leaves - .into_iter() - .map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf)) - .collect(), - proof, - ) - }, - ) - } - - fn verify_proof(leaves: Vec, proof: mmr::Proof) - -> Result<(), mmr::Error> - { - let leaves = leaves.into_iter().map(|leaf| - leaf.into_opaque_leaf() - .try_decode() - .ok_or(mmr::Error::Verify)).collect::, mmr::Error>>()?; - Mmr::verify_leaves(leaves, proof) - } - - fn verify_proof_stateless( - root: mmr::Hash, - leaves: Vec, - proof: mmr::Proof - ) -> Result<(), mmr::Error> { - let nodes = leaves.into_iter().map(|leaf|mmr::DataOrHash::Data(leaf.into_opaque_leaf())).collect(); - pallet_mmr::verify_leaves_proof::(root, nodes, proof) - } - } - - impl pallet_beefy_mmr::BeefyMmrApi for RuntimeApi { - fn authority_set_proof() -> beefy_primitives::mmr::BeefyAuthoritySet { - BeefyMmrLeaf::authority_set_proof() - } - - fn next_authority_set_proof() -> beefy_primitives::mmr::BeefyNextAuthoritySet { - BeefyMmrLeaf::next_authority_set_proof() - } - } - - impl fg_primitives::GrandpaApi for Runtime { - fn grandpa_authorities() -> Vec<(GrandpaId, u64)> { - Grandpa::grandpa_authorities() - } - - fn current_set_id() -> fg_primitives::SetId { - Grandpa::current_set_id() - } - - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: fg_primitives::EquivocationProof< - ::Hash, - sp_runtime::traits::NumberFor, - >, - key_owner_proof: fg_primitives::OpaqueKeyOwnershipProof, - ) -> Option<()> { - let key_owner_proof = key_owner_proof.decode()?; - - Grandpa::submit_unsigned_equivocation_report( - equivocation_proof, - key_owner_proof, - ) - } - - fn generate_key_ownership_proof( - _set_id: fg_primitives::SetId, - authority_id: fg_primitives::AuthorityId, - ) -> Option { - use parity_scale_codec::Encode; - - Historical::prove((fg_primitives::KEY_TYPE, authority_id)) - .map(|p| p.encode()) - .map(fg_primitives::OpaqueKeyOwnershipProof::new) - } - } - - impl babe_primitives::BabeApi for Runtime { - fn configuration() -> babe_primitives::BabeConfiguration { - let epoch_config = Babe::epoch_config().unwrap_or(BABE_GENESIS_EPOCH_CONFIG); - babe_primitives::BabeConfiguration { - slot_duration: Babe::slot_duration(), - epoch_length: EpochDuration::get(), - c: epoch_config.c, - authorities: Babe::authorities().to_vec(), - randomness: Babe::randomness(), - allowed_slots: epoch_config.allowed_slots, - } - } - - fn current_epoch_start() -> babe_primitives::Slot { - Babe::current_epoch_start() - } - - fn current_epoch() -> babe_primitives::Epoch { - Babe::current_epoch() - } - - fn next_epoch() -> babe_primitives::Epoch { - Babe::next_epoch() - } - - fn generate_key_ownership_proof( - _slot: babe_primitives::Slot, - authority_id: babe_primitives::AuthorityId, - ) -> Option { - use parity_scale_codec::Encode; - - Historical::prove((babe_primitives::KEY_TYPE, authority_id)) - .map(|p| p.encode()) - .map(babe_primitives::OpaqueKeyOwnershipProof::new) - } - - fn submit_report_equivocation_unsigned_extrinsic( - equivocation_proof: babe_primitives::EquivocationProof<::Header>, - key_owner_proof: babe_primitives::OpaqueKeyOwnershipProof, - ) -> Option<()> { - let key_owner_proof = key_owner_proof.decode()?; - - Babe::submit_unsigned_equivocation_report( - equivocation_proof, - key_owner_proof, - ) - } - } - - impl authority_discovery_primitives::AuthorityDiscoveryApi for Runtime { - fn authorities() -> Vec { - parachains_runtime_api_impl::relevant_authority_ids::() - } - } - - impl sp_session::SessionKeys for Runtime { - fn generate_session_keys(seed: Option>) -> Vec { - SessionKeys::generate(seed) - } - - fn decode_session_keys( - encoded: Vec, - ) -> Option, sp_core::crypto::KeyTypeId)>> { - SessionKeys::decode_into_raw_public_keys(&encoded) - } - } - - impl frame_system_rpc_runtime_api::AccountNonceApi for Runtime { - fn account_nonce(account: AccountId) -> Nonce { - System::account_nonce(account) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi< - Block, - Balance, - > for Runtime { - fn query_info(uxt: ::Extrinsic, len: u32) -> RuntimeDispatchInfo { - TransactionPayment::query_info(uxt, len) - } - fn query_fee_details(uxt: ::Extrinsic, len: u32) -> FeeDetails { - TransactionPayment::query_fee_details(uxt, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi - for Runtime - { - fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo { - TransactionPayment::query_call_info(call, len) - } - fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails { - TransactionPayment::query_call_fee_details(call, len) - } - fn query_weight_to_fee(weight: Weight) -> Balance { - TransactionPayment::weight_to_fee(weight) - } - fn query_length_to_fee(length: u32) -> Balance { - TransactionPayment::length_to_fee(length) - } - } - - impl pallet_nomination_pools_runtime_api::NominationPoolsApi< - Block, - AccountId, - Balance, - > for Runtime { - fn pending_rewards(member: AccountId) -> Balance { - NominationPools::api_pending_rewards(member).unwrap_or_default() - } - - fn points_to_balance(pool_id: pallet_nomination_pools::PoolId, points: Balance) -> Balance { - NominationPools::api_points_to_balance(pool_id, points) - } - - fn balance_to_points(pool_id: pallet_nomination_pools::PoolId, new_funds: Balance) -> Balance { - NominationPools::api_balance_to_points(pool_id, new_funds) - } - } - - impl pallet_staking_runtime_api::StakingApi for Runtime { - fn nominations_quota(balance: Balance) -> u32 { - Staking::api_nominations_quota(balance) - } - } - - #[cfg(feature = "try-runtime")] - impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { - log::info!("try-runtime::on_runtime_upgrade kusama."); - let weight = Executive::try_runtime_upgrade(checks).unwrap(); - (weight, BlockWeights::get().max_block) - } - - fn execute_block( - block: Block, - state_root_check: bool, - signature_check: bool, - select: frame_try_runtime::TryStateSelect, - ) -> Weight { - // NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to - // have a backtrace here. - Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap() - } - } - - #[cfg(feature = "runtime-benchmarks")] - impl frame_benchmarking::Benchmark for Runtime { - fn benchmark_metadata(extra: bool) -> ( - Vec, - Vec, - ) { - use frame_benchmarking::{Benchmarking, BenchmarkList}; - use frame_support::traits::StorageInfoTrait; - - use pallet_session_benchmarking::Pallet as SessionBench; - use pallet_offences_benchmarking::Pallet as OffencesBench; - use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench; - use frame_system_benchmarking::Pallet as SystemBench; - use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; - use frame_benchmarking::baseline::Pallet as Baseline; - - let mut list = Vec::::new(); - list_benchmarks!(list, extra); - - let storage_info = AllPalletsWithSystem::storage_info(); - return (list, storage_info) - } - - fn dispatch_benchmark( - config: frame_benchmarking::BenchmarkConfig - ) -> Result< - Vec, - sp_runtime::RuntimeString, - > { - use frame_support::traits::WhitelistedStorageKeys; - use frame_benchmarking::{Benchmarking, BenchmarkBatch, BenchmarkError}; - use sp_storage::TrackedStorageKey; - // Trying to add benchmarks directly to some pallets caused cyclic dependency issues. - // To get around that, we separated the benchmarks into its own crate. - use pallet_session_benchmarking::Pallet as SessionBench; - use pallet_offences_benchmarking::Pallet as OffencesBench; - use pallet_election_provider_support_benchmarking::Pallet as ElectionProviderBench; - use frame_system_benchmarking::Pallet as SystemBench; - use pallet_nomination_pools_benchmarking::Pallet as NominationPoolsBench; - use frame_benchmarking::baseline::Pallet as Baseline; - use xcm::latest::prelude::*; - use xcm_config::{ - LocalCheckAccount, SovereignAccountOf, Statemine, TokenLocation, XcmConfig, - }; - - impl pallet_session_benchmarking::Config for Runtime {} - impl pallet_offences_benchmarking::Config for Runtime {} - impl pallet_election_provider_support_benchmarking::Config for Runtime {} - impl frame_system_benchmarking::Config for Runtime {} - impl frame_benchmarking::baseline::Config for Runtime {} - impl pallet_nomination_pools_benchmarking::Config for Runtime {} - impl runtime_parachains::disputes::slashing::benchmarking::Config for Runtime {} - - impl pallet_xcm_benchmarks::Config for Runtime { - type XcmConfig = XcmConfig; - type AccountIdConverter = SovereignAccountOf; - fn valid_destination() -> Result { - Ok(Statemine::get()) - } - fn worst_case_holding(_depositable_count: u32) -> MultiAssets { - // Kusama only knows about KSM. - vec![MultiAsset{ - id: Concrete(TokenLocation::get()), - fun: Fungible(1_000_000 * UNITS), - }].into() - } - } - - parameter_types! { - pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some(( - Statemine::get(), - MultiAsset { fun: Fungible(1 * UNITS), id: Concrete(TokenLocation::get()) }, - )); - pub const TrustedReserve: Option<(MultiLocation, MultiAsset)> = None; - } - - impl pallet_xcm_benchmarks::fungible::Config for Runtime { - type TransactAsset = Balances; - - type CheckedAccount = LocalCheckAccount; - type TrustedTeleporter = TrustedTeleporter; - type TrustedReserve = TrustedReserve; - - fn get_multi_asset() -> MultiAsset { - MultiAsset { - id: Concrete(TokenLocation::get()), - fun: Fungible(1 * UNITS), - } - } - } - - impl pallet_xcm_benchmarks::generic::Config for Runtime { - type RuntimeCall = RuntimeCall; - - fn worst_case_response() -> (u64, Response) { - (0u64, Response::Version(Default::default())) - } - - fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError> { - // Kusama doesn't support asset exchanges - Err(BenchmarkError::Skip) - } - - fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> { - // The XCM executor of Kusama doesn't have a configured `UniversalAliases` - Err(BenchmarkError::Skip) - } - - fn transact_origin_and_runtime_call() -> Result<(MultiLocation, RuntimeCall), BenchmarkError> { - Ok((Statemine::get(), frame_system::Call::remark_with_event { remark: vec![] }.into())) - } - - fn subscribe_origin() -> Result { - Ok(Statemine::get()) - } - - fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError> { - let origin = Statemine::get(); - let assets: MultiAssets = (Concrete(TokenLocation::get()), 1_000 * UNITS).into(); - let ticket = MultiLocation { parents: 0, interior: Here }; - Ok((origin, ticket, assets)) - } - - fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { - // Kusama doesn't support asset locking - Err(BenchmarkError::Skip) - } - - fn export_message_origin_and_destination( - ) -> Result<(MultiLocation, NetworkId, InteriorMultiLocation), BenchmarkError> { - // Kusama doesn't support exporting messages - Err(BenchmarkError::Skip) - } - - fn alias_origin() -> Result<(MultiLocation, MultiLocation), BenchmarkError> { - // The XCM executor of Kusama doesn't have a configured `Aliasers` - Err(BenchmarkError::Skip) - } - } - - let mut whitelist: Vec = AllPalletsWithSystem::whitelisted_storage_keys(); - let treasury_key = frame_system::Account::::hashed_key_for(Treasury::account_id()); - whitelist.push(treasury_key.to_vec().into()); - - let mut batches = Vec::::new(); - let params = (&config, &whitelist); - - add_benchmarks!(params, batches); - - Ok(batches) - } - } -} - -#[cfg(test)] -mod fees_tests { - use super::*; - use sp_runtime::assert_eq_error_rate; - - #[test] - fn signed_deposit_is_sensible() { - // ensure this number does not change, or that it is checked after each change. - // a 1 MB solution should need around 0.16 KSM deposit - let deposit = SignedDepositBase::get() + (SignedDepositByte::get() * 1024 * 1024); - assert_eq_error_rate!(deposit, UNITS * 167 / 100, UNITS / 100); - } -} - -#[cfg(test)] -mod multiplier_tests { - use super::*; - use frame_support::{dispatch::DispatchInfo, traits::OnFinalize}; - use runtime_common::{MinimumMultiplier, TargetBlockFullness}; - use separator::Separatable; - use sp_runtime::traits::Convert; - - fn run_with_system_weight(w: Weight, mut assertions: F) - where - F: FnMut() -> (), - { - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() - .build_storage() - .unwrap() - .into(); - t.execute_with(|| { - System::set_block_consumed_resources(w, 0); - assertions() - }); - } - - #[test] - fn multiplier_can_grow_from_zero() { - let minimum_multiplier = MinimumMultiplier::get(); - let target = TargetBlockFullness::get() * - BlockWeights::get().get(DispatchClass::Normal).max_total.unwrap(); - // if the min is too small, then this will not change, and we are doomed forever. - // the weight is 1/100th bigger than target. - run_with_system_weight(target.saturating_mul(101) / 100, || { - let next = SlowAdjustingFeeUpdate::::convert(minimum_multiplier); - assert!(next > minimum_multiplier, "{:?} !>= {:?}", next, minimum_multiplier); - }) - } - - #[test] - fn fast_unstake_estimate() { - use pallet_fast_unstake::WeightInfo; - let block_time = BlockWeights::get().max_block.ref_time() as f32; - let on_idle = weights::pallet_fast_unstake::WeightInfo::::on_idle_check( - 1000, - ::BatchSize::get(), - ) - .ref_time() as f32; - println!("ratio of block weight for full batch fast-unstake {}", on_idle / block_time); - assert!(on_idle / block_time <= 0.5f32) - } - - #[test] - #[ignore] - fn multiplier_growth_simulator() { - // assume the multiplier is initially set to its minimum. We update it with values twice the - //target (target is 25%, thus 50%) and we see at which point it reaches 1. - let mut multiplier = MinimumMultiplier::get(); - let block_weight = BlockWeights::get().get(DispatchClass::Normal).max_total.unwrap(); - let mut blocks = 0; - let mut fees_paid = 0; - - frame_system::Pallet::::set_block_consumed_resources(Weight::MAX, 0); - let info = DispatchInfo { weight: Weight::MAX, ..Default::default() }; - - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() - .build_storage() - .unwrap() - .into(); - // set the minimum - t.execute_with(|| { - pallet_transaction_payment::NextFeeMultiplier::::set(MinimumMultiplier::get()); - }); - - while multiplier <= Multiplier::from_u32(1) { - t.execute_with(|| { - // imagine this tx was called. - let fee = TransactionPayment::compute_fee(0, &info, 0); - fees_paid += fee; - - // this will update the multiplier. - System::set_block_consumed_resources(block_weight, 0); - TransactionPayment::on_finalize(1); - let next = TransactionPayment::next_fee_multiplier(); - - assert!(next > multiplier, "{:?} !>= {:?}", next, multiplier); - multiplier = next; - - println!( - "block = {} / multiplier {:?} / fee = {:?} / fess so far {:?}", - blocks, - multiplier, - fee.separated_string(), - fees_paid.separated_string() - ); - }); - blocks += 1; - } - } - - #[test] - #[ignore] - fn multiplier_cool_down_simulator() { - // assume the multiplier is initially set to its minimum. We update it with values twice the - //target (target is 25%, thus 50%) and we see at which point it reaches 1. - let mut multiplier = Multiplier::from_u32(2); - let mut blocks = 0; - - let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::::default() - .build_storage() - .unwrap() - .into(); - // set the minimum - t.execute_with(|| { - pallet_transaction_payment::NextFeeMultiplier::::set(multiplier); - }); - - while multiplier > Multiplier::from_u32(0) { - t.execute_with(|| { - // this will update the multiplier. - TransactionPayment::on_finalize(1); - let next = TransactionPayment::next_fee_multiplier(); - - assert!(next < multiplier, "{:?} !>= {:?}", next, multiplier); - multiplier = next; - - println!("block = {} / multiplier {:?}", blocks, multiplier); - }); - blocks += 1; - } - } -} - -#[cfg(all(test, feature = "try-runtime"))] -mod remote_tests { - use super::*; - use frame_try_runtime::{runtime_decl_for_try_runtime::TryRuntime, UpgradeCheckSelect}; - use remote_externalities::{ - Builder, Mode, OfflineConfig, OnlineConfig, SnapshotConfig, Transport, - }; - use std::env::var; - - #[tokio::test] - async fn run_migrations() { - if var("RUN_MIGRATION_TESTS").is_err() { - return - } - - sp_tracing::try_init_simple(); - let transport: Transport = - var("WS").unwrap_or("wss://kusama-rpc.polkadot.io:443".to_string()).into(); - let maybe_state_snapshot: Option = var("SNAP").map(|s| s.into()).ok(); - let mut ext = Builder::::default() - .mode(if let Some(state_snapshot) = maybe_state_snapshot { - Mode::OfflineOrElseOnline( - OfflineConfig { state_snapshot: state_snapshot.clone() }, - OnlineConfig { - transport, - state_snapshot: Some(state_snapshot), - ..Default::default() - }, - ) - } else { - Mode::Online(OnlineConfig { transport, ..Default::default() }) - }) - .build() - .await - .unwrap(); - ext.execute_with(|| Runtime::on_runtime_upgrade(UpgradeCheckSelect::PreAndPost)); - } - - #[tokio::test] - #[ignore = "this test is meant to be executed manually"] - async fn try_fast_unstake_all() { - sp_tracing::try_init_simple(); - let transport: Transport = - var("WS").unwrap_or("wss://kusama-rpc.polkadot.io:443".to_string()).into(); - let maybe_state_snapshot: Option = var("SNAP").map(|s| s.into()).ok(); - let mut ext = Builder::::default() - .mode(if let Some(state_snapshot) = maybe_state_snapshot { - Mode::OfflineOrElseOnline( - OfflineConfig { state_snapshot: state_snapshot.clone() }, - OnlineConfig { - transport, - state_snapshot: Some(state_snapshot), - ..Default::default() - }, - ) - } else { - Mode::Online(OnlineConfig { transport, ..Default::default() }) - }) - .build() - .await - .unwrap(); - ext.execute_with(|| { - pallet_fast_unstake::ErasToCheckPerBlock::::put(1); - runtime_common::try_runtime::migrate_all_inactive_nominators::() - }); - } -} - -mod init_state_migration { - use super::Runtime; - use frame_support::traits::OnRuntimeUpgrade; - use pallet_state_trie_migration::{AutoLimits, MigrationLimits, MigrationProcess}; - #[cfg(feature = "try-runtime")] - use sp_runtime::DispatchError; - #[cfg(not(feature = "std"))] - use sp_std::prelude::*; - - /// Initialize an automatic migration process. - pub struct InitMigrate; - impl OnRuntimeUpgrade for InitMigrate { - #[cfg(feature = "try-runtime")] - fn pre_upgrade() -> Result, DispatchError> { - frame_support::ensure!( - AutoLimits::::get().is_none(), - DispatchError::Other("Automigration already started.") - ); - Ok(Default::default()) - } - - fn on_runtime_upgrade() -> frame_support::weights::Weight { - if MigrationProcess::::get() == Default::default() && - AutoLimits::::get().is_none() - { - // We use limits to target 600ko proofs per block and - // avg 800_000_000_000 of weight per block. - // See spreadsheet 4800_400 in - // https://raw.githubusercontent.com/cheme/substrate/try-runtime-mig/ksm.ods - AutoLimits::::put(Some(MigrationLimits { item: 4_800, size: 204800 * 2 })); - log::info!("Automatic trie migration started."); - ::DbWeight::get().reads_writes(2, 1) - } else { - log::info!("Automatic trie migration not started."); - ::DbWeight::get().reads(2) - } - } - - #[cfg(feature = "try-runtime")] - fn post_upgrade(_state: Vec) -> Result<(), DispatchError> { - frame_support::ensure!( - AutoLimits::::get().is_some(), - DispatchError::Other("Automigration started.") - ); - Ok(()) - } - } -} From 7a23c5fa7af04f77d1507378896a8fbce1940753 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 29 Nov 2023 18:24:16 +0400 Subject: [PATCH 55/98] update cargo.lock --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index eca5242e71a7..d9a6b8eb1561 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12574,7 +12574,7 @@ dependencies = [ "async-trait", "bridge-hub-rococo-runtime", "bridge-hub-westend-runtime", - "clap 4.4.6", + "clap 4.4.10", "collectives-westend-runtime", "color-print", "contracts-rococo-runtime", From c120f4722bdbb46f76fe3e31f65260ab52ac4c7b Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 29 Nov 2023 18:26:52 +0400 Subject: [PATCH 56/98] fix build --- substrate/frame/examples/storage-migrations/src/mock.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/substrate/frame/examples/storage-migrations/src/mock.rs b/substrate/frame/examples/storage-migrations/src/mock.rs index 17aecf2c94a3..f42d201bd607 100644 --- a/substrate/frame/examples/storage-migrations/src/mock.rs +++ b/substrate/frame/examples/storage-migrations/src/mock.rs @@ -42,6 +42,8 @@ impl frame_system::Config for MockRuntime { } impl pallet_balances::Config for MockRuntime { + type RuntimeHoldReason = RuntimeHoldReason; + type RuntimeFreezeReason = RuntimeFreezeReason; type MaxLocks = (); type MaxReserves = (); type ReserveIdentifier = [u8; 8]; @@ -53,7 +55,6 @@ impl pallet_balances::Config for MockRuntime { type WeightInfo = (); type FreezeIdentifier = (); type MaxFreezes = (); - type RuntimeHoldReason = RuntimeHoldReason; type MaxHolds = (); } From a4c2ca3b7dbd8c4aadf08d01a2698477b457bef4 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 29 Nov 2023 18:38:23 +0400 Subject: [PATCH 57/98] rename single block migrations --- Cargo.lock | 18 +++++++++--------- Cargo.toml | 2 +- substrate/frame/examples/Cargo.toml | 6 +++--- .../Cargo.toml | 2 +- .../src/lib.rs | 6 ++++-- .../src/migrations/mod.rs | 0 .../src/migrations/v1.rs | 0 .../src/mock.rs | 0 substrate/frame/examples/src/lib.rs | 2 +- 9 files changed, 19 insertions(+), 17 deletions(-) rename substrate/frame/examples/{storage-migrations => single-block-migrations}/Cargo.toml (97%) rename substrate/frame/examples/{storage-migrations => single-block-migrations}/src/lib.rs (98%) rename substrate/frame/examples/{storage-migrations => single-block-migrations}/src/migrations/mod.rs (100%) rename substrate/frame/examples/{storage-migrations => single-block-migrations}/src/migrations/v1.rs (100%) rename substrate/frame/examples/{storage-migrations => single-block-migrations}/src/mock.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index d9a6b8eb1561..b3568e5bbdf4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9707,36 +9707,36 @@ dependencies = [ ] [[package]] -name = "pallet-example-split" +name = "pallet-example-single-block-migrations" version = "4.0.0-dev" dependencies = [ - "frame-benchmarking", + "docify", + "frame-executive", "frame-support", "frame-system", + "frame-try-runtime", "log", + "pallet-balances", "parity-scale-codec", "scale-info", "sp-core", "sp-io", + "sp-runtime", "sp-std 8.0.0", ] [[package]] -name = "pallet-example-storage-migrations" +name = "pallet-example-split" version = "4.0.0-dev" dependencies = [ - "docify", - "frame-executive", + "frame-benchmarking", "frame-support", "frame-system", - "frame-try-runtime", "log", - "pallet-balances", "parity-scale-codec", "scale-info", "sp-core", "sp-io", - "sp-runtime", "sp-std 8.0.0", ] @@ -9750,8 +9750,8 @@ dependencies = [ "pallet-example-frame-crate", "pallet-example-kitchensink", "pallet-example-offchain-worker", + "pallet-example-single-block-migrations", "pallet-example-split", - "pallet-example-storage-migrations", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index e449917171aa..c41c4c034897 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -304,7 +304,7 @@ members = [ "substrate/frame/examples/kitchensink", "substrate/frame/examples/offchain-worker", "substrate/frame/examples/split", - "substrate/frame/examples/storage-migrations", + "substrate/frame/examples/single-block-migrations", "substrate/frame/executive", "substrate/frame/fast-unstake", "substrate/frame/glutton", diff --git a/substrate/frame/examples/Cargo.toml b/substrate/frame/examples/Cargo.toml index 48fd8125ad4d..02f2e1e1e146 100644 --- a/substrate/frame/examples/Cargo.toml +++ b/substrate/frame/examples/Cargo.toml @@ -20,7 +20,7 @@ pallet-example-frame-crate = { path = "frame-crate", default-features = false } pallet-example-kitchensink = { path = "kitchensink", default-features = false} pallet-example-offchain-worker = { path = "offchain-worker", default-features = false} pallet-example-split = { path = "split", default-features = false} -pallet-example-storage-migrations = { path = "storage-migrations", default-features = false} +pallet-example-single-block-migrations = { path = "single-block-migrations", default-features = false} [features] default = [ "std" ] @@ -32,7 +32,7 @@ std = [ "pallet-example-kitchensink/std", "pallet-example-offchain-worker/std", "pallet-example-split/std", - "pallet-example-storage-migrations/std", + "pallet-example-single-block-migrations/std", ] try-runtime = [ "pallet-default-config-example/try-runtime", @@ -41,5 +41,5 @@ try-runtime = [ "pallet-example-kitchensink/try-runtime", "pallet-example-offchain-worker/try-runtime", "pallet-example-split/try-runtime", - "pallet-example-storage-migrations/try-runtime", + "pallet-example-single-block-migrations/try-runtime", ] diff --git a/substrate/frame/examples/storage-migrations/Cargo.toml b/substrate/frame/examples/single-block-migrations/Cargo.toml similarity index 97% rename from substrate/frame/examples/storage-migrations/Cargo.toml rename to substrate/frame/examples/single-block-migrations/Cargo.toml index 056e76d8b290..7aa8529fc70e 100644 --- a/substrate/frame/examples/storage-migrations/Cargo.toml +++ b/substrate/frame/examples/single-block-migrations/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pallet-example-storage-migrations" +name = "pallet-example-single-block-migrations" version = "4.0.0-dev" authors.workspace = true edition.workspace = true diff --git a/substrate/frame/examples/storage-migrations/src/lib.rs b/substrate/frame/examples/single-block-migrations/src/lib.rs similarity index 98% rename from substrate/frame/examples/storage-migrations/src/lib.rs rename to substrate/frame/examples/single-block-migrations/src/lib.rs index 78a96b6400e6..82958e944ca4 100644 --- a/substrate/frame/examples/storage-migrations/src/lib.rs +++ b/substrate/frame/examples/single-block-migrations/src/lib.rs @@ -31,7 +31,7 @@ //! between current and on-chain [`StorageVersion`]s //! ## How to read these docs -//! - Run `cargo doc --features try-runtime --package pallet-example-storage-migrations --open` +//! - Run `cargo doc --features try-runtime --package pallet-example-single-block-migrations --open` //! to view the documentation in your browser. //! - Read the relevant source code as your read the docs. //! @@ -75,7 +75,7 @@ //! Here's how the migration module is defined for this pallet: //! //! ```text -//! substrate/frame/examples/storage-migrations/src/ +//! substrate/frame/examples/single-block-migrations/src/ //! ├── lib.rs <-- pallet definition //! ├── Cargo.toml <-- pallet manifest //! └── migrations/ @@ -215,6 +215,8 @@ // allow non-camel-case names for storage version V0 value #![allow(non_camel_case_types)] +pub mod migration_reference_docs; + // Re-export pallet items so that they can be accessed from the crate namespace. pub use pallet::*; diff --git a/substrate/frame/examples/storage-migrations/src/migrations/mod.rs b/substrate/frame/examples/single-block-migrations/src/migrations/mod.rs similarity index 100% rename from substrate/frame/examples/storage-migrations/src/migrations/mod.rs rename to substrate/frame/examples/single-block-migrations/src/migrations/mod.rs diff --git a/substrate/frame/examples/storage-migrations/src/migrations/v1.rs b/substrate/frame/examples/single-block-migrations/src/migrations/v1.rs similarity index 100% rename from substrate/frame/examples/storage-migrations/src/migrations/v1.rs rename to substrate/frame/examples/single-block-migrations/src/migrations/v1.rs diff --git a/substrate/frame/examples/storage-migrations/src/mock.rs b/substrate/frame/examples/single-block-migrations/src/mock.rs similarity index 100% rename from substrate/frame/examples/storage-migrations/src/mock.rs rename to substrate/frame/examples/single-block-migrations/src/mock.rs diff --git a/substrate/frame/examples/src/lib.rs b/substrate/frame/examples/src/lib.rs index f9e45d1debd6..5dbe6e207002 100644 --- a/substrate/frame/examples/src/lib.rs +++ b/substrate/frame/examples/src/lib.rs @@ -43,7 +43,7 @@ //! - [`pallet_example_frame_crate`]: Example pallet showcasing how one can be //! built using only the `frame` umbrella crate. //! -//! - [`pallet-example-storage-migrations`]: An example pallet demonstrating best-practices for +//! - [`pallet-example-single-block-migrations`]: An example pallet demonstrating best-practices for //! writing storage migrations. //! //! **Tip**: Use `cargo doc --package --open` to view each pallet's documentation. From 4275503cc72dcb5da7159cd8314c82228985bbf7 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 30 Nov 2023 14:45:07 +0400 Subject: [PATCH 58/98] runtime upgrade ref docs --- .../single-block-migrations/src/lib.rs | 116 ++++------------ .../src/runtime_upgrade_reference_docs.rs | 130 ++++++++++++++++++ 2 files changed, 156 insertions(+), 90 deletions(-) create mode 100644 substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs diff --git a/substrate/frame/examples/single-block-migrations/src/lib.rs b/substrate/frame/examples/single-block-migrations/src/lib.rs index 82958e944ca4..206d062d65d9 100644 --- a/substrate/frame/examples/single-block-migrations/src/lib.rs +++ b/substrate/frame/examples/single-block-migrations/src/lib.rs @@ -15,25 +15,24 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! # Storage Migrations Example Pallet +//! # Single Block Migration Example Pallet //! -//! An example pallet explaining why storage migrations are necessary and demonstrating -//! best-practices for writing them. +//! An example pallet demonstrating best-practices for writing single-block migrations in the +//! context of upgrading pallet storage. //! -//! It is intended to be a resource for guiding a developer from knowing nothing about storage -//! migrations to being able to write safe, well tested, versioned migrations for their own pallets. +//! Read more about runtime upgrades and migrations by reading the [Runtime Upgrade Reference +//! Docs](runtime_upgrade_reference_docs). //! -//! ## Prerequisites +//! ## Forwarning //! -//! Before writing pallet storage migrations, you should be familiar with: -//! - [`Runtime upgrades`](https://docs.substrate.io/maintain/runtime-upgrades/) -//! - The [`GetStorageVersion`](frame_support::traits::GetStorageVersion) trait, and the difference -//! between current and on-chain [`StorageVersion`]s - -//! ## How to read these docs -//! - Run `cargo doc --features try-runtime --package pallet-example-single-block-migrations --open` -//! to view the documentation in your browser. -//! - Read the relevant source code as your read the docs. +//! Single block migrations **MUST** execute in a single block, therefore are typically only +//! appropriate for migrations which are either guaranteed to not exceed block weight limits. +//! If you migration exceeds block weight limits, it will **brick your chain**! +//! +//! If weight is a concern or you are not sure which type of migration to use, you should probably +//! use a multi-block migration. +//! +//! TODO: Link above to multi-block migration example. //! //! ## Pallet Overview //! @@ -70,7 +69,7 @@ //! //! ## Adding a migration module //! -//! Containing a pallets migrations in a seperate module is strongly recommended. +//! Writing a pallets migrations in a seperate module is strongly recommended. //! //! Here's how the migration module is defined for this pallet: //! @@ -105,8 +104,7 @@ //! ### `mod version_unchecked` //! //! Here we define our raw migration logic, -//! `version_unchecked::MigrateV0ToV1` which implements the -//! [`OnRuntimeUpgrade`](frame_support::traits::OnRuntimeUpgrade) trait. +//! `version_unchecked::MigrateV0ToV1` which implements the [`OnRuntimeUpgrade`] trait. //! //! Importantly, it is kept in a private module so that it cannot be accidentally used in a runtime. //! @@ -115,20 +113,19 @@ //! #### Standalone Struct or Pallet Hook? //! //! Note that the storage migration logic is attached to a standalone struct implementing -//! [`OnRuntimeUpgrade`](frame_support::traits::OnRuntimeUpgrade), rather than implementing the +//! [`OnRuntimeUpgrade`], rather than implementing the //! [`Hooks::on_runtime_upgrade`](frame_support::traits::Hooks::on_runtime_upgrade) hook directly on //! the pallet. The pallet hook is better suited for executing other types of logic that needs to -//! execute on runtime upgrade, but not so much storage migrations. +//! execute on runtime upgrade, but not so much for storage migrations. //! //! ### `pub mod versioned` //! //! Here, `version_unchecked::MigrateV0ToV1` is wrapped in a -//! [`VersionedMigration`](frame_support::migrations::VersionedMigration) to define +//! [`VersionedMigration`] to define //! [`versioned::MigrateV0ToV1`](crate::migrations::v1::versioned::MigrateV0ToV1), which may be used //! in runtimes. //! -//! Using -//! [`VersionedMigration`](frame_support::migrations::VersionedMigration) ensures that +//! Using [`VersionedMigration`] ensures that //! - The migration only runs once when the on-chain storage version is `0` //! - The on-chain storage version is updated to `1` after the migration executes //! - Reads and writes from checking and setting the on-chain storage version are accounted for in @@ -144,78 +141,13 @@ //! - `on_runtime_upgrade` returns the expected weight //! - `post_upgrade` succeeds when given the bytes returned by `pre_upgrade` //! - Pallet storage is in the expected state after the migration -//! -//! ## Scheduling the Migration to Run Next Runtime Upgrade -//! -//! Almost done! The last step is to schedule the migration to run next runtime upgrade passing it -//! as a generic parameter to your [`Executive`](frame_executive) pallet: -//! -//! ```ignore -//! // Tuple of migrations (structs that implement `OnRuntimeUpgrade`) -//! type Migrations = ( -//! pallet_example_storage_migration::migrations::v1::versioned::MigrateV0ToV1 -//! // ...more migrations here -//! ); -//! pub type Executive = frame_executive::Executive< -//! Runtime, -//! Block, -//! frame_system::ChainContext, -//! Runtime, -//! AllPalletsWithSystem, -//! Migrations, // <-- pass your migrations to Executive here -//! >; -//! ``` -//! -//! ## Ensuring Migraiton Safety -//! -//! "My migration unit tests pass, so it should be safe to deploy right?" -//! -//! No! Unit tests execute the migration in a very simple test environment, and cannot account -//! for the complexities of a real runtime or real on-chain state. -//! -//! Prior to deploying migrations, it is CRITICAL to perform additional checks to ensure that when -//! run in our real runtime they will not brick the chain due to: -//! - Panicing -//! - Touching too many storage keys and resulting in an excessively large PoV -//! - Taking too long to execute -//! -//! The [`try-runtime-cli`](https://github.com/paritytech/try-runtime-cli) tool has a sub-command -//! [`on-runtime-upgrade`](https://paritytech.github.io/try-runtime-cli/try_runtime_core/commands/enum.Action.html#variant.OnRuntimeUpgrade) -//! which is designed to help with exactly this. -//! -//! Developers MUST run this command before deploying migrations to ensure they will not -//! inadvertently result in a bricked chain. -//! -//! ### Note on the Manipulability of PoV Size and Execution Time -//! -//! While [`try-runtime-cli`](https://github.com/paritytech/try-runtime-cli) can help ensure with -//! very high certianty that a migration will succeed given **existing** on-chain state, it cannot -//! prevent a malicious actor from manipulating state in a way that will cause the migration to take -//! longer or produce a PoV much larger than previously measured. -//! -//! Therefore, it is important to write migrations in such a way that the execution time or PoV size -//! it adds to the block cannot be easily manipulated. e.g., in your migration, do not iterate over -//! storage that can quickly or cheaply be bloated. -//! -//! ### Note on Multi-Block Migrations -//! -//! For large migrations that cannot be safely executed in a single block, a feature for writing -//! simple and safe [multi-block migrations](https://github.com/paritytech/polkadot-sdk/issues/198) -//! feature is [under active development](https://github.com/paritytech/substrate/pull/14275) and -//! planned for release before the end of 2023. -//! -//! ### Note on Other Tools -//! -//! [`Chopsticks`](https://github.com/AcalaNetwork/chopsticks) is another tool in the Substrate -//! ecosystem which developers may find useful to use in addition to `try-runtime-cli` when testing -//! their migrations. // We make sure this pallet uses `no_std` for compiling to Wasm. #![cfg_attr(not(feature = "std"), no_std)] // allow non-camel-case names for storage version V0 value #![allow(non_camel_case_types)] -pub mod migration_reference_docs; +pub mod runtime_upgrade_reference_docs; // Re-export pallet items so that they can be accessed from the crate namespace. pub use pallet::*; @@ -224,8 +156,12 @@ pub use pallet::*; pub mod migrations; #[doc(hidden)] mod mock; +use crate::migrations::v1::versioned::MigrateV0ToV1; use codec::{Decode, Encode, MaxEncodedLen}; -use frame_support::traits::StorageVersion; +use frame_support::{ + migrations::VersionedMigration, + traits::{GetStorageVersion, OnRuntimeUpgrade, StorageVersion}, +}; use sp_runtime::RuntimeDebug; /// Example struct holding the most recently set [`u32`] and the diff --git a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs new file mode 100644 index 000000000000..26e41ea943b8 --- /dev/null +++ b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs @@ -0,0 +1,130 @@ +//! Temporary home while we wait for sdk-docs / polkadot-developer-hub to merge. +//! +//! Reference docs for understanding Runtime Upgrades and writing Migrations. +//! +//! # Runtime Upgrades +//! +//! At their core, blockchain logic consists of +//! +//! 1. on-chain state and +//! 2. a state transition function +//! +//! In Substrate-based blockchains, state transition functions are referred to as +//! [runtimes](https://docs.substrate.io/learn/runtime-development/). +//! +//! Traditionally, before Substrate, upgrading state transition functions required node +//! operators to download new software and restart their nodes in a process called +//! [forking](https://en.wikipedia.org/wiki/Fork_(blockchain)). +//! +//! Substrate-based blockchains do not require forking, and instead upgrade runtimes +//! in a process called "Runtime Upgrades". +//! +//! Forkless runtime upgrades are a defining feature of the Substrate framework. Updating the +//! runtime logic without forking the code base enables your blockchain to seemlessly evolve +//! over time in a deterministic, rules-based manner. It also removes ambiguity for node operators +//! and other participants in the network about what is the canonical runtime. +//! +//! This capability is possible due to the runtime of a blockchain existing in on-chain storage. +//! +//! To upgrade a runtime, an [Origin](frame_system::RawOrigin) with the necesarry permissions +//! (usually via governance) simply executes [`set_code`] or [`set_code_without_checks`] with the +//! desired new blob. +//! +//! # Migrations +//! +//! It is often desirable to define logic to execute immediately after runtime upgrades. +//! +//! Self-contained pieces of logic that execute after a runtime upgrade are called "Migrations". +//! +//! Migrations are typically used to 'migrate' pallet storage into a new layout when the expected +//! storage layout of a pallet changes, but they do anything including but not limited to: +//! +//! - Calling arbitrary pallet methods +//! - Mutating arbitrary on-chain state +//! - Cleaning up some old storage items that are no longer needed +//! +//! ## Single Block Migrations +//! +//! Single block migrations execute immediately and entirely at the beginning of the block following +//! a runtime upgrade. +//! +//! Suitable for migrations which are guaranteed to not exceed the block weight. +//! +//! Single block migrations are simply implementations of [`OnRuntimeUpgrade`]. Migrations can be +//! written by implementing [`OnRuntimeUpgrade`] on a struct. +//! +//! To learn best practices for writing single block pallet storage migrations, see the +//! [Single Block Migration Example Pallet](crate). +//! +//! ### Scheduling the Single Block Migrations to Run Next Runtime Upgrade +//! +//! Schedule migrations to run next runtime upgrade passing them as a generic parameter to your +//! [`Executive`](frame_executive) pallet: +//! +//! ```ignore +//! // Tuple of migrations (structs that implement `OnRuntimeUpgrade`) +//! type Migrations = ( +//! pallet_example_storage_migration::migrations::v1::versioned::MigrateV0ToV1, +//! MyCustomMigration, +//! // ...more migrations here +//! ); +//! pub type Executive = frame_executive::Executive< +//! Runtime, +//! Block, +//! frame_system::ChainContext, +//! Runtime, +//! AllPalletsWithSystem, +//! Migrations, // <-- pass your migrations to Executive here +//! >; +//! ``` +//! +//! ### Ensuring Single Block Migraiton Safety +//! +//! "My migration unit tests pass, so it should be safe to deploy right?" +//! +//! No! Unit tests execute the migration in a very simple test environment, and cannot account +//! for the complexities of a real runtime or real on-chain state. +//! +//! Prior to deploying migrations, it is critical to perform additional checks to ensure that when +//! run in our real runtime they will not brick the chain due to: +//! - Panicing +//! - Touching too many storage keys and resulting in an excessively large PoV +//! - Taking too long to execute +//! +//! [`try-runtime-cli`](https://github.com/paritytech/try-runtime-cli) has a sub-command +//! [`on-runtime-upgrade`](https://paritytech.github.io/try-runtime-cli/try_runtime_core/commands/enum.Action.html#variant.OnRuntimeUpgrade) +//! which is designed to help with exactly this. +//! +//! Developers MUST run this command before deploying migrations to ensure they will not +//! inadvertently result in a bricked chain. +//! +//! ### Note on the Manipulability of PoV Size and Execution Time +//! +//! While [`try-runtime-cli`](https://github.com/paritytech/try-runtime-cli) can help ensure with +//! very high certianty that a migration will succeed given **existing** on-chain state, it cannot +//! prevent a malicious actor from manipulating state in a way that will cause the migration to take +//! longer or produce a PoV much larger than previously measured. +//! +//! Therefore, it is important to write migrations in such a way that the execution time or PoV size +//! it adds to the block cannot be easily manipulated. e.g., in your migration, do not iterate over +//! storage that can quickly or cheaply be bloated. +//! +//! If writing your migration in such a way is not possible, a multi block migration should be used +//! instead. +//! +//! ### Other useful tools +//! +//! [`Chopsticks`](https://github.com/AcalaNetwork/chopsticks) is another tool in the Substrate +//! ecosystem which developers may find useful to use in addition to `try-runtime-cli` when testing +//! their single block migrations. +//! +//! ## Multi Block Migrations +//! +//! Safely and easily execute long-running migrations across multiple blocks. +//! +//! Suitable for migrations which could use arbitrary amounts of block weight. +//! +//! TODO: Link to multi block migration example/s. + +use frame_support::traits::{GetStorageVersion, OnRuntimeUpgrade, StorageVersion}; +use frame_system::Call::{set_code, set_code_without_checks}; From 2c014e77f5bac57f1a7526e33915c4d9f6623e65 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 30 Nov 2023 14:47:44 +0400 Subject: [PATCH 59/98] version --- Cargo.lock | 4 ++-- .../frame/examples/single-block-migrations/Cargo.toml | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 807befe260f4..c68412f9655c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9714,7 +9714,7 @@ dependencies = [ [[package]] name = "pallet-example-single-block-migrations" -version = "4.0.0-dev" +version = "0.0.1" dependencies = [ "docify", "frame-executive", @@ -18799,7 +18799,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.0", "redox_syscall 0.4.1", - "rustix 0.38.21", + "rustix 0.38.25", "windows-sys 0.48.0", ] diff --git a/substrate/frame/examples/single-block-migrations/Cargo.toml b/substrate/frame/examples/single-block-migrations/Cargo.toml index 7aa8529fc70e..a6aad377ed4d 100644 --- a/substrate/frame/examples/single-block-migrations/Cargo.toml +++ b/substrate/frame/examples/single-block-migrations/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-example-single-block-migrations" -version = "4.0.0-dev" +version = "0.0.1" authors.workspace = true edition.workspace = true license = "MIT-0" @@ -17,7 +17,9 @@ log = { version = "0.4.20", default-features = false } codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [ "derive", ] } -scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.5.0", default-features = false, features = [ + "derive", +] } frame-support = { path = "../../support", default-features = false } frame-executive = { path = "../../executive", default-features = false } frame-system = { path = "../../system", default-features = false } @@ -29,7 +31,7 @@ sp-core = { path = "../../../primitives/core", default-features = false } sp-io = { path = "../../../primitives/io", default-features = false } [features] -default = [ "std" ] +default = ["std"] std = [ "codec/std", "frame-executive/std", From 9f46c00a89a8375b8c57fb5cdb77708dc467a7cb Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 30 Nov 2023 14:49:12 +0400 Subject: [PATCH 60/98] comment --- .../src/runtime_upgrade_reference_docs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs index 26e41ea943b8..de270ac21550 100644 --- a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs +++ b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs @@ -62,7 +62,7 @@ //! [`Executive`](frame_executive) pallet: //! //! ```ignore -//! // Tuple of migrations (structs that implement `OnRuntimeUpgrade`) +//! /// Tuple of migrations (structs that implement `OnRuntimeUpgrade`) //! type Migrations = ( //! pallet_example_storage_migration::migrations::v1::versioned::MigrateV0ToV1, //! MyCustomMigration, From ef12e3edeb6e215352cedb607db81da8be8c7f56 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 30 Nov 2023 14:59:07 +0400 Subject: [PATCH 61/98] note on version --- Cargo.lock | 1 + .../frame/examples/single-block-migrations/Cargo.toml | 1 + .../src/runtime_upgrade_reference_docs.rs | 9 +++++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c68412f9655c..0059f0209439 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9729,6 +9729,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std 8.0.0", + "sp-version", ] [[package]] diff --git a/substrate/frame/examples/single-block-migrations/Cargo.toml b/substrate/frame/examples/single-block-migrations/Cargo.toml index a6aad377ed4d..27114d56fd61 100644 --- a/substrate/frame/examples/single-block-migrations/Cargo.toml +++ b/substrate/frame/examples/single-block-migrations/Cargo.toml @@ -29,6 +29,7 @@ sp-std = { path = "../../../primitives/std", default-features = false } sp-runtime = { path = "../../../primitives/runtime", default-features = false } sp-core = { path = "../../../primitives/core", default-features = false } sp-io = { path = "../../../primitives/io", default-features = false } +sp-version = { path = "../../../primitives/version", default-features = false } [features] default = ["std"] diff --git a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs index de270ac21550..d59498d78e30 100644 --- a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs +++ b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs @@ -26,10 +26,15 @@ //! //! This capability is possible due to the runtime of a blockchain existing in on-chain storage. //! -//! To upgrade a runtime, an [Origin](frame_system::RawOrigin) with the necesarry permissions -//! (usually via governance) simply executes [`set_code`] or [`set_code_without_checks`] with the +//! ## Performing a Runtime Upgrade +//! +//! To upgrade a runtime, an [`Origin`](frame_system::RawOrigin) with the necesarry permissions +//! (usually via governance) simply executes [`set_code`] (or [`set_code_without_checks`]) with the //! desired new blob. //! +//! Prior to building the new runtime, don't forget to update the +//! [`RuntimeVersion`](sp_version::RuntimeVersion). +//! //! # Migrations //! //! It is often desirable to define logic to execute immediately after runtime upgrades. From 4881a0a38543d936236761105b3289ccb3774c71 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 30 Nov 2023 15:00:51 +0400 Subject: [PATCH 62/98] berevity --- .../src/runtime_upgrade_reference_docs.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs index d59498d78e30..9e9c49edb967 100644 --- a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs +++ b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs @@ -29,7 +29,7 @@ //! ## Performing a Runtime Upgrade //! //! To upgrade a runtime, an [`Origin`](frame_system::RawOrigin) with the necesarry permissions -//! (usually via governance) simply executes [`set_code`] (or [`set_code_without_checks`]) with the +//! (usually via governance) executes [`set_code`] (or [`set_code_without_checks`]) with the //! desired new blob. //! //! Prior to building the new runtime, don't forget to update the @@ -55,8 +55,7 @@ //! //! Suitable for migrations which are guaranteed to not exceed the block weight. //! -//! Single block migrations are simply implementations of [`OnRuntimeUpgrade`]. Migrations can be -//! written by implementing [`OnRuntimeUpgrade`] on a struct. +//! Single block migrations are simply implementations of [`OnRuntimeUpgrade`]. //! //! To learn best practices for writing single block pallet storage migrations, see the //! [Single Block Migration Example Pallet](crate). From e5ff5b24b08c8db003ff5fc5705ceb404755d0af Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 30 Nov 2023 15:09:05 +0400 Subject: [PATCH 63/98] brevity --- .../src/runtime_upgrade_reference_docs.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs index 9e9c49edb967..e74589b11340 100644 --- a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs +++ b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs @@ -50,12 +50,10 @@ //! //! ## Single Block Migrations //! -//! Single block migrations execute immediately and entirely at the beginning of the block following +//! - Execute immediately and entirely at the beginning of the block following //! a runtime upgrade. -//! -//! Suitable for migrations which are guaranteed to not exceed the block weight. -//! -//! Single block migrations are simply implementations of [`OnRuntimeUpgrade`]. +//! - Are suitable for migrations which are guaranteed to not exceed the block weight. +//! - Are simply implementations of [`OnRuntimeUpgrade`]. //! //! To learn best practices for writing single block pallet storage migrations, see the //! [Single Block Migration Example Pallet](crate). From 3f31c6bb142cd8294eff0e1827535abf9b3950d4 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 17:53:02 +1100 Subject: [PATCH 64/98] Update substrate/frame/examples/single-block-migrations/Cargo.toml Co-authored-by: Oliver Tale-Yazdi --- substrate/frame/examples/single-block-migrations/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/substrate/frame/examples/single-block-migrations/Cargo.toml b/substrate/frame/examples/single-block-migrations/Cargo.toml index 27114d56fd61..dbf2d7aa16ee 100644 --- a/substrate/frame/examples/single-block-migrations/Cargo.toml +++ b/substrate/frame/examples/single-block-migrations/Cargo.toml @@ -7,6 +7,7 @@ license = "MIT-0" homepage = "https://substrate.io" repository.workspace = true description = "FRAME example pallet demonstrating best-practices for writing storage migrations." +publish = false [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] From 802aae32d3eb3502000ca90ed9c5e5d06a24260b Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 17:53:19 +1100 Subject: [PATCH 65/98] Update substrate/frame/examples/single-block-migrations/src/lib.rs Co-authored-by: Oliver Tale-Yazdi --- substrate/frame/examples/single-block-migrations/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/examples/single-block-migrations/src/lib.rs b/substrate/frame/examples/single-block-migrations/src/lib.rs index 206d062d65d9..eadd13eaf90a 100644 --- a/substrate/frame/examples/single-block-migrations/src/lib.rs +++ b/substrate/frame/examples/single-block-migrations/src/lib.rs @@ -25,7 +25,7 @@ //! //! ## Forwarning //! -//! Single block migrations **MUST** execute in a single block, therefore are typically only +//! Single block migrations **MUST** execute in a single block, therefore they are typically only //! appropriate for migrations which are either guaranteed to not exceed block weight limits. //! If you migration exceeds block weight limits, it will **brick your chain**! //! From 7aca6b6d04811b4622153bc66360f447fbf6476e Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 17:53:47 +1100 Subject: [PATCH 66/98] Update substrate/frame/support/procedural/src/lib.rs Co-authored-by: Oliver Tale-Yazdi --- substrate/frame/support/procedural/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/support/procedural/src/lib.rs b/substrate/frame/support/procedural/src/lib.rs index 3bf491576bca..6dbde23a24d4 100644 --- a/substrate/frame/support/procedural/src/lib.rs +++ b/substrate/frame/support/procedural/src/lib.rs @@ -548,7 +548,7 @@ pub fn __create_tt_macro(input: TokenStream) -> TokenStream { /// Allows accessing on-chain pallet storage that is no longer accessible via the pallet. /// -/// This is especially useful when writing storage migraitons, when types of storage items are +/// This is especially useful when writing storage migrations, when types of storage items are /// modified or outright removed, but the previous definition is required to perform the migration. /// /// ## Example From 564664eddaf7c475806232d49e7eb473404bb1fa Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 17:54:02 +1100 Subject: [PATCH 67/98] Update substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs Co-authored-by: Oliver Tale-Yazdi --- .../src/runtime_upgrade_reference_docs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs index e74589b11340..e7fabe3782db 100644 --- a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs +++ b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs @@ -80,7 +80,7 @@ //! >; //! ``` //! -//! ### Ensuring Single Block Migraiton Safety +//! ### Ensuring Single Block Migration Safety //! //! "My migration unit tests pass, so it should be safe to deploy right?" //! From dfa7f366f683973a86d49949f3f0e03b67bfbd71 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 17:54:30 +1100 Subject: [PATCH 68/98] Update substrate/frame/examples/single-block-migrations/src/lib.rs Co-authored-by: Oliver Tale-Yazdi --- substrate/frame/examples/single-block-migrations/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/substrate/frame/examples/single-block-migrations/src/lib.rs b/substrate/frame/examples/single-block-migrations/src/lib.rs index eadd13eaf90a..ac19852c8942 100644 --- a/substrate/frame/examples/single-block-migrations/src/lib.rs +++ b/substrate/frame/examples/single-block-migrations/src/lib.rs @@ -204,7 +204,6 @@ pub mod pallet { #[docify::export(pallet_calls)] #[pallet::call] impl Pallet { - #[pallet::call_index(0)] pub fn set_value(origin: OriginFor, value: u32) -> DispatchResult { ensure_signed(origin)?; From b6d71a88b1623e0e2ebf1b90158bd5fd45ec674d Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 17:54:47 +1100 Subject: [PATCH 69/98] Update substrate/frame/examples/single-block-migrations/src/migrations/v1.rs Co-authored-by: Oliver Tale-Yazdi --- .../frame/examples/single-block-migrations/src/migrations/v1.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/substrate/frame/examples/single-block-migrations/src/migrations/v1.rs b/substrate/frame/examples/single-block-migrations/src/migrations/v1.rs index 534a1e143f6e..bda231c78415 100644 --- a/substrate/frame/examples/single-block-migrations/src/migrations/v1.rs +++ b/substrate/frame/examples/single-block-migrations/src/migrations/v1.rs @@ -55,7 +55,6 @@ mod version_unchecked { /// /// In this migration, update the on-chain storage for the pallet to reflect the new storage /// layout. - pub struct MigrateV0ToV1(sp_std::marker::PhantomData); impl OnRuntimeUpgrade for MigrateV0ToV1 { From eaa427ae09a238381e6c3c8e191898db2d6e36a2 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 12:47:31 +0400 Subject: [PATCH 70/98] format toml --- Cargo.toml | 2 +- substrate/frame/examples/Cargo.toml | 12 ++++++------ .../examples/single-block-migrations/Cargo.toml | 8 ++------ 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a05dca5a378c..edc2743cb792 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -306,8 +306,8 @@ members = [ "substrate/frame/examples/frame-crate", "substrate/frame/examples/kitchensink", "substrate/frame/examples/offchain-worker", - "substrate/frame/examples/split", "substrate/frame/examples/single-block-migrations", + "substrate/frame/examples/split", "substrate/frame/executive", "substrate/frame/fast-unstake", "substrate/frame/glutton", diff --git a/substrate/frame/examples/Cargo.toml b/substrate/frame/examples/Cargo.toml index 2246e55e68d1..d98a068aa23a 100644 --- a/substrate/frame/examples/Cargo.toml +++ b/substrate/frame/examples/Cargo.toml @@ -17,10 +17,10 @@ pallet-default-config-example = { path = "default-config", default-features = fa pallet-dev-mode = { path = "dev-mode", default-features = false } pallet-example-basic = { path = "basic", default-features = false } pallet-example-frame-crate = { path = "frame-crate", default-features = false } -pallet-example-kitchensink = { path = "kitchensink", default-features = false} -pallet-example-offchain-worker = { path = "offchain-worker", default-features = false} -pallet-example-split = { path = "split", default-features = false} -pallet-example-single-block-migrations = { path = "single-block-migrations", default-features = false} +pallet-example-kitchensink = { path = "kitchensink", default-features = false } +pallet-example-offchain-worker = { path = "offchain-worker", default-features = false } +pallet-example-split = { path = "split", default-features = false } +pallet-example-single-block-migrations = { path = "single-block-migrations", default-features = false } [features] default = ["std"] @@ -31,8 +31,8 @@ std = [ "pallet-example-frame-crate/std", "pallet-example-kitchensink/std", "pallet-example-offchain-worker/std", - "pallet-example-split/std", "pallet-example-single-block-migrations/std", + "pallet-example-split/std", ] try-runtime = [ "pallet-default-config-example/try-runtime", @@ -40,6 +40,6 @@ try-runtime = [ "pallet-example-basic/try-runtime", "pallet-example-kitchensink/try-runtime", "pallet-example-offchain-worker/try-runtime", - "pallet-example-split/try-runtime", "pallet-example-single-block-migrations/try-runtime", + "pallet-example-split/try-runtime", ] diff --git a/substrate/frame/examples/single-block-migrations/Cargo.toml b/substrate/frame/examples/single-block-migrations/Cargo.toml index dbf2d7aa16ee..22426607595f 100644 --- a/substrate/frame/examples/single-block-migrations/Cargo.toml +++ b/substrate/frame/examples/single-block-migrations/Cargo.toml @@ -15,12 +15,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] docify = { version = "0.2.3", default-features = false } log = { version = "0.4.20", default-features = false } -codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [ - "derive", -] } -scale-info = { version = "2.5.0", default-features = false, features = [ - "derive", -] } +codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ["derive"] } +scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } frame-support = { path = "../../support", default-features = false } frame-executive = { path = "../../executive", default-features = false } frame-system = { path = "../../system", default-features = false } From 406fad7bb9e1a56e0a8a297ead8d572341b1237f Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 12:50:03 +0400 Subject: [PATCH 71/98] address comment --- substrate/frame/examples/single-block-migrations/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/substrate/frame/examples/single-block-migrations/src/lib.rs b/substrate/frame/examples/single-block-migrations/src/lib.rs index ac19852c8942..6cf01ff25104 100644 --- a/substrate/frame/examples/single-block-migrations/src/lib.rs +++ b/substrate/frame/examples/single-block-migrations/src/lib.rs @@ -25,9 +25,9 @@ //! //! ## Forwarning //! -//! Single block migrations **MUST** execute in a single block, therefore they are typically only -//! appropriate for migrations which are either guaranteed to not exceed block weight limits. -//! If you migration exceeds block weight limits, it will **brick your chain**! +//! Single block migrations **MUST** execute in a single block, therefore when executed on a +//! parachain are only appropriate when guaranteed to not exceed block weight limits. If a +//! parachain submits a block that exceeds the block weight limit it will **brick the chain**! //! //! If weight is a concern or you are not sure which type of migration to use, you should probably //! use a multi-block migration. From 4be8f4de6ebce005d9bc82eeb6f7e4823e4962b6 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 12:54:18 +0400 Subject: [PATCH 72/98] address comment --- .../src/runtime_upgrade_reference_docs.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs index e7fabe3782db..4d4dffee1f4b 100644 --- a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs +++ b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs @@ -100,6 +100,10 @@ //! Developers MUST run this command before deploying migrations to ensure they will not //! inadvertently result in a bricked chain. //! +//! It is recommended to run as part of your CI pipeline. See the +//! [polkadot-sdk check-runtime-migration job](https://github.com/paritytech/polkadot-sdk/blob/4a293bc5a25be637c06ce950a34490706597615b/.gitlab/pipeline/check.yml#L103-L124) +//! for an example of how to configure this. +//! //! ### Note on the Manipulability of PoV Size and Execution Time //! //! While [`try-runtime-cli`](https://github.com/paritytech/try-runtime-cli) can help ensure with From a8df9cd4d9996b6c707bfd43cf67bc06ab8d4818 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 13:06:39 +0400 Subject: [PATCH 73/98] address comment --- .../frame/contracts/src/migration/v09.rs | 14 +++--- .../frame/contracts/src/migration/v10.rs | 24 +++++----- .../frame/contracts/src/migration/v11.rs | 12 ++--- .../frame/contracts/src/migration/v12.rs | 40 ++++++++-------- .../frame/contracts/src/migration/v13.rs | 10 ++-- .../frame/contracts/src/migration/v14.rs | 20 ++++---- .../frame/contracts/src/migration/v15.rs | 16 +++---- .../single-block-migrations/src/lib.rs | 6 +-- .../src/migrations/v1.rs | 12 ++--- substrate/frame/society/src/migrations.rs | 48 +++++++++---------- substrate/frame/society/src/tests.rs | 44 ++++++++--------- substrate/frame/support/procedural/src/lib.rs | 6 +-- 12 files changed, 126 insertions(+), 126 deletions(-) diff --git a/substrate/frame/contracts/src/migration/v09.rs b/substrate/frame/contracts/src/migration/v09.rs index 98fcccc2c0be..f19bff9d6747 100644 --- a/substrate/frame/contracts/src/migration/v09.rs +++ b/substrate/frame/contracts/src/migration/v09.rs @@ -28,7 +28,7 @@ use frame_support::{pallet_prelude::*, storage_alias, DefaultNoBound, Identity}; use sp_runtime::TryRuntimeError; use sp_std::prelude::*; -mod old { +mod v8 { use super::*; #[derive(Encode, Decode)] @@ -50,14 +50,14 @@ mod old { #[cfg(feature = "runtime-benchmarks")] pub fn store_old_dummy_code(len: usize) { use sp_runtime::traits::Hash; - let module = old::PrefabWasmModule { + let module = v8::PrefabWasmModule { instruction_weights_version: 0, initial: 0, maximum: 0, code: vec![42u8; len], }; let hash = T::Hashing::hash(&module.code); - old::CodeStorage::::insert(hash, module); + v8::CodeStorage::::insert(hash, module); } #[derive(Encode, Decode)] @@ -89,9 +89,9 @@ impl MigrationStep for Migration { fn step(&mut self) -> (IsFinished, Weight) { let mut iter = if let Some(last_key) = self.last_code_hash.take() { - old::CodeStorage::::iter_from(old::CodeStorage::::hashed_key_for(last_key)) + v8::CodeStorage::::iter_from(v8::CodeStorage::::hashed_key_for(last_key)) } else { - old::CodeStorage::::iter() + v8::CodeStorage::::iter() }; if let Some((key, old)) = iter.next() { @@ -115,7 +115,7 @@ impl MigrationStep for Migration { #[cfg(feature = "try-runtime")] fn pre_upgrade_step() -> Result, TryRuntimeError> { - let sample: Vec<_> = old::CodeStorage::::iter().take(100).collect(); + let sample: Vec<_> = v8::CodeStorage::::iter().take(100).collect(); log::debug!(target: LOG_TARGET, "Taking sample of {} contract codes", sample.len()); Ok(sample.encode()) @@ -123,7 +123,7 @@ impl MigrationStep for Migration { #[cfg(feature = "try-runtime")] fn post_upgrade_step(state: Vec) -> Result<(), TryRuntimeError> { - let sample = , old::PrefabWasmModule)> as Decode>::decode(&mut &state[..]) + let sample = , v8::PrefabWasmModule)> as Decode>::decode(&mut &state[..]) .expect("pre_upgrade_step provides a valid state; qed"); log::debug!(target: LOG_TARGET, "Validating sample of {} contract codes", sample.len()); diff --git a/substrate/frame/contracts/src/migration/v10.rs b/substrate/frame/contracts/src/migration/v10.rs index f02e28f6fde3..7c0ac7691124 100644 --- a/substrate/frame/contracts/src/migration/v10.rs +++ b/substrate/frame/contracts/src/migration/v10.rs @@ -44,7 +44,7 @@ use sp_runtime::{ }; use sp_std::{ops::Deref, prelude::*}; -mod old { +mod v9 { use super::*; pub type BalanceOf = ( ) where OldCurrency: ReservableCurrency<::AccountId> + 'static, { - let info = old::ContractInfo { + let info = v9::ContractInfo { trie_id: info.trie_id, code_hash: info.code_hash, storage_bytes: Default::default(), @@ -91,7 +91,7 @@ pub fn store_old_contract_info( storage_item_deposit: Default::default(), storage_base_deposit: Default::default(), }; - old::ContractInfoOf::::insert(account, info); + v9::ContractInfoOf::::insert(account, info); } #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen)] @@ -117,9 +117,9 @@ where pub code_hash: CodeHash, storage_bytes: u32, storage_items: u32, - pub storage_byte_deposit: old::BalanceOf, - storage_item_deposit: old::BalanceOf, - storage_base_deposit: old::BalanceOf, + pub storage_byte_deposit: v9::BalanceOf, + storage_item_deposit: v9::BalanceOf, + storage_base_deposit: v9::BalanceOf, } #[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)] @@ -149,7 +149,7 @@ fn deposit_address( impl MigrationStep for Migration where OldCurrency: ReservableCurrency<::AccountId> - + Inspect<::AccountId, Balance = old::BalanceOf>, + + Inspect<::AccountId, Balance = v9::BalanceOf>, { const VERSION: u16 = 10; @@ -159,11 +159,11 @@ where fn step(&mut self) -> (IsFinished, Weight) { let mut iter = if let Some(last_account) = self.last_account.take() { - old::ContractInfoOf::::iter_from( - old::ContractInfoOf::::hashed_key_for(last_account), + v9::ContractInfoOf::::iter_from( + v9::ContractInfoOf::::hashed_key_for(last_account), ) } else { - old::ContractInfoOf::::iter() + v9::ContractInfoOf::::iter() }; if let Some((account, contract)) = iter.next() { @@ -273,7 +273,7 @@ where #[cfg(feature = "try-runtime")] fn pre_upgrade_step() -> Result, TryRuntimeError> { - let sample: Vec<_> = old::ContractInfoOf::::iter().take(10).collect(); + let sample: Vec<_> = v9::ContractInfoOf::::iter().take(10).collect(); log::debug!(target: LOG_TARGET, "Taking sample of {} contracts", sample.len()); Ok(sample.encode()) @@ -281,7 +281,7 @@ where #[cfg(feature = "try-runtime")] fn post_upgrade_step(state: Vec) -> Result<(), TryRuntimeError> { - let sample = )> as Decode>::decode( + let sample = )> as Decode>::decode( &mut &state[..], ) .expect("pre_upgrade_step provides a valid state; qed"); diff --git a/substrate/frame/contracts/src/migration/v11.rs b/substrate/frame/contracts/src/migration/v11.rs index a5b11f6e0897..9bfbb25edfb4 100644 --- a/substrate/frame/contracts/src/migration/v11.rs +++ b/substrate/frame/contracts/src/migration/v11.rs @@ -29,7 +29,7 @@ use sp_runtime::TryRuntimeError; use codec::{Decode, Encode}; use frame_support::{pallet_prelude::*, storage_alias, DefaultNoBound}; use sp_std::{marker::PhantomData, prelude::*}; -mod old { +mod v10 { use super::*; #[derive(Encode, Decode, TypeInfo, MaxEncodedLen)] @@ -51,11 +51,11 @@ pub struct DeletionQueueManager { #[cfg(any(feature = "runtime-benchmarks", feature = "try-runtime"))] pub fn fill_old_queue(len: usize) { - let queue: Vec = - core::iter::repeat_with(|| old::DeletedContract { trie_id: Default::default() }) + let queue: Vec = + core::iter::repeat_with(|| v10::DeletedContract { trie_id: Default::default() }) .take(len) .collect(); - old::DeletionQueue::::set(Some(queue)); + v10::DeletionQueue::::set(Some(queue)); } #[storage_alias] @@ -80,7 +80,7 @@ impl MigrationStep for Migration { } fn step(&mut self) -> (IsFinished, Weight) { - let Some(old_queue) = old::DeletionQueue::::take() else { + let Some(old_queue) = v10::DeletionQueue::::take() else { return (IsFinished::Yes, Weight::zero()) }; let len = old_queue.len(); @@ -106,7 +106,7 @@ impl MigrationStep for Migration { #[cfg(feature = "try-runtime")] fn pre_upgrade_step() -> Result, TryRuntimeError> { - let old_queue = old::DeletionQueue::::take().unwrap_or_default(); + let old_queue = v10::DeletionQueue::::take().unwrap_or_default(); if old_queue.is_empty() { let len = 10u32; diff --git a/substrate/frame/contracts/src/migration/v12.rs b/substrate/frame/contracts/src/migration/v12.rs index 4ddc57584b30..1a5516c4a822 100644 --- a/substrate/frame/contracts/src/migration/v12.rs +++ b/substrate/frame/contracts/src/migration/v12.rs @@ -34,7 +34,7 @@ use sp_runtime::TryRuntimeError; use sp_runtime::{traits::Zero, FixedPointNumber, FixedU128, Saturating}; use sp_std::prelude::*; -mod old { +mod v11 { use super::*; pub type BalanceOf = , #[codec(compact)] - deposit: old::BalanceOf, + deposit: v11::BalanceOf, #[codec(compact)] refcount: u64, determinism: Determinism, @@ -112,17 +112,17 @@ where let hash = T::Hashing::hash(&code); PristineCode::::insert(hash, code.clone()); - let module = old::PrefabWasmModule { + let module = v11::PrefabWasmModule { instruction_weights_version: Default::default(), initial: Default::default(), maximum: Default::default(), code, determinism: Determinism::Enforced, }; - old::CodeStorage::::insert(hash, module); + v11::CodeStorage::::insert(hash, module); - let info = old::OwnerInfo { owner: account, deposit: u32::MAX.into(), refcount: u64::MAX }; - old::OwnerInfoOf::::insert(hash, info); + let info = v11::OwnerInfo { owner: account, deposit: u32::MAX.into(), refcount: u64::MAX }; + v11::OwnerInfoOf::::insert(hash, info); } #[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)] @@ -148,16 +148,16 @@ where fn step(&mut self) -> (IsFinished, Weight) { let mut iter = if let Some(last_key) = self.last_code_hash.take() { - old::OwnerInfoOf::::iter_from( - old::OwnerInfoOf::::hashed_key_for(last_key), + v11::OwnerInfoOf::::iter_from( + v11::OwnerInfoOf::::hashed_key_for(last_key), ) } else { - old::OwnerInfoOf::::iter() + v11::OwnerInfoOf::::iter() }; if let Some((hash, old_info)) = iter.next() { log::debug!(target: LOG_TARGET, "Migrating OwnerInfo for code_hash {:?}", hash); - let module = old::CodeStorage::::take(hash) + let module = v11::CodeStorage::::take(hash) .expect(format!("No PrefabWasmModule found for code_hash: {:?}", hash).as_str()); let code_len = module.code.len(); @@ -184,7 +184,7 @@ where let bytes_before = module .encoded_size() .saturating_add(code_len) - .saturating_add(old::OwnerInfo::::max_encoded_len()) + .saturating_add(v11::OwnerInfo::::max_encoded_len()) as u32; let items_before = 3u32; let deposit_expected_before = price_per_byte @@ -241,10 +241,10 @@ where fn pre_upgrade_step() -> Result, TryRuntimeError> { let len = 100; log::debug!(target: LOG_TARGET, "Taking sample of {} OwnerInfo(s)", len); - let sample: Vec<_> = old::OwnerInfoOf::::iter() + let sample: Vec<_> = v11::OwnerInfoOf::::iter() .take(len) .map(|(k, v)| { - let module = old::CodeStorage::::get(k) + let module = v11::CodeStorage::::get(k) .expect("No PrefabWasmModule found for code_hash: {:?}"); let info: CodeInfo = CodeInfo { determinism: module.determinism, @@ -258,9 +258,9 @@ where .collect(); let storage: u32 = - old::CodeStorage::::iter().map(|(_k, v)| v.encoded_size() as u32).sum(); - let mut deposit: old::BalanceOf = Default::default(); - old::OwnerInfoOf::::iter().for_each(|(_k, v)| deposit += v.deposit); + v11::CodeStorage::::iter().map(|(_k, v)| v.encoded_size() as u32).sum(); + let mut deposit: v11::BalanceOf = Default::default(); + v11::OwnerInfoOf::::iter().for_each(|(_k, v)| deposit += v.deposit); Ok((sample, deposit, storage).encode()) } @@ -269,7 +269,7 @@ where fn post_upgrade_step(state: Vec) -> Result<(), TryRuntimeError> { let state = <( Vec<(CodeHash, CodeInfo)>, - old::BalanceOf, + v11::BalanceOf, u32, ) as Decode>::decode(&mut &state[..]) .unwrap(); @@ -283,7 +283,7 @@ where ensure!(info.refcount == old.refcount, "invalid refcount"); } - if let Some((k, _)) = old::CodeStorage::::iter().next() { + if let Some((k, _)) = v11::CodeStorage::::iter().next() { log::warn!( target: LOG_TARGET, "CodeStorage is still NOT empty, found code_hash: {:?}", @@ -292,7 +292,7 @@ where } else { log::debug!(target: LOG_TARGET, "CodeStorage is empty."); } - if let Some((k, _)) = old::OwnerInfoOf::::iter().next() { + if let Some((k, _)) = v11::OwnerInfoOf::::iter().next() { log::warn!( target: LOG_TARGET, "OwnerInfoOf is still NOT empty, found code_hash: {:?}", @@ -302,7 +302,7 @@ where log::debug!(target: LOG_TARGET, "OwnerInfoOf is empty."); } - let mut deposit: old::BalanceOf = Default::default(); + let mut deposit: v11::BalanceOf = Default::default(); let mut items = 0u32; let mut storage_info = 0u32; CodeInfoOf::::iter().for_each(|(_k, v)| { diff --git a/substrate/frame/contracts/src/migration/v13.rs b/substrate/frame/contracts/src/migration/v13.rs index dd2eb12eb62a..498c44d53abc 100644 --- a/substrate/frame/contracts/src/migration/v13.rs +++ b/substrate/frame/contracts/src/migration/v13.rs @@ -28,7 +28,7 @@ use frame_support::{pallet_prelude::*, storage_alias, DefaultNoBound}; use sp_runtime::BoundedBTreeMap; use sp_std::prelude::*; -mod old { +mod v12 { use super::*; #[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] @@ -59,7 +59,7 @@ pub fn store_old_contract_info(account: T::AccountId, info: crate::Co let entropy = (b"contract_depo_v1", account.clone()).using_encoded(T::Hashing::hash); let deposit_account = Decode::decode(&mut TrailingZeroInput::new(entropy.as_ref())) .expect("infinite length input; no invalid inputs for type; qed"); - let info = old::ContractInfo { + let info = v12::ContractInfo { trie_id: info.trie_id.clone(), deposit_account, code_hash: info.code_hash, @@ -69,7 +69,7 @@ pub fn store_old_contract_info(account: T::AccountId, info: crate::Co storage_item_deposit: Default::default(), storage_base_deposit: Default::default(), }; - old::ContractInfoOf::::insert(account, info); + v12::ContractInfoOf::::insert(account, info); } #[storage_alias] @@ -104,11 +104,11 @@ impl MigrationStep for Migration { fn step(&mut self) -> (IsFinished, Weight) { let mut iter = if let Some(last_account) = self.last_account.take() { - old::ContractInfoOf::::iter_from(old::ContractInfoOf::::hashed_key_for( + v12::ContractInfoOf::::iter_from(v12::ContractInfoOf::::hashed_key_for( last_account, )) } else { - old::ContractInfoOf::::iter() + v12::ContractInfoOf::::iter() }; if let Some((key, old)) = iter.next() { diff --git a/substrate/frame/contracts/src/migration/v14.rs b/substrate/frame/contracts/src/migration/v14.rs index 94534d05fdf8..09da09e5bcfb 100644 --- a/substrate/frame/contracts/src/migration/v14.rs +++ b/substrate/frame/contracts/src/migration/v14.rs @@ -44,7 +44,7 @@ use sp_runtime::{traits::Zero, Saturating}; #[cfg(feature = "try-runtime")] use sp_std::collections::btree_map::BTreeMap; -mod old { +mod v13 { use super::*; pub type BalanceOf = , #[codec(compact)] - pub deposit: old::BalanceOf, + pub deposit: v13::BalanceOf, #[codec(compact)] pub refcount: u64, pub determinism: Determinism, @@ -86,14 +86,14 @@ where let code = vec![42u8; len as usize]; let hash = T::Hashing::hash(&code); - let info = old::CodeInfo { + let info = v13::CodeInfo { owner: account, deposit: 10_000u32.into(), refcount: u64::MAX, determinism: Determinism::Enforced, code_len: len, }; - old::CodeInfoOf::::insert(hash, info); + v13::CodeInfoOf::::insert(hash, info); } #[cfg(feature = "try-runtime")] @@ -105,9 +105,9 @@ where OldCurrency: ReservableCurrency<::AccountId>, { /// Total reserved balance as code upload deposit for the owner. - reserved: old::BalanceOf, + reserved: v13::BalanceOf, /// Total balance of the owner. - total: old::BalanceOf, + total: v13::BalanceOf, } #[derive(Encode, Decode, MaxEncodedLen, DefaultNoBound)] @@ -134,11 +134,11 @@ where fn step(&mut self) -> (IsFinished, Weight) { let mut iter = if let Some(last_hash) = self.last_code_hash.take() { - old::CodeInfoOf::::iter_from( - old::CodeInfoOf::::hashed_key_for(last_hash), + v13::CodeInfoOf::::iter_from( + v13::CodeInfoOf::::hashed_key_for(last_hash), ) } else { - old::CodeInfoOf::::iter() + v13::CodeInfoOf::::iter() }; if let Some((hash, code_info)) = iter.next() { @@ -194,7 +194,7 @@ where #[cfg(feature = "try-runtime")] fn pre_upgrade_step() -> Result, TryRuntimeError> { - let info: Vec<_> = old::CodeInfoOf::::iter().collect(); + let info: Vec<_> = v13::CodeInfoOf::::iter().collect(); let mut owner_balance_allocation = BTreeMap::, BalanceAllocation>::new(); diff --git a/substrate/frame/contracts/src/migration/v15.rs b/substrate/frame/contracts/src/migration/v15.rs index 180fe855ca66..c77198d6fea0 100644 --- a/substrate/frame/contracts/src/migration/v15.rs +++ b/substrate/frame/contracts/src/migration/v15.rs @@ -46,7 +46,7 @@ use sp_runtime::{traits::Zero, Saturating}; #[cfg(feature = "try-runtime")] use sp_std::vec::Vec; -mod old { +mod v14 { use super::*; #[derive( @@ -81,7 +81,7 @@ pub fn store_old_contract_info(account: T::AccountId, info: crate::Co let entropy = (b"contract_depo_v1", account.clone()).using_encoded(T::Hashing::hash); let deposit_account = Decode::decode(&mut TrailingZeroInput::new(entropy.as_ref())) .expect("infinite length input; no invalid inputs for type; qed"); - let info = old::ContractInfo { + let info = v14::ContractInfo { trie_id: info.trie_id.clone(), deposit_account, code_hash: info.code_hash, @@ -92,7 +92,7 @@ pub fn store_old_contract_info(account: T::AccountId, info: crate::Co storage_base_deposit: info.storage_base_deposit(), delegate_dependencies: info.delegate_dependencies().clone(), }; - old::ContractInfoOf::::insert(account, info); + v14::ContractInfoOf::::insert(account, info); } #[derive(Encode, Decode, CloneNoBound, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] @@ -127,11 +127,11 @@ impl MigrationStep for Migration { fn step(&mut self) -> (IsFinished, Weight) { let mut iter = if let Some(last_account) = self.last_account.take() { - old::ContractInfoOf::::iter_from(old::ContractInfoOf::::hashed_key_for( + v14::ContractInfoOf::::iter_from(v14::ContractInfoOf::::hashed_key_for( last_account, )) } else { - old::ContractInfoOf::::iter() + v14::ContractInfoOf::::iter() }; if let Some((account, old_contract)) = iter.next() { @@ -243,11 +243,11 @@ impl MigrationStep for Migration { #[cfg(feature = "try-runtime")] fn pre_upgrade_step() -> Result, TryRuntimeError> { - let sample: Vec<_> = old::ContractInfoOf::::iter().take(100).collect(); + let sample: Vec<_> = v14::ContractInfoOf::::iter().take(100).collect(); log::debug!(target: LOG_TARGET, "Taking sample of {} contracts", sample.len()); - let state: Vec<(T::AccountId, old::ContractInfo, BalanceOf, BalanceOf)> = sample + let state: Vec<(T::AccountId, v14::ContractInfo, BalanceOf, BalanceOf)> = sample .iter() .map(|(account, contract)| { ( @@ -265,7 +265,7 @@ impl MigrationStep for Migration { #[cfg(feature = "try-runtime")] fn post_upgrade_step(state: Vec) -> Result<(), TryRuntimeError> { let sample = - , BalanceOf, BalanceOf)> as Decode>::decode( + , BalanceOf, BalanceOf)> as Decode>::decode( &mut &state[..], ) .expect("pre_upgrade_step provides a valid state; qed"); diff --git a/substrate/frame/examples/single-block-migrations/src/lib.rs b/substrate/frame/examples/single-block-migrations/src/lib.rs index 6cf01ff25104..f727b7ca8d6e 100644 --- a/substrate/frame/examples/single-block-migrations/src/lib.rs +++ b/substrate/frame/examples/single-block-migrations/src/lib.rs @@ -94,12 +94,12 @@ //! //! To keep the migration logic organised, it is split across additional modules: //! -//! ### `mod old` +//! ### `mod v0` //! -//! Here we define a [`storage_alias`](frame_support::storage_alias) for the old [`Value`] +//! Here we define a [`storage_alias`](frame_support::storage_alias) for the old v0 [`Value`] //! format. //! -//! This allows reading the old value from storage during the migration. +//! This allows reading the old v0 value from storage during the migration. //! //! ### `mod version_unchecked` //! diff --git a/substrate/frame/examples/single-block-migrations/src/migrations/v1.rs b/substrate/frame/examples/single-block-migrations/src/migrations/v1.rs index bda231c78415..e7968569d8cf 100644 --- a/substrate/frame/examples/single-block-migrations/src/migrations/v1.rs +++ b/substrate/frame/examples/single-block-migrations/src/migrations/v1.rs @@ -25,8 +25,8 @@ use sp_std::vec::Vec; /// Collection of storage item formats from the previous storage version. /// -/// Required so we can read values in the old storage format during the migration. -mod old { +/// Required so we can read values in the v0 storage format during the migration. +mod v0 { use super::*; /// V0 type for [`crate::Value`]. @@ -65,7 +65,7 @@ mod version_unchecked { use codec::Encode; // Access the old value using the `storage_alias` type - let old_value = old::Value::::get(); + let old_value = v0::Value::::get(); // Return it as an encoded `Vec` Ok(old_value.encode()) } @@ -77,7 +77,7 @@ mod version_unchecked { /// [`crate::CurrentAndPreviousValue`]. fn on_runtime_upgrade() -> frame_support::weights::Weight { // Read the old value from storage - if let Some(old_value) = old::Value::::get() { + if let Some(old_value) = v0::Value::::get() { // Write the new value to storage let new = crate::CurrentAndPreviousValue { current: old_value, previous: None }; crate::Value::::put(new); @@ -165,7 +165,7 @@ mod test { new_test_ext().execute_with(|| { // By default, no value should be set. Verify this assumption. assert!(crate::Value::::get().is_none()); - assert!(old::Value::::get().is_none()); + assert!(v0::Value::::get().is_none()); // Get the pre_upgrade bytes let bytes = match MigrateV0ToV1::::pre_upgrade() { @@ -192,7 +192,7 @@ mod test { new_test_ext().execute_with(|| { // Set up an initial value let initial_value = 42; - old::Value::::put(initial_value); + v0::Value::::put(initial_value); // Get the pre_upgrade bytes let bytes = match MigrateV0ToV1::::pre_upgrade() { diff --git a/substrate/frame/society/src/migrations.rs b/substrate/frame/society/src/migrations.rs index a995c9d7be7f..3036cc2a3013 100644 --- a/substrate/frame/society/src/migrations.rs +++ b/substrate/frame/society/src/migrations.rs @@ -44,7 +44,7 @@ impl< let onchain = Pallet::::on_chain_storage_version(); ensure!(onchain == 0 && current == 2, "pallet_society: invalid version"); - Ok((old::Candidates::::get(), old::Members::::get()).encode()) + Ok((v0::Candidates::::get(), v0::Members::::get()).encode()) } fn on_runtime_upgrade() -> Weight { @@ -103,7 +103,7 @@ pub type MigrateToV2 = frame_support::migrations::VersionedMi ::DbWeight, >; -pub(crate) mod old { +pub(crate) mod v0 { use super::*; use frame_support::storage_alias; @@ -230,37 +230,37 @@ pub fn assert_internal_consistency, I: Instance + 'static>() { } // We don't use these - make sure they don't exist. - assert_eq!(old::SuspendedCandidates::::iter().count(), 0); - assert_eq!(old::Strikes::::iter().count(), 0); - assert_eq!(old::Vouching::::iter().count(), 0); - assert!(!old::Defender::::exists()); - assert!(!old::Members::::exists()); + assert_eq!(v0::SuspendedCandidates::::iter().count(), 0); + assert_eq!(v0::Strikes::::iter().count(), 0); + assert_eq!(v0::Vouching::::iter().count(), 0); + assert!(!v0::Defender::::exists()); + assert!(!v0::Members::::exists()); } pub fn from_original, I: Instance + 'static>( past_payouts: &mut [(::AccountId, BalanceOf)], ) -> Result { // Migrate Bids from old::Bids (just a trunctation). - Bids::::put(BoundedVec::<_, T::MaxBids>::truncate_from(old::Bids::::take())); + Bids::::put(BoundedVec::<_, T::MaxBids>::truncate_from(v0::Bids::::take())); // Initialise round counter. RoundCount::::put(0); // Migrate Candidates from old::Candidates - for Bid { who: candidate, kind, value } in old::Candidates::::take().into_iter() { + for Bid { who: candidate, kind, value } in v0::Candidates::::take().into_iter() { let mut tally = Tally::default(); // Migrate Votes from old::Votes // No need to drain, since we're overwriting values. - for (voter, vote) in old::Votes::::iter_prefix(&candidate) { + for (voter, vote) in v0::Votes::::iter_prefix(&candidate) { Votes::::insert( &candidate, &voter, - Vote { approve: vote == old::Vote::Approve, weight: 1 }, + Vote { approve: vote == v0::Vote::Approve, weight: 1 }, ); match vote { - old::Vote::Approve => tally.approvals.saturating_inc(), - old::Vote::Reject => tally.rejections.saturating_inc(), - old::Vote::Skeptic => Skeptic::::put(&voter), + v0::Vote::Approve => tally.approvals.saturating_inc(), + v0::Vote::Reject => tally.rejections.saturating_inc(), + v0::Vote::Skeptic => Skeptic::::put(&voter), } } Candidates::::insert( @@ -271,9 +271,9 @@ pub fn from_original, I: Instance + 'static>( // Migrate Members from old::Members old::Strikes old::Vouching let mut member_count = 0; - for member in old::Members::::take() { - let strikes = old::Strikes::::take(&member); - let vouching = old::Vouching::::take(&member); + for member in v0::Members::::take() { + let strikes = v0::Strikes::::take(&member); + let vouching = v0::Vouching::::take(&member); let record = MemberRecord { index: member_count, rank: 0, strikes, vouching }; Members::::insert(&member, record); MemberByIndex::::insert(member_count, &member); @@ -314,7 +314,7 @@ pub fn from_original, I: Instance + 'static>( // Migrate Payouts from: old::Payouts and raw info (needed since we can't query old chain // state). past_payouts.sort(); - for (who, mut payouts) in old::Payouts::::iter() { + for (who, mut payouts) in v0::Payouts::::iter() { payouts.truncate(T::MaxPayouts::get() as usize); // ^^ Safe since we already truncated. let paid = past_payouts @@ -329,19 +329,19 @@ pub fn from_original, I: Instance + 'static>( } // Migrate SuspendedMembers from old::SuspendedMembers old::Strikes old::Vouching. - for who in old::SuspendedMembers::::iter_keys() { - let strikes = old::Strikes::::take(&who); - let vouching = old::Vouching::::take(&who); + for who in v0::SuspendedMembers::::iter_keys() { + let strikes = v0::Strikes::::take(&who); + let vouching = v0::Vouching::::take(&who); let record = MemberRecord { index: 0, rank: 0, strikes, vouching }; SuspendedMembers::::insert(&who, record); } // Any suspended candidates remaining are rejected. - let _ = old::SuspendedCandidates::::clear(u32::MAX, None); + let _ = v0::SuspendedCandidates::::clear(u32::MAX, None); // We give the current defender the benefit of the doubt. - old::Defender::::kill(); - let _ = old::DefenderVotes::::clear(u32::MAX, None); + v0::Defender::::kill(); + let _ = v0::DefenderVotes::::clear(u32::MAX, None); Ok(T::BlockWeights::get().max_block) } diff --git a/substrate/frame/society/src/tests.rs b/substrate/frame/society/src/tests.rs index ea2afef3b32b..df2f3095e454 100644 --- a/substrate/frame/society/src/tests.rs +++ b/substrate/frame/society/src/tests.rs @@ -18,7 +18,7 @@ //! Tests for the module. use super::*; -use migrations::old; +use migrations::v0; use mock::*; use frame_support::{assert_noop, assert_ok}; @@ -32,41 +32,41 @@ use RuntimeOrigin as Origin; #[test] fn migration_works() { EnvBuilder::new().founded(false).execute(|| { - use old::Vote::*; + use v0::Vote::*; // Initialise the old storage items. Founder::::put(10); Head::::put(30); - old::Members::::put(vec![10, 20, 30]); - old::Vouching::::insert(30, Vouching); - old::Vouching::::insert(40, Banned); - old::Strikes::::insert(20, 1); - old::Strikes::::insert(30, 2); - old::Strikes::::insert(40, 5); - old::Payouts::::insert(20, vec![(1, 1)]); - old::Payouts::::insert( + v0::Members::::put(vec![10, 20, 30]); + v0::Vouching::::insert(30, Vouching); + v0::Vouching::::insert(40, Banned); + v0::Strikes::::insert(20, 1); + v0::Strikes::::insert(30, 2); + v0::Strikes::::insert(40, 5); + v0::Payouts::::insert(20, vec![(1, 1)]); + v0::Payouts::::insert( 30, (0..=::MaxPayouts::get()) .map(|i| (i as u64, i as u64)) .collect::>(), ); - old::SuspendedMembers::::insert(40, true); + v0::SuspendedMembers::::insert(40, true); - old::Defender::::put(20); - old::DefenderVotes::::insert(10, Approve); - old::DefenderVotes::::insert(20, Approve); - old::DefenderVotes::::insert(30, Reject); + v0::Defender::::put(20); + v0::DefenderVotes::::insert(10, Approve); + v0::DefenderVotes::::insert(20, Approve); + v0::DefenderVotes::::insert(30, Reject); - old::SuspendedCandidates::::insert(50, (10, Deposit(100))); + v0::SuspendedCandidates::::insert(50, (10, Deposit(100))); - old::Candidates::::put(vec![ + v0::Candidates::::put(vec![ Bid { who: 60, kind: Deposit(100), value: 200 }, Bid { who: 70, kind: Vouch(30, 30), value: 100 }, ]); - old::Votes::::insert(60, 10, Approve); - old::Votes::::insert(70, 10, Reject); - old::Votes::::insert(70, 20, Approve); - old::Votes::::insert(70, 30, Approve); + v0::Votes::::insert(60, 10, Approve); + v0::Votes::::insert(70, 10, Reject); + v0::Votes::::insert(70, 20, Approve); + v0::Votes::::insert(70, 30, Approve); let bids = (0..=::MaxBids::get()) .map(|i| Bid { @@ -75,7 +75,7 @@ fn migration_works() { value: 10u64 + i as u64, }) .collect::>(); - old::Bids::::put(bids); + v0::Bids::::put(bids); migrations::from_original::(&mut [][..]).expect("migration failed"); migrations::assert_internal_consistency::(); diff --git a/substrate/frame/support/procedural/src/lib.rs b/substrate/frame/support/procedural/src/lib.rs index 384956f24199..f627a830583a 100644 --- a/substrate/frame/support/procedural/src/lib.rs +++ b/substrate/frame/support/procedural/src/lib.rs @@ -571,9 +571,9 @@ pub fn __create_tt_macro(input: TokenStream) -> TokenStream { /// `Value` and writing it back to storage in the new format, so that the on-chain storage layout is /// consistent with what is defined in the pallet. /// -/// We can read the old value of `Value` in the migration by creating a `storage_alias`: +/// We can read the old v0 value of `Value` in the migration by creating a `storage_alias`: /// ```ignore -/// pub(crate) mod old { +/// pub(crate) mod v0 { /// use super::*; /// /// #[storage_alias] @@ -581,7 +581,7 @@ pub fn __create_tt_macro(input: TokenStream) -> TokenStream { /// } /// ``` /// -/// The developer can now access the old value of `Value` by calling `old::Value::::get()`. +/// The developer can now access the old value of `Value` by calling `v0::Value::::get()`. #[proc_macro_attribute] pub fn storage_alias(attributes: TokenStream, input: TokenStream) -> TokenStream { storage_alias::storage_alias(attributes.into(), input.into()) From 8f32ece673b0004bcf6756a5f19be5fc53e91538 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 13:15:29 +0400 Subject: [PATCH 74/98] add benchmark note --- substrate/frame/support/src/traits/hooks.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/substrate/frame/support/src/traits/hooks.rs b/substrate/frame/support/src/traits/hooks.rs index 8173cfc06a9a..dac9ab8d28d1 100644 --- a/substrate/frame/support/src/traits/hooks.rs +++ b/substrate/frame/support/src/traits/hooks.rs @@ -404,6 +404,11 @@ pub trait Hooks { /// /// Failure to adequately check storage versions can result in accidental repetitive execution /// of the hook, which can be catastrophic. + /// + /// ## Implementation Note: Weight + /// + /// Typically, implementations of this method are simple enough that weights can be calculated + /// manually. However, if required, a benchmark can also be used. fn on_runtime_upgrade() -> Weight { Weight::zero() } From ec3ce8cd758f17fc16cf2b7252f939c72756c5fa Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 13:16:48 +0400 Subject: [PATCH 75/98] take --- .../frame/examples/single-block-migrations/src/migrations/v1.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/examples/single-block-migrations/src/migrations/v1.rs b/substrate/frame/examples/single-block-migrations/src/migrations/v1.rs index e7968569d8cf..b46640a32020 100644 --- a/substrate/frame/examples/single-block-migrations/src/migrations/v1.rs +++ b/substrate/frame/examples/single-block-migrations/src/migrations/v1.rs @@ -77,7 +77,7 @@ mod version_unchecked { /// [`crate::CurrentAndPreviousValue`]. fn on_runtime_upgrade() -> frame_support::weights::Weight { // Read the old value from storage - if let Some(old_value) = v0::Value::::get() { + if let Some(old_value) = v0::Value::::take() { // Write the new value to storage let new = crate::CurrentAndPreviousValue { current: old_value, previous: None }; crate::Value::::put(new); From 0ae45d84e266e304db0e26c2c43dc121df5ed3fa Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 13:19:07 +0400 Subject: [PATCH 76/98] fix typo --- substrate/frame/support/src/traits/hooks.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/support/src/traits/hooks.rs b/substrate/frame/support/src/traits/hooks.rs index dac9ab8d28d1..17a27582c0dc 100644 --- a/substrate/frame/support/src/traits/hooks.rs +++ b/substrate/frame/support/src/traits/hooks.rs @@ -90,7 +90,7 @@ impl OnIdle for Tuple { /// /// Implementing this trait for a pallet let's you express operations that should /// happen at genesis. It will be called in an externalities provided environment and -/// will set the genesis state root after all pallets have written their genesis state. +/// will set the genesis state after all pallets have written their genesis state. #[cfg_attr(all(not(feature = "tuples-96"), not(feature = "tuples-128")), impl_for_tuples(64))] #[cfg_attr(all(feature = "tuples-96", not(feature = "tuples-128")), impl_for_tuples(96))] #[cfg_attr(feature = "tuples-128", impl_for_tuples(128))] From f5ac289d1ca0596d3813f214a8873f225905c9d6 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 13:20:35 +0400 Subject: [PATCH 77/98] address comment --- substrate/frame/support/src/traits/hooks.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/substrate/frame/support/src/traits/hooks.rs b/substrate/frame/support/src/traits/hooks.rs index 17a27582c0dc..72f047c3a73d 100644 --- a/substrate/frame/support/src/traits/hooks.rs +++ b/substrate/frame/support/src/traits/hooks.rs @@ -388,11 +388,8 @@ pub trait Hooks { /// /// ## Implementation Note: Standalone Migrations /// - /// An increasingly common way to define migrations is - /// - /// Additional "upgrade hooks" can be created by pallets by a manual implementation of - /// [`Hooks::on_runtime_upgrade`] which can be passed on to `Executive` at the top level - /// runtime. + /// Additional migrations can be created by directly implementing [`OnRuntimeUpgrade`] on + /// structs and passing them to `Executive`. /// /// ## Implementation Note: Pallet Versioning /// From 7f21f42801f05ec0e162564879bcd56a3a67f801 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 13:47:30 +0400 Subject: [PATCH 78/98] current storage version -> in_code storage version --- cumulus/pallets/collator-selection/src/lib.rs | 2 +- .../pallets/parachain-system/src/migration.rs | 2 +- cumulus/pallets/xcmp-queue/src/migration.rs | 2 +- .../pallets/collective-content/src/lib.rs | 2 +- .../assets/asset-hub-rococo/src/lib.rs | 14 ++++----- .../assets/asset-hub-westend/src/lib.rs | 6 ++-- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 4 +-- .../bridge-hubs/bridge-hub-westend/src/lib.rs | 4 +-- .../node/service/src/parachains_db/upgrade.rs | 2 +- .../runtime/common/src/assigned_slots/mod.rs | 2 +- polkadot/runtime/common/src/crowdloan/mod.rs | 2 +- .../runtime/common/src/paras_registrar/mod.rs | 2 +- .../runtime/parachains/src/configuration.rs | 2 +- polkadot/runtime/parachains/src/disputes.rs | 2 +- .../parachains/src/session_info/migration.rs | 2 +- substrate/frame/alliance/src/migration.rs | 2 +- substrate/frame/assets/src/lib.rs | 2 +- substrate/frame/assets/src/migration.rs | 16 +++++----- substrate/frame/balances/src/lib.rs | 2 +- substrate/frame/collective/src/lib.rs | 2 +- substrate/frame/contracts/src/lib.rs | 2 +- substrate/frame/contracts/src/migration.rs | 20 ++++++------ substrate/frame/democracy/src/lib.rs | 2 +- .../election-provider-multi-phase/src/lib.rs | 2 +- .../src/migrations.rs | 4 +-- substrate/frame/elections-phragmen/src/lib.rs | 2 +- .../frame/fast-unstake/src/migrations.rs | 4 +-- substrate/frame/grandpa/src/lib.rs | 2 +- substrate/frame/im-online/src/lib.rs | 2 +- substrate/frame/im-online/src/migration.rs | 2 +- substrate/frame/membership/src/lib.rs | 2 +- substrate/frame/multisig/src/lib.rs | 2 +- substrate/frame/multisig/src/migrations.rs | 2 +- substrate/frame/nfts/src/lib.rs | 2 +- substrate/frame/nfts/src/migration.rs | 12 +++---- substrate/frame/nomination-pools/src/lib.rs | 2 +- .../frame/nomination-pools/src/migration.rs | 28 ++++++++--------- substrate/frame/preimage/src/lib.rs | 2 +- substrate/frame/referenda/src/lib.rs | 2 +- substrate/frame/referenda/src/migration.rs | 6 ++-- substrate/frame/scheduler/src/lib.rs | 2 +- substrate/frame/session/src/historical/mod.rs | 2 +- substrate/frame/session/src/lib.rs | 2 +- substrate/frame/society/src/migrations.rs | 6 ++-- substrate/frame/staking/src/migrations.rs | 12 +++---- substrate/frame/staking/src/pallet/mod.rs | 2 +- substrate/frame/support/procedural/src/lib.rs | 2 +- .../procedural/src/pallet/expand/hooks.rs | 22 ++++++------- .../src/pallet/expand/pallet_struct.rs | 6 ++-- .../src/pallet/parse/pallet_struct.rs | 2 +- substrate/frame/support/src/lib.rs | 4 +-- substrate/frame/support/src/migrations.rs | 31 +++++++++---------- .../frame/support/src/traits/metadata.rs | 21 ++++++------- .../support/test/tests/construct_runtime.rs | 2 +- substrate/frame/support/test/tests/pallet.rs | 22 ++++++------- .../compare_unset_storage_version.rs | 2 +- .../compare_unset_storage_version.stderr | 2 +- substrate/frame/system/src/lib.rs | 2 +- substrate/frame/tips/src/lib.rs | 2 +- 59 files changed, 160 insertions(+), 162 deletions(-) diff --git a/cumulus/pallets/collator-selection/src/lib.rs b/cumulus/pallets/collator-selection/src/lib.rs index 7449f4d68c7e..fb4c4a445df2 100644 --- a/cumulus/pallets/collator-selection/src/lib.rs +++ b/cumulus/pallets/collator-selection/src/lib.rs @@ -118,7 +118,7 @@ pub mod pallet { use sp_staking::SessionIndex; use sp_std::vec::Vec; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); type BalanceOf = diff --git a/cumulus/pallets/parachain-system/src/migration.rs b/cumulus/pallets/parachain-system/src/migration.rs index a92f85b9cd42..30106aceab5a 100644 --- a/cumulus/pallets/parachain-system/src/migration.rs +++ b/cumulus/pallets/parachain-system/src/migration.rs @@ -21,7 +21,7 @@ use frame_support::{ weights::Weight, }; -/// The current storage version. +/// The in-code storage version. pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(2); /// Migrates the pallet storage to the most recent version. diff --git a/cumulus/pallets/xcmp-queue/src/migration.rs b/cumulus/pallets/xcmp-queue/src/migration.rs index 6d7f434b041a..722fd280aefc 100644 --- a/cumulus/pallets/xcmp-queue/src/migration.rs +++ b/cumulus/pallets/xcmp-queue/src/migration.rs @@ -24,7 +24,7 @@ use frame_support::{ weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, Weight}, }; -/// The current storage version. +/// The in-code storage version. pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(3); pub const LOG: &str = "runtime::xcmp-queue-migration"; diff --git a/cumulus/parachains/pallets/collective-content/src/lib.rs b/cumulus/parachains/pallets/collective-content/src/lib.rs index 7a685858accb..b1c960ad6a0d 100644 --- a/cumulus/parachains/pallets/collective-content/src/lib.rs +++ b/cumulus/parachains/pallets/collective-content/src/lib.rs @@ -59,7 +59,7 @@ pub mod pallet { use frame_system::pallet_prelude::*; use sp_runtime::{traits::BadOrigin, Saturating}; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); #[pallet::pallet] diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index c6c9735ecb1e..ac0130d9dfcb 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -971,37 +971,37 @@ impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions { let mut writes = 0; if PolkadotXcm::on_chain_storage_version() == StorageVersion::new(0) { - PolkadotXcm::current_storage_version().put::(); + PolkadotXcm::in_code_storage_version().put::(); writes.saturating_inc(); } if Multisig::on_chain_storage_version() == StorageVersion::new(0) { - Multisig::current_storage_version().put::(); + Multisig::in_code_storage_version().put::(); writes.saturating_inc(); } if Assets::on_chain_storage_version() == StorageVersion::new(0) { - Assets::current_storage_version().put::(); + Assets::in_code_storage_version().put::(); writes.saturating_inc(); } if Uniques::on_chain_storage_version() == StorageVersion::new(0) { - Uniques::current_storage_version().put::(); + Uniques::in_code_storage_version().put::(); writes.saturating_inc(); } if Nfts::on_chain_storage_version() == StorageVersion::new(0) { - Nfts::current_storage_version().put::(); + Nfts::in_code_storage_version().put::(); writes.saturating_inc(); } if ForeignAssets::on_chain_storage_version() == StorageVersion::new(0) { - ForeignAssets::current_storage_version().put::(); + ForeignAssets::in_code_storage_version().put::(); writes.saturating_inc(); } if PoolAssets::on_chain_storage_version() == StorageVersion::new(0) { - PoolAssets::current_storage_version().put::(); + PoolAssets::in_code_storage_version().put::(); writes.saturating_inc(); } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 4eb3e2471ce5..62a839232648 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -1027,17 +1027,17 @@ impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions { let mut writes = 0; if PolkadotXcm::on_chain_storage_version() == StorageVersion::new(0) { - PolkadotXcm::current_storage_version().put::(); + PolkadotXcm::in_code_storage_version().put::(); writes.saturating_inc(); } if ForeignAssets::on_chain_storage_version() == StorageVersion::new(0) { - ForeignAssets::current_storage_version().put::(); + ForeignAssets::in_code_storage_version().put::(); writes.saturating_inc(); } if PoolAssets::on_chain_storage_version() == StorageVersion::new(0) { - PoolAssets::current_storage_version().put::(); + PoolAssets::in_code_storage_version().put::(); writes.saturating_inc(); } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 152e071a26a5..3684ac0b4bf5 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -136,12 +136,12 @@ impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions { let mut writes = 0; if PolkadotXcm::on_chain_storage_version() == StorageVersion::new(0) { - PolkadotXcm::current_storage_version().put::(); + PolkadotXcm::in_code_storage_version().put::(); writes.saturating_inc(); } if Balances::on_chain_storage_version() == StorageVersion::new(0) { - Balances::current_storage_version().put::(); + Balances::in_code_storage_version().put::(); writes.saturating_inc(); } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index 7b8ea1b7734e..183d166df3d0 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -136,12 +136,12 @@ impl frame_support::traits::OnRuntimeUpgrade for InitStorageVersions { let mut writes = 0; if PolkadotXcm::on_chain_storage_version() == StorageVersion::new(0) { - PolkadotXcm::current_storage_version().put::(); + PolkadotXcm::in_code_storage_version().put::(); writes.saturating_inc(); } if Balances::on_chain_storage_version() == StorageVersion::new(0) { - Balances::current_storage_version().put::(); + Balances::in_code_storage_version().put::(); writes.saturating_inc(); } diff --git a/polkadot/node/service/src/parachains_db/upgrade.rs b/polkadot/node/service/src/parachains_db/upgrade.rs index 1d76c79d3e32..f116ac5706a9 100644 --- a/polkadot/node/service/src/parachains_db/upgrade.rs +++ b/polkadot/node/service/src/parachains_db/upgrade.rs @@ -85,7 +85,7 @@ pub(crate) fn try_upgrade_db( } /// Try upgrading parachain's database to the next version. -/// If successfull, it returns the current version. +/// If successful, it returns the current version. pub(crate) fn try_upgrade_db_to_next_version( db_path: &Path, db_kind: DatabaseKind, diff --git a/polkadot/runtime/common/src/assigned_slots/mod.rs b/polkadot/runtime/common/src/assigned_slots/mod.rs index f5e3aaef6324..36b21f02bc17 100644 --- a/polkadot/runtime/common/src/assigned_slots/mod.rs +++ b/polkadot/runtime/common/src/assigned_slots/mod.rs @@ -107,7 +107,7 @@ type LeasePeriodOf = <::Leaser as Leaser>>::Le pub mod pallet { use super::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::pallet] diff --git a/polkadot/runtime/common/src/crowdloan/mod.rs b/polkadot/runtime/common/src/crowdloan/mod.rs index 77ef406e5798..14a29a1d28dd 100644 --- a/polkadot/runtime/common/src/crowdloan/mod.rs +++ b/polkadot/runtime/common/src/crowdloan/mod.rs @@ -180,7 +180,7 @@ pub mod pallet { use frame_support::pallet_prelude::*; use frame_system::{ensure_root, ensure_signed, pallet_prelude::*}; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(2); #[pallet::pallet] diff --git a/polkadot/runtime/common/src/paras_registrar/mod.rs b/polkadot/runtime/common/src/paras_registrar/mod.rs index 12376ae6f1ff..a5fb7e7a38d7 100644 --- a/polkadot/runtime/common/src/paras_registrar/mod.rs +++ b/polkadot/runtime/common/src/paras_registrar/mod.rs @@ -106,7 +106,7 @@ pub mod pallet { use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::pallet] diff --git a/polkadot/runtime/parachains/src/configuration.rs b/polkadot/runtime/parachains/src/configuration.rs index bff9cc34b4fb..d6895df6daf2 100644 --- a/polkadot/runtime/parachains/src/configuration.rs +++ b/polkadot/runtime/parachains/src/configuration.rs @@ -501,7 +501,7 @@ impl WeightInfo for TestWeightInfo { pub mod pallet { use super::*; - /// The current storage version. + /// The in-code storage version. /// /// v0-v1: /// v1-v2: diff --git a/polkadot/runtime/parachains/src/disputes.rs b/polkadot/runtime/parachains/src/disputes.rs index cf2e99e7359a..fc415592b447 100644 --- a/polkadot/runtime/parachains/src/disputes.rs +++ b/polkadot/runtime/parachains/src/disputes.rs @@ -379,7 +379,7 @@ pub mod pallet { type WeightInfo: WeightInfo; } - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::pallet] diff --git a/polkadot/runtime/parachains/src/session_info/migration.rs b/polkadot/runtime/parachains/src/session_info/migration.rs index 228c1e3bb251..ea6f81834b5d 100644 --- a/polkadot/runtime/parachains/src/session_info/migration.rs +++ b/polkadot/runtime/parachains/src/session_info/migration.rs @@ -18,5 +18,5 @@ use frame_support::traits::StorageVersion; -/// The current storage version. +/// The in-code storage version. pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); diff --git a/substrate/frame/alliance/src/migration.rs b/substrate/frame/alliance/src/migration.rs index e3a44a7887e9..c1b1eccf6897 100644 --- a/substrate/frame/alliance/src/migration.rs +++ b/substrate/frame/alliance/src/migration.rs @@ -19,7 +19,7 @@ use crate::{Config, Pallet, Weight, LOG_TARGET}; use frame_support::{pallet_prelude::*, storage::migration, traits::OnRuntimeUpgrade}; use log; -/// The current storage version. +/// The in-code storage version. pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(2); /// Wrapper for all migrations of this pallet. diff --git a/substrate/frame/assets/src/lib.rs b/substrate/frame/assets/src/lib.rs index 79e4fe300187..fc9c21044cc7 100644 --- a/substrate/frame/assets/src/lib.rs +++ b/substrate/frame/assets/src/lib.rs @@ -208,7 +208,7 @@ pub mod pallet { }; use frame_system::pallet_prelude::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::pallet] diff --git a/substrate/frame/assets/src/migration.rs b/substrate/frame/assets/src/migration.rs index efe77714c524..aef68d19de07 100644 --- a/substrate/frame/assets/src/migration.rs +++ b/substrate/frame/assets/src/migration.rs @@ -67,9 +67,9 @@ pub mod v1 { pub struct MigrateToV1(sp_std::marker::PhantomData); impl OnRuntimeUpgrade for MigrateToV1 { fn on_runtime_upgrade() -> Weight { - let current_version = Pallet::::current_storage_version(); + let in_code_version = Pallet::::in_code_storage_version(); let onchain_version = Pallet::::on_chain_storage_version(); - if onchain_version == 0 && current_version == 1 { + if onchain_version == 0 && in_code_version == 1 { let mut translated = 0u64; Asset::::translate::< OldAssetDetails>, @@ -78,12 +78,12 @@ pub mod v1 { translated.saturating_inc(); Some(old_value.migrate_to_v1()) }); - current_version.put::>(); + in_code_version.put::>(); log::info!( target: LOG_TARGET, "Upgraded {} pools, storage to version {:?}", translated, - current_version + in_code_version ); T::DbWeight::get().reads_writes(translated + 1, translated + 1) } else { @@ -116,13 +116,13 @@ pub mod v1 { "the asset count before and after the migration should be the same" ); - let current_version = Pallet::::current_storage_version(); + let in_code_version = Pallet::::in_code_storage_version(); let onchain_version = Pallet::::on_chain_storage_version(); - frame_support::ensure!(current_version == 1, "must_upgrade"); + frame_support::ensure!(in_code_version == 1, "must_upgrade"); ensure!( - current_version == onchain_version, - "after migration, the current_version and onchain_version should be the same" + in_code_version == onchain_version, + "after migration, the in_code_version and onchain_version should be the same" ); Asset::::iter().try_for_each(|(_id, asset)| -> Result<(), TryRuntimeError> { diff --git a/substrate/frame/balances/src/lib.rs b/substrate/frame/balances/src/lib.rs index 843bc351494e..f9f9295ffb41 100644 --- a/substrate/frame/balances/src/lib.rs +++ b/substrate/frame/balances/src/lib.rs @@ -324,7 +324,7 @@ pub mod pallet { type MaxFreezes: Get; } - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: frame_support::traits::StorageVersion = frame_support::traits::StorageVersion::new(1); diff --git a/substrate/frame/collective/src/lib.rs b/substrate/frame/collective/src/lib.rs index 10f989e5c4cc..318bcf847213 100644 --- a/substrate/frame/collective/src/lib.rs +++ b/substrate/frame/collective/src/lib.rs @@ -177,7 +177,7 @@ pub mod pallet { use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(4); #[pallet::pallet] diff --git a/substrate/frame/contracts/src/lib.rs b/substrate/frame/contracts/src/lib.rs index a15006e6388c..420481ccdef6 100644 --- a/substrate/frame/contracts/src/lib.rs +++ b/substrate/frame/contracts/src/lib.rs @@ -222,7 +222,7 @@ pub mod pallet { use frame_system::pallet_prelude::*; use sp_runtime::Perbill; - /// The current storage version. + /// The in-code storage version. pub(crate) const STORAGE_VERSION: StorageVersion = StorageVersion::new(15); #[pallet::pallet] diff --git a/substrate/frame/contracts/src/migration.rs b/substrate/frame/contracts/src/migration.rs index 6d61cb6b1e1a..f30ae1ebfade 100644 --- a/substrate/frame/contracts/src/migration.rs +++ b/substrate/frame/contracts/src/migration.rs @@ -263,10 +263,10 @@ impl Migration { impl OnRuntimeUpgrade for Migration { fn on_runtime_upgrade() -> Weight { let name = >::name(); - let current_version = >::current_storage_version(); + let in_code_version = >::in_code_storage_version(); let on_chain_version = >::on_chain_storage_version(); - if on_chain_version == current_version { + if on_chain_version == in_code_version { log::warn!( target: LOG_TARGET, "{name}: No Migration performed storage_version = latest_version = {:?}", @@ -289,7 +289,7 @@ impl OnRuntimeUpgrade for Migration OnRuntimeUpgrade for Migration>::on_chain_storage_version(); - let current_version = >::current_storage_version(); + let in_code_version = >::in_code_storage_version(); - if on_chain_version == current_version { + if on_chain_version == in_code_version { return Ok(Default::default()) } log::debug!( target: LOG_TARGET, - "Requested migration of {} from {:?}(on-chain storage version) to {:?}(current storage version)", - >::name(), on_chain_version, current_version + "Requested migration of {} from {:?}(on-chain storage version) to {:?}(in-code storage version)", + >::name(), on_chain_version, in_code_version ); ensure!( - T::Migrations::is_upgrade_supported(on_chain_version, current_version), - "Unsupported upgrade: VERSION_RANGE should be (on-chain storage version + 1, current storage version)" + T::Migrations::is_upgrade_supported(on_chain_version, in_code_version), + "Unsupported upgrade: VERSION_RANGE should be (on-chain storage version + 1, in-code storage version)" ); Ok(Default::default()) @@ -421,7 +421,7 @@ impl Migration { }, StepResult::Completed { steps_done } => { in_progress_version.put::>(); - if >::current_storage_version() != in_progress_version { + if >::in_code_storage_version() != in_progress_version { log::info!( target: LOG_TARGET, "{name}: Next migration is {:?},", diff --git a/substrate/frame/democracy/src/lib.rs b/substrate/frame/democracy/src/lib.rs index 089556191cd1..08e2a7599f55 100644 --- a/substrate/frame/democracy/src/lib.rs +++ b/substrate/frame/democracy/src/lib.rs @@ -211,7 +211,7 @@ pub mod pallet { use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::pallet] diff --git a/substrate/frame/election-provider-multi-phase/src/lib.rs b/substrate/frame/election-provider-multi-phase/src/lib.rs index 05f9b24f8f9c..24f0fa307850 100644 --- a/substrate/frame/election-provider-multi-phase/src/lib.rs +++ b/substrate/frame/election-provider-multi-phase/src/lib.rs @@ -1343,7 +1343,7 @@ pub mod pallet { #[pallet::getter(fn minimum_untrusted_score)] pub type MinimumUntrustedScore = StorageValue<_, ElectionScore>; - /// The current storage version. + /// The in-code storage version. /// /// v1: https://github.com/paritytech/substrate/pull/12237/ const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); diff --git a/substrate/frame/election-provider-multi-phase/src/migrations.rs b/substrate/frame/election-provider-multi-phase/src/migrations.rs index 50b821e6db6a..156f1c02e27c 100644 --- a/substrate/frame/election-provider-multi-phase/src/migrations.rs +++ b/substrate/frame/election-provider-multi-phase/src/migrations.rs @@ -27,12 +27,12 @@ pub mod v1 { pub struct MigrateToV1(sp_std::marker::PhantomData); impl OnRuntimeUpgrade for MigrateToV1 { fn on_runtime_upgrade() -> Weight { - let current = Pallet::::current_storage_version(); + let current = Pallet::::in_code_storage_version(); let onchain = Pallet::::on_chain_storage_version(); log!( info, - "Running migration with current storage version {:?} / onchain {:?}", + "Running migration with in-code storage version {:?} / onchain {:?}", current, onchain ); diff --git a/substrate/frame/elections-phragmen/src/lib.rs b/substrate/frame/elections-phragmen/src/lib.rs index 5e50027e3442..c00cb370db53 100644 --- a/substrate/frame/elections-phragmen/src/lib.rs +++ b/substrate/frame/elections-phragmen/src/lib.rs @@ -188,7 +188,7 @@ pub mod pallet { use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(4); #[pallet::pallet] diff --git a/substrate/frame/fast-unstake/src/migrations.rs b/substrate/frame/fast-unstake/src/migrations.rs index 564388407045..97ad86bfff42 100644 --- a/substrate/frame/fast-unstake/src/migrations.rs +++ b/substrate/frame/fast-unstake/src/migrations.rs @@ -33,12 +33,12 @@ pub mod v1 { pub struct MigrateToV1(sp_std::marker::PhantomData); impl OnRuntimeUpgrade for MigrateToV1 { fn on_runtime_upgrade() -> Weight { - let current = Pallet::::current_storage_version(); + let current = Pallet::::in_code_storage_version(); let onchain = Pallet::::on_chain_storage_version(); log!( info, - "Running migration with current storage version {:?} / onchain {:?}", + "Running migration with in-code storage version {:?} / onchain {:?}", current, onchain ); diff --git a/substrate/frame/grandpa/src/lib.rs b/substrate/frame/grandpa/src/lib.rs index 0b9f2b358279..90bcd8721dfa 100644 --- a/substrate/frame/grandpa/src/lib.rs +++ b/substrate/frame/grandpa/src/lib.rs @@ -73,7 +73,7 @@ pub mod pallet { use frame_support::{dispatch::DispatchResult, pallet_prelude::*}; use frame_system::pallet_prelude::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(5); #[pallet::pallet] diff --git a/substrate/frame/im-online/src/lib.rs b/substrate/frame/im-online/src/lib.rs index 1de89dd00c81..f14093aa09af 100644 --- a/substrate/frame/im-online/src/lib.rs +++ b/substrate/frame/im-online/src/lib.rs @@ -251,7 +251,7 @@ type OffchainResult = Result>>; pub mod pallet { use super::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::pallet] diff --git a/substrate/frame/im-online/src/migration.rs b/substrate/frame/im-online/src/migration.rs index 84652965972e..1c21c524cb3a 100644 --- a/substrate/frame/im-online/src/migration.rs +++ b/substrate/frame/im-online/src/migration.rs @@ -72,7 +72,7 @@ pub mod v1 { if StorageVersion::get::>() != 0 { log::warn!( target: TARGET, - "Skipping migration because current storage version is not 0" + "Skipping migration because in-code storage version is not 0" ); return weight } diff --git a/substrate/frame/membership/src/lib.rs b/substrate/frame/membership/src/lib.rs index 2f4bf4bc4ffa..6a938ff56bac 100644 --- a/substrate/frame/membership/src/lib.rs +++ b/substrate/frame/membership/src/lib.rs @@ -46,7 +46,7 @@ pub mod pallet { use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(4); #[pallet::pallet] diff --git a/substrate/frame/multisig/src/lib.rs b/substrate/frame/multisig/src/lib.rs index e4426c64b412..a83b78e316f5 100644 --- a/substrate/frame/multisig/src/lib.rs +++ b/substrate/frame/multisig/src/lib.rs @@ -168,7 +168,7 @@ pub mod pallet { type WeightInfo: WeightInfo; } - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::pallet] diff --git a/substrate/frame/multisig/src/migrations.rs b/substrate/frame/multisig/src/migrations.rs index 330613bb3dfd..b7870303980b 100644 --- a/substrate/frame/multisig/src/migrations.rs +++ b/substrate/frame/multisig/src/migrations.rs @@ -51,7 +51,7 @@ pub mod v1 { fn on_runtime_upgrade() -> Weight { use sp_runtime::Saturating; - let current = Pallet::::current_storage_version(); + let current = Pallet::::in_code_storage_version(); let onchain = Pallet::::on_chain_storage_version(); if onchain > 0 { diff --git a/substrate/frame/nfts/src/lib.rs b/substrate/frame/nfts/src/lib.rs index 92b27432ab21..524a4b869437 100644 --- a/substrate/frame/nfts/src/lib.rs +++ b/substrate/frame/nfts/src/lib.rs @@ -76,7 +76,7 @@ pub mod pallet { use frame_support::{pallet_prelude::*, traits::ExistenceRequirement}; use frame_system::pallet_prelude::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::pallet] diff --git a/substrate/frame/nfts/src/migration.rs b/substrate/frame/nfts/src/migration.rs index 94635a96aeba..07a3c74dbdd2 100644 --- a/substrate/frame/nfts/src/migration.rs +++ b/substrate/frame/nfts/src/migration.rs @@ -54,17 +54,17 @@ pub mod v1 { pub struct MigrateToV1(sp_std::marker::PhantomData); impl OnRuntimeUpgrade for MigrateToV1 { fn on_runtime_upgrade() -> Weight { - let current_version = Pallet::::current_storage_version(); + let in_code_version = Pallet::::in_code_storage_version(); let onchain_version = Pallet::::on_chain_storage_version(); log::info!( target: LOG_TARGET, - "Running migration with current storage version {:?} / onchain {:?}", - current_version, + "Running migration with in-code storage version {:?} / onchain {:?}", + in_code_version, onchain_version ); - if onchain_version == 0 && current_version == 1 { + if onchain_version == 0 && in_code_version == 1 { let mut translated = 0u64; let mut configs_iterated = 0u64; Collection::::translate::< @@ -77,13 +77,13 @@ pub mod v1 { Some(old_value.migrate_to_v1(item_configs)) }); - current_version.put::>(); + in_code_version.put::>(); log::info!( target: LOG_TARGET, "Upgraded {} records, storage to version {:?}", translated, - current_version + in_code_version ); T::DbWeight::get().reads_writes(translated + configs_iterated + 1, translated + 1) } else { diff --git a/substrate/frame/nomination-pools/src/lib.rs b/substrate/frame/nomination-pools/src/lib.rs index f191126fbdd4..a54ca1ae4b92 100644 --- a/substrate/frame/nomination-pools/src/lib.rs +++ b/substrate/frame/nomination-pools/src/lib.rs @@ -1592,7 +1592,7 @@ pub mod pallet { use frame_system::{ensure_signed, pallet_prelude::*}; use sp_runtime::Perbill; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(8); #[pallet::pallet] diff --git a/substrate/frame/nomination-pools/src/migration.rs b/substrate/frame/nomination-pools/src/migration.rs index 3adfd926d95c..5319beccf1f2 100644 --- a/substrate/frame/nomination-pools/src/migration.rs +++ b/substrate/frame/nomination-pools/src/migration.rs @@ -277,25 +277,25 @@ pub mod v5 { pub struct MigrateToV5(sp_std::marker::PhantomData); impl OnRuntimeUpgrade for MigrateToV5 { fn on_runtime_upgrade() -> Weight { - let current = Pallet::::current_storage_version(); + let in_code = Pallet::::in_code_storage_version(); let onchain = Pallet::::on_chain_storage_version(); log!( info, - "Running migration with current storage version {:?} / onchain {:?}", - current, + "Running migration with in-code storage version {:?} / onchain {:?}", + in_code, onchain ); - if current == 5 && onchain == 4 { + if in_code == 5 && onchain == 4 { let mut translated = 0u64; RewardPools::::translate::, _>(|_id, old_value| { translated.saturating_inc(); Some(old_value.migrate_to_v5()) }); - current.put::>(); - log!(info, "Upgraded {} pools, storage to version {:?}", translated, current); + in_code.put::>(); + log!(info, "Upgraded {} pools, storage to version {:?}", translated, in_code); // reads: translated + onchain version. // writes: translated + current.put. @@ -433,12 +433,12 @@ pub mod v4 { #[allow(deprecated)] impl> OnRuntimeUpgrade for MigrateToV4 { fn on_runtime_upgrade() -> Weight { - let current = Pallet::::current_storage_version(); + let current = Pallet::::in_code_storage_version(); let onchain = Pallet::::on_chain_storage_version(); log!( info, - "Running migration with current storage version {:?} / onchain {:?}", + "Running migration with in-code storage version {:?} / onchain {:?}", current, onchain ); @@ -514,13 +514,13 @@ pub mod v3 { pub struct MigrateToV3(sp_std::marker::PhantomData); impl OnRuntimeUpgrade for MigrateToV3 { fn on_runtime_upgrade() -> Weight { - let current = Pallet::::current_storage_version(); + let current = Pallet::::in_code_storage_version(); let onchain = Pallet::::on_chain_storage_version(); if onchain == 2 { log!( info, - "Running migration with current storage version {:?} / onchain {:?}", + "Running migration with in-code storage version {:?} / onchain {:?}", current, onchain ); @@ -794,12 +794,12 @@ pub mod v2 { impl OnRuntimeUpgrade for MigrateToV2 { fn on_runtime_upgrade() -> Weight { - let current = Pallet::::current_storage_version(); + let current = Pallet::::in_code_storage_version(); let onchain = Pallet::::on_chain_storage_version(); log!( info, - "Running migration with current storage version {:?} / onchain {:?}", + "Running migration with in-code storage version {:?} / onchain {:?}", current, onchain ); @@ -911,12 +911,12 @@ pub mod v1 { pub struct MigrateToV1(sp_std::marker::PhantomData); impl OnRuntimeUpgrade for MigrateToV1 { fn on_runtime_upgrade() -> Weight { - let current = Pallet::::current_storage_version(); + let current = Pallet::::in_code_storage_version(); let onchain = Pallet::::on_chain_storage_version(); log!( info, - "Running migration with current storage version {:?} / onchain {:?}", + "Running migration with in-code storage version {:?} / onchain {:?}", current, onchain ); diff --git a/substrate/frame/preimage/src/lib.rs b/substrate/frame/preimage/src/lib.rs index e344bdfe2d8f..4e4746851666 100644 --- a/substrate/frame/preimage/src/lib.rs +++ b/substrate/frame/preimage/src/lib.rs @@ -102,7 +102,7 @@ pub const MAX_HASH_UPGRADE_BULK_COUNT: u32 = 1024; pub mod pallet { use super::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::config] diff --git a/substrate/frame/referenda/src/lib.rs b/substrate/frame/referenda/src/lib.rs index 8912f9ad2173..d6ce1177d511 100644 --- a/substrate/frame/referenda/src/lib.rs +++ b/substrate/frame/referenda/src/lib.rs @@ -143,7 +143,7 @@ pub mod pallet { use frame_support::{pallet_prelude::*, traits::EnsureOriginWithArg}; use frame_system::pallet_prelude::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::pallet] diff --git a/substrate/frame/referenda/src/migration.rs b/substrate/frame/referenda/src/migration.rs index a80897242eec..b1609216d362 100644 --- a/substrate/frame/referenda/src/migration.rs +++ b/substrate/frame/referenda/src/migration.rs @@ -109,13 +109,13 @@ pub mod v1 { } fn on_runtime_upgrade() -> Weight { - let current_version = Pallet::::current_storage_version(); + let in_code_version = Pallet::::in_code_storage_version(); let onchain_version = Pallet::::on_chain_storage_version(); let mut weight = T::DbWeight::get().reads(1); log::info!( target: TARGET, - "running migration with current storage version {:?} / onchain {:?}.", - current_version, + "running migration with in-code storage version {:?} / onchain {:?}.", + in_code_version, onchain_version ); if onchain_version != 0 { diff --git a/substrate/frame/scheduler/src/lib.rs b/substrate/frame/scheduler/src/lib.rs index e94f154eee32..6d9814855231 100644 --- a/substrate/frame/scheduler/src/lib.rs +++ b/substrate/frame/scheduler/src/lib.rs @@ -198,7 +198,7 @@ pub mod pallet { use frame_support::{dispatch::PostDispatchInfo, pallet_prelude::*}; use frame_system::pallet_prelude::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(4); #[pallet::pallet] diff --git a/substrate/frame/session/src/historical/mod.rs b/substrate/frame/session/src/historical/mod.rs index d74e9dd0b7c5..b9cecea1a7f7 100644 --- a/substrate/frame/session/src/historical/mod.rs +++ b/substrate/frame/session/src/historical/mod.rs @@ -58,7 +58,7 @@ pub mod pallet { use super::*; use frame_support::pallet_prelude::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::pallet] diff --git a/substrate/frame/session/src/lib.rs b/substrate/frame/session/src/lib.rs index bf4671a247f0..9b91dc2d3996 100644 --- a/substrate/frame/session/src/lib.rs +++ b/substrate/frame/session/src/lib.rs @@ -368,7 +368,7 @@ pub mod pallet { use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); #[pallet::pallet] diff --git a/substrate/frame/society/src/migrations.rs b/substrate/frame/society/src/migrations.rs index 3036cc2a3013..63798970332f 100644 --- a/substrate/frame/society/src/migrations.rs +++ b/substrate/frame/society/src/migrations.rs @@ -40,9 +40,9 @@ impl< { #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, TryRuntimeError> { - let current = Pallet::::current_storage_version(); - let onchain = Pallet::::on_chain_storage_version(); - ensure!(onchain == 0 && current == 2, "pallet_society: invalid version"); + let in_code = Pallet::::in_code_storage_version(); + let on_chain = Pallet::::on_chain_storage_version(); + ensure!(on_chain == 0 && in_code == 2, "pallet_society: invalid version"); Ok((v0::Candidates::::get(), v0::Members::::get()).encode()) } diff --git a/substrate/frame/staking/src/migrations.rs b/substrate/frame/staking/src/migrations.rs index 311e9667cebc..57ee5dacb384 100644 --- a/substrate/frame/staking/src/migrations.rs +++ b/substrate/frame/staking/src/migrations.rs @@ -67,11 +67,11 @@ pub mod v14 { pub struct MigrateToV14(sp_std::marker::PhantomData); impl OnRuntimeUpgrade for MigrateToV14 { fn on_runtime_upgrade() -> Weight { - let current = Pallet::::current_storage_version(); + let in_code = Pallet::::in_code_storage_version(); let on_chain = Pallet::::on_chain_storage_version(); - if current == 14 && on_chain == 13 { - current.put::>(); + if in_code == 14 && on_chain == 13 { + in_code.put::>(); log!(info, "v14 applied successfully."); T::DbWeight::get().reads_writes(1, 1) @@ -108,12 +108,12 @@ pub mod v13 { } fn on_runtime_upgrade() -> Weight { - let current = Pallet::::current_storage_version(); + let in_code = Pallet::::in_code_storage_version(); let onchain = StorageVersion::::get(); - if current == 13 && onchain == ObsoleteReleases::V12_0_0 { + if in_code == 13 && onchain == ObsoleteReleases::V12_0_0 { StorageVersion::::kill(); - current.put::>(); + in_code.put::>(); log!(info, "v13 applied successfully"); T::DbWeight::get().reads_writes(1, 2) diff --git a/substrate/frame/staking/src/pallet/mod.rs b/substrate/frame/staking/src/pallet/mod.rs index ce80f22c2bbf..4fc48b57e883 100644 --- a/substrate/frame/staking/src/pallet/mod.rs +++ b/substrate/frame/staking/src/pallet/mod.rs @@ -66,7 +66,7 @@ pub mod pallet { use super::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(14); #[pallet::pallet] diff --git a/substrate/frame/support/procedural/src/lib.rs b/substrate/frame/support/procedural/src/lib.rs index f627a830583a..0f3fff05a705 100644 --- a/substrate/frame/support/procedural/src/lib.rs +++ b/substrate/frame/support/procedural/src/lib.rs @@ -1084,7 +1084,7 @@ pub fn generate_store(_: TokenStream, _: TokenStream) -> TokenStream { /// pub struct Pallet(_); /// ``` /// -/// If not present, the current storage version is set to the default value. +/// If not present, the in-code storage version is set to the default value. #[proc_macro_attribute] pub fn storage_version(_: TokenStream, _: TokenStream) -> TokenStream { pallet_macro_stub() diff --git a/substrate/frame/support/procedural/src/pallet/expand/hooks.rs b/substrate/frame/support/procedural/src/pallet/expand/hooks.rs index 5044d4285bb6..6b25ddcba1a7 100644 --- a/substrate/frame/support/procedural/src/pallet/expand/hooks.rs +++ b/substrate/frame/support/procedural/src/pallet/expand/hooks.rs @@ -42,7 +42,7 @@ pub fn expand_hooks(def: &mut Def) -> proc_macro2::TokenStream { >::name::().unwrap_or("") }; - let initialize_on_chain_storage_version = if let Some(current_version) = + let initialize_on_chain_storage_version = if let Some(in_code_version) = &def.pallet_struct.storage_version { quote::quote! { @@ -50,9 +50,9 @@ pub fn expand_hooks(def: &mut Def) -> proc_macro2::TokenStream { target: #frame_support::LOG_TARGET, "🐥 New pallet {:?} detected in the runtime. Initializing the on-chain storage version to match the storage version defined in the pallet: {:?}", #pallet_name, - #current_version + #in_code_version ); - #current_version.put::(); + #in_code_version.put::(); } } else { quote::quote! { @@ -73,10 +73,10 @@ pub fn expand_hooks(def: &mut Def) -> proc_macro2::TokenStream { #frame_support::__private::log::info!( target: #frame_support::LOG_TARGET, "⚠️ {} declares internal migrations (which *might* execute). \ - On-chain `{:?}` vs current storage version `{:?}`", + On-chain `{:?}` vs in-code storage version `{:?}`", #pallet_name, ::on_chain_storage_version(), - ::current_storage_version(), + ::in_code_storage_version(), ); } } else { @@ -102,23 +102,23 @@ pub fn expand_hooks(def: &mut Def) -> proc_macro2::TokenStream { }; // If a storage version is set, we should ensure that the storage version on chain matches the - // current storage version. This assumes that `Executive` is running custom migrations before + // in-code storage version. This assumes that `Executive` is running custom migrations before // the pallets are called. let post_storage_version_check = if def.pallet_struct.storage_version.is_some() { quote::quote! { let on_chain_version = ::on_chain_storage_version(); - let current_version = ::current_storage_version(); + let in_code_version = ::in_code_storage_version(); - if on_chain_version != current_version { + if on_chain_version != in_code_version { #frame_support::__private::log::error!( target: #frame_support::LOG_TARGET, - "{}: On chain storage version {:?} doesn't match current storage version {:?}.", + "{}: On chain storage version {:?} doesn't match in-code storage version {:?}.", #pallet_name, on_chain_version, - current_version, + in_code_version, ); - return Err("On chain and current storage version do not match. Missing runtime upgrade?".into()); + return Err("On chain and in-code storage version do not match. Missing runtime upgrade?".into()); } } } else { diff --git a/substrate/frame/support/procedural/src/pallet/expand/pallet_struct.rs b/substrate/frame/support/procedural/src/pallet/expand/pallet_struct.rs index c2102f0284db..fd76562cc6bd 100644 --- a/substrate/frame/support/procedural/src/pallet/expand/pallet_struct.rs +++ b/substrate/frame/support/procedural/src/pallet/expand/pallet_struct.rs @@ -160,7 +160,7 @@ pub fn expand_pallet_struct(def: &mut Def) -> proc_macro2::TokenStream { } ); - let (storage_version, current_storage_version_ty) = + let (storage_version, in_code_storage_version_ty) = if let Some(v) = def.pallet_struct.storage_version.as_ref() { (quote::quote! { #v }, quote::quote! { #frame_support::traits::StorageVersion }) } else { @@ -203,9 +203,9 @@ pub fn expand_pallet_struct(def: &mut Def) -> proc_macro2::TokenStream { for #pallet_ident<#type_use_gen> #config_where_clause { - type CurrentStorageVersion = #current_storage_version_ty; + type CurrentStorageVersion = #in_code_storage_version_ty; - fn current_storage_version() -> Self::CurrentStorageVersion { + fn in_code_storage_version() -> Self::CurrentStorageVersion { #storage_version } diff --git a/substrate/frame/support/procedural/src/pallet/parse/pallet_struct.rs b/substrate/frame/support/procedural/src/pallet/parse/pallet_struct.rs index f4af86aa3e99..c2855ae38ef0 100644 --- a/substrate/frame/support/procedural/src/pallet/parse/pallet_struct.rs +++ b/substrate/frame/support/procedural/src/pallet/parse/pallet_struct.rs @@ -44,7 +44,7 @@ pub struct PalletStructDef { /// Whether to specify the storages max encoded len when implementing `StorageInfoTrait`. /// Contains the span of the attribute. pub without_storage_info: Option, - /// The current storage version of the pallet. + /// The in-code storage version of the pallet. pub storage_version: Option, } diff --git a/substrate/frame/support/src/lib.rs b/substrate/frame/support/src/lib.rs index fd348f62b4f7..4ff975189bf9 100644 --- a/substrate/frame/support/src/lib.rs +++ b/substrate/frame/support/src/lib.rs @@ -1133,7 +1133,7 @@ pub mod pallet_prelude { /// # `pallet::storage_version` /// /// Because the [`pallet::pallet`](#pallet-struct-placeholder-palletpallet-mandatory) macro -/// implements [`traits::GetStorageVersion`], the current storage version needs to be +/// implements [`traits::GetStorageVersion`], the in-code storage version needs to be /// communicated to the macro. This can be done by using the `pallet::storage_version` /// attribute: /// @@ -1145,7 +1145,7 @@ pub mod pallet_prelude { /// pub struct Pallet(_); /// ``` /// -/// If not present, the current storage version is set to the default value. +/// If not present, the in-code storage version is set to the default value. /// /// Also see [`pallet::storage_version`](`frame_support::pallet_macros::storage_version`) /// diff --git a/substrate/frame/support/src/migrations.rs b/substrate/frame/support/src/migrations.rs index a44a8e540962..a23fbdb854a3 100644 --- a/substrate/frame/support/src/migrations.rs +++ b/substrate/frame/support/src/migrations.rs @@ -109,7 +109,7 @@ impl< const FROM: u16, const TO: u16, Inner: crate::traits::OnRuntimeUpgrade, - Pallet: GetStorageVersion + PalletInfoAccess, + Pallet: GetStorageVersion + PalletInfoAccess, DbWeight: Get, > crate::traits::OnRuntimeUpgrade for VersionedMigration { @@ -181,25 +181,25 @@ impl< } } -/// Can store the current pallet version in storage. -pub trait StoreCurrentStorageVersion { - /// Write the current storage version to the storage. - fn store_current_storage_version(); +/// Can store the in-code pallet version on-chain. +pub trait StoreInCodeStorageVersion { + /// Write the in-code storage version on-chain. + fn store_in_code_storage_version(); } -impl + PalletInfoAccess> - StoreCurrentStorageVersion for StorageVersion +impl + PalletInfoAccess> + StoreInCodeStorageVersion for StorageVersion { - fn store_current_storage_version() { - let version = ::current_storage_version(); + fn store_in_code_storage_version() { + let version = ::in_code_storage_version(); version.put::(); } } -impl + PalletInfoAccess> - StoreCurrentStorageVersion for NoStorageVersionSet +impl + PalletInfoAccess> + StoreInCodeStorageVersion for NoStorageVersionSet { - fn store_current_storage_version() { + fn store_in_code_storage_version() { StorageVersion::default().put::(); } } @@ -211,7 +211,7 @@ pub trait PalletVersionToStorageVersionHelper { impl PalletVersionToStorageVersionHelper for T where - T::CurrentStorageVersion: StoreCurrentStorageVersion, + T::InCodeStorageVersion: StoreInCodeStorageVersion, { fn migrate(db_weight: &RuntimeDbWeight) -> Weight { const PALLET_VERSION_STORAGE_KEY_POSTFIX: &[u8] = b":__PALLET_VERSION__:"; @@ -222,8 +222,7 @@ where sp_io::storage::clear(&pallet_version_key(::name())); - >::store_current_storage_version( - ); + >::store_in_code_storage_version(); db_weight.writes(2) } @@ -244,7 +243,7 @@ impl PalletVersionToStorageVersionHelper for T { /// Migrate from the `PalletVersion` struct to the new [`StorageVersion`] struct. /// -/// This will remove all `PalletVersion's` from the state and insert the current storage version. +/// This will remove all `PalletVersion's` from the state and insert the in-code storage version. pub fn migrate_from_pallet_version_to_storage_version< Pallets: PalletVersionToStorageVersionHelper, >( diff --git a/substrate/frame/support/src/traits/metadata.rs b/substrate/frame/support/src/traits/metadata.rs index d54dc2d799f9..c917fdb0f11a 100644 --- a/substrate/frame/support/src/traits/metadata.rs +++ b/substrate/frame/support/src/traits/metadata.rs @@ -266,7 +266,7 @@ impl Add for StorageVersion { /// /// If you (the reader) end up here, it probably means that you tried to compare /// [`GetStorageVersion::on_chain_storage_version`] against -/// [`GetStorageVersion::current_storage_version`]. This basically means that the +/// [`GetStorageVersion::in_code_storage_version`]. This basically means that the /// [`storage_version`](crate::pallet_macros::storage_version) is missing from the pallet where the /// mentioned functions are being called, and needs to be defined. #[derive(Debug, Default)] @@ -275,19 +275,18 @@ pub struct NoStorageVersionSet; /// Provides information about a pallet's storage versions. /// /// Every pallet has two storage versions: -/// 1. An current storage version +/// 1. An in-code storage version /// 2. An on-chain storage version /// -/// The current storage version is the version of the pallet as defined in the local development -/// environment, and the on-chain storage version is the version of the pallet actually deployed -/// on-chain. +/// The in-code storage version is the version of the pallet as defined in the runtime blob, and the +/// on-chain storage version is the version of the pallet stored on-chain. /// /// Storage versions should be only ever be out of sync when a pallet has been updated to a new -/// version and the current version is incremented, but the migration has not yet been executed +/// version and the in-code version is incremented, but the migration has not yet been executed /// on-chain as part of a runtime upgrade. /// /// It is the responsibility of the developer to ensure that the on-chain storage version is set -/// correctly during a migration so that it matches the current storage version. +/// correctly during a migration so that it matches the in-code storage version. pub trait GetStorageVersion { /// This type is generated by the [`pallet`](crate::pallet) macro. /// @@ -300,13 +299,13 @@ pub trait GetStorageVersion { /// The intention of using [`NoStorageVersionSet`] instead of defaulting to a [`StorageVersion`] /// of zero is to prevent developers from forgetting to set /// [`storage_version`](crate::pallet_macros::storage_version) when it is required, like in the - /// case that they wish to compare the current storage version to the on-chain storage version. - type CurrentStorageVersion; + /// case that they wish to compare the in-code storage version to the on-chain storage version. + type InCodeStorageVersion; - /// Returns the current storage version as specified in the + /// Returns the in-code storage version as specified in the /// [`storage_version`](crate::pallet_macros::storage_version) attribute, or /// [`NoStorageVersionSet`] if the attribute is missing. - fn current_storage_version() -> Self::CurrentStorageVersion; + fn in_code_storage_version() -> Self::InCodeStorageVersion; /// Returns the storage version of the pallet as last set in the actual on-chain storage. fn on_chain_storage_version() -> StorageVersion; } diff --git a/substrate/frame/support/test/tests/construct_runtime.rs b/substrate/frame/support/test/tests/construct_runtime.rs index b8341b25cb09..b76986818867 100644 --- a/substrate/frame/support/test/tests/construct_runtime.rs +++ b/substrate/frame/support/test/tests/construct_runtime.rs @@ -683,7 +683,7 @@ fn test_metadata() { name: "Version", ty: meta_type::(), value: RuntimeVersion::default().encode(), - docs: maybe_docs(vec![ " Get the chain's current version."]), + docs: maybe_docs(vec![ " Get the chain's in-code version."]), }, PalletConstantMetadata { name: "SS58Prefix", diff --git a/substrate/frame/support/test/tests/pallet.rs b/substrate/frame/support/test/tests/pallet.rs index d2e5b1851634..5c9bdf4ff70a 100644 --- a/substrate/frame/support/test/tests/pallet.rs +++ b/substrate/frame/support/test/tests/pallet.rs @@ -578,7 +578,7 @@ pub mod pallet2 { Self::deposit_event(Event::Something(31)); if UpdateStorageVersion::get() { - Self::current_storage_version().put::(); + Self::in_code_storage_version().put::(); } Weight::zero() @@ -1277,7 +1277,7 @@ fn pallet_on_genesis() { assert_eq!(pallet::Pallet::::on_chain_storage_version(), StorageVersion::new(0)); pallet::Pallet::::on_genesis(); assert_eq!( - pallet::Pallet::::current_storage_version(), + pallet::Pallet::::in_code_storage_version(), pallet::Pallet::::on_chain_storage_version(), ); }) @@ -2224,10 +2224,10 @@ fn pallet_on_chain_storage_version_initializes_correctly() { AllPalletsWithSystem, >; - // Simple example of a pallet with current version 10 being added to the runtime for the first + // Simple example of a pallet with in-code version 10 being added to the runtime for the first // time. TestExternalities::default().execute_with(|| { - let current_version = Example::current_storage_version(); + let in_code_version = Example::in_code_storage_version(); // Check the pallet has no storage items set. let pallet_hashed_prefix = twox_128(Example::name().as_bytes()); @@ -2238,14 +2238,14 @@ fn pallet_on_chain_storage_version_initializes_correctly() { // version. Executive::execute_on_runtime_upgrade(); - // Check that the storage version was initialized to the current version + // Check that the storage version was initialized to the in-code version let on_chain_version_after = StorageVersion::get::(); - assert_eq!(on_chain_version_after, current_version); + assert_eq!(on_chain_version_after, in_code_version); }); - // Pallet with no current storage version should have the on-chain version initialized to 0. + // Pallet with no in-code storage version should have the on-chain version initialized to 0. TestExternalities::default().execute_with(|| { - // Example4 current_storage_version is NoStorageVersionSet. + // Example4 in_code_storage_version is NoStorageVersionSet. // Check the pallet has no storage items set. let pallet_hashed_prefix = twox_128(Example4::name().as_bytes()); @@ -2275,7 +2275,7 @@ fn post_runtime_upgrade_detects_storage_version_issues() { impl OnRuntimeUpgrade for CustomUpgrade { fn on_runtime_upgrade() -> Weight { - Example2::current_storage_version().put::(); + Example2::in_code_storage_version().put::(); Default::default() } @@ -2318,14 +2318,14 @@ fn post_runtime_upgrade_detects_storage_version_issues() { >; TestExternalities::default().execute_with(|| { - // Set the on-chain version to one less than the current version for `Example`, simulating a + // Set the on-chain version to one less than the in-code version for `Example`, simulating a // forgotten migration StorageVersion::new(9).put::(); // The version isn't changed, we should detect it. assert!( Executive::try_runtime_upgrade(UpgradeCheckSelect::PreAndPost).unwrap_err() == - "On chain and current storage version do not match. Missing runtime upgrade?" + "On chain and in-code storage version do not match. Missing runtime upgrade?" .into() ); }); diff --git a/substrate/frame/support/test/tests/pallet_ui/compare_unset_storage_version.rs b/substrate/frame/support/test/tests/pallet_ui/compare_unset_storage_version.rs index 840a6dee20cc..d2ca9fc80991 100644 --- a/substrate/frame/support/test/tests/pallet_ui/compare_unset_storage_version.rs +++ b/substrate/frame/support/test/tests/pallet_ui/compare_unset_storage_version.rs @@ -29,7 +29,7 @@ mod pallet { #[pallet::hooks] impl Hooks> for Pallet { fn on_runtime_upgrade() -> Weight { - if Self::current_storage_version() != Self::on_chain_storage_version() { + if Self::in_code_storage_version() != Self::on_chain_storage_version() { } diff --git a/substrate/frame/support/test/tests/pallet_ui/compare_unset_storage_version.stderr b/substrate/frame/support/test/tests/pallet_ui/compare_unset_storage_version.stderr index 1b48197cc9ed..3256e69528a2 100644 --- a/substrate/frame/support/test/tests/pallet_ui/compare_unset_storage_version.stderr +++ b/substrate/frame/support/test/tests/pallet_ui/compare_unset_storage_version.stderr @@ -1,7 +1,7 @@ error[E0369]: binary operation `!=` cannot be applied to type `NoStorageVersionSet` --> tests/pallet_ui/compare_unset_storage_version.rs:32:39 | -32 | if Self::current_storage_version() != Self::on_chain_storage_version() { +32 | if Self::in_code_storage_version() != Self::on_chain_storage_version() { | ------------------------------- ^^ -------------------------------- StorageVersion | | | NoStorageVersionSet diff --git a/substrate/frame/system/src/lib.rs b/substrate/frame/system/src/lib.rs index 15dd047fdb05..dbf979a9ea46 100644 --- a/substrate/frame/system/src/lib.rs +++ b/substrate/frame/system/src/lib.rs @@ -401,7 +401,7 @@ pub mod pallet { #[pallet::constant] type DbWeight: Get; - /// Get the chain's current version. + /// Get the chain's on-code version. #[pallet::constant] type Version: Get; diff --git a/substrate/frame/tips/src/lib.rs b/substrate/frame/tips/src/lib.rs index 8764486d5f4f..dff575f8bc0c 100644 --- a/substrate/frame/tips/src/lib.rs +++ b/substrate/frame/tips/src/lib.rs @@ -118,7 +118,7 @@ pub mod pallet { use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; - /// The current storage version. + /// The in-code storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(4); #[pallet::pallet] From 050f465a6bbb04ad5c85ddbd0b908427c7e05e9e Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 14:15:34 +0400 Subject: [PATCH 79/98] try fix ci --- Cargo.lock | 200 +++++++++++++++++++++++++++++------------------------ 1 file changed, 109 insertions(+), 91 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c3c394fd803b..4e4692579c54 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,9 +121,9 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead 0.5.2", "aes 0.8.3", @@ -655,7 +655,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time", + "time 0.3.27", ] [[package]] @@ -671,7 +671,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time", + "time 0.3.27", ] [[package]] @@ -1145,7 +1145,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -1162,7 +1162,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -1338,7 +1338,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -2377,14 +2377,15 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.30" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877" +checksum = "f56b4c72906975ca04becb8a30e102dfecddd0c06181e3e95ddc444be28881f8" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", + "time 0.1.45", "wasm-bindgen", "windows-targets 0.48.5", ] @@ -2548,7 +2549,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -3606,7 +3607,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -4117,7 +4118,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -4157,7 +4158,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -4174,7 +4175,7 @@ checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -4512,7 +4513,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -4574,7 +4575,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.39", + "syn 2.0.38", "termcolor", "toml 0.7.6", "walkdir", @@ -4829,7 +4830,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -4840,7 +4841,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -4995,7 +4996,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -5109,7 +5110,7 @@ dependencies = [ [[package]] name = "fflonk" version = "0.1.0" -source = "git+https://github.com/w3f/fflonk#26a5045b24e169cffc1f9328ca83d71061145c40" +source = "git+https://github.com/w3f/fflonk#1beb0585e1c8488956fac7f05da061f9b41e8948" dependencies = [ "ark-ec", "ark-ff", @@ -5382,7 +5383,7 @@ dependencies = [ "quote", "scale-info", "sp-arithmetic", - "syn 2.0.39", + "syn 2.0.38", "trybuild", ] @@ -5534,7 +5535,7 @@ dependencies = [ "proc-macro2", "quote", "sp-core-hashing", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -5545,7 +5546,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -5554,7 +5555,7 @@ version = "3.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -5699,7 +5700,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29f9df8a11882c4e3335eb2d18a0137c505d9ca927470b0cac9c6f0ae07d28f7" dependencies = [ - "rustix 0.38.25", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -5787,7 +5788,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -6605,7 +6606,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", - "rustix 0.38.25", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -7059,9 +7060,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libflate" @@ -7656,9 +7657,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.11" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lioness" @@ -7781,7 +7782,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -7795,7 +7796,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -7806,7 +7807,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -7817,7 +7818,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -9533,7 +9534,7 @@ version = "4.0.0-dev" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -10678,7 +10679,7 @@ dependencies = [ "proc-macro2", "quote", "sp-runtime", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -11547,7 +11548,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -11588,7 +11589,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -13466,7 +13467,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" dependencies = [ "proc-macro2", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -13548,14 +13549,14 @@ checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] name = "proc-macro2" -version = "1.0.70" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -13572,7 +13573,7 @@ dependencies = [ "hex", "lazy_static", "procfs-core", - "rustix 0.38.25", + "rustix 0.38.21", ] [[package]] @@ -13620,7 +13621,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -13780,9 +13781,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31999cfc7927c4e212e60fd50934ab40e8e8bfd2d493d6095d2d306bc0764d9" +checksum = "c956be1b23f4261676aed05a0046e204e8a6836e50203902683a718af0797989" dependencies = [ "bytes", "rand 0.8.5", @@ -13937,7 +13938,7 @@ checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", "ring 0.16.20", - "time", + "time 0.3.27", "x509-parser 0.13.2", "yasna", ] @@ -13950,7 +13951,7 @@ checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring 0.16.20", - "time", + "time 0.3.27", "yasna", ] @@ -14022,7 +14023,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -14576,14 +14577,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.25" +version = "0.38.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" dependencies = [ "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.11", + "linux-raw-sys 0.4.10", "windows-sys 0.48.0", ] @@ -14854,7 +14855,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -16110,7 +16111,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -16479,7 +16480,7 @@ checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -16545,7 +16546,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -16989,7 +16990,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -17324,7 +17325,7 @@ version = "9.0.0" dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -17350,7 +17351,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" version = "0.4.1" -source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -17382,17 +17383,17 @@ version = "8.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] name = "sp-debug-derive" version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -17408,7 +17409,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "environmental", "parity-scale-codec", @@ -17642,7 +17643,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -17666,19 +17667,19 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -17774,7 +17775,7 @@ dependencies = [ name = "sp-statement-store" version = "4.0.0-dev" dependencies = [ - "aes-gcm 0.10.2", + "aes-gcm 0.10.3", "curve25519-dalek 4.0.0", "ed25519-dalek", "hkdf", @@ -17800,7 +17801,7 @@ version = "8.0.0" [[package]] name = "sp-std" version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" [[package]] name = "sp-storage" @@ -17817,7 +17818,7 @@ dependencies = [ [[package]] name = "sp-storage" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "impl-serde", "parity-scale-codec", @@ -17866,7 +17867,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "parity-scale-codec", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", @@ -17950,7 +17951,7 @@ dependencies = [ "proc-macro2", "quote", "sp-version", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -17968,7 +17969,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#db290997651dae8615be706efdd74f0ab0db52ee" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -18784,9 +18785,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -18858,7 +18859,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.0", "redox_syscall 0.4.1", - "rustix 0.38.25", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -18877,7 +18878,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix 0.38.25", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -19054,7 +19055,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -19126,6 +19127,17 @@ dependencies = [ "tikv-jemalloc-sys", ] +[[package]] +name = "time" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" +dependencies = [ + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi", +] + [[package]] name = "time" version = "0.3.27" @@ -19215,7 +19227,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -19421,7 +19433,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -19463,7 +19475,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] @@ -19983,6 +19995,12 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -20012,7 +20030,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -20046,7 +20064,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -20485,7 +20503,7 @@ dependencies = [ "sha2 0.10.7", "stun", "thiserror", - "time", + "time 0.3.27", "tokio", "turn", "url", @@ -20522,7 +20540,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a00f4242f2db33307347bd5be53263c52a0331c96c14292118c9a6bb48d267" dependencies = [ "aes 0.6.0", - "aes-gcm 0.10.2", + "aes-gcm 0.10.3", "async-trait", "bincode", "block-modes", @@ -21132,7 +21150,7 @@ dependencies = [ "ring 0.16.20", "rusticata-macros", "thiserror", - "time", + "time 0.3.27", ] [[package]] @@ -21150,7 +21168,7 @@ dependencies = [ "oid-registry 0.6.1", "rusticata-macros", "thiserror", - "time", + "time 0.3.27", ] [[package]] @@ -21224,7 +21242,7 @@ dependencies = [ "proc-macro2", "quote", "staging-xcm", - "syn 2.0.39", + "syn 2.0.38", "trybuild", ] @@ -21324,7 +21342,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time", + "time 0.3.27", ] [[package]] @@ -21344,7 +21362,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.38", ] [[package]] From 91f80eba2d3fbc3b72bcd2bdf8fadc7bbfaf436b Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 14:19:35 +0400 Subject: [PATCH 80/98] rename --- .../support/procedural/src/pallet/expand/pallet_struct.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/frame/support/procedural/src/pallet/expand/pallet_struct.rs b/substrate/frame/support/procedural/src/pallet/expand/pallet_struct.rs index fd76562cc6bd..7cdf6bde9de8 100644 --- a/substrate/frame/support/procedural/src/pallet/expand/pallet_struct.rs +++ b/substrate/frame/support/procedural/src/pallet/expand/pallet_struct.rs @@ -203,9 +203,9 @@ pub fn expand_pallet_struct(def: &mut Def) -> proc_macro2::TokenStream { for #pallet_ident<#type_use_gen> #config_where_clause { - type CurrentStorageVersion = #in_code_storage_version_ty; + type InCodeStorageVersion = #in_code_storage_version_ty; - fn in_code_storage_version() -> Self::CurrentStorageVersion { + fn in_code_storage_version() -> Self::InCodeStorageVersion { #storage_version } From 66d27452a3d3a6e175182984fe52fa3029e1b000 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 14:29:13 +0400 Subject: [PATCH 81/98] feature propagarion --- substrate/frame/examples/single-block-migrations/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/substrate/frame/examples/single-block-migrations/Cargo.toml b/substrate/frame/examples/single-block-migrations/Cargo.toml index 22426607595f..5059b2433c77 100644 --- a/substrate/frame/examples/single-block-migrations/Cargo.toml +++ b/substrate/frame/examples/single-block-migrations/Cargo.toml @@ -43,6 +43,7 @@ std = [ "sp-io/std", "sp-runtime/std", "sp-std/std", + "sp-version/std", ] runtime-benchmarks = [ "frame-support/runtime-benchmarks", From 1a2d8349a3b4b8d5b60620a09cf4ca26f18e585a Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 14:36:16 +0400 Subject: [PATCH 82/98] fix unused import wanrings --- .../frame/examples/single-block-migrations/src/lib.rs | 11 ++++++----- .../src/runtime_upgrade_reference_docs.rs | 9 ++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/substrate/frame/examples/single-block-migrations/src/lib.rs b/substrate/frame/examples/single-block-migrations/src/lib.rs index f727b7ca8d6e..c3ed7965621f 100644 --- a/substrate/frame/examples/single-block-migrations/src/lib.rs +++ b/substrate/frame/examples/single-block-migrations/src/lib.rs @@ -141,6 +141,11 @@ //! - `on_runtime_upgrade` returns the expected weight //! - `post_upgrade` succeeds when given the bytes returned by `pre_upgrade` //! - Pallet storage is in the expected state after the migration +//! +//! [`VersionedMigration`]: frame_support::migrations::VersionedMigration +//! [`GetStorageVersion`]: frame_support::traits::GetStorageVersion +//! [`OnRuntimeUpgrade`]: frame_support::traits::OnRuntimeUpgrade +//! [`MigrateV0ToV1`]: crate::migrations::v1::versioned::MigrationV0ToV1 // We make sure this pallet uses `no_std` for compiling to Wasm. #![cfg_attr(not(feature = "std"), no_std)] @@ -156,12 +161,8 @@ pub use pallet::*; pub mod migrations; #[doc(hidden)] mod mock; -use crate::migrations::v1::versioned::MigrateV0ToV1; use codec::{Decode, Encode, MaxEncodedLen}; -use frame_support::{ - migrations::VersionedMigration, - traits::{GetStorageVersion, OnRuntimeUpgrade, StorageVersion}, -}; +use frame_support::traits::StorageVersion; use sp_runtime::RuntimeDebug; /// Example struct holding the most recently set [`u32`] and the diff --git a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs index 4d4dffee1f4b..a32078d1ecfb 100644 --- a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs +++ b/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs @@ -131,6 +131,9 @@ //! Suitable for migrations which could use arbitrary amounts of block weight. //! //! TODO: Link to multi block migration example/s. - -use frame_support::traits::{GetStorageVersion, OnRuntimeUpgrade, StorageVersion}; -use frame_system::Call::{set_code, set_code_without_checks}; +//! +//! [`GetStorageVersion`]: frame_support::traits::GetStorageVersion +//! [`OnRuntimeUpgrade`]: frame_support::traits::OnRuntimeUpgrade +//! [`StorageVersion`]: frame_support::traits::StorageVersion +//! [`set_code`]: frame_system::Call::set_code +//! [`set_code_without_checks`]: frame_system::Call:set_code_without_checks From 69e4209cd415517a772b43c3407bcb206cd63cea Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Fri, 1 Dec 2023 15:20:56 +0400 Subject: [PATCH 83/98] fix typo --- substrate/frame/system/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/system/src/lib.rs b/substrate/frame/system/src/lib.rs index dbf979a9ea46..7938fc6a53d2 100644 --- a/substrate/frame/system/src/lib.rs +++ b/substrate/frame/system/src/lib.rs @@ -401,7 +401,7 @@ pub mod pallet { #[pallet::constant] type DbWeight: Get; - /// Get the chain's on-code version. + /// Get the chain's in-code version. #[pallet::constant] type Version: Get; From 52963facc6836c2d0835e26d7d34ae8ec2f6c882 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 7 Dec 2023 11:02:30 +0400 Subject: [PATCH 84/98] fix merge --- cumulus/pallets/xcmp-queue/src/migration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cumulus/pallets/xcmp-queue/src/migration.rs b/cumulus/pallets/xcmp-queue/src/migration.rs index 6c86c3011d23..c7fa61a3e3f0 100644 --- a/cumulus/pallets/xcmp-queue/src/migration.rs +++ b/cumulus/pallets/xcmp-queue/src/migration.rs @@ -24,7 +24,7 @@ use frame_support::{ weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, Weight}, }; -/// The current storage version. +/// The in-code storage version. pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(4); pub const LOG: &str = "runtime::xcmp-queue-migration"; From dfe32c56d1f2da8fd054cbcf5f051d2cce833b18 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 7 Dec 2023 12:24:50 +0400 Subject: [PATCH 85/98] move reference doc to correct place --- Cargo.lock | 5 +++++ docs/sdk/Cargo.toml | 5 +++++ docs/sdk/src/reference_docs/frame_runtime_migration.rs | 9 --------- .../frame_runtime_upgrades_and_migrations.rs | 8 ++------ docs/sdk/src/reference_docs/mod.rs | 5 ++--- .../frame/examples/single-block-migrations/src/lib.rs | 5 ----- substrate/frame/examples/src/lib.rs | 2 +- 7 files changed, 15 insertions(+), 24 deletions(-) delete mode 100644 docs/sdk/src/reference_docs/frame_runtime_migration.rs rename substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs => docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs (95%) diff --git a/Cargo.lock b/Cargo.lock index af9144fdbb57..28ead288a622 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13040,9 +13040,13 @@ dependencies = [ "cumulus-pallet-parachain-system", "docify", "frame", + "frame-executive", + "frame-support", + "frame-system", "kitchensink-runtime", "pallet-aura", "pallet-default-config-example", + "pallet-example-single-block-migrations", "pallet-examples", "pallet-timestamp", "parity-scale-codec", @@ -13064,6 +13068,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", + "sp-version", "staging-chain-spec-builder", "staging-node-cli", "staging-parachain-info", diff --git a/docs/sdk/Cargo.toml b/docs/sdk/Cargo.toml index 14b4747d558d..6e9c7530ab2a 100644 --- a/docs/sdk/Cargo.toml +++ b/docs/sdk/Cargo.toml @@ -27,6 +27,10 @@ node-cli = { package = "staging-node-cli", path = "../../substrate/bin/node/cli" kitchensink-runtime = { path = "../../substrate/bin/node/runtime" } chain-spec-builder = { package = "staging-chain-spec-builder", path = "../../substrate/bin/utils/chain-spec-builder" } subkey = { path = "../../substrate/bin/utils/subkey" } +frame-system = { path = "../../substrate/frame/system", default-features = false } +frame-support = { path = "../../substrate/frame/support", default-features = false } +frame-executive = { path = "../../substrate/frame/executive", default-features = false } +pallet-example-single-block-migrations = {path = "../../substrate/frame/examples/single-block-migrations"} # Substrate sc-network = { path = "../../substrate/client/network" } @@ -57,6 +61,7 @@ sp-api = { path = "../../substrate/primitives/api" } sp-core = { path = "../../substrate/primitives/core" } sp-keyring = { path = "../../substrate/primitives/keyring" } sp-runtime = { path = "../../substrate/primitives/runtime" } +sp-version = { path = "../../substrate/primitives/version" } [dev-dependencies] parity-scale-codec = "3.6.5" diff --git a/docs/sdk/src/reference_docs/frame_runtime_migration.rs b/docs/sdk/src/reference_docs/frame_runtime_migration.rs deleted file mode 100644 index 0616ccbb6f57..000000000000 --- a/docs/sdk/src/reference_docs/frame_runtime_migration.rs +++ /dev/null @@ -1,9 +0,0 @@ -//! # Runtime Runtime Upgrade and Testing -//! -//! -//! Notes: -//! -//! - Flow of things, when does `on_runtime_upgrade` get called. Link to to `Hooks` and its diagram -//! as source of truth. -//! - Data migration and when it is needed. -//! - Look into the pba-lecture. diff --git a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs b/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs similarity index 95% rename from substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs rename to docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs index a32078d1ecfb..b99c4e847108 100644 --- a/substrate/frame/examples/single-block-migrations/src/runtime_upgrade_reference_docs.rs +++ b/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs @@ -1,7 +1,3 @@ -//! Temporary home while we wait for sdk-docs / polkadot-developer-hub to merge. -//! -//! Reference docs for understanding Runtime Upgrades and writing Migrations. -//! //! # Runtime Upgrades //! //! At their core, blockchain logic consists of @@ -56,7 +52,7 @@ //! - Are simply implementations of [`OnRuntimeUpgrade`]. //! //! To learn best practices for writing single block pallet storage migrations, see the -//! [Single Block Migration Example Pallet](crate). +//! [Single Block Migration Example Pallet](pallet_example_single_block_migrations). //! //! ### Scheduling the Single Block Migrations to Run Next Runtime Upgrade //! @@ -136,4 +132,4 @@ //! [`OnRuntimeUpgrade`]: frame_support::traits::OnRuntimeUpgrade //! [`StorageVersion`]: frame_support::traits::StorageVersion //! [`set_code`]: frame_system::Call::set_code -//! [`set_code_without_checks`]: frame_system::Call:set_code_without_checks +//! [`set_code_without_checks`]: frame_system::Call::set_code_without_checks diff --git a/docs/sdk/src/reference_docs/mod.rs b/docs/sdk/src/reference_docs/mod.rs index 44284394000d..49fb6ad6bb85 100644 --- a/docs/sdk/src/reference_docs/mod.rs +++ b/docs/sdk/src/reference_docs/mod.rs @@ -89,9 +89,8 @@ pub mod cli; // TODO: @JoshOrndorff @kianenigma https://github.com/paritytech/polkadot-sdk-docs/issues/54 pub mod consensus_swapping; -/// Learn about all the advance ways to test your coordinate a rutnime upgrade and data migration. -// TODO: @liamaharon https://github.com/paritytech/polkadot-sdk-docs/issues/55 -pub mod frame_runtime_migration; +/// Learn about Runtime Upgrades and best practices for writing Migrations. +pub mod frame_runtime_upgrades_and_migrations; /// Learn about light nodes, how they function, and how Substrate-based chains come /// light-node-first out of the box. diff --git a/substrate/frame/examples/single-block-migrations/src/lib.rs b/substrate/frame/examples/single-block-migrations/src/lib.rs index c3ed7965621f..ce53d65951a3 100644 --- a/substrate/frame/examples/single-block-migrations/src/lib.rs +++ b/substrate/frame/examples/single-block-migrations/src/lib.rs @@ -20,9 +20,6 @@ //! An example pallet demonstrating best-practices for writing single-block migrations in the //! context of upgrading pallet storage. //! -//! Read more about runtime upgrades and migrations by reading the [Runtime Upgrade Reference -//! Docs](runtime_upgrade_reference_docs). -//! //! ## Forwarning //! //! Single block migrations **MUST** execute in a single block, therefore when executed on a @@ -152,8 +149,6 @@ // allow non-camel-case names for storage version V0 value #![allow(non_camel_case_types)] -pub mod runtime_upgrade_reference_docs; - // Re-export pallet items so that they can be accessed from the crate namespace. pub use pallet::*; diff --git a/substrate/frame/examples/src/lib.rs b/substrate/frame/examples/src/lib.rs index 5dbe6e207002..6228bcfbb730 100644 --- a/substrate/frame/examples/src/lib.rs +++ b/substrate/frame/examples/src/lib.rs @@ -43,7 +43,7 @@ //! - [`pallet_example_frame_crate`]: Example pallet showcasing how one can be //! built using only the `frame` umbrella crate. //! -//! - [`pallet-example-single-block-migrations`]: An example pallet demonstrating best-practices for +//! - [`pallet_example_single_block_migrations`]: An example pallet demonstrating best-practices for //! writing storage migrations. //! //! **Tip**: Use `cargo doc --package --open` to view each pallet's documentation. From 2d0875901d979257ca11abccb4425ad03e32ce6b Mon Sep 17 00:00:00 2001 From: command-bot <> Date: Thu, 7 Dec 2023 08:28:34 +0000 Subject: [PATCH 86/98] ".git/.scripts/commands/fmt/fmt.sh" --- docs/sdk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdk/Cargo.toml b/docs/sdk/Cargo.toml index 6e9c7530ab2a..ece53f72e482 100644 --- a/docs/sdk/Cargo.toml +++ b/docs/sdk/Cargo.toml @@ -30,7 +30,7 @@ subkey = { path = "../../substrate/bin/utils/subkey" } frame-system = { path = "../../substrate/frame/system", default-features = false } frame-support = { path = "../../substrate/frame/support", default-features = false } frame-executive = { path = "../../substrate/frame/executive", default-features = false } -pallet-example-single-block-migrations = {path = "../../substrate/frame/examples/single-block-migrations"} +pallet-example-single-block-migrations = { path = "../../substrate/frame/examples/single-block-migrations" } # Substrate sc-network = { path = "../../substrate/client/network" } From 2fadaad9c0215dd7ad29d325368d1e60c1c77791 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 7 Dec 2023 12:44:06 +0400 Subject: [PATCH 87/98] prdoc --- prdoc/pr_1554.prdoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 prdoc/pr_1554.prdoc diff --git a/prdoc/pr_1554.prdoc b/prdoc/pr_1554.prdoc new file mode 100644 index 000000000000..355654e97f44 --- /dev/null +++ b/prdoc/pr_1554.prdoc @@ -0,0 +1,13 @@ +# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 +# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json + +title: Runtime Upgrade ref docs and Single Block Migration example pallet + +doc: + - audience: Runtime Dev + description: | + `frame_support::traits::GetStorageVersion::current_storage_version` has been renamed `frame_support::traits::GetStorageVersion::in_code_storage_version`. + A simple find-replace is sufficient to handle this change. + +crates: [ frame_support ] + From 8108b8ea873a3288bae9e0572050d577a2042795 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 7 Dec 2023 12:50:59 +0400 Subject: [PATCH 88/98] fix prdoc --- prdoc/pr_1554.prdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prdoc/pr_1554.prdoc b/prdoc/pr_1554.prdoc index 355654e97f44..bfce7c5edafd 100644 --- a/prdoc/pr_1554.prdoc +++ b/prdoc/pr_1554.prdoc @@ -9,5 +9,6 @@ doc: `frame_support::traits::GetStorageVersion::current_storage_version` has been renamed `frame_support::traits::GetStorageVersion::in_code_storage_version`. A simple find-replace is sufficient to handle this change. -crates: [ frame_support ] +crates: + - name: "frame-support" From 03b7735ee023a75df0981c331485038650e950c8 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 7 Dec 2023 16:13:08 +0400 Subject: [PATCH 89/98] keep current_storage_version around for 3 months --- substrate/frame/support/src/traits/metadata.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/substrate/frame/support/src/traits/metadata.rs b/substrate/frame/support/src/traits/metadata.rs index c917fdb0f11a..e9b8c861e5c1 100644 --- a/substrate/frame/support/src/traits/metadata.rs +++ b/substrate/frame/support/src/traits/metadata.rs @@ -302,6 +302,18 @@ pub trait GetStorageVersion { /// case that they wish to compare the in-code storage version to the on-chain storage version. type InCodeStorageVersion; + #[deprecated( + note = "Deprecated and will be removed after March 2024. Use `in_code_storage_version` instead." + )] + /// DEPRECATED: Use [`Self::current_storage_version`] instead. + /// + /// Returns the in-code storage version as specified in the + /// [`storage_version`](crate::pallet_macros::storage_version) attribute, or + /// [`NoStorageVersionSet`] if the attribute is missing. + fn current_storage_version() -> Self::InCodeStorageVersion { + Self::in_code_storage_version() + } + /// Returns the in-code storage version as specified in the /// [`storage_version`](crate::pallet_macros::storage_version) attribute, or /// [`NoStorageVersionSet`] if the attribute is missing. From a6c1dc6cd686f76ce1fd09662c0ed7fa809716a7 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 7 Dec 2023 16:15:07 +0400 Subject: [PATCH 90/98] improve deprecation msg --- substrate/frame/support/src/traits/metadata.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/support/src/traits/metadata.rs b/substrate/frame/support/src/traits/metadata.rs index e9b8c861e5c1..064d1e79a956 100644 --- a/substrate/frame/support/src/traits/metadata.rs +++ b/substrate/frame/support/src/traits/metadata.rs @@ -303,7 +303,7 @@ pub trait GetStorageVersion { type InCodeStorageVersion; #[deprecated( - note = "Deprecated and will be removed after March 2024. Use `in_code_storage_version` instead." + note = "This method has been renamed to `in_code_storage_version` and will be removed after March 2024." )] /// DEPRECATED: Use [`Self::current_storage_version`] instead. /// From 319b32ddbee1b326cdf81245b250fc3098d2bad2 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Thu, 18 Jan 2024 11:18:30 +0400 Subject: [PATCH 91/98] update cargo.lock --- Cargo.lock | 3136 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 1900 insertions(+), 1236 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 28ead288a622..790525155b8d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,15 +42,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" -[[package]] -name = "aead" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array 0.14.7", -] - [[package]] name = "aead" version = "0.4.3" @@ -58,7 +49,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ "generic-array 0.14.7", - "rand_core 0.6.4", ] [[package]] @@ -71,17 +61,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "aes" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" -dependencies = [ - "aes-soft", - "aesni", - "cipher 0.2.5", -] - [[package]] name = "aes" version = "0.7.5" @@ -133,26 +112,6 @@ dependencies = [ "subtle 2.4.1", ] -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher 0.2.5", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher 0.2.5", - "opaque-debug 0.3.0", -] - [[package]] name = "ahash" version = "0.7.6" @@ -166,14 +125,15 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", "getrandom 0.2.10", "once_cell", "version_check", + "zerocopy", ] [[package]] @@ -191,12 +151,92 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "alloy-primitives" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0628ec0ba5b98b3370bb6be17b12f23bfce8ee4ad83823325a20546d9b03b78" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "proptest", + "rand 0.8.5", + "ruint", + "serde", + "tiny-keccak", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "alloy-rlp-derive", + "arrayvec 0.7.4", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a98ad1696a2e17f010ae8e43e9f2a1e930ed176a8e3ff77acfeff6dfb07b42c" +dependencies = [ + "const-hex", + "dunce", + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.48", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-types" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d7107bed88e8f09f0ddcc3335622d87bfb6821f3e0c7473329fb1cfad5e015" +dependencies = [ + "alloy-primitives", + "alloy-sol-macro", + "const-hex", + "serde", +] + [[package]] name = "always-assert" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4436e0292ab1bb631b42973c61205e704475fe8126af845c8d923c0996328127" +[[package]] +name = "amcl" +version = "0.3.0" +source = "git+https://github.com/snowfork/milagro_bls?rev=a6d66e4eb89015e352fb1c9f7b661ecdbb5b2176#a6d66e4eb89015e352fb1c9f7b661ecdbb5b2176" +dependencies = [ + "parity-scale-codec", + "scale-info", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -229,9 +269,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "3fde6067df7359f2d6335ec1a50c1f8f825801687d10da0cc4c6b08e3f6afd15" dependencies = [ "anstyle", "anstyle-parse", @@ -292,16 +332,16 @@ dependencies = [ [[package]] name = "aquamarine" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df752953c49ce90719c7bf1fc587bc8227aed04732ea0c0f85e5397d7fdbd1a1" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" dependencies = [ "include_dir", "itertools 0.10.5", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] @@ -310,12 +350,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" -[[package]] -name = "arc-swap" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" - [[package]] name = "ark-bls12-377" version = "0.4.0" @@ -323,8 +357,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" dependencies = [ "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -336,7 +370,7 @@ dependencies = [ "ark-bls12-377", "ark-ec", "ark-models-ext", - "ark-std", + "ark-std 0.4.0", ] [[package]] @@ -346,9 +380,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" dependencies = [ "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -359,10 +393,10 @@ checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" dependencies = [ "ark-bls12-381", "ark-ec", - "ark-ff", + "ark-ff 0.4.2", "ark-models-ext", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -373,8 +407,8 @@ checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" dependencies = [ "ark-bls12-377", "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -385,9 +419,9 @@ checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" dependencies = [ "ark-bw6-761", "ark-ec", - "ark-ff", + "ark-ff 0.4.2", "ark-models-ext", - "ark-std", + "ark-std 0.4.0", ] [[package]] @@ -396,10 +430,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" dependencies = [ - "ark-ff", + "ark-ff 0.4.2", "ark-poly", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", "itertools 0.10.5", @@ -416,8 +450,8 @@ checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" dependencies = [ "ark-bls12-377", "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -428,9 +462,9 @@ checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" dependencies = [ "ark-ec", "ark-ed-on-bls12-377", - "ark-ff", + "ark-ff 0.4.2", "ark-models-ext", - "ark-std", + "ark-std 0.4.0", ] [[package]] @@ -441,8 +475,8 @@ checksum = "f9cde0f2aa063a2a5c28d39b47761aa102bda7c13c84fc118a61b87c7b2f785c" dependencies = [ "ark-bls12-381", "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -453,9 +487,27 @@ checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" dependencies = [ "ark-ec", "ark-ed-on-bls12-381-bandersnatch", - "ark-ff", + "ark-ff 0.4.2", "ark-models-ext", - "ark-std", + "ark-std 0.4.0", +] + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", ] [[package]] @@ -464,10 +516,10 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "digest 0.10.7", "itertools 0.10.5", @@ -478,6 +530,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -488,6 +550,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-macros" version = "0.4.2" @@ -508,9 +582,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" dependencies = [ "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", ] @@ -520,9 +594,9 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", ] @@ -534,9 +608,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51bd73bb6ddb72630987d37fa963e99196896c0d0ea81b7c894567e74a2f83af" dependencies = [ "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "parity-scale-codec", + "scale-info", +] + +[[package]] +name = "ark-scale" +version = "0.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f69c00b3b529be29528a6f2fd5fa7b1790f8bed81b9cdca17e326538545a179" +dependencies = [ + "ark-ec", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "parity-scale-codec", "scale-info", ] @@ -544,18 +632,28 @@ dependencies = [ [[package]] name = "ark-secret-scalar" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=2019248#2019248785389b3246d55b1c3b0e9bdef4454cb7" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "ark-transcript", "digest 0.10.7", "getrandom_or_panic", "zeroize", ] +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + [[package]] name = "ark-serialize" version = "0.4.2" @@ -563,7 +661,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ "ark-serialize-derive", - "ark-std", + "ark-std 0.4.0", "digest 0.10.7", "num-bigint", ] @@ -579,6 +677,16 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + [[package]] name = "ark-std" version = "0.4.0" @@ -593,11 +701,11 @@ dependencies = [ [[package]] name = "ark-transcript" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=2019248#2019248785389b3246d55b1c3b0e9bdef4454cb7" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "digest 0.10.7", "rand_core 0.6.4", "sha3", @@ -642,48 +750,20 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -[[package]] -name = "asn1-rs" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ff05a702273012438132f449575dbc804e27b2f3cbe3069aa237d26c98fa33" -dependencies = [ - "asn1-rs-derive 0.1.0", - "asn1-rs-impl", - "displaydoc", - "nom", - "num-traits", - "rusticata-macros", - "thiserror", - "time 0.3.27", -] - [[package]] name = "asn1-rs" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" dependencies = [ - "asn1-rs-derive 0.4.0", + "asn1-rs-derive", "asn1-rs-impl", "displaydoc", "nom", "num-traits", "rusticata-macros", "thiserror", - "time 0.3.27", -] - -[[package]] -name = "asn1-rs-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", + "time", ] [[package]] @@ -826,6 +906,7 @@ dependencies = [ "rococo-runtime-constants", "scale-info", "smallvec", + "snowbridge-router-primitives", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -871,6 +952,7 @@ dependencies = [ "asset-test-utils", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", + "cumulus-pallet-xcmp-queue", "emulated-integration-tests-common", "frame-support", "frame-system", @@ -983,6 +1065,7 @@ dependencies = [ "frame-support", "frame-system", "hex-literal", + "pallet-asset-conversion", "pallet-assets", "pallet-balances", "pallet-collator-selection", @@ -1143,7 +1226,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -1154,13 +1237,13 @@ checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -1199,6 +1282,18 @@ dependencies = [ "winapi", ] +[[package]] +name = "auto_impl" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -1216,21 +1311,21 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", - "object 0.32.0", + "object 0.32.2", "rustc-demangle", ] [[package]] name = "bandersnatch_vrfs" version = "0.0.4" -source = "git+https://github.com/w3f/ring-vrf?rev=2019248#2019248785389b3246d55b1c3b0e9bdef4454cb7" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-bls12-381", "ark-ec", "ark-ed-on-bls12-381-bandersnatch", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "dleq_vrf", "fflonk", "merlin 3.0.0", @@ -1249,12 +1344,6 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - [[package]] name = "base16ct" version = "0.2.0" @@ -1281,9 +1370,9 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "basic-toml" -version = "0.1.4" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bfc506e7a2370ec239e1d072507b2a80c833083699d3c6fa176fbb4de8448c6" +checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" dependencies = [ "serde", ] @@ -1336,7 +1425,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -1352,6 +1441,21 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bitcoin_hashes" version = "0.11.0" @@ -1455,7 +1559,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding 0.1.5", + "block-padding", "byte-tools", "byteorder", "generic-array 0.12.4", @@ -1479,16 +1583,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "block-modes" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" -dependencies = [ - "block-padding 0.2.1", - "cipher 0.2.5", -] - [[package]] name = "block-padding" version = "0.1.5" @@ -1498,12 +1592,6 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - [[package]] name = "blocking" version = "1.3.1" @@ -1521,13 +1609,14 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b05133427c07c4776906f673ccf36c21b102c9829c641a5b56bd151d44fd6" +checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" dependencies = [ "log", "parity-scale-codec", "scale-info", + "schemars", "serde", ] @@ -1834,16 +1923,38 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "bridge-hub-common" +version = "0.1.0" +dependencies = [ + "cumulus-primitives-core", + "frame-support", + "pallet-message-queue", + "parity-scale-codec", + "scale-info", + "snowbridge-core", + "sp-core", + "sp-runtime", + "sp-std 8.0.0", + "staging-xcm", +] + [[package]] name = "bridge-hub-rococo-emulated-chain" version = "0.0.0" dependencies = [ + "bridge-hub-common", "bridge-hub-rococo-runtime", "cumulus-primitives-core", "emulated-integration-tests-common", "frame-support", "parachains-common", "serde_json", + "snowbridge-core", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", "sp-core", "sp-runtime", ] @@ -1852,6 +1963,7 @@ dependencies = [ name = "bridge-hub-rococo-integration-tests" version = "1.0.0" dependencies = [ + "asset-hub-rococo-runtime", "asset-test-utils", "bp-messages", "bridge-hub-rococo-runtime", @@ -1859,6 +1971,9 @@ dependencies = [ "cumulus-pallet-xcmp-queue", "emulated-integration-tests-common", "frame-support", + "hex", + "hex-literal", + "pallet-asset-conversion", "pallet-assets", "pallet-balances", "pallet-bridge-messages", @@ -1866,7 +1981,17 @@ dependencies = [ "pallet-xcm", "parachains-common", "parity-scale-codec", + "penpal-runtime", + "rococo-system-emulated-network", "rococo-westend-system-emulated-network", + "scale-info", + "snowbridge-core", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "sp-core", + "sp-runtime", "staging-xcm", "staging-xcm-executor", ] @@ -1877,16 +2002,19 @@ version = "0.1.0" dependencies = [ "bp-asset-hub-rococo", "bp-asset-hub-westend", + "bp-bridge-hub-polkadot", "bp-bridge-hub-rococo", "bp-bridge-hub-westend", "bp-header-chain", "bp-messages", "bp-parachains", + "bp-polkadot-bulletin", "bp-polkadot-core", "bp-relayers", "bp-rococo", "bp-runtime", "bp-westend", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext", @@ -1932,6 +2060,17 @@ dependencies = [ "scale-info", "serde", "smallvec", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-runtime-common", + "snowbridge-runtime-test-common", + "snowbridge-system-runtime-api", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -1974,6 +2113,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "pallet-balances", "pallet-bridge-grandpa", @@ -1992,6 +2132,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", + "sp-std 8.0.0", "sp-tracing 10.0.0", "staging-parachain-info", "staging-xcm", @@ -2003,6 +2144,7 @@ dependencies = [ name = "bridge-hub-westend-emulated-chain" version = "0.0.0" dependencies = [ + "bridge-hub-common", "bridge-hub-westend-runtime", "cumulus-primitives-core", "emulated-integration-tests-common", @@ -2024,6 +2166,7 @@ dependencies = [ "cumulus-pallet-xcmp-queue", "emulated-integration-tests-common", "frame-support", + "pallet-asset-conversion", "pallet-assets", "pallet-balances", "pallet-bridge-messages", @@ -2032,6 +2175,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "rococo-westend-system-emulated-network", + "sp-runtime", "staging-xcm", "staging-xcm-executor", ] @@ -2052,6 +2196,7 @@ dependencies = [ "bp-rococo", "bp-runtime", "bp-westend", + "bridge-hub-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext", @@ -2297,17 +2442,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ccm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca1a8fbc20b50ac9673ff014abfb2b5f4085ee1a850d408f14a159c5853ac7" -dependencies = [ - "aead 0.3.2", - "cipher 0.2.5", - "subtle 2.4.1", -] - [[package]] name = "cexpr" version = "0.6.0" @@ -2386,15 +2520,14 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.27" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56b4c72906975ca04becb8a30e102dfecddd0c06181e3e95ddc444be28881f8" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", - "time 0.1.45", "wasm-bindgen", "windows-targets 0.48.5", ] @@ -2506,19 +2639,28 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.10" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272" +checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" dependencies = [ "clap_builder", "clap_derive 4.4.7", ] +[[package]] +name = "clap-num" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488557e97528174edaa2ee268b23a809e0c598213a4bbcb4f34575a46fda147e" +dependencies = [ + "num-traits", +] + [[package]] name = "clap_builder" -version = "4.4.9" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1" +checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" dependencies = [ "anstream", "anstyle", @@ -2533,7 +2675,7 @@ version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "586a385f7ef2f8b4d86bddaa0c094794e7ccbfe5ffef1f434fe928143fc783a5" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", ] [[package]] @@ -2558,7 +2700,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -2598,6 +2740,21 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "collectives-westend-emulated-chain" +version = "0.0.0" +dependencies = [ + "collectives-westend-runtime", + "cumulus-primitives-core", + "emulated-integration-tests-common", + "frame-support", + "parachains-common", + "serde_json", + "sp-core", + "sp-runtime", + "westend-emulated-chain", +] + [[package]] name = "collectives-westend-runtime" version = "1.0.0" @@ -2619,6 +2776,7 @@ dependencies = [ "hex-literal", "log", "pallet-alliance", + "pallet-asset-rate", "pallet-aura", "pallet-authorship", "pallet-balances", @@ -2638,6 +2796,7 @@ dependencies = [ "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", "pallet-utility", "pallet-xcm", "parachains-common", @@ -2667,7 +2826,6 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnets-common", "westend-runtime-constants", ] @@ -2711,6 +2869,16 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "colored" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +dependencies = [ + "lazy_static", + "windows-sys 0.48.0", +] + [[package]] name = "comfy-table" version = "7.0.1" @@ -2728,10 +2896,10 @@ version = "0.1.0" source = "git+https://github.com/w3f/ring-proof#61e7b528bc0170d6bf541be32440d569b784425d" dependencies = [ "ark-ec", - "ark-ff", + "ark-ff 0.4.2", "ark-poly", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "fflonk", "getrandom_or_panic", "merlin 3.0.0", @@ -2755,15 +2923,38 @@ dependencies = [ [[package]] name = "console" -version = "0.15.7" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ "encode_unicode", "lazy_static", "libc", "unicode-width", - "windows-sys 0.45.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "const-hex" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5104de16b218eddf8e34ffe2f86f74bfa4e61e95a1b89732fccf6325efd0557" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", ] [[package]] @@ -2913,6 +3104,133 @@ dependencies = [ "memchr", ] +[[package]] +name = "coretime-rococo-runtime" +version = "0.1.0" +dependencies = [ + "cumulus-pallet-aura-ext", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-broker", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-multisig", + "pallet-session", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parachains-common", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", + "rococo-runtime-constants", + "scale-info", + "serde", + "smallvec", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", +] + +[[package]] +name = "coretime-westend-runtime" +version = "0.1.0" +dependencies = [ + "cumulus-pallet-aura-ext", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-multisig", + "pallet-session", + "pallet-sudo", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parachains-common", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", + "scale-info", + "serde", + "smallvec", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", + "westend-runtime-constants", +] + [[package]] name = "cpp_demangle" version = "0.3.5" @@ -2974,7 +3292,7 @@ dependencies = [ "gimli 0.27.3", "hashbrown 0.13.2", "log", - "regalloc2", + "regalloc2 0.6.1", "smallvec", "target-lexicon", ] @@ -3048,21 +3366,6 @@ dependencies = [ "wasmtime-types", ] -[[package]] -name = "crc" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484" - [[package]] name = "crc32fast" version = "1.3.2" @@ -3109,7 +3412,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.4.10", + "clap 4.4.18", "criterion-plot", "futures", "is-terminal", @@ -3197,18 +3500,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -[[package]] -name = "crypto-bigint" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", - "subtle 2.4.1", - "zeroize", -] - [[package]] name = "crypto-bigint" version = "0.5.2" @@ -3284,12 +3575,13 @@ dependencies = [ name = "cumulus-client-cli" version = "0.1.0" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "parity-scale-codec", "sc-chain-spec", "sc-cli", "sc-client-api", "sc-service", + "sp-blockchain", "sp-core", "sp-runtime", "url", @@ -3333,9 +3625,9 @@ dependencies = [ "cumulus-client-collator", "cumulus-client-consensus-common", "cumulus-client-consensus-proposer", + "cumulus-client-parachain-inherent", "cumulus-primitives-aura", "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-interface", "futures", "parity-scale-codec", @@ -3467,6 +3759,29 @@ dependencies = [ "url", ] +[[package]] +name = "cumulus-client-parachain-inherent" +version = "0.1.0" +dependencies = [ + "async-trait", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-interface", + "cumulus-test-relay-sproof-builder", + "parity-scale-codec", + "sc-client-api", + "scale-info", + "sp-api", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-trie", + "tracing", +] + [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" @@ -3614,10 +3929,10 @@ dependencies = [ name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -3740,20 +4055,14 @@ version = "0.1.0" dependencies = [ "async-trait", "cumulus-primitives-core", - "cumulus-relay-chain-interface", - "cumulus-test-relay-sproof-builder", "parity-scale-codec", - "sc-client-api", "scale-info", - "sp-api", "sp-core", "sp-inherents", "sp-runtime", "sp-state-machine", "sp-std 8.0.0", - "sp-storage 13.0.0", "sp-trie", - "tracing", ] [[package]] @@ -3787,6 +4096,7 @@ dependencies = [ "cumulus-primitives-core", "frame-support", "log", + "pallet-asset-conversion", "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-runtime-common", @@ -4005,16 +4315,16 @@ name = "cumulus-test-service" version = "0.1.0" dependencies = [ "async-trait", - "clap 4.4.10", + "clap 4.4.18", "criterion 0.5.1", "cumulus-client-cli", "cumulus-client-consensus-common", "cumulus-client-consensus-relay-chain", + "cumulus-client-parachain-inherent", "cumulus-client-pov-recovery", "cumulus-client-service", "cumulus-pallet-parachain-system", "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", @@ -4105,9 +4415,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if", "cpufeatures", @@ -4128,7 +4438,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -4168,7 +4478,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -4185,42 +4495,7 @@ checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", -] - -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core", - "quote", - "syn 1.0.109", + "syn 2.0.48", ] [[package]] @@ -4230,7 +4505,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edd72493923899c6f10c641bdbdeddc7183d6396641d99c1a0d1597f37f92e28" dependencies = [ "cfg-if", - "hashbrown 0.14.0", + "hashbrown 0.14.3", "lock_api", "once_cell", "parking_lot_core 0.9.8", @@ -4273,46 +4548,21 @@ dependencies = [ [[package]] name = "der" -version = "0.6.1" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", - "pem-rfc7468", "zeroize", ] [[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "der-parser" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe398ac75057914d7d07307bf67dc7f3f574a26783b4fc7805a20ffa9f506e82" -dependencies = [ - "asn1-rs 0.3.1", - "displaydoc", - "nom", - "num-bigint", - "num-traits", - "rusticata-macros", -] - -[[package]] -name = "der-parser" -version = "8.2.0" +name = "der-parser" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", "displaydoc", "nom", "num-bigint", @@ -4348,37 +4598,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_builder" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07adf7be193b71cc36b193d0f5fe60b918a3a9db4dad0449f57bcfd519704a3" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f91d4cfa921f1c05904dc3c57b4a32c38aed3340cce209f3a6fd1478babafc4" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_builder_macro" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" -dependencies = [ - "derive_builder_core", - "syn 1.0.109", -] - [[package]] name = "derive_more" version = "0.99.17" @@ -4484,7 +4703,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -4496,14 +4715,14 @@ checksum = "86e3bdc80eee6e16b2b6b0f87fbc98c04bee3455e35174c0de1a125d0688c632" [[package]] name = "dleq_vrf" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=2019248#2019248785389b3246d55b1c3b0e9bdef4454cb7" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" dependencies = [ "ark-ec", - "ark-ff", - "ark-scale", + "ark-ff 0.4.2", + "ark-scale 0.0.12", "ark-secret-scalar", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "ark-transcript", "arrayvec 0.7.4", "zeroize", @@ -4545,7 +4764,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.39", + "syn 2.0.48", "termcolor", "toml 0.7.6", "walkdir", @@ -4569,6 +4788,12 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + [[package]] name = "dyn-clonable" version = "0.9.0" @@ -4592,21 +4817,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" - -[[package]] -name = "ecdsa" -version = "0.14.8" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" -dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", -] +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ecdsa" @@ -4614,12 +4827,12 @@ version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "der 0.7.8", + "der", "digest 0.10.7", - "elliptic-curve 0.13.5", - "rfc6979 0.4.0", - "signature 2.1.0", - "spki 0.7.2", + "elliptic-curve", + "rfc6979", + "signature", + "spki", ] [[package]] @@ -4628,8 +4841,8 @@ version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" dependencies = [ - "pkcs8 0.10.2", - "signature 2.1.0", + "pkcs8", + "signature", ] [[package]] @@ -4638,7 +4851,7 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "ed25519", "rand_core 0.6.4", "serde", @@ -4663,13 +4876,13 @@ dependencies = [ [[package]] name = "ed25519-zebra" -version = "4.0.2" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e83e509bcd060ca4b54b72bde5bb306cb2088cb01e14797ebae90a24f70f5f7" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "ed25519", - "hashbrown 0.14.0", + "hashbrown 0.14.3", "hex", "rand_core 0.6.4", "sha2 0.10.7", @@ -4682,43 +4895,21 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" -[[package]] -name = "elliptic-curve" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" -dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", - "digest 0.10.7", - "ff 0.12.1", - "generic-array 0.14.7", - "group 0.12.1", - "hkdf", - "pem-rfc7468", - "pkcs8 0.9.0", - "rand_core 0.6.4", - "sec1 0.3.0", - "subtle 2.4.1", - "zeroize", -] - [[package]] name = "elliptic-curve" version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.2", + "base16ct", + "crypto-bigint", "digest 0.10.7", - "ff 0.13.0", + "ff", "generic-array 0.14.7", - "group 0.13.0", - "pkcs8 0.10.2", + "group", + "pkcs8", "rand_core 0.6.4", - "sec1 0.7.3", + "sec1", "subtle 2.4.1", "zeroize", ] @@ -4801,7 +4992,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -4812,7 +5003,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -4903,6 +5094,15 @@ dependencies = [ "libc", ] +[[package]] +name = "ethabi-decode" +version = "1.0.0" +source = "git+https://github.com/snowfork/ethabi-decode.git?branch=master#5c01c8a0f2d0e4eccf600507cd573b27555b1d9d" +dependencies = [ + "ethereum-types", + "tiny-keccak", +] + [[package]] name = "ethbloom" version = "0.13.0" @@ -4911,8 +5111,10 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", + "scale-info", "tiny-keccak", ] @@ -4924,9 +5126,11 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", "primitive-types", + "scale-info", "uint", ] @@ -4967,7 +5171,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -4992,6 +5196,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + [[package]] name = "fastrand" version = "1.9.0" @@ -5007,6 +5217,17 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.4", + "auto_impl", + "bytes", +] + [[package]] name = "fatality" version = "0.0.6" @@ -5058,16 +5279,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "ff" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" -dependencies = [ - "rand_core 0.6.4", - "subtle 2.4.1", -] - [[package]] name = "ff" version = "0.13.0" @@ -5084,18 +5295,18 @@ version = "0.1.0" source = "git+https://github.com/w3f/fflonk#1beb0585e1c8488956fac7f05da061f9b41e8948" dependencies = [ "ark-ec", - "ark-ff", + "ark-ff 0.4.2", "ark-poly", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "merlin 3.0.0", ] [[package]] name = "fiat-crypto" -version = "0.1.20" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7" [[package]] name = "file-per-thread-logger" @@ -5237,7 +5448,7 @@ dependencies = [ "pallet-examples", "parity-scale-codec", "scale-info", - "simple-mermaid 0.1.0 (git+https://github.com/kianenigma/simple-mermaid.git?rev=e48b187bcfd5cc75111acd9d241f1bd36604344b)", + "simple-mermaid", "sp-api", "sp-arithmetic", "sp-block-builder", @@ -5288,7 +5499,7 @@ dependencies = [ "Inflector", "array-bytes 6.1.0", "chrono", - "clap 4.4.10", + "clap 4.4.18", "comfy-table", "frame-benchmarking", "frame-support", @@ -5349,12 +5560,12 @@ dependencies = [ "frame-election-provider-support", "frame-support", "parity-scale-codec", - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "scale-info", "sp-arithmetic", - "syn 2.0.39", + "syn 2.0.48", "trybuild", ] @@ -5380,7 +5591,7 @@ dependencies = [ name = "frame-election-solution-type-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "frame-election-provider-solution-type", "frame-election-provider-support", "frame-support", @@ -5505,8 +5716,9 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", + "regex", "sp-core-hashing", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -5514,10 +5726,10 @@ name = "frame-support-procedural-tools" version = "4.0.0-dev" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -5526,7 +5738,7 @@ version = "3.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -5704,9 +5916,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -5714,9 +5926,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" @@ -5732,9 +5944,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" @@ -5753,13 +5965,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -5770,20 +5982,20 @@ checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" dependencies = [ "futures-io", "rustls 0.20.8", - "webpki 0.22.0", + "webpki", ] [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" @@ -5793,9 +6005,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -5919,7 +6131,7 @@ version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ - "fallible-iterator", + "fallible-iterator 0.2.0", "indexmap 1.9.3", "stable_deref_trait", ] @@ -5929,6 +6141,10 @@ name = "gimli" version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +dependencies = [ + "fallible-iterator 0.3.0", + "stable_deref_trait", +] [[package]] name = "glob" @@ -5994,24 +6210,13 @@ dependencies = [ "substrate-wasm-builder", ] -[[package]] -name = "group" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" -dependencies = [ - "ff 0.12.1", - "rand_core 0.6.4", - "subtle 2.4.1", -] - [[package]] name = "group" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff 0.13.0", + "ff", "rand_core 0.6.4", "subtle 2.4.1", ] @@ -6085,16 +6290,16 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.7", ] [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.7", "allocator-api2", "serde", ] @@ -6105,7 +6310,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.0", + "hashbrown 0.14.3", ] [[package]] @@ -6323,12 +6528,6 @@ dependencies = [ "cc", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.2.3" @@ -6471,7 +6670,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.3", ] [[package]] @@ -6526,25 +6725,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "interceptor" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e8a11ae2da61704edada656798b61c94b35ecac2c58eb955156987d5e6be90b" -dependencies = [ - "async-trait", - "bytes", - "log", - "rand 0.8.5", - "rtcp", - "rtp", - "thiserror", - "tokio", - "waitgroup", - "webrtc-srtp", - "webrtc-util", -] - [[package]] name = "io-lifetimes" version = "1.0.11" @@ -6810,8 +6990,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", - "ecdsa 0.16.8", - "elliptic-curve 0.13.5", + "ecdsa", + "elliptic-curve", "once_cell", "sha2 0.10.7", ] @@ -6868,6 +7048,8 @@ dependencies = [ "pallet-babe", "pallet-bags-list", "pallet-balances", + "pallet-beefy", + "pallet-beefy-mmr", "pallet-bounties", "pallet-broker", "pallet-child-bounties", @@ -6879,6 +7061,7 @@ dependencies = [ "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", "pallet-elections-phragmen", + "pallet-example-tasks", "pallet-fast-unstake", "pallet-glutton", "pallet-grandpa", @@ -6940,6 +7123,7 @@ dependencies = [ "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", + "sp-consensus-beefy", "sp-consensus-grandpa", "sp-core", "sp-genesis-builder", @@ -7012,15 +7196,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "layout-rs" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1164ef87cb9607c2d887216eca79f0fc92895affe1789bba805dd38d829584e0" -dependencies = [ - "log", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -7094,9 +7269,9 @@ checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "libp2p" -version = "0.51.3" +version = "0.51.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097" +checksum = "f35eae38201a993ece6bdc823292d6abd1bffed1c4d0f4a3517d2bd8e1d917fe" dependencies = [ "bytes", "futures", @@ -7119,7 +7294,6 @@ dependencies = [ "libp2p-swarm", "libp2p-tcp", "libp2p-wasm-ext", - "libp2p-webrtc", "libp2p-websocket", "libp2p-yamux", "multiaddr", @@ -7431,12 +7605,12 @@ dependencies = [ "futures-rustls", "libp2p-core", "libp2p-identity", - "rcgen 0.10.0", + "rcgen", "ring 0.16.20", "rustls 0.20.8", "thiserror", - "webpki 0.22.0", - "x509-parser 0.14.0", + "webpki", + "x509-parser", "yasna", ] @@ -7454,37 +7628,6 @@ dependencies = [ "wasm-bindgen-futures", ] -[[package]] -name = "libp2p-webrtc" -version = "0.4.0-alpha.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8" -dependencies = [ - "async-trait", - "asynchronous-codec", - "bytes", - "futures", - "futures-timer", - "hex", - "if-watch", - "libp2p-core", - "libp2p-identity", - "libp2p-noise", - "log", - "multihash 0.17.0", - "quick-protobuf", - "quick-protobuf-codec", - "rand 0.8.5", - "rcgen 0.9.3", - "serde", - "stun", - "thiserror", - "tinytemplate", - "tokio", - "tokio-util", - "webrtc", -] - [[package]] name = "libp2p-websocket" version = "0.41.0" @@ -7763,7 +7906,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -7777,7 +7920,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -7788,7 +7931,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -7799,7 +7942,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -7839,15 +7982,6 @@ dependencies = [ "rawpointer", ] -[[package]] -name = "md-5" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "memchr" version = "2.6.4" @@ -7872,15 +8006,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.7.1" @@ -7952,6 +8077,20 @@ dependencies = [ "thrift", ] +[[package]] +name = "milagro_bls" +version = "1.5.0" +source = "git+https://github.com/snowfork/milagro_bls?rev=a6d66e4eb89015e352fb1c9f7b661ecdbb5b2176#a6d66e4eb89015e352fb1c9f7b661ecdbb5b2176" +dependencies = [ + "amcl", + "hex", + "lazy_static", + "parity-scale-codec", + "rand 0.8.5", + "scale-info", + "zeroize", +] + [[package]] name = "mime" version = "0.3.17" @@ -7968,7 +8107,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" name = "minimal-node" version = "4.0.0-dev" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "frame", "futures", "futures-timer", @@ -8047,7 +8186,7 @@ dependencies = [ "bitflags 1.3.2", "blake2 0.10.6", "c2-chacha", - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "either", "hashlink", "lioness", @@ -8303,15 +8442,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "names" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d66043b25d4a6cccb23619d10c19c25304b355a7dccd4a8e11423dd2382146" -dependencies = [ - "rand 0.8.5", -] - [[package]] name = "names" version = "0.14.0" @@ -8403,7 +8533,6 @@ dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "memoffset 0.6.5", ] [[package]] @@ -8442,7 +8571,7 @@ name = "node-bench" version = "0.9.0-dev" dependencies = [ "array-bytes 6.1.0", - "clap 4.4.10", + "clap 4.4.18", "derive_more", "fs_extra", "futures", @@ -8493,6 +8622,8 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sc-consensus-babe-rpc", + "sc-consensus-beefy", + "sc-consensus-beefy-rpc", "sc-consensus-grandpa", "sc-consensus-grandpa-rpc", "sc-mixnet", @@ -8517,7 +8648,7 @@ dependencies = [ name = "node-runtime-generate-bags" version = "3.0.0" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "generate-bags", "kitchensink-runtime", ] @@ -8526,7 +8657,7 @@ dependencies = [ name = "node-template" version = "4.0.0-dev" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", @@ -8570,7 +8701,7 @@ dependencies = [ name = "node-template-release" version = "3.0.0" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "flate2", "fs_extra", "glob", @@ -8763,9 +8894,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", "libm", @@ -8801,29 +8932,20 @@ dependencies = [ [[package]] name = "object" -version = "0.32.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] -[[package]] -name = "oid-registry" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e20717fa0541f39bd146692035c37bedfa532b3e5071b35761082407546b2a" -dependencies = [ - "asn1-rs 0.3.1", -] - [[package]] name = "oid-registry" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", ] [[package]] @@ -8885,12 +9007,9 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d035b1f968d91a826f2e34a9d6d02cb2af5aa7ca39ebd27922d850ab4b2dd2c6" dependencies = [ - "anyhow", "expander 2.0.0", - "fs-err", "indexmap 2.0.0", "itertools 0.11.0", - "layout-rs", "petgraph", "proc-macro-crate 1.3.1", "proc-macro2", @@ -8929,28 +9048,6 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" -[[package]] -name = "p256" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.7", -] - -[[package]] -name = "p384" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" -dependencies = [ - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.7", -] - [[package]] name = "pallet-alliance" version = "4.0.0-dev" @@ -9525,9 +9622,9 @@ name = "pallet-contracts-fixtures" version = "1.0.0" dependencies = [ "anyhow", - "cfg-if", "frame-system", "parity-wasm", + "polkavm-linker", "sp-runtime", "tempfile", "toml 0.8.8", @@ -9535,10 +9632,6 @@ dependencies = [ "wat", ] -[[package]] -name = "pallet-contracts-fixtures-common" -version = "1.0.0" - [[package]] name = "pallet-contracts-mock-network" version = "1.0.0" @@ -9583,7 +9676,7 @@ version = "4.0.0-dev" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -9593,6 +9686,7 @@ dependencies = [ "bitflags 1.3.2", "parity-scale-codec", "paste", + "polkavm-derive", "scale-info", ] @@ -9863,17 +9957,34 @@ dependencies = [ ] [[package]] -name = "pallet-examples" -version = "4.0.0-dev" +name = "pallet-example-tasks" +version = "1.0.0-dev" dependencies = [ - "pallet-default-config-example", - "pallet-dev-mode", - "pallet-example-basic", - "pallet-example-frame-crate", - "pallet-example-kitchensink", - "pallet-example-offchain-worker", - "pallet-example-single-block-migrations", - "pallet-example-split", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0", +] + +[[package]] +name = "pallet-examples" +version = "4.0.0-dev" +dependencies = [ + "pallet-default-config-example", + "pallet-dev-mode", + "pallet-example-basic", + "pallet-example-frame-crate", + "pallet-example-kitchensink", + "pallet-example-offchain-worker", + "pallet-example-single-block-migrations", + "pallet-example-split", + "pallet-example-tasks", ] [[package]] @@ -9957,11 +10068,13 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "pallet-balances", "parity-scale-codec", "scale-info", "sp-core", "sp-io", + "sp-keystore", "sp-runtime", "sp-std 8.0.0", ] @@ -10055,6 +10168,7 @@ dependencies = [ name = "pallet-message-queue" version = "7.0.0-dev" dependencies = [ + "environmental", "frame-benchmarking", "frame-support", "frame-system", @@ -10742,11 +10856,11 @@ dependencies = [ name = "pallet-staking-reward-curve" version = "4.0.0-dev" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "sp-runtime", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -11152,7 +11266,7 @@ dependencies = [ name = "parachain-template-node" version = "0.1.0" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "color-print", "cumulus-client-cli", "cumulus-client-collator", @@ -11280,6 +11394,7 @@ dependencies = [ "pallet-balances", "pallet-collator-selection", "pallet-message-queue", + "pallet-xcm", "parity-scale-codec", "polkadot-core-primitives", "polkadot-primitives", @@ -11294,6 +11409,7 @@ dependencies = [ "staging-parachain-info", "staging-xcm", "staging-xcm-builder", + "staging-xcm-executor", "substrate-wasm-builder", "westend-runtime-constants", ] @@ -11331,6 +11447,12 @@ dependencies = [ "substrate-wasm-builder", ] +[[package]] +name = "parity-bytes" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b56e3a2420138bdb970f84dfb9c774aea80fa0e7371549eedec0d80c209c67" + [[package]] name = "parity-db" version = "0.4.12" @@ -11518,15 +11640,6 @@ dependencies = [ "base64 0.13.1", ] -[[package]] -name = "pem-rfc7468" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d159833a9105500e0398934e205e0773f0b27529557134ecfc51c27646adac" -dependencies = [ - "base64ct", -] - [[package]] name = "penpal-emulated-chain" version = "0.0.0" @@ -11547,6 +11660,7 @@ dependencies = [ name = "penpal-runtime" version = "0.9.27" dependencies = [ + "assets-common", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -11604,6 +11718,222 @@ dependencies = [ "substrate-wasm-builder", ] +[[package]] +name = "people-rococo-emulated-chain" +version = "0.1.0" +dependencies = [ + "cumulus-primitives-core", + "emulated-integration-tests-common", + "frame-support", + "parachains-common", + "people-rococo-runtime", + "rococo-emulated-chain", + "serde_json", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "people-rococo-integration-tests" +version = "0.1.0" +dependencies = [ + "assert_matches", + "asset-test-utils", + "emulated-integration-tests-common", + "frame-support", + "pallet-asset-conversion", + "pallet-assets", + "pallet-balances", + "pallet-identity", + "pallet-message-queue", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "penpal-runtime", + "people-rococo-runtime", + "polkadot-primitives", + "polkadot-runtime-common", + "rococo-runtime", + "rococo-runtime-constants", + "rococo-system-emulated-network", + "sp-runtime", + "staging-xcm", + "staging-xcm-executor", +] + +[[package]] +name = "people-rococo-runtime" +version = "0.1.0" +dependencies = [ + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "enumflags2", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-identity", + "pallet-message-queue", + "pallet-multisig", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parachains-common", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", + "rococo-runtime-constants", + "scale-info", + "serde", + "smallvec", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", +] + +[[package]] +name = "people-westend-emulated-chain" +version = "0.1.0" +dependencies = [ + "cumulus-primitives-core", + "emulated-integration-tests-common", + "frame-support", + "parachains-common", + "people-westend-runtime", + "serde_json", + "sp-core", + "sp-runtime", + "westend-emulated-chain", +] + +[[package]] +name = "people-westend-integration-tests" +version = "0.1.0" +dependencies = [ + "assert_matches", + "asset-test-utils", + "emulated-integration-tests-common", + "frame-support", + "pallet-asset-conversion", + "pallet-assets", + "pallet-balances", + "pallet-identity", + "pallet-message-queue", + "pallet-xcm", + "parachains-common", + "parity-scale-codec", + "penpal-runtime", + "people-westend-runtime", + "polkadot-primitives", + "polkadot-runtime-common", + "sp-runtime", + "staging-xcm", + "staging-xcm-executor", + "westend-runtime", + "westend-runtime-constants", + "westend-system-emulated-network", +] + +[[package]] +name = "people-westend-runtime" +version = "0.1.0" +dependencies = [ + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "enumflags2", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-identity", + "pallet-message-queue", + "pallet-multisig", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parachains-common", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", + "scale-info", + "serde", + "smallvec", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", + "westend-runtime-constants", +] + [[package]] name = "percent-encoding" version = "2.3.0" @@ -11640,7 +11970,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -11681,7 +12011,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -11702,24 +12032,14 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs8" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" -dependencies = [ - "der 0.6.1", - "spki 0.6.0", -] - [[package]] name = "pkcs8" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.8", - "spki 0.7.2", + "der", + "spki", ] [[package]] @@ -11764,7 +12084,7 @@ dependencies = [ [[package]] name = "polkadot" -version = "1.1.0" +version = "1.6.0" dependencies = [ "assert_cmd", "color-eyre", @@ -11805,8 +12125,8 @@ dependencies = [ "polkadot-primitives-test-helpers", "rand 0.8.5", "rand_chacha 0.3.1", - "rand_core 0.5.1", - "schnorrkel 0.9.1", + "rand_core 0.6.4", + "schnorrkel 0.11.4", "sp-authority-discovery", "sp-core", "tracing-gum", @@ -11895,6 +12215,7 @@ dependencies = [ "sp-core", "sp-keyring", "thiserror", + "tokio", "tracing-gum", ] @@ -11903,7 +12224,7 @@ name = "polkadot-cli" version = "1.1.0" dependencies = [ "cfg-if", - "clap 4.4.10", + "clap 4.4.18", "frame-benchmarking-cli", "futures", "log", @@ -11979,7 +12300,7 @@ dependencies = [ "fatality", "futures", "futures-timer", - "indexmap 1.9.3", + "indexmap 2.0.0", "lazy_static", "parity-scale-codec", "polkadot-erasure-coding", @@ -12109,7 +12430,7 @@ dependencies = [ "kvdb", "kvdb-memorydb", "log", - "merlin 2.0.1", + "merlin 3.0.0", "parity-scale-codec", "parking_lot 0.12.1", "polkadot-node-jaeger", @@ -12122,10 +12443,10 @@ dependencies = [ "polkadot-primitives-test-helpers", "rand 0.8.5", "rand_chacha 0.3.1", - "rand_core 0.5.1", + "rand_core 0.6.4", "sc-keystore", "schnellru", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "sp-application-crypto", "sp-consensus", "sp-consensus-babe", @@ -12370,6 +12691,7 @@ name = "polkadot-node-core-pvf" version = "1.0.0" dependencies = [ "always-assert", + "array-bytes 6.1.0", "assert_matches", "blake3", "cfg-if", @@ -12452,7 +12774,6 @@ dependencies = [ "sp-externalities 0.19.0", "sp-io", "sp-tracing 10.0.0", - "substrate-build-script-utils", "tempfile", "thiserror", "tracing-gum", @@ -12596,7 +12917,7 @@ dependencies = [ "polkadot-erasure-coding", "polkadot-parachain-primitives", "polkadot-primitives", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "serde", "sp-application-crypto", "sp-consensus-babe", @@ -12624,6 +12945,8 @@ dependencies = [ "async-trait", "futures", "parking_lot 0.12.1", + "polkadot-erasure-coding", + "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", "polkadot-primitives", @@ -12682,7 +13005,7 @@ dependencies = [ "log", "parity-db", "parity-scale-codec", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "pin-project", "polkadot-node-jaeger", "polkadot-node-metrics", @@ -12734,7 +13057,7 @@ dependencies = [ [[package]] name = "polkadot-parachain-bin" -version = "1.1.0" +version = "1.6.0" dependencies = [ "assert_cmd", "asset-hub-rococo-runtime", @@ -12742,20 +13065,22 @@ dependencies = [ "async-trait", "bridge-hub-rococo-runtime", "bridge-hub-westend-runtime", - "clap 4.4.10", + "clap 4.4.18", "collectives-westend-runtime", "color-print", "contracts-rococo-runtime", + "coretime-rococo-runtime", + "coretime-westend-runtime", "cumulus-client-cli", "cumulus-client-collator", "cumulus-client-consensus-aura", "cumulus-client-consensus-common", "cumulus-client-consensus-proposer", "cumulus-client-consensus-relay-chain", + "cumulus-client-parachain-inherent", "cumulus-client-service", "cumulus-primitives-aura", "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", "cumulus-relay-chain-interface", "frame-benchmarking", "frame-benchmarking-cli", @@ -12774,6 +13099,8 @@ dependencies = [ "parachains-common", "parity-scale-codec", "penpal-runtime", + "people-rococo-runtime", + "people-westend-runtime", "polkadot-cli", "polkadot-primitives", "polkadot-service", @@ -12895,6 +13222,7 @@ dependencies = [ "sc-consensus-grandpa", "sc-consensus-grandpa-rpc", "sc-rpc", + "sc-rpc-spec-v2", "sc-sync-state-rpc", "sc-transaction-pool-api", "sp-api", @@ -12926,6 +13254,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-broker", "pallet-election-provider-multi-phase", "pallet-fast-unstake", "pallet-identity", @@ -12996,6 +13325,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-broker", "pallet-message-queue", "pallet-session", "pallet-staking", @@ -13016,6 +13346,7 @@ dependencies = [ "serde_json", "sp-api", "sp-application-crypto", + "sp-arithmetic", "sp-core", "sp-inherents", "sp-io", @@ -13062,7 +13393,7 @@ dependencies = [ "sc-rpc", "sc-rpc-api", "scale-info", - "simple-mermaid 0.1.0 (git+https://github.com/kianenigma/simple-mermaid.git?branch=main)", + "simple-mermaid", "sp-api", "sp-core", "sp-io", @@ -13212,7 +13543,7 @@ dependencies = [ "fatality", "futures", "futures-timer", - "indexmap 1.9.3", + "indexmap 2.0.0", "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -13244,6 +13575,54 @@ dependencies = [ "sp-core", ] +[[package]] +name = "polkadot-subsystem-bench" +version = "1.0.0" +dependencies = [ + "assert_matches", + "async-trait", + "clap 4.4.18", + "clap-num", + "color-eyre", + "colored", + "env_logger 0.9.3", + "futures", + "futures-timer", + "itertools 0.11.0", + "log", + "orchestra", + "parity-scale-codec", + "paste", + "polkadot-availability-recovery", + "polkadot-erasure-coding", + "polkadot-node-metrics", + "polkadot-node-network-protocol", + "polkadot-node-primitives", + "polkadot-node-subsystem", + "polkadot-node-subsystem-test-helpers", + "polkadot-node-subsystem-types", + "polkadot-node-subsystem-util", + "polkadot-overseer", + "polkadot-primitives", + "polkadot-primitives-test-helpers", + "prometheus", + "pyroscope", + "pyroscope_pprofrs", + "rand 0.8.5", + "sc-keystore", + "sc-network", + "sc-service", + "serde", + "serde_yaml", + "sp-application-crypto", + "sp-core", + "sp-keyring", + "sp-keystore", + "substrate-prometheus-endpoint", + "tokio", + "tracing-gum", +] + [[package]] name = "polkadot-test-client" version = "1.0.0" @@ -13279,7 +13658,7 @@ version = "1.0.0" dependencies = [ "assert_matches", "async-trait", - "clap 4.4.10", + "clap 4.4.18", "color-eyre", "futures", "futures-timer", @@ -13426,12 +13805,61 @@ dependencies = [ name = "polkadot-voter-bags" version = "1.0.0" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "generate-bags", "sp-io", "westend-runtime", ] +[[package]] +name = "polkavm-common" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fecd2caacfc4a7ee34243758dd7348859e6dec73f5e5df059890f5742ee46f0e" + +[[package]] +name = "polkavm-common" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b4e215c80fe876147f3d58158d5dfeae7dabdd6047e175af77095b78d0035c" + +[[package]] +name = "polkavm-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db65a500d4adf574893c726ae365e37e4fbb7f2cbd403f6eaa1b665457456adc" +dependencies = [ + "polkavm-derive-impl", + "syn 2.0.48", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c99f4e7a9ff434ef9c885b874c99d824c3a5693bf5e3e8569bb1d2245a8c1b7f" +dependencies = [ + "polkavm-common 0.4.0", + "proc-macro2", + "quote", + "syn 2.0.48", +] + +[[package]] +name = "polkavm-linker" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5a668bb33c7f0b5f4ca91adb1e1e71cf4930fef5e6909f46c2180d65cce37d0" +dependencies = [ + "gimli 0.28.0", + "hashbrown 0.14.3", + "log", + "object 0.32.2", + "polkavm-common 0.5.0", + "regalloc2 0.9.3", + "rustc-demangle", +] + [[package]] name = "polling" version = "2.8.0" @@ -13604,7 +14032,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" dependencies = [ "proc-macro2", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -13650,11 +14078,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_edit 0.20.7", + "toml_edit 0.21.0", ] [[package]] @@ -13695,14 +14123,14 @@ checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" dependencies = [ "unicode-ident", ] @@ -13767,7 +14195,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -13782,6 +14210,26 @@ dependencies = [ "regex", ] +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags 2.4.0", + "lazy_static", + "num-traits", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_xorshift", + "regex-syntax 0.8.2", + "rusty-fork", + "tempfile", + "unarray", +] + [[package]] name = "prost" version = "0.11.9" @@ -13855,7 +14303,7 @@ dependencies = [ "libc", "libflate", "log", - "names 0.14.0", + "names", "prost", "reqwest", "thiserror", @@ -13940,14 +14388,14 @@ dependencies = [ "thiserror", "tinyvec", "tracing", - "webpki 0.22.0", + "webpki", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -14048,6 +14496,15 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -14076,19 +14533,6 @@ dependencies = [ "num_cpus", ] -[[package]] -name = "rcgen" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" -dependencies = [ - "pem", - "ring 0.16.20", - "time 0.3.27", - "x509-parser 0.13.2", - "yasna", -] - [[package]] name = "rcgen" version = "0.10.0" @@ -14097,7 +14541,7 @@ checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring 0.16.20", - "time 0.3.27", + "time", "yasna", ] @@ -14169,7 +14613,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -14184,6 +14628,19 @@ dependencies = [ "smallvec", ] +[[package]] +name = "regalloc2" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" +dependencies = [ + "hashbrown 0.13.2", + "log", + "rustc-hash", + "slice-group-by", + "smallvec", +] + [[package]] name = "regex" version = "1.10.2" @@ -14238,7 +14695,7 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" name = "remote-ext-tests-bags-list" version = "1.0.0" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "frame-system", "log", "pallet-bags-list-remote-tests", @@ -14298,17 +14755,6 @@ dependencies = [ "quick-error", ] -[[package]] -name = "rfc6979" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" -dependencies = [ - "crypto-bigint 0.4.9", - "hmac 0.12.1", - "zeroize", -] - [[package]] name = "rfc6979" version = "0.4.0" @@ -14325,10 +14771,10 @@ version = "0.1.0" source = "git+https://github.com/w3f/ring-proof#61e7b528bc0170d6bf541be32440d569b784425d" dependencies = [ "ark-ec", - "ark-ff", + "ark-ff 0.4.2", "ark-poly", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "blake2 0.10.6", "common", "fflonk", @@ -14581,6 +15027,7 @@ dependencies = [ "bridge-hub-rococo-emulated-chain", "emulated-integration-tests-common", "penpal-emulated-chain", + "people-rococo-emulated-chain", "rococo-emulated-chain", ] @@ -14593,6 +15040,7 @@ dependencies = [ "bridge-hub-rococo-emulated-chain", "bridge-hub-westend-emulated-chain", "emulated-integration-tests-common", + "penpal-emulated-chain", "rococo-emulated-chain", "westend-emulated-chain", ] @@ -14608,17 +15056,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "rtcp" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1919efd6d4a6a85d13388f9487549bb8e359f17198cc03ffd72f79b553873691" -dependencies = [ - "bytes", - "thiserror", - "webrtc-util", -] - [[package]] name = "rtnetlink" version = "0.10.1" @@ -14645,19 +15082,35 @@ dependencies = [ ] [[package]] -name = "rtp" -version = "0.6.8" +name = "ruint" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a095411ff00eed7b12e4c6a118ba984d113e1079582570d56a5ee723f11f80" +checksum = "608a5726529f2f0ef81b8fde9873c4bb829d6b5b5ca6be4d97345ddf0749c825" dependencies = [ - "async-trait", + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", "rand 0.8.5", + "rlp", + "ruint-macro", "serde", - "thiserror", - "webrtc-util", + "valuable", + "zeroize", ] +[[package]] +name = "ruint-macro" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09" + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -14685,6 +15138,15 @@ dependencies = [ "semver 0.9.0", ] +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -14744,19 +15206,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.1", - "log", - "ring 0.16.20", - "sct 0.6.1", - "webpki 0.21.4", -] - [[package]] name = "rustls" version = "0.20.8" @@ -14765,8 +15214,8 @@ checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ "log", "ring 0.16.20", - "sct 0.7.0", - "webpki 0.22.0", + "sct", + "webpki", ] [[package]] @@ -14778,7 +15227,7 @@ dependencies = [ "log", "ring 0.16.20", "rustls-webpki 0.101.4", - "sct 0.7.0", + "sct", ] [[package]] @@ -15009,10 +15458,10 @@ dependencies = [ name = "sc-chain-spec-derive" version = "4.0.0-dev" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -15022,14 +15471,14 @@ dependencies = [ "array-bytes 6.1.0", "bip39", "chrono", - "clap 4.4.10", + "clap 4.4.18", "fdlimit", "futures", "futures-timer", "itertools 0.10.5", "libp2p-identity", "log", - "names 0.13.0", + "names", "parity-scale-codec", "rand 0.8.5", "regex", @@ -15331,7 +15780,7 @@ dependencies = [ name = "sc-consensus-grandpa" version = "0.10.0-dev" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.7", "array-bytes 6.1.0", "assert_matches", "async-trait", @@ -15715,7 +16164,7 @@ dependencies = [ name = "sc-network-gossip" version = "0.10.0-dev" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.7", "async-trait", "futures", "futures-timer", @@ -16166,10 +16615,9 @@ dependencies = [ name = "sc-storage-monitor" version = "0.1.0" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "fs4", "log", - "sc-client-db", "sp-core", "thiserror", "tokio", @@ -16236,9 +16684,9 @@ name = "sc-tracing" version = "4.0.0-dev" dependencies = [ "ansi_term", - "atty", "chrono", "criterion 0.4.0", + "is-terminal", "lazy_static", "libc", "log", @@ -16265,10 +16713,10 @@ dependencies = [ name = "sc-tracing-proc-macro" version = "4.0.0-dev" dependencies = [ - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -16370,13 +16818,37 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "schemars" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 1.0.109", +] + [[package]] name = "schnellru" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.7", "cfg-if", "hashbrown 0.13.2", ] @@ -16415,6 +16887,31 @@ dependencies = [ "zeroize", ] +[[package]] +name = "schnorrkel" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" +dependencies = [ + "aead 0.5.2", + "arrayref", + "arrayvec 0.7.4", + "curve25519-dalek 4.1.1", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_core 0.6.4", + "serde_bytes", + "sha2 0.10.7", + "subtle 2.4.1", + "zeroize", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + [[package]] name = "scopeguard" version = "1.2.0" @@ -16427,16 +16924,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring 0.16.20", - "untrusted", -] - [[package]] name = "sct" version = "0.7.0" @@ -16448,43 +16935,17 @@ dependencies = [ ] [[package]] -name = "sdp" -version = "0.5.3" +name = "sec1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d22a5ef407871893fd72b4562ee15e4742269b173959db4b8df6f538c414e13" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "rand 0.8.5", - "substring", - "thiserror", - "url", -] - -[[package]] -name = "sec1" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" -dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", - "generic-array 0.14.7", - "pkcs8 0.9.0", - "subtle 2.4.1", - "zeroize", -] - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct 0.2.0", - "der 0.7.8", - "generic-array 0.14.7", - "pkcs8 0.10.2", - "subtle 2.4.1", - "zeroize", + "base16ct", + "der", + "generic-array 0.14.7", + "pkcs8", + "subtle 2.4.1", + "zeroize", ] [[package]] @@ -16587,7 +17048,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", ] [[package]] @@ -16596,7 +17057,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", ] [[package]] @@ -16614,6 +17084,15 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + [[package]] name = "separator" version = "0.4.1" @@ -16622,22 +17101,51 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd31f59f6fe2b0c055371bb2f16d7f0aa7d8881676c04a55b1596d1a17cd10a4" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_bytes" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", +] + +[[package]] +name = "serde_derive_internals" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -16651,9 +17159,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "itoa", "ryu", @@ -16681,6 +17189,19 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_yaml" +version = "0.9.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1bf28c79a99f70ee1f1d83d10c875d2e70618417fda01ad1785e027579d9d38" +dependencies = [ + "indexmap 2.0.0", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + [[package]] name = "serial_test" version = "2.0.0" @@ -16703,7 +17224,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -16858,16 +17379,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] - [[package]] name = "signature" version = "2.1.0" @@ -16891,11 +17402,6 @@ dependencies = [ "wide", ] -[[package]] -name = "simple-mermaid" -version = "0.1.0" -source = "git+https://github.com/kianenigma/simple-mermaid.git?branch=main#e48b187bcfd5cc75111acd9d241f1bd36604344b" - [[package]] name = "simple-mermaid" version = "0.1.0" @@ -16981,13 +17487,13 @@ dependencies = [ "chacha20 0.9.1", "crossbeam-queue", "derive_more", - "ed25519-zebra 4.0.2", + "ed25519-zebra 4.0.3", "either", "event-listener", "fnv", "futures-lite", "futures-util", - "hashbrown 0.14.0", + "hashbrown 0.14.3", "hex", "hmac 0.12.1", "itertools 0.11.0", @@ -17036,7 +17542,7 @@ dependencies = [ "futures-channel", "futures-lite", "futures-util", - "hashbrown 0.14.0", + "hashbrown 0.14.3", "hex", "itertools 0.11.0", "log", @@ -17070,7 +17576,7 @@ dependencies = [ "aes-gcm 0.9.4", "blake2 0.10.6", "chacha20poly1305", - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", "ring 0.16.20", "rustc_version 0.4.0", @@ -17078,6 +17584,347 @@ dependencies = [ "subtle 2.4.1", ] +[[package]] +name = "snowbridge-beacon-primitives" +version = "0.9.0" +dependencies = [ + "byte-slice-cast", + "frame-support", + "frame-system", + "hex", + "hex-literal", + "milagro_bls", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "snowbridge-ethereum", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", +] + +[[package]] +name = "snowbridge-core" +version = "0.9.0" +dependencies = [ + "ethabi-decode", + "frame-support", + "frame-system", + "hex", + "hex-literal", + "parity-scale-codec", + "polkadot-parachain-primitives", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-builder", +] + +[[package]] +name = "snowbridge-ethereum" +version = "0.9.0" +dependencies = [ + "ethabi-decode", + "ethbloom", + "ethereum-types", + "hex-literal", + "parity-bytes", + "parity-scale-codec", + "rand 0.8.5", + "rlp", + "rustc-hex", + "scale-info", + "serde", + "serde-big-array", + "serde_json", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0", + "wasm-bindgen-test", +] + +[[package]] +name = "snowbridge-outbound-queue-merkle-tree" +version = "0.9.0" +dependencies = [ + "array-bytes 4.2.0", + "env_logger 0.9.3", + "hex", + "hex-literal", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "snowbridge-outbound-queue-runtime-api" +version = "0.9.0" +dependencies = [ + "frame-support", + "parity-scale-codec", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-api", + "sp-core", + "sp-std 8.0.0", + "staging-xcm", +] + +[[package]] +name = "snowbridge-pallet-ethereum-client" +version = "0.9.0" +dependencies = [ + "bp-runtime", + "byte-slice-cast", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "log", + "pallet-timestamp", + "parity-scale-codec", + "rand 0.8.5", + "rlp", + "scale-info", + "serde", + "serde_json", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "sp-core", + "sp-io", + "sp-keyring", + "sp-runtime", + "sp-std 8.0.0", + "ssz_rs", + "ssz_rs_derive", + "static_assertions", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue" +version = "0.9.0" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "log", + "num-traits", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-ethereum", + "snowbridge-pallet-ethereum-client", + "snowbridge-router-primitives", + "sp-core", + "sp-io", + "sp-keyring", + "sp-runtime", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-pallet-outbound-queue" +version = "0.9.0" +dependencies = [ + "bridge-hub-common", + "ethabi-decode", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "pallet-message-queue", + "parity-scale-codec", + "scale-info", + "serde", + "snowbridge-core", + "snowbridge-outbound-queue-merkle-tree", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-keyring", + "sp-runtime", + "sp-std 8.0.0", + "staging-xcm", +] + +[[package]] +name = "snowbridge-pallet-system" +version = "0.9.0" +dependencies = [ + "ethabi-decode", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex", + "hex-literal", + "log", + "pallet-balances", + "pallet-message-queue", + "parity-scale-codec", + "polkadot-primitives", + "scale-info", + "snowbridge-core", + "snowbridge-pallet-outbound-queue", + "sp-core", + "sp-io", + "sp-keyring", + "sp-runtime", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-router-primitives" +version = "0.9.0" +dependencies = [ + "ethabi-decode", + "frame-support", + "frame-system", + "hex-literal", + "log", + "parity-scale-codec", + "rustc-hex", + "scale-info", + "serde", + "snowbridge-core", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-runtime-common" +version = "0.9.0" +dependencies = [ + "frame-support", + "frame-system", + "log", + "snowbridge-core", + "sp-arithmetic", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + +[[package]] +name = "snowbridge-runtime-test-common" +version = "0.9.0" +dependencies = [ + "assets-common", + "bridge-hub-test-utils", + "bridge-runtime-common", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-session-benchmarking", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-utility", + "frame-benchmarking", + "frame-executive", + "frame-support", + "frame-system", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-multisig", + "pallet-session", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transaction-payment-rpc-runtime-api", + "pallet-utility", + "pallet-xcm", + "pallet-xcm-benchmarks", + "parachains-common", + "parachains-runtimes-test-utils", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-common", + "scale-info", + "serde", + "smallvec", + "snowbridge-beacon-primitives", + "snowbridge-core", + "snowbridge-outbound-queue-runtime-api", + "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-outbound-queue", + "snowbridge-pallet-system", + "snowbridge-router-primitives", + "snowbridge-system-runtime-api", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-core", + "sp-genesis-builder", + "sp-inherents", + "sp-io", + "sp-keyring", + "sp-offchain", + "sp-runtime", + "sp-session", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "static_assertions", +] + +[[package]] +name = "snowbridge-system-runtime-api" +version = "0.9.0" +dependencies = [ + "parity-scale-codec", + "snowbridge-core", + "sp-api", + "sp-core", + "sp-std 8.0.0", + "staging-xcm", +] + [[package]] name = "socket2" version = "0.4.9" @@ -17144,10 +17991,10 @@ dependencies = [ "assert_matches", "blake2 0.10.6", "expander 2.0.0", - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -17426,7 +18273,7 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "merlin 2.0.1", + "merlin 3.0.0", "parity-scale-codec", "parking_lot 0.12.1", "paste", @@ -17434,7 +18281,7 @@ dependencies = [ "rand 0.8.5", "regex", "scale-info", - "schnorrkel 0.9.1", + "schnorrkel 0.11.4", "secp256k1", "secrecy", "serde", @@ -17482,7 +18329,7 @@ version = "9.0.0" dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -17500,7 +18347,7 @@ dependencies = [ "ark-ed-on-bls12-377-ext", "ark-ed-on-bls12-381-bandersnatch", "ark-ed-on-bls12-381-bandersnatch-ext", - "ark-scale", + "ark-scale 0.0.12", "sp-runtime-interface 17.0.0", "sp-std 8.0.0", ] @@ -17521,7 +18368,7 @@ dependencies = [ "ark-ed-on-bls12-377-ext", "ark-ed-on-bls12-381-bandersnatch", "ark-ed-on-bls12-381-bandersnatch-ext", - "ark-scale", + "ark-scale 0.0.11", "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] @@ -17540,7 +18387,7 @@ version = "8.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -17550,7 +18397,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf5 dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -17625,7 +18472,6 @@ dependencies = [ name = "sp-keyring" version = "24.0.0" dependencies = [ - "lazy_static", "sp-core", "sp-runtime", "strum", @@ -17637,7 +18483,7 @@ version = "0.27.0" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.7.3", + "rand 0.8.5", "rand_chacha 0.2.2", "sp-core", "sp-externalities 0.19.0", @@ -17710,7 +18556,7 @@ dependencies = [ name = "sp-npos-elections-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "honggfuzz", "rand 0.8.5", "sp-npos-elections", @@ -17760,7 +18606,7 @@ dependencies = [ "scale-info", "serde", "serde_json", - "simple-mermaid 0.1.0 (git+https://github.com/kianenigma/simple-mermaid.git?branch=main)", + "simple-mermaid", "sp-api", "sp-application-crypto", "sp-arithmetic", @@ -17821,10 +18667,10 @@ version = "11.0.0" dependencies = [ "Inflector", "expander 2.0.0", - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -17836,7 +18682,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -17933,7 +18779,7 @@ name = "sp-statement-store" version = "4.0.0-dev" dependencies = [ "aes-gcm 0.10.3", - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "ed25519-dalek", "hkdf", "parity-scale-codec", @@ -18059,11 +18905,10 @@ dependencies = [ name = "sp-trie" version = "22.0.0" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.7", "array-bytes 6.1.0", "criterion 0.4.0", "hash-db", - "hashbrown 0.13.2", "lazy_static", "memory-db", "nohash-hasher", @@ -18108,7 +18953,7 @@ dependencies = [ "proc-macro2", "quote", "sp-version", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -18143,6 +18988,7 @@ dependencies = [ "bounded-collections", "parity-scale-codec", "scale-info", + "schemars", "serde", "smallvec", "sp-arithmetic", @@ -18173,16 +19019,6 @@ dependencies = [ "strum", ] -[[package]] -name = "spki" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" -dependencies = [ - "base64ct", - "der 0.6.1", -] - [[package]] name = "spki" version = "0.7.2" @@ -18190,7 +19026,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.8", + "der", ] [[package]] @@ -18208,6 +19044,29 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "ssz_rs" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057291e5631f280978fa9c8009390663ca4613359fc1318e36a8c24c392f6d1f" +dependencies = [ + "bitvec", + "num-bigint", + "sha2 0.9.9", + "ssz_rs_derive", +] + +[[package]] +name = "ssz_rs_derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f07d54c4d01a1713eb363b55ba51595da15f6f1211435b71466460da022aa140" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -18218,7 +19077,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" name = "staging-chain-spec-builder" version = "2.0.0" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "log", "sc-chain-spec", "serde_json", @@ -18231,7 +19090,7 @@ version = "3.0.0-dev" dependencies = [ "array-bytes 6.1.0", "assert_cmd", - "clap 4.4.10", + "clap 4.4.18", "clap_complete", "criterion 0.4.0", "frame-benchmarking", @@ -18243,6 +19102,7 @@ dependencies = [ "jsonrpsee", "kitchensink-runtime", "log", + "mmr-gadget", "nix 0.26.2", "node-primitives", "node-rpc", @@ -18273,6 +19133,7 @@ dependencies = [ "sc-client-db", "sc-consensus", "sc-consensus-babe", + "sc-consensus-beefy", "sc-consensus-epochs", "sc-consensus-grandpa", "sc-consensus-slots", @@ -18304,6 +19165,7 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-babe", + "sp-consensus-beefy", "sp-consensus-grandpa", "sp-core", "sp-externalities 0.19.0", @@ -18312,6 +19174,7 @@ dependencies = [ "sp-keyring", "sp-keystore", "sp-mixnet", + "sp-mmr-primitives", "sp-runtime", "sp-state-machine", "sp-statement-store", @@ -18336,7 +19199,7 @@ dependencies = [ name = "staging-node-inspect" version = "0.9.0-dev" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "parity-scale-codec", "sc-cli", "sc-client-api", @@ -18370,6 +19233,7 @@ version = "1.0.0" name = "staging-xcm" version = "1.0.0" dependencies = [ + "array-bytes 6.1.0", "bounded-collections", "derivative", "environmental", @@ -18379,6 +19243,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", + "schemars", "serde", "sp-io", "sp-weights", @@ -18535,30 +19400,11 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "stun" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7e94b1ec00bad60e6410e058b52f1c66de3dc5fe4d62d09b3e52bb7d3b73e25" -dependencies = [ - "base64 0.13.1", - "crc", - "lazy_static", - "md-5", - "rand 0.8.5", - "ring 0.16.20", - "subtle 2.4.1", - "thiserror", - "tokio", - "url", - "webrtc-util", -] - [[package]] name = "subkey" version = "3.0.0" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "sc-cli", ] @@ -18600,7 +19446,7 @@ dependencies = [ name = "substrate-frame-cli" version = "4.0.0-dev" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "frame-support", "frame-system", "sc-cli", @@ -18811,28 +19657,19 @@ dependencies = [ name = "substrate-wasm-builder" version = "5.0.0-dev" dependencies = [ - "ansi_term", "build-helper", "cargo_metadata", + "console", "filetime", "parity-wasm", "sp-maybe-compressed-blob", "strum", "tempfile", - "toml 0.7.6", + "toml 0.8.8", "walkdir", "wasm-opt", ] -[[package]] -name = "substring" -version = "1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" -dependencies = [ - "autocfg", -] - [[package]] name = "subtle" version = "1.0.0" @@ -18955,15 +19792,27 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "syn-solidity" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b837ef12ab88835251726eb12237655e61ec8dc8a280085d1961cdc3dfd047" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -19075,7 +19924,7 @@ dependencies = [ name = "test-parachain-adder-collator" version = "1.0.0" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "futures", "futures-timer", "log", @@ -19123,7 +19972,7 @@ dependencies = [ name = "test-parachain-undying-collator" version = "1.0.0" dependencies = [ - "clap 4.4.10", + "clap 4.4.18", "futures", "futures-timer", "log", @@ -19169,19 +20018,6 @@ dependencies = [ "sp-weights", ] -[[package]] -name = "testnets-common" -version = "1.0.0" -dependencies = [ - "frame-support", - "polkadot-core-primitives", - "rococo-runtime-constants", - "smallvec", - "sp-runtime", - "substrate-wasm-builder", - "westend-runtime-constants", -] - [[package]] name = "textwrap" version = "0.16.0" @@ -19225,7 +20061,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -19297,17 +20133,6 @@ dependencies = [ "tikv-jemalloc-sys", ] -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - [[package]] name = "time" version = "0.3.27" @@ -19397,7 +20222,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -19528,17 +20353,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "toml_edit" -version = "0.20.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" -dependencies = [ - "indexmap 2.0.0", - "toml_datetime", - "winnow", -] - [[package]] name = "toml_edit" version = "0.21.0" @@ -19614,7 +20428,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -19653,10 +20467,10 @@ version = "1.0.0" dependencies = [ "assert_matches", "expander 2.0.0", - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] @@ -19809,7 +20623,7 @@ version = "0.10.0-dev" dependencies = [ "assert_cmd", "async-trait", - "clap 4.4.10", + "clap 4.4.18", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -19846,9 +20660,9 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.83" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6df60d81823ed9c520ee897489573da4b1d79ffbe006b8134f46de1a1aa03555" +checksum = "9a9d3ba662913483d6722303f619e75ea10b7855b0f8e0d72799cf8621bb488f" dependencies = [ "basic-toml", "dissimilar", @@ -19879,29 +20693,10 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "sha-1 0.10.1", - "thiserror", - "url", - "utf-8", -] - -[[package]] -name = "turn" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4712ee30d123ec7ae26d1e1b218395a16c87cdbaf4b3925d170d684af62ea5e8" -dependencies = [ - "async-trait", - "base64 0.13.1", - "futures", - "log", - "md-5", - "rand 0.8.5", - "ring 0.16.20", - "stun", + "sha-1 0.10.1", "thiserror", - "tokio", - "webrtc-util", + "url", + "utf-8", ] [[package]] @@ -19940,6 +20735,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicode-bidi" version = "0.3.13" @@ -19993,6 +20794,12 @@ dependencies = [ "subtle 2.4.1", ] +[[package]] +name = "unsafe-libyaml" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" + [[package]] name = "unsigned-varint" version = "0.7.1" @@ -20039,9 +20846,6 @@ name = "uuid" version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" -dependencies = [ - "getrandom 0.2.10", -] [[package]] name = "valuable" @@ -20112,8 +20916,8 @@ dependencies = [ "ark-bls12-377", "ark-bls12-381", "ark-ec", - "ark-ff", - "ark-serialize", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", "ark-serialize-derive", "arrayref", "constcat", @@ -20136,15 +20940,6 @@ dependencies = [ "libc", ] -[[package]] -name = "waitgroup" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292" -dependencies = [ - "atomic-waker", -] - [[package]] name = "waker-fn" version = "1.1.0" @@ -20153,9 +20948,9 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -20176,12 +20971,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -20211,7 +21000,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", "wasm-bindgen-shared", ] @@ -20245,7 +21034,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -20256,6 +21045,30 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +[[package]] +name = "wasm-bindgen-test" +version = "0.3.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e6e302a7ea94f83a6d09e78e7dc7d9ca7b186bc2829c24a22d0753efd680671" +dependencies = [ + "console_error_panic_hook", + "js-sys", + "scoped-tls", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-test-macro", +] + +[[package]] +name = "wasm-bindgen-test-macro" +version = "0.3.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecb993dd8c836930ed130e020e77d9b2e65dd0fbab1b67c790b0f5d80b11a575" +dependencies = [ + "proc-macro2", + "quote", +] + [[package]] name = "wasm-encoder" version = "0.31.1" @@ -20614,16 +21427,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring 0.16.20", - "untrusted", -] - [[package]] name = "webpki" version = "0.22.0" @@ -20640,7 +21443,7 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "webpki 0.22.0", + "webpki", ] [[package]] @@ -20658,214 +21461,6 @@ version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" -[[package]] -name = "webrtc" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3bc9049bdb2cea52f5fd4f6f728184225bdb867ed0dc2410eab6df5bdd67bb" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "hex", - "interceptor", - "lazy_static", - "log", - "rand 0.8.5", - "rcgen 0.9.3", - "regex", - "ring 0.16.20", - "rtcp", - "rtp", - "rustls 0.19.1", - "sdp", - "serde", - "serde_json", - "sha2 0.10.7", - "stun", - "thiserror", - "time 0.3.27", - "tokio", - "turn", - "url", - "waitgroup", - "webrtc-data", - "webrtc-dtls", - "webrtc-ice", - "webrtc-mdns", - "webrtc-media", - "webrtc-sctp", - "webrtc-srtp", - "webrtc-util", -] - -[[package]] -name = "webrtc-data" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef36a4d12baa6e842582fe9ec16a57184ba35e1a09308307b67d43ec8883100" -dependencies = [ - "bytes", - "derive_builder", - "log", - "thiserror", - "tokio", - "webrtc-sctp", - "webrtc-util", -] - -[[package]] -name = "webrtc-dtls" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a00f4242f2db33307347bd5be53263c52a0331c96c14292118c9a6bb48d267" -dependencies = [ - "aes 0.6.0", - "aes-gcm 0.10.3", - "async-trait", - "bincode", - "block-modes", - "byteorder", - "ccm", - "curve25519-dalek 3.2.0", - "der-parser 8.2.0", - "elliptic-curve 0.12.3", - "hkdf", - "hmac 0.12.1", - "log", - "p256", - "p384", - "rand 0.8.5", - "rand_core 0.6.4", - "rcgen 0.10.0", - "ring 0.16.20", - "rustls 0.19.1", - "sec1 0.3.0", - "serde", - "sha1", - "sha2 0.10.7", - "signature 1.6.4", - "subtle 2.4.1", - "thiserror", - "tokio", - "webpki 0.21.4", - "webrtc-util", - "x25519-dalek 2.0.0", - "x509-parser 0.13.2", -] - -[[package]] -name = "webrtc-ice" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80" -dependencies = [ - "arc-swap", - "async-trait", - "crc", - "log", - "rand 0.8.5", - "serde", - "serde_json", - "stun", - "thiserror", - "tokio", - "turn", - "url", - "uuid", - "waitgroup", - "webrtc-mdns", - "webrtc-util", -] - -[[package]] -name = "webrtc-mdns" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" -dependencies = [ - "log", - "socket2 0.4.9", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-media" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f72e1650a8ae006017d1a5280efb49e2610c19ccc3c0905b03b648aee9554991" -dependencies = [ - "byteorder", - "bytes", - "rand 0.8.5", - "rtp", - "thiserror", -] - -[[package]] -name = "webrtc-sctp" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d47adcd9427eb3ede33d5a7f3424038f63c965491beafcc20bc650a2f6679c0" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "crc", - "log", - "rand 0.8.5", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-srtp" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6183edc4c1c6c0175f8812eefdce84dfa0aea9c3ece71c2bf6ddd3c964de3da5" -dependencies = [ - "aead 0.4.3", - "aes 0.7.5", - "aes-gcm 0.9.4", - "async-trait", - "byteorder", - "bytes", - "ctr 0.8.0", - "hmac 0.11.0", - "log", - "rtcp", - "rtp", - "sha-1 0.9.8", - "subtle 2.4.1", - "thiserror", - "tokio", - "webrtc-util", -] - -[[package]] -name = "webrtc-util" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" -dependencies = [ - "async-trait", - "bitflags 1.3.2", - "bytes", - "cc", - "ipnet", - "lazy_static", - "libc", - "log", - "nix 0.24.3", - "rand 0.8.5", - "thiserror", - "tokio", - "winapi", -] - [[package]] name = "westend-emulated-chain" version = "0.0.0" @@ -21018,8 +21613,10 @@ version = "0.0.0" dependencies = [ "asset-hub-westend-emulated-chain", "bridge-hub-westend-emulated-chain", + "collectives-westend-emulated-chain", "emulated-integration-tests-common", "penpal-emulated-chain", + "people-westend-emulated-chain", "westend-emulated-chain", ] @@ -21121,6 +21718,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -21151,6 +21757,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -21163,6 +21784,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.34.0" @@ -21181,6 +21808,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.34.0" @@ -21199,6 +21832,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.34.0" @@ -21217,6 +21856,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.34.0" @@ -21235,6 +21880,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -21247,6 +21898,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.34.0" @@ -21265,6 +21922,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winnow" version = "0.5.15" @@ -21310,47 +21973,28 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 4.0.0", + "curve25519-dalek 4.1.1", "rand_core 0.6.4", "serde", "zeroize", ] -[[package]] -name = "x509-parser" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb9bace5b5589ffead1afb76e43e34cff39cd0f3ce7e170ae0c29e53b88eb1c" -dependencies = [ - "asn1-rs 0.3.1", - "base64 0.13.1", - "data-encoding", - "der-parser 7.0.0", - "lazy_static", - "nom", - "oid-registry 0.4.0", - "ring 0.16.20", - "rusticata-macros", - "thiserror", - "time 0.3.27", -] - [[package]] name = "x509-parser" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs", "base64 0.13.1", "data-encoding", - "der-parser 8.2.0", + "der-parser", "lazy_static", "nom", - "oid-registry 0.6.1", + "oid-registry", "rusticata-macros", "thiserror", - "time 0.3.27", + "time", ] [[package]] @@ -21424,7 +22068,7 @@ dependencies = [ "proc-macro2", "quote", "staging-xcm", - "syn 2.0.39", + "syn 2.0.48", "trybuild", ] @@ -21524,7 +22168,27 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.27", + "time", +] + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", ] [[package]] @@ -21544,7 +22208,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.48", ] [[package]] From 65082f9eeb0407bbdb31d6d432f7a9046b5c4e94 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 28 Feb 2024 16:34:02 +1100 Subject: [PATCH 92/98] update cargo.lock --- Cargo.lock | 3501 +++++++++++++++++++++++++++++----------------------- 1 file changed, 1925 insertions(+), 1576 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 790525155b8d..27ba43780eda 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -86,16 +86,16 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.9.4" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" +checksum = "bc3be92e19a7ef47457b8e6f90707e12b6ac5d20c6f3866584fa3be0787d839f" dependencies = [ "aead 0.4.3", "aes 0.7.5", "cipher 0.3.0", - "ctr 0.8.0", + "ctr 0.7.0", "ghash 0.4.4", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] @@ -109,14 +109,14 @@ dependencies = [ "cipher 0.4.4", "ctr 0.9.2", "ghash 0.5.0", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ "getrandom 0.2.10", "once_cell", @@ -125,9 +125,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" dependencies = [ "cfg-if", "getrandom 0.2.10", @@ -165,7 +165,7 @@ dependencies = [ "hex-literal", "itoa", "proptest", - "rand 0.8.5", + "rand", "ruint", "serde", "tiny-keccak", @@ -173,24 +173,25 @@ dependencies = [ [[package]] name = "alloy-rlp" -version = "0.3.4" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +checksum = "cc0fac0fc16baf1f63f78b47c3d24718f3619b0714076f6a02957d808d52cbef" dependencies = [ "alloy-rlp-derive", "arrayvec 0.7.4", "bytes", + "smol_str", ] [[package]] name = "alloy-rlp-derive" -version = "0.3.4" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" +checksum = "c0391754c09fab4eae3404d19d0d297aa1c670c1775ab51d8a5312afeca23157" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -205,7 +206,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", "syn-solidity", "tiny-keccak", ] @@ -228,15 +229,6 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4436e0292ab1bb631b42973c61205e704475fe8126af845c8d923c0996328127" -[[package]] -name = "amcl" -version = "0.3.0" -source = "git+https://github.com/snowfork/milagro_bls?rev=a6d66e4eb89015e352fb1c9f7b661ecdbb5b2176#a6d66e4eb89015e352fb1c9f7b661ecdbb5b2176" -dependencies = [ - "parity-scale-codec", - "scale-info", -] - [[package]] name = "android-tzdata" version = "0.1.1" @@ -269,9 +261,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.9" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fde6067df7359f2d6335ec1a50c1f8f825801687d10da0cc4c6b08e3f6afd15" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -341,14 +333,14 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "arbitrary" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" [[package]] name = "ark-bls12-377" @@ -684,7 +676,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ "num-traits", - "rand 0.8.5", + "rand", ] [[package]] @@ -694,7 +686,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand 0.8.5", + "rand", "rayon", ] @@ -820,9 +812,8 @@ dependencies = [ "frame-support", "parachains-common", "rococo-emulated-chain", - "serde_json", "sp-core", - "sp-runtime", + "testnet-parachains-constants", ] [[package]] @@ -832,6 +823,7 @@ dependencies = [ "assert_matches", "asset-hub-rococo-runtime", "asset-test-utils", + "cumulus-pallet-parachain-system", "emulated-integration-tests-common", "frame-support", "pallet-asset-conversion", @@ -846,11 +838,12 @@ dependencies = [ "sp-runtime", "staging-xcm", "staging-xcm-executor", + "testnet-parachains-constants", ] [[package]] name = "asset-hub-rococo-runtime" -version = "0.9.420" +version = "0.11.0" dependencies = [ "asset-test-utils", "assets-common", @@ -863,6 +856,7 @@ dependencies = [ "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", "frame-benchmarking", @@ -899,13 +893,11 @@ dependencies = [ "pallet-xcm-bridge-hub-router", "parachains-common", "parity-scale-codec", - "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", "primitive-types", "rococo-runtime-constants", "scale-info", - "smallvec", "snowbridge-router-primitives", "sp-api", "sp-block-builder", @@ -916,8 +908,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "sp-weights", @@ -926,6 +918,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-parachains-constants", ] [[package]] @@ -937,9 +930,8 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "serde_json", "sp-core", - "sp-runtime", + "testnet-parachains-constants", "westend-emulated-chain", ] @@ -950,14 +942,11 @@ dependencies = [ "assert_matches", "asset-hub-westend-runtime", "asset-test-utils", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", "emulated-integration-tests-common", "frame-support", - "frame-system", "pallet-asset-conversion", - "pallet-asset-rate", "pallet-assets", "pallet-balances", "pallet-message-queue", @@ -968,16 +957,15 @@ dependencies = [ "polkadot-runtime-common", "sp-runtime", "staging-xcm", - "staging-xcm-builder", "staging-xcm-executor", + "testnet-parachains-constants", "westend-runtime", - "westend-runtime-constants", "westend-system-emulated-network", ] [[package]] name = "asset-hub-westend-runtime" -version = "0.9.420" +version = "0.15.0" dependencies = [ "asset-test-utils", "assets-common", @@ -990,6 +978,7 @@ dependencies = [ "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", "frame-benchmarking", @@ -1025,12 +1014,10 @@ dependencies = [ "pallet-xcm-bridge-hub-router", "parachains-common", "parity-scale-codec", - "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", "primitive-types", "scale-info", - "smallvec", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -1040,8 +1027,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -1049,38 +1036,33 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-parachains-constants", "westend-runtime-constants", ] [[package]] name = "asset-test-utils" -version = "1.0.0" +version = "7.0.0" dependencies = [ - "assets-common", "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", - "cumulus-primitives-parachain-inherent", - "cumulus-test-relay-sproof-builder", "frame-support", "frame-system", "hex-literal", - "pallet-asset-conversion", "pallet-assets", "pallet-balances", "pallet-collator-selection", "pallet-session", + "pallet-timestamp", "pallet-xcm", "pallet-xcm-bridge-hub-router", "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "polkadot-parachain-primitives", - "sp-consensus-aura", - "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -1090,21 +1072,20 @@ dependencies = [ [[package]] name = "assets-common" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cumulus-primitives-core", "frame-support", "impl-trait-for-tuples", "log", "pallet-asset-conversion", - "pallet-asset-tx-payment", "pallet-xcm", "parachains-common", "parity-scale-codec", "scale-info", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -1118,7 +1099,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", "futures-core", ] @@ -1128,7 +1109,7 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" dependencies = [ - "async-lock", + "async-lock 2.8.0", "async-task", "concurrent-queue", "fastrand 1.9.0", @@ -1142,7 +1123,7 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" dependencies = [ - "async-lock", + "async-lock 2.8.0", "autocfg", "blocking", "futures-lite", @@ -1154,7 +1135,7 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "async-lock", + "async-lock 2.8.0", "autocfg", "cfg-if", "concurrent-queue", @@ -1174,7 +1155,18 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ - "event-listener", + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +dependencies = [ + "event-listener 4.0.3", + "event-listener-strategy", + "pin-project-lite 0.2.12", ] [[package]] @@ -1196,11 +1188,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" dependencies = [ "async-io", - "async-lock", + "async-lock 2.8.0", "autocfg", "blocking", "cfg-if", - "event-listener", + "event-listener 2.5.3", "futures-lite", "rustix 0.37.23", "signal-hook", @@ -1226,7 +1218,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1237,13 +1229,13 @@ checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1388,7 +1380,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" -version = "4.0.0-dev" +version = "13.0.0" dependencies = [ "array-bytes 6.1.0", "env_logger 0.9.3", @@ -1425,7 +1417,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -1435,7 +1427,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", - "rand 0.8.5", + "rand", "rand_core 0.6.4", "serde", "unicode-normalization", @@ -1599,7 +1591,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" dependencies = [ "async-channel", - "async-lock", + "async-lock 2.8.0", "async-task", "atomic-waker", "fastrand 1.9.0", @@ -1609,9 +1601,9 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.1.9" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca548b6163b872067dc5eb82fd130c56881435e30367d2073594a3d9744120dd" +checksum = "d32385ecb91a31bddaf908e8dcf4a15aef1bcd3913cc03ebfad02ff6d568abc1" dependencies = [ "log", "parity-scale-codec", @@ -1631,7 +1623,7 @@ dependencies = [ [[package]] name = "bp-asset-hub-rococo" -version = "0.1.0" +version = "0.4.0" dependencies = [ "bp-xcm-bridge-hub-router", "frame-support", @@ -1641,7 +1633,7 @@ dependencies = [ [[package]] name = "bp-asset-hub-westend" -version = "0.1.0" +version = "0.3.0" dependencies = [ "bp-xcm-bridge-hub-router", "frame-support", @@ -1651,7 +1643,7 @@ dependencies = [ [[package]] name = "bp-bridge-hub-cumulus" -version = "0.1.0" +version = "0.7.0" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -1660,12 +1652,12 @@ dependencies = [ "frame-system", "polkadot-primitives", "sp-api", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-bridge-hub-kusama" -version = "0.1.0" +version = "0.6.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -1673,12 +1665,12 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-bridge-hub-polkadot" -version = "0.1.0" +version = "0.6.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -1686,12 +1678,12 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-bridge-hub-rococo" -version = "0.1.0" +version = "0.7.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -1699,12 +1691,12 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-bridge-hub-westend" -version = "0.1.0" +version = "0.3.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -1712,12 +1704,12 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-header-chain" -version = "0.1.0" +version = "0.7.0" dependencies = [ "bp-runtime", "bp-test-utils", @@ -1731,24 +1723,24 @@ dependencies = [ "sp-consensus-grandpa", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-kusama" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", "frame-support", "sp-api", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-messages" -version = "0.1.0" +version = "0.7.0" dependencies = [ "bp-header-chain", "bp-runtime", @@ -1759,12 +1751,12 @@ dependencies = [ "scale-info", "serde", "sp-core", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-parachains" -version = "0.1.0" +version = "0.7.0" dependencies = [ "bp-header-chain", "bp-polkadot-core", @@ -1775,24 +1767,24 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-polkadot" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", "frame-support", "sp-api", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-polkadot-bulletin" -version = "0.1.0" +version = "0.4.0" dependencies = [ "bp-header-chain", "bp-messages", @@ -1804,12 +1796,12 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-polkadot-core" -version = "0.1.0" +version = "0.7.0" dependencies = [ "bp-messages", "bp-runtime", @@ -1822,12 +1814,12 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-relayers" -version = "0.1.0" +version = "0.7.0" dependencies = [ "bp-messages", "bp-runtime", @@ -1837,24 +1829,24 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-rococo" -version = "0.1.0" +version = "0.6.0" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", "frame-support", "sp-api", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-runtime" -version = "0.1.0" +version = "0.7.0" dependencies = [ "frame-support", "frame-system", @@ -1870,14 +1862,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-trie", "trie-db", ] [[package]] name = "bp-test-utils" -version = "0.1.0" +version = "0.7.0" dependencies = [ "bp-header-chain", "bp-parachains", @@ -1890,32 +1882,32 @@ dependencies = [ "sp-consensus-grandpa", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-trie", ] [[package]] name = "bp-westend" -version = "0.1.0" +version = "0.3.0" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", "frame-support", "sp-api", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-xcm-bridge-hub" -version = "0.1.0" +version = "0.2.0" dependencies = [ - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "bp-xcm-bridge-hub-router" -version = "0.1.0" +version = "0.6.0" dependencies = [ "parity-scale-codec", "scale-info", @@ -1925,7 +1917,7 @@ dependencies = [ [[package]] name = "bridge-hub-common" -version = "0.1.0" +version = "0.0.0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1935,7 +1927,7 @@ dependencies = [ "snowbridge-core", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", ] @@ -1945,18 +1937,11 @@ version = "0.0.0" dependencies = [ "bridge-hub-common", "bridge-hub-rococo-runtime", - "cumulus-primitives-core", "emulated-integration-tests-common", "frame-support", "parachains-common", - "serde_json", - "snowbridge-core", - "snowbridge-pallet-inbound-queue", - "snowbridge-pallet-outbound-queue", - "snowbridge-pallet-system", - "snowbridge-router-primitives", "sp-core", - "sp-runtime", + "testnet-parachains-constants", ] [[package]] @@ -1964,14 +1949,11 @@ name = "bridge-hub-rococo-integration-tests" version = "1.0.0" dependencies = [ "asset-hub-rococo-runtime", - "asset-test-utils", "bp-messages", "bridge-hub-rococo-runtime", - "cumulus-pallet-dmp-queue", "cumulus-pallet-xcmp-queue", "emulated-integration-tests-common", "frame-support", - "hex", "hex-literal", "pallet-asset-conversion", "pallet-assets", @@ -1981,12 +1963,12 @@ dependencies = [ "pallet-xcm", "parachains-common", "parity-scale-codec", - "penpal-runtime", "rococo-system-emulated-network", "rococo-westend-system-emulated-network", "scale-info", "snowbridge-core", "snowbridge-pallet-inbound-queue", + "snowbridge-pallet-inbound-queue-fixtures", "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", "snowbridge-router-primitives", @@ -1994,11 +1976,12 @@ dependencies = [ "sp-runtime", "staging-xcm", "staging-xcm-executor", + "testnet-parachains-constants", ] [[package]] name = "bridge-hub-rococo-runtime" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-asset-hub-rococo", "bp-asset-hub-westend", @@ -2022,6 +2005,7 @@ dependencies = [ "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", "frame-benchmarking", @@ -2053,13 +2037,11 @@ dependencies = [ "pallet-xcm-bridge-hub", "parachains-common", "parity-scale-codec", - "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", "rococo-runtime-constants", "scale-info", "serde", - "smallvec", "snowbridge-beacon-primitives", "snowbridge-core", "snowbridge-outbound-queue-runtime-api", @@ -2082,8 +2064,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -2092,16 +2074,16 @@ dependencies = [ "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", + "testnet-parachains-constants", ] [[package]] name = "bridge-hub-test-utils" -version = "0.1.0" +version = "0.7.0" dependencies = [ "asset-test-utils", "bp-header-chain", "bp-messages", - "bp-parachains", "bp-polkadot-core", "bp-relayers", "bp-runtime", @@ -2109,8 +2091,6 @@ dependencies = [ "bridge-runtime-common", "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", - "frame-benchmarking", - "frame-executive", "frame-support", "frame-system", "impl-trait-for-tuples", @@ -2120,11 +2100,8 @@ dependencies = [ "pallet-bridge-messages", "pallet-bridge-parachains", "pallet-bridge-relayers", - "pallet-collator-selection", - "pallet-session", + "pallet-timestamp", "pallet-utility", - "pallet-xcm", - "pallet-xcm-benchmarks", "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", @@ -2132,9 +2109,8 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", - "staging-parachain-info", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -2146,23 +2122,19 @@ version = "0.0.0" dependencies = [ "bridge-hub-common", "bridge-hub-westend-runtime", - "cumulus-primitives-core", "emulated-integration-tests-common", "frame-support", "parachains-common", - "serde_json", "sp-core", - "sp-runtime", + "testnet-parachains-constants", ] [[package]] name = "bridge-hub-westend-integration-tests" version = "1.0.0" dependencies = [ - "asset-test-utils", "bp-messages", "bridge-hub-westend-runtime", - "cumulus-pallet-dmp-queue", "cumulus-pallet-xcmp-queue", "emulated-integration-tests-common", "frame-support", @@ -2173,7 +2145,6 @@ dependencies = [ "pallet-message-queue", "pallet-xcm", "parachains-common", - "parity-scale-codec", "rococo-westend-system-emulated-network", "sp-runtime", "staging-xcm", @@ -2182,7 +2153,7 @@ dependencies = [ [[package]] name = "bridge-hub-westend-runtime" -version = "0.1.0" +version = "0.2.0" dependencies = [ "bp-asset-hub-rococo", "bp-asset-hub-westend", @@ -2204,6 +2175,7 @@ dependencies = [ "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", "frame-benchmarking", @@ -2235,12 +2207,10 @@ dependencies = [ "pallet-xcm-bridge-hub", "parachains-common", "parity-scale-codec", - "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", "scale-info", "serde", - "smallvec", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -2252,8 +2222,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -2262,12 +2232,13 @@ dependencies = [ "staging-xcm-executor", "static_assertions", "substrate-wasm-builder", + "testnet-parachains-constants", "westend-runtime-constants", ] [[package]] name = "bridge-runtime-common" -version = "0.1.0" +version = "0.7.0" dependencies = [ "bp-header-chain", "bp-messages", @@ -2295,7 +2266,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-trie", "staging-xcm", "staging-xcm-builder", @@ -2632,19 +2603,19 @@ dependencies = [ "clap_lex 0.2.4", "indexmap 1.9.3", "once_cell", - "strsim", + "strsim 0.10.0", "termcolor", "textwrap", ] [[package]] name = "clap" -version = "4.4.18" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" dependencies = [ "clap_builder", - "clap_derive 4.4.7", + "clap_derive 4.5.0", ] [[package]] @@ -2658,14 +2629,14 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" dependencies = [ "anstream", "anstyle", - "clap_lex 0.6.0", - "strsim", + "clap_lex 0.7.0", + "strsim 0.11.0", "terminal_size", ] @@ -2675,7 +2646,7 @@ version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "586a385f7ef2f8b4d86bddaa0c094794e7ccbfe5ffef1f434fe928143fc783a5" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", ] [[package]] @@ -2693,14 +2664,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -2714,9 +2685,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "coarsetime" @@ -2749,21 +2720,20 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "serde_json", "sp-core", - "sp-runtime", - "westend-emulated-chain", + "testnet-parachains-constants", ] [[package]] name = "collectives-westend-runtime" -version = "1.0.0" +version = "3.0.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", "frame-benchmarking", @@ -2801,11 +2771,9 @@ dependencies = [ "pallet-xcm", "parachains-common", "parity-scale-codec", - "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", "scale-info", - "smallvec", "sp-api", "sp-arithmetic", "sp-block-builder", @@ -2817,8 +2785,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -2826,6 +2794,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-parachains-constants", "westend-runtime-constants", ] @@ -2871,29 +2840,30 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "colored" -version = "2.1.0" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ + "is-terminal", "lazy_static", "windows-sys 0.48.0", ] [[package]] name = "comfy-table" -version = "7.0.1" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab77dbd8adecaf3f0db40581631b995f312a8a5ae3aa9993188bb8f23d83a5b" +checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" dependencies = [ - "strum", - "strum_macros", + "strum 0.25.0", + "strum_macros 0.25.3", "unicode-width", ] [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof#61e7b528bc0170d6bf541be32440d569b784425d" +source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" dependencies = [ "ark-ec", "ark-ff 0.4.2", @@ -3011,14 +2981,14 @@ checksum = "f272d0c4cf831b4fa80ee529c7707f76585986e910e1fbce1d7921970bc1a241" [[package]] name = "contracts-rococo-runtime" -version = "0.2.0" +version = "0.8.0" dependencies = [ "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", "frame-benchmarking", @@ -3047,12 +3017,10 @@ dependencies = [ "pallet-xcm", "parachains-common", "parity-scale-codec", - "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", "rococo-runtime-constants", "scale-info", - "smallvec", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -3062,8 +3030,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -3071,6 +3039,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-parachains-constants", ] [[package]] @@ -3113,6 +3082,7 @@ dependencies = [ "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", "frame-benchmarking", @@ -3141,13 +3111,11 @@ dependencies = [ "pallet-xcm-benchmarks", "parachains-common", "parity-scale-codec", - "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", "rococo-runtime-constants", "scale-info", "serde", - "smallvec", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -3157,8 +3125,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -3166,6 +3134,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-parachains-constants", ] [[package]] @@ -3177,6 +3146,7 @@ dependencies = [ "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", "frame-benchmarking", @@ -3191,11 +3161,11 @@ dependencies = [ "pallet-aura", "pallet-authorship", "pallet-balances", + "pallet-broker", "pallet-collator-selection", "pallet-message-queue", "pallet-multisig", "pallet-session", - "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", @@ -3204,12 +3174,10 @@ dependencies = [ "pallet-xcm-benchmarks", "parachains-common", "parity-scale-codec", - "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", "scale-info", "serde", - "smallvec", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -3219,8 +3187,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -3228,6 +3196,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-parachains-constants", "westend-runtime-constants", ] @@ -3412,7 +3381,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.4.18", + "clap 4.5.1", "criterion-plot", "futures", "is-terminal", @@ -3508,7 +3477,7 @@ checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -3540,24 +3509,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ "generic-array 0.14.7", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] name = "crypto-mac" -version = "0.11.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "25fab6889090c8133f3deb8f73ba3c65a7f456f66436fc012a1b1e272b1e103e" dependencies = [ "generic-array 0.14.7", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] name = "ctr" -version = "0.8.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +checksum = "a232f92a03f37dd7d7dd2adc67166c77e9cd88de5b019b9a9eecfaeaf7bfd481" dependencies = [ "cipher 0.3.0", ] @@ -3573,9 +3542,9 @@ dependencies = [ [[package]] name = "cumulus-client-cli" -version = "0.1.0" +version = "0.7.0" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "parity-scale-codec", "sc-chain-spec", "sc-cli", @@ -3589,7 +3558,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" -version = "0.1.0" +version = "0.7.0" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -3613,13 +3582,13 @@ dependencies = [ "sp-maybe-compressed-blob", "sp-runtime", "sp-state-machine", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "tracing", ] [[package]] name = "cumulus-client-consensus-aura" -version = "0.1.0" +version = "0.7.0" dependencies = [ "async-trait", "cumulus-client-collator", @@ -3660,7 +3629,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" -version = "0.1.0" +version = "0.7.0" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -3684,7 +3653,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-timestamp", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "sp-trie", "substrate-prometheus-endpoint", "tracing", @@ -3692,7 +3661,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-proposer" -version = "0.1.0" +version = "0.7.0" dependencies = [ "anyhow", "async-trait", @@ -3706,7 +3675,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-relay-chain" -version = "0.1.0" +version = "0.7.0" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -3728,7 +3697,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" -version = "0.1.0" +version = "0.7.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -3772,19 +3741,19 @@ dependencies = [ "sc-client-api", "scale-info", "sp-api", - "sp-core", + "sp-crypto-hashing", "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-trie", "tracing", ] [[package]] name = "cumulus-client-pov-recovery" -version = "0.1.0" +version = "0.7.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -3798,7 +3767,7 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "portpicker", - "rand 0.8.5", + "rand", "sc-cli", "sc-client-api", "sc-consensus", @@ -3812,7 +3781,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -3847,7 +3816,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -3859,12 +3828,12 @@ dependencies = [ "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "cumulus-pallet-dmp-queue" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -3876,14 +3845,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "staging-xcm", ] [[package]] name = "cumulus-pallet-parachain-system" -version = "0.1.0" +version = "0.7.0" dependencies = [ "assert_matches", "bytes", @@ -3905,19 +3874,21 @@ dependencies = [ "pallet-message-queue", "parity-scale-codec", "polkadot-parachain-primitives", + "polkadot-runtime-common", "polkadot-runtime-parachains", - "rand 0.8.5", + "rand", "sc-client-api", "scale-info", "sp-core", - "sp-externalities 0.19.0", + "sp-crypto-hashing", + "sp-externalities 0.25.0", "sp-inherents", "sp-io", "sp-keyring", "sp-runtime", "sp-state-machine", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "sp-trie", "sp-version", "staging-xcm", @@ -3927,17 +3898,17 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" -version = "0.1.0" +version = "0.6.0" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "cumulus-pallet-session-benchmarking" -version = "3.0.0" +version = "9.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -3945,12 +3916,12 @@ dependencies = [ "pallet-session", "parity-scale-codec", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "cumulus-pallet-solo-to-para" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -3960,12 +3931,12 @@ dependencies = [ "polkadot-primitives", "scale-info", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "cumulus-pallet-xcm" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -3974,13 +3945,13 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", ] [[package]] name = "cumulus-pallet-xcmp-queue" -version = "0.1.0" +version = "0.7.0" dependencies = [ "bounded-collections", "bp-xcm-bridge-hub-router", @@ -3999,7 +3970,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -4007,7 +3978,7 @@ dependencies = [ [[package]] name = "cumulus-ping" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cumulus-pallet-xcm", "cumulus-primitives-core", @@ -4016,13 +3987,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", ] [[package]] name = "cumulus-primitives-aura" -version = "0.1.0" +version = "0.7.0" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -4030,12 +4001,12 @@ dependencies = [ "sp-api", "sp-consensus-aura", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "cumulus-primitives-core" -version = "0.1.0" +version = "0.7.0" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -4044,14 +4015,14 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-trie", "staging-xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" -version = "0.1.0" +version = "0.7.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -4061,49 +4032,67 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-trie", ] [[package]] name = "cumulus-primitives-proof-size-hostfunction" -version = "0.1.0" +version = "0.2.0" dependencies = [ "sp-core", - "sp-externalities 0.19.0", + "sp-externalities 0.25.0", "sp-io", - "sp-runtime-interface 17.0.0", + "sp-runtime-interface 24.0.0", "sp-state-machine", "sp-trie", ] +[[package]] +name = "cumulus-primitives-storage-weight-reclaim" +version = "1.0.0" +dependencies = [ + "cumulus-primitives-core", + "cumulus-primitives-proof-size-hostfunction", + "cumulus-test-runtime", + "docify", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std 14.0.0", + "sp-trie", +] + [[package]] name = "cumulus-primitives-timestamp" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cumulus-primitives-core", "futures", "parity-scale-codec", "sp-inherents", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-timestamp", ] [[package]] name = "cumulus-primitives-utility" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cumulus-primitives-core", "frame-support", "log", "pallet-asset-conversion", - "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-runtime-common", "polkadot-runtime-parachains", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -4111,7 +4100,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" -version = "0.1.0" +version = "0.7.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -4139,7 +4128,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" -version = "0.1.0" +version = "0.7.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -4156,7 +4145,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" -version = "0.1.0" +version = "0.7.0" dependencies = [ "array-bytes 6.1.0", "async-trait", @@ -4177,6 +4166,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-overseer", "polkadot-primitives", + "polkadot-service", "sc-authority-discovery", "sc-client-api", "sc-network", @@ -4196,7 +4186,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-rpc-interface" -version = "0.1.0" +version = "0.7.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -4208,7 +4198,7 @@ dependencies = [ "parity-scale-codec", "pin-project", "polkadot-overseer", - "rand 0.8.5", + "rand", "sc-client-api", "sc-rpc-api", "sc-service", @@ -4223,7 +4213,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-storage 13.0.0", + "sp-storage 19.0.0", "sp-version", "thiserror", "tokio", @@ -4239,6 +4229,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", "cumulus-primitives-proof-size-hostfunction", + "cumulus-primitives-storage-weight-reclaim", "cumulus-test-relay-sproof-builder", "cumulus-test-runtime", "cumulus-test-service", @@ -4266,14 +4257,14 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives", "sp-runtime", "sp-state-machine", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-trie", ] @@ -4283,6 +4274,7 @@ version = "0.1.0" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", + "cumulus-primitives-storage-weight-reclaim", "frame-executive", "frame-support", "frame-system", @@ -4304,7 +4296,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -4315,7 +4307,7 @@ name = "cumulus-test-service" version = "0.1.0" dependencies = [ "async-trait", - "clap 4.4.18", + "clap 4.5.1", "criterion 0.5.1", "cumulus-client-cli", "cumulus-client-consensus-common", @@ -4325,6 +4317,7 @@ dependencies = [ "cumulus-client-service", "cumulus-pallet-parachain-system", "cumulus-primitives-core", + "cumulus-primitives-storage-weight-reclaim", "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", @@ -4347,7 +4340,7 @@ dependencies = [ "polkadot-service", "polkadot-test-service", "portpicker", - "rand 0.8.5", + "rand", "rococo-parachain-runtime", "sc-basic-authorship", "sc-block-builder", @@ -4378,7 +4371,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-timestamp", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "substrate-test-client", "substrate-test-utils", "tempfile", @@ -4396,7 +4389,7 @@ dependencies = [ "byteorder", "digest 0.8.1", "rand_core 0.5.1", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -4409,15 +4402,15 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] [[package]] name = "curve25519-dalek" -version = "4.1.1" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" dependencies = [ "cfg-if", "cpufeatures", @@ -4426,7 +4419,7 @@ dependencies = [ "fiat-crypto", "platforms", "rustc_version 0.4.0", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -4438,7 +4431,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -4478,7 +4471,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -4495,7 +4488,7 @@ checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -4650,7 +4643,7 @@ dependencies = [ "block-buffer 0.10.4", "const-oid", "crypto-common", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] @@ -4703,7 +4696,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -4745,18 +4738,18 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "docify" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4235e9b248e2ba4b92007fe9c646f3adf0ffde16dc74713eacc92b8bc58d8d2f" +checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47020e12d7c7505670d1363dd53d6c23724f71a90a3ae32ff8eba40de8404626" +checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" dependencies = [ "common-path", "derive-syn-parse", @@ -4764,9 +4757,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.48", + "syn 2.0.50", "termcolor", - "toml 0.7.6", + "toml 0.8.8", "walkdir", ] @@ -4851,12 +4844,12 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.2", "ed25519", "rand_core 0.6.4", "serde", "sha2 0.10.7", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -4880,7 +4873,7 @@ version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.2", "ed25519", "hashbrown 0.14.3", "hex", @@ -4910,13 +4903,13 @@ dependencies = [ "pkcs8", "rand_core 0.6.4", "sec1", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] [[package]] name = "emulated-integration-tests-common" -version = "1.0.0" +version = "3.0.0" dependencies = [ "asset-test-utils", "bp-messages", @@ -4928,7 +4921,6 @@ dependencies = [ "pallet-assets", "pallet-balances", "pallet-bridge-messages", - "pallet-im-online", "pallet-message-queue", "pallet-xcm", "parachains-common", @@ -4936,9 +4928,7 @@ dependencies = [ "paste", "polkadot-primitives", "polkadot-runtime-parachains", - "polkadot-service", "sc-consensus-grandpa", - "serde_json", "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", @@ -4992,7 +4982,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -5003,7 +4993,7 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -5097,7 +5087,8 @@ dependencies = [ [[package]] name = "ethabi-decode" version = "1.0.0" -source = "git+https://github.com/snowfork/ethabi-decode.git?branch=master#5c01c8a0f2d0e4eccf600507cd573b27555b1d9d" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d398648d65820a727d6a81e58b962f874473396a047e4c30bafe3240953417" dependencies = [ "ethereum-types", "tiny-keccak", @@ -5140,6 +5131,27 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite 0.2.12", +] + +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.3", + "pin-project-lite 0.2.12", +] + [[package]] name = "exit-future" version = "0.2.0" @@ -5171,7 +5183,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -5286,13 +5298,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] name = "fflonk" version = "0.1.0" -source = "git+https://github.com/w3f/fflonk#1beb0585e1c8488956fac7f05da061f9b41e8948" +source = "git+https://github.com/w3f/fflonk#1e854f35e9a65d08b11a86291405cdc95baa0a35" dependencies = [ "ark-ec", "ark-ff 0.4.2", @@ -5343,7 +5355,7 @@ dependencies = [ "num-traits", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "scale-info", ] @@ -5366,7 +5378,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.5", + "rand", "rustc-hex", "static_assertions", ] @@ -5405,7 +5417,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" -version = "3.0.0" +version = "12.0.0" dependencies = [ "parity-scale-codec", ] @@ -5448,7 +5460,6 @@ dependencies = [ "pallet-examples", "parity-scale-codec", "scale-info", - "simple-mermaid", "sp-api", "sp-arithmetic", "sp-block-builder", @@ -5460,14 +5471,14 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-transaction-pool", "sp-version", ] [[package]] name = "frame-benchmarking" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "array-bytes 6.1.0", "frame-support", @@ -5486,20 +5497,20 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-runtime-interface 17.0.0", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-runtime-interface 24.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "static_assertions", ] [[package]] name = "frame-benchmarking-cli" -version = "4.0.0-dev" +version = "32.0.0" dependencies = [ "Inflector", "array-bytes 6.1.0", "chrono", - "clap 4.4.18", + "clap 4.5.1", "comfy-table", "frame-benchmarking", "frame-support", @@ -5511,7 +5522,7 @@ dependencies = [ "linked-hash-map", "log", "parity-scale-codec", - "rand 0.8.5", + "rand", "rand_pcg", "sc-block-builder", "sc-cli", @@ -5526,22 +5537,22 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-database", - "sp-externalities 0.19.0", + "sp-externalities 0.25.0", "sp-inherents", "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-storage 13.0.0", + "sp-storage 19.0.0", "sp-trie", - "sp-wasm-interface 14.0.0", + "sp-wasm-interface 20.0.0", "thiserror", "thousands", ] [[package]] name = "frame-benchmarking-pallet-pov" -version = "4.0.0-dev" +version = "18.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -5550,54 +5561,54 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "frame-election-provider-solution-type" -version = "4.0.0-dev" +version = "13.0.0" dependencies = [ "frame-election-provider-support", "frame-support", "parity-scale-codec", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", "scale-info", "sp-arithmetic", - "syn 2.0.48", + "syn 2.0.50", "trybuild", ] [[package]] name = "frame-election-provider-support" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-election-provider-solution-type", "frame-support", "frame-system", "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "frame-election-solution-type-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "frame-election-provider-solution-type", "frame-election-provider-support", "frame-support", "honggfuzz", "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", "sp-arithmetic", "sp-npos-elections", @@ -5606,7 +5617,7 @@ dependencies = [ [[package]] name = "frame-executive" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "array-bytes 6.1.0", "frame-support", @@ -5621,8 +5632,8 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "sp-version", ] @@ -5640,7 +5651,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" -version = "0.10.0-dev" +version = "0.35.0" dependencies = [ "futures", "indicatif", @@ -5649,10 +5660,11 @@ dependencies = [ "parity-scale-codec", "serde", "sp-core", + "sp-crypto-hashing", "sp-io", "sp-runtime", "sp-state-machine", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "spinners", "substrate-rpc-client", "tokio", @@ -5661,7 +5673,7 @@ dependencies = [ [[package]] name = "frame-support" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "aquamarine", "array-bytes 6.1.0", @@ -5686,8 +5698,9 @@ dependencies = [ "sp-api", "sp-arithmetic", "sp-core", - "sp-core-hashing-proc-macro", - "sp-debug-derive 8.0.0", + "sp-crypto-hashing", + "sp-crypto-hashing-proc-macro", + "sp-debug-derive 14.0.0", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -5695,8 +5708,8 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "sp-weights", "static_assertions", "tt-call", @@ -5704,7 +5717,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "4.0.0-dev" +version = "23.0.0" dependencies = [ "Inflector", "cfg-expr", @@ -5717,28 +5730,28 @@ dependencies = [ "proc-macro2", "quote", "regex", - "sp-core-hashing", - "syn 2.0.48", + "sp-crypto-hashing", + "syn 2.0.50", ] [[package]] name = "frame-support-procedural-tools" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "frame-support-procedural-tools-derive" -version = "3.0.0" +version = "11.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -5763,7 +5776,7 @@ dependencies = [ "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-version", "static_assertions", "trybuild", @@ -5805,7 +5818,7 @@ dependencies = [ [[package]] name = "frame-system" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "cfg-if", "criterion 0.4.0", @@ -5816,10 +5829,10 @@ dependencies = [ "scale-info", "serde", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities 0.25.0", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-version", "sp-weights", "substrate-test-runtime-client", @@ -5827,7 +5840,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -5835,16 +5848,16 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities 0.25.0", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-version", ] [[package]] name = "frame-system-rpc-runtime-api" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "parity-scale-codec", "sp-api", @@ -5852,13 +5865,13 @@ dependencies = [ [[package]] name = "frame-try-runtime" -version = "0.10.0-dev" +version = "0.34.0" dependencies = [ "frame-support", "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] @@ -5901,9 +5914,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -5932,9 +5945,9 @@ checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -5971,7 +5984,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -6032,7 +6045,7 @@ dependencies = [ [[package]] name = "generate-bags" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "chrono", "frame-election-provider-support", @@ -6101,7 +6114,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ - "rand 0.8.5", + "rand", "rand_core 0.6.4", ] @@ -6152,22 +6165,9 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "globset" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" -dependencies = [ - "aho-corasick", - "bstr", - "fnv", - "log", - "regex", -] - [[package]] name = "glutton-westend-runtime" -version = "1.0.0" +version = "3.0.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -6199,8 +6199,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -6208,6 +6208,25 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-parachains-constants", +] + +[[package]] +name = "governor" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "821239e5672ff23e2a7060901fa622950bbd80b649cdaadd78d1c1767ed14eb4" +dependencies = [ + "cfg-if", + "dashmap", + "futures", + "futures-timer", + "no-std-compat", + "nonzero_ext", + "parking_lot 0.12.1", + "quanta", + "rand", + "smallvec", ] [[package]] @@ -6218,14 +6237,14 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core 0.6.4", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] name = "h2" -version = "0.3.21" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -6233,7 +6252,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 1.9.3", + "indexmap 2.2.3", "slab", "tokio", "tokio-util", @@ -6281,7 +6300,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.8", ] [[package]] @@ -6290,7 +6309,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.8", ] [[package]] @@ -6299,7 +6318,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.8", "allocator-api2", "serde", ] @@ -6371,7 +6390,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "crypto-mac 0.11.1", + "crypto-mac 0.11.0", "digest 0.9.0", ] @@ -6403,7 +6422,7 @@ checksum = "848e9c511092e0daa0a35a63e8e6e475a3e8f870741448b9f6028d69b142f18e" dependencies = [ "arbitrary", "lazy_static", - "memmap2", + "memmap2 0.5.10", "rustc_version 0.4.0", ] @@ -6499,10 +6518,9 @@ dependencies = [ "hyper", "log", "rustls 0.21.6", - "rustls-native-certs", + "rustls-native-certs 0.6.3", "tokio", - "tokio-rustls", - "webpki-roots 0.23.1", + "tokio-rustls 0.24.1", ] [[package]] @@ -6665,9 +6683,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -6681,9 +6699,9 @@ checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" [[package]] name = "indicatif" -version = "0.17.6" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730" +checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" dependencies = [ "console", "instant", @@ -6828,22 +6846,11 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "078e285eafdfb6c4b434e0d31e8cfcb5115b651496faca5749b88fafd4f23bfd" -[[package]] -name = "json-patch" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f54898088ccb91df1b492cc80029a6fdf1c48ca0db7c6822a8babad69c94658" -dependencies = [ - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "jsonrpsee" -version = "0.16.3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" +checksum = "4a95f7cc23d5fab0cdeeaf6bad8c8f5e7a3aa7f0d211957ea78232b327ab27b0" dependencies = [ "jsonrpsee-core", "jsonrpsee-http-client", @@ -6851,85 +6858,85 @@ dependencies = [ "jsonrpsee-server", "jsonrpsee-types", "jsonrpsee-ws-client", + "tokio", "tracing", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.16.3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" +checksum = "6b1736cfa3845fd9f8f43751f2b8e0e83f7b6081e754502f7d63b6587692cc83" dependencies = [ "futures-util", "http", "jsonrpsee-core", - "jsonrpsee-types", "pin-project", - "rustls-native-certs", + "rustls-native-certs 0.7.0", + "rustls-pki-types", "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.25.0", "tokio-util", "tracing", - "webpki-roots 0.25.2", + "url", ] [[package]] name = "jsonrpsee-core" -version = "0.16.3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" +checksum = "82030d038658974732103e623ba2e0abec03bbbe175b39c0a2fafbada60c5868" dependencies = [ "anyhow", - "arrayvec 0.7.4", - "async-lock", + "async-lock 3.3.0", "async-trait", "beef", - "futures-channel", "futures-timer", "futures-util", - "globset", "hyper", "jsonrpsee-types", "parking_lot 0.12.1", - "rand 0.8.5", + "pin-project", + "rand", "rustc-hash", "serde", "serde_json", - "soketto", "thiserror", "tokio", + "tokio-stream", "tracing", ] [[package]] name = "jsonrpsee-http-client" -version = "0.16.3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" +checksum = "36a06ef0de060005fddf772d54597bb6a8b0413da47dcffd304b0306147b9678" dependencies = [ "async-trait", "hyper", "hyper-rustls", "jsonrpsee-core", "jsonrpsee-types", - "rustc-hash", "serde", "serde_json", "thiserror", "tokio", + "tower", "tracing", + "url", ] [[package]] name = "jsonrpsee-proc-macros" -version = "0.16.3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" +checksum = "69fc56131589f82e57805f7338b87023db4aafef813555708b159787e34ad6bc" dependencies = [ "heck", - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", "syn 1.0.109", @@ -6937,19 +6944,21 @@ dependencies = [ [[package]] name = "jsonrpsee-server" -version = "0.16.3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4d945a6008c9b03db3354fb3c83ee02d2faa9f2e755ec1dfb69c3551b8f4ba" +checksum = "d85be77fe5b2a94589e3164fb780017f7aff7d646b49278c0d0346af16975c8e" dependencies = [ - "futures-channel", "futures-util", "http", "hyper", "jsonrpsee-core", "jsonrpsee-types", + "pin-project", + "route-recognizer", "serde", "serde_json", "soketto", + "thiserror", "tokio", "tokio-stream", "tokio-util", @@ -6959,28 +6968,28 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.16.3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" +checksum = "9a48fdc1202eafc51c63e00406575e59493284ace8b8b61aa16f3a6db5d64f1a" dependencies = [ "anyhow", "beef", "serde", "serde_json", "thiserror", - "tracing", ] [[package]] name = "jsonrpsee-ws-client" -version = "0.16.3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" +checksum = "c5ce25d70a8e4d3cc574bbc3cad0137c326ad64b194793d5e7bbdd3fa4504181" dependencies = [ "http", "jsonrpsee-client-transport", "jsonrpsee-core", "jsonrpsee-types", + "url", ] [[package]] @@ -7084,6 +7093,7 @@ dependencies = [ "pallet-nomination-pools-runtime-api", "pallet-offences", "pallet-offences-benchmarking", + "pallet-parameters", "pallet-preimage", "pallet-proxy", "pallet-ranked-collective", @@ -7135,8 +7145,8 @@ dependencies = [ "sp-session", "sp-staking", "sp-statement-store", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "static_assertions", @@ -7216,9 +7226,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.149" +version = "0.2.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libflate" @@ -7344,7 +7354,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "quick-protobuf", - "rand 0.8.5", + "rand", "rw-stream-sink", "smallvec", "thiserror", @@ -7400,7 +7410,7 @@ dependencies = [ "multiaddr", "multihash 0.17.0", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.7", "thiserror", "zeroize", @@ -7425,7 +7435,7 @@ dependencies = [ "libp2p-swarm", "log", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.7", "smallvec", "thiserror", @@ -7447,7 +7457,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm", "log", - "rand 0.8.5", + "rand", "smallvec", "socket2 0.4.9", "tokio", @@ -7483,7 +7493,7 @@ dependencies = [ "log", "once_cell", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.7", "snow", "static_assertions", @@ -7505,7 +7515,7 @@ dependencies = [ "libp2p-core", "libp2p-swarm", "log", - "rand 0.8.5", + "rand", "void", ] @@ -7525,7 +7535,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "quinn-proto", - "rand 0.8.5", + "rand", "rustls 0.20.8", "thiserror", "tokio", @@ -7543,7 +7553,7 @@ dependencies = [ "libp2p-core", "libp2p-identity", "libp2p-swarm", - "rand 0.8.5", + "rand", "smallvec", ] @@ -7562,7 +7572,7 @@ dependencies = [ "libp2p-identity", "libp2p-swarm-derive", "log", - "rand 0.8.5", + "rand", "smallvec", "tokio", "void", @@ -7688,7 +7698,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand 0.8.5", + "rand", "serde", "sha2 0.9.9", "typenum", @@ -7702,7 +7712,7 @@ checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" dependencies = [ "crunchy", "digest 0.9.0", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] @@ -7897,6 +7907,15 @@ dependencies = [ "libc", ] +[[package]] +name = "mach2" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" +dependencies = [ + "libc", +] + [[package]] name = "macro_magic" version = "0.5.0" @@ -7906,7 +7925,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -7920,7 +7939,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -7931,7 +7950,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -7942,7 +7961,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -7966,6 +7985,15 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "matches" version = "0.1.10" @@ -8006,6 +8034,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.7.1" @@ -8073,24 +8110,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532" dependencies = [ "futures", - "rand 0.8.5", + "rand", "thrift", ] -[[package]] -name = "milagro_bls" -version = "1.5.0" -source = "git+https://github.com/snowfork/milagro_bls?rev=a6d66e4eb89015e352fb1c9f7b661ecdbb5b2176#a6d66e4eb89015e352fb1c9f7b661ecdbb5b2176" -dependencies = [ - "amcl", - "hex", - "lazy_static", - "parity-scale-codec", - "rand 0.8.5", - "scale-info", - "zeroize", -] - [[package]] name = "mime" version = "0.3.17" @@ -8107,7 +8130,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" name = "minimal-node" version = "4.0.0-dev" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "frame", "futures", "futures-timer", @@ -8186,23 +8209,23 @@ dependencies = [ "bitflags 1.3.2", "blake2 0.10.6", "c2-chacha", - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.2", "either", "hashlink", "lioness", "log", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "rand_distr", - "subtle 2.4.1", + "subtle 2.5.0", "thiserror", "zeroize", ] [[package]] name = "mmr-gadget" -version = "4.0.0-dev" +version = "29.0.0" dependencies = [ "futures", "log", @@ -8218,16 +8241,15 @@ dependencies = [ "sp-core", "sp-mmr-primitives", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "substrate-test-runtime-client", "tokio", ] [[package]] name = "mmr-rpc" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ - "anyhow", "jsonrpsee", "parity-scale-codec", "serde", @@ -8449,7 +8471,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" dependencies = [ "clap 3.2.25", - "rand 0.8.5", + "rand", ] [[package]] @@ -8560,6 +8582,12 @@ dependencies = [ "libc", ] +[[package]] +name = "no-std-compat" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" + [[package]] name = "no-std-net" version = "0.6.0" @@ -8571,7 +8599,7 @@ name = "node-bench" version = "0.9.0-dev" dependencies = [ "array-bytes 6.1.0", - "clap 4.4.18", + "clap 4.5.1", "derive_more", "fs_extra", "futures", @@ -8584,7 +8612,7 @@ dependencies = [ "node-primitives", "node-testing", "parity-db", - "rand 0.8.5", + "rand", "sc-basic-authorship", "sc-client-api", "sc-transaction-pool", @@ -8597,7 +8625,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-timestamp", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "sp-trie", "tempfile", ] @@ -8648,7 +8676,7 @@ dependencies = [ name = "node-runtime-generate-bags" version = "3.0.0" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "generate-bags", "kitchensink-runtime", ] @@ -8657,7 +8685,7 @@ dependencies = [ name = "node-template" version = "4.0.0-dev" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", @@ -8701,14 +8729,14 @@ dependencies = [ name = "node-template-release" version = "3.0.0" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "flate2", "fs_extra", "glob", "itertools 0.10.5", "tar", "tempfile", - "toml_edit 0.19.14", + "toml_edit 0.19.15", ] [[package]] @@ -8743,8 +8771,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -8777,6 +8805,7 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", + "sp-crypto-hashing", "sp-inherents", "sp-io", "sp-keyring", @@ -8809,12 +8838,28 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "nonzero_ext" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" + [[package]] name = "normalize-line-endings" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num" version = "0.4.1" @@ -8950,9 +8995,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "oorandom" @@ -8986,9 +9031,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orchestra" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46d78e1deb2a8d54fc1f063a544130db4da31dfe4d5d3b493186424910222a76" +checksum = "2356622ffdfe72362a45a1e5e87bb113b8327e596e39b91f11f0ef4395c8da79" dependencies = [ "async-trait", "dyn-clonable", @@ -9003,12 +9048,12 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d035b1f968d91a826f2e34a9d6d02cb2af5aa7ca39ebd27922d850ab4b2dd2c6" +checksum = "eedb646674596266dc9bb2b5c7eea7c36b32ecc7777eba0d510196972d72c4fd" dependencies = [ "expander 2.0.0", - "indexmap 2.0.0", + "indexmap 2.2.3", "itertools 0.11.0", "petgraph", "proc-macro-crate 1.3.1", @@ -9026,22 +9071,18 @@ dependencies = [ "num-traits", ] -[[package]] -name = "os_pipe" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ae859aa07428ca9a929b936690f8b12dc5f11dd8c6992a18ca93919f28bc177" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "os_str_bytes" version = "6.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "owo-colors" version = "3.5.0" @@ -9050,7 +9091,7 @@ checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" [[package]] name = "pallet-alliance" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "array-bytes 6.1.0", "frame-benchmarking", @@ -9063,15 +9104,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core", - "sp-core-hashing", + "sp-crypto-hashing", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-asset-conversion" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9086,12 +9127,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-asset-conversion-tx-payment" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ "frame-support", "frame-system", @@ -9104,13 +9145,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", ] [[package]] name = "pallet-asset-rate" -version = "4.0.0-dev" +version = "7.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9121,12 +9162,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-asset-tx-payment" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9142,13 +9183,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", ] [[package]] name = "pallet-assets" -version = "4.0.0-dev" +version = "29.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9160,12 +9201,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-atomic-swap" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-support", "frame-system", @@ -9175,12 +9216,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-aura" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "frame-support", "frame-system", @@ -9193,12 +9234,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-authority-discovery" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-support", "frame-system", @@ -9210,12 +9251,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-authorship" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-support", "frame-system", @@ -9225,12 +9266,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-babe" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9253,12 +9294,12 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-bags-list" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "aquamarine", "docify", @@ -9273,8 +9314,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", ] [[package]] @@ -9284,7 +9325,7 @@ dependencies = [ "frame-election-provider-support", "honggfuzz", "pallet-bags-list", - "rand 0.8.5", + "rand", ] [[package]] @@ -9300,15 +9341,16 @@ dependencies = [ "pallet-staking", "sp-core", "sp-runtime", - "sp-std 8.0.0", - "sp-storage 13.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-tracing 16.0.0", ] [[package]] name = "pallet-balances" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -9320,12 +9362,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-beefy" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-election-provider-support", "frame-support", @@ -9348,12 +9390,12 @@ dependencies = [ "sp-session", "sp-staking", "sp-state-machine", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-beefy-mmr" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "array-bytes 6.1.0", "binary-merkle-tree", @@ -9373,12 +9415,12 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-bounties" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9391,12 +9433,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-bridge-grandpa" -version = "0.1.0" +version = "0.7.0" dependencies = [ "bp-header-chain", "bp-runtime", @@ -9412,13 +9454,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-trie", ] [[package]] name = "pallet-bridge-messages" -version = "0.1.0" +version = "0.7.0" dependencies = [ "bp-messages", "bp-runtime", @@ -9433,12 +9475,12 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-bridge-parachains" -version = "0.1.0" +version = "0.7.0" dependencies = [ "bp-header-chain", "bp-parachains", @@ -9455,13 +9497,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-trie", ] [[package]] name = "pallet-bridge-relayers" -version = "0.1.0" +version = "0.7.0" dependencies = [ "bp-messages", "bp-relayers", @@ -9477,12 +9519,12 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-broker" -version = "0.1.0" +version = "0.6.0" dependencies = [ "bitvec", "frame-benchmarking", @@ -9494,12 +9536,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-child-bounties" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9513,12 +9555,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-collator-selection" -version = "3.0.0" +version = "9.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9530,20 +9572,20 @@ dependencies = [ "pallet-session", "pallet-timestamp", "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", "sp-consensus-aura", "sp-core", "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", ] [[package]] name = "pallet-collective" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9554,12 +9596,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-collective-content" -version = "0.1.0" +version = "0.6.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9569,12 +9611,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-contracts" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -9598,7 +9640,7 @@ dependencies = [ "pallet-utility", "parity-scale-codec", "pretty_assertions", - "rand 0.8.5", + "rand", "rand_pcg", "scale-info", "serde", @@ -9608,11 +9650,11 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "staging-xcm", "staging-xcm-builder", - "wasm-instrument 0.4.0", + "wasm-instrument", "wasmi", "wat", ] @@ -9624,7 +9666,7 @@ dependencies = [ "anyhow", "frame-system", "parity-wasm", - "polkavm-linker", + "polkavm-linker 0.5.0", "sp-runtime", "tempfile", "toml 0.8.8", @@ -9634,7 +9676,7 @@ dependencies = [ [[package]] name = "pallet-contracts-mock-network" -version = "1.0.0" +version = "3.0.0" dependencies = [ "assert_matches", "frame-support", @@ -9662,8 +9704,8 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -9672,27 +9714,27 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" -version = "4.0.0-dev" +version = "18.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "pallet-contracts-uapi" -version = "4.0.0-dev" +version = "5.0.0" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", "paste", - "polkavm-derive", + "polkavm-derive 0.5.0", "scale-info", ] [[package]] name = "pallet-conviction-voting" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "assert_matches", "frame-benchmarking", @@ -9706,29 +9748,30 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-core-fellowship" -version = "4.0.0-dev" +version = "12.0.0" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", + "pallet-ranked-collective", "parity-scale-codec", "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-default-config-example" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ "frame-support", "frame-system", @@ -9737,12 +9780,12 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-democracy" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9757,12 +9800,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-dev-mode" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ "frame-support", "frame-system", @@ -9773,7 +9816,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] @@ -9787,6 +9830,7 @@ dependencies = [ "pallet-bags-list", "pallet-balances", "pallet-election-provider-multi-phase", + "pallet-nomination-pools", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -9798,13 +9842,13 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", ] [[package]] name = "pallet-election-provider-multi-phase" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9815,21 +9859,21 @@ dependencies = [ "pallet-election-provider-support-benchmarking", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", - "strum", + "sp-std 14.0.0", + "sp-tracing 16.0.0", + "strum 0.24.1", ] [[package]] name = "pallet-election-provider-support-benchmarking" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9837,12 +9881,12 @@ dependencies = [ "parity-scale-codec", "sp-npos-elections", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-elections-phragmen" -version = "5.0.0-dev" +version = "29.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9856,14 +9900,14 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "substrate-test-utils", ] [[package]] name = "pallet-example-basic" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9875,7 +9919,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] @@ -9901,12 +9945,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-example-offchain-worker" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-support", "frame-system", @@ -9918,32 +9962,12 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std 8.0.0", -] - -[[package]] -name = "pallet-example-single-block-migrations" -version = "0.0.1" -dependencies = [ - "docify", - "frame-executive", - "frame-support", - "frame-system", - "frame-try-runtime", - "log", - "pallet-balances", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0", - "sp-version", + "sp-std 14.0.0", ] [[package]] name = "pallet-example-split" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9953,12 +9977,12 @@ dependencies = [ "scale-info", "sp-core", "sp-io", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-example-tasks" -version = "1.0.0-dev" +version = "1.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9969,7 +9993,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] @@ -9982,14 +10006,13 @@ dependencies = [ "pallet-example-frame-crate", "pallet-example-kitchensink", "pallet-example-offchain-worker", - "pallet-example-single-block-migrations", "pallet-example-split", "pallet-example-tasks", ] [[package]] name = "pallet-fast-unstake" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -10007,14 +10030,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "substrate-test-utils", ] [[package]] name = "pallet-glutton" -version = "4.0.0-dev" +version = "14.0.0" dependencies = [ "blake2 0.10.6", "frame-benchmarking", @@ -10027,12 +10050,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-grandpa" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "finality-grandpa", "frame-benchmarking", @@ -10057,12 +10080,12 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-identity" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "enumflags2", "frame-benchmarking", @@ -10076,12 +10099,12 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-im-online" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10096,12 +10119,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-indices" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10113,12 +10136,12 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-insecure-randomness-collective-flip" -version = "4.0.0-dev" +version = "16.0.0" dependencies = [ "frame-support", "frame-system", @@ -10128,12 +10151,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-lottery" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10145,12 +10168,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-membership" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10161,12 +10184,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-message-queue" -version = "7.0.0-dev" +version = "31.0.0" dependencies = [ "environmental", "frame-benchmarking", @@ -10174,22 +10197,23 @@ dependencies = [ "frame-system", "log", "parity-scale-codec", - "rand 0.8.5", + "rand", "rand_distr", "scale-info", "serde", "sp-arithmetic", "sp-core", + "sp-crypto-hashing", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "sp-weights", ] [[package]] name = "pallet-mixnet" -version = "0.1.0-dev" +version = "0.4.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10203,12 +10227,12 @@ dependencies = [ "sp-io", "sp-mixnet", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-mmr" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "array-bytes 6.1.0", "env_logger 0.9.3", @@ -10223,12 +10247,12 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-multisig" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10239,12 +10263,12 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-nft-fractionalization" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10258,12 +10282,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-nfts" -version = "4.0.0-dev" +version = "22.0.0" dependencies = [ "enumflags2", "frame-benchmarking", @@ -10277,37 +10301,22 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-nfts-runtime-api" -version = "4.0.0-dev" +version = "14.0.0" dependencies = [ "pallet-nfts", "parity-scale-codec", "sp-api", - "sp-std 8.0.0", -] - -[[package]] -name = "pallet-nicks" -version = "4.0.0-dev" -dependencies = [ - "frame-support", - "frame-system", - "pallet-balances", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-nis" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10319,12 +10328,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-node-authorization" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-support", "frame-system", @@ -10334,12 +10343,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-nomination-pools" -version = "1.0.0" +version = "25.0.0" dependencies = [ "frame-support", "frame-system", @@ -10351,13 +10360,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", ] [[package]] name = "pallet-nomination-pools-benchmarking" -version = "1.0.0" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -10374,9 +10383,9 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface 17.0.0", + "sp-runtime-interface 24.0.0", "sp-staking", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] @@ -10388,20 +10397,20 @@ dependencies = [ "honggfuzz", "log", "pallet-nomination-pools", - "rand 0.8.5", + "rand", "sp-io", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", ] [[package]] name = "pallet-nomination-pools-runtime-api" -version = "1.0.0-dev" +version = "23.0.0" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", "sp-api", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] @@ -10424,13 +10433,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", ] [[package]] name = "pallet-offences" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "frame-support", "frame-system", @@ -10443,12 +10452,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-offences-benchmarking" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -10470,12 +10479,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-paged-list" -version = "0.1.0" +version = "0.6.0" dependencies = [ "docify", "frame-benchmarking", @@ -10487,7 +10496,7 @@ dependencies = [ "sp-io", "sp-metadata-ir", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] @@ -10503,7 +10512,7 @@ dependencies = [ [[package]] name = "pallet-parachain-template" -version = "0.1.0" +version = "0.7.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10516,9 +10525,29 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "pallet-parameters" +version = "0.0.1" +dependencies = [ + "docify", + "frame-benchmarking", + "frame-support", + "frame-system", + "pallet-balances", + "pallet-example-basic", + "parity-scale-codec", + "paste", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0", +] + [[package]] name = "pallet-preimage" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10530,12 +10559,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-proxy" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10547,16 +10576,17 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-ranked-collective" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "parity-scale-codec", "scale-info", @@ -10564,12 +10594,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-recovery" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10580,12 +10610,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-referenda" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "assert_matches", "frame-benchmarking", @@ -10602,12 +10632,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-remark" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10618,12 +10648,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-root-offences" -version = "1.0.0-dev" +version = "25.0.0" dependencies = [ "frame-election-provider-support", "frame-support", @@ -10639,12 +10669,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-root-testing" -version = "1.0.0-dev" +version = "4.0.0" dependencies = [ "frame-support", "frame-system", @@ -10653,12 +10683,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-safe-mode" -version = "4.0.0-dev" +version = "9.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -10673,24 +10703,25 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-salary" -version = "4.0.0-dev" +version = "13.0.0" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", + "pallet-ranked-collective", "parity-scale-codec", "scale-info", "sp-arithmetic", "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] @@ -10706,14 +10737,15 @@ dependencies = [ "scale-info", "sp-consensus-sassafras", "sp-core", + "sp-crypto-hashing", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-scheduler" -version = "4.0.0-dev" +version = "29.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -10726,14 +10758,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-weights", "substrate-test-utils", ] [[package]] name = "pallet-scored-pool" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-support", "frame-system", @@ -10743,12 +10775,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-session" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-support", "frame-system", @@ -10763,13 +10795,13 @@ dependencies = [ "sp-session", "sp-staking", "sp-state-machine", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-trie", ] [[package]] name = "pallet-session-benchmarking" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -10781,30 +10813,30 @@ dependencies = [ "pallet-staking-reward-curve", "pallet-timestamp", "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", "sp-core", "sp-io", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-skip-feeless-payment" -version = "1.0.0-dev" +version = "3.0.0" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-society" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10817,14 +10849,15 @@ dependencies = [ "scale-info", "sp-arithmetic", "sp-core", + "sp-crypto-hashing", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-staking" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -10847,25 +10880,25 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "substrate-test-utils", ] [[package]] name = "pallet-staking-reward-curve" -version = "4.0.0-dev" +version = "11.0.0" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", "sp-runtime", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "pallet-staking-reward-fn" -version = "4.0.0-dev" +version = "19.0.0" dependencies = [ "log", "sp-arithmetic", @@ -10873,7 +10906,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" -version = "4.0.0-dev" +version = "14.0.0" dependencies = [ "parity-scale-codec", "sp-api", @@ -10882,7 +10915,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" -version = "4.0.0-dev" +version = "29.0.0" dependencies = [ "frame-benchmarking", "frame-remote-externalities", @@ -10897,8 +10930,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "substrate-state-trie-migration-rpc", "thousands", "tokio", @@ -10907,7 +10940,7 @@ dependencies = [ [[package]] name = "pallet-statement" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ "frame-support", "frame-system", @@ -10920,12 +10953,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-statement-store", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-sudo" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -10936,7 +10969,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] @@ -10951,12 +10984,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-timestamp" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -10969,14 +11002,14 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-timestamp", ] [[package]] name = "pallet-tips" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10990,13 +11023,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", ] [[package]] name = "pallet-transaction-payment" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-support", "frame-system", @@ -11008,12 +11041,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-transaction-payment-rpc" -version = "4.0.0-dev" +version = "30.0.0" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -11028,7 +11061,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -11039,7 +11072,7 @@ dependencies = [ [[package]] name = "pallet-transaction-storage" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "array-bytes 6.1.0", "frame-benchmarking", @@ -11054,13 +11087,13 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-transaction-storage-proof", ] [[package]] name = "pallet-treasury" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -11075,12 +11108,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-tx-pause" -version = "4.0.0-dev" +version = "9.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -11094,12 +11127,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-uniques" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11111,12 +11144,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-utility" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11130,12 +11163,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-vesting" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11147,12 +11180,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-whitelist" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11165,12 +11198,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "pallet-xcm" -version = "1.0.0" +version = "7.0.0" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -11187,7 +11220,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -11195,7 +11228,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "1.0.0" +version = "7.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11211,8 +11244,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -11220,7 +11253,7 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub" -version = "0.1.0" +version = "0.2.0" dependencies = [ "bp-header-chain", "bp-messages", @@ -11237,7 +11270,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -11245,7 +11278,7 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub-router" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-xcm-bridge-hub-router", "frame-benchmarking", @@ -11257,7 +11290,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", ] @@ -11266,7 +11299,7 @@ dependencies = [ name = "parachain-template-node" version = "0.1.0" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "color-print", "cumulus-client-cli", "cumulus-client-collator", @@ -11322,15 +11355,15 @@ dependencies = [ [[package]] name = "parachain-template-runtime" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", + "cumulus-primitives-storage-weight-reclaim", "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", @@ -11368,7 +11401,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -11380,14 +11413,13 @@ dependencies = [ [[package]] name = "parachains-common" -version = "1.0.0" +version = "7.0.0" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", "frame-support", "frame-system", "log", - "num-traits", "pallet-asset-tx-payment", "pallet-assets", "pallet-authorship", @@ -11396,29 +11428,23 @@ dependencies = [ "pallet-message-queue", "pallet-xcm", "parity-scale-codec", - "polkadot-core-primitives", "polkadot-primitives", - "rococo-runtime-constants", "scale-info", - "smallvec", "sp-consensus-aura", "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-parachain-info", "staging-xcm", - "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "westend-runtime-constants", ] [[package]] name = "parachains-runtimes-test-utils" -version = "1.0.0" +version = "7.0.0" dependencies = [ - "assets-common", "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", @@ -11427,20 +11453,19 @@ dependencies = [ "frame-support", "frame-system", "hex-literal", - "pallet-assets", "pallet-balances", "pallet-collator-selection", "pallet-session", + "pallet-timestamp", "pallet-xcm", - "parachains-common", "parity-scale-codec", "polkadot-parachain-primitives", "sp-consensus-aura", "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-executor", @@ -11466,9 +11491,9 @@ dependencies = [ "libc", "log", "lz4", - "memmap2", + "memmap2 0.5.10", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "siphasher", "snap", ] @@ -11613,7 +11638,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "crypto-mac 0.11.1", + "crypto-mac 0.11.0", ] [[package]] @@ -11650,19 +11675,16 @@ dependencies = [ "parachains-common", "penpal-runtime", "rococo-emulated-chain", - "serde_json", "sp-core", - "sp-runtime", "westend-emulated-chain", ] [[package]] name = "penpal-runtime" -version = "0.9.27" +version = "0.14.0" dependencies = [ "assets-common", "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", @@ -11707,8 +11729,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -11716,6 +11738,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-parachains-constants", ] [[package]] @@ -11727,31 +11750,23 @@ dependencies = [ "frame-support", "parachains-common", "people-rococo-runtime", - "rococo-emulated-chain", - "serde_json", "sp-core", - "sp-runtime", + "testnet-parachains-constants", ] [[package]] name = "people-rococo-integration-tests" version = "0.1.0" dependencies = [ - "assert_matches", "asset-test-utils", "emulated-integration-tests-common", "frame-support", - "pallet-asset-conversion", - "pallet-assets", "pallet-balances", "pallet-identity", "pallet-message-queue", - "pallet-xcm", "parachains-common", "parity-scale-codec", - "penpal-runtime", "people-rococo-runtime", - "polkadot-primitives", "polkadot-runtime-common", "rococo-runtime", "rococo-runtime-constants", @@ -11766,11 +11781,11 @@ name = "people-rococo-runtime" version = "0.1.0" dependencies = [ "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", "enumflags2", @@ -11799,13 +11814,11 @@ dependencies = [ "pallet-xcm-benchmarks", "parachains-common", "parity-scale-codec", - "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", "rococo-runtime-constants", "scale-info", "serde", - "smallvec", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -11815,8 +11828,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -11824,6 +11837,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-parachains-constants", ] [[package]] @@ -11835,31 +11849,23 @@ dependencies = [ "frame-support", "parachains-common", "people-westend-runtime", - "serde_json", "sp-core", - "sp-runtime", - "westend-emulated-chain", + "testnet-parachains-constants", ] [[package]] name = "people-westend-integration-tests" version = "0.1.0" dependencies = [ - "assert_matches", "asset-test-utils", "emulated-integration-tests-common", "frame-support", - "pallet-asset-conversion", - "pallet-assets", "pallet-balances", "pallet-identity", "pallet-message-queue", - "pallet-xcm", "parachains-common", "parity-scale-codec", - "penpal-runtime", "people-westend-runtime", - "polkadot-primitives", "polkadot-runtime-common", "sp-runtime", "staging-xcm", @@ -11874,11 +11880,11 @@ name = "people-westend-runtime" version = "0.1.0" dependencies = [ "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", "enumflags2", @@ -11907,12 +11913,10 @@ dependencies = [ "pallet-xcm-benchmarks", "parachains-common", "parity-scale-codec", - "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", "scale-info", "serde", - "smallvec", "sp-api", "sp-block-builder", "sp-consensus-aura", @@ -11922,8 +11926,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -11931,6 +11935,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-parachains-constants", "westend-runtime-constants", ] @@ -11970,7 +11975,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -11991,7 +11996,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.0.0", + "indexmap 2.2.3", ] [[package]] @@ -12011,7 +12016,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -12084,7 +12089,7 @@ dependencies = [ [[package]] name = "polkadot" -version = "1.6.0" +version = "6.0.0" dependencies = [ "assert_cmd", "color-eyre", @@ -12105,7 +12110,7 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "bitvec", @@ -12123,7 +12128,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-primitives-test-helpers", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "rand_core 0.6.4", "schnorrkel 0.11.4", @@ -12134,7 +12139,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "1.0.0" +version = "7.0.0" dependencies = [ "always-assert", "assert_matches", @@ -12149,7 +12154,7 @@ dependencies = [ "polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "sp-application-crypto", "sp-authority-discovery", @@ -12161,7 +12166,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "derive_more", @@ -12177,20 +12182,20 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-primitives-test-helpers", - "rand 0.8.5", + "rand", "sc-network", "schnellru", "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-availability-recovery" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "async-trait", @@ -12208,7 +12213,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-primitives-test-helpers", - "rand 0.8.5", + "rand", "sc-network", "schnellru", "sp-application-crypto", @@ -12221,10 +12226,10 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "1.1.0" +version = "7.0.0" dependencies = [ "cfg-if", - "clap 4.4.18", + "clap 4.5.1", "frame-benchmarking-cli", "futures", "log", @@ -12243,6 +12248,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-maybe-compressed-blob", + "sp-runtime", "substrate-build-script-utils", "thiserror", "try-runtime-cli", @@ -12250,7 +12256,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "bitvec", @@ -12280,18 +12286,18 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "1.0.0" +version = "7.0.0" dependencies = [ "parity-scale-codec", "scale-info", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "polkadot-dispute-distribution" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "async-channel", @@ -12300,7 +12306,7 @@ dependencies = [ "fatality", "futures", "futures-timer", - "indexmap 2.0.0", + "indexmap 2.2.3", "lazy_static", "parity-scale-codec", "polkadot-erasure-coding", @@ -12317,14 +12323,14 @@ dependencies = [ "sp-application-crypto", "sp-keyring", "sp-keystore", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-erasure-coding" -version = "1.0.0" +version = "7.0.0" dependencies = [ "criterion 0.4.0", "parity-scale-codec", @@ -12338,20 +12344,21 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "async-trait", "futures", "futures-timer", "lazy_static", + "parking_lot 0.12.1", "polkadot-node-network-protocol", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-util", "polkadot-primitives", "quickcheck", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "sc-network", "sc-network-common", @@ -12359,15 +12366,16 @@ dependencies = [ "sp-authority-discovery", "sp-consensus-babe", "sp-core", + "sp-crypto-hashing", "sp-keyring", "sp-keystore", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "tracing-gum", ] [[package]] name = "polkadot-network-bridge" -version = "1.0.0" +version = "7.0.0" dependencies = [ "always-assert", "assert_matches", @@ -12396,7 +12404,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "futures", @@ -12417,7 +12425,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "async-trait", @@ -12441,7 +12449,7 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "polkadot-primitives-test-helpers", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "rand_core 0.6.4", "sc-keystore", @@ -12461,7 +12469,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "bitvec", @@ -12491,7 +12499,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "bitvec", @@ -12505,19 +12513,21 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-statement-table", + "rstest", "sc-keystore", + "schnellru", "sp-application-crypto", "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-bitfield-signing" -version = "1.0.0" +version = "7.0.0" dependencies = [ "futures", "polkadot-node-subsystem", @@ -12533,7 +12543,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "async-trait", @@ -12558,7 +12568,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "1.0.0" +version = "7.0.0" dependencies = [ "futures", "maplit", @@ -12578,7 +12588,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "futures", @@ -12599,7 +12609,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "fatality", @@ -12620,14 +12630,14 @@ dependencies = [ "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-parachains-inherent" -version = "1.0.0" +version = "7.0.0" dependencies = [ "async-trait", "futures", @@ -12643,7 +12653,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-prospective-parachains" -version = "1.0.0" +version = "6.0.0" dependencies = [ "assert_matches", "bitvec", @@ -12668,7 +12678,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "1.0.0" +version = "7.0.0" dependencies = [ "bitvec", "fatality", @@ -12688,7 +12698,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "1.0.0" +version = "7.0.0" dependencies = [ "always-assert", "array-bytes 6.1.0", @@ -12714,14 +12724,14 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "procfs", - "rand 0.8.5", + "rand", "rococo-runtime", "rusty-fork", "sc-sysinfo", "slotmap", "sp-core", "sp-maybe-compressed-blob", - "sp-wasm-interface 14.0.0", + "sp-wasm-interface 20.0.0", "tempfile", "test-parachain-adder", "test-parachain-halt", @@ -12732,7 +12742,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" -version = "1.0.0" +version = "7.0.0" dependencies = [ "futures", "futures-timer", @@ -12755,7 +12765,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-common" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "cfg-if", @@ -12763,6 +12773,7 @@ dependencies = [ "futures", "landlock", "libc", + "nix 0.27.1", "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", @@ -12771,9 +12782,10 @@ dependencies = [ "sc-executor-wasmtime", "seccompiler", "sp-core", - "sp-externalities 0.19.0", + "sp-crypto-hashing", + "sp-externalities 0.25.0", "sp-io", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "tempfile", "thiserror", "tracing-gum", @@ -12781,12 +12793,12 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-execute-worker" -version = "1.0.0" +version = "7.0.0" dependencies = [ + "cfg-if", "cpu-time", "libc", "nix 0.27.1", - "os_pipe", "parity-scale-codec", "polkadot-node-core-pvf-common", "polkadot-parachain-primitives", @@ -12796,14 +12808,13 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-prepare-worker" -version = "1.0.0" +version = "7.0.0" dependencies = [ "blake3", "cfg-if", "criterion 0.4.0", "libc", "nix 0.27.1", - "os_pipe", "parity-scale-codec", "polkadot-node-core-pvf-common", "polkadot-primitives", @@ -12820,7 +12831,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "1.0.0" +version = "7.0.0" dependencies = [ "async-trait", "futures", @@ -12841,7 +12852,7 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "1.0.0" +version = "7.0.0" dependencies = [ "lazy_static", "log", @@ -12858,7 +12869,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_cmd", "bs58 0.5.0", @@ -12884,7 +12895,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "1.0.0" +version = "7.0.0" dependencies = [ "async-channel", "async-trait", @@ -12897,18 +12908,18 @@ dependencies = [ "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-primitives", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "sc-authority-discovery", "sc-network", - "strum", + "strum 0.24.1", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-primitives" -version = "1.0.0" +version = "7.0.0" dependencies = [ "bitvec", "bounded-vec", @@ -12931,7 +12942,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "1.0.0" +version = "7.0.0" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -12961,7 +12972,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "1.0.0" +version = "7.0.0" dependencies = [ "async-trait", "bitvec", @@ -12988,7 +12999,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "async-trait", @@ -13018,7 +13029,7 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "prioritized-metered-channel", - "rand 0.8.5", + "rand", "sc-client-api", "schnellru", "sp-application-crypto", @@ -13031,7 +13042,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "async-trait", @@ -13057,7 +13068,7 @@ dependencies = [ [[package]] name = "polkadot-parachain-bin" -version = "1.6.0" +version = "4.0.0" dependencies = [ "assert_cmd", "asset-hub-rococo-runtime", @@ -13065,7 +13076,7 @@ dependencies = [ "async-trait", "bridge-hub-rococo-runtime", "bridge-hub-westend-runtime", - "clap 4.4.18", + "clap 4.5.1", "collectives-westend-runtime", "color-print", "contracts-rococo-runtime", @@ -13136,9 +13147,9 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-timestamp", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "sp-transaction-pool", "sp-version", "staging-xcm", @@ -13147,13 +13158,14 @@ dependencies = [ "substrate-prometheus-endpoint", "substrate-state-trie-migration-rpc", "tempfile", + "testnet-parachains-constants", "tokio", "wait-timeout", ] [[package]] name = "polkadot-parachain-primitives" -version = "1.0.0" +version = "6.0.0" dependencies = [ "bounded-collections", "derive_more", @@ -13163,16 +13175,17 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-weights", ] [[package]] name = "polkadot-primitives" -version = "1.0.0" +version = "7.0.0" dependencies = [ "bitvec", "hex-literal", + "log", "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", @@ -13189,7 +13202,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] @@ -13197,7 +13210,7 @@ name = "polkadot-primitives-test-helpers" version = "1.0.0" dependencies = [ "polkadot-primitives", - "rand 0.8.5", + "rand", "sp-application-crypto", "sp-core", "sp-keyring", @@ -13206,7 +13219,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "1.0.0" +version = "7.0.0" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -13238,7 +13251,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "1.0.0" +version = "7.0.0" dependencies = [ "bitvec", "frame-benchmarking", @@ -13265,7 +13278,6 @@ dependencies = [ "pallet-transaction-payment", "pallet-treasury", "pallet-vesting", - "pallet-xcm-benchmarks", "parity-scale-codec", "polkadot-primitives", "polkadot-primitives-test-helpers", @@ -13286,7 +13298,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -13295,19 +13307,19 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "1.0.0" +version = "7.0.0" dependencies = [ "bs58 0.5.0", "frame-benchmarking", "parity-scale-codec", "polkadot-primitives", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", ] [[package]] name = "polkadot-runtime-parachains" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "bitflags 1.3.2", @@ -13337,8 +13349,9 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "polkadot-runtime-metrics", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", + "rstest", "rustc-hex", "sc-keystore", "scale-info", @@ -13348,6 +13361,7 @@ dependencies = [ "sp-application-crypto", "sp-arithmetic", "sp-core", + "sp-crypto-hashing", "sp-inherents", "sp-io", "sp-keyring", @@ -13355,8 +13369,8 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "staging-xcm", "staging-xcm-executor", "static_assertions", @@ -13371,15 +13385,20 @@ dependencies = [ "cumulus-pallet-parachain-system", "docify", "frame", - "frame-executive", - "frame-support", "frame-system", "kitchensink-runtime", "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collective", "pallet-default-config-example", - "pallet-example-single-block-migrations", + "pallet-democracy", "pallet-examples", + "pallet-multisig", + "pallet-proxy", "pallet-timestamp", + "pallet-transaction-payment", + "pallet-utility", "parity-scale-codec", "sc-cli", "sc-client-db", @@ -13399,17 +13418,17 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-version", "staging-chain-spec-builder", "staging-node-cli", "staging-parachain-info", + "staging-xcm", "subkey", "substrate-wasm-builder", ] [[package]] name = "polkadot-service" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "async-trait", @@ -13519,7 +13538,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage 13.0.0", + "sp-storage 19.0.0", "sp-timestamp", "sp-transaction-pool", "sp-version", @@ -13534,7 +13553,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "1.0.0" +version = "7.0.0" dependencies = [ "arrayvec 0.7.4", "assert_matches", @@ -13543,7 +13562,7 @@ dependencies = [ "fatality", "futures", "futures-timer", - "indexmap 2.0.0", + "indexmap 2.2.3", "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -13561,18 +13580,19 @@ dependencies = [ "sp-keyring", "sp-keystore", "sp-staking", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-statement-table" -version = "1.0.0" +version = "7.0.0" dependencies = [ "parity-scale-codec", "polkadot-primitives", "sp-core", + "tracing-gum", ] [[package]] @@ -13581,20 +13601,30 @@ version = "1.0.0" dependencies = [ "assert_matches", "async-trait", - "clap 4.4.18", + "bincode", + "bitvec", + "clap 4.5.1", "clap-num", "color-eyre", "colored", "env_logger 0.9.3", "futures", "futures-timer", + "hex", "itertools 0.11.0", + "kvdb-memorydb", "log", "orchestra", "parity-scale-codec", "paste", + "polkadot-approval-distribution", + "polkadot-availability-bitfield-distribution", + "polkadot-availability-distribution", "polkadot-availability-recovery", "polkadot-erasure-coding", + "polkadot-node-core-approval-voting", + "polkadot-node-core-av-store", + "polkadot-node-core-chain-api", "polkadot-node-metrics", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -13608,16 +13638,25 @@ dependencies = [ "prometheus", "pyroscope", "pyroscope_pprofrs", - "rand 0.8.5", + "rand", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "rand_distr", "sc-keystore", "sc-network", "sc-service", + "schnorrkel 0.9.1", "serde", "serde_yaml", + "sha1", "sp-application-crypto", + "sp-consensus", + "sp-consensus-babe", "sp-core", "sp-keyring", "sp-keystore", + "sp-runtime", + "sp-timestamp", "substrate-prometheus-endpoint", "tokio", "tracing-gum", @@ -13658,7 +13697,7 @@ version = "1.0.0" dependencies = [ "assert_matches", "async-trait", - "clap 4.4.18", + "clap 4.5.1", "color-eyre", "futures", "futures-timer", @@ -13676,7 +13715,7 @@ dependencies = [ "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-primitives", - "rand 0.8.5", + "rand", "sp-core", "sp-keystore", "substrate-build-script-utils", @@ -13737,7 +13776,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-transaction-pool", "sp-trie", "sp-version", @@ -13769,7 +13808,7 @@ dependencies = [ "polkadot-runtime-parachains", "polkadot-service", "polkadot-test-runtime", - "rand 0.8.5", + "rand", "sc-authority-discovery", "sc-chain-spec", "sc-cli", @@ -13803,9 +13842,9 @@ dependencies = [ [[package]] name = "polkadot-voter-bags" -version = "1.0.0" +version = "7.0.0" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "generate-bags", "sp-io", "westend-runtime", @@ -13813,36 +13852,67 @@ dependencies = [ [[package]] name = "polkavm-common" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fecd2caacfc4a7ee34243758dd7348859e6dec73f5e5df059890f5742ee46f0e" +checksum = "88b4e215c80fe876147f3d58158d5dfeae7dabdd6047e175af77095b78d0035c" [[package]] name = "polkavm-common" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c99f7eee94e7be43ba37eef65ad0ee8cbaf89b7c00001c3f6d2be985cb1817" + +[[package]] +name = "polkavm-derive" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88b4e215c80fe876147f3d58158d5dfeae7dabdd6047e175af77095b78d0035c" +checksum = "6380dbe1fb03ecc74ad55d841cfc75480222d153ba69ddcb00977866cbdabdb8" +dependencies = [ + "polkavm-derive-impl 0.5.0", + "syn 2.0.50", +] [[package]] name = "polkavm-derive" -version = "0.4.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db65a500d4adf574893c726ae365e37e4fbb7f2cbd403f6eaa1b665457456adc" +checksum = "79fa916f7962348bd1bb1a65a83401675e6fc86c51a0fdbcf92a3108e58e6125" dependencies = [ - "polkavm-derive-impl", - "syn 2.0.48", + "polkavm-derive-impl-macro", ] [[package]] name = "polkavm-derive-impl" -version = "0.4.0" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc8211b3365bbafb2fb32057d68b0e1ca55d079f5cf6f9da9b98079b94b3987d" +dependencies = [ + "polkavm-common 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.50", +] + +[[package]] +name = "polkavm-derive-impl" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c99f4e7a9ff434ef9c885b874c99d824c3a5693bf5e3e8569bb1d2245a8c1b7f" +checksum = "c10b2654a8a10a83c260bfb93e97b262cf0017494ab94a65d389e0eda6de6c9c" dependencies = [ - "polkavm-common 0.4.0", + "polkavm-common 0.8.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", +] + +[[package]] +name = "polkavm-derive-impl-macro" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e85319a0d5129dc9f021c62607e0804f5fb777a05cdda44d750ac0732def66" +dependencies = [ + "polkavm-derive-impl 0.8.0", + "syn 2.0.50", ] [[package]] @@ -13860,6 +13930,21 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "polkavm-linker" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdec1451cb18261d5d01de82acc15305e417fb59588cdcb3127d3dcc9672b925" +dependencies = [ + "gimli 0.28.0", + "hashbrown 0.14.3", + "log", + "object 0.32.2", + "polkavm-common 0.8.0", + "regalloc2 0.9.3", + "rustc-demangle", +] + [[package]] name = "polling" version = "2.8.0" @@ -13884,7 +13969,7 @@ checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" dependencies = [ "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.4.1", + "universal-hash 0.4.0", ] [[package]] @@ -13907,7 +13992,7 @@ dependencies = [ "cfg-if", "cpufeatures", "opaque-debug 0.3.0", - "universal-hash 0.4.1", + "universal-hash 0.4.0", ] [[package]] @@ -13934,7 +14019,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9" dependencies = [ - "rand 0.8.5", + "rand", ] [[package]] @@ -14032,7 +14117,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" dependencies = [ "proc-macro2", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -14052,9 +14137,9 @@ dependencies = [ [[package]] name = "prioritized-metered-channel" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e99f0c89bd88f393aab44a4ab949351f7bc7e7e1179d11ecbfe50cbe4c47e342" +checksum = "a172e6cc603231f2cf004232eabcecccc0da53ba576ab286ef7baa0cfc7927ad" dependencies = [ "coarsetime", "crossbeam-queue", @@ -14073,14 +14158,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit 0.19.14", + "toml_edit 0.19.15", ] [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "6b2685dd208a3771337d8d386a89840f0f43cd68be8dae90a5f8c2384effc9cd" dependencies = [ "toml_edit 0.21.0", ] @@ -14123,14 +14208,14 @@ checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" dependencies = [ "unicode-ident", ] @@ -14195,7 +14280,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -14221,7 +14306,7 @@ dependencies = [ "bitflags 2.4.0", "lazy_static", "num-traits", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "rand_xorshift", "regex-syntax 0.8.2", @@ -14237,7 +14322,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.11.9", +] + +[[package]] +name = "prost" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +dependencies = [ + "bytes", + "prost-derive 0.12.3", ] [[package]] @@ -14254,7 +14349,7 @@ dependencies = [ "multimap", "petgraph", "prettyplease 0.1.25", - "prost", + "prost 0.11.9", "prost-types", "regex", "syn 1.0.109", @@ -14275,13 +14370,26 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "prost-derive" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +dependencies = [ + "anyhow", + "itertools 0.11.0", + "proc-macro2", + "quote", + "syn 2.0.50", +] + [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost", + "prost 0.11.9", ] [[package]] @@ -14304,7 +14412,7 @@ dependencies = [ "libflate", "log", "names", - "prost", + "prost 0.11.9", "reqwest", "thiserror", "url", @@ -14323,6 +14431,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "quanta" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17e662a7a8291a865152364c20c7abc5e60486ab2001e8ec10b24862de0b9ab" +dependencies = [ + "crossbeam-utils", + "libc", + "mach2", + "once_cell", + "raw-cpuid", + "wasi 0.11.0+wasi-snapshot-preview1", + "web-sys", + "winapi", +] + [[package]] name = "quick-error" version = "1.2.3" @@ -14359,7 +14483,7 @@ checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" dependencies = [ "env_logger 0.8.4", "log", - "rand 0.8.5", + "rand", ] [[package]] @@ -14380,7 +14504,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c956be1b23f4261676aed05a0046e204e8a6836e50203902683a718af0797989" dependencies = [ "bytes", - "rand 0.8.5", + "rand", "ring 0.16.20", "rustc-hash", "rustls 0.20.8", @@ -14406,19 +14530,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -14475,16 +14586,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "rand", ] [[package]] @@ -14505,6 +14607,15 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "raw-cpuid" +version = "10.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "rawpointer" version = "0.2.1" @@ -14585,14 +14696,13 @@ dependencies = [ [[package]] name = "reed-solomon-novelpoly" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bd8f48b2066e9f69ab192797d66da804d1935bf22763204ed3675740cb0f221" +checksum = "87413ebb313323d431e85d0afc5a68222aaed972843537cbfe5f061cf1b4bcab" dependencies = [ "derive_more", "fs-err", - "itertools 0.10.5", - "static_init 0.5.2", + "static_init", "thiserror", ] @@ -14613,7 +14723,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -14691,16 +14801,22 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +[[package]] +name = "relative-path" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" + [[package]] name = "remote-ext-tests-bags-list" version = "1.0.0" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "frame-system", "log", "pallet-bags-list-remote-tests", "sp-core", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "tokio", "westend-runtime", "westend-runtime-constants", @@ -14730,12 +14846,12 @@ dependencies = [ "percent-encoding", "pin-project-lite 0.2.12", "rustls 0.21.6", - "rustls-pemfile", + "rustls-pemfile 1.0.3", "serde", "serde_json", "serde_urlencoded", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tower-service", "url", "wasm-bindgen", @@ -14762,13 +14878,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ "hmac 0.12.1", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] name = "ring" version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof#61e7b528bc0170d6bf541be32440d569b784425d" +source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" dependencies = [ "ark-ec", "ark-ff 0.4.2", @@ -14791,11 +14907,25 @@ dependencies = [ "libc", "once_cell", "spin 0.5.2", - "untrusted", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +dependencies = [ + "cc", + "getrandom 0.2.10", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + [[package]] name = "ripemd" version = "0.1.3" @@ -14836,26 +14966,22 @@ name = "rococo-emulated-chain" version = "0.0.0" dependencies = [ "emulated-integration-tests-common", - "pallet-im-online", "parachains-common", "polkadot-primitives", "rococo-runtime", "rococo-runtime-constants", "sc-consensus-grandpa", - "serde_json", "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", "sp-core", - "sp-runtime", ] [[package]] name = "rococo-parachain-runtime" -version = "0.1.0" +version = "0.6.0" dependencies = [ "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", @@ -14891,7 +15017,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -14899,11 +15025,12 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnet-parachains-constants", ] [[package]] name = "rococo-runtime" -version = "1.0.0" +version = "7.0.0" dependencies = [ "binary-merkle-tree", "frame-benchmarking", @@ -14989,9 +15116,9 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 8.0.0", - "sp-storage 13.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-tracing 16.0.0", "sp-transaction-pool", "sp-trie", "sp-version", @@ -15006,7 +15133,7 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "1.0.0" +version = "7.0.0" dependencies = [ "frame-support", "polkadot-primitives", @@ -15045,6 +15172,12 @@ dependencies = [ "westend-emulated-chain", ] +[[package]] +name = "route-recognizer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" + [[package]] name = "rpassword" version = "7.2.0" @@ -15056,6 +15189,35 @@ dependencies = [ "winapi", ] +[[package]] +name = "rstest" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" +dependencies = [ + "futures", + "futures-timer", + "rstest_macros", + "rustc_version 0.4.0", +] + +[[package]] +name = "rstest_macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" +dependencies = [ + "cfg-if", + "glob", + "proc-macro2", + "quote", + "regex", + "relative-path", + "rustc_version 0.4.0", + "syn 2.0.50", + "unicode-ident", +] + [[package]] name = "rtnetlink" version = "0.10.1" @@ -15097,7 +15259,7 @@ dependencies = [ "parity-scale-codec", "primitive-types", "proptest", - "rand 0.8.5", + "rand", "rlp", "ruint-macro", "serde", @@ -15230,6 +15392,20 @@ dependencies = [ "sct", ] +[[package]] +name = "rustls" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" +dependencies = [ + "log", + "ring 0.17.7", + "rustls-pki-types", + "rustls-webpki 0.102.2", + "subtle 2.5.0", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -15237,7 +15413,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.3", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-native-certs" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.0.0", + "rustls-pki-types", "schannel", "security-framework", ] @@ -15252,15 +15441,21 @@ dependencies = [ ] [[package]] -name = "rustls-webpki" -version = "0.100.2" +name = "rustls-pemfile" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" +checksum = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4" dependencies = [ - "ring 0.16.20", - "untrusted", + "base64 0.21.2", + "rustls-pki-types", ] +[[package]] +name = "rustls-pki-types" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a716eb65e3158e90e17cd93d855216e27bde02745ab842f2cab4a39dba1bacf" + [[package]] name = "rustls-webpki" version = "0.101.4" @@ -15268,7 +15463,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" dependencies = [ "ring 0.16.20", - "untrusted", + "untrusted 0.7.1", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +dependencies = [ + "ring 0.17.7", + "rustls-pki-types", + "untrusted 0.9.0", ] [[package]] @@ -15346,17 +15552,17 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "4.1.0-dev" +version = "23.0.0" dependencies = [ "log", "sp-core", - "sp-wasm-interface 14.0.0", + "sp-wasm-interface 20.0.0", "thiserror", ] [[package]] name = "sc-authority-discovery" -version = "0.10.0-dev" +version = "0.34.0" dependencies = [ "async-trait", "futures", @@ -15367,10 +15573,10 @@ dependencies = [ "multihash 0.18.1", "multihash-codetable", "parity-scale-codec", - "prost", + "prost 0.12.3", "prost-build", "quickcheck", - "rand 0.8.5", + "rand", "sc-client-api", "sc-network", "sp-api", @@ -15379,7 +15585,7 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -15387,7 +15593,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.10.0-dev" +version = "0.34.0" dependencies = [ "futures", "futures-timer", @@ -15412,7 +15618,7 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "parity-scale-codec", "sp-api", @@ -15428,12 +15634,12 @@ dependencies = [ [[package]] name = "sc-chain-spec" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "array-bytes 6.1.0", "docify", "log", - "memmap2", + "memmap2 0.9.3", "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", @@ -15446,6 +15652,7 @@ dependencies = [ "sp-blockchain", "sp-consensus-babe", "sp-core", + "sp-crypto-hashing", "sp-genesis-builder", "sp-io", "sp-keyring", @@ -15456,22 +15663,22 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" -version = "4.0.0-dev" +version = "11.0.0" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "sc-cli" -version = "0.10.0-dev" +version = "0.36.0" dependencies = [ "array-bytes 6.1.0", "bip39", "chrono", - "clap 4.4.18", + "clap 4.5.1", "fdlimit", "futures", "futures-timer", @@ -15480,7 +15687,7 @@ dependencies = [ "log", "names", "parity-scale-codec", - "rand 0.8.5", + "rand", "regex", "rpassword", "sc-client-api", @@ -15500,7 +15707,7 @@ dependencies = [ "sp-keystore", "sp-panic-handler", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "sp-version", "tempfile", "thiserror", @@ -15509,7 +15716,7 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "fnv", "futures", @@ -15524,11 +15731,11 @@ dependencies = [ "sp-consensus", "sp-core", "sp-database", - "sp-externalities 0.19.0", + "sp-externalities 0.25.0", "sp-runtime", "sp-state-machine", "sp-statement-store", - "sp-storage 13.0.0", + "sp-storage 19.0.0", "sp-test-primitives", "sp-trie", "substrate-prometheus-endpoint", @@ -15538,7 +15745,7 @@ dependencies = [ [[package]] name = "sc-client-db" -version = "0.10.0-dev" +version = "0.35.0" dependencies = [ "array-bytes 6.1.0", "criterion 0.4.0", @@ -15553,7 +15760,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "quickcheck", - "rand 0.8.5", + "rand", "sc-client-api", "sc-state-db", "schnellru", @@ -15563,7 +15770,7 @@ dependencies = [ "sp-database", "sp-runtime", "sp-state-machine", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "sp-trie", "substrate-test-runtime-client", "tempfile", @@ -15571,7 +15778,7 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "async-trait", "futures", @@ -15596,7 +15803,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" -version = "0.10.0-dev" +version = "0.34.0" dependencies = [ "async-trait", "futures", @@ -15624,7 +15831,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-timestamp", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tempfile", @@ -15634,7 +15841,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.10.0-dev" +version = "0.34.0" dependencies = [ "async-trait", "fork-tree", @@ -15661,12 +15868,13 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-slots", "sp-core", + "sp-crypto-hashing", "sp-inherents", "sp-keyring", "sp-keystore", "sp-runtime", "sp-timestamp", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -15675,7 +15883,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" -version = "0.10.0-dev" +version = "0.34.0" dependencies = [ "futures", "jsonrpsee", @@ -15703,7 +15911,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" -version = "4.0.0-dev" +version = "13.0.0" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -15730,11 +15938,12 @@ dependencies = [ "sp-consensus-beefy", "sp-consensus-grandpa", "sp-core", + "sp-crypto-hashing", "sp-keyring", "sp-keystore", "sp-mmr-primitives", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tempfile", @@ -15745,7 +15954,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" -version = "4.0.0-dev" +version = "13.0.0" dependencies = [ "futures", "jsonrpsee", @@ -15766,7 +15975,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "fork-tree", "parity-scale-codec", @@ -15778,9 +15987,9 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" -version = "0.10.0-dev" +version = "0.19.0" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.8", "array-bytes 6.1.0", "assert_matches", "async-trait", @@ -15792,7 +16001,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "sc-block-builder", "sc-chain-spec", "sc-client-api", @@ -15814,10 +16023,11 @@ dependencies = [ "sp-consensus", "sp-consensus-grandpa", "sp-core", + "sp-crypto-hashing", "sp-keyring", "sp-keystore", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -15826,7 +16036,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" -version = "0.10.0-dev" +version = "0.19.0" dependencies = [ "finality-grandpa", "futures", @@ -15850,7 +16060,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" -version = "0.10.0-dev" +version = "0.35.0" dependencies = [ "assert_matches", "async-trait", @@ -15888,7 +16098,7 @@ dependencies = [ [[package]] name = "sc-consensus-pow" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "async-trait", "futures", @@ -15912,7 +16122,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "async-trait", "futures", @@ -15935,7 +16145,7 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -15953,38 +16163,39 @@ dependencies = [ "schnellru", "sp-api", "sp-core", - "sp-externalities 0.19.0", + "sp-crypto-hashing", + "sp-externalities 0.25.0", "sp-io", "sp-maybe-compressed-blob", "sp-panic-handler", "sp-runtime", - "sp-runtime-interface 17.0.0", + "sp-runtime-interface 24.0.0", "sp-state-machine", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "sp-trie", "sp-version", - "sp-wasm-interface 14.0.0", + "sp-wasm-interface 20.0.0", "substrate-test-runtime", "tempfile", "tracing", - "tracing-subscriber", + "tracing-subscriber 0.2.25", "wat", ] [[package]] name = "sc-executor-common" -version = "0.10.0-dev" +version = "0.29.0" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface 14.0.0", + "sp-wasm-interface 20.0.0", "thiserror", - "wasm-instrument 0.3.0", + "wasm-instrument", ] [[package]] name = "sc-executor-wasmtime" -version = "0.10.0-dev" +version = "0.29.0" dependencies = [ "anyhow", "cargo_metadata", @@ -15999,8 +16210,8 @@ dependencies = [ "sc-executor-common", "sc-runtime-test", "sp-io", - "sp-runtime-interface 17.0.0", - "sp-wasm-interface 14.0.0", + "sp-runtime-interface 24.0.0", + "sp-wasm-interface 20.0.0", "tempfile", "wasmtime", "wat", @@ -16008,7 +16219,7 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "ansi_term", "futures", @@ -16024,7 +16235,7 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "array-bytes 6.1.0", "parking_lot 0.12.1", @@ -16038,7 +16249,7 @@ dependencies = [ [[package]] name = "sc-mixnet" -version = "0.1.0-dev" +version = "0.4.0" dependencies = [ "array-bytes 4.2.0", "arrayvec 0.7.4", @@ -16066,7 +16277,7 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.10.0-dev" +version = "0.34.0" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -16088,7 +16299,7 @@ dependencies = [ "parking_lot 0.12.1", "partial_sort", "pin-project", - "rand 0.8.5", + "rand", "sc-client-api", "sc-network-common", "sc-network-light", @@ -16102,7 +16313,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-test-primitives", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime", "substrate-test-runtime-client", @@ -16119,14 +16330,14 @@ dependencies = [ [[package]] name = "sc-network-bitswap" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "async-channel", "cid", "futures", "libp2p-identity", "log", - "prost", + "prost 0.12.3", "prost-build", "sc-block-builder", "sc-client-api", @@ -16134,7 +16345,7 @@ dependencies = [ "sc-network", "sp-blockchain", "sp-consensus", - "sp-core", + "sp-crypto-hashing", "sp-runtime", "substrate-test-runtime", "substrate-test-runtime-client", @@ -16145,7 +16356,7 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -16162,9 +16373,9 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.10.0-dev" +version = "0.34.0" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.8", "async-trait", "futures", "futures-timer", @@ -16185,7 +16396,7 @@ dependencies = [ [[package]] name = "sc-network-light" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -16193,7 +16404,7 @@ dependencies = [ "libp2p-identity", "log", "parity-scale-codec", - "prost", + "prost 0.12.3", "prost-build", "sc-client-api", "sc-network", @@ -16205,7 +16416,7 @@ dependencies = [ [[package]] name = "sc-network-statement" -version = "0.10.0-dev" +version = "0.16.0" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -16223,7 +16434,7 @@ dependencies = [ [[package]] name = "sc-network-sync" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -16235,7 +16446,7 @@ dependencies = [ "log", "mockall", "parity-scale-codec", - "prost", + "prost 0.12.3", "prost-build", "quickcheck", "sc-block-builder", @@ -16253,7 +16464,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-test-primitives", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -16271,7 +16482,7 @@ dependencies = [ "libp2p", "log", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -16285,7 +16496,7 @@ dependencies = [ "sp-consensus", "sp-core", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "substrate-test-runtime", "substrate-test-runtime-client", "tokio", @@ -16293,7 +16504,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "array-bytes 6.1.0", "futures", @@ -16311,7 +16522,7 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "4.0.0-dev" +version = "29.0.0" dependencies = [ "array-bytes 6.1.0", "bytes", @@ -16327,7 +16538,7 @@ dependencies = [ "once_cell", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "sc-block-builder", "sc-client-api", "sc-client-db", @@ -16339,11 +16550,11 @@ dependencies = [ "sp-api", "sp-consensus", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities 0.25.0", "sp-keystore", "sp-offchain", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "substrate-test-runtime-client", "threadpool", "tokio", @@ -16352,7 +16563,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" -version = "0.10.0-dev" +version = "0.17.0" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -16360,7 +16571,7 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "4.0.0-dev" +version = "29.0.0" dependencies = [ "assert_matches", "env_logger 0.9.3", @@ -16386,6 +16597,7 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", + "sp-crypto-hashing", "sp-io", "sp-keystore", "sp-offchain", @@ -16396,11 +16608,12 @@ dependencies = [ "sp-version", "substrate-test-runtime-client", "tokio", + "tracing-subscriber 0.3.18", ] [[package]] name = "sc-rpc-api" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -16419,11 +16632,15 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "4.0.0-dev" +version = "11.0.0" dependencies = [ + "futures", + "governor", "http", + "hyper", "jsonrpsee", "log", + "pin-project", "serde_json", "substrate-prometheus-endpoint", "tokio", @@ -16433,7 +16650,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.10.0-dev" +version = "0.34.0" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -16445,10 +16662,13 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "pretty_assertions", + "rand", "sc-block-builder", "sc-chain-spec", "sc-client-api", + "sc-rpc", "sc-service", + "sc-transaction-pool", "sc-transaction-pool-api", "sc-utils", "serde", @@ -16457,13 +16677,14 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities 0.25.0", "sp-maybe-compressed-blob", "sp-rpc", "sp-runtime", "sp-version", "substrate-test-runtime", "substrate-test-runtime-client", + "substrate-test-runtime-transaction-pool", "thiserror", "tokio", "tokio-stream", @@ -16476,14 +16697,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface 17.0.0", - "sp-std 8.0.0", + "sp-runtime-interface 24.0.0", + "sp-std 14.0.0", "substrate-wasm-builder", ] [[package]] name = "sc-service" -version = "0.10.0-dev" +version = "0.35.0" dependencies = [ "async-trait", "directories", @@ -16495,7 +16716,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "pin-project", - "rand 0.8.5", + "rand", "sc-chain-spec", "sc-client-api", "sc-client-db", @@ -16518,23 +16739,24 @@ dependencies = [ "sc-transaction-pool", "sc-transaction-pool-api", "sc-utils", + "schnellru", "serde", "serde_json", "sp-api", "sp-blockchain", "sp-consensus", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities 0.25.0", "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage 13.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", "sp-version", - "static_init 1.0.3", + "static_init", "substrate-prometheus-endpoint", "substrate-test-runtime", "substrate-test-runtime-client", @@ -16572,8 +16794,8 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-storage 13.0.0", - "sp-tracing 10.0.0", + "sp-storage 19.0.0", + "sp-tracing 16.0.0", "sp-trie", "substrate-test-runtime", "substrate-test-runtime-client", @@ -16583,7 +16805,7 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.10.0-dev" +version = "0.30.0" dependencies = [ "log", "parity-scale-codec", @@ -16593,7 +16815,7 @@ dependencies = [ [[package]] name = "sc-statement-store" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ "env_logger 0.9.3", "log", @@ -16613,9 +16835,9 @@ dependencies = [ [[package]] name = "sc-storage-monitor" -version = "0.1.0" +version = "0.16.0" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "fs4", "log", "sp-core", @@ -16625,7 +16847,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" -version = "0.10.0-dev" +version = "0.34.0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -16643,27 +16865,28 @@ dependencies = [ [[package]] name = "sc-sysinfo" -version = "6.0.0-dev" +version = "27.0.0" dependencies = [ "derive_more", "futures", "libc", "log", - "rand 0.8.5", + "rand", "rand_pcg", "regex", "sc-telemetry", "serde", "serde_json", "sp-core", + "sp-crypto-hashing", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "sc-telemetry" -version = "4.0.0-dev" +version = "15.0.0" dependencies = [ "chrono", "futures", @@ -16671,7 +16894,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "pin-project", - "rand 0.8.5", + "rand", "sc-utils", "serde", "serde_json", @@ -16681,7 +16904,7 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "ansi_term", "chrono", @@ -16702,26 +16925,26 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "thiserror", "tracing", - "tracing-log", - "tracing-subscriber", + "tracing-log 0.1.3", + "tracing-subscriber 0.2.25", ] [[package]] name = "sc-tracing-proc-macro" -version = "4.0.0-dev" +version = "11.0.0" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "sc-transaction-pool" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -16742,8 +16965,9 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", + "sp-crypto-hashing", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "sp-transaction-pool", "substrate-prometheus-endpoint", "substrate-test-runtime", @@ -16754,7 +16978,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "async-trait", "futures", @@ -16770,7 +16994,7 @@ dependencies = [ [[package]] name = "sc-utils" -version = "4.0.0-dev" +version = "14.0.0" dependencies = [ "async-channel", "futures", @@ -16820,9 +17044,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.16" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" +checksum = "763f8cd0d4c71ed8389c90cb8100cba87e763bd01a8e614d4f0af97bcd50a161" dependencies = [ "dyn-clone", "schemars_derive", @@ -16832,9 +17056,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.16" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" +checksum = "ec0f696e21e10fa546b7ffb1c9672c6de8fbc7a81acf59524386d8639bf12737" dependencies = [ "proc-macro2", "quote", @@ -16848,7 +17072,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.8", "cfg-if", "hashbrown 0.13.2", ] @@ -16862,12 +17086,10 @@ dependencies = [ "arrayref", "arrayvec 0.5.2", "curve25519-dalek 2.1.3", - "getrandom 0.1.16", "merlin 2.0.1", - "rand 0.7.3", "rand_core 0.5.1", "sha2 0.8.2", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -16896,13 +17118,13 @@ dependencies = [ "aead 0.5.2", "arrayref", "arrayvec 0.7.4", - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.2", "getrandom_or_panic", "merlin 3.0.0", "rand_core 0.6.4", "serde_bytes", "sha2 0.10.7", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -16931,7 +17153,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ "ring 0.16.20", - "untrusted", + "untrusted 0.7.1", ] [[package]] @@ -16944,7 +17166,7 @@ dependencies = [ "der", "generic-array 0.14.7", "pkcs8", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -17009,7 +17231,7 @@ dependencies = [ [[package]] name = "seedling-runtime" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -17035,7 +17257,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -17101,9 +17323,9 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.195" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -17119,22 +17341,22 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.14" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -17159,9 +17381,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.111" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa", "ryu", @@ -17191,11 +17413,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.30" +version = "0.9.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bf28c79a99f70ee1f1d83d10c875d2e70618417fda01ad1785e027579d9d38" +checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.3", "itoa", "ryu", "serde", @@ -17224,7 +17446,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -17253,9 +17475,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -17319,7 +17541,7 @@ dependencies = [ [[package]] name = "shell-runtime" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -17344,7 +17566,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -17356,9 +17578,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook" @@ -17404,8 +17626,9 @@ dependencies = [ [[package]] name = "simple-mermaid" -version = "0.1.0" -source = "git+https://github.com/kianenigma/simple-mermaid.git?rev=e48b187bcfd5cc75111acd9d241f1bd36604344b#e48b187bcfd5cc75111acd9d241f1bd36604344b" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "620a1d43d70e142b1d46a929af51d44f383db9c7a2ec122de2cd992ccfcf3c18" [[package]] name = "siphasher" @@ -17430,13 +17653,13 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "1.0.0" +version = "7.0.0" dependencies = [ "enumn", "parity-scale-codec", "paste", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] @@ -17450,9 +17673,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "smol" @@ -17464,13 +17687,22 @@ dependencies = [ "async-executor", "async-fs", "async-io", - "async-lock", + "async-lock 2.8.0", "async-net", "async-process", "blocking", "futures-lite", ] +[[package]] +name = "smol_str" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74212e6bbe9a4352329b2f68ba3130c15a3f26fe88ff22dbdc6cdd58fa85e99c" +dependencies = [ + "serde", +] + [[package]] name = "smoldot" version = "0.11.0" @@ -17478,7 +17710,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0bb30cf57b7b5f6109ce17c3164445e2d6f270af2cb48f6e4d31c2967c9a9f5" dependencies = [ "arrayvec 0.7.4", - "async-lock", + "async-lock 2.8.0", "atomic-take", "base64 0.21.2", "bip39", @@ -17489,7 +17721,7 @@ dependencies = [ "derive_more", "ed25519-zebra 4.0.3", "either", - "event-listener", + "event-listener 2.5.3", "fnv", "futures-lite", "futures-util", @@ -17507,7 +17739,7 @@ dependencies = [ "pbkdf2 0.12.2", "pin-project", "poly1305 0.8.0", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "ruzstd", "schnorrkel 0.10.2", @@ -17532,12 +17764,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "256b5bad1d6b49045e95fe87492ce73d5af81545d8b4d8318a872d2007024c33" dependencies = [ "async-channel", - "async-lock", + "async-lock 2.8.0", "base64 0.21.2", "blake2-rfc", "derive_more", "either", - "event-listener", + "event-listener 2.5.3", "fnv", "futures-channel", "futures-lite", @@ -17550,7 +17782,7 @@ dependencies = [ "no-std-net", "parking_lot 0.12.1", "pin-project", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "serde", "serde_json", @@ -17573,36 +17805,46 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c9d1425eb528a21de2755c75af4c9b5d57f50a0d4c3b7f1828a4cd03f8ba155" dependencies = [ - "aes-gcm 0.9.4", + "aes-gcm 0.9.2", "blake2 0.10.6", "chacha20poly1305", - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.2", "rand_core 0.6.4", "ring 0.16.20", "rustc_version 0.4.0", "sha2 0.10.7", - "subtle 2.4.1", + "subtle 2.5.0", +] + +[[package]] +name = "snowbridge-amcl" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460a9ed63cdf03c1b9847e8a12a5f5ba19c4efd5869e4a737e05be25d7c427e5" +dependencies = [ + "parity-scale-codec", + "scale-info", ] [[package]] name = "snowbridge-beacon-primitives" -version = "0.9.0" +version = "0.0.0" dependencies = [ "byte-slice-cast", "frame-support", "frame-system", "hex", "hex-literal", - "milagro_bls", "parity-scale-codec", "rlp", "scale-info", "serde", "snowbridge-ethereum", + "snowbridge-milagro-bls", "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "ssz_rs", "ssz_rs_derive", "static_assertions", @@ -17610,7 +17852,7 @@ dependencies = [ [[package]] name = "snowbridge-core" -version = "0.9.0" +version = "0.0.0" dependencies = [ "ethabi-decode", "frame-support", @@ -17626,14 +17868,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", ] [[package]] name = "snowbridge-ethereum" -version = "0.9.0" +version = "0.1.0" dependencies = [ "ethabi-decode", "ethbloom", @@ -17641,7 +17883,7 @@ dependencies = [ "hex-literal", "parity-bytes", "parity-scale-codec", - "rand 0.8.5", + "rand", "rlp", "rustc-hex", "scale-info", @@ -17651,13 +17893,28 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "wasm-bindgen-test", ] +[[package]] +name = "snowbridge-milagro-bls" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "026aa8638f690a53e3f7676024b9e913b1cab0111d1b7b92669d40a188f9d7e6" +dependencies = [ + "hex", + "lazy_static", + "parity-scale-codec", + "rand", + "scale-info", + "snowbridge-amcl", + "zeroize", +] + [[package]] name = "snowbridge-outbound-queue-merkle-tree" -version = "0.9.0" +version = "0.1.1" dependencies = [ "array-bytes 4.2.0", "env_logger 0.9.3", @@ -17666,12 +17923,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core", + "sp-crypto-hashing", "sp-runtime", ] [[package]] name = "snowbridge-outbound-queue-runtime-api" -version = "0.9.0" +version = "0.0.0" dependencies = [ "frame-support", "parity-scale-codec", @@ -17679,13 +17937,13 @@ dependencies = [ "snowbridge-outbound-queue-merkle-tree", "sp-api", "sp-core", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", ] [[package]] name = "snowbridge-pallet-ethereum-client" -version = "0.9.0" +version = "0.0.0" dependencies = [ "bp-runtime", "byte-slice-cast", @@ -17696,7 +17954,7 @@ dependencies = [ "log", "pallet-timestamp", "parity-scale-codec", - "rand 0.8.5", + "rand", "rlp", "scale-info", "serde", @@ -17704,19 +17962,34 @@ dependencies = [ "snowbridge-beacon-primitives", "snowbridge-core", "snowbridge-ethereum", + "snowbridge-pallet-ethereum-client-fixtures", "sp-core", "sp-io", "sp-keyring", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "ssz_rs", "ssz_rs_derive", "static_assertions", ] [[package]] -name = "snowbridge-pallet-inbound-queue" +name = "snowbridge-pallet-ethereum-client-fixtures" version = "0.9.0" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core", + "sp-std 14.0.0", +] + +[[package]] +name = "snowbridge-pallet-inbound-queue" +version = "0.0.0" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -17735,20 +18008,35 @@ dependencies = [ "snowbridge-core", "snowbridge-ethereum", "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-inbound-queue-fixtures", "snowbridge-router-primitives", "sp-core", "sp-io", "sp-keyring", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", ] [[package]] -name = "snowbridge-pallet-outbound-queue" +name = "snowbridge-pallet-inbound-queue-fixtures" version = "0.9.0" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "snowbridge-beacon-primitives", + "snowbridge-core", + "sp-core", + "sp-std 14.0.0", +] + +[[package]] +name = "snowbridge-pallet-outbound-queue" +version = "0.0.0" dependencies = [ "bridge-hub-common", "ethabi-decode", @@ -17767,13 +18055,13 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", ] [[package]] name = "snowbridge-pallet-system" -version = "0.9.0" +version = "0.0.0" dependencies = [ "ethabi-decode", "frame-benchmarking", @@ -17793,7 +18081,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -17801,7 +18089,7 @@ dependencies = [ [[package]] name = "snowbridge-router-primitives" -version = "0.9.0" +version = "0.0.0" dependencies = [ "ethabi-decode", "frame-support", @@ -17816,7 +18104,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -17824,13 +18112,15 @@ dependencies = [ [[package]] name = "snowbridge-runtime-common" -version = "0.9.0" +version = "0.0.0" dependencies = [ "frame-support", "frame-system", "log", + "parity-scale-codec", "snowbridge-core", "sp-arithmetic", + "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -17838,13 +18128,12 @@ dependencies = [ [[package]] name = "snowbridge-runtime-test-common" -version = "0.9.0" +version = "0.0.0" dependencies = [ "assets-common", "bridge-hub-test-utils", "bridge-runtime-common", "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", @@ -17886,6 +18175,7 @@ dependencies = [ "snowbridge-core", "snowbridge-outbound-queue-runtime-api", "snowbridge-pallet-ethereum-client", + "snowbridge-pallet-ethereum-client-fixtures", "snowbridge-pallet-inbound-queue", "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", @@ -17902,8 +18192,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -17915,13 +18205,13 @@ dependencies = [ [[package]] name = "snowbridge-system-runtime-api" -version = "0.9.0" +version = "0.0.0" dependencies = [ "parity-scale-codec", "snowbridge-core", "sp-api", "sp-core", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", ] @@ -17958,13 +18248,13 @@ dependencies = [ "http", "httparse", "log", - "rand 0.8.5", + "rand", "sha-1 0.9.8", ] [[package]] name = "sp-api" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "hash-db", "log", @@ -17972,11 +18262,12 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities 0.25.0", "sp-metadata-ir", "sp-runtime", + "sp-runtime-interface 24.0.0", "sp-state-machine", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-test-primitives", "sp-trie", "sp-version", @@ -17985,16 +18276,16 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "4.0.0-dev" +version = "15.0.0" dependencies = [ "Inflector", "assert_matches", "blake2 0.10.6", "expander 2.0.0", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -18013,7 +18304,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "sp-version", "static_assertions", "substrate-test-runtime-client", @@ -18022,14 +18313,14 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "23.0.0" +version = "30.0.0" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] @@ -18045,18 +18336,18 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "16.0.0" +version = "23.0.0" dependencies = [ "criterion 0.4.0", "integer-sqrt", "num-traits", "parity-scale-codec", "primitive-types", - "rand 0.8.5", + "rand", "scale-info", "serde", - "sp-core", - "sp-std 8.0.0", + "sp-crypto-hashing", + "sp-std 14.0.0", "static_assertions", ] @@ -18077,7 +18368,7 @@ version = "0.4.2" source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" dependencies = [ "ark-bls12-381-ext", - "sp-crypto-ec-utils 0.4.1 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-crypto-ec-utils 0.4.1", ] [[package]] @@ -18086,34 +18377,34 @@ version = "0.4.2" source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" dependencies = [ "ark-ed-on-bls12-381-bandersnatch-ext", - "sp-crypto-ec-utils 0.4.1 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-crypto-ec-utils 0.4.1", ] [[package]] name = "sp-authority-discovery" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "sp-block-builder" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "sp-api", "sp-inherents", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "sp-blockchain" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "futures", "log", @@ -18130,7 +18421,7 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "async-trait", "futures", @@ -18145,7 +18436,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "async-trait", "parity-scale-codec", @@ -18155,13 +18446,13 @@ dependencies = [ "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-babe" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "async-trait", "parity-scale-codec", @@ -18173,13 +18464,13 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-beefy" -version = "4.0.0-dev" +version = "13.0.0" dependencies = [ "array-bytes 6.1.0", "lazy_static", @@ -18189,17 +18480,19 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-core", + "sp-crypto-hashing", "sp-io", + "sp-keystore", "sp-mmr-primitives", "sp-runtime", - "sp-std 8.0.0", - "strum", + "sp-std 14.0.0", + "strum 0.24.1", "w3f-bls", ] [[package]] name = "sp-consensus-grandpa" -version = "4.0.0-dev" +version = "13.0.0" dependencies = [ "finality-grandpa", "log", @@ -18211,18 +18504,18 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "sp-consensus-pow" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "parity-scale-codec", "sp-api", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] @@ -18237,23 +18530,23 @@ dependencies = [ "sp-consensus-slots", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "sp-consensus-slots" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-timestamp", ] [[package]] name = "sp-core" -version = "21.0.0" +version = "28.0.0" dependencies = [ "array-bytes 6.1.0", "bandersnatch_vrfs", @@ -18278,7 +18571,7 @@ dependencies = [ "parking_lot 0.12.1", "paste", "primitive-types", - "rand 0.8.5", + "rand", "regex", "scale-info", "schnorrkel 0.11.4", @@ -18286,13 +18579,12 @@ dependencies = [ "secrecy", "serde", "serde_json", - "sp-core-hashing", - "sp-core-hashing-proc-macro", - "sp-debug-derive 8.0.0", - "sp-externalities 0.19.0", - "sp-runtime-interface 17.0.0", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-crypto-hashing", + "sp-debug-derive 14.0.0", + "sp-externalities 0.25.0", + "sp-runtime-interface 24.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", "ss58-registry", "substrate-bip39", "thiserror", @@ -18313,28 +18605,22 @@ dependencies = [ [[package]] name = "sp-core-hashing" -version = "9.0.0" +version = "15.0.0" dependencies = [ - "blake2b_simd", - "byteorder", - "digest 0.10.7", - "sha2 0.10.7", - "sha3", - "twox-hash", + "sp-crypto-hashing", ] [[package]] name = "sp-core-hashing-proc-macro" -version = "9.0.0" +version = "15.0.0" dependencies = [ - "quote", - "sp-core-hashing", - "syn 2.0.48", + "sp-crypto-hashing-proc-macro", ] [[package]] name = "sp-crypto-ec-utils" version = "0.4.1" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -18347,15 +18633,14 @@ dependencies = [ "ark-ed-on-bls12-377-ext", "ark-ed-on-bls12-381-bandersnatch", "ark-ed-on-bls12-381-bandersnatch-ext", - "ark-scale 0.0.12", + "ark-scale 0.0.11", "sp-runtime-interface 17.0.0", "sp-std 8.0.0", ] [[package]] name = "sp-crypto-ec-utils" -version = "0.4.1" -source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "0.10.0" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -18368,14 +18653,37 @@ dependencies = [ "ark-ed-on-bls12-377-ext", "ark-ed-on-bls12-381-bandersnatch", "ark-ed-on-bls12-381-bandersnatch-ext", - "ark-scale 0.0.11", - "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "ark-scale 0.0.12", + "sp-runtime-interface 24.0.0", + "sp-std 14.0.0", +] + +[[package]] +name = "sp-crypto-hashing" +version = "0.0.0" +dependencies = [ + "blake2b_simd", + "byteorder", + "criterion 0.4.0", + "digest 0.10.7", + "sha2 0.10.7", + "sha3", + "sp-crypto-hashing-proc-macro", + "twox-hash", +] + +[[package]] +name = "sp-crypto-hashing-proc-macro" +version = "0.0.0" +dependencies = [ + "quote", + "sp-crypto-hashing", + "syn 2.0.50", ] [[package]] name = "sp-database" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -18384,25 +18692,26 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "sp-debug-derive" -version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "14.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "sp-externalities" version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "environmental", "parity-scale-codec", @@ -18412,28 +18721,27 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "0.25.0" dependencies = [ "environmental", "parity-scale-codec", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 14.0.0", + "sp-storage 19.0.0", ] [[package]] name = "sp-genesis-builder" -version = "0.1.0" +version = "0.7.0" dependencies = [ "serde_json", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "sp-inherents" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "async-trait", "futures", @@ -18441,13 +18749,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "thiserror", ] [[package]] name = "sp-io" -version = "23.0.0" +version = "30.0.0" dependencies = [ "bytes", "ed25519-dalek", @@ -18457,12 +18765,13 @@ dependencies = [ "rustversion", "secp256k1", "sp-core", - "sp-externalities 0.19.0", + "sp-crypto-hashing", + "sp-externalities 0.25.0", "sp-keystore", - "sp-runtime-interface 17.0.0", + "sp-runtime-interface 24.0.0", "sp-state-machine", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "sp-trie", "tracing", "tracing-core", @@ -18470,29 +18779,28 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "24.0.0" +version = "31.0.0" dependencies = [ "sp-core", "sp-runtime", - "strum", + "strum 0.24.1", ] [[package]] name = "sp-keystore" -version = "0.27.0" +version = "0.34.0" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "rand_chacha 0.2.2", "sp-core", - "sp-externalities 0.19.0", - "thiserror", + "sp-externalities 0.25.0", ] [[package]] name = "sp-maybe-compressed-blob" -version = "4.1.0-dev" +version = "11.0.0" dependencies = [ "thiserror", "zstd 0.12.4", @@ -18500,28 +18808,28 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.1.0" +version = "0.6.0" dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "sp-mixnet" -version = "0.1.0-dev" +version = "0.4.0" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "sp-mmr-primitives" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "array-bytes 6.1.0", "ckb-merkle-mountain-range", @@ -18531,24 +18839,24 @@ dependencies = [ "serde", "sp-api", "sp-core", - "sp-debug-derive 8.0.0", + "sp-debug-derive 14.0.0", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "thiserror", ] [[package]] name = "sp-npos-elections" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", "serde", "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "substrate-test-utils", ] @@ -18556,16 +18864,16 @@ dependencies = [ name = "sp-npos-elections-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "honggfuzz", - "rand 0.8.5", + "rand", "sp-npos-elections", "sp-runtime", ] [[package]] name = "sp-offchain" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "sp-api", "sp-core", @@ -18574,7 +18882,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "8.0.0" +version = "13.0.0" dependencies = [ "backtrace", "lazy_static", @@ -18583,7 +18891,7 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "6.0.0" +version = "26.0.0" dependencies = [ "rustc-hash", "serde", @@ -18593,7 +18901,7 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "24.0.0" +version = "31.0.1" dependencies = [ "docify", "either", @@ -18602,7 +18910,7 @@ dependencies = [ "log", "parity-scale-codec", "paste", - "rand 0.8.5", + "rand", "scale-info", "serde", "serde_json", @@ -18613,8 +18921,8 @@ dependencies = [ "sp-core", "sp-io", "sp-state-machine", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "sp-weights", "substrate-test-runtime-client", "zstd 0.12.4", @@ -18623,66 +18931,67 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "rustversion", - "sp-core", "sp-externalities 0.19.0", - "sp-io", - "sp-runtime-interface-proc-macro 11.0.0", - "sp-runtime-interface-test-wasm", - "sp-state-machine", + "sp-runtime-interface-proc-macro 11.0.0", "sp-std 8.0.0", "sp-storage 13.0.0", "sp-tracing 10.0.0", "sp-wasm-interface 14.0.0", "static_assertions", - "trybuild", ] [[package]] name = "sp-runtime-interface" -version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "24.0.0" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", + "polkavm-derive 0.8.0", "primitive-types", - "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-runtime-interface-proc-macro 11.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "rustversion", + "sp-core", + "sp-externalities 0.25.0", + "sp-io", + "sp-runtime-interface-proc-macro 17.0.0", + "sp-runtime-interface-test-wasm", + "sp-state-machine", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-tracing 16.0.0", + "sp-wasm-interface 20.0.0", "static_assertions", + "trybuild", ] [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "Inflector", - "expander 2.0.0", - "proc-macro-crate 3.1.0", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "17.0.0" dependencies = [ "Inflector", - "proc-macro-crate 1.3.1", + "expander 2.0.0", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -18693,7 +19002,7 @@ dependencies = [ "sc-executor-common", "sp-io", "sp-runtime", - "sp-runtime-interface 17.0.0", + "sp-runtime-interface 24.0.0", "sp-runtime-interface-test-wasm", "sp-runtime-interface-test-wasm-deprecated", "sp-state-machine", @@ -18708,8 +19017,8 @@ dependencies = [ "bytes", "sp-core", "sp-io", - "sp-runtime-interface 17.0.0", - "sp-std 8.0.0", + "sp-runtime-interface 24.0.0", + "sp-std 14.0.0", "substrate-wasm-builder", ] @@ -18719,13 +19028,13 @@ version = "2.0.0" dependencies = [ "sp-core", "sp-io", - "sp-runtime-interface 17.0.0", + "sp-runtime-interface 24.0.0", "substrate-wasm-builder", ] [[package]] name = "sp-session" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "parity-scale-codec", "scale-info", @@ -18734,12 +19043,12 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "sp-staking" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -18747,12 +19056,12 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "sp-state-machine" -version = "0.28.0" +version = "0.35.0" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -18761,13 +19070,13 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "pretty_assertions", - "rand 0.8.5", + "rand", "smallvec", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities 0.25.0", "sp-panic-handler", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-trie", "thiserror", "tracing", @@ -18776,23 +19085,24 @@ dependencies = [ [[package]] name = "sp-statement-store" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ "aes-gcm 0.10.3", - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.2", "ed25519-dalek", "hkdf", "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", "sha2 0.10.7", "sp-api", "sp-application-crypto", "sp-core", - "sp-externalities 0.19.0", + "sp-crypto-hashing", + "sp-externalities 0.25.0", "sp-runtime", - "sp-runtime-interface 17.0.0", - "sp-std 8.0.0", + "sp-runtime-interface 24.0.0", + "sp-std 14.0.0", "thiserror", "x25519-dalek 2.0.0", ] @@ -18800,15 +19110,16 @@ dependencies = [ [[package]] name = "sp-std" version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" [[package]] name = "sp-std" -version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "14.0.0" [[package]] name = "sp-storage" version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "impl-serde", "parity-scale-codec", @@ -18820,15 +19131,14 @@ dependencies = [ [[package]] name = "sp-storage" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "19.0.0" dependencies = [ "impl-serde", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-debug-derive 14.0.0", + "sp-std 14.0.0", ] [[package]] @@ -18841,47 +19151,47 @@ dependencies = [ "sp-application-crypto", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "sp-timestamp" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "async-trait", "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "thiserror", ] [[package]] name = "sp-tracing" version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "parity-scale-codec", "sp-std 8.0.0", "tracing", "tracing-core", - "tracing-subscriber", + "tracing-subscriber 0.2.25", ] [[package]] name = "sp-tracing" -version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "16.0.0" dependencies = [ "parity-scale-codec", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 14.0.0", "tracing", "tracing-core", - "tracing-subscriber", + "tracing-subscriber 0.2.25", ] [[package]] name = "sp-transaction-pool" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "sp-api", "sp-runtime", @@ -18889,7 +19199,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "async-trait", "parity-scale-codec", @@ -18897,15 +19207,15 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-trie", ] [[package]] name = "sp-trie" -version = "22.0.0" +version = "29.0.0" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.8", "array-bytes 6.1.0", "criterion 0.4.0", "hash-db", @@ -18914,13 +19224,13 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "scale-info", "schnellru", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities 0.25.0", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "thiserror", "tracing", "trie-bench", @@ -18931,34 +19241,35 @@ dependencies = [ [[package]] name = "sp-version" -version = "22.0.0" +version = "29.0.0" dependencies = [ "impl-serde", "parity-scale-codec", "parity-wasm", "scale-info", "serde", - "sp-core-hashing-proc-macro", + "sp-crypto-hashing-proc-macro", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "8.0.0" +version = "13.0.0" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", "sp-version", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] name = "sp-wasm-interface" version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -18970,20 +19281,19 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "20.0.0" dependencies = [ "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 14.0.0", "wasmtime", ] [[package]] name = "sp-weights" -version = "20.0.0" +version = "27.0.0" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -18992,8 +19302,8 @@ dependencies = [ "serde", "smallvec", "sp-arithmetic", - "sp-debug-derive 8.0.0", - "sp-std 8.0.0", + "sp-debug-derive 14.0.0", + "sp-std 14.0.0", ] [[package]] @@ -19016,7 +19326,7 @@ checksum = "08615eea740067d9899969bc2891c68a19c315cb1f66640af9a9ecb91b13bcab" dependencies = [ "lazy_static", "maplit", - "strum", + "strum 0.24.1", ] [[package]] @@ -19077,11 +19387,11 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" name = "staging-chain-spec-builder" version = "2.0.0" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "log", "sc-chain-spec", "serde_json", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", ] [[package]] @@ -19090,7 +19400,7 @@ version = "3.0.0-dev" dependencies = [ "array-bytes 6.1.0", "assert_cmd", - "clap 4.4.18", + "clap 4.5.1", "clap_complete", "criterion 0.4.0", "frame-benchmarking", @@ -19122,7 +19432,7 @@ dependencies = [ "pallet-treasury", "parity-scale-codec", "platforms", - "rand 0.8.5", + "rand", "regex", "sc-authority-discovery", "sc-basic-authorship", @@ -19168,7 +19478,8 @@ dependencies = [ "sp-consensus-beefy", "sp-consensus-grandpa", "sp-core", - "sp-externalities 0.19.0", + "sp-crypto-hashing", + "sp-externalities 0.25.0", "sp-inherents", "sp-io", "sp-keyring", @@ -19179,7 +19490,7 @@ dependencies = [ "sp-state-machine", "sp-statement-store", "sp-timestamp", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "sp-transaction-storage-proof", "sp-trie", "staging-node-inspect", @@ -19197,9 +19508,9 @@ dependencies = [ [[package]] name = "staging-node-inspect" -version = "0.9.0-dev" +version = "0.12.0" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "parity-scale-codec", "sc-cli", "sc-client-api", @@ -19214,7 +19525,7 @@ dependencies = [ [[package]] name = "staging-parachain-info" -version = "0.1.0" +version = "0.7.0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -19222,16 +19533,16 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", ] [[package]] name = "staging-tracking-allocator" -version = "1.0.0" +version = "2.0.0" [[package]] name = "staging-xcm" -version = "1.0.0" +version = "7.0.0" dependencies = [ "array-bytes 6.1.0", "bounded-collections", @@ -19252,7 +19563,7 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "1.0.0" +version = "7.0.0" dependencies = [ "assert_matches", "frame-support", @@ -19274,7 +19585,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-weights", "staging-xcm", "staging-xcm-executor", @@ -19282,7 +19593,7 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "1.0.0" +version = "7.0.0" dependencies = [ "environmental", "frame-benchmarking", @@ -19295,7 +19606,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "sp-weights", "staging-xcm", ] @@ -19306,18 +19617,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "static_init" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11b73400442027c4adedda20a9f9b7945234a5bd8d5f7e86da22bd5d0622369c" -dependencies = [ - "cfg_aliases", - "libc", - "parking_lot 0.11.2", - "static_init_macro 0.5.0", -] - [[package]] name = "static_init" version = "1.0.3" @@ -19329,23 +19628,10 @@ dependencies = [ "libc", "parking_lot 0.11.2", "parking_lot_core 0.8.6", - "static_init_macro 1.0.2", + "static_init_macro", "winapi", ] -[[package]] -name = "static_init_macro" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2261c91034a1edc3fc4d1b80e89d82714faede0515c14a75da10cb941546bbf" -dependencies = [ - "cfg_aliases", - "memchr", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "static_init_macro" version = "1.0.2" @@ -19368,7 +19654,7 @@ dependencies = [ "bitflags 1.3.2", "byteorder", "keccak", - "subtle 2.4.1", + "subtle 2.5.0", "zeroize", ] @@ -19378,15 +19664,27 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" + [[package]] name = "strum" version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", ] +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" + [[package]] name = "strum_macros" version = "0.24.3" @@ -19400,19 +19698,32 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.50", +] + [[package]] name = "subkey" -version = "3.0.0" +version = "9.0.0" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "sc-cli", ] [[package]] name = "substrate-bip39" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +checksum = "e620c7098893ba667438b47169c00aacdd9e7c10e042250ce2b60b087ec97328" dependencies = [ "hmac 0.11.0", "pbkdf2 0.8.0", @@ -19423,7 +19734,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" -version = "3.0.0" +version = "11.0.0" [[package]] name = "substrate-cli-test-utils" @@ -19444,9 +19755,9 @@ dependencies = [ [[package]] name = "substrate-frame-cli" -version = "4.0.0-dev" +version = "32.0.0" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "frame-support", "frame-system", "sc-cli", @@ -19456,7 +19767,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-support" -version = "3.0.0" +version = "29.0.0" dependencies = [ "frame-support", "frame-system", @@ -19467,13 +19778,13 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-storage 13.0.0", + "sp-storage 19.0.0", "tokio", ] [[package]] name = "substrate-frame-rpc-system" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "assert_matches", "frame-system-rpc-runtime-api", @@ -19489,14 +19800,14 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "substrate-test-runtime-client", "tokio", ] [[package]] name = "substrate-prometheus-endpoint" -version = "0.10.0-dev" +version = "0.17.0" dependencies = [ "hyper", "log", @@ -19507,7 +19818,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "async-trait", "jsonrpsee", @@ -19521,7 +19832,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -19559,6 +19870,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-state-machine", + "tokio", ] [[package]] @@ -19571,13 +19883,13 @@ dependencies = [ "frame-system", "frame-system-rpc-runtime-api", "futures", - "json-patch", "log", "pallet-babe", "pallet-balances", "pallet-timestamp", "parity-scale-codec", "sc-block-builder", + "sc-chain-spec", "sc-executor", "sc-executor-common", "sc-service", @@ -19592,7 +19904,8 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-grandpa", "sp-core", - "sp-externalities 0.19.0", + "sp-crypto-hashing", + "sp-externalities 0.25.0", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -19601,8 +19914,8 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "sp-transaction-pool", "sp-trie", "sp-version", @@ -19655,15 +19968,16 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "5.0.0-dev" +version = "17.0.0" dependencies = [ "build-helper", "cargo_metadata", "console", "filetime", "parity-wasm", + "polkavm-linker 0.8.2", "sp-maybe-compressed-blob", - "strum", + "strum 0.24.1", "tempfile", "toml 0.8.8", "walkdir", @@ -19678,9 +19992,9 @@ checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" [[package]] name = "subtle" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "subtle-ng" @@ -19763,7 +20077,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "167a4ffd7c35c143fd1030aa3c2caf76ba42220bd5a6b5f4781896434723b8c3" dependencies = [ "debugid", - "memmap2", + "memmap2 0.5.10", "stable_deref_trait", "uuid", ] @@ -19792,9 +20106,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" dependencies = [ "proc-macro2", "quote", @@ -19810,7 +20124,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -19915,7 +20229,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "sp-io", - "sp-std 8.0.0", + "sp-std 14.0.0", "substrate-wasm-builder", "tiny-keccak", ] @@ -19924,7 +20238,7 @@ dependencies = [ name = "test-parachain-adder-collator" version = "1.0.0" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "futures", "futures-timer", "log", @@ -19963,7 +20277,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "sp-io", - "sp-std 8.0.0", + "sp-std 14.0.0", "substrate-wasm-builder", "tiny-keccak", ] @@ -19972,7 +20286,7 @@ dependencies = [ name = "test-parachain-undying-collator" version = "1.0.0" dependencies = [ - "clap 4.4.18", + "clap 4.5.1", "futures", "futures-timer", "log", @@ -20018,6 +20332,20 @@ dependencies = [ "sp-weights", ] +[[package]] +name = "testnet-parachains-constants" +version = "1.0.0" +dependencies = [ + "cumulus-primitives-core", + "frame-support", + "polkadot-core-primitives", + "rococo-runtime-constants", + "smallvec", + "sp-runtime", + "staging-xcm", + "westend-runtime-constants", +] + [[package]] name = "textwrap" version = "0.16.0" @@ -20061,7 +20389,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -20197,9 +20525,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ "backtrace", "bytes", @@ -20222,7 +20550,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -20232,7 +20560,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ "pin-project", - "rand 0.8.5", + "rand", "tokio", ] @@ -20246,6 +20574,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.2", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.14" @@ -20307,18 +20646,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.14", -] - [[package]] name = "toml" version = "0.8.8" @@ -20342,13 +20669,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", - "serde", - "serde_spanned", + "indexmap 2.2.3", "toml_datetime", "winnow", ] @@ -20359,7 +20684,7 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.2.3", "serde", "serde_spanned", "toml_datetime", @@ -20372,6 +20697,10 @@ version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite 0.2.12", "tower-layer", "tower-service", "tracing", @@ -20428,7 +20757,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -20453,7 +20782,7 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "1.0.0" +version = "7.0.0" dependencies = [ "coarsetime", "polkadot-primitives", @@ -20463,14 +20792,14 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "expander 2.0.0", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.0.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -20484,6 +20813,17 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + [[package]] name = "tracing-serde" version = "0.1.3" @@ -20503,7 +20843,7 @@ dependencies = [ "ansi_term", "chrono", "lazy_static", - "matchers", + "matchers 0.0.1", "parking_lot 0.11.2", "regex", "serde", @@ -20513,10 +20853,28 @@ dependencies = [ "thread_local", "tracing", "tracing-core", - "tracing-log", + "tracing-log 0.1.3", "tracing-serde", ] +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers 0.1.0", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log 0.2.0", +] + [[package]] name = "trie-bench" version = "0.38.0" @@ -20581,7 +20939,7 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "rand 0.8.5", + "rand", "smallvec", "socket2 0.4.9", "thiserror", @@ -20619,11 +20977,11 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" -version = "0.10.0-dev" +version = "0.38.0" dependencies = [ "assert_cmd", "async-trait", - "clap 4.4.18", + "clap 4.5.1", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -20639,8 +20997,8 @@ dependencies = [ "sp-consensus-aura", "sp-consensus-babe", "sp-core", - "sp-debug-derive 8.0.0", - "sp-externalities 0.19.0", + "sp-debug-derive 14.0.0", + "sp-externalities 0.25.0", "sp-inherents", "sp-io", "sp-keystore", @@ -20692,7 +21050,7 @@ dependencies = [ "http", "httparse", "log", - "rand 0.8.5", + "rand", "sha-1 0.10.1", "thiserror", "url", @@ -20707,7 +21065,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand 0.8.5", + "rand", "static_assertions", ] @@ -20776,12 +21134,12 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "universal-hash" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" dependencies = [ "generic-array 0.14.7", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] @@ -20791,7 +21149,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ "crypto-common", - "subtle 2.4.1", + "subtle 2.5.0", ] [[package]] @@ -20818,6 +21176,12 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.4.0" @@ -20922,7 +21286,7 @@ dependencies = [ "arrayref", "constcat", "digest 0.10.7", - "rand 0.8.5", + "rand", "rand_chacha 0.3.1", "rand_core 0.6.4", "sha2 0.10.7", @@ -21000,7 +21364,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", "wasm-bindgen-shared", ] @@ -21034,7 +21398,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -21078,15 +21442,6 @@ dependencies = [ "leb128", ] -[[package]] -name = "wasm-instrument" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa1dafb3e60065305741e83db35c6c2584bb3725b692b5b66148a38d72ace6cd" -dependencies = [ - "parity-wasm", -] - [[package]] name = "wasm-instrument" version = "0.4.0" @@ -21104,8 +21459,8 @@ checksum = "fc942673e7684671f0c5708fc18993569d184265fd5223bb51fc8e5b9b6cfd52" dependencies = [ "anyhow", "libc", - "strum", - "strum_macros", + "strum 0.24.1", + "strum_macros 0.24.3", "tempfile", "thiserror", "wasm-opt-cxx-sys", @@ -21153,9 +21508,9 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.31.0" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f341edb80021141d4ae6468cbeefc50798716a347d4085c3811900049ea8945" +checksum = "77a8281d1d660cdf54c76a3efa9ddd0c270cada1383a995db3ccb43d166456c7" dependencies = [ "smallvec", "spin 0.9.8", @@ -21166,9 +21521,9 @@ dependencies = [ [[package]] name = "wasmi_arena" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "401c1f35e413fac1846d4843745589d9ec678977ab35a384db8ae7830525d468" +checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" [[package]] name = "wasmi_core" @@ -21376,7 +21731,7 @@ dependencies = [ "memfd", "memoffset 0.8.0", "paste", - "rand 0.8.5", + "rand", "rustix 0.36.15", "wasmtime-asm-macros", "wasmtime-environ", @@ -21429,12 +21784,12 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.16.20", - "untrusted", + "ring 0.17.7", + "untrusted 0.9.0", ] [[package]] @@ -21446,15 +21801,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "webpki-roots" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" -dependencies = [ - "rustls-webpki 0.100.2", -] - [[package]] name = "webpki-roots" version = "0.25.2" @@ -21466,12 +21812,10 @@ name = "westend-emulated-chain" version = "0.0.0" dependencies = [ "emulated-integration-tests-common", - "pallet-im-online", "pallet-staking", "parachains-common", "polkadot-primitives", "sc-consensus-grandpa", - "serde_json", "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", @@ -21483,7 +21827,7 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "1.0.0" +version = "7.0.0" dependencies = [ "binary-merkle-tree", "bitvec", @@ -21578,9 +21922,9 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 8.0.0", - "sp-storage 13.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-storage 19.0.0", + "sp-tracing 16.0.0", "sp-transaction-pool", "sp-version", "staging-xcm", @@ -21594,7 +21938,7 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "1.0.0" +version = "7.0.0" dependencies = [ "frame-support", "polkadot-primitives", @@ -21973,7 +22317,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" dependencies = [ - "curve25519-dalek 4.1.1", + "curve25519-dalek 4.1.2", "rand_core 0.6.4", "serde", "zeroize", @@ -22008,7 +22352,7 @@ dependencies = [ [[package]] name = "xcm-emulator" -version = "0.1.0" +version = "0.5.0" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -22030,10 +22374,11 @@ dependencies = [ "polkadot-runtime-parachains", "sp-arithmetic", "sp-core", + "sp-crypto-hashing", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "staging-xcm", "staging-xcm-executor", ] @@ -22048,33 +22393,35 @@ dependencies = [ "pallet-transaction-payment", "pallet-xcm", "parity-scale-codec", + "polkadot-service", "polkadot-test-client", "polkadot-test-runtime", "polkadot-test-service", "sp-consensus", + "sp-core", "sp-keyring", "sp-runtime", "sp-state-machine", - "sp-tracing 10.0.0", + "sp-tracing 16.0.0", "staging-xcm", "staging-xcm-executor", ] [[package]] name = "xcm-procedural" -version = "1.0.0" +version = "7.0.0" dependencies = [ "Inflector", "proc-macro2", "quote", "staging-xcm", - "syn 2.0.48", + "syn 2.0.50", "trybuild", ] [[package]] name = "xcm-simulator" -version = "1.0.0" +version = "7.0.0" dependencies = [ "frame-support", "parity-scale-codec", @@ -22083,7 +22430,7 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-runtime-parachains", "sp-io", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -22091,7 +22438,7 @@ dependencies = [ [[package]] name = "xcm-simulator-example" -version = "1.0.0" +version = "7.0.0" dependencies = [ "frame-support", "frame-system", @@ -22108,8 +22455,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std 14.0.0", + "sp-tracing 16.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -22121,8 +22468,10 @@ name = "xcm-simulator-fuzzer" version = "1.0.0" dependencies = [ "arbitrary", + "frame-executive", "frame-support", "frame-system", + "frame-try-runtime", "honggfuzz", "pallet-balances", "pallet-message-queue", @@ -22135,7 +22484,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -22152,7 +22501,7 @@ dependencies = [ "log", "nohash-hasher", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "static_assertions", ] @@ -22188,7 +22537,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] @@ -22208,7 +22557,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.50", ] [[package]] From 5b0bc653603de4e74faf5150eabca0d1bcc118f2 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 28 Feb 2024 16:57:16 +1100 Subject: [PATCH 93/98] rename --- .../pallets/collator-selection/src/migration.rs | 10 +++++----- .../runtime/common/src/assigned_slots/migration.rs | 12 ++++++------ polkadot/runtime/common/src/crowdloan/migration.rs | 4 ++-- substrate/client/executor/src/executor.rs | 14 +++++++------- substrate/frame/alliance/src/migration.rs | 6 +++--- substrate/frame/assets/src/migration.rs | 10 +++++----- substrate/frame/balances/src/migration.rs | 8 ++++---- substrate/frame/nfts/src/migration.rs | 6 +++--- substrate/frame/referenda/src/migration.rs | 10 +++++----- 9 files changed, 40 insertions(+), 40 deletions(-) diff --git a/cumulus/pallets/collator-selection/src/migration.rs b/cumulus/pallets/collator-selection/src/migration.rs index 58b4cc5b06a1..f384981dbae8 100644 --- a/cumulus/pallets/collator-selection/src/migration.rs +++ b/cumulus/pallets/collator-selection/src/migration.rs @@ -31,8 +31,8 @@ pub mod v1 { pub struct MigrateToV1(sp_std::marker::PhantomData); impl OnRuntimeUpgrade for MigrateToV1 { fn on_runtime_upgrade() -> Weight { - let onchain_version = Pallet::::on_chain_storage_version(); - if onchain_version == 0 { + let on_chain_version = Pallet::::on_chain_storage_version(); + if on_chain_version == 0 { let invulnerables_len = Invulnerables::::get().to_vec().len(); >::mutate(|invulnerables| { invulnerables.sort(); @@ -45,7 +45,7 @@ pub mod v1 { invulnerables_len, ); // Similar complexity to `set_invulnerables` (put storage value) - // Plus 1 read for length, 1 read for `onchain_version`, 1 write to put version + // Plus 1 read for length, 1 read for `on_chain_version`, 1 write to put version T::WeightInfo::set_invulnerables(invulnerables_len as u32) .saturating_add(T::DbWeight::get().reads_writes(2, 1)) } else { @@ -83,8 +83,8 @@ pub mod v1 { "after migration, there should be the same number of invulnerables" ); - let onchain_version = Pallet::::on_chain_storage_version(); - frame_support::ensure!(onchain_version >= 1, "must_upgrade"); + let on_chain_version = Pallet::::on_chain_storage_version(); + frame_support::ensure!(on_chain_version >= 1, "must_upgrade"); Ok(()) } diff --git a/polkadot/runtime/common/src/assigned_slots/migration.rs b/polkadot/runtime/common/src/assigned_slots/migration.rs index ba3108c0aa38..def6bad692a2 100644 --- a/polkadot/runtime/common/src/assigned_slots/migration.rs +++ b/polkadot/runtime/common/src/assigned_slots/migration.rs @@ -29,14 +29,14 @@ pub mod v1 { impl OnRuntimeUpgrade for VersionUncheckedMigrateToV1 { #[cfg(feature = "try-runtime")] fn pre_upgrade() -> Result, sp_runtime::TryRuntimeError> { - let onchain_version = Pallet::::on_chain_storage_version(); - ensure!(onchain_version < 1, "assigned_slots::MigrateToV1 migration can be deleted"); + let on_chain_version = Pallet::::on_chain_storage_version(); + ensure!(on_chain_version < 1, "assigned_slots::MigrateToV1 migration can be deleted"); Ok(Default::default()) } fn on_runtime_upgrade() -> frame_support::weights::Weight { - let onchain_version = Pallet::::on_chain_storage_version(); - if onchain_version < 1 { + let on_chain_version = Pallet::::on_chain_storage_version(); + if on_chain_version < 1 { const MAX_PERMANENT_SLOTS: u32 = 100; const MAX_TEMPORARY_SLOTS: u32 = 100; @@ -52,8 +52,8 @@ pub mod v1 { #[cfg(feature = "try-runtime")] fn post_upgrade(_state: Vec) -> Result<(), sp_runtime::TryRuntimeError> { - let onchain_version = Pallet::::on_chain_storage_version(); - ensure!(onchain_version == 1, "assigned_slots::MigrateToV1 needs to be run"); + let on_chain_version = Pallet::::on_chain_storage_version(); + ensure!(on_chain_version == 1, "assigned_slots::MigrateToV1 needs to be run"); assert_eq!(>::get(), 100); assert_eq!(>::get(), 100); Ok(()) diff --git a/polkadot/runtime/common/src/crowdloan/migration.rs b/polkadot/runtime/common/src/crowdloan/migration.rs index 5133c14ada92..3afd6b3fbc94 100644 --- a/polkadot/runtime/common/src/crowdloan/migration.rs +++ b/polkadot/runtime/common/src/crowdloan/migration.rs @@ -24,9 +24,9 @@ use frame_support::{ pub struct MigrateToTrackInactiveV2(sp_std::marker::PhantomData); impl OnRuntimeUpgrade for MigrateToTrackInactiveV2 { fn on_runtime_upgrade() -> Weight { - let onchain_version = Pallet::::on_chain_storage_version(); + let on_chain_version = Pallet::::on_chain_storage_version(); - if onchain_version == 1 { + if on_chain_version == 1 { let mut translated = 0u64; for item in Funds::::iter_values() { let b = diff --git a/substrate/client/executor/src/executor.rs b/substrate/client/executor/src/executor.rs index 499bb704b169..d56a3b389ef4 100644 --- a/substrate/client/executor/src/executor.rs +++ b/substrate/client/executor/src/executor.rs @@ -518,7 +518,7 @@ where runtime_code, ext, heap_alloc_strategy, - |_, mut instance, _onchain_version, mut ext| { + |_, mut instance, _on_chain_version, mut ext| { with_externalities_safe(&mut **ext, move || instance.call_export(method, data)) }, ); @@ -682,18 +682,18 @@ impl CodeExecutor for NativeElseWasmExecut runtime_code, ext, heap_alloc_strategy, - |_, mut instance, onchain_version, mut ext| { - let onchain_version = - onchain_version.ok_or_else(|| Error::ApiError("Unknown version".into()))?; + |_, mut instance, on_chain_version, mut ext| { + let on_chain_version = + on_chain_version.ok_or_else(|| Error::ApiError("Unknown version".into()))?; let can_call_with = - onchain_version.can_call_with(&self.native_version.runtime_version); + on_chain_version.can_call_with(&self.native_version.runtime_version); if use_native && can_call_with { tracing::trace!( target: "executor", native = %self.native_version.runtime_version, - chain = %onchain_version, + chain = %on_chain_version, "Request for native execution succeeded", ); @@ -705,7 +705,7 @@ impl CodeExecutor for NativeElseWasmExecut tracing::trace!( target: "executor", native = %self.native_version.runtime_version, - chain = %onchain_version, + chain = %on_chain_version, "Request for native execution failed", ); } diff --git a/substrate/frame/alliance/src/migration.rs b/substrate/frame/alliance/src/migration.rs index c1b1eccf6897..432f09a16f47 100644 --- a/substrate/frame/alliance/src/migration.rs +++ b/substrate/frame/alliance/src/migration.rs @@ -24,14 +24,14 @@ pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(2); /// Wrapper for all migrations of this pallet. pub fn migrate, I: 'static>() -> Weight { - let onchain_version = Pallet::::on_chain_storage_version(); + let on_chain_version = Pallet::::on_chain_storage_version(); let mut weight: Weight = Weight::zero(); - if onchain_version < 1 { + if on_chain_version < 1 { weight = weight.saturating_add(v0_to_v1::migrate::()); } - if onchain_version < 2 { + if on_chain_version < 2 { weight = weight.saturating_add(v1_to_v2::migrate::()); } diff --git a/substrate/frame/assets/src/migration.rs b/substrate/frame/assets/src/migration.rs index f0169b06bb13..dd7c12293e80 100644 --- a/substrate/frame/assets/src/migration.rs +++ b/substrate/frame/assets/src/migration.rs @@ -68,8 +68,8 @@ pub mod v1 { impl OnRuntimeUpgrade for MigrateToV1 { fn on_runtime_upgrade() -> Weight { let in_code_version = Pallet::::in_code_storage_version(); - let onchain_version = Pallet::::on_chain_storage_version(); - if onchain_version == 0 && in_code_version == 1 { + let on_chain_version = Pallet::::on_chain_storage_version(); + if on_chain_version == 0 && in_code_version == 1 { let mut translated = 0u64; Asset::::translate::< OldAssetDetails>, @@ -117,12 +117,12 @@ pub mod v1 { ); let in_code_version = Pallet::::in_code_storage_version(); - let onchain_version = Pallet::::on_chain_storage_version(); + let on_chain_version = Pallet::::on_chain_storage_version(); frame_support::ensure!(in_code_version == 1, "must_upgrade"); ensure!( - in_code_version == onchain_version, - "after migration, the in_code_version and onchain_version should be the same" + in_code_version == on_chain_version, + "after migration, the in_code_version and on_chain_version should be the same" ); Asset::::iter().try_for_each(|(_id, asset)| -> Result<(), TryRuntimeError> { diff --git a/substrate/frame/balances/src/migration.rs b/substrate/frame/balances/src/migration.rs index ba6819ec6e81..38d9c07ff7e0 100644 --- a/substrate/frame/balances/src/migration.rs +++ b/substrate/frame/balances/src/migration.rs @@ -22,9 +22,9 @@ use frame_support::{ }; fn migrate_v0_to_v1, I: 'static>(accounts: &[T::AccountId]) -> Weight { - let onchain_version = Pallet::::on_chain_storage_version(); + let on_chain_version = Pallet::::on_chain_storage_version(); - if onchain_version == 0 { + if on_chain_version == 0 { let total = accounts .iter() .map(|a| Pallet::::total_balance(a)) @@ -76,9 +76,9 @@ impl, A: Get>, I: 'static> OnRuntimeUpgrade pub struct ResetInactive(PhantomData<(T, I)>); impl, I: 'static> OnRuntimeUpgrade for ResetInactive { fn on_runtime_upgrade() -> Weight { - let onchain_version = Pallet::::on_chain_storage_version(); + let on_chain_version = Pallet::::on_chain_storage_version(); - if onchain_version == 1 { + if on_chain_version == 1 { // Remove the old `StorageVersion` type. frame_support::storage::unhashed::kill(&frame_support::storage::storage_prefix( Pallet::::name().as_bytes(), diff --git a/substrate/frame/nfts/src/migration.rs b/substrate/frame/nfts/src/migration.rs index d80833a2822a..8f82e092262f 100644 --- a/substrate/frame/nfts/src/migration.rs +++ b/substrate/frame/nfts/src/migration.rs @@ -55,16 +55,16 @@ pub mod v1 { impl OnRuntimeUpgrade for MigrateToV1 { fn on_runtime_upgrade() -> Weight { let in_code_version = Pallet::::in_code_storage_version(); - let onchain_version = Pallet::::on_chain_storage_version(); + let on_chain_version = Pallet::::on_chain_storage_version(); log::info!( target: LOG_TARGET, "Running migration with in-code storage version {:?} / onchain {:?}", in_code_version, - onchain_version + on_chain_version ); - if onchain_version == 0 && in_code_version == 1 { + if on_chain_version == 0 && in_code_version == 1 { let mut translated = 0u64; let mut configs_iterated = 0u64; Collection::::translate::< diff --git a/substrate/frame/referenda/src/migration.rs b/substrate/frame/referenda/src/migration.rs index b1609216d362..631eb7340e56 100644 --- a/substrate/frame/referenda/src/migration.rs +++ b/substrate/frame/referenda/src/migration.rs @@ -110,15 +110,15 @@ pub mod v1 { fn on_runtime_upgrade() -> Weight { let in_code_version = Pallet::::in_code_storage_version(); - let onchain_version = Pallet::::on_chain_storage_version(); + let on_chain_version = Pallet::::on_chain_storage_version(); let mut weight = T::DbWeight::get().reads(1); log::info!( target: TARGET, "running migration with in-code storage version {:?} / onchain {:?}.", in_code_version, - onchain_version + on_chain_version ); - if onchain_version != 0 { + if on_chain_version != 0 { log::warn!(target: TARGET, "skipping migration from v0 to v1."); return weight } @@ -149,8 +149,8 @@ pub mod v1 { #[cfg(feature = "try-runtime")] fn post_upgrade(state: Vec) -> Result<(), TryRuntimeError> { - let onchain_version = Pallet::::on_chain_storage_version(); - ensure!(onchain_version == 1, "must upgrade from version 0 to 1."); + let on_chain_version = Pallet::::on_chain_storage_version(); + ensure!(on_chain_version == 1, "must upgrade from version 0 to 1."); let pre_referendum_count: u32 = Decode::decode(&mut &state[..]) .expect("failed to decode the state from pre-upgrade."); let post_referendum_count = ReferendumInfoFor::::iter().count() as u32; From d76e813700f11116ff0703eed5a70c9687680138 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 28 Feb 2024 16:57:32 +1100 Subject: [PATCH 94/98] address comments --- .../frame_runtime_upgrades_and_migrations.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs b/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs index b99c4e847108..5537b246fac3 100644 --- a/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs +++ b/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs @@ -37,8 +37,9 @@ //! //! Self-contained pieces of logic that execute after a runtime upgrade are called "Migrations". //! -//! Migrations are typically used to 'migrate' pallet storage into a new layout when the expected -//! storage layout of a pallet changes, but they do anything including but not limited to: +//! The typical use case of a migration is to 'migrate' pallet storage from one layout to another, +//! for example when the encoding of a storage item is changed. However, they can also execute +//! arbitary logic such as: //! //! - Calling arbitrary pallet methods //! - Mutating arbitrary on-chain state @@ -108,8 +109,8 @@ //! longer or produce a PoV much larger than previously measured. //! //! Therefore, it is important to write migrations in such a way that the execution time or PoV size -//! it adds to the block cannot be easily manipulated. e.g., in your migration, do not iterate over -//! storage that can quickly or cheaply be bloated. +//! it adds to the block cannot be easily manipulated. e.g., do not iterate over storage that can +//! quickly or cheaply be bloated. //! //! If writing your migration in such a way is not possible, a multi block migration should be used //! instead. From 26bf39fc29b023e5702d315f697241c1b3162765 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 28 Feb 2024 16:59:06 +1100 Subject: [PATCH 95/98] address comments --- .../src/reference_docs/frame_runtime_upgrades_and_migrations.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs b/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs index 5537b246fac3..c7031cb16ff0 100644 --- a/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs +++ b/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs @@ -127,7 +127,7 @@ //! //! Suitable for migrations which could use arbitrary amounts of block weight. //! -//! TODO: Link to multi block migration example/s. +//! TODO: Link to multi block migration example/s once PR is merged (). //! //! [`GetStorageVersion`]: frame_support::traits::GetStorageVersion //! [`OnRuntimeUpgrade`]: frame_support::traits::OnRuntimeUpgrade From c58880518699945459cfa3abadaf9cfc176790e1 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 28 Feb 2024 17:51:07 +1100 Subject: [PATCH 96/98] address comments and make compile --- Cargo.lock | 26 +++++++++++++++++++ docs/sdk/Cargo.toml | 2 +- .../frame_runtime_upgrades_and_migrations.rs | 10 ++++--- .../single-block-migrations/src/mock.rs | 1 - 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 27ba43780eda..026786378d5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9965,6 +9965,26 @@ dependencies = [ "sp-std 14.0.0", ] +[[package]] +name = "pallet-example-single-block-migrations" +version = "0.0.1" +dependencies = [ + "docify", + "frame-executive", + "frame-support", + "frame-system", + "frame-try-runtime", + "log", + "pallet-balances", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 14.0.0", + "sp-version", +] + [[package]] name = "pallet-example-split" version = "10.0.0" @@ -10006,6 +10026,7 @@ dependencies = [ "pallet-example-frame-crate", "pallet-example-kitchensink", "pallet-example-offchain-worker", + "pallet-example-single-block-migrations", "pallet-example-split", "pallet-example-tasks", ] @@ -13385,6 +13406,8 @@ dependencies = [ "cumulus-pallet-parachain-system", "docify", "frame", + "frame-executive", + "frame-support", "frame-system", "kitchensink-runtime", "pallet-aura", @@ -13393,9 +13416,11 @@ dependencies = [ "pallet-collective", "pallet-default-config-example", "pallet-democracy", + "pallet-example-single-block-migrations", "pallet-examples", "pallet-multisig", "pallet-proxy", + "pallet-scheduler", "pallet-timestamp", "pallet-transaction-payment", "pallet-utility", @@ -13418,6 +13443,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", + "sp-version", "staging-chain-spec-builder", "staging-node-cli", "staging-parachain-info", diff --git a/docs/sdk/Cargo.toml b/docs/sdk/Cargo.toml index d33092971c6f..b1b60a2d77db 100644 --- a/docs/sdk/Cargo.toml +++ b/docs/sdk/Cargo.toml @@ -70,7 +70,7 @@ pallet-proxy = { path = "../../substrate/frame/proxy" } pallet-authorship = { path = "../../substrate/frame/authorship" } pallet-collective = { path = "../../substrate/frame/collective" } pallet-democracy = { path = "../../substrate/frame/democracy" } -frame-system = { path = "../../substrate/frame/system" } +pallet-scheduler = { path = "../../substrate/frame/scheduler" } # Primitives sp-io = { path = "../../substrate/primitives/io" } diff --git a/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs b/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs index c7031cb16ff0..b47e0cfd600a 100644 --- a/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs +++ b/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs @@ -6,7 +6,7 @@ //! 2. a state transition function //! //! In Substrate-based blockchains, state transition functions are referred to as -//! [runtimes](https://docs.substrate.io/learn/runtime-development/). +//! [runtimes](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/blockchain_state_machines/index.html). //! //! Traditionally, before Substrate, upgrading state transition functions required node //! operators to download new software and restart their nodes in a process called @@ -25,15 +25,17 @@ //! ## Performing a Runtime Upgrade //! //! To upgrade a runtime, an [`Origin`](frame_system::RawOrigin) with the necesarry permissions -//! (usually via governance) executes [`set_code`] (or [`set_code_without_checks`]) with the -//! desired new blob. +//! (usually via governance) changes the `:code` storage. Usually, this is performed via a call to +//! [`set_code`] (or [`set_code_without_checks`]) with the desired new runtime blob, scheduled +//! using [`pallet_scheduler`]. //! //! Prior to building the new runtime, don't forget to update the //! [`RuntimeVersion`](sp_version::RuntimeVersion). //! //! # Migrations //! -//! It is often desirable to define logic to execute immediately after runtime upgrades. +//! It is often desirable to define logic to execute immediately after runtime upgrades (see +//! [this diagram](frame::traits::Hooks)). //! //! Self-contained pieces of logic that execute after a runtime upgrade are called "Migrations". //! diff --git a/substrate/frame/examples/single-block-migrations/src/mock.rs b/substrate/frame/examples/single-block-migrations/src/mock.rs index f42d201bd607..02f72e01836f 100644 --- a/substrate/frame/examples/single-block-migrations/src/mock.rs +++ b/substrate/frame/examples/single-block-migrations/src/mock.rs @@ -55,7 +55,6 @@ impl pallet_balances::Config for MockRuntime { type WeightInfo = (); type FreezeIdentifier = (); type MaxFreezes = (); - type MaxHolds = (); } impl Config for MockRuntime {} From 3aa6ccdc9c949d33009b68f88d0fc6c7fa9b89e6 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 28 Feb 2024 17:52:35 +1100 Subject: [PATCH 97/98] Update docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs Co-authored-by: gupnik --- .../src/reference_docs/frame_runtime_upgrades_and_migrations.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs b/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs index b47e0cfd600a..7d870b432218 100644 --- a/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs +++ b/docs/sdk/src/reference_docs/frame_runtime_upgrades_and_migrations.rs @@ -106,7 +106,7 @@ //! ### Note on the Manipulability of PoV Size and Execution Time //! //! While [`try-runtime-cli`](https://github.com/paritytech/try-runtime-cli) can help ensure with -//! very high certianty that a migration will succeed given **existing** on-chain state, it cannot +//! very high certainty that a migration will succeed given **existing** on-chain state, it cannot //! prevent a malicious actor from manipulating state in a way that will cause the migration to take //! longer or produce a PoV much larger than previously measured. //! From 0f63e034c62818464cb2bb36aaa7b037f3e0de73 Mon Sep 17 00:00:00 2001 From: Liam Aharon Date: Wed, 28 Feb 2024 17:55:15 +1100 Subject: [PATCH 98/98] address comment --- substrate/frame/examples/single-block-migrations/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/frame/examples/single-block-migrations/src/lib.rs b/substrate/frame/examples/single-block-migrations/src/lib.rs index ce53d65951a3..86a9e5d6e95b 100644 --- a/substrate/frame/examples/single-block-migrations/src/lib.rs +++ b/substrate/frame/examples/single-block-migrations/src/lib.rs @@ -112,8 +112,8 @@ //! Note that the storage migration logic is attached to a standalone struct implementing //! [`OnRuntimeUpgrade`], rather than implementing the //! [`Hooks::on_runtime_upgrade`](frame_support::traits::Hooks::on_runtime_upgrade) hook directly on -//! the pallet. The pallet hook is better suited for executing other types of logic that needs to -//! execute on runtime upgrade, but not so much for storage migrations. +//! the pallet. The pallet hook is better suited for special types of logic that need to execute on +//! every runtime upgrade, but not so much for one-off storage migrations. //! //! ### `pub mod versioned` //!