From ff1205d96edcb2f2a01fd246448b8015bb64a532 Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Thu, 1 Feb 2024 15:34:46 +0100 Subject: [PATCH 01/18] Backport DepositReserveAsset fix --- Cargo.lock | 5 +- .../tests/assets/asset-hub-rococo/Cargo.toml | 1 + .../tests/assets/asset-hub-rococo/src/lib.rs | 5 +- .../src/tests/reserve_transfer.rs | 176 ++++++++++++++++++ .../runtimes/testing/penpal/src/xcm_config.rs | 49 +++-- polkadot/xcm/xcm-executor/Cargo.toml | 2 +- polkadot/xcm/xcm-executor/src/lib.rs | 17 ++ 7 files changed, 224 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 95efb3f7ad14..20e9f026ab72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -868,6 +868,7 @@ dependencies = [ "assert_matches", "asset-hub-rococo-runtime", "asset-test-utils", + "cumulus-pallet-parachain-system", "emulated-integration-tests-common", "frame-support", "pallet-asset-conversion", @@ -10828,7 +10829,7 @@ dependencies = [ [[package]] name = "pallet-staking" -version = "26.0.0" +version = "26.0.1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -18252,7 +18253,7 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "5.0.0" +version = "5.0.1" dependencies = [ "environmental", "frame-benchmarking", diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml index 80391e2dcc4a..49a507473476 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml @@ -30,3 +30,4 @@ asset-hub-rococo-runtime = { version = "0.10.0", path = "../../../../../runtimes emulated-integration-tests-common = { path = "../../../common", default-features = false, version = "1.0.0" } penpal-runtime = { version = "0.12.0", path = "../../../../../runtimes/testing/penpal" } rococo-system-emulated-network = { version = "0.1.0", path = "../../../networks/rococo-system" } +cumulus-pallet-parachain-system = { path = "../../../../../../pallets/parachain-system", default-features = false } diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs index 3ff8c37c6465..bc29ad8a5277 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs @@ -35,7 +35,7 @@ pub use emulated_integration_tests_common::{ test_parachain_is_trusted_teleporter, xcm_emulator::{ assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para, - RelayChain as Relay, Test, TestArgs, TestContext, TestExt, + RelayChain as Relay, Test, TestArgs, TestContext, TestExt, Parachain as ParachainTrait, }, xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution}, PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3, @@ -53,6 +53,8 @@ pub use rococo_system_emulated_network::{ PenpalAParaReceiver as PenpalAReceiver, PenpalAParaSender as PenpalASender, RococoRelay as Rococo, RococoRelayReceiver as RococoReceiver, RococoRelaySender as RococoSender, + PenpalBParaReceiver as PenpalBReceiver, PenpalBParaSender as PenpalBSender, + PenpalBPara as PenpalB, }; pub const ASSET_ID: u32 = 1; @@ -65,6 +67,7 @@ pub type RelayToParaTest = Test; pub type SystemParaToRelayTest = Test; pub type SystemParaToParaTest = Test; pub type ParaToSystemParaTest = Test; +pub type ParaToParaTest = Test; /// Returns a `TestArgs` instance to be used for the Relay Chain across integration tests pub fn relay_test_args( diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs index d0e9b72176bc..2a8315f7a047 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs @@ -14,6 +14,7 @@ // limitations under the License. use crate::*; +use frame_support::traits::Get; use asset_hub_rococo_runtime::xcm_config::XcmConfig as AssetHubRococoXcmConfig; use penpal_runtime::xcm_config::XcmConfig as PenpalRococoXcmConfig; use rococo_runtime::xcm_config::XcmConfig as RococoXcmConfig; @@ -110,6 +111,66 @@ fn para_to_system_para_sender_assertions(t: ParaToSystemParaTest) { ); } +fn para_to_para_sender_assertions(t: ParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + PenpalA::assert_xcm_pallet_attempted_complete(None); + assert_expected_events!( + PenpalA, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereign account + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == t.sender.account_id, + amount: *amount == t.args.amount, + }, + // XCM sent to relay reserve + RuntimeEvent::ParachainSystem( + cumulus_pallet_parachain_system::Event::UpwardMessageSent { .. } + ) => {}, + ] + ); +} + +fn para_to_para_relay_hop_assertions(t: ParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + let sov_penpal_a_on_rococo = + Rococo::sovereign_account_id_of(Rococo::child_location_of(PenpalA::para_id())); + let sov_penpal_b_on_rococo = + Rococo::sovereign_account_id_of(Rococo::child_location_of(PenpalB::para_id())); + assert_expected_events!( + Rococo, + vec![ + // Withdrawn from sender parachain SA + RuntimeEvent::Balances( + pallet_balances::Event::Withdraw { who, amount } + ) => { + who: *who == sov_penpal_a_on_rococo, + amount: *amount == t.args.amount, + }, + // Deposited to receiver parachain SA + RuntimeEvent::Balances( + pallet_balances::Event::Deposit { who, .. } + ) => { + who: *who == sov_penpal_b_on_rococo, + }, + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); +} + +fn para_to_para_receiver_assertions(_: ParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + PenpalB, + vec![ + RuntimeEvent::Balances(pallet_balances::Event::Deposit { .. }) => {}, + ] + ); +} + fn para_to_system_para_receiver_assertions(t: ParaToSystemParaTest) { type RuntimeEvent = ::RuntimeEvent; @@ -175,6 +236,121 @@ fn system_para_to_para_assets_receiver_assertions(_: Test) { ); } +// function assumes fees and assets have the same remote reserve +fn remote_reserve_transfer_program( + reserve: MultiLocation, + dest: MultiLocation, + beneficiary: MultiLocation, + assets: Vec, + fees: MultiAsset, + weight_limit: WeightLimit, +) -> Xcm { + let max_assets = assets.len() as u32; + let context = X1(Parachain(::ParachainInfo::get().into())); + // we spend up to half of fees for execution on reserve and other half for execution on + // destination + let (fees_half_1, fees_half_2) = match fees.fun { + Fungible(amount) => { + let fee1 = amount.saturating_div(2); + let fee2 = amount.saturating_sub(fee1); + assert!(fee1 > 0); + assert!(fee2 > 0); + (MultiAsset::from((fees.id.clone(), fee1)), MultiAsset::from((fees.id.clone(), fee2))) + }, + NonFungible(_) => unreachable!(), + }; + // identifies fee item as seen by `reserve` - to be used at reserve chain + let reserve_fees = fees_half_1.reanchored(&reserve, context).unwrap(); + // identifies fee item as seen by `dest` - to be used at destination chain + let dest_fees = fees_half_2.reanchored(&dest, context).unwrap(); + // identifies `dest` as seen by `reserve` + let dest = dest.reanchored(&reserve, context).unwrap(); + // xcm to be executed at dest + let xcm_on_dest = Xcm(vec![ + BuyExecution { fees: dest_fees, weight_limit: weight_limit.clone() }, + DepositAsset { assets: Wild(AllCounted(max_assets)), beneficiary }, + ]); + // xcm to be executed on reserve + let xcm_on_reserve = Xcm(vec![ + BuyExecution { fees: reserve_fees, weight_limit }, + DepositReserveAsset { assets: Wild(AllCounted(max_assets)), dest, xcm: xcm_on_dest }, + ]); + Xcm(vec![ + WithdrawAsset(assets.into()), + InitiateReserveWithdraw { + assets: Wild(AllCounted(max_assets)), + reserve, + xcm: xcm_on_reserve, + }, + ]) +} + +fn para_to_para_remote_reserve_transfer_native_assets(t: ParaToParaTest) -> DispatchResult { + let xcm = remote_reserve_transfer_program( + Parent.into(), + t.args.dest, + t.args.beneficiary, + t.args.assets.clone().into_inner(), + t.args.assets.into_inner().pop().unwrap(), + t.args.weight_limit, + ); + ::PolkadotXcm::execute( + t.signed_origin, + bx!(xcm::VersionedXcm::V3(xcm)), + Weight::MAX, + ) + .unwrap(); + Ok(()) +} + +/// Reserve Transfers of native asset from Parachain to Parachain (through Relay reserve) should +/// work +#[test] +fn reserve_transfer_native_asset_from_para_to_para() { + // Init values for Penpal Parachain + let destination = PenpalA::sibling_location_of(PenpalB::para_id()); + let beneficiary_id = PenpalBReceiver::get(); + let amount_to_send: Balance = ASSET_HUB_ROCOCO_ED * 10000; + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: PenpalASender::get(), + receiver: PenpalBReceiver::get(), + args: para_test_args(destination, beneficiary_id, amount_to_send, assets, None, 0), + }; + + let mut test = ParaToParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + let sender_as_seen_by_relay = Rococo::child_location_of(PenpalA::para_id()); + let sov_of_sender_on_relay = Rococo::sovereign_account_id_of(sender_as_seen_by_relay); + + // fund the PenpalA's SA on Rococo with the native tokens held in reserve + Rococo::fund_accounts(vec![(sov_of_sender_on_relay.into(), amount_to_send * 2)]); + + test.set_assertion::(para_to_para_sender_assertions); + test.set_assertion::(para_to_para_relay_hop_assertions); + test.set_assertion::(para_to_para_receiver_assertions); + test.set_dispatchable::(para_to_para_remote_reserve_transfer_native_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + let delivery_fees = PenpalA::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + // Sender's balance is reduced + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // Receiver's balance is increased + assert!(receiver_balance_after > receiver_balance_before); +} + fn relay_to_para_limited_reserve_transfer_assets(t: RelayToParaTest) -> DispatchResult { ::XcmPallet::limited_reserve_transfer_assets( t.signed_origin, diff --git a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs index 74d9a0b071d8..8cdc120b5edf 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -155,34 +155,29 @@ match_types! { }; } -pub type Barrier = TrailingSetTopicAsId< - DenyThenTry< - DenyReserveTransferToRelayChain, +pub type Barrier = TrailingSetTopicAsId<( + TakeWeightCredit, + // Expected responses are OK. + AllowKnownQueryResponses, + // Allow XCMs with some computed origins to pass through. + WithComputedOrigin< ( - TakeWeightCredit, - // Expected responses are OK. - AllowKnownQueryResponses, - // Allow XCMs with some computed origins to pass through. - WithComputedOrigin< - ( - // If the message is one that immediately attempts to pay for execution, then - // allow it. - AllowTopLevelPaidExecutionFrom, - // System Assets parachain, parent and its exec plurality get free - // execution - AllowExplicitUnpaidExecutionFrom<( - CommonGoodAssetsParachain, - ParentOrParentsExecutivePlurality, - )>, - // Subscriptions for version tracking are OK. - AllowSubscriptionsFrom, - ), - UniversalLocation, - ConstU32<8>, - >, + // If the message is one that immediately attempts to pay for execution, then + // allow it. + AllowTopLevelPaidExecutionFrom, + // System Assets parachain, parent and its exec plurality get free + // execution + AllowExplicitUnpaidExecutionFrom<( + CommonGoodAssetsParachain, + ParentOrParentsExecutivePlurality, + )>, + // Subscriptions for version tracking are OK. + AllowSubscriptionsFrom, ), + UniversalLocation, + ConstU32<8>, >, ->; +)>; /// Type alias to conveniently refer to `frame_system`'s `Config::AccountId`. pub type AccountIdOf = ::AccountId; @@ -259,7 +254,7 @@ impl xcm_executor::Config for XcmConfig { type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = Reserves; // no teleport trust established with other chains - type IsTeleporter = NativeAsset; + type IsTeleporter = (); type UniversalLocation = UniversalLocation; type Barrier = Barrier; type Weigher = FixedWeightBounds; @@ -298,7 +293,7 @@ impl pallet_xcm::Config for Runtime { type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; type ExecuteXcmOrigin = EnsureXcmOrigin; - type XcmExecuteFilter = Nothing; + type XcmExecuteFilter = Everything; // ^ Disable dispatchable execute on the XCM pallet. // Needs to be `Everything` for local testing. type XcmExecutor = XcmExecutor; diff --git a/polkadot/xcm/xcm-executor/Cargo.toml b/polkadot/xcm/xcm-executor/Cargo.toml index 489905db3a01..e937cd80ac1c 100644 --- a/polkadot/xcm/xcm-executor/Cargo.toml +++ b/polkadot/xcm/xcm-executor/Cargo.toml @@ -4,7 +4,7 @@ description = "An abstract and configurable XCM message executor." authors.workspace = true edition.workspace = true license.workspace = true -version = "5.0.0" +version = "5.0.1" [dependencies] impl-trait-for-tuples = "0.2.2" diff --git a/polkadot/xcm/xcm-executor/src/lib.rs b/polkadot/xcm/xcm-executor/src/lib.rs index ac256ea14899..368c6f1855e4 100644 --- a/polkadot/xcm/xcm-executor/src/lib.rs +++ b/polkadot/xcm/xcm-executor/src/lib.rs @@ -630,6 +630,20 @@ impl XcmExecutor { Ok(()) }, DepositReserveAsset { assets, dest, xcm } => { + // we need to do this take/put cycle to solve wildcards and get exact assets to be + // weighed + let to_weigh = self.holding.saturating_take(assets.clone()); + self.holding.subsume_assets(to_weigh.clone()); + + let mut message_to_weigh = + vec![ReserveAssetDeposited(to_weigh.into()), ClearOrigin]; + message_to_weigh.extend(xcm.0.clone().into_iter()); + let (_, fee) = + validate_send::(dest.clone(), Xcm(message_to_weigh))?; + // set aside fee to be charged by XcmSender + let parked_fee = self.holding.saturating_take(fee.into()); + + // now take assets to deposit (excluding parked_fee) let deposited = self.holding.saturating_take(assets); for asset in deposited.assets_iter() { Config::AssetTransactor::deposit_asset(&asset, &dest, Some(&self.context))?; @@ -639,6 +653,9 @@ impl XcmExecutor { let assets = Self::reanchored(deposited, &dest, None); let mut message = vec![ReserveAssetDeposited(assets), ClearOrigin]; message.extend(xcm.0.into_iter()); + + // put back parked_fee in holding register to be charged by XcmSender + self.holding.subsume_assets(parked_fee); self.send(dest, Xcm(message), FeeReason::DepositReserveAsset)?; Ok(()) }, From 977513dd737ab655caf9b278db5512fe61575032 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Tue, 30 Jan 2024 20:23:27 +0800 Subject: [PATCH 02/18] Backport transactional processing PR (#1222) (#3113) --- cumulus/pallets/xcmp-queue/src/mock.rs | 6 +- .../runtime/src/xcm_config.rs | 9 +- .../src/tests/reserve_transfer.rs | 447 ++++++++++++++++ .../src/tests/reserve_transfer.rs | 2 +- .../assets/asset-hub-kusama/src/lib.rs | 7 + .../assets/asset-hub-kusama/src/xcm_config.rs | 12 +- .../assets/asset-hub-polkadot/src/lib.rs | 7 + .../asset-hub-polkadot/src/xcm_config.rs | 12 +- .../assets/asset-hub-rococo/src/lib.rs | 7 + .../assets/asset-hub-rococo/src/xcm_config.rs | 3 +- .../assets/asset-hub-westend/src/lib.rs | 7 + .../asset-hub-westend/src/xcm_config.rs | 3 +- .../bridge-hubs/bridge-hub-kusama/src/lib.rs | 7 + .../bridge-hub-kusama/src/xcm_config.rs | 10 +- .../bridge-hub-polkadot/src/lib.rs | 7 + .../bridge-hub-polkadot/src/xcm_config.rs | 10 +- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 7 + .../bridge-hub-rococo/src/xcm_config.rs | 3 +- .../collectives-polkadot/src/xcm_config.rs | 12 +- .../contracts-rococo/src/xcm_config.rs | 5 +- .../glutton/glutton-kusama/src/xcm_config.rs | 5 +- .../runtimes/starters/shell/src/xcm_config.rs | 1 + .../runtimes/testing/penpal/src/xcm_config.rs | 11 +- .../testing/rococo-parachain/src/lib.rs | 4 +- cumulus/primitives/utility/src/lib.rs | 2 + .../core/prospective-parachains/src/tests.rs | 7 +- .../protocol/src/request_response/mod.rs | 3 +- polkadot/runtime/rococo/src/lib.rs | 7 + polkadot/runtime/rococo/src/xcm_config.rs | 11 +- .../runtime/test-runtime/src/xcm_config.rs | 6 +- polkadot/runtime/westend/src/lib.rs | 7 + polkadot/runtime/westend/src/xcm_config.rs | 9 +- .../src/fungible/mock.rs | 3 +- .../src/generic/benchmarking.rs | 8 +- .../pallet-xcm-benchmarks/src/generic/mock.rs | 9 +- .../pallet-xcm-benchmarks/src/generic/mod.rs | 4 + polkadot/xcm/pallet-xcm/src/mock.rs | 7 +- polkadot/xcm/src/v3/multiasset.rs | 2 +- polkadot/xcm/src/v3/traits.rs | 2 +- polkadot/xcm/xcm-builder/src/lib.rs | 81 +-- polkadot/xcm/xcm-builder/src/tests/mock.rs | 1 + .../xcm/xcm-builder/src/tests/pay/mock.rs | 2 + polkadot/xcm/xcm-builder/src/transactional.rs | 40 ++ polkadot/xcm/xcm-builder/src/weight.rs | 3 +- polkadot/xcm/xcm-builder/tests/mock/mod.rs | 1 + polkadot/xcm/xcm-executor/src/config.rs | 7 +- polkadot/xcm/xcm-executor/src/lib.rs | 493 +++++++++++------- polkadot/xcm/xcm-executor/src/traits/mod.rs | 7 +- .../src/traits/process_transaction.rs | 57 ++ .../xcm-simulator/example/src/parachain.rs | 5 +- .../xcm-simulator/example/src/relay_chain.rs | 5 +- .../xcm/xcm-simulator/fuzzer/src/parachain.rs | 7 +- .../xcm-simulator/fuzzer/src/relay_chain.rs | 6 +- prdoc/pr_1222.prdoc | 33 ++ .../bin/node/cli/tests/websocket_server.rs | 3 +- substrate/client/consensus/babe/src/tests.rs | 2 +- 56 files changed, 1129 insertions(+), 315 deletions(-) create mode 100644 cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/reserve_transfer.rs create mode 100644 polkadot/xcm/xcm-builder/src/transactional.rs create mode 100644 polkadot/xcm/xcm-executor/src/traits/process_transaction.rs create mode 100644 prdoc/pr_1222.prdoc diff --git a/cumulus/pallets/xcmp-queue/src/mock.rs b/cumulus/pallets/xcmp-queue/src/mock.rs index 7c3a3bd1bd02..a95143443251 100644 --- a/cumulus/pallets/xcmp-queue/src/mock.rs +++ b/cumulus/pallets/xcmp-queue/src/mock.rs @@ -30,7 +30,10 @@ use sp_runtime::{ BuildStorage, }; use xcm::prelude::*; -use xcm_builder::{CurrencyAdapter, FixedWeightBounds, IsConcrete, NativeAsset, ParentIsPreset}; +use xcm_builder::{ + CurrencyAdapter, FixedWeightBounds, FrameTransactionalProcessor, IsConcrete, NativeAsset, + ParentIsPreset, +}; use xcm_executor::traits::ConvertOrigin; type Block = frame_system::mocking::MockBlock; @@ -171,6 +174,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } pub type XcmRouter = ( diff --git a/cumulus/parachain-template/runtime/src/xcm_config.rs b/cumulus/parachain-template/runtime/src/xcm_config.rs index 752137c96f18..be493b4f19ef 100644 --- a/cumulus/parachain-template/runtime/src/xcm_config.rs +++ b/cumulus/parachain-template/runtime/src/xcm_config.rs @@ -15,10 +15,10 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, - FixedWeightBounds, IsConcrete, NativeAsset, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WithComputedOrigin, WithUniqueTopic, + FixedWeightBounds, FrameTransactionalProcessor, IsConcrete, NativeAsset, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, }; use xcm_executor::XcmExecutor; @@ -136,6 +136,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. diff --git a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/reserve_transfer.rs b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/reserve_transfer.rs new file mode 100644 index 000000000000..095ee87e839f --- /dev/null +++ b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/reserve_transfer.rs @@ -0,0 +1,447 @@ +// 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 asset_hub_westend_runtime::xcm_config::XcmConfig; +use westend_runtime::xcm_config::XcmConfig as WestendXcmConfig; + +fn relay_origin_assertions(t: RelayToSystemParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + Westend::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(629_384_000, 6_196))); + + assert_expected_events!( + Westend, + vec![ + // Amount to reserve transfer is transferred to System Parachain's Sovereign account + RuntimeEvent::Balances(pallet_balances::Event::Transfer { from, to, amount }) => { + from: *from == t.sender.account_id, + to: *to == Westend::sovereign_account_id_of( + t.args.dest + ), + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn system_para_dest_assertions(_t: RelayToSystemParaTest) { + AssetHubWestend::assert_dmp_queue_error(Error::WeightNotComputable); +} + +fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) { + AssetHubWestend::assert_xcm_pallet_attempted_error(Some(XcmError::Barrier)) +} + +fn system_para_to_para_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubWestend::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + 676_119_000, + 6196, + ))); + + assert_expected_events!( + AssetHubWestend, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereing account + RuntimeEvent::Balances( + pallet_balances::Event::Transfer { from, to, amount } + ) => { + from: *from == t.sender.account_id, + to: *to == AssetHubWestend::sovereign_account_id_of( + t.args.dest + ), + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn system_para_to_para_assets_assertions(t: SystemParaToParaTest) { + type RuntimeEvent = ::RuntimeEvent; + + AssetHubWestend::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( + 676_119_000, + 6196, + ))); + + assert_expected_events!( + AssetHubWestend, + vec![ + // Amount to reserve transfer is transferred to Parachain's Sovereing account + RuntimeEvent::Assets( + pallet_assets::Event::Transferred { asset_id, from, to, amount } + ) => { + asset_id: *asset_id == ASSET_ID, + from: *from == t.sender.account_id, + to: *to == AssetHubWestend::sovereign_account_id_of( + t.args.dest + ), + amount: *amount == t.args.amount, + }, + ] + ); +} + +fn relay_limited_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchResult { + ::XcmPallet::limited_reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn relay_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchResult { + ::XcmPallet::reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + ) +} + +fn system_para_limited_reserve_transfer_assets(t: SystemParaToRelayTest) -> DispatchResult { + ::PolkadotXcm::limited_reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn system_para_reserve_transfer_assets(t: SystemParaToRelayTest) -> DispatchResult { + ::PolkadotXcm::reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + ) +} + +fn system_para_to_para_limited_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { + ::PolkadotXcm::limited_reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + t.args.weight_limit, + ) +} + +fn system_para_to_para_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { + ::PolkadotXcm::reserve_transfer_assets( + t.signed_origin, + bx!(t.args.dest.into()), + bx!(t.args.beneficiary.into()), + bx!(t.args.assets.into()), + t.args.fee_asset_item, + ) +} + +/// Limited Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't +/// work +#[test] +fn limited_reserve_transfer_native_asset_from_relay_to_system_para_fails() { + // Init values for Relay Chain + let amount_to_send: Balance = WESTEND_ED * 1000; + let test_args = TestContext { + sender: WestendSender::get(), + receiver: AssetHubWestendReceiver::get(), + args: relay_test_args(amount_to_send), + }; + + let mut test = RelayToSystemParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(relay_origin_assertions); + test.set_assertion::(system_para_dest_assertions); + test.set_dispatchable::(relay_limited_reserve_transfer_assets); + test.assert(); + + let delivery_fees = Westend::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + assert_eq!(receiver_balance_before, receiver_balance_after); +} + +/// Limited Reserve Transfers of native asset from System Parachain to Relay Chain shoudln't work +#[test] +fn limited_reserve_transfer_native_asset_from_system_para_to_relay_fails() { + // Init values for System Parachain + let destination = AssetHubWestend::parent_location(); + let beneficiary_id = WestendReceiver::get(); + let amount_to_send: Balance = ASSET_HUB_WESTEND_ED * 1000; + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubWestendSender::get(), + receiver: WestendReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(system_para_to_relay_assertions); + test.set_dispatchable::(system_para_limited_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + assert_eq!(sender_balance_before, sender_balance_after); + assert_eq!(receiver_balance_before, receiver_balance_after); +} + +/// Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't work +#[test] +fn reserve_transfer_native_asset_from_relay_to_system_para_fails() { + // Init values for Relay Chain + let amount_to_send: Balance = WESTEND_ED * 1000; + let test_args = TestContext { + sender: WestendSender::get(), + receiver: AssetHubWestendReceiver::get(), + args: relay_test_args(amount_to_send), + }; + + let mut test = RelayToSystemParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(relay_origin_assertions); + test.set_assertion::(system_para_dest_assertions); + test.set_dispatchable::(relay_reserve_transfer_assets); + test.assert(); + + let delivery_fees = Westend::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::< + ::XcmSender, + >(test.args.assets, 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) + }); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + assert_eq!(receiver_balance_before, receiver_balance_after); +} + +/// Reserve Transfers of native asset from System Parachain to Relay Chain shouldn't work +#[test] +fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { + // Init values for System Parachain + let destination = AssetHubWestend::parent_location(); + let beneficiary_id = WestendReceiver::get(); + let amount_to_send: Balance = ASSET_HUB_WESTEND_ED * 1000; + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubWestendSender::get(), + receiver: WestendReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut test = SystemParaToRelayTest::new(test_args); + + let sender_balance_before = test.sender.balance; + let receiver_balance_before = test.receiver.balance; + + test.set_assertion::(system_para_to_relay_assertions); + test.set_dispatchable::(system_para_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + let receiver_balance_after = test.receiver.balance; + + assert_eq!(sender_balance_before, sender_balance_after); + assert_eq!(receiver_balance_before, receiver_balance_after); +} + +/// Limited Reserve Transfers of native asset from System Parachain to Parachain should work +#[test] +fn limited_reserve_transfer_native_asset_from_system_para_to_para() { + // Init values for System Parachain + let destination = AssetHubWestend::sibling_location_of(PenpalWestendA::para_id()); + let beneficiary_id = PenpalWestendAReceiver::get(); + let amount_to_send: Balance = ASSET_HUB_WESTEND_ED * 1000; + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubWestendSender::get(), + receiver: PenpalWestendAReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut test = SystemParaToParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + + test.set_assertion::(system_para_to_para_assertions); + // TODO: Add assertion for Penpal runtime. Right now message is failing with + // `UntrustedReserveLocation` + test.set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + + let delivery_fees = AssetHubWestend::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::<::XcmSender>( + test.args.assets.clone(), + 0, + test.args.weight_limit, + test.args.beneficiary, + test.args.dest, + ) + }); + + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // TODO: Check receiver balance when Penpal runtime is improved to propery handle reserve + // transfers +} + +/// Reserve Transfers of native asset from System Parachain to Parachain should work +#[test] +fn reserve_transfer_native_asset_from_system_para_to_para() { + // Init values for System Parachain + let destination = AssetHubWestend::sibling_location_of(PenpalWestendA::para_id()); + let beneficiary_id = PenpalWestendAReceiver::get(); + let amount_to_send: Balance = ASSET_HUB_WESTEND_ED * 1000; + let assets = (Parent, amount_to_send).into(); + + let test_args = TestContext { + sender: AssetHubWestendSender::get(), + receiver: PenpalWestendAReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut test = SystemParaToParaTest::new(test_args); + + let sender_balance_before = test.sender.balance; + + test.set_assertion::(system_para_to_para_assertions); + // TODO: Add assertion for Penpal runtime. Right now message is failing with + // `UntrustedReserveLocation` + test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); + test.assert(); + + let sender_balance_after = test.sender.balance; + + let delivery_fees = AssetHubWestend::execute_with(|| { + xcm_helpers::transfer_assets_delivery_fees::<::XcmSender>( + test.args.assets.clone(), + 0, + test.args.weight_limit, + test.args.beneficiary, + test.args.dest, + ) + }); + + assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); + // TODO: Check receiver balance when Penpal runtime is improved to propery handle reserve + // transfers +} + +/// Limited Reserve Transfers of a local asset from System Parachain to Parachain should work +#[test] +fn limited_reserve_transfer_asset_from_system_para_to_para() { + // Force create asset from Relay Chain and mint assets for System Parachain's sender account + AssetHubWestend::force_create_and_mint_asset( + ASSET_ID, + ASSET_MIN_BALANCE, + true, + AssetHubWestendSender::get(), + Some(Weight::from_parts(1_019_445_000, 200_000)), + ASSET_MIN_BALANCE * 1000000, + ); + + // Init values for System Parachain + let destination = AssetHubWestend::sibling_location_of(PenpalWestendA::para_id()); + let beneficiary_id = PenpalWestendAReceiver::get(); + let amount_to_send = ASSET_MIN_BALANCE * 1000; + let assets = + (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), amount_to_send) + .into(); + + let system_para_test_args = TestContext { + sender: AssetHubWestendSender::get(), + receiver: PenpalWestendAReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut system_para_test = SystemParaToParaTest::new(system_para_test_args); + + system_para_test.set_assertion::(system_para_to_para_assets_assertions); + // TODO: Add assertions when Penpal is able to manage assets + system_para_test + .set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); + system_para_test.assert(); +} + +/// Reserve Transfers of a local asset from System Parachain to Parachain should work +#[test] +fn reserve_transfer_asset_from_system_para_to_para() { + // Force create asset from Relay Chain and mint assets for System Parachain's sender account + AssetHubWestend::force_create_and_mint_asset( + ASSET_ID, + ASSET_MIN_BALANCE, + true, + AssetHubWestendSender::get(), + Some(Weight::from_parts(1_019_445_000, 200_000)), + ASSET_MIN_BALANCE * 1000000, + ); + + // Init values for System Parachain + let destination = AssetHubWestend::sibling_location_of(PenpalWestendA::para_id()); + let beneficiary_id = PenpalWestendAReceiver::get(); + let amount_to_send = ASSET_MIN_BALANCE * 1000; + let assets = + (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), amount_to_send) + .into(); + + let system_para_test_args = TestContext { + sender: AssetHubWestendSender::get(), + receiver: PenpalWestendAReceiver::get(), + args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), + }; + + let mut system_para_test = SystemParaToParaTest::new(system_para_test_args); + + system_para_test.set_assertion::(system_para_to_para_assets_assertions); + // TODO: Add assertions when Penpal is able to manage assets + system_para_test + .set_dispatchable::(system_para_to_para_reserve_transfer_assets); + system_para_test.assert(); +} diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs index 2a8315f7a047..ae67c4462e50 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs @@ -255,7 +255,7 @@ fn remote_reserve_transfer_program( let fee2 = amount.saturating_sub(fee1); assert!(fee1 > 0); assert!(fee2 > 0); - (MultiAsset::from((fees.id.clone(), fee1)), MultiAsset::from((fees.id.clone(), fee2))) + (MultiAsset::from((fees.id, fee1)), MultiAsset::from((fees.id, fee2))) }, NonFungible(_) => unreachable!(), }; diff --git a/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/lib.rs index e4ed77884bf3..3f0cc828bcf4 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/lib.rs @@ -1381,6 +1381,13 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: Concrete(KsmLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/xcm_config.rs index 05262e074103..9321f2b78625 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-kusama/src/xcm_config.rs @@ -41,11 +41,12 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, FungiblesAdapter, HashedDescription, IsConcrete, LocalMint, NoChecking, - ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + EnsureXcmOrigin, FrameTransactionalProcessor, FungiblesAdapter, HashedDescription, IsConcrete, + LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, + TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, + WithUniqueTopic, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -527,6 +528,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. 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 6f853b6f56ed..a5374948fb56 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/lib.rs @@ -1262,6 +1262,13 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: Concrete(DotLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/xcm_config.rs index b3c2ce4da76f..584d161e844e 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-polkadot/src/xcm_config.rs @@ -37,11 +37,12 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeFamily, DescribePalletTerminal, - EnsureXcmOrigin, FungiblesAdapter, HashedDescription, IsConcrete, LocalMint, NoChecking, - ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + EnsureXcmOrigin, FrameTransactionalProcessor, FungiblesAdapter, HashedDescription, IsConcrete, + LocalMint, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, StartsWith, StartsWithExplicitGlobalConsensus, + TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, + WithUniqueTopic, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -451,6 +452,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. 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 7a245e3b27fc..fed9dc80932f 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -1446,6 +1446,13 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: AssetId::Concrete(TokenLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs index b85cb76642fb..75a23dfaaa45 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs @@ -46,7 +46,7 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, - EnsureXcmOrigin, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, + EnsureXcmOrigin, FrameTransactionalProcessor, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NetworkExportTableItem, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, @@ -605,6 +605,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. 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 19d13fcaebd8..d45337776361 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -1581,6 +1581,13 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: AssetId::Concrete(WestendLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs index 17312c0f46ef..3ebf3e036fcd 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs @@ -46,7 +46,7 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, DescribeFamily, DescribePalletTerminal, - EnsureXcmOrigin, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, + EnsureXcmOrigin, FrameTransactionalProcessor, FungiblesAdapter, GlobalConsensusParachainConvertsFor, HashedDescription, IsConcrete, LocalMint, NetworkExportTableItem, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, StartsWith, @@ -611,6 +611,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs index b37507000842..1e59c60596ef 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs @@ -817,6 +817,13 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: Concrete(KsmRelayLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs index b3703eee8301..c533897c865b 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/xcm_config.rs @@ -32,10 +32,11 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, IsConcrete, ParentAsSuperuser, - ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FrameTransactionalProcessor, + IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -216,6 +217,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/lib.rs index 841bb4ee8611..72c2ccce8911 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/lib.rs @@ -818,6 +818,13 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: Concrete(DotRelayLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs index 61eee1c4c5a7..33a2264086fc 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-polkadot/src/xcm_config.rs @@ -32,10 +32,11 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, IsConcrete, ParentAsSuperuser, - ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FrameTransactionalProcessor, + IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -220,6 +221,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. 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 b039a5376389..00eb8d1594fb 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 @@ -937,6 +937,13 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: AssetId::Concrete(TokenLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 1436c5b96a33..91de36b61d96 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -48,7 +48,7 @@ use xcm_builder::{ AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, HandleFee, IsConcrete, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SiblingParachainConvertsVia, SignedAccountId32AsNative, FrameTransactionalProcessor, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, @@ -287,6 +287,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } pub type PriceForParentDelivery = diff --git a/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs b/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs index 71845650bd6c..99312d63a506 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs @@ -32,11 +32,12 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds, IsConcrete, - LocatableAssetId, OriginToPluralityVoice, ParentAsSuperuser, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, + DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds, + FrameTransactionalProcessor, IsConcrete, LocatableAssetId, OriginToPluralityVoice, + ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WithComputedOrigin, WithUniqueTopic, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -275,6 +276,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs index faee1c68fe6c..c6e03563428c 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/xcm_config.rs @@ -38,8 +38,8 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, - DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds, IsConcrete, - NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, + IsConcrete, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, @@ -209,6 +209,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. diff --git a/cumulus/parachains/runtimes/glutton/glutton-kusama/src/xcm_config.rs b/cumulus/parachains/runtimes/glutton/glutton-kusama/src/xcm_config.rs index fb7b78b79d2a..d278a859cb3b 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-kusama/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-kusama/src/xcm_config.rs @@ -24,8 +24,8 @@ use frame_support::{ }; use xcm::latest::prelude::*; use xcm_builder::{ - AllowExplicitUnpaidExecutionFrom, FixedWeightBounds, ParentAsSuperuser, ParentIsPreset, - SovereignSignedViaLocation, + AllowExplicitUnpaidExecutionFrom, FixedWeightBounds, FrameTransactionalProcessor, + ParentAsSuperuser, ParentIsPreset, SovereignSignedViaLocation, }; parameter_types! { @@ -84,6 +84,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/cumulus/parachains/runtimes/starters/shell/src/xcm_config.rs b/cumulus/parachains/runtimes/starters/shell/src/xcm_config.rs index ff773ca78161..c878bb6a70cd 100644 --- a/cumulus/parachains/runtimes/starters/shell/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/starters/shell/src/xcm_config.rs @@ -84,6 +84,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = (); } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs index 8cdc120b5edf..377c249dfb67 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -48,11 +48,11 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, - EnsureXcmOrigin, FixedWeightBounds, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, - ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WithComputedOrigin, WithUniqueTopic, + EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, FungiblesAdapter, + IsConcrete, LocalMint, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, + SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, + UsingComponents, WithComputedOrigin, WithUniqueTopic, }; use xcm_executor::{traits::JustTry, XcmExecutor}; @@ -274,6 +274,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } /// No local origins on this chain are allowed to dispatch XCM sends/executions. diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 6df00d43e8d3..fe68b744fc29 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -75,7 +75,8 @@ use parachains_common::{ }; use xcm_builder::{ AllowKnownQueryResponses, AllowSubscriptionsFrom, AsPrefixedGeneralIndex, ConvertedConcreteId, - FungiblesAdapter, LocalMint, TrailingSetTopicAsId, WithUniqueTopic, + FrameTransactionalProcessor, FungiblesAdapter, LocalMint, TrailingSetTopicAsId, + WithUniqueTopic, }; use xcm_executor::traits::JustTry; @@ -478,6 +479,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Local origins on this chain are allowed to dispatch XCM sends/executions. diff --git a/cumulus/primitives/utility/src/lib.rs b/cumulus/primitives/utility/src/lib.rs index 03f827d7ee2f..77d414bee95e 100644 --- a/cumulus/primitives/utility/src/lib.rs +++ b/cumulus/primitives/utility/src/lib.rs @@ -27,6 +27,7 @@ use frame_support::{ Get, }, weights::Weight, + CloneNoBound, }; use polkadot_runtime_common::xcm_sender::PriceForMessageDelivery; use sp_runtime::{traits::Saturating, SaturatedConversion}; @@ -101,6 +102,7 @@ struct AssetTraderRefunder { /// later refund purposes /// Important: Errors if the Trader is being called twice by 2 BuyExecution instructions /// Alternatively we could just return payment in the aforementioned case +#[derive(CloneNoBound)] pub struct TakeFirstAssetTrader< AccountId: Eq, FeeCharger: ChargeWeightInFungibles, diff --git a/polkadot/node/core/prospective-parachains/src/tests.rs b/polkadot/node/core/prospective-parachains/src/tests.rs index d2cd23fe95fc..7e369245c0e1 100644 --- a/polkadot/node/core/prospective-parachains/src/tests.rs +++ b/polkadot/node/core/prospective-parachains/src/tests.rs @@ -101,11 +101,8 @@ fn test_harness>( let mut view = View::new(); let subsystem = async move { - loop { - match run_iteration(&mut context, &mut view, &Metrics(None)).await { - Ok(()) => break, - Err(e) => panic!("{:?}", e), - } + if let Err(e) = run_iteration(&mut context, &mut view, &Metrics(None)).await { + panic!("{:?}", e); } view diff --git a/polkadot/node/network/protocol/src/request_response/mod.rs b/polkadot/node/network/protocol/src/request_response/mod.rs index 96f7adeb29ba..e2c2a78f106e 100644 --- a/polkadot/node/network/protocol/src/request_response/mod.rs +++ b/polkadot/node/network/protocol/src/request_response/mod.rs @@ -248,8 +248,7 @@ impl Protocol { name, fallback_names, max_request_size: 1_000, - /// Responses are just confirmation, in essence not even a bit. So 100 seems - /// plenty. + // Responses are just confirmation, in essence not even a bit. So 100 seems plenty. max_response_size: 100, request_timeout: DISPUTE_REQUEST_TIMEOUT, inbound_queue: tx, diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index a081afa367a7..605a33fd1aba 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -2237,6 +2237,13 @@ sp_api::impl_runtime_apis! { Ok((origin, ticket, assets)) } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: AssetId::Concrete(TokenLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { // Rococo doesn't support asset locking Err(BenchmarkError::Skip) diff --git a/polkadot/runtime/rococo/src/xcm_config.rs b/polkadot/runtime/rococo/src/xcm_config.rs index c8f8f59dae99..712290a0d38e 100644 --- a/polkadot/runtime/rococo/src/xcm_config.rs +++ b/polkadot/runtime/rococo/src/xcm_config.rs @@ -40,11 +40,11 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeBodyTerminal, - DescribeFamily, FixedWeightBounds, HashedDescription, IsChildSystemParachain, IsConcrete, - MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, - WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, - XcmFeeToAccount, + DescribeFamily, FixedWeightBounds, FrameTransactionalProcessor, HashedDescription, + IsChildSystemParachain, IsConcrete, MintLocation, OriginToPluralityVoice, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::XcmExecutor; @@ -201,6 +201,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } parameter_types! { diff --git a/polkadot/runtime/test-runtime/src/xcm_config.rs b/polkadot/runtime/test-runtime/src/xcm_config.rs index ae4faecf7001..041bf9822a15 100644 --- a/polkadot/runtime/test-runtime/src/xcm_config.rs +++ b/polkadot/runtime/test-runtime/src/xcm_config.rs @@ -22,8 +22,8 @@ use frame_support::{ use frame_system::EnsureRoot; use xcm::latest::prelude::*; use xcm_builder::{ - AllowUnpaidExecutionFrom, EnsureXcmOrigin, FixedWeightBounds, SignedAccountId32AsNative, - SignedToAccountId32, + AllowUnpaidExecutionFrom, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, + SignedAccountId32AsNative, SignedToAccountId32, }; use xcm_executor::{ traits::{TransactAsset, WeightTrader}, @@ -78,6 +78,7 @@ impl TransactAsset for DummyAssetTransactor { } } +#[derive(Clone)] pub struct DummyWeightTrader; impl WeightTrader for DummyWeightTrader { fn new() -> Self { @@ -125,6 +126,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = super::RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } impl pallet_xcm::Config for crate::Runtime { diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index c425fc3fd3d8..ec3eb49ca3ea 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -2332,6 +2332,13 @@ sp_api::impl_runtime_apis! { Ok((origin, ticket, assets)) } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: Concrete(TokenLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { // Westend doesn't support asset locking Err(BenchmarkError::Skip) diff --git a/polkadot/runtime/westend/src/xcm_config.rs b/polkadot/runtime/westend/src/xcm_config.rs index 9ab6470f6dae..57bdcdeb7ad2 100644 --- a/polkadot/runtime/westend/src/xcm_config.rs +++ b/polkadot/runtime/westend/src/xcm_config.rs @@ -41,10 +41,10 @@ use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, DescribeBodyTerminal, - DescribeFamily, HashedDescription, IsConcrete, MintLocation, OriginToPluralityVoice, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + DescribeFamily, FrameTransactionalProcessor, HashedDescription, IsConcrete, MintLocation, + OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, + TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, + WithUniqueTopic, XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::XcmExecutor; @@ -189,6 +189,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } parameter_types! { diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs index 9adc706fc18a..24dfb8df5092 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs @@ -26,7 +26,7 @@ use frame_support::{ use sp_core::H256; use sp_runtime::traits::{BlakeTwo256, IdentityLookup}; use xcm::latest::prelude::*; -use xcm_builder::{AllowUnpaidExecutionFrom, MintLocation}; +use xcm_builder::{AllowUnpaidExecutionFrom, FrameTransactionalProcessor, MintLocation}; type Block = frame_system::mocking::MockBlock; @@ -142,6 +142,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } impl crate::Config for Test { diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs index f1c48ba9b830..dfe63a0bf71f 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs @@ -125,11 +125,15 @@ benchmarks! { } refund_surplus { - let holding = T::worst_case_holding(0).into(); let mut executor = new_executor::(Default::default()); - executor.set_holding(holding); + let holding_assets = T::worst_case_holding(1); + // We can already buy execution since we'll load the holding register manually + let asset_for_fees = T::fee_asset().unwrap(); + let previous_xcm = Xcm(vec![BuyExecution { fees: asset_for_fees, weight_limit: Limited(Weight::from_parts(1337, 1337)) }]); + executor.set_holding(holding_assets.into()); executor.set_total_surplus(Weight::from_parts(1337, 1337)); executor.set_total_refunded(Weight::zero()); + executor.bench_process(previous_xcm).expect("Holding has been loaded, so we can buy execution here"); let instruction = Instruction::>::RefundSurplus; let xcm = Xcm(vec![instruction]); diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs index 710ff0d80192..011052998aeb 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs @@ -30,7 +30,7 @@ use xcm_builder::{ Assets, TestAssetExchanger, TestAssetLocker, TestAssetTrap, TestSubscriptionService, TestUniversalAliases, }, - AliasForeignAccountId32, AllowUnpaidExecutionFrom, + AliasForeignAccountId32, AllowUnpaidExecutionFrom, FrameTransactionalProcessor, }; use xcm_executor::traits::ConvertOrigin; @@ -136,6 +136,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Aliasers; + type TransactionalProcessor = FrameTransactionalProcessor; } parameter_types! { @@ -198,8 +199,12 @@ impl generic::Config for Test { Ok((Default::default(), ticket, assets)) } + fn fee_asset() -> Result { + Ok(MultiAsset { id: AssetId::Concrete(Here.into()), fun: Fungible(1_000_000) }) + } + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { - let assets: MultiAsset = (Concrete(Here.into()), 100).into(); + let assets: MultiAsset = (AssetId::Concrete(Here.into()), 100).into(); Ok((Default::default(), account_id_junction::(1).into(), assets)) } diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs index 11f7bba19a98..5f9aa1bfe6f3 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs @@ -76,6 +76,10 @@ pub mod pallet { /// Return an origin, ticket, and assets that can be trapped and claimed. fn claimable_asset() -> Result<(MultiLocation, MultiLocation, MultiAssets), BenchmarkError>; + /// Asset used to pay for fees. Used to buy weight in benchmarks, for example in + /// `refund_surplus`. + fn fee_asset() -> Result; + /// Return an unlocker, owner and assets that can be locked and unlocked. fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError>; diff --git a/polkadot/xcm/pallet-xcm/src/mock.rs b/polkadot/xcm/pallet-xcm/src/mock.rs index e744cefb162c..1b408f65b602 100644 --- a/polkadot/xcm/pallet-xcm/src/mock.rs +++ b/polkadot/xcm/pallet-xcm/src/mock.rs @@ -36,9 +36,9 @@ use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, Case, ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, CurrencyAdapter as XcmCurrencyAdapter, DescribeAllTerminal, - FixedRateOfFungible, FixedWeightBounds, FungiblesAdapter, HashedDescription, IsConcrete, - MatchedConvertedConcreteId, NoChecking, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, XcmFeeManagerFromComponents, XcmFeeToAccount, + FixedRateOfFungible, FixedWeightBounds, FrameTransactionalProcessor, FungiblesAdapter, + HashedDescription, IsConcrete, MatchedConvertedConcreteId, NoChecking, SignedAccountId32AsNative, + SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, XcmFeeManagerFromComponents, XcmFeeToAccount, }; use xcm_executor::{ traits::{Identity, JustTry}, @@ -505,6 +505,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } pub type LocalOriginToLocation = SignedToAccountId32; diff --git a/polkadot/xcm/src/v3/multiasset.rs b/polkadot/xcm/src/v3/multiasset.rs index 454120a1a7b9..c23fc82a92e3 100644 --- a/polkadot/xcm/src/v3/multiasset.rs +++ b/polkadot/xcm/src/v3/multiasset.rs @@ -504,7 +504,7 @@ impl TryFrom for MultiAsset { /// A `Vec` of `MultiAsset`s. /// /// There are a number of invariants which the construction and mutation functions must ensure are -/// maintained: +/// maintained in order to maintain polynomial time complexity during iteration: /// - It may contain no items of duplicate asset class; /// - All items must be ordered; /// - The number of items should grow no larger than `MAX_ITEMS_IN_MULTIASSETS`. diff --git a/polkadot/xcm/src/v3/traits.rs b/polkadot/xcm/src/v3/traits.rs index 1043d17b7106..0bc88d363b35 100644 --- a/polkadot/xcm/src/v3/traits.rs +++ b/polkadot/xcm/src/v3/traits.rs @@ -519,7 +519,7 @@ pub trait SendXcm { /// Intermediate value which connects the two phases of the send operation. type Ticket; - /// Check whether the given `_message` is deliverable to the given `_destination` and if so + /// Check whether the given `message` is deliverable to the given `destination` and if so /// determine the cost which will be paid by this chain to do so, returning a `Validated` token /// which can be used to enact delivery. /// diff --git a/polkadot/xcm/xcm-builder/src/lib.rs b/polkadot/xcm/xcm-builder/src/lib.rs index 455f17a5348c..f7f4f6fc0eef 100644 --- a/polkadot/xcm/xcm-builder/src/lib.rs +++ b/polkadot/xcm/xcm-builder/src/lib.rs @@ -26,26 +26,6 @@ mod tests; #[cfg(feature = "std")] pub mod test_utils; -mod location_conversion; -#[allow(deprecated)] -pub use location_conversion::ForeignChainAliasAccount; -pub use location_conversion::{ - Account32Hash, AccountId32Aliases, AccountKey20Aliases, AliasesIntoAccountId32, - ChildParachainConvertsVia, DescribeAccountId32Terminal, DescribeAccountIdTerminal, - DescribeAccountKey20Terminal, DescribeAllTerminal, DescribeBodyTerminal, DescribeFamily, - DescribeLocation, DescribePalletTerminal, DescribeTerminus, DescribeTreasuryVoiceTerminal, - GlobalConsensusConvertsFor, GlobalConsensusParachainConvertsFor, HashedDescription, - LocalTreasuryVoiceConvertsVia, ParentIsPreset, SiblingParachainConvertsVia, -}; - -mod origin_conversion; -pub use origin_conversion::{ - BackingToPlurality, ChildParachainAsNative, ChildSystemParachainAsSuperuser, EnsureXcmOrigin, - OriginToPluralityVoice, ParentAsSuperuser, RelayChainAsNative, SiblingParachainAsNative, - SiblingSystemParachainAsSuperuser, SignedAccountId32AsNative, SignedAccountKey20AsNative, - SignedToAccountId32, SovereignSignedViaLocation, -}; - mod asset_conversion; pub use asset_conversion::{ AsPrefixedGeneralIndex, ConvertedAbstractId, ConvertedConcreteId, MatchedConvertedConcreteId, @@ -61,9 +41,6 @@ pub use barriers::{ WithComputedOrigin, }; -mod process_xcm_message; -pub use process_xcm_message::ProcessXcmMessage; - mod currency_adapter; pub use currency_adapter::CurrencyAdapter; @@ -72,20 +49,25 @@ pub use fee_handling::{ deposit_or_burn_fee, HandleFee, XcmFeeManagerFromComponents, XcmFeeToAccount, }; +mod filter_asset_location; +pub use filter_asset_location::{AllAssets, Case, LocationWithAssetFilters, NativeAsset}; + mod fungibles_adapter; pub use fungibles_adapter::{ AssetChecking, DualMint, FungiblesAdapter, FungiblesMutateAdapter, FungiblesTransferAdapter, LocalMint, MintLocation, NoChecking, NonLocalMint, }; -mod nonfungibles_adapter; -pub use nonfungibles_adapter::{ - NonFungiblesAdapter, NonFungiblesMutateAdapter, NonFungiblesTransferAdapter, -}; - -mod weight; -pub use weight::{ - FixedRateOfFungible, FixedWeightBounds, TakeRevenue, UsingComponents, WeightInfoBounds, +mod location_conversion; +#[allow(deprecated)] +pub use location_conversion::ForeignChainAliasAccount; +pub use location_conversion::{ + Account32Hash, AccountId32Aliases, AccountKey20Aliases, AliasesIntoAccountId32, + ChildParachainConvertsVia, DescribeAccountId32Terminal, DescribeAccountIdTerminal, + DescribeAccountKey20Terminal, DescribeAllTerminal, DescribeBodyTerminal, DescribeFamily, + DescribeLocation, DescribePalletTerminal, DescribeTerminus, DescribeTreasuryVoiceTerminal, + GlobalConsensusConvertsFor, GlobalConsensusParachainConvertsFor, HashedDescription, + LocalTreasuryVoiceConvertsVia, ParentIsPreset, SiblingParachainConvertsVia, }; mod matches_location; @@ -97,12 +79,34 @@ pub use matches_token::{IsAbstract, IsConcrete}; mod matcher; pub use matcher::{CreateMatcher, MatchXcm, Matcher}; -mod filter_asset_location; -pub use filter_asset_location::{AllAssets, Case, LocationWithAssetFilters, NativeAsset}; +mod nonfungibles_adapter; +pub use nonfungibles_adapter::{ + NonFungiblesAdapter, NonFungiblesMutateAdapter, NonFungiblesTransferAdapter, +}; + +mod origin_aliases; +pub use origin_aliases::AliasForeignAccountId32; + +mod origin_conversion; +pub use origin_conversion::{ + BackingToPlurality, ChildParachainAsNative, ChildSystemParachainAsSuperuser, EnsureXcmOrigin, + OriginToPluralityVoice, ParentAsSuperuser, RelayChainAsNative, SiblingParachainAsNative, + SiblingSystemParachainAsSuperuser, SignedAccountId32AsNative, SignedAccountKey20AsNative, + SignedToAccountId32, SovereignSignedViaLocation, +}; + +mod pay; +pub use pay::{FixedLocation, LocatableAssetId, PayAccountId32OnChainOverXcm, PayOverXcm}; + +mod process_xcm_message; +pub use process_xcm_message::ProcessXcmMessage; mod routing; pub use routing::{WithTopicSource, WithUniqueTopic}; +mod transactional; +pub use transactional::FrameTransactionalProcessor; + mod universal_exports; pub use universal_exports::{ ensure_is_remote, BridgeBlobDispatcher, BridgeMessage, DispatchBlob, DispatchBlobError, @@ -110,14 +114,13 @@ pub use universal_exports::{ NetworkExportTableItem, SovereignPaidRemoteExporter, UnpaidLocalExporter, UnpaidRemoteExporter, }; -mod origin_aliases; -pub use origin_aliases::AliasForeignAccountId32; - -mod pay; -pub use pay::{FixedLocation, LocatableAssetId, PayAccountId32OnChainOverXcm, PayOverXcm}; - mod controller; pub use controller::{ Controller, ExecuteController, ExecuteControllerWeightInfo, QueryController, QueryControllerWeightInfo, QueryHandler, SendController, SendControllerWeightInfo, }; + +mod weight; +pub use weight::{ + FixedRateOfFungible, FixedWeightBounds, TakeRevenue, UsingComponents, WeightInfoBounds, +}; diff --git a/polkadot/xcm/xcm-builder/src/tests/mock.rs b/polkadot/xcm/xcm-builder/src/tests/mock.rs index 189274eb5f5b..f0c6236f2661 100644 --- a/polkadot/xcm/xcm-builder/src/tests/mock.rs +++ b/polkadot/xcm/xcm-builder/src/tests/mock.rs @@ -744,6 +744,7 @@ impl Config for TestConfig { type CallDispatcher = TestCall; type SafeCallFilter = Everything; type Aliasers = AliasForeignAccountId32; + type TransactionalProcessor = (); } pub fn fungible_multi_asset(location: MultiLocation, amount: u128) -> MultiAsset { diff --git a/polkadot/xcm/xcm-builder/src/tests/pay/mock.rs b/polkadot/xcm/xcm-builder/src/tests/pay/mock.rs index 78b9284c689f..3be6a0aa9b1c 100644 --- a/polkadot/xcm/xcm-builder/src/tests/pay/mock.rs +++ b/polkadot/xcm/xcm-builder/src/tests/pay/mock.rs @@ -178,6 +178,7 @@ type OriginConverter = ( ); type Barrier = AllowUnpaidExecutionFrom; +#[derive(Clone)] pub struct DummyWeightTrader; impl WeightTrader for DummyWeightTrader { fn new() -> Self { @@ -220,6 +221,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = (); } parameter_types! { diff --git a/polkadot/xcm/xcm-builder/src/transactional.rs b/polkadot/xcm/xcm-builder/src/transactional.rs new file mode 100644 index 000000000000..ffe379b0ed41 --- /dev/null +++ b/polkadot/xcm/xcm-builder/src/transactional.rs @@ -0,0 +1,40 @@ +// Copyright 2021 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 . + +use frame_support::storage::{with_transaction, TransactionOutcome}; +use sp_runtime::DispatchError; +use xcm::latest::prelude::*; +use xcm_executor::traits::ProcessTransaction; + +/// Transactional processor implementation using frame transactional layers. +pub struct FrameTransactionalProcessor; +impl ProcessTransaction for FrameTransactionalProcessor { + const IS_TRANSACTIONAL: bool = true; + + fn process(f: F) -> Result<(), XcmError> + where + F: FnOnce() -> Result<(), XcmError>, + { + with_transaction(|| -> TransactionOutcome> { + let output = f(); + match &output { + Ok(()) => TransactionOutcome::Commit(Ok(output)), + _ => TransactionOutcome::Rollback(Ok(output)), + } + }) + .map_err(|_| XcmError::ExceedsStackLimit)? + } +} diff --git a/polkadot/xcm/xcm-builder/src/weight.rs b/polkadot/xcm/xcm-builder/src/weight.rs index c16c52939a38..6b6f5f53ea1b 100644 --- a/polkadot/xcm/xcm-builder/src/weight.rs +++ b/polkadot/xcm/xcm-builder/src/weight.rs @@ -232,12 +232,13 @@ impl< } fn refund_weight(&mut self, weight: Weight, context: &XcmContext) -> Option { - log::trace!(target: "xcm::weight", "UsingComponents::refund_weight weight: {:?}, context: {:?}", weight, context); + log::trace!(target: "xcm::weight", "UsingComponents::refund_weight weight: {:?}, context: {:?}, available weight: {:?}, available amount: {:?}", weight, context, self.0, self.1); let weight = weight.min(self.0); let amount = WeightToFee::weight_to_fee(&weight); self.0 -= weight; self.1 = self.1.saturating_sub(amount); let amount: u128 = amount.saturated_into(); + log::trace!(target: "xcm::weight", "UsingComponents::refund_weight amount to refund: {:?}", amount); if amount > 0 { Some((AssetId::get(), amount).into()) } else { diff --git a/polkadot/xcm/xcm-builder/tests/mock/mod.rs b/polkadot/xcm/xcm-builder/tests/mock/mod.rs index 4f183c7a15b6..adb3f222a47f 100644 --- a/polkadot/xcm/xcm-builder/tests/mock/mod.rs +++ b/polkadot/xcm/xcm-builder/tests/mock/mod.rs @@ -206,6 +206,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = (); } pub type LocalOriginToLocation = SignedToAccountId32; diff --git a/polkadot/xcm/xcm-executor/src/config.rs b/polkadot/xcm/xcm-executor/src/config.rs index 2ff12cd7a539..8f7e5e2d455c 100644 --- a/polkadot/xcm/xcm-executor/src/config.rs +++ b/polkadot/xcm/xcm-executor/src/config.rs @@ -16,8 +16,8 @@ use crate::traits::{ AssetExchange, AssetLock, CallDispatcher, ClaimAssets, ConvertOrigin, DropAssets, ExportXcm, - FeeManager, OnResponse, ShouldExecute, TransactAsset, VersionChangeNotifier, WeightBounds, - WeightTrader, + FeeManager, OnResponse, ProcessTransaction, ShouldExecute, TransactAsset, + VersionChangeNotifier, WeightBounds, WeightTrader, }; use frame_support::{ dispatch::{GetDispatchInfo, Parameter, PostDispatchInfo}, @@ -111,4 +111,7 @@ pub trait Config { /// Use this type to explicitly whitelist calls that cannot undergo recursion. This is a /// temporary measure until we properly account for proof size weights for XCM instructions. type SafeCallFilter: Contains; + + /// Transactional processor for XCM instructions. + type TransactionalProcessor: ProcessTransaction; } diff --git a/polkadot/xcm/xcm-executor/src/lib.rs b/polkadot/xcm/xcm-executor/src/lib.rs index 368c6f1855e4..217f1f7ba77a 100644 --- a/polkadot/xcm/xcm-executor/src/lib.rs +++ b/polkadot/xcm/xcm-executor/src/lib.rs @@ -19,7 +19,7 @@ use frame_support::{ dispatch::GetDispatchInfo, ensure, - traits::{Contains, ContainsPair, Get, PalletsInfoAccess}, + traits::{Contains, ContainsPair, Defensive, Get, PalletsInfoAccess}, }; use parity_scale_codec::{Decode, Encode}; use sp_core::defer; @@ -31,8 +31,9 @@ use xcm::latest::prelude::*; pub mod traits; use traits::{ validate_export, AssetExchange, AssetLock, CallDispatcher, ClaimAssets, ConvertOrigin, - DropAssets, Enact, ExportXcm, FeeManager, FeeReason, OnResponse, Properties, ShouldExecute, - TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader, XcmAssetTransfers, + DropAssets, Enact, ExportXcm, FeeManager, FeeReason, OnResponse, ProcessTransaction, + Properties, ShouldExecute, TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader, + XcmAssetTransfers, }; mod assets; @@ -302,6 +303,56 @@ impl XcmExecutor { } } + fn ensure_can_subsume_assets(&self, assets_length: usize) -> Result<(), XcmError> { + // worst-case, holding.len becomes 2 * holding_limit. + // this guarantees that if holding.len() == holding_limit and you have more than + // `holding_limit` items (which has a best case outcome of holding.len() == holding_limit), + // then the operation is guaranteed to succeed. + let worst_case_holding_len = self.holding.len() + assets_length; + log::trace!(target: "xcm::ensure_can_subsume_assets", "worst_case_holding_len: {:?}, holding_limit: {:?}", worst_case_holding_len, self.holding_limit); + ensure!(worst_case_holding_len <= self.holding_limit * 2, XcmError::HoldingWouldOverflow); + Ok(()) + } + + /// Refund any unused weight. + fn refund_surplus(&mut self) -> Result<(), XcmError> { + let current_surplus = self.total_surplus.saturating_sub(self.total_refunded); + log::trace!( + target: "xcm::refund_surplus", + "total_surplus: {:?}, total_refunded: {:?}, current_surplus: {:?}", + self.total_surplus, + self.total_refunded, + current_surplus, + ); + if current_surplus.any_gt(Weight::zero()) { + if let Some(w) = self.trader.refund_weight(current_surplus, &self.context) { + if !self.holding.contains_asset(&(w.id, 1).into()) && + self.ensure_can_subsume_assets(1).is_err() + { + let _ = self + .trader + .buy_weight(current_surplus, w.into(), &self.context) + .defensive_proof( + "refund_weight returned an asset capable of buying weight; qed", + ); + log::error!( + target: "xcm::refund_surplus", + "error: HoldingWouldOverflow", + ); + return Err(XcmError::HoldingWouldOverflow) + } + self.total_refunded.saturating_accrue(current_surplus); + self.holding.subsume_assets(w.into()); + } + } + log::trace!( + target: "xcm::refund_surplus", + "total_refunded: {:?}", + self.total_refunded, + ); + Ok(()) + } + #[cfg(feature = "runtime-benchmarks")] pub fn bench_process(&mut self, xcm: Xcm) -> Result<(), ExecutorError> { self.process(xcm) @@ -438,36 +489,6 @@ impl XcmExecutor { r } - fn subsume_asset(&mut self, asset: MultiAsset) -> Result<(), XcmError> { - // worst-case, holding.len becomes 2 * holding_limit. - ensure!(self.holding.len() < self.holding_limit * 2, XcmError::HoldingWouldOverflow); - self.holding.subsume(asset); - Ok(()) - } - - fn subsume_assets(&mut self, assets: Assets) -> Result<(), XcmError> { - // worst-case, holding.len becomes 2 * holding_limit. - // this guarantees that if holding.len() == holding_limit and you have holding_limit more - // items (which has a best case outcome of holding.len() == holding_limit), then you'll - // be guaranteed of making the operation. - let worst_case_holding_len = self.holding.len() + assets.len(); - ensure!(worst_case_holding_len <= self.holding_limit * 2, XcmError::HoldingWouldOverflow); - self.holding.subsume_assets(assets); - Ok(()) - } - - /// Refund any unused weight. - fn refund_surplus(&mut self) -> Result<(), XcmError> { - let current_surplus = self.total_surplus.saturating_sub(self.total_refunded); - if current_surplus.any_gt(Weight::zero()) { - self.total_refunded.saturating_accrue(current_surplus); - if let Some(w) = self.trader.refund_weight(current_surplus, &self.context) { - self.subsume_asset(w)?; - } - } - Ok(()) - } - /// Process a single XCM instruction, mutating the state of the XCM virtual machine. fn process_instruction( &mut self, @@ -480,74 +501,101 @@ impl XcmExecutor { ); match instr { WithdrawAsset(assets) => { - // Take `assets` from the origin account (on-chain) and place in holding. - let origin = *self.origin_ref().ok_or(XcmError::BadOrigin)?; - for asset in assets.into_inner().into_iter() { - Config::AssetTransactor::withdraw_asset(&asset, &origin, Some(&self.context))?; - self.subsume_asset(asset)?; - } - Ok(()) + let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?; + self.ensure_can_subsume_assets(assets.len())?; + Config::TransactionalProcessor::process(|| { + // Take `assets` from the origin account (on-chain)... + for asset in assets.inner() { + Config::AssetTransactor::withdraw_asset( + asset, + origin, + Some(&self.context), + )?; + } + Ok(()) + }) + .and_then(|_| { + // ...and place into holding. + self.holding.subsume_assets(assets.into()); + Ok(()) + }) }, ReserveAssetDeposited(assets) => { // check whether we trust origin to be our reserve location for this asset. - let origin = *self.origin_ref().ok_or(XcmError::BadOrigin)?; - for asset in assets.into_inner().into_iter() { + let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?; + self.ensure_can_subsume_assets(assets.len())?; + for asset in assets.inner() { // Must ensure that we recognise the asset as being managed by the origin. ensure!( - Config::IsReserve::contains(&asset, &origin), + Config::IsReserve::contains(asset, origin), XcmError::UntrustedReserveLocation ); - self.subsume_asset(asset)?; } + self.holding.subsume_assets(assets.into()); Ok(()) }, TransferAsset { assets, beneficiary } => { - // Take `assets` from the origin account (on-chain) and place into dest account. - let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?; - for asset in assets.inner() { - Config::AssetTransactor::transfer_asset( - &asset, - origin, - &beneficiary, - &self.context, - )?; - } - Ok(()) + Config::TransactionalProcessor::process(|| { + // Take `assets` from the origin account (on-chain) and place into dest account. + let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?; + for asset in assets.inner() { + Config::AssetTransactor::transfer_asset( + &asset, + origin, + &beneficiary, + &self.context, + )?; + } + Ok(()) + }) }, TransferReserveAsset { mut assets, dest, xcm } => { - let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?; - // Take `assets` from the origin account (on-chain) and place into dest account. - for asset in assets.inner() { - Config::AssetTransactor::transfer_asset(asset, origin, &dest, &self.context)?; - } - let reanchor_context = Config::UniversalLocation::get(); - assets.reanchor(&dest, reanchor_context).map_err(|()| XcmError::LocationFull)?; - let mut message = vec![ReserveAssetDeposited(assets), ClearOrigin]; - message.extend(xcm.0.into_iter()); - self.send(dest, Xcm(message), FeeReason::TransferReserveAsset)?; - Ok(()) + Config::TransactionalProcessor::process(|| { + let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?; + // Take `assets` from the origin account (on-chain) and place into dest account. + for asset in assets.inner() { + Config::AssetTransactor::transfer_asset( + asset, + origin, + &dest, + &self.context, + )?; + } + let reanchor_context = Config::UniversalLocation::get(); + assets + .reanchor(&dest, reanchor_context) + .map_err(|()| XcmError::LocationFull)?; + let mut message = vec![ReserveAssetDeposited(assets), ClearOrigin]; + message.extend(xcm.0.into_iter()); + self.send(dest, Xcm(message), FeeReason::TransferReserveAsset)?; + Ok(()) + }) }, ReceiveTeleportedAsset(assets) => { - let origin = *self.origin_ref().ok_or(XcmError::BadOrigin)?; - // check whether we trust origin to teleport this asset to us via config trait. - for asset in assets.inner() { - // We only trust the origin to send us assets that they identify as their - // sovereign assets. - ensure!( - Config::IsTeleporter::contains(asset, &origin), - XcmError::UntrustedTeleportLocation - ); - // We should check that the asset can actually be teleported in (for this to be - // in error, there would need to be an accounting violation by one of the - // trusted chains, so it's unlikely, but we don't want to punish a possibly - // innocent chain/user). - Config::AssetTransactor::can_check_in(&origin, asset, &self.context)?; - } - for asset in assets.into_inner().into_iter() { - Config::AssetTransactor::check_in(&origin, &asset, &self.context); - self.subsume_asset(asset)?; - } - Ok(()) + let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?; + self.ensure_can_subsume_assets(assets.len())?; + Config::TransactionalProcessor::process(|| { + // check whether we trust origin to teleport this asset to us via config trait. + for asset in assets.inner() { + // We only trust the origin to send us assets that they identify as their + // sovereign assets. + ensure!( + Config::IsTeleporter::contains(asset, origin), + XcmError::UntrustedTeleportLocation + ); + // We should check that the asset can actually be teleported in (for this to + // be in error, there would need to be an accounting violation by one of the + // trusted chains, so it's unlikely, but we don't want to punish a possibly + // innocent chain/user). + Config::AssetTransactor::can_check_in(origin, asset, &self.context)?; + Config::AssetTransactor::check_in(origin, asset, &self.context); + } + Ok(()) + }) + .and_then(|_| { + self.holding.subsume_assets(assets.into()); + Ok(()) + }) }, Transact { origin_kind, require_weight_at_most, mut call } => { // We assume that the Relay-chain is allowed to use transact on this parachain. @@ -619,79 +667,108 @@ impl XcmExecutor { Ok(()) }, DepositAsset { assets, beneficiary } => { - let deposited = self.holding.saturating_take(assets); - for asset in deposited.into_assets_iter() { - Config::AssetTransactor::deposit_asset( - &asset, - &beneficiary, - Some(&self.context), - )?; + let old_holding = self.holding.clone(); + let result = Config::TransactionalProcessor::process(|| { + let deposited = self.holding.saturating_take(assets); + for asset in deposited.into_assets_iter() { + Config::AssetTransactor::deposit_asset( + &asset, + &beneficiary, + Some(&self.context), + )?; + } + Ok(()) + }); + if Config::TransactionalProcessor::IS_TRANSACTIONAL && result.is_err() { + self.holding = old_holding; } - Ok(()) + result }, DepositReserveAsset { assets, dest, xcm } => { - // we need to do this take/put cycle to solve wildcards and get exact assets to be - // weighed - let to_weigh = self.holding.saturating_take(assets.clone()); - self.holding.subsume_assets(to_weigh.clone()); + let old_holding = self.holding.clone(); + let result = Config::TransactionalProcessor::process(|| { + // we need to do this take/put cycle to solve wildcards and get exact assets to + // be weighed + let to_weigh = self.holding.saturating_take(assets.clone()); + self.holding.subsume_assets(to_weigh.clone()); - let mut message_to_weigh = - vec![ReserveAssetDeposited(to_weigh.into()), ClearOrigin]; - message_to_weigh.extend(xcm.0.clone().into_iter()); - let (_, fee) = - validate_send::(dest.clone(), Xcm(message_to_weigh))?; - // set aside fee to be charged by XcmSender - let parked_fee = self.holding.saturating_take(fee.into()); + let mut message_to_weigh = + vec![ReserveAssetDeposited(to_weigh.into()), ClearOrigin]; + message_to_weigh.extend(xcm.0.clone().into_iter()); + let (_, fee) = validate_send::(dest, Xcm(message_to_weigh))?; + // set aside fee to be charged by XcmSender + let parked_fee = self.holding.saturating_take(fee.into()); - // now take assets to deposit (excluding parked_fee) - let deposited = self.holding.saturating_take(assets); - for asset in deposited.assets_iter() { - Config::AssetTransactor::deposit_asset(&asset, &dest, Some(&self.context))?; - } - // Note that we pass `None` as `maybe_failed_bin` and drop any assets which cannot - // be reanchored because we have already called `deposit_asset` on all assets. - let assets = Self::reanchored(deposited, &dest, None); - let mut message = vec![ReserveAssetDeposited(assets), ClearOrigin]; - message.extend(xcm.0.into_iter()); + // now take assets to deposit (excluding parked_fee) + let deposited = self.holding.saturating_take(assets); + for asset in deposited.assets_iter() { + Config::AssetTransactor::deposit_asset(&asset, &dest, Some(&self.context))?; + } + // Note that we pass `None` as `maybe_failed_bin` and drop any assets which + // cannot be reanchored because we have already called `deposit_asset` on all + // assets. + let assets = Self::reanchored(deposited, &dest, None); + let mut message = vec![ReserveAssetDeposited(assets), ClearOrigin]; + message.extend(xcm.0.into_iter()); - // put back parked_fee in holding register to be charged by XcmSender - self.holding.subsume_assets(parked_fee); - self.send(dest, Xcm(message), FeeReason::DepositReserveAsset)?; - Ok(()) + // put back parked_fee in holding register to be charged by XcmSender + self.holding.subsume_assets(parked_fee); + self.send(dest, Xcm(message), FeeReason::DepositReserveAsset)?; + Ok(()) + }); + if Config::TransactionalProcessor::IS_TRANSACTIONAL && result.is_err() { + self.holding = old_holding; + } + result }, InitiateReserveWithdraw { assets, reserve, xcm } => { - // Note that here we are able to place any assets which could not be reanchored - // back into Holding. - let assets = Self::reanchored( - self.holding.saturating_take(assets), - &reserve, - Some(&mut self.holding), - ); - let mut message = vec![WithdrawAsset(assets), ClearOrigin]; - message.extend(xcm.0.into_iter()); - self.send(reserve, Xcm(message), FeeReason::InitiateReserveWithdraw)?; - Ok(()) + let old_holding = self.holding.clone(); + let result = Config::TransactionalProcessor::process(|| { + // Note that here we are able to place any assets which could not be reanchored + // back into Holding. + let assets = Self::reanchored( + self.holding.saturating_take(assets), + &reserve, + Some(&mut self.holding), + ); + let mut message = vec![WithdrawAsset(assets), ClearOrigin]; + message.extend(xcm.0.into_iter()); + self.send(reserve, Xcm(message), FeeReason::InitiateReserveWithdraw)?; + Ok(()) + }); + if Config::TransactionalProcessor::IS_TRANSACTIONAL && result.is_err() { + self.holding = old_holding; + } + result }, InitiateTeleport { assets, dest, xcm } => { - // We must do this first in order to resolve wildcards. - let assets = self.holding.saturating_take(assets); - for asset in assets.assets_iter() { - // We should check that the asset can actually be teleported out (for this to - // be in error, there would need to be an accounting violation by ourselves, - // so it's unlikely, but we don't want to allow that kind of bug to leak into - // a trusted chain. - Config::AssetTransactor::can_check_out(&dest, &asset, &self.context)?; - } - for asset in assets.assets_iter() { - Config::AssetTransactor::check_out(&dest, &asset, &self.context); + let old_holding = self.holding.clone(); + let result = (|| -> Result<(), XcmError> { + // We must do this first in order to resolve wildcards. + let assets = self.holding.saturating_take(assets); + for asset in assets.assets_iter() { + // We should check that the asset can actually be teleported out (for this + // to be in error, there would need to be an accounting violation by + // ourselves, so it's unlikely, but we don't want to allow that kind of bug + // to leak into a trusted chain. + Config::AssetTransactor::can_check_out(&dest, &asset, &self.context)?; + } + // Note that we pass `None` as `maybe_failed_bin` and drop any assets which + // cannot be reanchored because we have already checked all assets out. + let reanchored_assets = Self::reanchored(assets.clone(), &dest, None); + let mut message = vec![ReceiveTeleportedAsset(reanchored_assets), ClearOrigin]; + message.extend(xcm.0.into_iter()); + self.send(dest, Xcm(message), FeeReason::InitiateTeleport)?; + + for asset in assets.assets_iter() { + Config::AssetTransactor::check_out(&dest, &asset, &self.context); + } + Ok(()) + })(); + if result.is_err() { + self.holding = old_holding; } - // Note that we pass `None` as `maybe_failed_bin` and drop any assets which cannot - // be reanchored because we have already checked all assets out. - let assets = Self::reanchored(assets, &dest, None); - let mut message = vec![ReceiveTeleportedAsset(assets), ClearOrigin]; - message.extend(xcm.0.into_iter()); - self.send(dest, Xcm(message), FeeReason::InitiateTeleport)?; - Ok(()) + result }, ReportHolding { response_info, assets } => { // Note that we pass `None` as `maybe_failed_bin` since no assets were ever removed @@ -707,18 +784,24 @@ impl XcmExecutor { Ok(()) }, BuyExecution { fees, weight_limit } => { - // There is no need to buy any weight is `weight_limit` is `Unlimited` since it + // There is no need to buy any weight if `weight_limit` is `Unlimited` since it // would indicate that `AllowTopLevelPaidExecutionFrom` was unused for execution // and thus there is some other reason why it has been determined that this XCM // should be executed. - if let Some(weight) = Option::::from(weight_limit) { - // pay for `weight` using up to `fees` of the holding register. - let max_fee = - self.holding.try_take(fees.into()).map_err(|_| XcmError::NotHoldingFees)?; + let Some(weight) = Option::::from(weight_limit) else { return Ok(()) }; + let old_holding = self.holding.clone(); + // pay for `weight` using up to `fees` of the holding register. + let max_fee = + self.holding.try_take(fees.into()).map_err(|_| XcmError::NotHoldingFees)?; + let result = || -> Result<(), XcmError> { let unspent = self.trader.buy_weight(weight, max_fee, &self.context)?; - self.subsume_assets(unspent)?; + self.holding.subsume_assets(unspent); + Ok(()) + }(); + if result.is_err() { + self.holding = old_holding; } - Ok(()) + result }, RefundSurplus => self.refund_surplus(), SetErrorHandler(mut handler) => { @@ -743,11 +826,10 @@ impl XcmExecutor { }, ClaimAsset { assets, ticket } => { let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?; + self.ensure_can_subsume_assets(assets.len())?; let ok = Config::AssetClaims::claim_assets(origin, &ticket, &assets, &self.context); ensure!(ok, XcmError::UnknownClaim); - for asset in assets.into_inner().into_iter() { - self.subsume_asset(asset)?; - } + self.holding.subsume_assets(assets.into()); Ok(()) }, Trap(code) => Err(XcmError::Trap(code)), @@ -865,8 +947,8 @@ impl XcmExecutor { let hash = (self.origin_ref(), &destination).using_encoded(blake2_128); let channel = u32::decode(&mut hash.as_ref()).unwrap_or(0); // Hash identifies the lane on the exporter which we use. We use the pairwise - // combination of the origin and destination to ensure origin/destination pairs will - // generally have their own lanes. + // combination of the origin and destination to ensure origin/destination pairs + // will generally have their own lanes. let (ticket, fee) = validate_export::( network, channel, @@ -874,22 +956,40 @@ impl XcmExecutor { destination, xcm, )?; - self.take_fee(fee, FeeReason::Export { network, destination })?; - Config::MessageExporter::deliver(ticket)?; - Ok(()) + let old_holding = self.holding.clone(); + let result = Config::TransactionalProcessor::process(|| { + self.take_fee(fee, FeeReason::Export { network, destination })?; + let _ = Config::MessageExporter::deliver(ticket).defensive_proof( + "`deliver` called immediately after `validate_export`; \ + `take_fee` does not affect the validity of the ticket; qed", + ); + Ok(()) + }); + if Config::TransactionalProcessor::IS_TRANSACTIONAL && result.is_err() { + self.holding = old_holding; + } + result }, LockAsset { asset, unlocker } => { - let origin = *self.origin_ref().ok_or(XcmError::BadOrigin)?; - let (remote_asset, context) = Self::try_reanchor(asset.clone(), &unlocker)?; - let lock_ticket = Config::AssetLocker::prepare_lock(unlocker, asset, origin)?; - let owner = - origin.reanchored(&unlocker, context).map_err(|_| XcmError::ReanchorFailed)?; - let msg = Xcm::<()>(vec![NoteUnlockable { asset: remote_asset, owner }]); - let (ticket, price) = validate_send::(unlocker, msg)?; - self.take_fee(price, FeeReason::LockAsset)?; - lock_ticket.enact()?; - Config::XcmSender::deliver(ticket)?; - Ok(()) + let old_holding = self.holding.clone(); + let result = Config::TransactionalProcessor::process(|| { + let origin = self.cloned_origin().ok_or(XcmError::BadOrigin)?; + let (remote_asset, context) = Self::try_reanchor(asset.clone(), &unlocker)?; + let lock_ticket = Config::AssetLocker::prepare_lock(unlocker, asset, origin)?; + let owner = origin + .reanchored(&unlocker, context) + .map_err(|_| XcmError::ReanchorFailed)?; + let msg = Xcm::<()>(vec![NoteUnlockable { asset: remote_asset, owner }]); + let (ticket, price) = validate_send::(unlocker, msg)?; + self.take_fee(price, FeeReason::LockAsset)?; + lock_ticket.enact()?; + Config::XcmSender::deliver(ticket)?; + Ok(()) + }); + if Config::TransactionalProcessor::IS_TRANSACTIONAL && result.is_err() { + self.holding = old_holding; + } + result }, UnlockAsset { asset, target } => { let origin = *self.origin_ref().ok_or(XcmError::BadOrigin)?; @@ -910,25 +1010,40 @@ impl XcmExecutor { let msg = Xcm::<()>(vec![UnlockAsset { asset: remote_asset, target: remote_target }]); let (ticket, price) = validate_send::(locker, msg)?; - self.take_fee(price, FeeReason::RequestUnlock)?; - reduce_ticket.enact()?; - Config::XcmSender::deliver(ticket)?; - Ok(()) + let old_holding = self.holding.clone(); + let result = Config::TransactionalProcessor::process(|| { + self.take_fee(price, FeeReason::RequestUnlock)?; + reduce_ticket.enact()?; + Config::XcmSender::deliver(ticket)?; + Ok(()) + }); + if Config::TransactionalProcessor::IS_TRANSACTIONAL && result.is_err() { + self.holding = old_holding; + } + result }, ExchangeAsset { give, want, maximal } => { + let old_holding = self.holding.clone(); let give = self.holding.saturating_take(give); - let r = - Config::AssetExchanger::exchange_asset(self.origin_ref(), give, &want, maximal); - let completed = r.is_ok(); - let received = r.unwrap_or_else(|a| a); - for asset in received.into_assets_iter() { - self.holding.subsume(asset); - } - if completed { - Ok(()) - } else { - Err(XcmError::NoDeal) + let result = (|| -> Result<(), XcmError> { + self.ensure_can_subsume_assets(want.len())?; + let exchange_result = Config::AssetExchanger::exchange_asset( + self.origin_ref(), + give, + &want, + maximal, + ); + if let Ok(received) = exchange_result { + self.holding.subsume_assets(received.into()); + Ok(()) + } else { + Err(XcmError::NoDeal) + } + })(); + if result.is_err() { + self.holding = old_holding; } + result }, SetFeesMode { jit_withdraw } => { self.fees_mode = FeesMode { jit_withdraw }; diff --git a/polkadot/xcm/xcm-executor/src/traits/mod.rs b/polkadot/xcm/xcm-executor/src/traits/mod.rs index 71e75c77e939..b445e84d3912 100644 --- a/polkadot/xcm/xcm-executor/src/traits/mod.rs +++ b/polkadot/xcm/xcm-executor/src/traits/mod.rs @@ -39,6 +39,8 @@ pub use token_matching::{ }; mod on_response; pub use on_response::{OnResponse, QueryHandler, QueryResponseStatus, VersionChangeNotifier}; +mod process_transaction; +pub use process_transaction::ProcessTransaction; mod should_execute; pub use should_execute::{CheckSuspension, Properties, ShouldExecute}; mod transact_asset; @@ -52,8 +54,9 @@ pub mod prelude { pub use super::{ export_xcm, validate_export, AssetExchange, AssetLock, ClaimAssets, ConvertOrigin, DropAssets, Enact, Error, ExportXcm, FeeManager, FeeReason, LockError, MatchesFungible, - MatchesFungibles, MatchesNonFungible, MatchesNonFungibles, OnResponse, ShouldExecute, - TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader, WithOriginFilter, + MatchesFungibles, MatchesNonFungible, MatchesNonFungibles, OnResponse, ProcessTransaction, + ShouldExecute, TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader, + WithOriginFilter, }; #[allow(deprecated)] pub use super::{Identity, JustTry}; diff --git a/polkadot/xcm/xcm-executor/src/traits/process_transaction.rs b/polkadot/xcm/xcm-executor/src/traits/process_transaction.rs new file mode 100644 index 000000000000..22ad8755b9c9 --- /dev/null +++ b/polkadot/xcm/xcm-executor/src/traits/process_transaction.rs @@ -0,0 +1,57 @@ +// Copyright 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 . + +use xcm::latest::prelude::*; + +/// Provides mechanisms for transactional processing of XCM instructions. +/// +/// This trait defines the behavior required to process XCM instructions in a transactional +/// manner. Implementers of this trait can ensure that XCM instructions are executed +/// atomically, meaning they either fully succeed or fully fail without any partial effects. +/// +/// Implementers of this trait can also choose to not process XCM instructions transactionally. +/// This is useful for cases where the implementer is not able to provide transactional guarantees. +/// In this case the `IS_TRANSACTIONAL` constant should be set to `false`. +/// The `()` type implements this trait in a non-transactional manner. +pub trait ProcessTransaction { + /// Whether or not the implementor of the this trait is actually transactional. + const IS_TRANSACTIONAL: bool; + + /// Processes an XCM instruction encapsulated within the provided closure. Responsible for + /// processing an XCM instruction transactionally. If the closure returns an error, any + /// changes made during its execution should be rolled back. In the case where the + /// implementer is not able to provide transactional guarantees, the closure should be + /// executed as is. + /// # Parameters + /// - `f`: A closure that encapsulates the XCM instruction being processed. It will return a + /// `Result` indicating the success or failure of the instruction. + /// + /// # Returns + /// - A `Result` indicating the overall success or failure of the transactional process. + fn process(f: F) -> Result<(), XcmError> + where + F: FnOnce() -> Result<(), XcmError>; +} + +impl ProcessTransaction for () { + const IS_TRANSACTIONAL: bool = false; + fn process(f: F) -> Result<(), XcmError> + where + F: FnOnce() -> Result<(), XcmError>, + { + f() + } +} diff --git a/polkadot/xcm/xcm-simulator/example/src/parachain.rs b/polkadot/xcm/xcm-simulator/example/src/parachain.rs index 9f0411970ce7..8976452c3d10 100644 --- a/polkadot/xcm/xcm-simulator/example/src/parachain.rs +++ b/polkadot/xcm/xcm-simulator/example/src/parachain.rs @@ -41,8 +41,8 @@ use xcm::{latest::prelude::*, VersionedXcm}; use xcm_builder::{ Account32Hash, AccountId32Aliases, AllowUnpaidExecutionFrom, ConvertedConcreteId, CurrencyAdapter as XcmCurrencyAdapter, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, - IsConcrete, NativeAsset, NoChecking, NonFungiblesAdapter, ParentIsPreset, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, + FrameTransactionalProcessor, IsConcrete, NativeAsset, NoChecking, NonFungiblesAdapter, + ParentIsPreset, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, }; use xcm_executor::{ @@ -250,6 +250,7 @@ impl Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } #[frame_support::pallet] diff --git a/polkadot/xcm/xcm-simulator/example/src/relay_chain.rs b/polkadot/xcm/xcm-simulator/example/src/relay_chain.rs index bdd7ff6d3eaf..cba62a9d69a6 100644 --- a/polkadot/xcm/xcm-simulator/example/src/relay_chain.rs +++ b/polkadot/xcm/xcm-simulator/example/src/relay_chain.rs @@ -37,8 +37,8 @@ use xcm_builder::{ Account32Hash, AccountId32Aliases, AllowUnpaidExecutionFrom, AsPrefixedGeneralIndex, ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, ConvertedConcreteId, CurrencyAdapter as XcmCurrencyAdapter, FixedRateOfFungible, - FixedWeightBounds, IsConcrete, NoChecking, NonFungiblesAdapter, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, + FixedWeightBounds, FrameTransactionalProcessor, IsConcrete, NoChecking, NonFungiblesAdapter, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, }; use xcm_executor::{traits::JustTry, Config, XcmExecutor}; @@ -195,6 +195,7 @@ impl Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } pub type LocalOriginToLocation = SignedToAccountId32; diff --git a/polkadot/xcm/xcm-simulator/fuzzer/src/parachain.rs b/polkadot/xcm/xcm-simulator/fuzzer/src/parachain.rs index 41234837aca0..f0befbbc2418 100644 --- a/polkadot/xcm/xcm-simulator/fuzzer/src/parachain.rs +++ b/polkadot/xcm/xcm-simulator/fuzzer/src/parachain.rs @@ -39,9 +39,9 @@ use polkadot_parachain_primitives::primitives::{ use xcm::{latest::prelude::*, VersionedXcm}; use xcm_builder::{ AccountId32Aliases, AllowUnpaidExecutionFrom, CurrencyAdapter as XcmCurrencyAdapter, - EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, IsConcrete, NativeAsset, - ParentIsPreset, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, + EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, FrameTransactionalProcessor, + IsConcrete, NativeAsset, ParentIsPreset, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, }; use xcm_executor::{Config, XcmExecutor}; @@ -163,6 +163,7 @@ impl Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } #[frame_support::pallet] diff --git a/polkadot/xcm/xcm-simulator/fuzzer/src/relay_chain.rs b/polkadot/xcm/xcm-simulator/fuzzer/src/relay_chain.rs index c9a57db970a7..8c44fad76423 100644 --- a/polkadot/xcm/xcm-simulator/fuzzer/src/relay_chain.rs +++ b/polkadot/xcm/xcm-simulator/fuzzer/src/relay_chain.rs @@ -36,8 +36,9 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowUnpaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, - CurrencyAdapter as XcmCurrencyAdapter, FixedRateOfFungible, FixedWeightBounds, IsConcrete, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, + CurrencyAdapter as XcmCurrencyAdapter, FixedRateOfFungible, FixedWeightBounds, + FrameTransactionalProcessor, IsConcrete, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, }; use xcm_executor::{Config, XcmExecutor}; @@ -159,6 +160,7 @@ impl Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } pub type LocalOriginToLocation = SignedToAccountId32; diff --git a/prdoc/pr_1222.prdoc b/prdoc/pr_1222.prdoc new file mode 100644 index 000000000000..82eb341649bc --- /dev/null +++ b/prdoc/pr_1222.prdoc @@ -0,0 +1,33 @@ +title: Transactional processing for XCM + +doc: + - audience: Runtime Dev + description: | + Transactional processing was introduced for certain XCM instructions. They are: + - WithdrawAsset + - ReserveAssetDeposited + - TransferAsset + - TransferReserveAsset + - ReceiveTeleportedAsset + - DepositAsset + - DepositReserveAsset + - InitiateReserveWithdraw + - InitiateTeleport + - BuyExecution + - ClaimAsset + - ExportMessage + - LockAsset + - UnlockAsset + - RequestUnlock + Developers must specify a `TransactionalProcessor` when configuring their XCM executor. + FRAME-based runtimes would simply need to configure it with `FrameTransactionalProcessor` to + enable transactional processing. To disable transactional processing of XCMs, `()` may also be + specified as the type for `TransactionalProcessor`. + For runtimes that are not FRAME-based but would like to still harness transactional processing + of XCMs, a type implementing the `ProcessTransaction` trait must be specified as the type for + `TransactionalProcessor`. This trait is for the purpose of connecting the chain's runtime + transactional processor with the XCM executor -- any implementation of `ProcessTransaction` is + possible to be assigned as the `TransactionalProcessor` for the XCM executor. + +crates: + - name: staging-xcm-executor diff --git a/substrate/bin/node/cli/tests/websocket_server.rs b/substrate/bin/node/cli/tests/websocket_server.rs index 432a4871cd37..b34fc82b8be8 100644 --- a/substrate/bin/node/cli/tests/websocket_server.rs +++ b/substrate/bin/node/cli/tests/websocket_server.rs @@ -205,8 +205,7 @@ impl WsServer { Ok(soketto::Data::Text(len)) => String::from_utf8(buf[..len].to_vec()) .map(Message::Text) .map_err(|err| Box::new(err) as Box<_>), - Ok(soketto::Data::Binary(len)) => Ok(buf[..len].to_vec()) - .map(Message::Binary), + Ok(soketto::Data::Binary(len)) => Ok(Message::Binary(buf[..len].to_vec())), Err(err) => Err(Box::new(err) as Box<_>), }; Some((ret, (receiver, buf))) diff --git a/substrate/client/consensus/babe/src/tests.rs b/substrate/client/consensus/babe/src/tests.rs index d097f37c3257..82bfa284650e 100644 --- a/substrate/client/consensus/babe/src/tests.rs +++ b/substrate/client/consensus/babe/src/tests.rs @@ -411,7 +411,7 @@ async fn run_one_test(mutator: impl Fn(&mut TestHeader, Stage) + Send + Sync + ' let mut net = net.lock(); net.poll(cx); for p in net.peers() { - for (h, e) in p.failed_verifications() { + if let Some((h, e)) = p.failed_verifications().into_iter().next() { panic!("Verification failed for {:?}: {}", h, e); } } From d65a423b5e045633b4d9e914c0ad25626a3813ed Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Thu, 1 Feb 2024 16:36:53 +0100 Subject: [PATCH 03/18] Version bumps --- cumulus/primitives/utility/Cargo.toml | 2 +- polkadot/xcm/pallet-xcm-benchmarks/Cargo.toml | 2 +- polkadot/xcm/xcm-builder/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cumulus/primitives/utility/Cargo.toml b/cumulus/primitives/utility/Cargo.toml index 9f7c5899e2bc..58a813c74090 100644 --- a/cumulus/primitives/utility/Cargo.toml +++ b/cumulus/primitives/utility/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-primitives-utility" -version = "0.5.0" +version = "0.5.1" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/polkadot/xcm/pallet-xcm-benchmarks/Cargo.toml b/polkadot/xcm/pallet-xcm-benchmarks/Cargo.toml index b66506b0b36b..78dc740a0aeb 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/Cargo.toml +++ b/polkadot/xcm/pallet-xcm-benchmarks/Cargo.toml @@ -3,7 +3,7 @@ name = "pallet-xcm-benchmarks" authors.workspace = true edition.workspace = true license.workspace = true -version = "5.0.0" +version = "5.0.1" description = "Benchmarks for the XCM pallet" [package.metadata.docs.rs] diff --git a/polkadot/xcm/xcm-builder/Cargo.toml b/polkadot/xcm/xcm-builder/Cargo.toml index 05155840c789..efedda1138f0 100644 --- a/polkadot/xcm/xcm-builder/Cargo.toml +++ b/polkadot/xcm/xcm-builder/Cargo.toml @@ -4,7 +4,7 @@ description = "Tools & types for building with XCM and its executor." authors.workspace = true edition.workspace = true license.workspace = true -version = "5.0.0" +version = "5.0.1" [dependencies] impl-trait-for-tuples = "0.2.1" From 0bb612d6ddf027c31ace17723c84750cf44cd150 Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Fri, 2 Feb 2024 12:30:34 +0100 Subject: [PATCH 04/18] Remove new file --- .../src/tests/reserve_transfer.rs | 447 ------------------ 1 file changed, 447 deletions(-) delete mode 100644 cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/reserve_transfer.rs diff --git a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/reserve_transfer.rs b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/reserve_transfer.rs deleted file mode 100644 index 095ee87e839f..000000000000 --- a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/reserve_transfer.rs +++ /dev/null @@ -1,447 +0,0 @@ -// 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 asset_hub_westend_runtime::xcm_config::XcmConfig; -use westend_runtime::xcm_config::XcmConfig as WestendXcmConfig; - -fn relay_origin_assertions(t: RelayToSystemParaTest) { - type RuntimeEvent = ::RuntimeEvent; - - Westend::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts(629_384_000, 6_196))); - - assert_expected_events!( - Westend, - vec![ - // Amount to reserve transfer is transferred to System Parachain's Sovereign account - RuntimeEvent::Balances(pallet_balances::Event::Transfer { from, to, amount }) => { - from: *from == t.sender.account_id, - to: *to == Westend::sovereign_account_id_of( - t.args.dest - ), - amount: *amount == t.args.amount, - }, - ] - ); -} - -fn system_para_dest_assertions(_t: RelayToSystemParaTest) { - AssetHubWestend::assert_dmp_queue_error(Error::WeightNotComputable); -} - -fn system_para_to_relay_assertions(_t: SystemParaToRelayTest) { - AssetHubWestend::assert_xcm_pallet_attempted_error(Some(XcmError::Barrier)) -} - -fn system_para_to_para_assertions(t: SystemParaToParaTest) { - type RuntimeEvent = ::RuntimeEvent; - - AssetHubWestend::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 676_119_000, - 6196, - ))); - - assert_expected_events!( - AssetHubWestend, - vec![ - // Amount to reserve transfer is transferred to Parachain's Sovereing account - RuntimeEvent::Balances( - pallet_balances::Event::Transfer { from, to, amount } - ) => { - from: *from == t.sender.account_id, - to: *to == AssetHubWestend::sovereign_account_id_of( - t.args.dest - ), - amount: *amount == t.args.amount, - }, - ] - ); -} - -fn system_para_to_para_assets_assertions(t: SystemParaToParaTest) { - type RuntimeEvent = ::RuntimeEvent; - - AssetHubWestend::assert_xcm_pallet_attempted_complete(Some(Weight::from_parts( - 676_119_000, - 6196, - ))); - - assert_expected_events!( - AssetHubWestend, - vec![ - // Amount to reserve transfer is transferred to Parachain's Sovereing account - RuntimeEvent::Assets( - pallet_assets::Event::Transferred { asset_id, from, to, amount } - ) => { - asset_id: *asset_id == ASSET_ID, - from: *from == t.sender.account_id, - to: *to == AssetHubWestend::sovereign_account_id_of( - t.args.dest - ), - amount: *amount == t.args.amount, - }, - ] - ); -} - -fn relay_limited_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchResult { - ::XcmPallet::limited_reserve_transfer_assets( - t.signed_origin, - bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), - bx!(t.args.assets.into()), - t.args.fee_asset_item, - t.args.weight_limit, - ) -} - -fn relay_reserve_transfer_assets(t: RelayToSystemParaTest) -> DispatchResult { - ::XcmPallet::reserve_transfer_assets( - t.signed_origin, - bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), - bx!(t.args.assets.into()), - t.args.fee_asset_item, - ) -} - -fn system_para_limited_reserve_transfer_assets(t: SystemParaToRelayTest) -> DispatchResult { - ::PolkadotXcm::limited_reserve_transfer_assets( - t.signed_origin, - bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), - bx!(t.args.assets.into()), - t.args.fee_asset_item, - t.args.weight_limit, - ) -} - -fn system_para_reserve_transfer_assets(t: SystemParaToRelayTest) -> DispatchResult { - ::PolkadotXcm::reserve_transfer_assets( - t.signed_origin, - bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), - bx!(t.args.assets.into()), - t.args.fee_asset_item, - ) -} - -fn system_para_to_para_limited_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { - ::PolkadotXcm::limited_reserve_transfer_assets( - t.signed_origin, - bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), - bx!(t.args.assets.into()), - t.args.fee_asset_item, - t.args.weight_limit, - ) -} - -fn system_para_to_para_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { - ::PolkadotXcm::reserve_transfer_assets( - t.signed_origin, - bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), - bx!(t.args.assets.into()), - t.args.fee_asset_item, - ) -} - -/// Limited Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't -/// work -#[test] -fn limited_reserve_transfer_native_asset_from_relay_to_system_para_fails() { - // Init values for Relay Chain - let amount_to_send: Balance = WESTEND_ED * 1000; - let test_args = TestContext { - sender: WestendSender::get(), - receiver: AssetHubWestendReceiver::get(), - args: relay_test_args(amount_to_send), - }; - - let mut test = RelayToSystemParaTest::new(test_args); - - let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; - - test.set_assertion::(relay_origin_assertions); - test.set_assertion::(system_para_dest_assertions); - test.set_dispatchable::(relay_limited_reserve_transfer_assets); - test.assert(); - - let delivery_fees = Westend::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets.clone(), 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) - }); - - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); - assert_eq!(receiver_balance_before, receiver_balance_after); -} - -/// Limited Reserve Transfers of native asset from System Parachain to Relay Chain shoudln't work -#[test] -fn limited_reserve_transfer_native_asset_from_system_para_to_relay_fails() { - // Init values for System Parachain - let destination = AssetHubWestend::parent_location(); - let beneficiary_id = WestendReceiver::get(); - let amount_to_send: Balance = ASSET_HUB_WESTEND_ED * 1000; - let assets = (Parent, amount_to_send).into(); - - let test_args = TestContext { - sender: AssetHubWestendSender::get(), - receiver: WestendReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), - }; - - let mut test = SystemParaToRelayTest::new(test_args); - - let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; - - test.set_assertion::(system_para_to_relay_assertions); - test.set_dispatchable::(system_para_limited_reserve_transfer_assets); - test.assert(); - - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - assert_eq!(sender_balance_before, sender_balance_after); - assert_eq!(receiver_balance_before, receiver_balance_after); -} - -/// Reserve Transfers of native asset from Relay Chain to the System Parachain shouldn't work -#[test] -fn reserve_transfer_native_asset_from_relay_to_system_para_fails() { - // Init values for Relay Chain - let amount_to_send: Balance = WESTEND_ED * 1000; - let test_args = TestContext { - sender: WestendSender::get(), - receiver: AssetHubWestendReceiver::get(), - args: relay_test_args(amount_to_send), - }; - - let mut test = RelayToSystemParaTest::new(test_args); - - let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; - - test.set_assertion::(relay_origin_assertions); - test.set_assertion::(system_para_dest_assertions); - test.set_dispatchable::(relay_reserve_transfer_assets); - test.assert(); - - let delivery_fees = Westend::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::< - ::XcmSender, - >(test.args.assets, 0, test.args.weight_limit, test.args.beneficiary, test.args.dest) - }); - - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); - assert_eq!(receiver_balance_before, receiver_balance_after); -} - -/// Reserve Transfers of native asset from System Parachain to Relay Chain shouldn't work -#[test] -fn reserve_transfer_native_asset_from_system_para_to_relay_fails() { - // Init values for System Parachain - let destination = AssetHubWestend::parent_location(); - let beneficiary_id = WestendReceiver::get(); - let amount_to_send: Balance = ASSET_HUB_WESTEND_ED * 1000; - let assets = (Parent, amount_to_send).into(); - - let test_args = TestContext { - sender: AssetHubWestendSender::get(), - receiver: WestendReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), - }; - - let mut test = SystemParaToRelayTest::new(test_args); - - let sender_balance_before = test.sender.balance; - let receiver_balance_before = test.receiver.balance; - - test.set_assertion::(system_para_to_relay_assertions); - test.set_dispatchable::(system_para_reserve_transfer_assets); - test.assert(); - - let sender_balance_after = test.sender.balance; - let receiver_balance_after = test.receiver.balance; - - assert_eq!(sender_balance_before, sender_balance_after); - assert_eq!(receiver_balance_before, receiver_balance_after); -} - -/// Limited Reserve Transfers of native asset from System Parachain to Parachain should work -#[test] -fn limited_reserve_transfer_native_asset_from_system_para_to_para() { - // Init values for System Parachain - let destination = AssetHubWestend::sibling_location_of(PenpalWestendA::para_id()); - let beneficiary_id = PenpalWestendAReceiver::get(); - let amount_to_send: Balance = ASSET_HUB_WESTEND_ED * 1000; - let assets = (Parent, amount_to_send).into(); - - let test_args = TestContext { - sender: AssetHubWestendSender::get(), - receiver: PenpalWestendAReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), - }; - - let mut test = SystemParaToParaTest::new(test_args); - - let sender_balance_before = test.sender.balance; - - test.set_assertion::(system_para_to_para_assertions); - // TODO: Add assertion for Penpal runtime. Right now message is failing with - // `UntrustedReserveLocation` - test.set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); - test.assert(); - - let sender_balance_after = test.sender.balance; - - let delivery_fees = AssetHubWestend::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::<::XcmSender>( - test.args.assets.clone(), - 0, - test.args.weight_limit, - test.args.beneficiary, - test.args.dest, - ) - }); - - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); - // TODO: Check receiver balance when Penpal runtime is improved to propery handle reserve - // transfers -} - -/// Reserve Transfers of native asset from System Parachain to Parachain should work -#[test] -fn reserve_transfer_native_asset_from_system_para_to_para() { - // Init values for System Parachain - let destination = AssetHubWestend::sibling_location_of(PenpalWestendA::para_id()); - let beneficiary_id = PenpalWestendAReceiver::get(); - let amount_to_send: Balance = ASSET_HUB_WESTEND_ED * 1000; - let assets = (Parent, amount_to_send).into(); - - let test_args = TestContext { - sender: AssetHubWestendSender::get(), - receiver: PenpalWestendAReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), - }; - - let mut test = SystemParaToParaTest::new(test_args); - - let sender_balance_before = test.sender.balance; - - test.set_assertion::(system_para_to_para_assertions); - // TODO: Add assertion for Penpal runtime. Right now message is failing with - // `UntrustedReserveLocation` - test.set_dispatchable::(system_para_to_para_reserve_transfer_assets); - test.assert(); - - let sender_balance_after = test.sender.balance; - - let delivery_fees = AssetHubWestend::execute_with(|| { - xcm_helpers::transfer_assets_delivery_fees::<::XcmSender>( - test.args.assets.clone(), - 0, - test.args.weight_limit, - test.args.beneficiary, - test.args.dest, - ) - }); - - assert_eq!(sender_balance_before - amount_to_send - delivery_fees, sender_balance_after); - // TODO: Check receiver balance when Penpal runtime is improved to propery handle reserve - // transfers -} - -/// Limited Reserve Transfers of a local asset from System Parachain to Parachain should work -#[test] -fn limited_reserve_transfer_asset_from_system_para_to_para() { - // Force create asset from Relay Chain and mint assets for System Parachain's sender account - AssetHubWestend::force_create_and_mint_asset( - ASSET_ID, - ASSET_MIN_BALANCE, - true, - AssetHubWestendSender::get(), - Some(Weight::from_parts(1_019_445_000, 200_000)), - ASSET_MIN_BALANCE * 1000000, - ); - - // Init values for System Parachain - let destination = AssetHubWestend::sibling_location_of(PenpalWestendA::para_id()); - let beneficiary_id = PenpalWestendAReceiver::get(); - let amount_to_send = ASSET_MIN_BALANCE * 1000; - let assets = - (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), amount_to_send) - .into(); - - let system_para_test_args = TestContext { - sender: AssetHubWestendSender::get(), - receiver: PenpalWestendAReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), - }; - - let mut system_para_test = SystemParaToParaTest::new(system_para_test_args); - - system_para_test.set_assertion::(system_para_to_para_assets_assertions); - // TODO: Add assertions when Penpal is able to manage assets - system_para_test - .set_dispatchable::(system_para_to_para_limited_reserve_transfer_assets); - system_para_test.assert(); -} - -/// Reserve Transfers of a local asset from System Parachain to Parachain should work -#[test] -fn reserve_transfer_asset_from_system_para_to_para() { - // Force create asset from Relay Chain and mint assets for System Parachain's sender account - AssetHubWestend::force_create_and_mint_asset( - ASSET_ID, - ASSET_MIN_BALANCE, - true, - AssetHubWestendSender::get(), - Some(Weight::from_parts(1_019_445_000, 200_000)), - ASSET_MIN_BALANCE * 1000000, - ); - - // Init values for System Parachain - let destination = AssetHubWestend::sibling_location_of(PenpalWestendA::para_id()); - let beneficiary_id = PenpalWestendAReceiver::get(); - let amount_to_send = ASSET_MIN_BALANCE * 1000; - let assets = - (X2(PalletInstance(ASSETS_PALLET_ID), GeneralIndex(ASSET_ID.into())), amount_to_send) - .into(); - - let system_para_test_args = TestContext { - sender: AssetHubWestendSender::get(), - receiver: PenpalWestendAReceiver::get(), - args: system_para_test_args(destination, beneficiary_id, amount_to_send, assets, None), - }; - - let mut system_para_test = SystemParaToParaTest::new(system_para_test_args); - - system_para_test.set_assertion::(system_para_to_para_assets_assertions); - // TODO: Add assertions when Penpal is able to manage assets - system_para_test - .set_dispatchable::(system_para_to_para_reserve_transfer_assets); - system_para_test.assert(); -} From 8b960fad3ef0e87b3e0520919692230013db673a Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Fri, 2 Feb 2024 12:35:55 +0100 Subject: [PATCH 05/18] Update lockfile --- Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 20e9f026ab72..2bbd907fa536 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4042,7 +4042,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" -version = "0.5.0" +version = "0.5.1" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -11199,7 +11199,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "5.0.0" +version = "5.0.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -18223,7 +18223,7 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "5.0.0" +version = "5.0.1" dependencies = [ "assert_matches", "frame-support", From 2cd89f4d5b5d78deed0cb680752e59bc119d8f18 Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Fri, 2 Feb 2024 13:13:27 +0100 Subject: [PATCH 06/18] Add missing TransactionalProcessor entries --- substrate/frame/contracts/mock-network/src/parachain.rs | 1 + substrate/frame/contracts/mock-network/src/relay_chain.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/substrate/frame/contracts/mock-network/src/parachain.rs b/substrate/frame/contracts/mock-network/src/parachain.rs index 1465b02f903b..024088db7990 100644 --- a/substrate/frame/contracts/mock-network/src/parachain.rs +++ b/substrate/frame/contracts/mock-network/src/parachain.rs @@ -285,6 +285,7 @@ impl Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = (); } impl mock_msg_queue::Config for Runtime { diff --git a/substrate/frame/contracts/mock-network/src/relay_chain.rs b/substrate/frame/contracts/mock-network/src/relay_chain.rs index c59c8e4bfa84..851b46f99828 100644 --- a/substrate/frame/contracts/mock-network/src/relay_chain.rs +++ b/substrate/frame/contracts/mock-network/src/relay_chain.rs @@ -179,6 +179,7 @@ impl Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = (); } pub type LocalOriginToLocation = SignedToAccountId32; From 2edef6dd716e2d65fb4c3caadba0a21894077f30 Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Fri, 2 Feb 2024 13:27:52 +0100 Subject: [PATCH 07/18] Add missing TransactionalProcessor entries --- .../runtimes/collectives/collectives-westend/src/xcm_config.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/xcm_config.rs index d58995827fa4..3ea04a2a80c1 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/xcm_config.rs @@ -41,7 +41,7 @@ use xcm_builder::{ RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount, FrameTransactionalProcessor, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -303,6 +303,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } /// Converts a local signed origin into an XCM multilocation. From b1d3d18442e7cdcc78d47514e9b593127d4d702c Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Fri, 2 Feb 2024 13:41:35 +0100 Subject: [PATCH 08/18] Fixes --- Cargo.lock | 3327 +++++++++-------- .../glutton/glutton-westend/src/xcm_config.rs | 1 + 2 files changed, 1780 insertions(+), 1548 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2bbd907fa536..6d976452e4c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -541,6 +541,35 @@ dependencies = [ "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", + "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=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "ark-transcript", + "digest 0.10.7", + "getrandom_or_panic", + "zeroize", +] + [[package]] name = "ark-serialize" version = "0.4.2" @@ -575,6 +604,19 @@ dependencies = [ "rayon", ] +[[package]] +name = "ark-transcript" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "digest 0.10.7", + "rand_core 0.6.4", + "sha3", +] + [[package]] name = "array-bytes" version = "4.2.0" @@ -702,153 +744,9 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" -[[package]] -name = "asset-hub-kusama-runtime" -version = "0.13.0" -dependencies = [ - "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", - "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-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-transaction-pool", - "sp-version", - "sp-weights", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", -] - -[[package]] -name = "asset-hub-polkadot-runtime" -version = "0.13.0" -dependencies = [ - "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", - "frame-system-benchmarking", - "frame-system-rpc-runtime-api", - "frame-try-runtime", - "hex-literal", - "log", - "pallet-asset-tx-payment", - "pallet-assets", - "pallet-aura", - "pallet-authorship", - "pallet-balances", - "pallet-collator-selection", - "pallet-message-queue", - "pallet-multisig", - "pallet-nfts", - "pallet-nfts-runtime-api", - "pallet-proxy", - "pallet-session", - "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-common", - "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-transaction-pool", - "sp-version", - "sp-weights", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", -] - [[package]] name = "asset-hub-rococo-emulated-chain" -version = "0.1.0" +version = "0.0.0" dependencies = [ "asset-hub-rococo-runtime", "cumulus-primitives-core", @@ -863,12 +761,11 @@ dependencies = [ [[package]] name = "asset-hub-rococo-integration-tests" -version = "0.1.0" +version = "1.0.0" dependencies = [ "assert_matches", "asset-hub-rococo-runtime", "asset-test-utils", - "cumulus-pallet-parachain-system", "emulated-integration-tests-common", "frame-support", "pallet-asset-conversion", @@ -878,7 +775,6 @@ dependencies = [ "pallet-xcm", "parachains-common", "parity-scale-codec", - "penpal-runtime", "rococo-runtime", "rococo-system-emulated-network", "sp-runtime", @@ -888,7 +784,7 @@ dependencies = [ [[package]] name = "asset-hub-rococo-runtime" -version = "0.10.0" +version = "0.9.420" dependencies = [ "asset-test-utils", "assets-common", @@ -897,7 +793,6 @@ dependencies = [ "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", @@ -954,8 +849,8 @@ dependencies = [ "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", @@ -968,7 +863,7 @@ dependencies = [ [[package]] name = "asset-hub-westend-emulated-chain" -version = "0.1.0" +version = "0.0.0" dependencies = [ "asset-hub-westend-runtime", "cumulus-primitives-core", @@ -983,13 +878,14 @@ dependencies = [ [[package]] name = "asset-hub-westend-integration-tests" -version = "0.1.0" +version = "1.0.0" 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", @@ -1014,7 +910,7 @@ dependencies = [ [[package]] name = "asset-hub-westend-runtime" -version = "0.13.0" +version = "0.9.420" dependencies = [ "asset-test-utils", "assets-common", @@ -1023,7 +919,6 @@ dependencies = [ "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", @@ -1078,8 +973,8 @@ dependencies = [ "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", @@ -1092,7 +987,7 @@ dependencies = [ [[package]] name = "asset-test-utils" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assets-common", "cumulus-pallet-parachain-system", @@ -1117,7 +1012,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -1127,7 +1022,7 @@ dependencies = [ [[package]] name = "assets-common" -version = "0.5.0" +version = "0.1.0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1141,7 +1036,7 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -1263,7 +1158,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -1280,7 +1175,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -1340,6 +1235,29 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "bandersnatch_vrfs" +version = "0.0.4" +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", + "dleq_vrf", + "fflonk", + "merlin 3.0.0", + "rand_chacha 0.3.1", + "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", +] + [[package]] name = "base-x" version = "0.2.11" @@ -1396,7 +1314,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" -version = "11.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "env_logger 0.9.3", @@ -1433,7 +1351,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -1443,8 +1361,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", - "rand 0.8.5", - "rand_core 0.6.4", + "rand 0.7.3", + "rand_core 0.5.1", "serde", "unicode-normalization", ] @@ -1535,16 +1453,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]] @@ -1619,13 +1536,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", ] @@ -1640,7 +1558,7 @@ dependencies = [ [[package]] name = "bp-asset-hub-rococo" -version = "0.2.0" +version = "0.1.0" dependencies = [ "bp-xcm-bridge-hub-router", "frame-support", @@ -1660,7 +1578,7 @@ dependencies = [ [[package]] name = "bp-bridge-hub-cumulus" -version = "0.5.0" +version = "0.1.0" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -1669,12 +1587,12 @@ dependencies = [ "frame-system", "polkadot-primitives", "sp-api", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "bp-bridge-hub-kusama" -version = "0.4.0" +version = "0.1.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -1682,12 +1600,12 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "bp-bridge-hub-polkadot" -version = "0.4.0" +version = "0.1.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -1695,12 +1613,12 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "bp-bridge-hub-rococo" -version = "0.5.0" +version = "0.1.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -1708,7 +1626,7 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -1721,12 +1639,12 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "bp-header-chain" -version = "0.5.0" +version = "0.1.0" dependencies = [ "bp-runtime", "bp-test-utils", @@ -1740,24 +1658,24 @@ dependencies = [ "sp-consensus-grandpa", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "bp-kusama" -version = "0.3.0" +version = "0.1.0" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", "frame-support", "sp-api", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "bp-messages" -version = "0.5.0" +version = "0.1.0" dependencies = [ "bp-header-chain", "bp-runtime", @@ -1768,12 +1686,12 @@ dependencies = [ "scale-info", "serde", "sp-core", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "bp-parachains" -version = "0.5.0" +version = "0.1.0" dependencies = [ "bp-header-chain", "bp-polkadot-core", @@ -1784,24 +1702,24 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "bp-polkadot" -version = "0.3.0" +version = "0.1.0" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", "frame-support", "sp-api", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "bp-polkadot-bulletin" -version = "0.2.0" +version = "0.1.0" dependencies = [ "bp-header-chain", "bp-messages", @@ -1813,12 +1731,12 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "bp-polkadot-core" -version = "0.5.0" +version = "0.1.0" dependencies = [ "bp-messages", "bp-runtime", @@ -1831,12 +1749,12 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "bp-relayers" -version = "0.5.0" +version = "0.1.0" dependencies = [ "bp-messages", "bp-runtime", @@ -1846,216 +1764,95 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "bp-rococo" -version = "0.4.0" -dependencies = [ - "bp-header-chain", - "bp-polkadot-core", - "bp-runtime", - "frame-support", - "sp-api", - "sp-std", -] - -[[package]] -name = "bp-runtime" -version = "0.5.0" -dependencies = [ - "frame-support", - "frame-system", - "hash-db", - "hex-literal", - "impl-trait-for-tuples", - "log", - "num-traits", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-trie", - "trie-db", -] - -[[package]] -name = "bp-test-utils" -version = "0.5.0" -dependencies = [ - "bp-header-chain", - "bp-parachains", - "bp-polkadot-core", - "bp-runtime", - "ed25519-dalek", - "finality-grandpa", - "parity-scale-codec", - "sp-application-crypto", - "sp-consensus-grandpa", - "sp-core", - "sp-runtime", - "sp-std", - "sp-trie", -] - -[[package]] -name = "bp-westend" version = "0.1.0" -dependencies = [ - "bp-header-chain", - "bp-polkadot-core", - "bp-runtime", - "frame-support", - "sp-api", - "sp-std", -] - -[[package]] -name = "bp-xcm-bridge-hub-router" -version = "0.4.0" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "bridge-hub-kusama-runtime" -version = "0.5.0" -dependencies = [ - "bridge-hub-test-utils", - "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", - "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-offchain", - "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", +dependencies = [ + "bp-header-chain", + "bp-polkadot-core", + "bp-runtime", + "frame-support", + "sp-api", + "sp-std 8.0.0", ] [[package]] -name = "bridge-hub-polkadot-runtime" -version = "0.5.0" +name = "bp-runtime" +version = "0.1.0" dependencies = [ - "bridge-hub-test-utils", - "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", + "hash-db", "hex-literal", + "impl-trait-for-tuples", "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", + "num-traits", "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-offchain", "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "sp-state-machine", + "sp-std 8.0.0", + "sp-trie", + "trie-db", ] [[package]] -name = "bridge-hub-rococo-emulated-chain" +name = "bp-test-utils" +version = "0.1.0" +dependencies = [ + "bp-header-chain", + "bp-parachains", + "bp-polkadot-core", + "bp-runtime", + "ed25519-dalek", + "finality-grandpa", + "parity-scale-codec", + "sp-application-crypto", + "sp-consensus-grandpa", + "sp-core", + "sp-runtime", + "sp-std 8.0.0", + "sp-trie", +] + +[[package]] +name = "bp-westend" +version = "0.1.0" +dependencies = [ + "bp-header-chain", + "bp-polkadot-core", + "bp-runtime", + "frame-support", + "sp-api", + "sp-std 8.0.0", +] + +[[package]] +name = "bp-xcm-bridge-hub" +version = "0.1.0" +dependencies = [ + "sp-std 8.0.0", +] + +[[package]] +name = "bp-xcm-bridge-hub-router" version = "0.1.0" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", +] + +[[package]] +name = "bridge-hub-rococo-emulated-chain" +version = "0.0.0" dependencies = [ "bridge-hub-rococo-runtime", "cumulus-primitives-core", @@ -2069,7 +1866,7 @@ dependencies = [ [[package]] name = "bridge-hub-rococo-integration-tests" -version = "0.1.0" +version = "1.0.0" dependencies = [ "asset-test-utils", "bp-messages", @@ -2086,13 +1883,14 @@ dependencies = [ "parachains-common", "parity-scale-codec", "rococo-westend-system-emulated-network", + "sp-runtime", "staging-xcm", "staging-xcm-executor", ] [[package]] name = "bridge-hub-rococo-runtime" -version = "0.4.0" +version = "0.1.0" dependencies = [ "bp-asset-hub-rococo", "bp-asset-hub-westend", @@ -2109,7 +1907,6 @@ dependencies = [ "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", @@ -2142,6 +1939,7 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", + "pallet-xcm-bridge-hub", "parachains-common", "parity-scale-codec", "polkadot-core-primitives", @@ -2162,8 +1960,8 @@ dependencies = [ "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", @@ -2176,7 +1974,7 @@ dependencies = [ [[package]] name = "bridge-hub-test-utils" -version = "0.5.0" +version = "0.1.0" dependencies = [ "asset-test-utils", "bp-header-chain", @@ -2193,6 +1991,7 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", + "impl-trait-for-tuples", "log", "pallet-balances", "pallet-bridge-grandpa", @@ -2211,7 +2010,8 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -2220,7 +2020,7 @@ dependencies = [ [[package]] name = "bridge-hub-westend-emulated-chain" -version = "0.1.0" +version = "0.0.0" dependencies = [ "bridge-hub-westend-runtime", "cumulus-primitives-core", @@ -2234,7 +2034,7 @@ dependencies = [ [[package]] name = "bridge-hub-westend-integration-tests" -version = "0.1.0" +version = "1.0.0" dependencies = [ "asset-test-utils", "bp-messages", @@ -2251,6 +2051,7 @@ dependencies = [ "parachains-common", "parity-scale-codec", "rococo-westend-system-emulated-network", + "sp-runtime", "staging-xcm", "staging-xcm-executor", ] @@ -2259,6 +2060,7 @@ dependencies = [ name = "bridge-hub-westend-runtime" version = "0.1.0" dependencies = [ + "bp-asset-hub-rococo", "bp-asset-hub-westend", "bp-bridge-hub-rococo", "bp-bridge-hub-westend", @@ -2273,7 +2075,6 @@ dependencies = [ "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", @@ -2306,6 +2107,7 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", + "pallet-xcm-bridge-hub", "parachains-common", "parity-scale-codec", "polkadot-core-primitives", @@ -2325,8 +2127,8 @@ dependencies = [ "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", @@ -2340,7 +2142,7 @@ dependencies = [ [[package]] name = "bridge-runtime-common" -version = "0.5.0" +version = "0.1.0" dependencies = [ "bp-header-chain", "bp-messages", @@ -2349,6 +2151,7 @@ dependencies = [ "bp-relayers", "bp-runtime", "bp-test-utils", + "bp-xcm-bridge-hub", "bp-xcm-bridge-hub-router", "frame-support", "frame-system", @@ -2367,7 +2170,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-trie", "staging-xcm", "staging-xcm-builder", @@ -2651,7 +2454,7 @@ checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", - "multihash", + "multihash 0.17.0", "serde", "unsigned-varint", ] @@ -2723,23 +2526,23 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.6" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" +checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" dependencies = [ "clap_builder", - "clap_derive 4.4.2", + "clap_derive 4.4.7", ] [[package]] name = "clap_builder" -version = "4.4.6" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" +checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" dependencies = [ "anstream", "anstyle", - "clap_lex 0.5.1", + "clap_lex 0.6.0", "strsim", "terminal_size", ] @@ -2750,7 +2553,7 @@ version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "586a385f7ef2f8b4d86bddaa0c094794e7ccbfe5ffef1f434fe928143fc783a5" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", ] [[package]] @@ -2768,14 +2571,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.38", + "syn 2.0.40", ] [[package]] @@ -2789,9 +2592,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" @@ -2816,75 +2619,18 @@ dependencies = [ ] [[package]] -name = "collectives-polkadot-runtime" -version = "5.0.0" +name = "collectives-westend-emulated-chain" +version = "0.0.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", + "collectives-westend-runtime", "cumulus-primitives-core", - "cumulus-primitives-utility", - "frame-benchmarking", - "frame-executive", + "emulated-integration-tests-common", "frame-support", - "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-common", - "scale-info", - "smallvec", - "sp-api", - "sp-arithmetic", - "sp-block-builder", - "sp-consensus-aura", + "serde_json", "sp-core", - "sp-genesis-builder", - "sp-inherents", - "sp-io", - "sp-offchain", "sp-runtime", - "sp-session", - "sp-std", - "sp-storage", - "sp-transaction-pool", - "sp-version", - "staging-parachain-info", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - "substrate-wasm-builder", + "westend-emulated-chain", ] [[package]] @@ -2892,7 +2638,6 @@ name = "collectives-westend-runtime" version = "1.0.0" dependencies = [ "cumulus-pallet-aura-ext", - "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", @@ -2909,6 +2654,7 @@ dependencies = [ "hex-literal", "log", "pallet-alliance", + "pallet-asset-rate", "pallet-aura", "pallet-authorship", "pallet-balances", @@ -2928,6 +2674,7 @@ dependencies = [ "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", + "pallet-treasury", "pallet-utility", "pallet-xcm", "parachains-common", @@ -2948,8 +2695,8 @@ dependencies = [ "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", @@ -2957,7 +2704,6 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", - "testnets-common", "westend-runtime-constants", ] @@ -3012,6 +2758,22 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "common" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "fflonk", + "getrandom_or_panic", + "merlin 3.0.0", + "rand_chacha 0.3.1", +] + [[package]] name = "common-path" version = "1.0.0" @@ -3094,7 +2856,7 @@ checksum = "f272d0c4cf831b4fa80ee529c7707f76585986e910e1fbce1d7921970bc1a241" [[package]] name = "contracts-rococo-runtime" -version = "0.6.0" +version = "0.2.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", @@ -3118,7 +2880,6 @@ dependencies = [ "pallet-balances", "pallet-collator-selection", "pallet-contracts", - "pallet-contracts-primitives", "pallet-insecure-randomness-collective-flip", "pallet-message-queue", "pallet-multisig", @@ -3146,8 +2907,8 @@ dependencies = [ "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", @@ -3384,7 +3145,7 @@ dependencies = [ "anes", "cast", "ciborium", - "clap 4.4.6", + "clap 4.4.11", "criterion-plot", "futures", "is-terminal", @@ -3557,14 +3318,15 @@ dependencies = [ [[package]] name = "cumulus-client-cli" -version = "0.5.0" +version = "0.1.0" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "parity-scale-codec", "sc-chain-spec", "sc-cli", "sc-client-api", "sc-service", + "sp-blockchain", "sp-core", "sp-runtime", "url", @@ -3572,7 +3334,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" -version = "0.5.0" +version = "0.1.0" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -3596,13 +3358,13 @@ dependencies = [ "sp-maybe-compressed-blob", "sp-runtime", "sp-state-machine", - "sp-tracing", + "sp-tracing 10.0.0", "tracing", ] [[package]] name = "cumulus-client-consensus-aura" -version = "0.5.0" +version = "0.1.0" dependencies = [ "async-trait", "cumulus-client-collator", @@ -3643,7 +3405,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" -version = "0.5.0" +version = "0.1.0" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -3667,7 +3429,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-timestamp", - "sp-tracing", + "sp-tracing 10.0.0", "sp-trie", "substrate-prometheus-endpoint", "tracing", @@ -3675,7 +3437,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-proposer" -version = "0.5.0" +version = "0.1.0" dependencies = [ "anyhow", "async-trait", @@ -3689,7 +3451,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-relay-chain" -version = "0.5.0" +version = "0.1.0" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -3711,7 +3473,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" -version = "0.5.0" +version = "0.1.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -3744,7 +3506,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" -version = "0.5.0" +version = "0.1.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -3772,7 +3534,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" -version = "0.5.0" +version = "0.1.0" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -3780,6 +3542,7 @@ dependencies = [ "cumulus-client-network", "cumulus-client-pov-recovery", "cumulus-primitives-core", + "cumulus-primitives-proof-size-hostfunction", "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", @@ -3806,7 +3569,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" -version = "0.5.0" +version = "0.1.0" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -3818,12 +3581,12 @@ dependencies = [ "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "cumulus-pallet-dmp-queue" -version = "0.5.0" +version = "0.1.0" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -3835,20 +3598,21 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "staging-xcm", ] [[package]] name = "cumulus-pallet-parachain-system" -version = "0.5.0" +version = "0.1.0" dependencies = [ "assert_matches", "bytes", "cumulus-pallet-parachain-system-proc-macro", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", + "cumulus-primitives-proof-size-hostfunction", "cumulus-test-client", "cumulus-test-relay-sproof-builder", "environmental", @@ -3868,33 +3632,34 @@ dependencies = [ "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", "trie-db", + "trie-standardmap", ] [[package]] name = "cumulus-pallet-parachain-system-proc-macro" -version = "0.4.0" +version = "0.1.0" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] name = "cumulus-pallet-session-benchmarking" -version = "7.0.0" +version = "3.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -3902,12 +3667,12 @@ dependencies = [ "pallet-session", "parity-scale-codec", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "cumulus-pallet-solo-to-para" -version = "0.5.0" +version = "0.1.0" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -3917,12 +3682,12 @@ dependencies = [ "polkadot-primitives", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "cumulus-pallet-xcm" -version = "0.5.0" +version = "0.1.0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -3931,13 +3696,13 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", ] [[package]] name = "cumulus-pallet-xcmp-queue" -version = "0.5.0" +version = "0.1.0" dependencies = [ "bounded-collections", "bp-xcm-bridge-hub-router", @@ -3956,7 +3721,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -3964,7 +3729,7 @@ dependencies = [ [[package]] name = "cumulus-ping" -version = "0.5.0" +version = "0.1.0" dependencies = [ "cumulus-pallet-xcm", "cumulus-primitives-core", @@ -3973,13 +3738,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", ] [[package]] name = "cumulus-primitives-aura" -version = "0.5.0" +version = "0.1.0" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -3987,12 +3752,12 @@ dependencies = [ "sp-api", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "cumulus-primitives-core" -version = "0.5.0" +version = "0.1.0" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -4001,14 +3766,14 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-trie", "staging-xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" -version = "0.5.0" +version = "0.1.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -4019,30 +3784,42 @@ dependencies = [ "scale-info", "sp-api", "sp-core", - "sp-inherents", - "sp-runtime", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-trie", + "tracing", +] + +[[package]] +name = "cumulus-primitives-proof-size-hostfunction" +version = "0.1.0" +dependencies = [ + "sp-core", + "sp-externalities 0.19.0", + "sp-io", + "sp-runtime-interface 17.0.0", "sp-state-machine", - "sp-std", - "sp-storage", "sp-trie", - "tracing", ] [[package]] name = "cumulus-primitives-timestamp" -version = "0.5.0" +version = "0.1.0" dependencies = [ "cumulus-primitives-core", "futures", "parity-scale-codec", "sp-inherents", - "sp-std", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "cumulus-primitives-utility" -version = "0.5.1" +version = "0.1.0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -4053,7 +3830,7 @@ dependencies = [ "polkadot-runtime-parachains", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -4061,7 +3838,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" -version = "0.5.0" +version = "0.1.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -4089,7 +3866,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" -version = "0.5.0" +version = "0.1.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -4106,7 +3883,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" -version = "0.5.0" +version = "0.1.0" dependencies = [ "array-bytes 6.1.0", "async-trait", @@ -4114,11 +3891,13 @@ dependencies = [ "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", "futures", + "parking_lot 0.12.1", "polkadot-availability-recovery", "polkadot-collator-protocol", "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", @@ -4126,22 +3905,25 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "sc-authority-discovery", + "sc-client-api", "sc-network", "sc-network-common", "sc-service", "sc-tracing", "sc-utils", "sp-api", + "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-runtime", "substrate-prometheus-endpoint", + "tokio", "tracing", ] [[package]] name = "cumulus-relay-chain-rpc-interface" -version = "0.5.0" +version = "0.1.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -4168,7 +3950,8 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-storage", + "sp-storage 13.0.0", + "sp-version", "thiserror", "tokio", "tokio-util", @@ -4182,6 +3965,7 @@ version = "0.1.0" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", + "cumulus-primitives-proof-size-hostfunction", "cumulus-test-relay-sproof-builder", "cumulus-test-runtime", "cumulus-test-service", @@ -4209,14 +3993,14 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.5.0" +version = "0.1.0" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", "sp-trie", ] @@ -4247,7 +4031,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -4258,7 +4042,7 @@ name = "cumulus-test-service" version = "0.1.0" dependencies = [ "async-trait", - "clap 4.4.6", + "clap 4.4.11", "criterion 0.5.1", "cumulus-client-cli", "cumulus-client-consensus-common", @@ -4321,7 +4105,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-timestamp", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-test-client", "substrate-test-utils", "tempfile", @@ -4381,7 +4165,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -4421,7 +4205,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -4438,7 +4222,7 @@ checksum = "50c49547d73ba8dcfd4ad7325d64c6d5391ff4224d498fc39a6f3f49825a530d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -4737,7 +4521,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -4746,6 +4530,22 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86e3bdc80eee6e16b2b6b0f87fbc98c04bee3455e35174c0de1a125d0688c632" +[[package]] +name = "dleq_vrf" +version = "0.0.2" +source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-scale 0.0.12", + "ark-secret-scalar", + "ark-serialize", + "ark-std", + "ark-transcript", + "arrayvec 0.7.4", + "zeroize", +] + [[package]] name = "dlmalloc" version = "0.2.4" @@ -4782,9 +4582,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.38", + "syn 2.0.40", "termcolor", - "toml 0.7.6", + "toml 0.7.8", "walkdir", ] @@ -4871,15 +4671,16 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" dependencies = [ "curve25519-dalek 4.0.0", "ed25519", "rand_core 0.6.4", "serde", "sha2 0.10.7", + "subtle 2.4.1", "zeroize", ] @@ -5037,7 +4838,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -5048,7 +4849,17 @@ checksum = "c2ad8cef1d801a4686bfd8919f0b30eac4c8e48968c437a6405ded4fb5272d2b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", +] + +[[package]] +name = "env_logger" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" +dependencies = [ + "log", + "regex", ] [[package]] @@ -5066,9 +4877,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" dependencies = [ "humantime", "is-terminal", @@ -5100,7 +4911,7 @@ dependencies = [ [[package]] name = "erasure_coding_fuzzer" -version = "0.1.0" +version = "1.0.0" dependencies = [ "honggfuzz", "polkadot-erasure-coding", @@ -5193,7 +5004,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -5251,7 +5062,7 @@ checksum = "f5aa1e3ae159e592ad222dc90c5acbad632b527779ba88486abe92782ab268bd" dependencies = [ "expander 0.0.4", "indexmap 1.9.3", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -5260,11 +5071,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]] @@ -5303,6 +5115,19 @@ dependencies = [ "subtle 2.4.1", ] +[[package]] +name = "fflonk" +version = "0.1.0" +source = "git+https://github.com/w3f/fflonk#1e854f35e9a65d08b11a86291405cdc95baa0a35" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "merlin 3.0.0", +] + [[package]] name = "fiat-crypto" version = "0.1.20" @@ -5315,7 +5140,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" dependencies = [ - "env_logger 0.10.0", + "env_logger 0.10.1", "log", ] @@ -5406,7 +5231,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" -version = "11.0.0" +version = "3.0.0" dependencies = [ "parity-scale-codec", ] @@ -5438,7 +5263,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame" -version = "0.1.0" +version = "0.0.1-dev" dependencies = [ "docify", "frame-executive", @@ -5449,7 +5274,7 @@ dependencies = [ "pallet-examples", "parity-scale-codec", "scale-info", - "simple-mermaid", + "simple-mermaid 0.1.0 (git+https://github.com/kianenigma/simple-mermaid.git?rev=e48b187bcfd5cc75111acd9d241f1bd36604344b)", "sp-api", "sp-arithmetic", "sp-block-builder", @@ -5461,14 +5286,14 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", ] [[package]] name = "frame-benchmarking" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "frame-support", @@ -5487,20 +5312,20 @@ 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", ] [[package]] name = "frame-benchmarking-cli" -version = "30.0.0" +version = "4.0.0-dev" dependencies = [ "Inflector", "array-bytes 6.1.0", "chrono", - "clap 4.4.6", + "clap 4.4.11", "comfy-table", "frame-benchmarking", "frame-support", @@ -5527,22 +5352,22 @@ 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", ] [[package]] name = "frame-benchmarking-pallet-pov" -version = "16.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -5551,28 +5376,28 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "frame-election-provider-solution-type" -version = "12.0.0" +version = "4.0.0-dev" dependencies = [ "frame-election-provider-support", "frame-support", "parity-scale-codec", - "proc-macro-crate", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", "scale-info", "sp-arithmetic", - "syn 2.0.38", + "syn 2.0.40", "trybuild", ] [[package]] name = "frame-election-provider-support" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -5585,14 +5410,14 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "frame-election-solution-type-fuzzer" -version = "0.1.0" +version = "2.0.0-alpha.5" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "frame-election-provider-solution-type", "frame-election-provider-support", "frame-support", @@ -5607,7 +5432,7 @@ dependencies = [ [[package]] name = "frame-executive" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "frame-support", @@ -5622,8 +5447,8 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "sp-version", ] @@ -5641,7 +5466,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" -version = "0.33.0" +version = "0.10.0-dev" dependencies = [ "futures", "indicatif", @@ -5653,7 +5478,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-tracing", + "sp-tracing 10.0.0", "spinners", "substrate-rpc-client", "tokio", @@ -5662,7 +5487,7 @@ dependencies = [ [[package]] name = "frame-support" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "aquamarine", "array-bytes 6.1.0", @@ -5688,7 +5513,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", @@ -5696,8 +5521,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", @@ -5705,7 +5530,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "21.0.0" +version = "4.0.0-dev" dependencies = [ "Inflector", "cfg-expr", @@ -5717,33 +5542,34 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", + "regex", "sp-core-hashing", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] name = "frame-support-procedural-tools" -version = "9.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] name = "frame-support-procedural-tools-derive" -version = "10.0.0" +version = "3.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] name = "frame-support-test" -version = "0.1.0" +version = "3.0.0" dependencies = [ "frame-benchmarking", "frame-executive", @@ -5763,7 +5589,7 @@ dependencies = [ "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", "sp-version", "static_assertions", "trybuild", @@ -5771,7 +5597,7 @@ dependencies = [ [[package]] name = "frame-support-test-compile-pass" -version = "0.1.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -5784,7 +5610,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" -version = "0.1.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -5805,20 +5631,21 @@ dependencies = [ [[package]] name = "frame-system" -version = "26.0.0" +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", @@ -5826,7 +5653,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -5834,16 +5661,16 @@ 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", ] [[package]] name = "frame-system-rpc-runtime-api" -version = "24.0.0" +version = "4.0.0-dev" dependencies = [ "parity-scale-codec", "sp-api", @@ -5851,13 +5678,13 @@ dependencies = [ [[package]] name = "frame-try-runtime" -version = "0.32.0" +version = "0.10.0-dev" dependencies = [ "frame-support", "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -5878,9 +5705,9 @@ dependencies = [ [[package]] name = "fs4" -version = "0.6.6" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" +checksum = "29f9df8a11882c4e3335eb2d18a0137c505d9ca927470b0cac9c6f0ae07d28f7" dependencies = [ "rustix 0.38.21", "windows-sys 0.48.0", @@ -5970,7 +5797,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -6031,7 +5858,7 @@ dependencies = [ [[package]] name = "generate-bags" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "chrono", "frame-election-provider-support", @@ -6094,6 +5921,16 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom_or_panic" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" +dependencies = [ + "rand 0.8.5", + "rand_core 0.6.4", +] + [[package]] name = "ghash" version = "0.4.4" @@ -6150,51 +5987,6 @@ dependencies = [ "regex", ] -[[package]] -name = "glutton-runtime" -version = "5.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", - "sp-storage", - "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" @@ -6229,8 +6021,8 @@ dependencies = [ "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", @@ -6995,7 +6787,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ "heck", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -7090,7 +6882,7 @@ checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" [[package]] name = "kitchensink-runtime" -version = "0.1.0" +version = "3.0.0-dev" dependencies = [ "frame-benchmarking", "frame-benchmarking-pallet-pov", @@ -7119,13 +6911,13 @@ dependencies = [ "pallet-child-bounties", "pallet-collective", "pallet-contracts", - "pallet-contracts-primitives", "pallet-conviction-voting", "pallet-core-fellowship", "pallet-democracy", "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", "pallet-elections-phragmen", + "pallet-example-tasks", "pallet-fast-unstake", "pallet-glutton", "pallet-grandpa", @@ -7198,8 +6990,8 @@ dependencies = [ "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", @@ -7312,6 +7104,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" @@ -7400,7 +7203,7 @@ dependencies = [ "libp2p-identity", "log", "multiaddr", - "multihash", + "multihash 0.17.0", "multistream-select", "once_cell", "parking_lot 0.12.1", @@ -7460,7 +7263,7 @@ dependencies = [ "ed25519-dalek", "log", "multiaddr", - "multihash", + "multihash 0.17.0", "quick-protobuf", "rand 0.8.5", "sha2 0.10.7", @@ -7668,7 +7471,7 @@ dependencies = [ "libp2p-core", "libp2p-identity", "rcgen 0.10.0", - "ring", + "ring 0.16.20", "rustls 0.20.8", "thiserror", "webpki 0.22.0", @@ -7707,7 +7510,7 @@ dependencies = [ "libp2p-identity", "libp2p-noise", "log", - "multihash", + "multihash 0.17.0", "quick-protobuf", "quick-protobuf-codec", "rand 0.8.5", @@ -7999,7 +7802,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -8013,7 +7816,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -8024,7 +7827,7 @@ checksum = "9ea73aa640dc01d62a590d48c0c3521ed739d53b27f919b25c3551e233481654" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -8035,7 +7838,7 @@ checksum = "ef9d79ae96aaba821963320eb2b6e34d17df1e5a83d8a1985c29cc5be59577b3" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -8086,9 +7889,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" @@ -8202,9 +8005,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "minimal-node" -version = "0.1.0" +version = "4.0.0-dev" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "frame", "futures", "futures-timer", @@ -8299,7 +8102,7 @@ dependencies = [ [[package]] name = "mmr-gadget" -version = "27.0.0" +version = "4.0.0-dev" dependencies = [ "futures", "log", @@ -8315,14 +8118,14 @@ dependencies = [ "sp-core", "sp-mmr-primitives", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-test-runtime-client", "tokio", ] [[package]] name = "mmr-rpc" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "anyhow", "jsonrpsee", @@ -8374,7 +8177,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash", + "multihash 0.17.0", "percent-encoding", "serde", "static_assertions", @@ -8404,19 +8207,87 @@ dependencies = [ "blake3", "core2", "digest 0.10.7", - "multihash-derive", + "multihash-derive 0.8.0", "sha2 0.10.7", "sha3", "unsigned-varint", ] +[[package]] +name = "multihash" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd8a792c1694c6da4f68db0a9d707c72bd260994da179e6030a5dcee00bb815" +dependencies = [ + "core2", + "digest 0.10.7", + "multihash-derive 0.8.0", + "sha2 0.10.7", + "unsigned-varint", +] + +[[package]] +name = "multihash" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492" +dependencies = [ + "core2", + "unsigned-varint", +] + +[[package]] +name = "multihash-codetable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6d815ecb3c8238d00647f8630ede7060a642c9f704761cd6082cb4028af6935" +dependencies = [ + "blake2b_simd", + "blake2s_simd", + "blake3", + "core2", + "digest 0.10.7", + "multihash-derive 0.9.0", + "ripemd", + "serde", + "sha1", + "sha2 0.10.7", + "sha3", + "strobe-rs", +] + [[package]] name = "multihash-derive" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc076939022111618a5026d3be019fd8b366e76314538ff9a1b59ffbcbf98bcd" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "multihash-derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "890e72cb7396cb99ed98c1246a97b243cc16394470d94e0bc8b0c2c11d84290e" +dependencies = [ + "core2", + "multihash 0.19.1", + "multihash-derive-impl", +] + +[[package]] +name = "multihash-derive-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38685e08adb338659871ecfc6ee47ba9b22dcc8abcf6975d379cc49145c3040" +dependencies = [ + "proc-macro-crate 1.3.1", "proc-macro-error", "proc-macro2", "quote", @@ -8471,15 +8342,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" @@ -8607,10 +8469,10 @@ checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" [[package]] name = "node-bench" -version = "0.1.0" +version = "0.9.0-dev" dependencies = [ "array-bytes 6.1.0", - "clap 4.4.6", + "clap 4.4.11", "derive_more", "fs_extra", "futures", @@ -8636,14 +8498,14 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-timestamp", - "sp-tracing", + "sp-tracing 10.0.0", "sp-trie", "tempfile", ] [[package]] name = "node-primitives" -version = "0.1.0" +version = "2.0.0" dependencies = [ "sp-core", "sp-runtime", @@ -8651,7 +8513,7 @@ dependencies = [ [[package]] name = "node-rpc" -version = "0.1.0" +version = "3.0.0-dev" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -8683,18 +8545,18 @@ dependencies = [ [[package]] name = "node-runtime-generate-bags" -version = "0.1.0" +version = "3.0.0" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "generate-bags", "kitchensink-runtime", ] [[package]] name = "node-template" -version = "0.1.0" +version = "4.0.0-dev" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", @@ -8736,21 +8598,21 @@ dependencies = [ [[package]] name = "node-template-release" -version = "0.1.0" +version = "3.0.0" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "flate2", "fs_extra", "glob", "itertools 0.10.5", "tar", "tempfile", - "toml_edit", + "toml_edit 0.19.15", ] [[package]] name = "node-template-runtime" -version = "0.1.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-executive", @@ -8780,8 +8642,8 @@ dependencies = [ "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", @@ -8789,7 +8651,7 @@ dependencies = [ [[package]] name = "node-testing" -version = "0.1.0" +version = "3.0.0-dev" dependencies = [ "frame-system", "fs_extra", @@ -8819,7 +8681,7 @@ dependencies = [ "sp-keyring", "sp-runtime", "sp-timestamp", - "staging-node-executor", + "staging-node-cli", "substrate-test-client", "tempfile", ] @@ -8931,9 +8793,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", @@ -9060,7 +8922,7 @@ dependencies = [ "itertools 0.11.0", "layout-rs", "petgraph", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -9121,7 +8983,7 @@ dependencies = [ [[package]] name = "pallet-alliance" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "frame-benchmarking", @@ -9137,12 +8999,12 @@ dependencies = [ "sp-core-hashing", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-asset-conversion" -version = "8.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -9157,12 +9019,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-asset-conversion-tx-payment" -version = "8.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -9175,13 +9037,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", ] [[package]] name = "pallet-asset-rate" -version = "5.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -9192,12 +9054,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-asset-tx-payment" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -9213,13 +9075,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", ] [[package]] name = "pallet-assets" -version = "27.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -9231,12 +9093,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-atomic-swap" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -9246,12 +9108,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-aura" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -9264,12 +9126,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-authority-discovery" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -9281,12 +9143,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-authorship" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -9296,12 +9158,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-babe" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9324,12 +9186,12 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-bags-list" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "aquamarine", "docify", @@ -9344,13 +9206,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] name = "pallet-bags-list-fuzzer" -version = "0.1.0" +version = "4.0.0-dev" dependencies = [ "frame-election-provider-support", "honggfuzz", @@ -9360,7 +9222,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" -version = "0.1.0" +version = "4.0.0-dev" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -9371,14 +9233,14 @@ 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]] name = "pallet-balances" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -9391,12 +9253,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-beefy" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-election-provider-support", "frame-support", @@ -9419,12 +9281,12 @@ dependencies = [ "sp-session", "sp-staking", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-beefy-mmr" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "binary-merkle-tree", @@ -9444,12 +9306,12 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-bounties" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -9462,12 +9324,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-bridge-grandpa" -version = "0.5.0" +version = "0.1.0" dependencies = [ "bp-header-chain", "bp-runtime", @@ -9483,13 +9345,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-trie", ] [[package]] name = "pallet-bridge-messages" -version = "0.5.0" +version = "0.1.0" dependencies = [ "bp-messages", "bp-runtime", @@ -9504,12 +9366,12 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-bridge-parachains" -version = "0.5.0" +version = "0.1.0" dependencies = [ "bp-header-chain", "bp-parachains", @@ -9526,13 +9388,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-trie", ] [[package]] name = "pallet-bridge-relayers" -version = "0.5.0" +version = "0.1.0" dependencies = [ "bp-messages", "bp-relayers", @@ -9548,12 +9410,12 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-broker" -version = "0.4.0" +version = "0.1.0" dependencies = [ "bitvec", "frame-benchmarking", @@ -9565,12 +9427,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-child-bounties" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -9584,12 +9446,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-collator-selection" -version = "7.0.0" +version = "3.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9608,13 +9470,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] name = "pallet-collective" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -9625,12 +9487,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-collective-content" -version = "0.4.0" +version = "0.1.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9640,12 +9502,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-contracts" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -9660,8 +9522,8 @@ dependencies = [ "pallet-assets", "pallet-balances", "pallet-contracts-fixtures", - "pallet-contracts-primitives", "pallet-contracts-proc-macro", + "pallet-contracts-uapi", "pallet-insecure-randomness-collective-flip", "pallet-message-queue", "pallet-proxy", @@ -9679,8 +9541,8 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "staging-xcm", "staging-xcm-builder", "wasm-instrument 0.4.0", @@ -9690,13 +9552,23 @@ dependencies = [ [[package]] name = "pallet-contracts-fixtures" -version = "0.1.0" +version = "1.0.0" dependencies = [ + "anyhow", + "cfg-if", "frame-system", + "parity-wasm", "sp-runtime", + "tempfile", + "toml 0.8.2", + "twox-hash", "wat", ] +[[package]] +name = "pallet-contracts-fixtures-common" +version = "1.0.0" + [[package]] name = "pallet-contracts-mock-network" version = "1.0.0" @@ -9708,8 +9580,8 @@ dependencies = [ "pallet-balances", "pallet-contracts", "pallet-contracts-fixtures", - "pallet-contracts-primitives", "pallet-contracts-proc-macro", + "pallet-contracts-uapi", "pallet-insecure-randomness-collective-flip", "pallet-message-queue", "pallet-proxy", @@ -9727,8 +9599,8 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -9736,29 +9608,27 @@ dependencies = [ ] [[package]] -name = "pallet-contracts-primitives" -version = "29.0.0" +name = "pallet-contracts-proc-macro" +version = "4.0.0-dev" dependencies = [ - "bitflags 1.3.2", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", - "sp-weights", + "proc-macro2", + "quote", + "syn 2.0.40", ] [[package]] -name = "pallet-contracts-proc-macro" -version = "16.0.0" +name = "pallet-contracts-uapi" +version = "4.0.0-dev" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", + "bitflags 1.3.2", + "parity-scale-codec", + "paste", + "scale-info", ] [[package]] name = "pallet-conviction-voting" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "assert_matches", "frame-benchmarking", @@ -9772,12 +9642,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-core-fellowship" -version = "10.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -9789,12 +9659,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-default-config-example" -version = "8.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -9803,12 +9673,12 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-democracy" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -9823,12 +9693,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-dev-mode" -version = "8.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -9839,12 +9709,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-election-provider-e2e-test" -version = "0.1.0" +version = "1.0.0" dependencies = [ "frame-election-provider-support", "frame-support", @@ -9864,13 +9734,13 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] name = "pallet-election-provider-multi-phase" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9888,14 +9758,14 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "strum", ] [[package]] name = "pallet-election-provider-support-benchmarking" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9903,12 +9773,12 @@ dependencies = [ "parity-scale-codec", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-elections-phragmen" -version = "27.0.0" +version = "5.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -9922,14 +9792,14 @@ 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", ] [[package]] name = "pallet-example-basic" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -9941,12 +9811,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-example-frame-crate" -version = "0.1.0" +version = "0.0.1" dependencies = [ "frame", "parity-scale-codec", @@ -9955,7 +9825,7 @@ dependencies = [ [[package]] name = "pallet-example-kitchensink" -version = "8.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -9967,12 +9837,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-example-offchain-worker" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -9984,12 +9854,27 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-example-split" -version = "8.0.0" +version = "4.0.0-dev" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-std 8.0.0", +] + +[[package]] +name = "pallet-example-tasks" +version = "1.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -9999,12 +9884,13 @@ dependencies = [ "scale-info", "sp-core", "sp-io", - "sp-std", + "sp-runtime", + "sp-std 8.0.0", ] [[package]] name = "pallet-examples" -version = "0.1.0" +version = "4.0.0-dev" dependencies = [ "pallet-default-config-example", "pallet-dev-mode", @@ -10013,11 +9899,12 @@ dependencies = [ "pallet-example-kitchensink", "pallet-example-offchain-worker", "pallet-example-split", + "pallet-example-tasks", ] [[package]] name = "pallet-fast-unstake" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "docify", "frame-benchmarking", @@ -10035,14 +9922,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "substrate-test-utils", ] [[package]] name = "pallet-glutton" -version = "12.0.0" +version = "4.0.0-dev" dependencies = [ "blake2 0.10.6", "frame-benchmarking", @@ -10055,12 +9942,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-grandpa" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "finality-grandpa", "frame-benchmarking", @@ -10085,12 +9972,12 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-identity" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "enumflags2", "frame-benchmarking", @@ -10102,12 +9989,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-im-online" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10122,12 +10009,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-indices" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10139,12 +10026,12 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-insecure-randomness-collective-flip" -version = "14.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -10154,12 +10041,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-lottery" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10171,12 +10058,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-membership" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10187,13 +10074,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-message-queue" -version = "29.0.0" +version = "7.0.0-dev" dependencies = [ + "environmental", "frame-benchmarking", "frame-support", "frame-system", @@ -10207,14 +10095,14 @@ 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.2.0" +version = "0.1.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10228,12 +10116,12 @@ dependencies = [ "sp-io", "sp-mixnet", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-mmr" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "env_logger 0.9.3", @@ -10248,12 +10136,12 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-multisig" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10264,12 +10152,12 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-nft-fractionalization" -version = "8.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10283,12 +10171,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-nfts" -version = "20.0.0" +version = "4.0.0-dev" dependencies = [ "enumflags2", "frame-benchmarking", @@ -10302,21 +10190,22 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-nfts-runtime-api" -version = "12.0.0" +version = "4.0.0-dev" dependencies = [ "pallet-nfts", "parity-scale-codec", "sp-api", + "sp-std 8.0.0", ] [[package]] name = "pallet-nicks" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -10326,12 +10215,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-nis" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10343,12 +10232,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-node-authorization" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -10358,12 +10247,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-nomination-pools" -version = "23.0.0" +version = "1.0.0" dependencies = [ "frame-support", "frame-system", @@ -10375,13 +10264,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] name = "pallet-nomination-pools-benchmarking" -version = "24.0.0" +version = "1.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -10398,14 +10287,14 @@ 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]] name = "pallet-nomination-pools-fuzzer" -version = "0.1.0" +version = "2.0.0" dependencies = [ "frame-support", "frame-system", @@ -10415,22 +10304,22 @@ dependencies = [ "rand 0.8.5", "sp-io", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", ] [[package]] name = "pallet-nomination-pools-runtime-api" -version = "21.0.0" +version = "1.0.0-dev" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", "sp-api", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-nomination-pools-test-staking" -version = "0.1.0" +version = "1.0.0" dependencies = [ "frame-election-provider-support", "frame-support", @@ -10448,13 +10337,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] name = "pallet-offences" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -10467,12 +10356,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-offences-benchmarking" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -10494,12 +10383,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-paged-list" -version = "0.4.0" +version = "0.1.0" dependencies = [ "docify", "frame-benchmarking", @@ -10511,7 +10400,7 @@ dependencies = [ "sp-io", "sp-metadata-ir", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -10527,7 +10416,7 @@ dependencies = [ [[package]] name = "pallet-parachain-template" -version = "0.5.0" +version = "0.1.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10542,7 +10431,7 @@ dependencies = [ [[package]] name = "pallet-preimage" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10554,12 +10443,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-proxy" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10571,12 +10460,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-ranked-collective" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10588,12 +10477,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-recovery" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10604,12 +10493,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-referenda" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "assert_matches", "frame-benchmarking", @@ -10626,12 +10515,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-remark" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10642,12 +10531,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-root-offences" -version = "23.0.0" +version = "1.0.0-dev" dependencies = [ "frame-election-provider-support", "frame-support", @@ -10663,12 +10552,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-root-testing" -version = "2.0.0" +version = "1.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -10677,13 +10566,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-safe-mode" -version = "7.0.0" +version = "4.0.0-dev" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -10696,12 +10586,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-salary" -version = "11.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10713,12 +10603,30 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", +] + +[[package]] +name = "pallet-sassafras" +version = "0.3.5-dev" +dependencies = [ + "array-bytes 6.1.0", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-consensus-sassafras", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0", ] [[package]] name = "pallet-scheduler" -version = "27.0.0" +version = "4.0.0-dev" dependencies = [ "docify", "frame-benchmarking", @@ -10731,14 +10639,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-weights", "substrate-test-utils", ] [[package]] name = "pallet-scored-pool" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -10748,12 +10656,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-session" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -10768,13 +10676,13 @@ dependencies = [ "sp-session", "sp-staking", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", "sp-trie", ] [[package]] name = "pallet-session-benchmarking" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -10792,24 +10700,24 @@ dependencies = [ "sp-io", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-skip-feeless-payment" -version = "1.0.0" +version = "1.0.0-dev" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-society" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10824,12 +10732,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-staking" -version = "26.0.1" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -10852,25 +10760,25 @@ 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", ] [[package]] name = "pallet-staking-reward-curve" -version = "10.0.0" +version = "4.0.0-dev" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", "sp-runtime", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] name = "pallet-staking-reward-fn" -version = "17.0.0" +version = "4.0.0-dev" dependencies = [ "log", "sp-arithmetic", @@ -10878,7 +10786,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" -version = "12.0.0" +version = "4.0.0-dev" dependencies = [ "parity-scale-codec", "sp-api", @@ -10887,7 +10795,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" -version = "27.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-remote-externalities", @@ -10902,8 +10810,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", @@ -10912,7 +10820,7 @@ dependencies = [ [[package]] name = "pallet-statement" -version = "8.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -10925,12 +10833,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-statement-store", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-sudo" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "docify", "frame-benchmarking", @@ -10941,12 +10849,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-template" -version = "0.1.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10956,12 +10864,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-timestamp" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "docify", "frame-benchmarking", @@ -10974,14 +10882,14 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-timestamp", ] [[package]] name = "pallet-tips" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -10995,13 +10903,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", ] [[package]] name = "pallet-transaction-payment" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-support", "frame-system", @@ -11013,12 +10921,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-transaction-payment-rpc" -version = "28.0.0" +version = "4.0.0-dev" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -11033,7 +10941,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -11044,7 +10952,7 @@ dependencies = [ [[package]] name = "pallet-transaction-storage" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "frame-benchmarking", @@ -11059,13 +10967,13 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-transaction-storage-proof", ] [[package]] name = "pallet-treasury" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "docify", "frame-benchmarking", @@ -11080,13 +10988,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-tx-pause" -version = "7.0.0" +version = "4.0.0-dev" dependencies = [ + "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -11098,12 +11007,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-uniques" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -11115,12 +11024,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-utility" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -11134,12 +11043,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-vesting" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -11151,12 +11060,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-whitelist" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "frame-benchmarking", "frame-support", @@ -11169,12 +11078,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "pallet-xcm" -version = "5.0.0" +version = "1.0.0" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -11191,7 +11100,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -11199,7 +11108,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "5.0.1" +version = "1.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11215,8 +11124,33 @@ 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", +] + +[[package]] +name = "pallet-xcm-bridge-hub" +version = "0.1.0" +dependencies = [ + "bp-header-chain", + "bp-messages", + "bp-runtime", + "bp-xcm-bridge-hub", + "bridge-runtime-common", + "frame-support", + "frame-system", + "log", + "pallet-balances", + "pallet-bridge-messages", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -11224,7 +11158,7 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub-router" -version = "0.3.0" +version = "0.1.0" dependencies = [ "bp-xcm-bridge-hub-router", "frame-benchmarking", @@ -11236,7 +11170,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", ] @@ -11245,7 +11179,7 @@ dependencies = [ name = "parachain-template-node" version = "0.1.0" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "color-print", "cumulus-client-cli", "cumulus-client-collator", @@ -11301,7 +11235,7 @@ dependencies = [ [[package]] name = "parachain-template-runtime" -version = "0.5.0" +version = "0.1.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", @@ -11347,7 +11281,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -11359,7 +11293,7 @@ dependencies = [ [[package]] name = "parachains-common" -version = "5.0.0" +version = "1.0.0" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", @@ -11383,7 +11317,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -11393,7 +11327,7 @@ dependencies = [ [[package]] name = "parachains-runtimes-test-utils" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assets-common", "cumulus-pallet-parachain-system", @@ -11416,8 +11350,8 @@ 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", @@ -11426,9 +11360,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.4.10" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f19d20a0d2cc52327a88d131fa1c4ea81ea4a04714aedcfeca2dd410049cf8" +checksum = "59e9ab494af9e6e813c72170f0d3c1de1500990d62c97cc05cc7576f91aa402f" dependencies = [ "blake2 0.10.6", "crc32fast", @@ -11446,9 +11380,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.4" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" +checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -11461,11 +11395,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.4" +version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" +checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -11622,7 +11556,7 @@ dependencies = [ [[package]] name = "penpal-emulated-chain" -version = "0.1.0" +version = "0.0.0" dependencies = [ "cumulus-primitives-core", "emulated-integration-tests-common", @@ -11633,11 +11567,12 @@ dependencies = [ "serde_json", "sp-core", "sp-runtime", + "westend-emulated-chain", ] [[package]] name = "penpal-runtime" -version = "0.12.0" +version = "0.9.27" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", @@ -11685,8 +11620,8 @@ dependencies = [ "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", @@ -11732,7 +11667,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -11773,7 +11708,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -11856,7 +11791,7 @@ dependencies = [ [[package]] name = "polkadot" -version = "5.0.0" +version = "1.5.0" dependencies = [ "assert_cmd", "color-eyre", @@ -11877,7 +11812,7 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "bitvec", @@ -11906,7 +11841,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "5.0.0" +version = "1.0.0" dependencies = [ "always-assert", "assert_matches", @@ -11933,7 +11868,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "derive_more", @@ -11955,14 +11890,14 @@ dependencies = [ "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing", + "sp-tracing 10.0.0", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-availability-recovery" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "async-trait", @@ -11992,9 +11927,10 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "5.0.0" +version = "1.1.0" dependencies = [ - "clap 4.4.6", + "cfg-if", + "clap 4.4.11", "frame-benchmarking-cli", "futures", "log", @@ -12020,7 +11956,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "bitvec", @@ -12050,18 +11986,18 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "5.0.0" +version = "1.0.0" dependencies = [ "parity-scale-codec", "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "polkadot-dispute-distribution" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "async-channel", @@ -12087,14 +12023,14 @@ dependencies = [ "sp-application-crypto", "sp-keyring", "sp-keystore", - "sp-tracing", + "sp-tracing 10.0.0", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-erasure-coding" -version = "5.0.0" +version = "1.0.0" dependencies = [ "criterion 0.4.0", "parity-scale-codec", @@ -12108,7 +12044,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "async-trait", @@ -12120,6 +12056,7 @@ dependencies = [ "polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-util", "polkadot-primitives", + "quickcheck", "rand 0.8.5", "rand_chacha 0.3.1", "sc-network", @@ -12130,13 +12067,13 @@ dependencies = [ "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing", + "sp-tracing 10.0.0", "tracing-gum", ] [[package]] name = "polkadot-network-bridge" -version = "5.0.0" +version = "1.0.0" dependencies = [ "always-assert", "assert_matches", @@ -12165,7 +12102,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "futures", @@ -12186,7 +12123,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "async-trait", @@ -12230,7 +12167,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "bitvec", @@ -12260,7 +12197,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "bitvec", @@ -12279,14 +12216,14 @@ dependencies = [ "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing", + "sp-tracing 10.0.0", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-bitfield-signing" -version = "5.0.0" +version = "1.0.0" dependencies = [ "futures", "polkadot-node-subsystem", @@ -12302,7 +12239,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "async-trait", @@ -12327,7 +12264,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "5.0.0" +version = "1.0.0" dependencies = [ "futures", "maplit", @@ -12336,6 +12273,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", @@ -12346,7 +12284,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "futures", @@ -12367,7 +12305,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "fatality", @@ -12388,14 +12326,14 @@ dependencies = [ "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing", + "sp-tracing 10.0.0", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-parachains-inherent" -version = "5.0.0" +version = "1.0.0" dependencies = [ "async-trait", "futures", @@ -12411,7 +12349,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-prospective-parachains" -version = "4.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "bitvec", @@ -12436,7 +12374,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "5.0.0" +version = "1.0.0" dependencies = [ "bitvec", "fatality", @@ -12456,10 +12394,11 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "5.0.0" +version = "1.0.0" dependencies = [ "always-assert", "assert_matches", + "blake3", "cfg-if", "criterion 0.4.0", "futures", @@ -12483,20 +12422,22 @@ dependencies = [ "rand 0.8.5", "rococo-runtime", "rusty-fork", + "sc-sysinfo", "slotmap", "sp-core", "sp-maybe-compressed-blob", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0", "tempfile", "test-parachain-adder", "test-parachain-halt", + "thiserror", "tokio", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-checker" -version = "5.0.0" +version = "1.0.0" dependencies = [ "futures", "futures-timer", @@ -12519,7 +12460,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-common" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "cfg-if", @@ -12535,9 +12476,10 @@ dependencies = [ "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", "thiserror", "tracing-gum", @@ -12545,7 +12487,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-execute-worker" -version = "5.0.0" +version = "1.0.0" dependencies = [ "cpu-time", "libc", @@ -12560,8 +12502,9 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-prepare-worker" -version = "5.0.0" +version = "1.0.0" dependencies = [ + "blake3", "cfg-if", "criterion 0.4.0", "libc", @@ -12583,7 +12526,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "5.0.0" +version = "1.0.0" dependencies = [ "async-trait", "futures", @@ -12604,7 +12547,7 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "5.0.0" +version = "1.0.0" dependencies = [ "lazy_static", "log", @@ -12621,7 +12564,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_cmd", "bs58 0.5.0", @@ -12647,7 +12590,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "5.0.0" +version = "1.0.0" dependencies = [ "async-channel", "async-trait", @@ -12671,7 +12614,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "5.0.0" +version = "1.0.0" dependencies = [ "bitvec", "bounded-vec", @@ -12694,7 +12637,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "5.0.0" +version = "1.0.0" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -12703,7 +12646,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" -version = "0.1.0" +version = "1.0.0" dependencies = [ "async-trait", "futures", @@ -12722,7 +12665,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "5.0.0" +version = "1.0.0" dependencies = [ "async-trait", "bitvec", @@ -12740,14 +12683,16 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", + "sp-blockchain", "sp-consensus-babe", + "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "polkadot-node-subsystem-util" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "async-trait", @@ -12790,7 +12735,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "async-trait", @@ -12816,20 +12761,15 @@ dependencies = [ [[package]] name = "polkadot-parachain-bin" -version = "4.0.0" +version = "1.5.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", "bridge-hub-westend-runtime", - "clap 4.4.6", - "collectives-polkadot-runtime", + "clap 4.4.11", "collectives-westend-runtime", "color-print", "contracts-rococo-runtime", @@ -12846,14 +12786,18 @@ dependencies = [ "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", @@ -12885,14 +12829,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", + "sp-tracing 10.0.0", "sp-transaction-pool", + "sp-version", "staging-xcm", "substrate-build-script-utils", "substrate-frame-rpc-system", @@ -12905,7 +12853,7 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" -version = "4.0.0" +version = "1.0.0" dependencies = [ "bounded-collections", "derive_more", @@ -12915,13 +12863,13 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-weights", ] [[package]] name = "polkadot-primitives" -version = "5.0.0" +version = "1.0.0" dependencies = [ "bitvec", "hex-literal", @@ -12941,12 +12889,12 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "polkadot-primitives-test-helpers" -version = "0.1.0" +version = "1.0.0" dependencies = [ "polkadot-primitives", "rand 0.8.5", @@ -12958,7 +12906,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "5.0.0" +version = "1.0.0" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -12989,7 +12937,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "5.0.0" +version = "1.0.0" dependencies = [ "bitvec", "frame-benchmarking", @@ -13036,7 +12984,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -13045,19 +12993,19 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "5.0.0" +version = "1.0.0" dependencies = [ "bs58 0.5.0", "frame-benchmarking", "parity-scale-codec", "polkadot-primitives", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", ] [[package]] name = "polkadot-runtime-parachains" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "bitflags 1.3.2", @@ -13103,17 +13051,56 @@ 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", "thousands", ] +[[package]] +name = "polkadot-sdk-docs" +version = "0.0.1" +dependencies = [ + "cumulus-pallet-aura-ext", + "cumulus-pallet-parachain-system", + "docify", + "frame", + "kitchensink-runtime", + "pallet-aura", + "pallet-default-config-example", + "pallet-examples", + "pallet-timestamp", + "parity-scale-codec", + "sc-cli", + "sc-client-db", + "sc-consensus-aura", + "sc-consensus-babe", + "sc-consensus-beefy", + "sc-consensus-grandpa", + "sc-consensus-manual-seal", + "sc-consensus-pow", + "sc-network", + "sc-rpc", + "sc-rpc-api", + "scale-info", + "simple-mermaid 0.1.0 (git+https://github.com/kianenigma/simple-mermaid.git?branch=main)", + "sp-api", + "sp-core", + "sp-io", + "sp-keyring", + "sp-runtime", + "staging-chain-spec-builder", + "staging-node-cli", + "staging-parachain-info", + "subkey", + "substrate-wasm-builder", +] + [[package]] name = "polkadot-service" -version = "5.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "async-trait", @@ -13137,6 +13124,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "parity-db", "parity-scale-codec", + "parking_lot 0.12.1", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", @@ -13222,7 +13210,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage", + "sp-storage 13.0.0", "sp-timestamp", "sp-transaction-pool", "sp-version", @@ -13237,7 +13225,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "5.0.0" +version = "1.0.0" dependencies = [ "arrayvec 0.7.4", "assert_matches", @@ -13252,7 +13240,6 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", - "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-primitives-test-helpers", @@ -13265,14 +13252,14 @@ dependencies = [ "sp-keyring", "sp-keystore", "sp-staking", - "sp-tracing", + "sp-tracing 10.0.0", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-statement-table" -version = "5.0.0" +version = "1.0.0" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -13281,7 +13268,7 @@ dependencies = [ [[package]] name = "polkadot-test-client" -version = "0.1.0" +version = "1.0.0" dependencies = [ "frame-benchmarking", "futures", @@ -13310,11 +13297,11 @@ dependencies = [ [[package]] name = "polkadot-test-malus" -version = "0.1.0" +version = "1.0.0" dependencies = [ "assert_matches", "async-trait", - "clap 4.4.6", + "clap 4.4.11", "color-eyre", "futures", "futures-timer", @@ -13341,7 +13328,7 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" -version = "0.1.0" +version = "1.0.0" dependencies = [ "bitvec", "frame-election-provider-support", @@ -13393,7 +13380,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-trie", "sp-version", @@ -13407,7 +13394,7 @@ dependencies = [ [[package]] name = "polkadot-test-service" -version = "0.1.0" +version = "1.0.0" dependencies = [ "frame-system", "futures", @@ -13459,9 +13446,9 @@ dependencies = [ [[package]] name = "polkadot-voter-bags" -version = "5.0.0" +version = "1.0.0" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "generate-bags", "sp-io", "westend-runtime", @@ -13639,7 +13626,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" dependencies = [ "proc-macro2", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -13680,7 +13667,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +dependencies = [ + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -13721,7 +13718,7 @@ checksum = "9b698b0b09d40e9b7c1a47b132d66a8b54bcd20583d9b6d06e4535e383b4405c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -13793,7 +13790,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -13881,7 +13878,7 @@ dependencies = [ "libc", "libflate", "log", - "names 0.14.0", + "names", "prost", "reqwest", "thiserror", @@ -13935,6 +13932,8 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" dependencies = [ + "env_logger 0.8.4", + "log", "rand 0.8.5", ] @@ -13957,7 +13956,7 @@ checksum = "c956be1b23f4261676aed05a0046e204e8a6836e50203902683a718af0797989" dependencies = [ "bytes", "rand 0.8.5", - "ring", + "ring 0.16.20", "rustc-hash", "rustls 0.20.8", "slab", @@ -14107,7 +14106,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", - "ring", + "ring 0.16.20", "time 0.3.27", "x509-parser 0.13.2", "yasna", @@ -14120,7 +14119,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", - "ring", + "ring 0.16.20", "time 0.3.27", "yasna", ] @@ -14143,6 +14142,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -14184,7 +14192,7 @@ checksum = "7f7473c2cfcf90008193dd0e3e16599455cb601a9fce322b5bb55de799664925" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -14201,14 +14209,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]] @@ -14222,13 +14230,19 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.6" +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 = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.4", + "regex-syntax 0.8.2", ] [[package]] @@ -14239,20 +14253,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 = "0.1.0" +version = "1.0.0" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "frame-system", "log", "pallet-bags-list-remote-tests", "sp-core", - "sp-tracing", + "sp-tracing 10.0.0", "tokio", "westend-runtime", "westend-runtime-constants", @@ -14328,6 +14342,22 @@ dependencies = [ "subtle 2.4.1", ] +[[package]] +name = "ring" +version = "0.1.0" +source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "blake2 0.10.6", + "common", + "fflonk", + "merlin 3.0.0", +] + [[package]] name = "ring" version = "0.16.20" @@ -14343,6 +14373,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "rle-decode-fast" version = "1.0.3" @@ -14371,7 +14410,7 @@ dependencies = [ [[package]] name = "rococo-emulated-chain" -version = "0.1.0" +version = "0.0.0" dependencies = [ "emulated-integration-tests-common", "pallet-im-online", @@ -14390,7 +14429,7 @@ dependencies = [ [[package]] name = "rococo-parachain-runtime" -version = "0.4.0" +version = "0.1.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", @@ -14398,6 +14437,7 @@ dependencies = [ "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", "cumulus-ping", + "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", "frame-benchmarking", @@ -14428,7 +14468,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -14440,7 +14480,7 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "5.0.0" +version = "1.0.0" dependencies = [ "binary-merkle-tree", "frame-benchmarking", @@ -14526,9 +14566,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", @@ -14543,7 +14583,7 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "5.0.0" +version = "1.0.0" dependencies = [ "frame-support", "polkadot-primitives", @@ -14553,11 +14593,12 @@ dependencies = [ "sp-runtime", "sp-weights", "staging-xcm", + "staging-xcm-builder", ] [[package]] name = "rococo-system-emulated-network" -version = "0.1.0" +version = "0.0.0" dependencies = [ "asset-hub-rococo-emulated-chain", "bridge-hub-rococo-emulated-chain", @@ -14568,7 +14609,7 @@ dependencies = [ [[package]] name = "rococo-westend-system-emulated-network" -version = "0.1.0" +version = "0.0.0" dependencies = [ "asset-hub-rococo-emulated-chain", "asset-hub-westend-emulated-chain", @@ -14734,7 +14775,7 @@ checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ "base64 0.13.1", "log", - "ring", + "ring 0.16.20", "sct 0.6.1", "webpki 0.21.4", ] @@ -14746,7 +14787,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ "log", - "ring", + "ring 0.16.20", "sct 0.7.0", "webpki 0.22.0", ] @@ -14758,7 +14799,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" dependencies = [ "log", - "ring", + "ring 0.16.20", "rustls-webpki 0.101.4", "sct 0.7.0", ] @@ -14790,7 +14831,7 @@ version = "0.100.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" dependencies = [ - "ring", + "ring 0.16.20", "untrusted", ] @@ -14800,7 +14841,7 @@ version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" dependencies = [ - "ring", + "ring 0.16.20", "untrusted", ] @@ -14879,17 +14920,17 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "21.0.0" +version = "4.1.0-dev" dependencies = [ "log", "sp-core", - "sp-wasm-interface", + "sp-wasm-interface 14.0.0", "thiserror", ] [[package]] name = "sc-authority-discovery" -version = "0.32.0" +version = "0.10.0-dev" dependencies = [ "async-trait", "futures", @@ -14897,7 +14938,8 @@ dependencies = [ "ip_network", "libp2p", "log", - "multihash", + "multihash 0.18.1", + "multihash-codetable", "parity-scale-codec", "prost", "prost-build", @@ -14911,7 +14953,7 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -14919,7 +14961,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.32.0" +version = "0.10.0-dev" dependencies = [ "futures", "futures-timer", @@ -14944,7 +14986,7 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.31.0" +version = "0.10.0-dev" dependencies = [ "parity-scale-codec", "sp-api", @@ -14954,12 +14996,13 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", + "sp-trie", "substrate-test-runtime-client", ] [[package]] name = "sc-chain-spec" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "docify", @@ -14987,29 +15030,29 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" -version = "10.0.0" +version = "4.0.0-dev" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] name = "sc-cli" -version = "0.34.0" +version = "0.10.0-dev" dependencies = [ "array-bytes 6.1.0", "bip39", "chrono", - "clap 4.4.6", + "clap 4.4.11", "fdlimit", "futures", "futures-timer", "itertools 0.10.5", "libp2p-identity", "log", - "names 0.13.0", + "names", "parity-scale-codec", "rand 0.8.5", "regex", @@ -15031,7 +15074,7 @@ dependencies = [ "sp-keystore", "sp-panic-handler", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "sp-version", "tempfile", "thiserror", @@ -15040,7 +15083,7 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "fnv", "futures", @@ -15055,11 +15098,11 @@ 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", @@ -15069,7 +15112,7 @@ dependencies = [ [[package]] name = "sc-client-db" -version = "0.33.0" +version = "0.10.0-dev" dependencies = [ "array-bytes 6.1.0", "criterion 0.4.0", @@ -15094,7 +15137,7 @@ dependencies = [ "sp-database", "sp-runtime", "sp-state-machine", - "sp-tracing", + "sp-tracing 10.0.0", "sp-trie", "substrate-test-runtime-client", "tempfile", @@ -15102,7 +15145,7 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.31.0" +version = "0.10.0-dev" dependencies = [ "async-trait", "futures", @@ -15127,7 +15170,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" -version = "0.32.0" +version = "0.10.0-dev" dependencies = [ "async-trait", "futures", @@ -15155,7 +15198,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-timestamp", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tempfile", @@ -15165,7 +15208,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.32.0" +version = "0.10.0-dev" dependencies = [ "async-trait", "fork-tree", @@ -15197,7 +15240,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-timestamp", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -15206,7 +15249,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" -version = "0.32.0" +version = "0.10.0-dev" dependencies = [ "futures", "jsonrpsee", @@ -15234,7 +15277,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" -version = "11.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -15265,7 +15308,7 @@ dependencies = [ "sp-keystore", "sp-mmr-primitives", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tempfile", @@ -15276,7 +15319,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" -version = "11.0.0" +version = "4.0.0-dev" dependencies = [ "futures", "jsonrpsee", @@ -15297,7 +15340,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.31.0" +version = "0.10.0-dev" dependencies = [ "fork-tree", "parity-scale-codec", @@ -15309,7 +15352,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" -version = "0.17.0" +version = "0.10.0-dev" dependencies = [ "ahash 0.8.3", "array-bytes 6.1.0", @@ -15348,7 +15391,7 @@ dependencies = [ "sp-keyring", "sp-keystore", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -15357,7 +15400,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" -version = "0.17.0" +version = "0.10.0-dev" dependencies = [ "finality-grandpa", "futures", @@ -15381,7 +15424,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" -version = "0.33.0" +version = "0.10.0-dev" dependencies = [ "assert_matches", "async-trait", @@ -15419,7 +15462,7 @@ dependencies = [ [[package]] name = "sc-consensus-pow" -version = "0.31.0" +version = "0.10.0-dev" dependencies = [ "async-trait", "futures", @@ -15443,7 +15486,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.31.0" +version = "0.10.0-dev" dependencies = [ "async-trait", "futures", @@ -15466,7 +15509,7 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.30.0" +version = "0.10.0-dev" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -15484,17 +15527,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", @@ -15504,18 +15547,18 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.27.0" +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", ] [[package]] name = "sc-executor-wasmtime" -version = "0.27.0" +version = "0.10.0-dev" dependencies = [ "anyhow", "cargo_metadata", @@ -15530,8 +15573,8 @@ dependencies = [ "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", @@ -15539,7 +15582,7 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.31.0" +version = "0.10.0-dev" dependencies = [ "ansi_term", "futures", @@ -15555,7 +15598,7 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "23.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "parking_lot 0.12.1", @@ -15569,11 +15612,12 @@ dependencies = [ [[package]] name = "sc-mixnet" -version = "0.2.0" +version = "0.1.0-dev" dependencies = [ "array-bytes 4.2.0", "arrayvec 0.7.4", "blake2 0.10.6", + "bytes", "futures", "futures-timer", "libp2p-identity", @@ -15596,7 +15640,7 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.32.0" +version = "0.10.0-dev" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -15632,13 +15676,14 @@ 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", "tempfile", "thiserror", "tokio", + "tokio-stream", "tokio-test", "tokio-util", "unsigned-varint", @@ -15648,7 +15693,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" -version = "0.31.0" +version = "0.10.0-dev" dependencies = [ "async-channel", "cid", @@ -15674,7 +15719,7 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.31.0" +version = "0.10.0-dev" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -15691,13 +15736,15 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.32.0" +version = "0.10.0-dev" dependencies = [ "ahash 0.8.3", + "async-trait", "futures", "futures-timer", "libp2p", "log", + "parity-scale-codec", "quickcheck", "sc-network", "sc-network-common", @@ -15712,7 +15759,7 @@ dependencies = [ [[package]] name = "sc-network-light" -version = "0.31.0" +version = "0.10.0-dev" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -15732,7 +15779,7 @@ dependencies = [ [[package]] name = "sc-network-statement" -version = "0.14.0" +version = "0.10.0-dev" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -15750,7 +15797,7 @@ dependencies = [ [[package]] name = "sc-network-sync" -version = "0.31.0" +version = "0.10.0-dev" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -15780,7 +15827,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-test-primitives", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -15790,7 +15837,7 @@ dependencies = [ [[package]] name = "sc-network-test" -version = "0.1.0" +version = "0.8.0" dependencies = [ "async-trait", "futures", @@ -15812,7 +15859,7 @@ dependencies = [ "sp-consensus", "sp-core", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-test-runtime", "substrate-test-runtime-client", "tokio", @@ -15820,7 +15867,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" -version = "0.31.0" +version = "0.10.0-dev" dependencies = [ "array-bytes 6.1.0", "futures", @@ -15838,7 +15885,7 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "27.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "bytes", @@ -15866,11 +15913,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", @@ -15879,7 +15926,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" -version = "0.16.0" +version = "0.10.0-dev" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -15887,7 +15934,7 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "27.0.0" +version = "4.0.0-dev" dependencies = [ "assert_matches", "env_logger 0.9.3", @@ -15927,7 +15974,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.31.0" +version = "0.10.0-dev" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -15946,7 +15993,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "10.0.0" +version = "4.0.0-dev" dependencies = [ "http", "jsonrpsee", @@ -15960,7 +16007,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.32.0" +version = "0.10.0-dev" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -15984,6 +16031,7 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", + "sp-externalities 0.19.0", "sp-maybe-compressed-blob", "sp-rpc", "sp-runtime", @@ -15997,19 +16045,19 @@ dependencies = [ [[package]] name = "sc-runtime-test" -version = "0.1.0" +version = "2.0.0" 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", ] [[package]] name = "sc-service" -version = "0.33.0" +version = "0.10.0-dev" dependencies = [ "async-trait", "directories", @@ -16050,12 +16098,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", @@ -16073,7 +16121,7 @@ dependencies = [ [[package]] name = "sc-service-test" -version = "0.1.0" +version = "2.0.0" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -16098,8 +16146,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", @@ -16109,7 +16157,7 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.28.0" +version = "0.10.0-dev" dependencies = [ "log", "parity-scale-codec", @@ -16119,7 +16167,7 @@ dependencies = [ [[package]] name = "sc-statement-store" -version = "8.0.0" +version = "4.0.0-dev" dependencies = [ "env_logger 0.9.3", "log", @@ -16139,9 +16187,9 @@ dependencies = [ [[package]] name = "sc-storage-monitor" -version = "0.14.0" +version = "0.1.0" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "fs4", "log", "sc-client-db", @@ -16152,7 +16200,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" -version = "0.32.0" +version = "0.10.0-dev" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -16170,7 +16218,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" -version = "25.0.0" +version = "6.0.0-dev" dependencies = [ "derive_more", "futures", @@ -16185,12 +16233,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sc-telemetry" -version = "13.0.0" +version = "4.0.0-dev" dependencies = [ "chrono", "futures", @@ -16208,7 +16256,7 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "ansi_term", "atty", @@ -16217,6 +16265,7 @@ dependencies = [ "lazy_static", "libc", "log", + "parity-scale-codec", "parking_lot 0.12.1", "regex", "rustc-hash", @@ -16228,7 +16277,7 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "thiserror", "tracing", "tracing-log", @@ -16237,17 +16286,17 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" -version = "10.0.0" +version = "4.0.0-dev" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] name = "sc-transaction-pool" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -16269,7 +16318,7 @@ dependencies = [ "sp-consensus", "sp-core", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "sp-transaction-pool", "substrate-prometheus-endpoint", "substrate-test-runtime", @@ -16280,7 +16329,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "async-trait", "futures", @@ -16296,7 +16345,7 @@ dependencies = [ [[package]] name = "sc-utils" -version = "12.0.0" +version = "4.0.0-dev" dependencies = [ "async-channel", "futures", @@ -16329,7 +16378,7 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", "syn 1.0.109", @@ -16344,6 +16393,30 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "schemars" +version = "0.8.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "763f8cd0d4c71ed8389c90cb8100cba87e763bd01a8e614d4f0af97bcd50a161" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0f696e21e10fa546b7ffb1c9672c6de8fbc7a81acf59524386d8639bf12737" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 1.0.109", +] + [[package]] name = "schnellru" version = "0.2.1" @@ -16407,7 +16480,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" dependencies = [ - "ring", + "ring 0.16.20", "untrusted", ] @@ -16417,7 +16490,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ - "ring", + "ring 0.16.20", "untrusted", ] @@ -16472,18 +16545,18 @@ dependencies = [ [[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", ] @@ -16522,7 +16595,7 @@ dependencies = [ [[package]] name = "seedling-runtime" -version = "0.5.0" +version = "0.1.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -16548,7 +16621,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -16596,22 +16669,33 @@ checksum = "f97841a747eef040fcd2e7b3b9a220a7205926e60488e673d9e4926d27772ce5" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", +] + +[[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]] @@ -16636,9 +16720,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80" dependencies = [ "serde", ] @@ -16677,7 +16761,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -16772,7 +16856,7 @@ dependencies = [ [[package]] name = "shell-runtime" -version = "0.5.0" +version = "0.1.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -16797,7 +16881,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 8.0.0", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -16865,6 +16949,11 @@ 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" @@ -16893,13 +16982,13 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "5.0.0" +version = "1.0.0" dependencies = [ "enumn", "parity-scale-codec", "paste", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -17041,7 +17130,7 @@ dependencies = [ "chacha20poly1305", "curve25519-dalek 4.0.0", "rand_core 0.6.4", - "ring", + "ring 0.16.20", "rustc_version 0.4.0", "sha2 0.10.7", "subtle 2.4.1", @@ -17086,7 +17175,7 @@ dependencies = [ [[package]] name = "sp-api" -version = "24.0.0" +version = "4.0.0-dev" dependencies = [ "hash-db", "log", @@ -17094,11 +17183,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", @@ -17107,21 +17196,21 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "13.0.0" +version = "4.0.0-dev" dependencies = [ "Inflector", "assert_matches", "blake2 0.10.6", "expander 2.0.0", - "proc-macro-crate", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] name = "sp-api-test" -version = "0.1.0" +version = "2.0.1" dependencies = [ "criterion 0.4.0", "futures", @@ -17135,7 +17224,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-tracing", + "sp-tracing 10.0.0", "sp-version", "static_assertions", "substrate-test-runtime-client", @@ -17144,19 +17233,19 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "28.0.0" +version = "23.0.0" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-application-crypto-test" -version = "0.1.0" +version = "2.0.0" dependencies = [ "sp-api", "sp-application-crypto", @@ -17167,7 +17256,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "21.0.0" +version = "16.0.0" dependencies = [ "criterion 0.4.0", "integer-sqrt", @@ -17178,13 +17267,13 @@ dependencies = [ "scale-info", "serde", "sp-core", - "sp-std", + "sp-std 8.0.0", "static_assertions", ] [[package]] name = "sp-arithmetic-fuzzer" -version = "0.1.0" +version = "2.0.0" dependencies = [ "arbitrary", "fraction", @@ -17193,31 +17282,49 @@ dependencies = [ "sp-arithmetic", ] +[[package]] +name = "sp-ark-bls12-381" +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)", +] + +[[package]] +name = "sp-ark-ed-on-bls12-381-bandersnatch" +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)", +] + [[package]] name = "sp-authority-discovery" -version = "24.0.0" +version = "4.0.0-dev" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-block-builder" -version = "24.0.0" +version = "4.0.0-dev" dependencies = [ "sp-api", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-blockchain" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "futures", "log", @@ -17234,7 +17341,7 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.30.0" +version = "0.10.0-dev" dependencies = [ "async-trait", "futures", @@ -17249,7 +17356,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.30.0" +version = "0.10.0-dev" dependencies = [ "async-trait", "parity-scale-codec", @@ -17259,13 +17366,13 @@ dependencies = [ "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-babe" -version = "0.30.0" +version = "0.10.0-dev" dependencies = [ "async-trait", "parity-scale-codec", @@ -17277,13 +17384,13 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-beefy" -version = "11.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "lazy_static", @@ -17296,14 +17403,14 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "strum", "w3f-bls", ] [[package]] name = "sp-consensus-grandpa" -version = "11.0.0" +version = "4.0.0-dev" dependencies = [ "finality-grandpa", "log", @@ -17315,36 +17422,52 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-consensus-pow" -version = "0.30.0" +version = "0.10.0-dev" +dependencies = [ + "parity-scale-codec", + "sp-api", + "sp-core", + "sp-runtime", + "sp-std 8.0.0", +] + +[[package]] +name = "sp-consensus-sassafras" +version = "0.3.4-dev" dependencies = [ "parity-scale-codec", + "scale-info", + "serde", "sp-api", + "sp-application-crypto", + "sp-consensus-slots", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-consensus-slots" -version = "0.30.0" +version = "0.10.0-dev" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 8.0.0", "sp-timestamp", ] [[package]] name = "sp-core" -version = "26.0.0" +version = "21.0.0" dependencies = [ "array-bytes 6.1.0", + "bandersnatch_vrfs", "bip39", "bitflags 1.3.2", "blake2 0.10.6", @@ -17376,11 +17499,11 @@ 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", @@ -17389,9 +17512,19 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sp-core-fuzz" +version = "0.0.0" +dependencies = [ + "lazy_static", + "libfuzzer-sys", + "regex", + "sp-core", +] + [[package]] name = "sp-core-hashing" -version = "13.0.0" +version = "9.0.0" dependencies = [ "blake2b_simd", "byteorder", @@ -17403,16 +17536,37 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" -version = "13.0.0" +version = "9.0.0" dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] name = "sp-crypto-ec-utils" -version = "0.8.0" +version = "0.4.1" +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 0.0.12", + "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" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -17425,14 +17579,14 @@ dependencies = [ "ark-ed-on-bls12-377-ext", "ark-ed-on-bls12-381-bandersnatch", "ark-ed-on-bls12-381-bandersnatch-ext", - "ark-scale", - "sp-runtime-interface", - "sp-std", + "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)", ] [[package]] name = "sp-database" -version = "9.0.0" +version = "4.0.0-dev" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -17440,36 +17594,57 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "12.0.0" +version = "8.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", +] + +[[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.38", + "syn 2.0.40", +] + +[[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.23.0" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" 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]] name = "sp-genesis-builder" -version = "0.5.0" +version = "0.1.0" dependencies = [ "serde_json", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-inherents" -version = "24.0.0" +version = "4.0.0-dev" dependencies = [ "async-trait", "futures", @@ -17477,13 +17652,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "thiserror", ] [[package]] name = "sp-io" -version = "28.0.0" +version = "23.0.0" dependencies = [ "bytes", "ed25519-dalek", @@ -17493,12 +17668,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", @@ -17506,9 +17681,8 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "29.0.0" +version = "24.0.0" dependencies = [ - "lazy_static", "sp-core", "sp-runtime", "strum", @@ -17516,20 +17690,20 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.32.0" +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", + "sp-externalities 0.19.0", "thiserror", ] [[package]] name = "sp-maybe-compressed-blob" -version = "10.0.0" +version = "4.1.0-dev" dependencies = [ "thiserror", "zstd 0.12.4", @@ -17537,28 +17711,28 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.4.0" +version = "0.1.0" dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-mixnet" -version = "0.2.0" +version = "0.1.0-dev" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-mmr-primitives" -version = "24.0.0" +version = "4.0.0-dev" dependencies = [ "array-bytes 6.1.0", "ckb-merkle-mountain-range", @@ -17568,15 +17742,15 @@ 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", ] [[package]] name = "sp-npos-elections" -version = "24.0.0" +version = "4.0.0-dev" dependencies = [ "parity-scale-codec", "rand 0.8.5", @@ -17585,15 +17759,15 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "substrate-test-utils", ] [[package]] name = "sp-npos-elections-fuzzer" -version = "0.1.0" +version = "2.0.0-alpha.5" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "honggfuzz", "rand 0.8.5", "sp-npos-elections", @@ -17602,7 +17776,7 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "24.0.0" +version = "4.0.0-dev" dependencies = [ "sp-api", "sp-core", @@ -17611,7 +17785,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "12.0.0" +version = "8.0.0" dependencies = [ "backtrace", "lazy_static", @@ -17620,7 +17794,7 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "24.0.0" +version = "6.0.0" dependencies = [ "rustc-hash", "serde", @@ -17630,8 +17804,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "29.0.0" +version = "24.0.0" dependencies = [ + "docify", "either", "hash256-std-hasher", "impl-trait-for-tuples", @@ -17642,14 +17817,15 @@ dependencies = [ "scale-info", "serde", "serde_json", + "simple-mermaid 0.1.0 (git+https://github.com/kianenigma/simple-mermaid.git?branch=main)", "sp-api", "sp-application-crypto", "sp-arithmetic", "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", @@ -17657,7 +17833,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "22.0.0" +version = "17.0.0" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -17665,39 +17841,70 @@ 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#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +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", + "expander 2.0.0", + "proc-macro-crate 2.0.1", + "proc-macro2", + "quote", + "syn 2.0.40", +] + [[package]] name = "sp-runtime-interface-proc-macro" -version = "15.0.0" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "Inflector", - "proc-macro-crate", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] name = "sp-runtime-interface-test" -version = "0.1.0" +version = "2.0.0" dependencies = [ "sc-executor", "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", @@ -17707,29 +17914,29 @@ dependencies = [ [[package]] name = "sp-runtime-interface-test-wasm" -version = "0.1.0" +version = "2.0.0" 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", ] [[package]] name = "sp-runtime-interface-test-wasm-deprecated" -version = "0.1.0" +version = "2.0.0" dependencies = [ "sp-core", "sp-io", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0", "substrate-wasm-builder", ] [[package]] name = "sp-session" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "parity-scale-codec", "scale-info", @@ -17738,12 +17945,12 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-staking" -version = "24.0.0" +version = "4.0.0-dev" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -17751,12 +17958,12 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-state-machine" -version = "0.33.0" +version = "0.28.0" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -17768,10 +17975,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", @@ -17780,7 +17987,7 @@ dependencies = [ [[package]] name = "sp-statement-store" -version = "8.0.0" +version = "4.0.0-dev" dependencies = [ "aes-gcm 0.10.3", "curve25519-dalek 4.0.0", @@ -17793,33 +18000,51 @@ 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", ] [[package]] name = "sp-std" -version = "12.0.0" +version = "8.0.0" + +[[package]] +name = "sp-std" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" [[package]] name = "sp-storage" -version = "17.0.0" +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#82912acb33a9030c0ef3bf590a34fca09b72dc5f" 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]] name = "sp-test-primitives" -version = "0.1.0" +version = "2.0.0" dependencies = [ "parity-scale-codec", "scale-info", @@ -17827,27 +18052,39 @@ dependencies = [ "sp-application-crypto", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "sp-timestamp" -version = "24.0.0" +version = "4.0.0-dev" dependencies = [ "async-trait", "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "thiserror", ] [[package]] name = "sp-tracing" -version = "14.0.0" +version = "10.0.0" +dependencies = [ + "parity-scale-codec", + "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#82912acb33a9030c0ef3bf590a34fca09b72dc5f" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "tracing", "tracing-core", "tracing-subscriber", @@ -17855,7 +18092,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "24.0.0" +version = "4.0.0-dev" dependencies = [ "sp-api", "sp-runtime", @@ -17863,7 +18100,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" -version = "24.0.0" +version = "4.0.0-dev" dependencies = [ "async-trait", "parity-scale-codec", @@ -17871,19 +18108,18 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-trie", ] [[package]] name = "sp-trie" -version = "27.0.0" +version = "22.0.0" dependencies = [ "ahash 0.8.3", "array-bytes 6.1.0", "criterion 0.4.0", "hash-db", - "hashbrown 0.13.2", "lazy_static", "memory-db", "nohash-hasher", @@ -17893,8 +18129,9 @@ dependencies = [ "scale-info", "schnellru", "sp-core", + "sp-externalities 0.19.0", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "thiserror", "tracing", "trie-bench", @@ -17905,7 +18142,7 @@ dependencies = [ [[package]] name = "sp-version" -version = "27.0.0" +version = "22.0.0" dependencies = [ "impl-serde", "parity-scale-codec", @@ -17914,46 +18151,60 @@ dependencies = [ "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "12.0.0" +version = "8.0.0" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", "sp-version", - "syn 2.0.38", + "syn 2.0.40", +] + +[[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 = "18.0.0" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" 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", ] [[package]] name = "sp-weights" -version = "25.0.0" +version = "20.0.0" dependencies = [ + "bounded-collections", "parity-scale-codec", "scale-info", + "schemars", "serde", "smallvec", "sp-arithmetic", - "sp-core", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", ] [[package]] @@ -18022,32 +18273,27 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-chain-spec-builder" -version = "0.1.0" +version = "2.0.0" dependencies = [ - "ansi_term", - "clap 4.4.6", - "kitchensink-runtime", + "clap 4.4.11", "log", - "rand 0.8.5", "sc-chain-spec", - "sc-keystore", "serde_json", - "sp-core", - "sp-keystore", - "sp-tracing", - "staging-node-cli", + "sp-tracing 10.0.0", ] [[package]] name = "staging-node-cli" -version = "0.1.0" +version = "3.0.0-dev" dependencies = [ "array-bytes 6.1.0", "assert_cmd", - "clap 4.4.6", + "clap 4.4.11", "clap_complete", "criterion 0.4.0", + "frame-benchmarking", "frame-benchmarking-cli", + "frame-support", "frame-system", "frame-system-rpc-runtime-api", "futures", @@ -18057,13 +18303,20 @@ dependencies = [ "nix 0.26.2", "node-primitives", "node-rpc", + "node-testing", "pallet-asset-conversion-tx-payment", "pallet-asset-tx-payment", "pallet-assets", "pallet-balances", + "pallet-contracts", + "pallet-glutton", "pallet-im-online", + "pallet-root-testing", "pallet-skip-feeless-payment", + "pallet-sudo", "pallet-timestamp", + "pallet-transaction-payment", + "pallet-treasury", "parity-scale-codec", "platforms", "rand 0.8.5", @@ -18098,27 +18351,31 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool", "sc-transaction-pool-api", + "scale-info", "serde", "serde_json", "soketto", "sp-api", + "sp-application-crypto", "sp-authority-discovery", "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-consensus-grandpa", "sp-core", + "sp-externalities 0.19.0", "sp-inherents", "sp-io", "sp-keyring", "sp-keystore", "sp-mixnet", "sp-runtime", + "sp-state-machine", "sp-statement-store", "sp-timestamp", - "sp-tracing", + "sp-tracing 10.0.0", "sp-transaction-storage-proof", - "staging-node-executor", + "sp-trie", "staging-node-inspect", "substrate-build-script-utils", "substrate-cli-test-utils", @@ -18129,65 +18386,29 @@ dependencies = [ "tokio-util", "try-runtime-cli", "wait-timeout", -] - -[[package]] -name = "staging-node-executor" -version = "0.1.0" -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", - "serde_json", - "sp-application-crypto", - "sp-consensus-babe", - "sp-core", - "sp-externalities", - "sp-keyring", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "sp-statement-store", - "sp-tracing", - "sp-trie", "wat", ] [[package]] name = "staging-node-inspect" -version = "0.10.0" +version = "0.9.0-dev" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "parity-scale-codec", "sc-cli", "sc-client-api", "sc-service", "sp-blockchain", "sp-core", + "sp-io", "sp-runtime", + "sp-statement-store", "thiserror", ] [[package]] name = "staging-parachain-info" -version = "0.5.0" +version = "0.1.0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -18195,7 +18416,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -18204,7 +18425,7 @@ version = "1.0.0" [[package]] name = "staging-xcm" -version = "5.0.0" +version = "1.0.0" dependencies = [ "bounded-collections", "derivative", @@ -18215,6 +18436,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", + "schemars", "serde", "sp-io", "sp-weights", @@ -18223,7 +18445,7 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "5.0.1" +version = "1.0.0" dependencies = [ "assert_matches", "frame-support", @@ -18245,7 +18467,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-weights", "staging-xcm", "staging-xcm-executor", @@ -18253,7 +18475,7 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "5.0.1" +version = "1.0.0" dependencies = [ "environmental", "frame-benchmarking", @@ -18266,7 +18488,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-weights", "staging-xcm", ] @@ -18330,6 +18552,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strobe-rs" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fabb238a1cccccfa4c4fb703670c0d157e1256c1ba695abf1b93bd2bb14bab2d" +dependencies = [ + "bitflags 1.3.2", + "byteorder", + "keccak", + "subtle 2.4.1", + "zeroize", +] + [[package]] name = "strsim" version = "0.10.0" @@ -18369,7 +18604,7 @@ dependencies = [ "lazy_static", "md-5", "rand 0.8.5", - "ring", + "ring 0.16.20", "subtle 2.4.1", "thiserror", "tokio", @@ -18379,30 +18614,10 @@ dependencies = [ [[package]] name = "subkey" -version = "7.0.0" -dependencies = [ - "clap 4.4.6", - "sc-cli", -] - -[[package]] -name = "substrate" -version = "0.1.0" +version = "3.0.0" dependencies = [ - "frame-support", - "sc-chain-spec", + "clap 4.4.11", "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]] @@ -18420,7 +18635,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" -version = "9.0.0" +version = "3.0.0" [[package]] name = "substrate-cli-test-utils" @@ -18441,9 +18656,9 @@ dependencies = [ [[package]] name = "substrate-frame-cli" -version = "30.0.0" +version = "4.0.0-dev" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "frame-support", "frame-system", "sc-cli", @@ -18453,7 +18668,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-support" -version = "27.0.0" +version = "3.0.0" dependencies = [ "frame-support", "frame-system", @@ -18464,13 +18679,13 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-storage", + "sp-storage 13.0.0", "tokio", ] [[package]] name = "substrate-frame-rpc-system" -version = "26.0.0" +version = "4.0.0-dev" dependencies = [ "assert_matches", "frame-system-rpc-runtime-api", @@ -18486,14 +18701,14 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-runtime", - "sp-tracing", + "sp-tracing 10.0.0", "substrate-test-runtime-client", "tokio", ] [[package]] name = "substrate-prometheus-endpoint" -version = "0.16.0" +version = "0.10.0-dev" dependencies = [ "hyper", "log", @@ -18504,7 +18719,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" -version = "0.31.0" +version = "0.10.0-dev" dependencies = [ "async-trait", "jsonrpsee", @@ -18518,7 +18733,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" -version = "25.0.0" +version = "4.0.0-dev" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -18535,7 +18750,7 @@ dependencies = [ [[package]] name = "substrate-test-client" -version = "0.1.0" +version = "2.0.1" dependencies = [ "array-bytes 6.1.0", "async-trait", @@ -18560,7 +18775,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime" -version = "0.1.0" +version = "2.0.0" dependencies = [ "array-bytes 6.1.0", "frame-executive", @@ -18589,7 +18804,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-grandpa", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -18598,8 +18813,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", @@ -18610,7 +18825,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" -version = "0.1.0" +version = "2.0.0" dependencies = [ "futures", "sc-block-builder", @@ -18627,7 +18842,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-transaction-pool" -version = "0.1.0" +version = "2.0.0" dependencies = [ "futures", "parity-scale-codec", @@ -18642,7 +18857,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" -version = "0.1.0" +version = "4.0.0-dev" dependencies = [ "futures", "sc-service", @@ -18652,7 +18867,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "15.0.0" +version = "5.0.0-dev" dependencies = [ "ansi_term", "build-helper", @@ -18662,7 +18877,7 @@ dependencies = [ "sp-maybe-compressed-blob", "strum", "tempfile", - "toml 0.7.6", + "toml 0.8.2", "walkdir", "wasm-opt", ] @@ -18798,9 +19013,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "13fa70a4ee923979ffb522cacce59d34421ebdea5625e1073c4326ef9d2dd42e" dependencies = [ "proc-macro2", "quote", @@ -18865,13 +19080,13 @@ checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "tempfile" -version = "3.8.0" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ "cfg-if", "fastrand 2.0.0", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -18903,22 +19118,22 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "test-parachain-adder" -version = "0.1.0" +version = "1.0.0" dependencies = [ "dlmalloc", "parity-scale-codec", "polkadot-parachain-primitives", "sp-io", - "sp-std", + "sp-std 8.0.0", "substrate-wasm-builder", "tiny-keccak", ] [[package]] name = "test-parachain-adder-collator" -version = "0.1.0" +version = "1.0.0" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "futures", "futures-timer", "log", @@ -18942,7 +19157,7 @@ dependencies = [ [[package]] name = "test-parachain-halt" -version = "0.1.0" +version = "1.0.0" dependencies = [ "rustversion", "substrate-wasm-builder", @@ -18950,23 +19165,23 @@ dependencies = [ [[package]] name = "test-parachain-undying" -version = "0.1.0" +version = "1.0.0" dependencies = [ "dlmalloc", "log", "parity-scale-codec", "polkadot-parachain-primitives", "sp-io", - "sp-std", + "sp-std 8.0.0", "substrate-wasm-builder", "tiny-keccak", ] [[package]] name = "test-parachain-undying-collator" -version = "0.1.0" +version = "1.0.0" dependencies = [ - "clap 4.4.6", + "clap 4.4.11", "futures", "futures-timer", "log", @@ -18990,7 +19205,7 @@ dependencies = [ [[package]] name = "test-parachains" -version = "0.1.0" +version = "1.0.0" dependencies = [ "parity-scale-codec", "sp-core", @@ -19001,7 +19216,7 @@ dependencies = [ [[package]] name = "test-runtime-constants" -version = "0.1.0" +version = "1.0.0" dependencies = [ "frame-support", "polkadot-primitives", @@ -19012,19 +19227,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" @@ -19033,9 +19235,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", ] @@ -19062,13 +19264,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.38", + "syn 2.0.40", ] [[package]] @@ -19240,7 +19442,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -19327,14 +19529,26 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.6" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + +[[package]] +name = "toml" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.20.2", ] [[package]] @@ -19348,9 +19562,22 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.0.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap 2.0.0", "serde", @@ -19421,14 +19648,14 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -19446,7 +19673,7 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "5.0.0" +version = "1.0.0" dependencies = [ "coarsetime", "polkadot-primitives", @@ -19456,14 +19683,14 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "4.0.0" +version = "1.0.0" dependencies = [ "assert_matches", "expander 2.0.0", - "proc-macro-crate", + "proc-macro-crate 2.0.1", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] @@ -19612,11 +19839,11 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" -version = "0.36.0" +version = "0.10.0-dev" dependencies = [ "assert_cmd", "async-trait", - "clap 4.4.6", + "clap 4.4.11", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -19632,8 +19859,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", @@ -19704,7 +19931,7 @@ dependencies = [ "log", "md-5", "rand 0.8.5", - "ring", + "ring 0.16.20", "stun", "thiserror", "tokio", @@ -19719,7 +19946,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand 0.8.5", + "rand 0.7.3", "static_assertions", ] @@ -20018,7 +20245,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", "wasm-bindgen-shared", ] @@ -20052,7 +20279,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -20427,7 +20654,7 @@ version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ - "ring", + "ring 0.16.20", "untrusted", ] @@ -20437,7 +20664,7 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" dependencies = [ - "ring", + "ring 0.16.20", "untrusted", ] @@ -20481,7 +20708,7 @@ dependencies = [ "rand 0.8.5", "rcgen 0.9.3", "regex", - "ring", + "ring 0.16.20", "rtcp", "rtp", "rustls 0.19.1", @@ -20545,7 +20772,7 @@ dependencies = [ "rand 0.8.5", "rand_core 0.6.4", "rcgen 0.10.0", - "ring", + "ring 0.16.20", "rustls 0.19.1", "sec1 0.3.0", "serde", @@ -20675,7 +20902,7 @@ dependencies = [ [[package]] name = "westend-emulated-chain" -version = "0.1.0" +version = "0.0.0" dependencies = [ "emulated-integration-tests-common", "pallet-im-online", @@ -20695,7 +20922,7 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "5.0.0" +version = "1.0.0" dependencies = [ "binary-merkle-tree", "bitvec", @@ -20790,9 +21017,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", @@ -20806,7 +21033,7 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "5.0.0" +version = "1.0.0" dependencies = [ "frame-support", "polkadot-primitives", @@ -20816,14 +21043,16 @@ dependencies = [ "sp-runtime", "sp-weights", "staging-xcm", + "staging-xcm-builder", ] [[package]] name = "westend-system-emulated-network" -version = "0.1.0" +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", "westend-emulated-chain", @@ -21135,7 +21364,7 @@ dependencies = [ "lazy_static", "nom", "oid-registry 0.4.0", - "ring", + "ring 0.16.20", "rusticata-macros", "thiserror", "time 0.3.27", @@ -21170,7 +21399,7 @@ dependencies = [ [[package]] name = "xcm-emulator" -version = "0.3.0" +version = "0.1.0" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -21194,19 +21423,20 @@ 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", ] [[package]] name = "xcm-executor-integration-tests" -version = "0.1.0" +version = "1.0.0" dependencies = [ "frame-support", "frame-system", "futures", + "pallet-transaction-payment", "pallet-xcm", "parity-scale-codec", "polkadot-test-client", @@ -21216,25 +21446,26 @@ dependencies = [ "sp-keyring", "sp-runtime", "sp-state-machine", - "sp-tracing", + "sp-tracing 10.0.0", "staging-xcm", "staging-xcm-executor", ] [[package]] name = "xcm-procedural" -version = "5.0.0" +version = "1.0.0" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.38", + "staging-xcm", + "syn 2.0.40", "trybuild", ] [[package]] name = "xcm-simulator" -version = "5.0.0" +version = "1.0.0" dependencies = [ "frame-support", "parity-scale-codec", @@ -21243,7 +21474,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", @@ -21251,7 +21482,7 @@ dependencies = [ [[package]] name = "xcm-simulator-example" -version = "5.0.0" +version = "1.0.0" dependencies = [ "frame-support", "frame-system", @@ -21268,8 +21499,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", @@ -21278,7 +21509,7 @@ dependencies = [ [[package]] name = "xcm-simulator-fuzzer" -version = "0.1.0" +version = "1.0.0" dependencies = [ "arbitrary", "frame-support", @@ -21295,7 +21526,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -21348,12 +21579,12 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.40", ] [[package]] name = "zombienet-backchannel" -version = "0.1.0" +version = "1.0.0" dependencies = [ "futures-util", "lazy_static", diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/glutton/glutton-westend/src/xcm_config.rs index 5ebb0ade1231..3c391e5b8250 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/src/xcm_config.rs @@ -84,6 +84,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = RuntimeCall; type SafeCallFilter = Everything; type Aliasers = Nothing; + type TransactionalProcessor = (); } impl cumulus_pallet_xcm::Config for Runtime { From 8fbb7aab5741cd9bba1b57baf122d2033b3c527e Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Fri, 2 Feb 2024 15:45:40 +0100 Subject: [PATCH 09/18] Fixes --- Cargo.lock | 2962 ++++++++--------- .../bridge-hub-westend/src/xcm_config.rs | 3 +- .../runtimes/testing/penpal/src/xcm_config.rs | 3 +- 3 files changed, 1376 insertions(+), 1592 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d976452e4c3..1b3ea6f0a19e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -541,35 +541,6 @@ dependencies = [ "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", - "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=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", - "ark-transcript", - "digest 0.10.7", - "getrandom_or_panic", - "zeroize", -] - [[package]] name = "ark-serialize" version = "0.4.2" @@ -604,19 +575,6 @@ dependencies = [ "rayon", ] -[[package]] -name = "ark-transcript" -version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" -dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", - "digest 0.10.7", - "rand_core 0.6.4", - "sha3", -] - [[package]] name = "array-bytes" version = "4.2.0" @@ -744,9 +702,153 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +[[package]] +name = "asset-hub-kusama-runtime" +version = "0.13.0" +dependencies = [ + "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", + "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-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-transaction-pool", + "sp-version", + "sp-weights", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", +] + +[[package]] +name = "asset-hub-polkadot-runtime" +version = "0.13.0" +dependencies = [ + "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", + "frame-system-benchmarking", + "frame-system-rpc-runtime-api", + "frame-try-runtime", + "hex-literal", + "log", + "pallet-asset-tx-payment", + "pallet-assets", + "pallet-aura", + "pallet-authorship", + "pallet-balances", + "pallet-collator-selection", + "pallet-message-queue", + "pallet-multisig", + "pallet-nfts", + "pallet-nfts-runtime-api", + "pallet-proxy", + "pallet-session", + "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-common", + "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-transaction-pool", + "sp-version", + "sp-weights", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", +] + [[package]] name = "asset-hub-rococo-emulated-chain" -version = "0.0.0" +version = "0.1.0" dependencies = [ "asset-hub-rococo-runtime", "cumulus-primitives-core", @@ -761,11 +863,12 @@ dependencies = [ [[package]] name = "asset-hub-rococo-integration-tests" -version = "1.0.0" +version = "0.1.0" dependencies = [ "assert_matches", "asset-hub-rococo-runtime", "asset-test-utils", + "cumulus-pallet-parachain-system", "emulated-integration-tests-common", "frame-support", "pallet-asset-conversion", @@ -775,6 +878,7 @@ dependencies = [ "pallet-xcm", "parachains-common", "parity-scale-codec", + "penpal-runtime", "rococo-runtime", "rococo-system-emulated-network", "sp-runtime", @@ -784,7 +888,7 @@ dependencies = [ [[package]] name = "asset-hub-rococo-runtime" -version = "0.9.420" +version = "0.10.0" dependencies = [ "asset-test-utils", "assets-common", @@ -793,6 +897,7 @@ dependencies = [ "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", @@ -849,8 +954,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "sp-weights", @@ -863,7 +968,7 @@ dependencies = [ [[package]] name = "asset-hub-westend-emulated-chain" -version = "0.0.0" +version = "0.1.0" dependencies = [ "asset-hub-westend-runtime", "cumulus-primitives-core", @@ -878,14 +983,13 @@ dependencies = [ [[package]] name = "asset-hub-westend-integration-tests" -version = "1.0.0" +version = "0.1.0" 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", @@ -910,7 +1014,7 @@ dependencies = [ [[package]] name = "asset-hub-westend-runtime" -version = "0.9.420" +version = "0.13.0" dependencies = [ "asset-test-utils", "assets-common", @@ -919,6 +1023,7 @@ dependencies = [ "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", @@ -973,8 +1078,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -987,7 +1092,7 @@ dependencies = [ [[package]] name = "asset-test-utils" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assets-common", "cumulus-pallet-parachain-system", @@ -1012,7 +1117,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -1022,7 +1127,7 @@ dependencies = [ [[package]] name = "assets-common" -version = "0.1.0" +version = "0.5.0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1036,7 +1141,7 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -1235,29 +1340,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "bandersnatch_vrfs" -version = "0.0.4" -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", - "dleq_vrf", - "fflonk", - "merlin 3.0.0", - "rand_chacha 0.3.1", - "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", -] - [[package]] name = "base-x" version = "0.2.11" @@ -1314,7 +1396,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" -version = "4.0.0-dev" +version = "11.0.0" dependencies = [ "array-bytes 6.1.0", "env_logger 0.9.3", @@ -1361,8 +1443,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", - "rand 0.7.3", - "rand_core 0.5.1", + "rand 0.8.5", + "rand_core 0.6.4", "serde", "unicode-normalization", ] @@ -1543,7 +1625,6 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "schemars", "serde", ] @@ -1558,7 +1639,7 @@ dependencies = [ [[package]] name = "bp-asset-hub-rococo" -version = "0.1.0" +version = "0.2.0" dependencies = [ "bp-xcm-bridge-hub-router", "frame-support", @@ -1578,7 +1659,7 @@ dependencies = [ [[package]] name = "bp-bridge-hub-cumulus" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -1587,12 +1668,12 @@ dependencies = [ "frame-system", "polkadot-primitives", "sp-api", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "bp-bridge-hub-kusama" -version = "0.1.0" +version = "0.4.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -1600,12 +1681,12 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "bp-bridge-hub-polkadot" -version = "0.1.0" +version = "0.4.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -1613,12 +1694,12 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "bp-bridge-hub-rococo" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -1626,7 +1707,7 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] @@ -1639,12 +1720,12 @@ dependencies = [ "frame-support", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "bp-header-chain" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-runtime", "bp-test-utils", @@ -1658,24 +1739,24 @@ dependencies = [ "sp-consensus-grandpa", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "bp-kusama" -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", ] [[package]] name = "bp-messages" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-header-chain", "bp-runtime", @@ -1686,12 +1767,12 @@ dependencies = [ "scale-info", "serde", "sp-core", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "bp-parachains" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-header-chain", "bp-polkadot-core", @@ -1702,24 +1783,24 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "bp-polkadot" -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", ] [[package]] name = "bp-polkadot-bulletin" -version = "0.1.0" +version = "0.2.0" dependencies = [ "bp-header-chain", "bp-messages", @@ -1731,12 +1812,12 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "bp-polkadot-core" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-messages", "bp-runtime", @@ -1749,12 +1830,12 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "bp-relayers" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-messages", "bp-runtime", @@ -1764,24 +1845,24 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "bp-rococo" -version = "0.1.0" +version = "0.4.0" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", "frame-support", "sp-api", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "bp-runtime" -version = "0.1.0" +version = "0.5.0" dependencies = [ "frame-support", "frame-system", @@ -1797,14 +1878,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-std 8.0.0", + "sp-std", "sp-trie", "trie-db", ] [[package]] name = "bp-test-utils" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-header-chain", "bp-parachains", @@ -1817,7 +1898,7 @@ dependencies = [ "sp-consensus-grandpa", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-trie", ] @@ -1830,29 +1911,150 @@ dependencies = [ "bp-runtime", "frame-support", "sp-api", - "sp-std 8.0.0", + "sp-std", ] [[package]] -name = "bp-xcm-bridge-hub" -version = "0.1.0" +name = "bp-xcm-bridge-hub-router" +version = "0.4.0" dependencies = [ - "sp-std 8.0.0", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", ] [[package]] -name = "bp-xcm-bridge-hub-router" -version = "0.1.0" +name = "bridge-hub-kusama-runtime" +version = "0.5.0" +dependencies = [ + "bridge-hub-test-utils", + "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", + "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-offchain", + "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", +] + +[[package]] +name = "bridge-hub-polkadot-runtime" +version = "0.5.0" dependencies = [ + "bridge-hub-test-utils", + "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", "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-offchain", "sp-runtime", + "sp-session", + "sp-std", + "sp-storage", + "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" +version = "0.1.0" dependencies = [ "bridge-hub-rococo-runtime", "cumulus-primitives-core", @@ -1866,7 +2068,7 @@ dependencies = [ [[package]] name = "bridge-hub-rococo-integration-tests" -version = "1.0.0" +version = "0.1.0" dependencies = [ "asset-test-utils", "bp-messages", @@ -1883,14 +2085,13 @@ dependencies = [ "parachains-common", "parity-scale-codec", "rococo-westend-system-emulated-network", - "sp-runtime", "staging-xcm", "staging-xcm-executor", ] [[package]] name = "bridge-hub-rococo-runtime" -version = "0.1.0" +version = "0.4.0" dependencies = [ "bp-asset-hub-rococo", "bp-asset-hub-westend", @@ -1907,6 +2108,7 @@ dependencies = [ "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", @@ -1939,7 +2141,6 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", - "pallet-xcm-bridge-hub", "parachains-common", "parity-scale-codec", "polkadot-core-primitives", @@ -1960,8 +2161,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -1974,7 +2175,7 @@ dependencies = [ [[package]] name = "bridge-hub-test-utils" -version = "0.1.0" +version = "0.5.0" dependencies = [ "asset-test-utils", "bp-header-chain", @@ -1991,7 +2192,6 @@ dependencies = [ "frame-executive", "frame-support", "frame-system", - "impl-trait-for-tuples", "log", "pallet-balances", "pallet-bridge-grandpa", @@ -2010,8 +2210,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-tracing", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -2020,7 +2219,7 @@ dependencies = [ [[package]] name = "bridge-hub-westend-emulated-chain" -version = "0.0.0" +version = "0.1.0" dependencies = [ "bridge-hub-westend-runtime", "cumulus-primitives-core", @@ -2034,7 +2233,7 @@ dependencies = [ [[package]] name = "bridge-hub-westend-integration-tests" -version = "1.0.0" +version = "0.1.0" dependencies = [ "asset-test-utils", "bp-messages", @@ -2051,7 +2250,6 @@ dependencies = [ "parachains-common", "parity-scale-codec", "rococo-westend-system-emulated-network", - "sp-runtime", "staging-xcm", "staging-xcm-executor", ] @@ -2060,7 +2258,6 @@ dependencies = [ name = "bridge-hub-westend-runtime" version = "0.1.0" dependencies = [ - "bp-asset-hub-rococo", "bp-asset-hub-westend", "bp-bridge-hub-rococo", "bp-bridge-hub-westend", @@ -2075,6 +2272,7 @@ dependencies = [ "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", @@ -2107,7 +2305,6 @@ dependencies = [ "pallet-utility", "pallet-xcm", "pallet-xcm-benchmarks", - "pallet-xcm-bridge-hub", "parachains-common", "parity-scale-codec", "polkadot-core-primitives", @@ -2127,8 +2324,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -2142,7 +2339,7 @@ dependencies = [ [[package]] name = "bridge-runtime-common" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-header-chain", "bp-messages", @@ -2151,7 +2348,6 @@ dependencies = [ "bp-relayers", "bp-runtime", "bp-test-utils", - "bp-xcm-bridge-hub", "bp-xcm-bridge-hub-router", "frame-support", "frame-system", @@ -2170,7 +2366,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-trie", "staging-xcm", "staging-xcm-builder", @@ -2454,7 +2650,7 @@ checksum = "b9b68e3193982cd54187d71afdb2a271ad4cf8af157858e9cb911b91321de143" dependencies = [ "core2", "multibase", - "multihash 0.17.0", + "multihash", "serde", "unsigned-varint", ] @@ -2619,18 +2815,75 @@ dependencies = [ ] [[package]] -name = "collectives-westend-emulated-chain" -version = "0.0.0" +name = "collectives-polkadot-runtime" +version = "5.0.0" dependencies = [ - "collectives-westend-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", - "emulated-integration-tests-common", + "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-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", - "serde_json", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "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", - "westend-emulated-chain", + "sp-session", + "sp-std", + "sp-storage", + "sp-transaction-pool", + "sp-version", + "staging-parachain-info", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "substrate-wasm-builder", ] [[package]] @@ -2638,6 +2891,7 @@ name = "collectives-westend-runtime" version = "1.0.0" dependencies = [ "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", "cumulus-pallet-session-benchmarking", "cumulus-pallet-xcm", @@ -2654,7 +2908,6 @@ dependencies = [ "hex-literal", "log", "pallet-alliance", - "pallet-asset-rate", "pallet-aura", "pallet-authorship", "pallet-balances", @@ -2674,7 +2927,6 @@ dependencies = [ "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", - "pallet-treasury", "pallet-utility", "pallet-xcm", "parachains-common", @@ -2695,8 +2947,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -2704,6 +2956,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "substrate-wasm-builder", + "testnets-common", "westend-runtime-constants", ] @@ -2758,22 +3011,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "common" -version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "fflonk", - "getrandom_or_panic", - "merlin 3.0.0", - "rand_chacha 0.3.1", -] - [[package]] name = "common-path" version = "1.0.0" @@ -2856,7 +3093,7 @@ checksum = "f272d0c4cf831b4fa80ee529c7707f76585986e910e1fbce1d7921970bc1a241" [[package]] name = "contracts-rococo-runtime" -version = "0.2.0" +version = "0.6.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", @@ -2880,6 +3117,7 @@ dependencies = [ "pallet-balances", "pallet-collator-selection", "pallet-contracts", + "pallet-contracts-primitives", "pallet-insecure-randomness-collective-flip", "pallet-message-queue", "pallet-multisig", @@ -2907,8 +3145,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -3318,7 +3556,7 @@ dependencies = [ [[package]] name = "cumulus-client-cli" -version = "0.1.0" +version = "0.5.0" dependencies = [ "clap 4.4.11", "parity-scale-codec", @@ -3326,7 +3564,6 @@ dependencies = [ "sc-cli", "sc-client-api", "sc-service", - "sp-blockchain", "sp-core", "sp-runtime", "url", @@ -3334,7 +3571,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" -version = "0.1.0" +version = "0.5.0" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -3358,13 +3595,13 @@ dependencies = [ "sp-maybe-compressed-blob", "sp-runtime", "sp-state-machine", - "sp-tracing 10.0.0", + "sp-tracing", "tracing", ] [[package]] name = "cumulus-client-consensus-aura" -version = "0.1.0" +version = "0.5.0" dependencies = [ "async-trait", "cumulus-client-collator", @@ -3405,7 +3642,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" -version = "0.1.0" +version = "0.5.0" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -3429,7 +3666,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-timestamp", - "sp-tracing 10.0.0", + "sp-tracing", "sp-trie", "substrate-prometheus-endpoint", "tracing", @@ -3437,7 +3674,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-proposer" -version = "0.1.0" +version = "0.5.0" dependencies = [ "anyhow", "async-trait", @@ -3451,7 +3688,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-relay-chain" -version = "0.1.0" +version = "0.5.0" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -3473,7 +3710,7 @@ dependencies = [ [[package]] name = "cumulus-client-network" -version = "0.1.0" +version = "0.5.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -3506,7 +3743,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" -version = "0.1.0" +version = "0.5.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -3534,7 +3771,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" -version = "0.1.0" +version = "0.5.0" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -3542,7 +3779,6 @@ dependencies = [ "cumulus-client-network", "cumulus-client-pov-recovery", "cumulus-primitives-core", - "cumulus-primitives-proof-size-hostfunction", "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", "cumulus-relay-chain-minimal-node", @@ -3569,7 +3805,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" -version = "0.1.0" +version = "0.5.0" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -3581,12 +3817,12 @@ dependencies = [ "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "cumulus-pallet-dmp-queue" -version = "0.1.0" +version = "0.5.0" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -3598,21 +3834,20 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "staging-xcm", ] [[package]] name = "cumulus-pallet-parachain-system" -version = "0.1.0" +version = "0.5.0" dependencies = [ "assert_matches", "bytes", "cumulus-pallet-parachain-system-proc-macro", "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", - "cumulus-primitives-proof-size-hostfunction", "cumulus-test-client", "cumulus-test-relay-sproof-builder", "environmental", @@ -3632,26 +3867,25 @@ dependencies = [ "sc-client-api", "scale-info", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities", "sp-inherents", "sp-io", "sp-keyring", "sp-runtime", "sp-state-machine", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "sp-trie", "sp-version", "staging-xcm", "trie-db", - "trie-standardmap", ] [[package]] name = "cumulus-pallet-parachain-system-proc-macro" -version = "0.1.0" +version = "0.4.0" dependencies = [ - "proc-macro-crate 2.0.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.40", @@ -3659,7 +3893,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-session-benchmarking" -version = "3.0.0" +version = "7.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -3667,12 +3901,12 @@ dependencies = [ "pallet-session", "parity-scale-codec", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "cumulus-pallet-solo-to-para" -version = "0.1.0" +version = "0.5.0" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -3682,12 +3916,12 @@ dependencies = [ "polkadot-primitives", "scale-info", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "cumulus-pallet-xcm" -version = "0.1.0" +version = "0.5.0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -3696,13 +3930,13 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "staging-xcm", ] [[package]] name = "cumulus-pallet-xcmp-queue" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bounded-collections", "bp-xcm-bridge-hub-router", @@ -3721,7 +3955,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -3729,7 +3963,7 @@ dependencies = [ [[package]] name = "cumulus-ping" -version = "0.1.0" +version = "0.5.0" dependencies = [ "cumulus-pallet-xcm", "cumulus-primitives-core", @@ -3738,13 +3972,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "staging-xcm", ] [[package]] name = "cumulus-primitives-aura" -version = "0.1.0" +version = "0.5.0" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -3752,12 +3986,12 @@ dependencies = [ "sp-api", "sp-consensus-aura", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "cumulus-primitives-core" -version = "0.1.0" +version = "0.5.0" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -3766,14 +4000,14 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-trie", "staging-xcm", ] [[package]] name = "cumulus-primitives-parachain-inherent" -version = "0.1.0" +version = "0.5.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -3787,39 +4021,27 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", "sp-trie", "tracing", ] -[[package]] -name = "cumulus-primitives-proof-size-hostfunction" -version = "0.1.0" -dependencies = [ - "sp-core", - "sp-externalities 0.19.0", - "sp-io", - "sp-runtime-interface 17.0.0", - "sp-state-machine", - "sp-trie", -] - [[package]] name = "cumulus-primitives-timestamp" -version = "0.1.0" +version = "0.5.0" dependencies = [ "cumulus-primitives-core", "futures", "parity-scale-codec", "sp-inherents", - "sp-std 8.0.0", + "sp-std", "sp-timestamp", ] [[package]] name = "cumulus-primitives-utility" -version = "0.1.0" +version = "0.5.1" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -3830,7 +4052,7 @@ dependencies = [ "polkadot-runtime-parachains", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -3838,7 +4060,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" -version = "0.1.0" +version = "0.5.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -3866,7 +4088,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" -version = "0.1.0" +version = "0.5.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -3883,7 +4105,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" -version = "0.1.0" +version = "0.5.0" dependencies = [ "array-bytes 6.1.0", "async-trait", @@ -3891,13 +4113,11 @@ dependencies = [ "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", "futures", - "parking_lot 0.12.1", "polkadot-availability-recovery", "polkadot-collator-protocol", "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", @@ -3905,25 +4125,22 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "sc-authority-discovery", - "sc-client-api", "sc-network", "sc-network-common", "sc-service", "sc-tracing", "sc-utils", "sp-api", - "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-runtime", "substrate-prometheus-endpoint", - "tokio", "tracing", ] [[package]] name = "cumulus-relay-chain-rpc-interface" -version = "0.1.0" +version = "0.5.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -3950,8 +4167,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-storage 13.0.0", - "sp-version", + "sp-storage", "thiserror", "tokio", "tokio-util", @@ -3965,7 +4181,6 @@ version = "0.1.0" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-parachain-inherent", - "cumulus-primitives-proof-size-hostfunction", "cumulus-test-relay-sproof-builder", "cumulus-test-runtime", "cumulus-test-service", @@ -3993,14 +4208,14 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.1.0" +version = "0.5.0" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives", "sp-runtime", "sp-state-machine", - "sp-std 8.0.0", + "sp-std", "sp-trie", ] @@ -4031,7 +4246,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -4105,7 +4320,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-timestamp", - "sp-tracing 10.0.0", + "sp-tracing", "substrate-test-client", "substrate-test-utils", "tempfile", @@ -4530,22 +4745,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86e3bdc80eee6e16b2b6b0f87fbc98c04bee3455e35174c0de1a125d0688c632" -[[package]] -name = "dleq_vrf" -version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=e9782f9#e9782f938629c90f3adb3fff2358bc8d1386af3e" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-scale 0.0.12", - "ark-secret-scalar", - "ark-serialize", - "ark-std", - "ark-transcript", - "arrayvec 0.7.4", - "zeroize", -] - [[package]] name = "dlmalloc" version = "0.2.4" @@ -4852,16 +5051,6 @@ dependencies = [ "syn 2.0.40", ] -[[package]] -name = "env_logger" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" -dependencies = [ - "log", - "regex", -] - [[package]] name = "env_logger" version = "0.9.3" @@ -4911,7 +5100,7 @@ dependencies = [ [[package]] name = "erasure_coding_fuzzer" -version = "1.0.0" +version = "0.1.0" dependencies = [ "honggfuzz", "polkadot-erasure-coding", @@ -5062,7 +5251,7 @@ checksum = "f5aa1e3ae159e592ad222dc90c5acbad632b527779ba88486abe92782ab268bd" dependencies = [ "expander 0.0.4", "indexmap 1.9.3", - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -5071,12 +5260,11 @@ dependencies = [ [[package]] name = "fdlimit" -version = "0.3.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" +checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" dependencies = [ "libc", - "thiserror", ] [[package]] @@ -5115,19 +5303,6 @@ dependencies = [ "subtle 2.4.1", ] -[[package]] -name = "fflonk" -version = "0.1.0" -source = "git+https://github.com/w3f/fflonk#1e854f35e9a65d08b11a86291405cdc95baa0a35" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "merlin 3.0.0", -] - [[package]] name = "fiat-crypto" version = "0.1.20" @@ -5231,7 +5406,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" -version = "3.0.0" +version = "11.0.0" dependencies = [ "parity-scale-codec", ] @@ -5263,7 +5438,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame" -version = "0.0.1-dev" +version = "0.1.0" dependencies = [ "docify", "frame-executive", @@ -5274,7 +5449,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", @@ -5286,14 +5461,14 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std", "sp-transaction-pool", "sp-version", ] [[package]] name = "frame-benchmarking" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "array-bytes 6.1.0", "frame-support", @@ -5312,15 +5487,15 @@ 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", + "sp-std", + "sp-storage", "static_assertions", ] [[package]] name = "frame-benchmarking-cli" -version = "4.0.0-dev" +version = "30.0.0" dependencies = [ "Inflector", "array-bytes 6.1.0", @@ -5352,22 +5527,22 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-database", - "sp-externalities 0.19.0", + "sp-externalities", "sp-inherents", "sp-io", "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-storage 13.0.0", + "sp-storage", "sp-trie", - "sp-wasm-interface 14.0.0", + "sp-wasm-interface", "thiserror", "thousands", ] [[package]] name = "frame-benchmarking-pallet-pov" -version = "4.0.0-dev" +version = "16.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -5376,17 +5551,17 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "frame-election-provider-solution-type" -version = "4.0.0-dev" +version = "12.0.0" dependencies = [ "frame-election-provider-support", "frame-support", "parity-scale-codec", - "proc-macro-crate 2.0.1", + "proc-macro-crate", "proc-macro2", "quote", "scale-info", @@ -5397,7 +5572,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -5410,12 +5585,12 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "frame-election-solution-type-fuzzer" -version = "2.0.0-alpha.5" +version = "0.1.0" dependencies = [ "clap 4.4.11", "frame-election-provider-solution-type", @@ -5432,7 +5607,7 @@ dependencies = [ [[package]] name = "frame-executive" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "array-bytes 6.1.0", "frame-support", @@ -5447,8 +5622,8 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "sp-version", ] @@ -5466,7 +5641,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "futures", "indicatif", @@ -5478,7 +5653,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-tracing 10.0.0", + "sp-tracing", "spinners", "substrate-rpc-client", "tokio", @@ -5487,7 +5662,7 @@ dependencies = [ [[package]] name = "frame-support" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "aquamarine", "array-bytes 6.1.0", @@ -5513,7 +5688,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", - "sp-debug-derive 8.0.0", + "sp-debug-derive", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -5521,8 +5696,8 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "sp-weights", "static_assertions", "tt-call", @@ -5530,7 +5705,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "4.0.0-dev" +version = "21.0.0" dependencies = [ "Inflector", "cfg-expr", @@ -5542,17 +5717,16 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "regex", "sp-core-hashing", "syn 2.0.40", ] [[package]] name = "frame-support-procedural-tools" -version = "4.0.0-dev" +version = "9.0.0" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate 2.0.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.40", @@ -5560,7 +5734,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "3.0.0" +version = "10.0.0" dependencies = [ "proc-macro2", "quote", @@ -5569,7 +5743,7 @@ dependencies = [ [[package]] name = "frame-support-test" -version = "3.0.0" +version = "0.1.0" dependencies = [ "frame-benchmarking", "frame-executive", @@ -5589,7 +5763,7 @@ dependencies = [ "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std 8.0.0", + "sp-std", "sp-version", "static_assertions", "trybuild", @@ -5597,7 +5771,7 @@ dependencies = [ [[package]] name = "frame-support-test-compile-pass" -version = "4.0.0-dev" +version = "0.1.0" dependencies = [ "frame-support", "frame-system", @@ -5610,7 +5784,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" -version = "4.0.0-dev" +version = "0.1.0" dependencies = [ "frame-support", "frame-system", @@ -5631,21 +5805,20 @@ dependencies = [ [[package]] name = "frame-system" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "cfg-if", "criterion 0.4.0", - "docify", "frame-support", "log", "parity-scale-codec", "scale-info", "serde", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-version", "sp-weights", "substrate-test-runtime-client", @@ -5653,7 +5826,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -5661,16 +5834,16 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-version", ] [[package]] name = "frame-system-rpc-runtime-api" -version = "4.0.0-dev" +version = "24.0.0" dependencies = [ "parity-scale-codec", "sp-api", @@ -5678,13 +5851,13 @@ dependencies = [ [[package]] name = "frame-try-runtime" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "frame-support", "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] @@ -5705,9 +5878,9 @@ dependencies = [ [[package]] name = "fs4" -version = "0.7.0" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29f9df8a11882c4e3335eb2d18a0137c505d9ca927470b0cac9c6f0ae07d28f7" +checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" dependencies = [ "rustix 0.38.21", "windows-sys 0.48.0", @@ -5858,7 +6031,7 @@ dependencies = [ [[package]] name = "generate-bags" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "chrono", "frame-election-provider-support", @@ -5921,16 +6094,6 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] -[[package]] -name = "getrandom_or_panic" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" -dependencies = [ - "rand 0.8.5", - "rand_core 0.6.4", -] - [[package]] name = "ghash" version = "0.4.4" @@ -5987,6 +6150,51 @@ dependencies = [ "regex", ] +[[package]] +name = "glutton-runtime" +version = "5.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", + "sp-storage", + "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" @@ -6021,8 +6229,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -6787,7 +6995,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44e8ab85614a08792b9bff6c8feee23be78c98d0182d4c622c05256ab553892a" dependencies = [ "heck", - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -6882,7 +7090,7 @@ checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" [[package]] name = "kitchensink-runtime" -version = "3.0.0-dev" +version = "0.1.0" dependencies = [ "frame-benchmarking", "frame-benchmarking-pallet-pov", @@ -6911,13 +7119,13 @@ dependencies = [ "pallet-child-bounties", "pallet-collective", "pallet-contracts", + "pallet-contracts-primitives", "pallet-conviction-voting", "pallet-core-fellowship", "pallet-democracy", "pallet-election-provider-multi-phase", "pallet-election-provider-support-benchmarking", "pallet-elections-phragmen", - "pallet-example-tasks", "pallet-fast-unstake", "pallet-glutton", "pallet-grandpa", @@ -6990,8 +7198,8 @@ dependencies = [ "sp-session", "sp-staking", "sp-statement-store", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "static_assertions", @@ -7104,17 +7312,6 @@ 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" @@ -7203,7 +7400,7 @@ dependencies = [ "libp2p-identity", "log", "multiaddr", - "multihash 0.17.0", + "multihash", "multistream-select", "once_cell", "parking_lot 0.12.1", @@ -7263,7 +7460,7 @@ dependencies = [ "ed25519-dalek", "log", "multiaddr", - "multihash 0.17.0", + "multihash", "quick-protobuf", "rand 0.8.5", "sha2 0.10.7", @@ -7471,7 +7668,7 @@ dependencies = [ "libp2p-core", "libp2p-identity", "rcgen 0.10.0", - "ring 0.16.20", + "ring", "rustls 0.20.8", "thiserror", "webpki 0.22.0", @@ -7510,7 +7707,7 @@ dependencies = [ "libp2p-identity", "libp2p-noise", "log", - "multihash 0.17.0", + "multihash", "quick-protobuf", "quick-protobuf-codec", "rand 0.8.5", @@ -8005,7 +8202,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "minimal-node" -version = "4.0.0-dev" +version = "0.1.0" dependencies = [ "clap 4.4.11", "frame", @@ -8102,7 +8299,7 @@ dependencies = [ [[package]] name = "mmr-gadget" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "futures", "log", @@ -8118,14 +8315,14 @@ dependencies = [ "sp-core", "sp-mmr-primitives", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing", "substrate-test-runtime-client", "tokio", ] [[package]] name = "mmr-rpc" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "anyhow", "jsonrpsee", @@ -8177,7 +8374,7 @@ dependencies = [ "data-encoding", "log", "multibase", - "multihash 0.17.0", + "multihash", "percent-encoding", "serde", "static_assertions", @@ -8207,87 +8404,19 @@ dependencies = [ "blake3", "core2", "digest 0.10.7", - "multihash-derive 0.8.0", + "multihash-derive", "sha2 0.10.7", "sha3", "unsigned-varint", ] -[[package]] -name = "multihash" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd8a792c1694c6da4f68db0a9d707c72bd260994da179e6030a5dcee00bb815" -dependencies = [ - "core2", - "digest 0.10.7", - "multihash-derive 0.8.0", - "sha2 0.10.7", - "unsigned-varint", -] - -[[package]] -name = "multihash" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076d548d76a0e2a0d4ab471d0b1c36c577786dfc4471242035d97a12a735c492" -dependencies = [ - "core2", - "unsigned-varint", -] - -[[package]] -name = "multihash-codetable" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d815ecb3c8238d00647f8630ede7060a642c9f704761cd6082cb4028af6935" -dependencies = [ - "blake2b_simd", - "blake2s_simd", - "blake3", - "core2", - "digest 0.10.7", - "multihash-derive 0.9.0", - "ripemd", - "serde", - "sha1", - "sha2 0.10.7", - "sha3", - "strobe-rs", -] - [[package]] name = "multihash-derive" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc076939022111618a5026d3be019fd8b366e76314538ff9a1b59ffbcbf98bcd" dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", - "synstructure", -] - -[[package]] -name = "multihash-derive" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "890e72cb7396cb99ed98c1246a97b243cc16394470d94e0bc8b0c2c11d84290e" -dependencies = [ - "core2", - "multihash 0.19.1", - "multihash-derive-impl", -] - -[[package]] -name = "multihash-derive-impl" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38685e08adb338659871ecfc6ee47ba9b22dcc8abcf6975d379cc49145c3040" -dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro-error", "proc-macro2", "quote", @@ -8342,6 +8471,15 @@ 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" @@ -8469,7 +8607,7 @@ checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" [[package]] name = "node-bench" -version = "0.9.0-dev" +version = "0.1.0" dependencies = [ "array-bytes 6.1.0", "clap 4.4.11", @@ -8498,14 +8636,14 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-timestamp", - "sp-tracing 10.0.0", + "sp-tracing", "sp-trie", "tempfile", ] [[package]] name = "node-primitives" -version = "2.0.0" +version = "0.1.0" dependencies = [ "sp-core", "sp-runtime", @@ -8513,7 +8651,7 @@ dependencies = [ [[package]] name = "node-rpc" -version = "3.0.0-dev" +version = "0.1.0" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -8545,7 +8683,7 @@ dependencies = [ [[package]] name = "node-runtime-generate-bags" -version = "3.0.0" +version = "0.1.0" dependencies = [ "clap 4.4.11", "generate-bags", @@ -8554,7 +8692,7 @@ dependencies = [ [[package]] name = "node-template" -version = "4.0.0-dev" +version = "0.1.0" dependencies = [ "clap 4.4.11", "frame-benchmarking", @@ -8598,7 +8736,7 @@ dependencies = [ [[package]] name = "node-template-release" -version = "3.0.0" +version = "0.1.0" dependencies = [ "clap 4.4.11", "flate2", @@ -8607,12 +8745,12 @@ dependencies = [ "itertools 0.10.5", "tar", "tempfile", - "toml_edit 0.19.15", + "toml_edit", ] [[package]] name = "node-template-runtime" -version = "4.0.0-dev" +version = "0.1.0" dependencies = [ "frame-benchmarking", "frame-executive", @@ -8642,8 +8780,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -8651,7 +8789,7 @@ dependencies = [ [[package]] name = "node-testing" -version = "3.0.0-dev" +version = "0.1.0" dependencies = [ "frame-system", "fs_extra", @@ -8681,7 +8819,7 @@ dependencies = [ "sp-keyring", "sp-runtime", "sp-timestamp", - "staging-node-cli", + "staging-node-executor", "substrate-test-client", "tempfile", ] @@ -8922,7 +9060,7 @@ dependencies = [ "itertools 0.11.0", "layout-rs", "petgraph", - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -8983,7 +9121,7 @@ dependencies = [ [[package]] name = "pallet-alliance" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "array-bytes 6.1.0", "frame-benchmarking", @@ -8999,12 +9137,12 @@ dependencies = [ "sp-core-hashing", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-asset-conversion" -version = "4.0.0-dev" +version = "8.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9019,12 +9157,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-asset-conversion-tx-payment" -version = "4.0.0-dev" +version = "8.0.0" dependencies = [ "frame-support", "frame-system", @@ -9037,13 +9175,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", ] [[package]] name = "pallet-asset-rate" -version = "4.0.0-dev" +version = "5.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9054,12 +9192,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-asset-tx-payment" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9075,13 +9213,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", ] [[package]] name = "pallet-assets" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9093,12 +9231,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-atomic-swap" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-support", "frame-system", @@ -9108,12 +9246,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-aura" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "frame-support", "frame-system", @@ -9126,12 +9264,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-authority-discovery" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-support", "frame-system", @@ -9143,12 +9281,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-authorship" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-support", "frame-system", @@ -9158,12 +9296,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-babe" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9186,12 +9324,12 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-bags-list" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "aquamarine", "docify", @@ -9206,13 +9344,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", ] [[package]] name = "pallet-bags-list-fuzzer" -version = "4.0.0-dev" +version = "0.1.0" dependencies = [ "frame-election-provider-support", "honggfuzz", @@ -9222,7 +9360,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" -version = "4.0.0-dev" +version = "0.1.0" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -9233,14 +9371,14 @@ dependencies = [ "pallet-staking", "sp-core", "sp-runtime", - "sp-std 8.0.0", - "sp-storage 13.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-storage", + "sp-tracing", ] [[package]] name = "pallet-balances" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9253,12 +9391,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-beefy" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-election-provider-support", "frame-support", @@ -9281,12 +9419,12 @@ dependencies = [ "sp-session", "sp-staking", "sp-state-machine", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-beefy-mmr" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "array-bytes 6.1.0", "binary-merkle-tree", @@ -9306,12 +9444,12 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-bounties" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9324,12 +9462,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-bridge-grandpa" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-header-chain", "bp-runtime", @@ -9345,13 +9483,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-trie", ] [[package]] name = "pallet-bridge-messages" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-messages", "bp-runtime", @@ -9366,12 +9504,12 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-bridge-parachains" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-header-chain", "bp-parachains", @@ -9388,13 +9526,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-trie", ] [[package]] name = "pallet-bridge-relayers" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bp-messages", "bp-relayers", @@ -9410,12 +9548,12 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-broker" -version = "0.1.0" +version = "0.4.0" dependencies = [ "bitvec", "frame-benchmarking", @@ -9427,12 +9565,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-child-bounties" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9446,12 +9584,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-collator-selection" -version = "3.0.0" +version = "7.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9470,13 +9608,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", ] [[package]] name = "pallet-collective" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9487,12 +9625,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-collective-content" -version = "0.1.0" +version = "0.4.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9502,12 +9640,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-contracts" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -9522,8 +9660,8 @@ dependencies = [ "pallet-assets", "pallet-balances", "pallet-contracts-fixtures", + "pallet-contracts-primitives", "pallet-contracts-proc-macro", - "pallet-contracts-uapi", "pallet-insecure-randomness-collective-flip", "pallet-message-queue", "pallet-proxy", @@ -9541,8 +9679,8 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "staging-xcm", "staging-xcm-builder", "wasm-instrument 0.4.0", @@ -9552,23 +9690,13 @@ dependencies = [ [[package]] name = "pallet-contracts-fixtures" -version = "1.0.0" +version = "0.1.0" dependencies = [ - "anyhow", - "cfg-if", "frame-system", - "parity-wasm", "sp-runtime", - "tempfile", - "toml 0.8.2", - "twox-hash", "wat", ] -[[package]] -name = "pallet-contracts-fixtures-common" -version = "1.0.0" - [[package]] name = "pallet-contracts-mock-network" version = "1.0.0" @@ -9580,8 +9708,8 @@ dependencies = [ "pallet-balances", "pallet-contracts", "pallet-contracts-fixtures", + "pallet-contracts-primitives", "pallet-contracts-proc-macro", - "pallet-contracts-uapi", "pallet-insecure-randomness-collective-flip", "pallet-message-queue", "pallet-proxy", @@ -9599,8 +9727,8 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -9608,27 +9736,29 @@ dependencies = [ ] [[package]] -name = "pallet-contracts-proc-macro" -version = "4.0.0-dev" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.40", -] - -[[package]] -name = "pallet-contracts-uapi" -version = "4.0.0-dev" +name = "pallet-contracts-primitives" +version = "29.0.0" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", - "paste", "scale-info", + "sp-runtime", + "sp-std", + "sp-weights", +] + +[[package]] +name = "pallet-contracts-proc-macro" +version = "16.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.40", ] [[package]] name = "pallet-conviction-voting" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "assert_matches", "frame-benchmarking", @@ -9642,12 +9772,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-core-fellowship" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9659,12 +9789,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-default-config-example" -version = "4.0.0-dev" +version = "8.0.0" dependencies = [ "frame-support", "frame-system", @@ -9673,12 +9803,12 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-democracy" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9693,12 +9823,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-dev-mode" -version = "4.0.0-dev" +version = "8.0.0" dependencies = [ "frame-support", "frame-system", @@ -9709,12 +9839,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-election-provider-e2e-test" -version = "1.0.0" +version = "0.1.0" dependencies = [ "frame-election-provider-support", "frame-support", @@ -9734,13 +9864,13 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", ] [[package]] name = "pallet-election-provider-multi-phase" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9758,14 +9888,14 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "strum", ] [[package]] name = "pallet-election-provider-support-benchmarking" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -9773,12 +9903,12 @@ dependencies = [ "parity-scale-codec", "sp-npos-elections", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-elections-phragmen" -version = "5.0.0-dev" +version = "27.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9792,14 +9922,14 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "substrate-test-utils", ] [[package]] name = "pallet-example-basic" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9811,12 +9941,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-example-frame-crate" -version = "0.0.1" +version = "0.1.0" dependencies = [ "frame", "parity-scale-codec", @@ -9825,7 +9955,7 @@ dependencies = [ [[package]] name = "pallet-example-kitchensink" -version = "4.0.0-dev" +version = "8.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9837,12 +9967,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-example-offchain-worker" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-support", "frame-system", @@ -9854,27 +9984,12 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-example-split" -version = "4.0.0-dev" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-std 8.0.0", -] - -[[package]] -name = "pallet-example-tasks" -version = "1.0.0-dev" +version = "8.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -9884,13 +9999,12 @@ dependencies = [ "scale-info", "sp-core", "sp-io", - "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-examples" -version = "4.0.0-dev" +version = "0.1.0" dependencies = [ "pallet-default-config-example", "pallet-dev-mode", @@ -9899,12 +10013,11 @@ dependencies = [ "pallet-example-kitchensink", "pallet-example-offchain-worker", "pallet-example-split", - "pallet-example-tasks", ] [[package]] name = "pallet-fast-unstake" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -9922,14 +10035,14 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "substrate-test-utils", ] [[package]] name = "pallet-glutton" -version = "4.0.0-dev" +version = "12.0.0" dependencies = [ "blake2 0.10.6", "frame-benchmarking", @@ -9942,12 +10055,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-grandpa" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "finality-grandpa", "frame-benchmarking", @@ -9972,12 +10085,12 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-identity" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "enumflags2", "frame-benchmarking", @@ -9989,12 +10102,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-im-online" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10009,12 +10122,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-indices" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10026,12 +10139,12 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-insecure-randomness-collective-flip" -version = "4.0.0-dev" +version = "14.0.0" dependencies = [ "frame-support", "frame-system", @@ -10041,12 +10154,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-lottery" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10058,12 +10171,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-membership" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10074,14 +10187,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-message-queue" -version = "7.0.0-dev" +version = "29.0.0" dependencies = [ - "environmental", "frame-benchmarking", "frame-support", "frame-system", @@ -10095,14 +10207,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "sp-weights", ] [[package]] name = "pallet-mixnet" -version = "0.1.0-dev" +version = "0.2.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10116,12 +10228,12 @@ dependencies = [ "sp-io", "sp-mixnet", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-mmr" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "array-bytes 6.1.0", "env_logger 0.9.3", @@ -10136,12 +10248,12 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-multisig" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10152,12 +10264,12 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-nft-fractionalization" -version = "4.0.0-dev" +version = "8.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10171,12 +10283,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-nfts" -version = "4.0.0-dev" +version = "20.0.0" dependencies = [ "enumflags2", "frame-benchmarking", @@ -10190,22 +10302,21 @@ dependencies = [ "sp-io", "sp-keystore", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-nfts-runtime-api" -version = "4.0.0-dev" +version = "12.0.0" dependencies = [ "pallet-nfts", "parity-scale-codec", "sp-api", - "sp-std 8.0.0", ] [[package]] name = "pallet-nicks" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-support", "frame-system", @@ -10215,12 +10326,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-nis" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10232,12 +10343,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-node-authorization" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-support", "frame-system", @@ -10247,12 +10358,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-nomination-pools" -version = "1.0.0" +version = "23.0.0" dependencies = [ "frame-support", "frame-system", @@ -10264,13 +10375,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", ] [[package]] name = "pallet-nomination-pools-benchmarking" -version = "1.0.0" +version = "24.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -10287,14 +10398,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface 17.0.0", + "sp-runtime-interface", "sp-staking", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-nomination-pools-fuzzer" -version = "2.0.0" +version = "0.1.0" dependencies = [ "frame-support", "frame-system", @@ -10304,22 +10415,22 @@ dependencies = [ "rand 0.8.5", "sp-io", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing", ] [[package]] name = "pallet-nomination-pools-runtime-api" -version = "1.0.0-dev" +version = "21.0.0" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", "sp-api", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-nomination-pools-test-staking" -version = "1.0.0" +version = "0.1.0" dependencies = [ "frame-election-provider-support", "frame-support", @@ -10337,13 +10448,13 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", ] [[package]] name = "pallet-offences" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "frame-support", "frame-system", @@ -10356,12 +10467,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-offences-benchmarking" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -10383,12 +10494,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-paged-list" -version = "0.1.0" +version = "0.4.0" dependencies = [ "docify", "frame-benchmarking", @@ -10400,7 +10511,7 @@ dependencies = [ "sp-io", "sp-metadata-ir", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] @@ -10416,7 +10527,7 @@ dependencies = [ [[package]] name = "pallet-parachain-template" -version = "0.1.0" +version = "0.5.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10431,7 +10542,7 @@ dependencies = [ [[package]] name = "pallet-preimage" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10443,12 +10554,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-proxy" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10460,12 +10571,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-ranked-collective" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10477,12 +10588,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-recovery" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10493,12 +10604,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-referenda" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "assert_matches", "frame-benchmarking", @@ -10515,12 +10626,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-remark" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10531,12 +10642,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-root-offences" -version = "1.0.0-dev" +version = "23.0.0" dependencies = [ "frame-election-provider-support", "frame-support", @@ -10552,12 +10663,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-root-testing" -version = "1.0.0-dev" +version = "2.0.0" dependencies = [ "frame-support", "frame-system", @@ -10566,14 +10677,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-safe-mode" -version = "4.0.0-dev" +version = "7.0.0" dependencies = [ - "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -10586,12 +10696,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-salary" -version = "4.0.0-dev" +version = "11.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10603,30 +10713,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", -] - -[[package]] -name = "pallet-sassafras" -version = "0.3.5-dev" -dependencies = [ - "array-bytes 6.1.0", - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-consensus-sassafras", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-scheduler" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -10639,14 +10731,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-weights", "substrate-test-utils", ] [[package]] name = "pallet-scored-pool" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-support", "frame-system", @@ -10656,12 +10748,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-session" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-support", "frame-system", @@ -10676,13 +10768,13 @@ dependencies = [ "sp-session", "sp-staking", "sp-state-machine", - "sp-std 8.0.0", + "sp-std", "sp-trie", ] [[package]] name = "pallet-session-benchmarking" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -10700,24 +10792,24 @@ dependencies = [ "sp-io", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-skip-feeless-payment" -version = "1.0.0-dev" +version = "1.0.0" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-society" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10732,12 +10824,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-staking" -version = "4.0.0-dev" +version = "26.0.1" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -10760,16 +10852,16 @@ dependencies = [ "sp-npos-elections", "sp-runtime", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "substrate-test-utils", ] [[package]] name = "pallet-staking-reward-curve" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ - "proc-macro-crate 2.0.1", + "proc-macro-crate", "proc-macro2", "quote", "sp-runtime", @@ -10778,7 +10870,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" -version = "4.0.0-dev" +version = "17.0.0" dependencies = [ "log", "sp-arithmetic", @@ -10786,7 +10878,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" -version = "4.0.0-dev" +version = "12.0.0" dependencies = [ "parity-scale-codec", "sp-api", @@ -10795,7 +10887,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "frame-benchmarking", "frame-remote-externalities", @@ -10810,8 +10902,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "substrate-state-trie-migration-rpc", "thousands", "tokio", @@ -10820,7 +10912,7 @@ dependencies = [ [[package]] name = "pallet-statement" -version = "4.0.0-dev" +version = "8.0.0" dependencies = [ "frame-support", "frame-system", @@ -10833,12 +10925,12 @@ dependencies = [ "sp-io", "sp-runtime", "sp-statement-store", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-sudo" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -10849,12 +10941,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-template" -version = "4.0.0-dev" +version = "0.1.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10864,12 +10956,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-timestamp" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -10882,14 +10974,14 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", "sp-timestamp", ] [[package]] name = "pallet-tips" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -10903,13 +10995,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", ] [[package]] name = "pallet-transaction-payment" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-support", "frame-system", @@ -10921,12 +11013,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-transaction-payment-rpc" -version = "4.0.0-dev" +version = "28.0.0" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -10941,7 +11033,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -10952,7 +11044,7 @@ dependencies = [ [[package]] name = "pallet-transaction-storage" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "array-bytes 6.1.0", "frame-benchmarking", @@ -10967,13 +11059,13 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-transaction-storage-proof", ] [[package]] name = "pallet-treasury" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -10988,14 +11080,13 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-tx-pause" -version = "4.0.0-dev" +version = "7.0.0" dependencies = [ - "docify", "frame-benchmarking", "frame-support", "frame-system", @@ -11007,12 +11098,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-uniques" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11024,12 +11115,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-utility" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11043,12 +11134,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-vesting" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11060,12 +11151,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-whitelist" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11078,12 +11169,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "pallet-xcm" -version = "1.0.0" +version = "5.0.0" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -11100,7 +11191,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -11108,7 +11199,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "1.0.0" +version = "5.0.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -11124,33 +11215,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", -] - -[[package]] -name = "pallet-xcm-bridge-hub" -version = "0.1.0" -dependencies = [ - "bp-header-chain", - "bp-messages", - "bp-runtime", - "bp-xcm-bridge-hub", - "bridge-runtime-common", - "frame-support", - "frame-system", - "log", - "pallet-balances", - "pallet-bridge-messages", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std 8.0.0", + "sp-std", + "sp-tracing", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -11158,7 +11224,7 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub-router" -version = "0.1.0" +version = "0.3.0" dependencies = [ "bp-xcm-bridge-hub-router", "frame-benchmarking", @@ -11170,7 +11236,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", ] @@ -11235,7 +11301,7 @@ dependencies = [ [[package]] name = "parachain-template-runtime" -version = "0.1.0" +version = "0.5.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", @@ -11281,7 +11347,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -11293,7 +11359,7 @@ dependencies = [ [[package]] name = "parachains-common" -version = "1.0.0" +version = "5.0.0" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", @@ -11317,7 +11383,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -11327,7 +11393,7 @@ dependencies = [ [[package]] name = "parachains-runtimes-test-utils" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assets-common", "cumulus-pallet-parachain-system", @@ -11350,8 +11416,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "staging-parachain-info", "staging-xcm", "staging-xcm-executor", @@ -11399,7 +11465,7 @@ version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -11556,7 +11622,7 @@ dependencies = [ [[package]] name = "penpal-emulated-chain" -version = "0.0.0" +version = "0.1.0" dependencies = [ "cumulus-primitives-core", "emulated-integration-tests-common", @@ -11567,12 +11633,11 @@ dependencies = [ "serde_json", "sp-core", "sp-runtime", - "westend-emulated-chain", ] [[package]] name = "penpal-runtime" -version = "0.9.27" +version = "0.12.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", @@ -11620,8 +11685,8 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", - "sp-storage 13.0.0", + "sp-std", + "sp-storage", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -11791,7 +11856,7 @@ dependencies = [ [[package]] name = "polkadot" -version = "1.5.0" +version = "5.0.0" dependencies = [ "assert_cmd", "color-eyre", @@ -11812,7 +11877,7 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "bitvec", @@ -11841,7 +11906,7 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "1.0.0" +version = "5.0.0" dependencies = [ "always-assert", "assert_matches", @@ -11868,7 +11933,7 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "derive_more", @@ -11890,14 +11955,14 @@ dependencies = [ "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing 10.0.0", + "sp-tracing", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-availability-recovery" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "async-trait", @@ -11927,9 +11992,8 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "1.1.0" +version = "5.0.0" dependencies = [ - "cfg-if", "clap 4.4.11", "frame-benchmarking-cli", "futures", @@ -11956,7 +12020,7 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "bitvec", @@ -11986,18 +12050,18 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "1.0.0" +version = "5.0.0" dependencies = [ "parity-scale-codec", "scale-info", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "polkadot-dispute-distribution" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "async-channel", @@ -12023,14 +12087,14 @@ dependencies = [ "sp-application-crypto", "sp-keyring", "sp-keystore", - "sp-tracing 10.0.0", + "sp-tracing", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-erasure-coding" -version = "1.0.0" +version = "5.0.0" dependencies = [ "criterion 0.4.0", "parity-scale-codec", @@ -12044,7 +12108,7 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "async-trait", @@ -12056,7 +12120,6 @@ dependencies = [ "polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-util", "polkadot-primitives", - "quickcheck", "rand 0.8.5", "rand_chacha 0.3.1", "sc-network", @@ -12067,13 +12130,13 @@ dependencies = [ "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing 10.0.0", + "sp-tracing", "tracing-gum", ] [[package]] name = "polkadot-network-bridge" -version = "1.0.0" +version = "5.0.0" dependencies = [ "always-assert", "assert_matches", @@ -12102,7 +12165,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "futures", @@ -12123,7 +12186,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "async-trait", @@ -12167,7 +12230,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "bitvec", @@ -12197,7 +12260,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "bitvec", @@ -12216,14 +12279,14 @@ dependencies = [ "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing 10.0.0", + "sp-tracing", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-bitfield-signing" -version = "1.0.0" +version = "5.0.0" dependencies = [ "futures", "polkadot-node-subsystem", @@ -12239,7 +12302,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "async-trait", @@ -12264,7 +12327,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "1.0.0" +version = "5.0.0" dependencies = [ "futures", "maplit", @@ -12273,7 +12336,6 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", - "polkadot-node-subsystem-types", "polkadot-primitives", "sc-client-api", "sc-consensus-babe", @@ -12284,7 +12346,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "futures", @@ -12305,7 +12367,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "fatality", @@ -12326,14 +12388,14 @@ dependencies = [ "sp-core", "sp-keyring", "sp-keystore", - "sp-tracing 10.0.0", + "sp-tracing", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-node-core-parachains-inherent" -version = "1.0.0" +version = "5.0.0" dependencies = [ "async-trait", "futures", @@ -12349,7 +12411,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-prospective-parachains" -version = "1.0.0" +version = "4.0.0" dependencies = [ "assert_matches", "bitvec", @@ -12374,7 +12436,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "1.0.0" +version = "5.0.0" dependencies = [ "bitvec", "fatality", @@ -12394,11 +12456,10 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "1.0.0" +version = "5.0.0" dependencies = [ "always-assert", "assert_matches", - "blake3", "cfg-if", "criterion 0.4.0", "futures", @@ -12422,22 +12483,20 @@ dependencies = [ "rand 0.8.5", "rococo-runtime", "rusty-fork", - "sc-sysinfo", "slotmap", "sp-core", "sp-maybe-compressed-blob", - "sp-wasm-interface 14.0.0", + "sp-wasm-interface", "tempfile", "test-parachain-adder", "test-parachain-halt", - "thiserror", "tokio", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-checker" -version = "1.0.0" +version = "5.0.0" dependencies = [ "futures", "futures-timer", @@ -12460,7 +12519,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-common" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "cfg-if", @@ -12476,10 +12535,9 @@ dependencies = [ "sc-executor-wasmtime", "seccompiler", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities", "sp-io", - "sp-tracing 10.0.0", - "substrate-build-script-utils", + "sp-tracing", "tempfile", "thiserror", "tracing-gum", @@ -12487,7 +12545,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-execute-worker" -version = "1.0.0" +version = "5.0.0" dependencies = [ "cpu-time", "libc", @@ -12502,9 +12560,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-prepare-worker" -version = "1.0.0" +version = "5.0.0" dependencies = [ - "blake3", "cfg-if", "criterion 0.4.0", "libc", @@ -12526,7 +12583,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "1.0.0" +version = "5.0.0" dependencies = [ "async-trait", "futures", @@ -12547,7 +12604,7 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "1.0.0" +version = "5.0.0" dependencies = [ "lazy_static", "log", @@ -12564,7 +12621,7 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_cmd", "bs58 0.5.0", @@ -12590,7 +12647,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "1.0.0" +version = "5.0.0" dependencies = [ "async-channel", "async-trait", @@ -12614,7 +12671,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "1.0.0" +version = "5.0.0" dependencies = [ "bitvec", "bounded-vec", @@ -12637,7 +12694,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "1.0.0" +version = "5.0.0" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -12646,7 +12703,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-test-helpers" -version = "1.0.0" +version = "0.1.0" dependencies = [ "async-trait", "futures", @@ -12665,7 +12722,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "1.0.0" +version = "5.0.0" dependencies = [ "async-trait", "bitvec", @@ -12683,16 +12740,14 @@ dependencies = [ "smallvec", "sp-api", "sp-authority-discovery", - "sp-blockchain", "sp-consensus-babe", - "sp-runtime", "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "polkadot-node-subsystem-util" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "async-trait", @@ -12735,7 +12790,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "async-trait", @@ -12761,15 +12816,20 @@ dependencies = [ [[package]] name = "polkadot-parachain-bin" -version = "1.5.0" +version = "4.0.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", "bridge-hub-westend-runtime", "clap 4.4.11", + "collectives-polkadot-runtime", "collectives-westend-runtime", "color-print", "contracts-rococo-runtime", @@ -12786,18 +12846,14 @@ dependencies = [ "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", @@ -12829,18 +12885,14 @@ 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-tracing", "sp-transaction-pool", - "sp-version", "staging-xcm", "substrate-build-script-utils", "substrate-frame-rpc-system", @@ -12853,7 +12905,7 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" -version = "1.0.0" +version = "4.0.0" dependencies = [ "bounded-collections", "derive_more", @@ -12863,13 +12915,13 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-weights", ] [[package]] name = "polkadot-primitives" -version = "1.0.0" +version = "5.0.0" dependencies = [ "bitvec", "hex-literal", @@ -12889,12 +12941,12 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "polkadot-primitives-test-helpers" -version = "1.0.0" +version = "0.1.0" dependencies = [ "polkadot-primitives", "rand 0.8.5", @@ -12906,7 +12958,7 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "1.0.0" +version = "5.0.0" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -12937,7 +12989,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "1.0.0" +version = "5.0.0" dependencies = [ "bitvec", "frame-benchmarking", @@ -12984,7 +13036,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 8.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -12993,19 +13045,19 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "1.0.0" +version = "5.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", + "sp-tracing", ] [[package]] name = "polkadot-runtime-parachains" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "bitflags 1.3.2", @@ -13051,56 +13103,17 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "staging-xcm", "staging-xcm-executor", "static_assertions", "thousands", ] -[[package]] -name = "polkadot-sdk-docs" -version = "0.0.1" -dependencies = [ - "cumulus-pallet-aura-ext", - "cumulus-pallet-parachain-system", - "docify", - "frame", - "kitchensink-runtime", - "pallet-aura", - "pallet-default-config-example", - "pallet-examples", - "pallet-timestamp", - "parity-scale-codec", - "sc-cli", - "sc-client-db", - "sc-consensus-aura", - "sc-consensus-babe", - "sc-consensus-beefy", - "sc-consensus-grandpa", - "sc-consensus-manual-seal", - "sc-consensus-pow", - "sc-network", - "sc-rpc", - "sc-rpc-api", - "scale-info", - "simple-mermaid 0.1.0 (git+https://github.com/kianenigma/simple-mermaid.git?branch=main)", - "sp-api", - "sp-core", - "sp-io", - "sp-keyring", - "sp-runtime", - "staging-chain-spec-builder", - "staging-node-cli", - "staging-parachain-info", - "subkey", - "substrate-wasm-builder", -] - [[package]] name = "polkadot-service" -version = "1.0.0" +version = "5.0.0" dependencies = [ "assert_matches", "async-trait", @@ -13124,7 +13137,6 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "parity-db", "parity-scale-codec", - "parking_lot 0.12.1", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", @@ -13210,7 +13222,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage 13.0.0", + "sp-storage", "sp-timestamp", "sp-transaction-pool", "sp-version", @@ -13225,7 +13237,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "1.0.0" +version = "5.0.0" dependencies = [ "arrayvec 0.7.4", "assert_matches", @@ -13240,6 +13252,7 @@ dependencies = [ "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-test-helpers", + "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-primitives-test-helpers", @@ -13252,14 +13265,14 @@ dependencies = [ "sp-keyring", "sp-keystore", "sp-staking", - "sp-tracing 10.0.0", + "sp-tracing", "thiserror", "tracing-gum", ] [[package]] name = "polkadot-statement-table" -version = "1.0.0" +version = "5.0.0" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -13268,7 +13281,7 @@ dependencies = [ [[package]] name = "polkadot-test-client" -version = "1.0.0" +version = "0.1.0" dependencies = [ "frame-benchmarking", "futures", @@ -13297,7 +13310,7 @@ dependencies = [ [[package]] name = "polkadot-test-malus" -version = "1.0.0" +version = "0.1.0" dependencies = [ "assert_matches", "async-trait", @@ -13328,7 +13341,7 @@ dependencies = [ [[package]] name = "polkadot-test-runtime" -version = "1.0.0" +version = "0.1.0" dependencies = [ "bitvec", "frame-election-provider-support", @@ -13380,7 +13393,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std 8.0.0", + "sp-std", "sp-transaction-pool", "sp-trie", "sp-version", @@ -13394,7 +13407,7 @@ dependencies = [ [[package]] name = "polkadot-test-service" -version = "1.0.0" +version = "0.1.0" dependencies = [ "frame-system", "futures", @@ -13446,7 +13459,7 @@ dependencies = [ [[package]] name = "polkadot-voter-bags" -version = "1.0.0" +version = "5.0.0" dependencies = [ "clap 4.4.11", "generate-bags", @@ -13667,17 +13680,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro-crate" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" -dependencies = [ - "toml_datetime", - "toml_edit 0.20.2", + "toml_edit", ] [[package]] @@ -13878,7 +13881,7 @@ dependencies = [ "libc", "libflate", "log", - "names", + "names 0.14.0", "prost", "reqwest", "thiserror", @@ -13932,8 +13935,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" dependencies = [ - "env_logger 0.8.4", - "log", "rand 0.8.5", ] @@ -13956,7 +13957,7 @@ checksum = "c956be1b23f4261676aed05a0046e204e8a6836e50203902683a718af0797989" dependencies = [ "bytes", "rand 0.8.5", - "ring 0.16.20", + "ring", "rustc-hash", "rustls 0.20.8", "slab", @@ -14106,7 +14107,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", - "ring 0.16.20", + "ring", "time 0.3.27", "x509-parser 0.13.2", "yasna", @@ -14119,7 +14120,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", - "ring 0.16.20", + "ring", "time 0.3.27", "yasna", ] @@ -14259,14 +14260,14 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "remote-ext-tests-bags-list" -version = "1.0.0" +version = "0.1.0" dependencies = [ "clap 4.4.11", "frame-system", "log", "pallet-bags-list-remote-tests", "sp-core", - "sp-tracing 10.0.0", + "sp-tracing", "tokio", "westend-runtime", "westend-runtime-constants", @@ -14335,27 +14336,11 @@ dependencies = [ [[package]] name = "rfc6979" version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac 0.12.1", - "subtle 2.4.1", -] - -[[package]] -name = "ring" -version = "0.1.0" -source = "git+https://github.com/w3f/ring-proof#b273d33f9981e2bb3375ab45faeb537f7ee35224" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "blake2 0.10.6", - "common", - "fflonk", - "merlin 3.0.0", +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle 2.4.1", ] [[package]] @@ -14373,15 +14358,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "rle-decode-fast" version = "1.0.3" @@ -14410,7 +14386,7 @@ dependencies = [ [[package]] name = "rococo-emulated-chain" -version = "0.0.0" +version = "0.1.0" dependencies = [ "emulated-integration-tests-common", "pallet-im-online", @@ -14429,7 +14405,7 @@ dependencies = [ [[package]] name = "rococo-parachain-runtime" -version = "0.1.0" +version = "0.4.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", @@ -14437,7 +14413,6 @@ dependencies = [ "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", "cumulus-ping", - "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", "frame-benchmarking", @@ -14468,7 +14443,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -14480,7 +14455,7 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "1.0.0" +version = "5.0.0" dependencies = [ "binary-merkle-tree", "frame-benchmarking", @@ -14566,9 +14541,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", + "sp-storage", + "sp-tracing", "sp-transaction-pool", "sp-trie", "sp-version", @@ -14583,7 +14558,7 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "1.0.0" +version = "5.0.0" dependencies = [ "frame-support", "polkadot-primitives", @@ -14593,12 +14568,11 @@ dependencies = [ "sp-runtime", "sp-weights", "staging-xcm", - "staging-xcm-builder", ] [[package]] name = "rococo-system-emulated-network" -version = "0.0.0" +version = "0.1.0" dependencies = [ "asset-hub-rococo-emulated-chain", "bridge-hub-rococo-emulated-chain", @@ -14609,7 +14583,7 @@ dependencies = [ [[package]] name = "rococo-westend-system-emulated-network" -version = "0.0.0" +version = "0.1.0" dependencies = [ "asset-hub-rococo-emulated-chain", "asset-hub-westend-emulated-chain", @@ -14775,7 +14749,7 @@ checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ "base64 0.13.1", "log", - "ring 0.16.20", + "ring", "sct 0.6.1", "webpki 0.21.4", ] @@ -14787,7 +14761,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ "log", - "ring 0.16.20", + "ring", "sct 0.7.0", "webpki 0.22.0", ] @@ -14799,7 +14773,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" dependencies = [ "log", - "ring 0.16.20", + "ring", "rustls-webpki 0.101.4", "sct 0.7.0", ] @@ -14831,7 +14805,7 @@ version = "0.100.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" dependencies = [ - "ring 0.16.20", + "ring", "untrusted", ] @@ -14841,7 +14815,7 @@ version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" dependencies = [ - "ring 0.16.20", + "ring", "untrusted", ] @@ -14920,17 +14894,17 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "4.1.0-dev" +version = "21.0.0" dependencies = [ "log", "sp-core", - "sp-wasm-interface 14.0.0", + "sp-wasm-interface", "thiserror", ] [[package]] name = "sc-authority-discovery" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "async-trait", "futures", @@ -14938,8 +14912,7 @@ dependencies = [ "ip_network", "libp2p", "log", - "multihash 0.18.1", - "multihash-codetable", + "multihash", "parity-scale-codec", "prost", "prost-build", @@ -14953,7 +14926,7 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -14961,7 +14934,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "futures", "futures-timer", @@ -14986,7 +14959,7 @@ dependencies = [ [[package]] name = "sc-block-builder" -version = "0.10.0-dev" +version = "0.31.0" dependencies = [ "parity-scale-codec", "sp-api", @@ -14996,13 +14969,12 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-trie", "substrate-test-runtime-client", ] [[package]] name = "sc-chain-spec" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "array-bytes 6.1.0", "docify", @@ -15030,9 +15002,9 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ - "proc-macro-crate 2.0.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.40", @@ -15040,7 +15012,7 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.10.0-dev" +version = "0.34.0" dependencies = [ "array-bytes 6.1.0", "bip39", @@ -15052,7 +15024,7 @@ dependencies = [ "itertools 0.10.5", "libp2p-identity", "log", - "names", + "names 0.13.0", "parity-scale-codec", "rand 0.8.5", "regex", @@ -15074,7 +15046,7 @@ dependencies = [ "sp-keystore", "sp-panic-handler", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing", "sp-version", "tempfile", "thiserror", @@ -15083,7 +15055,7 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "fnv", "futures", @@ -15098,11 +15070,11 @@ dependencies = [ "sp-consensus", "sp-core", "sp-database", - "sp-externalities 0.19.0", + "sp-externalities", "sp-runtime", "sp-state-machine", "sp-statement-store", - "sp-storage 13.0.0", + "sp-storage", "sp-test-primitives", "sp-trie", "substrate-prometheus-endpoint", @@ -15112,7 +15084,7 @@ dependencies = [ [[package]] name = "sc-client-db" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "array-bytes 6.1.0", "criterion 0.4.0", @@ -15137,7 +15109,7 @@ dependencies = [ "sp-database", "sp-runtime", "sp-state-machine", - "sp-tracing 10.0.0", + "sp-tracing", "sp-trie", "substrate-test-runtime-client", "tempfile", @@ -15145,7 +15117,7 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.10.0-dev" +version = "0.31.0" dependencies = [ "async-trait", "futures", @@ -15170,7 +15142,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "async-trait", "futures", @@ -15198,7 +15170,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-timestamp", - "sp-tracing 10.0.0", + "sp-tracing", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tempfile", @@ -15208,7 +15180,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "async-trait", "fork-tree", @@ -15240,7 +15212,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-timestamp", - "sp-tracing 10.0.0", + "sp-tracing", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -15249,7 +15221,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "futures", "jsonrpsee", @@ -15277,7 +15249,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" -version = "4.0.0-dev" +version = "11.0.0" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -15308,7 +15280,7 @@ dependencies = [ "sp-keystore", "sp-mmr-primitives", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tempfile", @@ -15319,7 +15291,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" -version = "4.0.0-dev" +version = "11.0.0" dependencies = [ "futures", "jsonrpsee", @@ -15340,7 +15312,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.10.0-dev" +version = "0.31.0" dependencies = [ "fork-tree", "parity-scale-codec", @@ -15352,7 +15324,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" -version = "0.10.0-dev" +version = "0.17.0" dependencies = [ "ahash 0.8.3", "array-bytes 6.1.0", @@ -15391,7 +15363,7 @@ dependencies = [ "sp-keyring", "sp-keystore", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -15400,7 +15372,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" -version = "0.10.0-dev" +version = "0.17.0" dependencies = [ "finality-grandpa", "futures", @@ -15424,7 +15396,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "assert_matches", "async-trait", @@ -15462,7 +15434,7 @@ dependencies = [ [[package]] name = "sc-consensus-pow" -version = "0.10.0-dev" +version = "0.31.0" dependencies = [ "async-trait", "futures", @@ -15486,7 +15458,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" -version = "0.10.0-dev" +version = "0.31.0" dependencies = [ "async-trait", "futures", @@ -15509,7 +15481,7 @@ dependencies = [ [[package]] name = "sc-executor" -version = "0.10.0-dev" +version = "0.30.0" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -15527,17 +15499,17 @@ dependencies = [ "schnellru", "sp-api", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities", "sp-io", "sp-maybe-compressed-blob", "sp-panic-handler", "sp-runtime", - "sp-runtime-interface 17.0.0", + "sp-runtime-interface", "sp-state-machine", - "sp-tracing 10.0.0", + "sp-tracing", "sp-trie", "sp-version", - "sp-wasm-interface 14.0.0", + "sp-wasm-interface", "substrate-test-runtime", "tempfile", "tracing", @@ -15547,18 +15519,18 @@ dependencies = [ [[package]] name = "sc-executor-common" -version = "0.10.0-dev" +version = "0.27.0" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", - "sp-wasm-interface 14.0.0", + "sp-wasm-interface", "thiserror", "wasm-instrument 0.3.0", ] [[package]] name = "sc-executor-wasmtime" -version = "0.10.0-dev" +version = "0.27.0" dependencies = [ "anyhow", "cargo_metadata", @@ -15573,8 +15545,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", + "sp-wasm-interface", "tempfile", "wasmtime", "wat", @@ -15582,7 +15554,7 @@ dependencies = [ [[package]] name = "sc-informant" -version = "0.10.0-dev" +version = "0.31.0" dependencies = [ "ansi_term", "futures", @@ -15598,7 +15570,7 @@ dependencies = [ [[package]] name = "sc-keystore" -version = "4.0.0-dev" +version = "23.0.0" dependencies = [ "array-bytes 6.1.0", "parking_lot 0.12.1", @@ -15612,12 +15584,11 @@ dependencies = [ [[package]] name = "sc-mixnet" -version = "0.1.0-dev" +version = "0.2.0" dependencies = [ "array-bytes 4.2.0", "arrayvec 0.7.4", "blake2 0.10.6", - "bytes", "futures", "futures-timer", "libp2p-identity", @@ -15640,7 +15611,7 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -15676,14 +15647,13 @@ dependencies = [ "sp-core", "sp-runtime", "sp-test-primitives", - "sp-tracing 10.0.0", + "sp-tracing", "substrate-prometheus-endpoint", "substrate-test-runtime", "substrate-test-runtime-client", "tempfile", "thiserror", "tokio", - "tokio-stream", "tokio-test", "tokio-util", "unsigned-varint", @@ -15693,7 +15663,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" -version = "0.10.0-dev" +version = "0.31.0" dependencies = [ "async-channel", "cid", @@ -15719,7 +15689,7 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.10.0-dev" +version = "0.31.0" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -15736,15 +15706,13 @@ dependencies = [ [[package]] name = "sc-network-gossip" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "ahash 0.8.3", - "async-trait", "futures", "futures-timer", "libp2p", "log", - "parity-scale-codec", "quickcheck", "sc-network", "sc-network-common", @@ -15759,7 +15727,7 @@ dependencies = [ [[package]] name = "sc-network-light" -version = "0.10.0-dev" +version = "0.31.0" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -15779,7 +15747,7 @@ dependencies = [ [[package]] name = "sc-network-statement" -version = "0.10.0-dev" +version = "0.14.0" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -15797,7 +15765,7 @@ dependencies = [ [[package]] name = "sc-network-sync" -version = "0.10.0-dev" +version = "0.31.0" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -15827,7 +15795,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-test-primitives", - "sp-tracing 10.0.0", + "sp-tracing", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror", @@ -15837,7 +15805,7 @@ dependencies = [ [[package]] name = "sc-network-test" -version = "0.8.0" +version = "0.1.0" dependencies = [ "async-trait", "futures", @@ -15859,7 +15827,7 @@ dependencies = [ "sp-consensus", "sp-core", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing", "substrate-test-runtime", "substrate-test-runtime-client", "tokio", @@ -15867,7 +15835,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" -version = "0.10.0-dev" +version = "0.31.0" dependencies = [ "array-bytes 6.1.0", "futures", @@ -15885,7 +15853,7 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "array-bytes 6.1.0", "bytes", @@ -15913,11 +15881,11 @@ dependencies = [ "sp-api", "sp-consensus", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities", "sp-keystore", "sp-offchain", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing", "substrate-test-runtime-client", "threadpool", "tokio", @@ -15926,7 +15894,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" -version = "0.10.0-dev" +version = "0.16.0" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -15934,7 +15902,7 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "4.0.0-dev" +version = "27.0.0" dependencies = [ "assert_matches", "env_logger 0.9.3", @@ -15974,7 +15942,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.10.0-dev" +version = "0.31.0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -15993,7 +15961,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ "http", "jsonrpsee", @@ -16007,7 +15975,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -16031,7 +15999,6 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", - "sp-externalities 0.19.0", "sp-maybe-compressed-blob", "sp-rpc", "sp-runtime", @@ -16045,19 +16012,19 @@ dependencies = [ [[package]] name = "sc-runtime-test" -version = "2.0.0" +version = "0.1.0" dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface 17.0.0", - "sp-std 8.0.0", + "sp-runtime-interface", + "sp-std", "substrate-wasm-builder", ] [[package]] name = "sc-service" -version = "0.10.0-dev" +version = "0.33.0" dependencies = [ "async-trait", "directories", @@ -16098,12 +16065,12 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities", "sp-keystore", "sp-runtime", "sp-session", "sp-state-machine", - "sp-storage 13.0.0", + "sp-storage", "sp-transaction-pool", "sp-transaction-storage-proof", "sp-trie", @@ -16121,7 +16088,7 @@ dependencies = [ [[package]] name = "sc-service-test" -version = "2.0.0" +version = "0.1.0" dependencies = [ "array-bytes 6.1.0", "async-channel", @@ -16146,8 +16113,8 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-storage 13.0.0", - "sp-tracing 10.0.0", + "sp-storage", + "sp-tracing", "sp-trie", "substrate-test-runtime", "substrate-test-runtime-client", @@ -16157,7 +16124,7 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.10.0-dev" +version = "0.28.0" dependencies = [ "log", "parity-scale-codec", @@ -16167,7 +16134,7 @@ dependencies = [ [[package]] name = "sc-statement-store" -version = "4.0.0-dev" +version = "8.0.0" dependencies = [ "env_logger 0.9.3", "log", @@ -16187,7 +16154,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" -version = "0.1.0" +version = "0.14.0" dependencies = [ "clap 4.4.11", "fs4", @@ -16200,7 +16167,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" -version = "0.10.0-dev" +version = "0.32.0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -16218,7 +16185,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" -version = "6.0.0-dev" +version = "25.0.0" dependencies = [ "derive_more", "futures", @@ -16233,12 +16200,12 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "sc-telemetry" -version = "4.0.0-dev" +version = "13.0.0" dependencies = [ "chrono", "futures", @@ -16256,7 +16223,7 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "ansi_term", "atty", @@ -16265,7 +16232,6 @@ dependencies = [ "lazy_static", "libc", "log", - "parity-scale-codec", "parking_lot 0.12.1", "regex", "rustc-hash", @@ -16277,7 +16243,7 @@ dependencies = [ "sp-core", "sp-rpc", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing", "thiserror", "tracing", "tracing-log", @@ -16286,9 +16252,9 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" -version = "4.0.0-dev" +version = "10.0.0" dependencies = [ - "proc-macro-crate 2.0.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.40", @@ -16296,7 +16262,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -16318,7 +16284,7 @@ dependencies = [ "sp-consensus", "sp-core", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing", "sp-transaction-pool", "substrate-prometheus-endpoint", "substrate-test-runtime", @@ -16329,7 +16295,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "async-trait", "futures", @@ -16345,7 +16311,7 @@ dependencies = [ [[package]] name = "sc-utils" -version = "4.0.0-dev" +version = "12.0.0" dependencies = [ "async-channel", "futures", @@ -16378,7 +16344,7 @@ version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -16393,30 +16359,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "schemars" -version = "0.8.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763f8cd0d4c71ed8389c90cb8100cba87e763bd01a8e614d4f0af97bcd50a161" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0f696e21e10fa546b7ffb1c9672c6de8fbc7a81acf59524386d8639bf12737" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 1.0.109", -] - [[package]] name = "schnellru" version = "0.2.1" @@ -16480,7 +16422,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" dependencies = [ - "ring 0.16.20", + "ring", "untrusted", ] @@ -16490,7 +16432,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ - "ring 0.16.20", + "ring", "untrusted", ] @@ -16545,18 +16487,18 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.28.0" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2acea373acb8c21ecb5a23741452acd2593ed44ee3d343e72baaa143bc89d0d5" +checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.9.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09e67c467c38fd24bd5499dc9a18183b31575c12ee549197e3e20d57aa4fe3b7" +checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" dependencies = [ "cc", ] @@ -16595,7 +16537,7 @@ dependencies = [ [[package]] name = "seedling-runtime" -version = "0.1.0" +version = "0.5.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -16621,7 +16563,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -16687,17 +16629,6 @@ dependencies = [ "syn 2.0.40", ] -[[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]] name = "serde_fmt" version = "1.0.3" @@ -16856,7 +16787,7 @@ dependencies = [ [[package]] name = "shell-runtime" -version = "0.1.0" +version = "0.5.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -16881,7 +16812,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std 8.0.0", + "sp-std", "sp-transaction-pool", "sp-version", "staging-parachain-info", @@ -16949,11 +16880,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" @@ -16982,13 +16908,13 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "1.0.0" +version = "5.0.0" dependencies = [ "enumn", "parity-scale-codec", "paste", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] @@ -17130,7 +17056,7 @@ dependencies = [ "chacha20poly1305", "curve25519-dalek 4.0.0", "rand_core 0.6.4", - "ring 0.16.20", + "ring", "rustc_version 0.4.0", "sha2 0.10.7", "subtle 2.4.1", @@ -17175,7 +17101,7 @@ dependencies = [ [[package]] name = "sp-api" -version = "4.0.0-dev" +version = "24.0.0" dependencies = [ "hash-db", "log", @@ -17183,11 +17109,11 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities", "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std 8.0.0", + "sp-std", "sp-test-primitives", "sp-trie", "sp-version", @@ -17196,13 +17122,13 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "4.0.0-dev" +version = "13.0.0" dependencies = [ "Inflector", "assert_matches", "blake2 0.10.6", "expander 2.0.0", - "proc-macro-crate 2.0.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.40", @@ -17210,7 +17136,7 @@ dependencies = [ [[package]] name = "sp-api-test" -version = "2.0.1" +version = "0.1.0" dependencies = [ "criterion 0.4.0", "futures", @@ -17224,7 +17150,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-tracing 10.0.0", + "sp-tracing", "sp-version", "static_assertions", "substrate-test-runtime-client", @@ -17233,19 +17159,19 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "23.0.0" +version = "28.0.0" dependencies = [ "parity-scale-codec", "scale-info", "serde", "sp-core", "sp-io", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "sp-application-crypto-test" -version = "2.0.0" +version = "0.1.0" dependencies = [ "sp-api", "sp-application-crypto", @@ -17256,7 +17182,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "16.0.0" +version = "21.0.0" dependencies = [ "criterion 0.4.0", "integer-sqrt", @@ -17267,13 +17193,13 @@ dependencies = [ "scale-info", "serde", "sp-core", - "sp-std 8.0.0", + "sp-std", "static_assertions", ] [[package]] name = "sp-arithmetic-fuzzer" -version = "2.0.0" +version = "0.1.0" dependencies = [ "arbitrary", "fraction", @@ -17282,49 +17208,31 @@ dependencies = [ "sp-arithmetic", ] -[[package]] -name = "sp-ark-bls12-381" -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)", -] - -[[package]] -name = "sp-ark-ed-on-bls12-381-bandersnatch" -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)", -] - [[package]] name = "sp-authority-discovery" -version = "4.0.0-dev" +version = "24.0.0" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "sp-block-builder" -version = "4.0.0-dev" +version = "24.0.0" dependencies = [ "sp-api", "sp-inherents", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "sp-blockchain" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "futures", "log", @@ -17341,7 +17249,7 @@ dependencies = [ [[package]] name = "sp-consensus" -version = "0.10.0-dev" +version = "0.30.0" dependencies = [ "async-trait", "futures", @@ -17356,7 +17264,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" -version = "0.10.0-dev" +version = "0.30.0" dependencies = [ "async-trait", "parity-scale-codec", @@ -17366,13 +17274,13 @@ dependencies = [ "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-timestamp", ] [[package]] name = "sp-consensus-babe" -version = "0.10.0-dev" +version = "0.30.0" dependencies = [ "async-trait", "parity-scale-codec", @@ -17384,13 +17292,13 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-timestamp", ] [[package]] name = "sp-consensus-beefy" -version = "4.0.0-dev" +version = "11.0.0" dependencies = [ "array-bytes 6.1.0", "lazy_static", @@ -17403,14 +17311,14 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "strum", "w3f-bls", ] [[package]] name = "sp-consensus-grandpa" -version = "4.0.0-dev" +version = "11.0.0" dependencies = [ "finality-grandpa", "log", @@ -17422,52 +17330,36 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "sp-consensus-pow" -version = "0.10.0-dev" -dependencies = [ - "parity-scale-codec", - "sp-api", - "sp-core", - "sp-runtime", - "sp-std 8.0.0", -] - -[[package]] -name = "sp-consensus-sassafras" -version = "0.3.4-dev" +version = "0.30.0" dependencies = [ "parity-scale-codec", - "scale-info", - "serde", "sp-api", - "sp-application-crypto", - "sp-consensus-slots", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "sp-consensus-slots" -version = "0.10.0-dev" +version = "0.30.0" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 8.0.0", + "sp-std", "sp-timestamp", ] [[package]] name = "sp-core" -version = "21.0.0" +version = "26.0.0" dependencies = [ "array-bytes 6.1.0", - "bandersnatch_vrfs", "bip39", "bitflags 1.3.2", "blake2 0.10.6", @@ -17499,11 +17391,11 @@ dependencies = [ "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-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", "ss58-registry", "substrate-bip39", "thiserror", @@ -17512,19 +17404,9 @@ dependencies = [ "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" +version = "13.0.0" dependencies = [ "blake2b_simd", "byteorder", @@ -17536,7 +17418,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" -version = "9.0.0" +version = "13.0.0" dependencies = [ "quote", "sp-core-hashing", @@ -17545,28 +17427,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" -version = "0.4.1" -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 0.0.12", - "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.8.0" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -17579,14 +17440,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.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", + "sp-runtime-interface", + "sp-std", ] [[package]] name = "sp-database" -version = "4.0.0-dev" +version = "9.0.0" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -17594,17 +17455,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "8.0.0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.40", -] - -[[package]] -name = "sp-debug-derive" -version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "12.0.0" dependencies = [ "proc-macro2", "quote", @@ -17613,38 +17464,27 @@ dependencies = [ [[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#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "0.23.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", + "sp-storage", ] [[package]] name = "sp-genesis-builder" -version = "0.1.0" +version = "0.5.0" dependencies = [ "serde_json", "sp-api", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "sp-inherents" -version = "4.0.0-dev" +version = "24.0.0" dependencies = [ "async-trait", "futures", @@ -17652,13 +17492,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "thiserror", ] [[package]] name = "sp-io" -version = "23.0.0" +version = "28.0.0" dependencies = [ "bytes", "ed25519-dalek", @@ -17668,12 +17508,12 @@ dependencies = [ "rustversion", "secp256k1", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities", "sp-keystore", - "sp-runtime-interface 17.0.0", + "sp-runtime-interface", "sp-state-machine", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "sp-trie", "tracing", "tracing-core", @@ -17681,8 +17521,9 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "24.0.0" +version = "29.0.0" dependencies = [ + "lazy_static", "sp-core", "sp-runtime", "strum", @@ -17690,20 +17531,20 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.27.0" +version = "0.32.0" dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand 0.7.3", "rand_chacha 0.2.2", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities", "thiserror", ] [[package]] name = "sp-maybe-compressed-blob" -version = "4.1.0-dev" +version = "10.0.0" dependencies = [ "thiserror", "zstd 0.12.4", @@ -17711,28 +17552,28 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.1.0" +version = "0.4.0" dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "sp-mixnet" -version = "0.1.0-dev" +version = "0.2.0" dependencies = [ "parity-scale-codec", "scale-info", "sp-api", "sp-application-crypto", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "sp-mmr-primitives" -version = "4.0.0-dev" +version = "24.0.0" dependencies = [ "array-bytes 6.1.0", "ckb-merkle-mountain-range", @@ -17742,15 +17583,15 @@ dependencies = [ "serde", "sp-api", "sp-core", - "sp-debug-derive 8.0.0", + "sp-debug-derive", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "thiserror", ] [[package]] name = "sp-npos-elections" -version = "4.0.0-dev" +version = "24.0.0" dependencies = [ "parity-scale-codec", "rand 0.8.5", @@ -17759,13 +17600,13 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "substrate-test-utils", ] [[package]] name = "sp-npos-elections-fuzzer" -version = "2.0.0-alpha.5" +version = "0.1.0" dependencies = [ "clap 4.4.11", "honggfuzz", @@ -17776,7 +17617,7 @@ dependencies = [ [[package]] name = "sp-offchain" -version = "4.0.0-dev" +version = "24.0.0" dependencies = [ "sp-api", "sp-core", @@ -17785,7 +17626,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "8.0.0" +version = "12.0.0" dependencies = [ "backtrace", "lazy_static", @@ -17794,7 +17635,7 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "6.0.0" +version = "24.0.0" dependencies = [ "rustc-hash", "serde", @@ -17804,9 +17645,8 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "24.0.0" +version = "29.0.0" dependencies = [ - "docify", "either", "hash256-std-hasher", "impl-trait-for-tuples", @@ -17817,15 +17657,14 @@ dependencies = [ "scale-info", "serde", "serde_json", - "simple-mermaid 0.1.0 (git+https://github.com/kianenigma/simple-mermaid.git?branch=main)", "sp-api", "sp-application-crypto", "sp-arithmetic", "sp-core", "sp-io", "sp-state-machine", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "sp-weights", "substrate-test-runtime-client", "zstd 0.12.4", @@ -17833,64 +17672,33 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "17.0.0" -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-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 = "22.0.0" 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", - "expander 2.0.0", - "proc-macro-crate 2.0.1", - "proc-macro2", - "quote", - "syn 2.0.40", + "parity-scale-codec", + "primitive-types", + "rustversion", + "sp-core", + "sp-externalities", + "sp-io", + "sp-runtime-interface-proc-macro", + "sp-runtime-interface-test-wasm", + "sp-state-machine", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", + "static_assertions", + "trybuild", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "15.0.0" dependencies = [ "Inflector", - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.40", @@ -17898,13 +17706,13 @@ dependencies = [ [[package]] name = "sp-runtime-interface-test" -version = "2.0.0" +version = "0.1.0" dependencies = [ "sc-executor", "sc-executor-common", "sp-io", "sp-runtime", - "sp-runtime-interface 17.0.0", + "sp-runtime-interface", "sp-runtime-interface-test-wasm", "sp-runtime-interface-test-wasm-deprecated", "sp-state-machine", @@ -17914,29 +17722,29 @@ dependencies = [ [[package]] name = "sp-runtime-interface-test-wasm" -version = "2.0.0" +version = "0.1.0" dependencies = [ "bytes", "sp-core", "sp-io", - "sp-runtime-interface 17.0.0", - "sp-std 8.0.0", + "sp-runtime-interface", + "sp-std", "substrate-wasm-builder", ] [[package]] name = "sp-runtime-interface-test-wasm-deprecated" -version = "2.0.0" +version = "0.1.0" dependencies = [ "sp-core", "sp-io", - "sp-runtime-interface 17.0.0", + "sp-runtime-interface", "substrate-wasm-builder", ] [[package]] name = "sp-session" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "parity-scale-codec", "scale-info", @@ -17945,12 +17753,12 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "sp-staking" -version = "4.0.0-dev" +version = "24.0.0" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -17958,12 +17766,12 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "sp-state-machine" -version = "0.28.0" +version = "0.33.0" dependencies = [ "array-bytes 6.1.0", "assert_matches", @@ -17975,10 +17783,10 @@ dependencies = [ "rand 0.8.5", "smallvec", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities", "sp-panic-handler", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-trie", "thiserror", "tracing", @@ -17987,7 +17795,7 @@ dependencies = [ [[package]] name = "sp-statement-store" -version = "4.0.0-dev" +version = "8.0.0" dependencies = [ "aes-gcm 0.10.3", "curve25519-dalek 4.0.0", @@ -18000,51 +17808,33 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities", "sp-runtime", - "sp-runtime-interface 17.0.0", - "sp-std 8.0.0", + "sp-runtime-interface", + "sp-std", "thiserror", "x25519-dalek 2.0.0", ] [[package]] name = "sp-std" -version = "8.0.0" - -[[package]] -name = "sp-std" -version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" - -[[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", -] +version = "12.0.0" [[package]] name = "sp-storage" -version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "17.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", + "sp-std", ] [[package]] name = "sp-test-primitives" -version = "2.0.0" +version = "0.1.0" dependencies = [ "parity-scale-codec", "scale-info", @@ -18052,39 +17842,27 @@ dependencies = [ "sp-application-crypto", "sp-core", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] name = "sp-timestamp" -version = "4.0.0-dev" +version = "24.0.0" dependencies = [ "async-trait", "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "thiserror", ] [[package]] name = "sp-tracing" -version = "10.0.0" -dependencies = [ - "parity-scale-codec", - "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#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "14.0.0" dependencies = [ "parity-scale-codec", - "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std", "tracing", "tracing-core", "tracing-subscriber", @@ -18092,7 +17870,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "4.0.0-dev" +version = "24.0.0" dependencies = [ "sp-api", "sp-runtime", @@ -18100,7 +17878,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" -version = "4.0.0-dev" +version = "24.0.0" dependencies = [ "async-trait", "parity-scale-codec", @@ -18108,18 +17886,19 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-trie", ] [[package]] name = "sp-trie" -version = "22.0.0" +version = "27.0.0" dependencies = [ "ahash 0.8.3", "array-bytes 6.1.0", "criterion 0.4.0", "hash-db", + "hashbrown 0.13.2", "lazy_static", "memory-db", "nohash-hasher", @@ -18129,9 +17908,8 @@ dependencies = [ "scale-info", "schnellru", "sp-core", - "sp-externalities 0.19.0", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "thiserror", "tracing", "trie-bench", @@ -18142,7 +17920,7 @@ dependencies = [ [[package]] name = "sp-version" -version = "22.0.0" +version = "27.0.0" dependencies = [ "impl-serde", "parity-scale-codec", @@ -18151,14 +17929,14 @@ dependencies = [ "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-version-proc-macro", "thiserror", ] [[package]] name = "sp-version-proc-macro" -version = "8.0.0" +version = "12.0.0" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -18169,42 +17947,28 @@ dependencies = [ [[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#82912acb33a9030c0ef3bf590a34fca09b72dc5f" +version = "18.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", "wasmtime", ] [[package]] name = "sp-weights" -version = "20.0.0" +version = "25.0.0" dependencies = [ - "bounded-collections", "parity-scale-codec", "scale-info", - "schemars", "serde", "smallvec", "sp-arithmetic", - "sp-debug-derive 8.0.0", - "sp-std 8.0.0", + "sp-core", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -18273,27 +18037,32 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-chain-spec-builder" -version = "2.0.0" +version = "0.1.0" dependencies = [ + "ansi_term", "clap 4.4.11", + "kitchensink-runtime", "log", + "rand 0.8.5", "sc-chain-spec", + "sc-keystore", "serde_json", - "sp-tracing 10.0.0", + "sp-core", + "sp-keystore", + "sp-tracing", + "staging-node-cli", ] [[package]] name = "staging-node-cli" -version = "3.0.0-dev" +version = "0.1.0" dependencies = [ "array-bytes 6.1.0", "assert_cmd", "clap 4.4.11", "clap_complete", "criterion 0.4.0", - "frame-benchmarking", "frame-benchmarking-cli", - "frame-support", "frame-system", "frame-system-rpc-runtime-api", "futures", @@ -18303,20 +18072,13 @@ dependencies = [ "nix 0.26.2", "node-primitives", "node-rpc", - "node-testing", "pallet-asset-conversion-tx-payment", "pallet-asset-tx-payment", "pallet-assets", "pallet-balances", - "pallet-contracts", - "pallet-glutton", "pallet-im-online", - "pallet-root-testing", "pallet-skip-feeless-payment", - "pallet-sudo", "pallet-timestamp", - "pallet-transaction-payment", - "pallet-treasury", "parity-scale-codec", "platforms", "rand 0.8.5", @@ -18351,31 +18113,27 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool", "sc-transaction-pool-api", - "scale-info", "serde", "serde_json", "soketto", "sp-api", - "sp-application-crypto", "sp-authority-discovery", "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-consensus-grandpa", "sp-core", - "sp-externalities 0.19.0", "sp-inherents", "sp-io", "sp-keyring", "sp-keystore", "sp-mixnet", "sp-runtime", - "sp-state-machine", "sp-statement-store", "sp-timestamp", - "sp-tracing 10.0.0", + "sp-tracing", "sp-transaction-storage-proof", - "sp-trie", + "staging-node-executor", "staging-node-inspect", "substrate-build-script-utils", "substrate-cli-test-utils", @@ -18386,12 +18144,50 @@ dependencies = [ "tokio-util", "try-runtime-cli", "wait-timeout", +] + +[[package]] +name = "staging-node-executor" +version = "0.1.0" +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", + "serde_json", + "sp-application-crypto", + "sp-consensus-babe", + "sp-core", + "sp-externalities", + "sp-keyring", + "sp-keystore", + "sp-runtime", + "sp-state-machine", + "sp-statement-store", + "sp-tracing", + "sp-trie", "wat", ] [[package]] name = "staging-node-inspect" -version = "0.9.0-dev" +version = "0.10.0" dependencies = [ "clap 4.4.11", "parity-scale-codec", @@ -18400,15 +18196,13 @@ dependencies = [ "sc-service", "sp-blockchain", "sp-core", - "sp-io", "sp-runtime", - "sp-statement-store", "thiserror", ] [[package]] name = "staging-parachain-info" -version = "0.1.0" +version = "0.5.0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -18416,7 +18210,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std 8.0.0", + "sp-std", ] [[package]] @@ -18425,7 +18219,7 @@ version = "1.0.0" [[package]] name = "staging-xcm" -version = "1.0.0" +version = "5.0.0" dependencies = [ "bounded-collections", "derivative", @@ -18436,7 +18230,6 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "schemars", "serde", "sp-io", "sp-weights", @@ -18445,7 +18238,7 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "1.0.0" +version = "5.0.1" dependencies = [ "assert_matches", "frame-support", @@ -18467,7 +18260,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-weights", "staging-xcm", "staging-xcm-executor", @@ -18475,7 +18268,7 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "1.0.0" +version = "5.0.1" dependencies = [ "environmental", "frame-benchmarking", @@ -18488,7 +18281,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "sp-weights", "staging-xcm", ] @@ -18552,19 +18345,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "strobe-rs" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabb238a1cccccfa4c4fb703670c0d157e1256c1ba695abf1b93bd2bb14bab2d" -dependencies = [ - "bitflags 1.3.2", - "byteorder", - "keccak", - "subtle 2.4.1", - "zeroize", -] - [[package]] name = "strsim" version = "0.10.0" @@ -18604,7 +18384,7 @@ dependencies = [ "lazy_static", "md-5", "rand 0.8.5", - "ring 0.16.20", + "ring", "subtle 2.4.1", "thiserror", "tokio", @@ -18614,12 +18394,32 @@ dependencies = [ [[package]] name = "subkey" -version = "3.0.0" +version = "7.0.0" dependencies = [ "clap 4.4.11", "sc-cli", ] +[[package]] +name = "substrate" +version = "0.1.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]] name = "substrate-bip39" version = "0.4.4" @@ -18635,7 +18435,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" -version = "3.0.0" +version = "9.0.0" [[package]] name = "substrate-cli-test-utils" @@ -18656,7 +18456,7 @@ dependencies = [ [[package]] name = "substrate-frame-cli" -version = "4.0.0-dev" +version = "30.0.0" dependencies = [ "clap 4.4.11", "frame-support", @@ -18668,7 +18468,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-support" -version = "3.0.0" +version = "27.0.0" dependencies = [ "frame-support", "frame-system", @@ -18679,13 +18479,13 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-storage 13.0.0", + "sp-storage", "tokio", ] [[package]] name = "substrate-frame-rpc-system" -version = "4.0.0-dev" +version = "26.0.0" dependencies = [ "assert_matches", "frame-system-rpc-runtime-api", @@ -18701,14 +18501,14 @@ dependencies = [ "sp-blockchain", "sp-core", "sp-runtime", - "sp-tracing 10.0.0", + "sp-tracing", "substrate-test-runtime-client", "tokio", ] [[package]] name = "substrate-prometheus-endpoint" -version = "0.10.0-dev" +version = "0.16.0" dependencies = [ "hyper", "log", @@ -18719,7 +18519,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" -version = "0.10.0-dev" +version = "0.31.0" dependencies = [ "async-trait", "jsonrpsee", @@ -18733,7 +18533,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" -version = "4.0.0-dev" +version = "25.0.0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -18750,7 +18550,7 @@ dependencies = [ [[package]] name = "substrate-test-client" -version = "2.0.1" +version = "0.1.0" dependencies = [ "array-bytes 6.1.0", "async-trait", @@ -18775,7 +18575,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime" -version = "2.0.0" +version = "0.1.0" dependencies = [ "array-bytes 6.1.0", "frame-executive", @@ -18804,7 +18604,7 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-grandpa", "sp-core", - "sp-externalities 0.19.0", + "sp-externalities", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -18813,8 +18613,8 @@ dependencies = [ "sp-runtime", "sp-session", "sp-state-machine", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "sp-transaction-pool", "sp-trie", "sp-version", @@ -18825,7 +18625,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" -version = "2.0.0" +version = "0.1.0" dependencies = [ "futures", "sc-block-builder", @@ -18842,7 +18642,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-transaction-pool" -version = "2.0.0" +version = "0.1.0" dependencies = [ "futures", "parity-scale-codec", @@ -18857,7 +18657,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" -version = "4.0.0-dev" +version = "0.1.0" dependencies = [ "futures", "sc-service", @@ -18867,7 +18667,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "5.0.0-dev" +version = "15.0.0" dependencies = [ "ansi_term", "build-helper", @@ -18877,7 +18677,7 @@ dependencies = [ "sp-maybe-compressed-blob", "strum", "tempfile", - "toml 0.8.2", + "toml 0.7.8", "walkdir", "wasm-opt", ] @@ -19118,20 +18918,20 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "test-parachain-adder" -version = "1.0.0" +version = "0.1.0" dependencies = [ "dlmalloc", "parity-scale-codec", "polkadot-parachain-primitives", "sp-io", - "sp-std 8.0.0", + "sp-std", "substrate-wasm-builder", "tiny-keccak", ] [[package]] name = "test-parachain-adder-collator" -version = "1.0.0" +version = "0.1.0" dependencies = [ "clap 4.4.11", "futures", @@ -19157,7 +18957,7 @@ dependencies = [ [[package]] name = "test-parachain-halt" -version = "1.0.0" +version = "0.1.0" dependencies = [ "rustversion", "substrate-wasm-builder", @@ -19165,21 +18965,21 @@ dependencies = [ [[package]] name = "test-parachain-undying" -version = "1.0.0" +version = "0.1.0" dependencies = [ "dlmalloc", "log", "parity-scale-codec", "polkadot-parachain-primitives", "sp-io", - "sp-std 8.0.0", + "sp-std", "substrate-wasm-builder", "tiny-keccak", ] [[package]] name = "test-parachain-undying-collator" -version = "1.0.0" +version = "0.1.0" dependencies = [ "clap 4.4.11", "futures", @@ -19205,7 +19005,7 @@ dependencies = [ [[package]] name = "test-parachains" -version = "1.0.0" +version = "0.1.0" dependencies = [ "parity-scale-codec", "sp-core", @@ -19216,7 +19016,7 @@ dependencies = [ [[package]] name = "test-runtime-constants" -version = "1.0.0" +version = "0.1.0" dependencies = [ "frame-support", "polkadot-primitives", @@ -19227,6 +19027,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" @@ -19536,19 +19349,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.19.15", -] - -[[package]] -name = "toml" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.20.2", + "toml_edit", ] [[package]] @@ -19573,19 +19374,6 @@ dependencies = [ "winnow", ] -[[package]] -name = "toml_edit" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" -dependencies = [ - "indexmap 2.0.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - [[package]] name = "tower" version = "0.4.13" @@ -19673,7 +19461,7 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "1.0.0" +version = "5.0.0" dependencies = [ "coarsetime", "polkadot-primitives", @@ -19683,11 +19471,11 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "1.0.0" +version = "4.0.0" dependencies = [ "assert_matches", "expander 2.0.0", - "proc-macro-crate 2.0.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.40", @@ -19839,7 +19627,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" -version = "0.10.0-dev" +version = "0.36.0" dependencies = [ "assert_cmd", "async-trait", @@ -19859,8 +19647,8 @@ dependencies = [ "sp-consensus-aura", "sp-consensus-babe", "sp-core", - "sp-debug-derive 8.0.0", - "sp-externalities 0.19.0", + "sp-debug-derive", + "sp-externalities", "sp-inherents", "sp-io", "sp-keystore", @@ -19931,7 +19719,7 @@ dependencies = [ "log", "md-5", "rand 0.8.5", - "ring 0.16.20", + "ring", "stun", "thiserror", "tokio", @@ -19946,7 +19734,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand 0.7.3", + "rand 0.8.5", "static_assertions", ] @@ -20654,7 +20442,7 @@ version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ - "ring 0.16.20", + "ring", "untrusted", ] @@ -20664,7 +20452,7 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" dependencies = [ - "ring 0.16.20", + "ring", "untrusted", ] @@ -20708,7 +20496,7 @@ dependencies = [ "rand 0.8.5", "rcgen 0.9.3", "regex", - "ring 0.16.20", + "ring", "rtcp", "rtp", "rustls 0.19.1", @@ -20772,7 +20560,7 @@ dependencies = [ "rand 0.8.5", "rand_core 0.6.4", "rcgen 0.10.0", - "ring 0.16.20", + "ring", "rustls 0.19.1", "sec1 0.3.0", "serde", @@ -20902,7 +20690,7 @@ dependencies = [ [[package]] name = "westend-emulated-chain" -version = "0.0.0" +version = "0.1.0" dependencies = [ "emulated-integration-tests-common", "pallet-im-online", @@ -20922,7 +20710,7 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "1.0.0" +version = "5.0.0" dependencies = [ "binary-merkle-tree", "bitvec", @@ -21017,9 +20805,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", + "sp-storage", + "sp-tracing", "sp-transaction-pool", "sp-version", "staging-xcm", @@ -21033,7 +20821,7 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "1.0.0" +version = "5.0.0" dependencies = [ "frame-support", "polkadot-primitives", @@ -21043,16 +20831,14 @@ dependencies = [ "sp-runtime", "sp-weights", "staging-xcm", - "staging-xcm-builder", ] [[package]] name = "westend-system-emulated-network" -version = "0.0.0" +version = "0.1.0" dependencies = [ "asset-hub-westend-emulated-chain", "bridge-hub-westend-emulated-chain", - "collectives-westend-emulated-chain", "emulated-integration-tests-common", "penpal-emulated-chain", "westend-emulated-chain", @@ -21364,7 +21150,7 @@ dependencies = [ "lazy_static", "nom", "oid-registry 0.4.0", - "ring 0.16.20", + "ring", "rusticata-macros", "thiserror", "time 0.3.27", @@ -21399,7 +21185,7 @@ dependencies = [ [[package]] name = "xcm-emulator" -version = "0.1.0" +version = "0.3.0" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -21423,20 +21209,19 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "staging-xcm", "staging-xcm-executor", ] [[package]] name = "xcm-executor-integration-tests" -version = "1.0.0" +version = "0.1.0" dependencies = [ "frame-support", "frame-system", "futures", - "pallet-transaction-payment", "pallet-xcm", "parity-scale-codec", "polkadot-test-client", @@ -21446,26 +21231,25 @@ dependencies = [ "sp-keyring", "sp-runtime", "sp-state-machine", - "sp-tracing 10.0.0", + "sp-tracing", "staging-xcm", "staging-xcm-executor", ] [[package]] name = "xcm-procedural" -version = "1.0.0" +version = "5.0.0" dependencies = [ "Inflector", "proc-macro2", "quote", - "staging-xcm", "syn 2.0.40", "trybuild", ] [[package]] name = "xcm-simulator" -version = "1.0.0" +version = "5.0.0" dependencies = [ "frame-support", "parity-scale-codec", @@ -21474,7 +21258,7 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-runtime-parachains", "sp-io", - "sp-std 8.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -21482,7 +21266,7 @@ dependencies = [ [[package]] name = "xcm-simulator-example" -version = "1.0.0" +version = "5.0.0" dependencies = [ "frame-support", "frame-system", @@ -21499,8 +21283,8 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", - "sp-tracing 10.0.0", + "sp-std", + "sp-tracing", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -21509,7 +21293,7 @@ dependencies = [ [[package]] name = "xcm-simulator-fuzzer" -version = "1.0.0" +version = "0.1.0" dependencies = [ "arbitrary", "frame-support", @@ -21526,7 +21310,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std 8.0.0", + "sp-std", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -21584,7 +21368,7 @@ dependencies = [ [[package]] name = "zombienet-backchannel" -version = "1.0.0" +version = "0.1.0" dependencies = [ "futures-util", "lazy_static", diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/xcm_config.rs index 7084882c41f9..c86caab1a65a 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/xcm_config.rs @@ -43,7 +43,7 @@ use xcm_builder::{ ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, XcmFeeToAccount, + XcmFeeManagerFromComponents, XcmFeeToAccount, FrameTransactionalProcessor, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; @@ -266,6 +266,7 @@ impl xcm_executor::Config for XcmConfig { type CallDispatcher = WithOriginFilter; type SafeCallFilter = SafeCallFilter; type Aliasers = Nothing; + type TransactionalProcessor = FrameTransactionalProcessor; } pub type PriceForParentDelivery = diff --git a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs index 377c249dfb67..845232658403 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -47,8 +47,7 @@ use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, DenyReserveTransferToRelayChain, DenyThenTry, - EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, FungiblesAdapter, + ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FixedWeightBounds, FrameTransactionalProcessor, FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, From 678a3720acfcf460cceafc6a2d5df0e191eeb4fc Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Fri, 2 Feb 2024 16:26:17 +0100 Subject: [PATCH 10/18] Fix unused imports --- substrate/primitives/state-machine/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/substrate/primitives/state-machine/src/lib.rs b/substrate/primitives/state-machine/src/lib.rs index 0e2b9bfdfffc..5cc796054fc2 100644 --- a/substrate/primitives/state-machine/src/lib.rs +++ b/substrate/primitives/state-machine/src/lib.rs @@ -142,7 +142,6 @@ pub use crate::{ mod std_reexport { pub use crate::{ basic::BasicExternalities, - error::{Error, ExecutionError}, in_memory_backend::new_in_mem, read_only::{InspectState, ReadOnlyExternalities}, testing::TestExternalities, From 827cc41d96bb10b69a0c9141b5b9822e41fe5f29 Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Fri, 2 Feb 2024 16:38:49 +0100 Subject: [PATCH 11/18] Add a missing implementation --- .../runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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 bca463d9e7d2..127a6a08aecb 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 @@ -925,6 +925,13 @@ impl_runtime_apis! { Ok((origin, ticket, assets)) } + fn fee_asset() -> Result { + Ok(MultiAsset { + id: Concrete(TokenLocation::get()), + fun: Fungible(1_000_000 * UNITS), + }) + } + fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> { Err(BenchmarkError::Skip) } From 2d8ae50c111d96361a71ca5c820bb870a6393666 Mon Sep 17 00:00:00 2001 From: Branislav Kontur Date: Tue, 12 Dec 2023 21:01:36 +0100 Subject: [PATCH 12/18] [ci] Add `-D warnings` for `cargo-check-each-crate` job to fail on warnings (#2670) This PR turns on `-D warnings` for `cargo-check-each-crate job` job to fail on warnings e.g. like this: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673130 Before this PR, there was a warning and `cargo-check-each-crate` job did not fail: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4641444 ``` warning: unused import: `ToTokens` --> substrate/primitives/api/proc-macro/src/utils.rs:22:34 | 22 | use quote::{format_ident, quote, ToTokens}; | ^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default warning: `sp-api-proc-macro` (lib) generated 1 warning (run `cargo fix --lib -p sp-api-proc-macro` to apply 1 suggestion) ``` Fixes on the way: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4641444 https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673265 https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673410 https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673681 https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673836 https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673941 https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4674256 https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4679328 - [ ] why does this check triggers only `cargo check --locked`? `--all-features` or `--all-targets` are not needed? Or aren't they avoided intentionally? --------- Co-authored-by: command-bot <> --- .gitlab/pipeline/test.yml | 3 ++- substrate/client/network/src/behaviour.rs | 2 +- substrate/client/network/src/protocol/message.rs | 4 ---- .../client/network/src/protocol/notifications/upgrade.rs | 8 +++++--- substrate/client/offchain/src/api.rs | 1 - substrate/client/transaction-pool/src/graph/mod.rs | 5 +---- substrate/frame/contracts/proc-macro/src/lib.rs | 2 +- substrate/primitives/api/proc-macro/src/utils.rs | 3 ++- 8 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.gitlab/pipeline/test.yml b/.gitlab/pipeline/test.yml index 4ed3ec19c48a..cf29776f01aa 100644 --- a/.gitlab/pipeline/test.yml +++ b/.gitlab/pipeline/test.yml @@ -439,7 +439,8 @@ cargo-check-each-crate: - .run-immediately # - .collect-artifacts variables: - # $CI_JOB_NAME is set manually so that rusty-cachier can share the cache for all + RUSTFLAGS: "-D warnings" + # $CI_JOB_NAME is set manually so that cache could be shared for all jobs # "cargo-check-each-crate I/N" jobs CI_JOB_NAME: cargo-check-each-crate timeout: 2h diff --git a/substrate/client/network/src/behaviour.rs b/substrate/client/network/src/behaviour.rs index 0aa724818e02..b486a8eab79f 100644 --- a/substrate/client/network/src/behaviour.rs +++ b/substrate/client/network/src/behaviour.rs @@ -39,7 +39,7 @@ use sc_network_common::role::{ObservedRole, Roles}; use sp_runtime::traits::Block as BlockT; use std::{collections::HashSet, sync::Arc, time::Duration}; -pub use crate::request_responses::{InboundFailure, OutboundFailure, RequestId, ResponseFailure}; +pub use crate::request_responses::{InboundFailure, OutboundFailure, ResponseFailure}; /// General behaviour of the network. Combines all protocols together. #[derive(NetworkBehaviour)] diff --git a/substrate/client/network/src/protocol/message.rs b/substrate/client/network/src/protocol/message.rs index 66dca2975375..d4a05c041ef7 100644 --- a/substrate/client/network/src/protocol/message.rs +++ b/substrate/client/network/src/protocol/message.rs @@ -19,10 +19,6 @@ //! Network packet message types. These get serialized and put into the lower level protocol //! payload. -pub use self::generic::{ - RemoteCallRequest, RemoteChangesRequest, RemoteChangesResponse, RemoteHeaderRequest, - RemoteHeaderResponse, RemoteReadChildRequest, RemoteReadRequest, -}; use codec::{Decode, Encode}; use sc_client_api::StorageProof; use sc_network_common::message::RequestId; diff --git a/substrate/client/network/src/protocol/notifications/upgrade.rs b/substrate/client/network/src/protocol/notifications/upgrade.rs index 70c6023623f5..8fd837f949d8 100644 --- a/substrate/client/network/src/protocol/notifications/upgrade.rs +++ b/substrate/client/network/src/protocol/notifications/upgrade.rs @@ -16,12 +16,14 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +#[cfg(test)] +pub(crate) use self::notifications::{ + NotificationsInOpen, NotificationsInSubstreamHandshake, NotificationsOutOpen, +}; pub use self::{ collec::UpgradeCollec, notifications::{ - NotificationsHandshakeError, NotificationsIn, NotificationsInOpen, - NotificationsInSubstream, NotificationsInSubstreamHandshake, NotificationsOut, - NotificationsOutError, NotificationsOutOpen, NotificationsOutSubstream, + NotificationsIn, NotificationsInSubstream, NotificationsOut, NotificationsOutSubstream, }, }; diff --git a/substrate/client/offchain/src/api.rs b/substrate/client/offchain/src/api.rs index c7df5784d329..7d33f8dc9225 100644 --- a/substrate/client/offchain/src/api.rs +++ b/substrate/client/offchain/src/api.rs @@ -30,7 +30,6 @@ use sp_core::{ }, OpaquePeerId, }; -pub use sp_offchain::STORAGE_PREFIX; mod http; diff --git a/substrate/client/transaction-pool/src/graph/mod.rs b/substrate/client/transaction-pool/src/graph/mod.rs index 5afdddb7402d..484a6d6cf9f0 100644 --- a/substrate/client/transaction-pool/src/graph/mod.rs +++ b/substrate/client/transaction-pool/src/graph/mod.rs @@ -39,9 +39,6 @@ pub mod watcher; pub use self::{ base_pool::Transaction, - pool::{ - BlockHash, ChainApi, EventStream, ExtrinsicFor, ExtrinsicHash, NumberFor, Options, Pool, - TransactionFor, - }, + pool::{BlockHash, ChainApi, ExtrinsicFor, ExtrinsicHash, NumberFor, Options, Pool}, }; pub use validated_pool::{IsValidator, ValidatedTransaction}; diff --git a/substrate/frame/contracts/proc-macro/src/lib.rs b/substrate/frame/contracts/proc-macro/src/lib.rs index ad9cd2dadecf..2d23a997edd4 100644 --- a/substrate/frame/contracts/proc-macro/src/lib.rs +++ b/substrate/frame/contracts/proc-macro/src/lib.rs @@ -74,7 +74,7 @@ fn derive_debug(input: TokenStream, fmt: impl Fn(&Ident) -> TokenStream2) -> Tok #[cfg(not(feature = "full"))] let fields = { drop(fmt); - drop(data); + let _ = data; TokenStream2::new() }; diff --git a/substrate/primitives/api/proc-macro/src/utils.rs b/substrate/primitives/api/proc-macro/src/utils.rs index e261b162b5aa..8c87f0d154ae 100644 --- a/substrate/primitives/api/proc-macro/src/utils.rs +++ b/substrate/primitives/api/proc-macro/src/utils.rs @@ -19,7 +19,7 @@ use crate::common::API_VERSION_ATTRIBUTE; use inflector::Inflector; use proc_macro2::{Span, TokenStream}; use proc_macro_crate::{crate_name, FoundCrate}; -use quote::{format_ident, quote, ToTokens}; +use quote::{format_ident, quote}; use syn::{ parse_quote, spanned::Spanned, token::And, Attribute, Error, FnArg, GenericArgument, Ident, ImplItem, ItemImpl, Pat, Path, PathArguments, Result, ReturnType, Signature, Type, TypePath, @@ -261,6 +261,7 @@ pub fn versioned_trait_name(trait_ident: &Ident, version: u64) -> Ident { /// Extract the documentation from the provided attributes. #[cfg(feature = "frame-metadata")] pub fn get_doc_literals(attrs: &[syn::Attribute]) -> Vec { + use quote::ToTokens; attrs .iter() .filter_map(|attr| { From 327c880254e25112a1cd2d47a6bd4560974b0363 Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Fri, 2 Feb 2024 17:28:23 +0100 Subject: [PATCH 13/18] Fixes --- .../runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 127a6a08aecb..5db8dbe2384f 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 @@ -927,7 +927,7 @@ impl_runtime_apis! { fn fee_asset() -> Result { Ok(MultiAsset { - id: Concrete(TokenLocation::get()), + id: Concrete(WestendLocation::get()), fun: Fungible(1_000_000 * UNITS), }) } From aedbd8e79a428e7e1b20b7d632ea81b27f8aa5db Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Wed, 31 Jan 2024 00:17:44 +0100 Subject: [PATCH 14/18] [ci] Update rust in ci image (1.75 and 2024-01-22) (#3016) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cc https://github.com/paritytech/ci_cd/issues/926 --------- Signed-off-by: Oliver Tale-Yazdi Co-authored-by: command-bot <> Co-authored-by: Oliver Tale-Yazdi Co-authored-by: Bastian Köcher Co-authored-by: Liam Aharon Co-authored-by: Dónal Murray Co-authored-by: Vladimir Istyufeev --- .github/workflows/fmt-check.yml | 2 +- .gitlab-ci.yml | 3 +- .../parachain/pallets/system/src/lib.rs | 685 ++++++++++++++++++ .../development_environment_advice.rs | 113 +++ .../subsystem-bench/src/availability/mod.rs | 660 +++++++++++++++++ .../node/subsystem-bench/src/core/keyring.rs | 46 ++ .../node/subsystem-bench/src/core/mock/mod.rs | 78 ++ substrate/frame/alliance/src/mock.rs | 2 +- substrate/frame/contracts/fixtures/build.rs | 350 +++++++++ .../procedural/src/pallet/expand/call.rs | 3 + .../deprecated_where_block.stderr | 66 ++ ...lt_config_with_no_default_in_system.stderr | 2 +- .../error_does_not_derive_pallet_error.rs | 4 +- .../error_does_not_derive_pallet_error.stderr | 6 +- .../tests/pallet_ui/event_field_not_member.rs | 4 +- .../pallet_ui/event_field_not_member.stderr | 12 +- .../pallet_ui/pass/error_nested_types.rs | 18 +- ...ent_type_bound_system_config_assoc_type.rs | 1 + .../storage_result_query_missing_generics.rs | 4 +- ...orage_result_query_missing_generics.stderr | 10 +- .../ui/impl_two_traits_with_same_name.rs | 1 + .../ui/impl_two_traits_with_same_name.stderr | 8 +- 22 files changed, 2041 insertions(+), 37 deletions(-) create mode 100644 bridges/snowbridge/parachain/pallets/system/src/lib.rs create mode 100644 docs/sdk/src/reference_docs/development_environment_advice.rs create mode 100644 polkadot/node/subsystem-bench/src/availability/mod.rs create mode 100644 polkadot/node/subsystem-bench/src/core/keyring.rs create mode 100644 polkadot/node/subsystem-bench/src/core/mock/mod.rs create mode 100644 substrate/frame/contracts/fixtures/build.rs diff --git a/.github/workflows/fmt-check.yml b/.github/workflows/fmt-check.yml index e4d39acabfd7..efcf278c46e8 100644 --- a/.github/workflows/fmt-check.yml +++ b/.github/workflows/fmt-check.yml @@ -15,7 +15,7 @@ jobs: os: ["ubuntu-latest"] runs-on: ${{ matrix.os }} container: - image: paritytech/ci-unified:bullseye-1.73.0-2023-11-01-v20231025 + image: docker.io/paritytech/ci-unified:bullseye-1.75.0-2024-01-22-v20240109 steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1dc483004f24..5e9974da9941 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,8 @@ workflow: - if: $CI_COMMIT_BRANCH variables: - CI_IMAGE: !reference [.ci-unified, variables, CI_IMAGE] + # CI_IMAGE: !reference [.ci-unified, variables, CI_IMAGE] + CI_IMAGE: "docker.io/paritytech/ci-unified:bullseye-1.75.0-2024-01-22-v20240109" # BUILDAH_IMAGE is defined in group variables BUILDAH_COMMAND: "buildah --storage-driver overlay2" RELENG_SCRIPTS_BRANCH: "master" diff --git a/bridges/snowbridge/parachain/pallets/system/src/lib.rs b/bridges/snowbridge/parachain/pallets/system/src/lib.rs new file mode 100644 index 000000000000..b7f38fb753d3 --- /dev/null +++ b/bridges/snowbridge/parachain/pallets/system/src/lib.rs @@ -0,0 +1,685 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: 2023 Snowfork +//! Governance API for controlling the Ethereum side of the bridge +//! +//! # Extrinsics +//! +//! ## Agents +//! +//! Agents are smart contracts on Ethereum that act as proxies for consensus systems on Polkadot +//! networks. +//! +//! * [`Call::create_agent`]: Create agent for a sibling parachain +//! * [`Call::transfer_native_from_agent`]: Withdraw ether from an agent +//! +//! The `create_agent` extrinsic should be called via an XCM `Transact` instruction from the sibling +//! parachain. +//! +//! ## Channels +//! +//! Each sibling parachain has its own dedicated messaging channel for sending and receiving +//! messages. As a prerequisite to creating a channel, the sibling should have already created +//! an agent using the `create_agent` extrinsic. +//! +//! * [`Call::create_channel`]: Create channel for a sibling +//! * [`Call::update_channel`]: Update a channel for a sibling +//! +//! ## Governance +//! +//! Only Polkadot governance itself can call these extrinsics. Delivery fees are waived. +//! +//! * [`Call::upgrade`]`: Upgrade the gateway contract +//! * [`Call::set_operating_mode`]: Update the operating mode of the gateway contract +//! * [`Call::force_update_channel`]: Allow root to update a channel for a sibling +//! * [`Call::force_transfer_native_from_agent`]: Allow root to withdraw ether from an agent +//! +//! Typically, Polkadot governance will use the `force_transfer_native_from_agent` and +//! `force_update_channel` and extrinsics to manage agents and channels for system parachains. +#![cfg_attr(not(feature = "std"), no_std)] + +pub use pallet::*; + +#[cfg(test)] +mod mock; + +#[cfg(test)] +mod tests; + +#[cfg(feature = "runtime-benchmarks")] +mod benchmarking; +pub mod migration; + +pub mod api; +pub mod weights; +pub use weights::*; + +use frame_support::{ + pallet_prelude::*, + traits::{ + fungible::{Inspect, Mutate}, + tokens::Preservation, + Contains, EnsureOrigin, + }, +}; +use frame_system::pallet_prelude::*; +use snowbridge_core::{ + meth, + outbound::{Command, Initializer, Message, OperatingMode, SendError, SendMessage}, + sibling_sovereign_account, AgentId, Channel, ChannelId, ParaId, + PricingParameters as PricingParametersRecord, PRIMARY_GOVERNANCE_CHANNEL, + SECONDARY_GOVERNANCE_CHANNEL, +}; +use sp_core::{RuntimeDebug, H160, H256}; +use sp_io::hashing::blake2_256; +use sp_runtime::{traits::BadOrigin, DispatchError, SaturatedConversion}; +use sp_std::prelude::*; +use xcm::prelude::*; +use xcm_executor::traits::ConvertLocation; + +#[cfg(feature = "runtime-benchmarks")] +use frame_support::traits::OriginTrait; + +pub type BalanceOf = + <::Token as Inspect<::AccountId>>::Balance; +pub type AccountIdOf = ::AccountId; +pub type PricingParametersOf = PricingParametersRecord>; + +/// Ensure origin location is a sibling +fn ensure_sibling(location: &Location) -> Result<(ParaId, H256), DispatchError> +where + T: Config, +{ + match location.unpack() { + (1, [Parachain(para_id)]) => { + let agent_id = agent_id_of::(location)?; + Ok(((*para_id).into(), agent_id)) + }, + _ => Err(BadOrigin.into()), + } +} + +/// Hash the location to produce an agent id +fn agent_id_of(location: &Location) -> Result { + T::AgentIdOf::convert_location(location).ok_or(Error::::LocationConversionFailed.into()) +} + +#[cfg(feature = "runtime-benchmarks")] +pub trait BenchmarkHelper +where + O: OriginTrait, +{ + fn make_xcm_origin(location: Location) -> O; +} + +/// Whether a fee should be withdrawn to an account for sending an outbound message +#[derive(Clone, PartialEq, RuntimeDebug)] +pub enum PaysFee +where + T: Config, +{ + /// Fully charge includes (local + remote fee) + Yes(AccountIdOf), + /// Partially charge includes local fee only + Partial(AccountIdOf), + /// No charge + No, +} + +#[frame_support::pallet] +pub mod pallet { + use snowbridge_core::StaticLookup; + use sp_core::U256; + + use super::*; + + #[pallet::pallet] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config { + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + + /// Send messages to Ethereum + type OutboundQueue: SendMessage>; + + /// Origin check for XCM locations that can create agents + type SiblingOrigin: EnsureOrigin; + + /// Converts Location to AgentId + type AgentIdOf: ConvertLocation; + + /// Token reserved for control operations + type Token: Mutate; + + /// TreasuryAccount to collect fees + #[pallet::constant] + type TreasuryAccount: Get; + + /// Number of decimal places of local currency + type DefaultPricingParameters: Get>; + + /// Cost of delivering a message from Ethereum + type InboundDeliveryCost: Get>; + + type WeightInfo: WeightInfo; + + #[cfg(feature = "runtime-benchmarks")] + type Helper: BenchmarkHelper; + } + + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + /// An Upgrade message was sent to the Gateway + Upgrade { + impl_address: H160, + impl_code_hash: H256, + initializer_params_hash: Option, + }, + /// An CreateAgent message was sent to the Gateway + CreateAgent { + location: Box, + agent_id: AgentId, + }, + /// An CreateChannel message was sent to the Gateway + CreateChannel { + channel_id: ChannelId, + agent_id: AgentId, + }, + /// An UpdateChannel message was sent to the Gateway + UpdateChannel { + channel_id: ChannelId, + mode: OperatingMode, + }, + /// An SetOperatingMode message was sent to the Gateway + SetOperatingMode { + mode: OperatingMode, + }, + /// An TransferNativeFromAgent message was sent to the Gateway + TransferNativeFromAgent { + agent_id: AgentId, + recipient: H160, + amount: u128, + }, + /// A SetTokenTransferFees message was sent to the Gateway + SetTokenTransferFees { + create_asset_xcm: u128, + transfer_asset_xcm: u128, + register_token: U256, + }, + PricingParametersChanged { + params: PricingParametersOf, + }, + } + + #[pallet::error] + pub enum Error { + LocationConversionFailed, + AgentAlreadyCreated, + NoAgent, + ChannelAlreadyCreated, + NoChannel, + UnsupportedLocationVersion, + InvalidLocation, + Send(SendError), + InvalidTokenTransferFees, + InvalidPricingParameters, + InvalidUpgradeParameters, + } + + /// The set of registered agents + #[pallet::storage] + #[pallet::getter(fn agents)] + pub type Agents = StorageMap<_, Twox64Concat, AgentId, (), OptionQuery>; + + /// The set of registered channels + #[pallet::storage] + #[pallet::getter(fn channels)] + pub type Channels = StorageMap<_, Twox64Concat, ChannelId, Channel, OptionQuery>; + + #[pallet::storage] + #[pallet::getter(fn parameters)] + pub type PricingParameters = + StorageValue<_, PricingParametersOf, ValueQuery, T::DefaultPricingParameters>; + + #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] + pub struct GenesisConfig { + // Own parachain id + pub para_id: ParaId, + // AssetHub's parachain id + pub asset_hub_para_id: ParaId, + #[serde(skip)] + pub _config: PhantomData, + } + + #[pallet::genesis_build] + impl BuildGenesisConfig for GenesisConfig { + fn build(&self) { + Pallet::::initialize(self.para_id, self.asset_hub_para_id).expect("infallible; qed"); + } + } + + #[pallet::call] + impl Pallet { + /// Sends command to the Gateway contract to upgrade itself with a new implementation + /// contract + /// + /// Fee required: No + /// + /// - `origin`: Must be `Root`. + /// - `impl_address`: The address of the implementation contract. + /// - `impl_code_hash`: The codehash of the implementation contract. + /// - `initializer`: Optionally call an initializer on the implementation contract. + #[pallet::call_index(0)] + #[pallet::weight((T::WeightInfo::upgrade(), DispatchClass::Operational))] + pub fn upgrade( + origin: OriginFor, + impl_address: H160, + impl_code_hash: H256, + initializer: Option, + ) -> DispatchResult { + ensure_root(origin)?; + + ensure!( + !impl_address.eq(&H160::zero()) && !impl_code_hash.eq(&H256::zero()), + Error::::InvalidUpgradeParameters + ); + + let initializer_params_hash: Option = + initializer.as_ref().map(|i| H256::from(blake2_256(i.params.as_ref()))); + let command = Command::Upgrade { impl_address, impl_code_hash, initializer }; + Self::send(PRIMARY_GOVERNANCE_CHANNEL, command, PaysFee::::No)?; + + Self::deposit_event(Event::::Upgrade { + impl_address, + impl_code_hash, + initializer_params_hash, + }); + Ok(()) + } + + /// Sends a message to the Gateway contract to change its operating mode + /// + /// Fee required: No + /// + /// - `origin`: Must be `Location` + #[pallet::call_index(1)] + #[pallet::weight((T::WeightInfo::set_operating_mode(), DispatchClass::Operational))] + pub fn set_operating_mode(origin: OriginFor, mode: OperatingMode) -> DispatchResult { + ensure_root(origin)?; + + let command = Command::SetOperatingMode { mode }; + Self::send(PRIMARY_GOVERNANCE_CHANNEL, command, PaysFee::::No)?; + + Self::deposit_event(Event::::SetOperatingMode { mode }); + Ok(()) + } + + /// Set pricing parameters on both sides of the bridge + /// + /// Fee required: No + /// + /// - `origin`: Must be root + #[pallet::call_index(2)] + #[pallet::weight((T::WeightInfo::set_pricing_parameters(), DispatchClass::Operational))] + pub fn set_pricing_parameters( + origin: OriginFor, + params: PricingParametersOf, + ) -> DispatchResult { + ensure_root(origin)?; + params.validate().map_err(|_| Error::::InvalidPricingParameters)?; + PricingParameters::::put(params.clone()); + + let command = Command::SetPricingParameters { + exchange_rate: params.exchange_rate.into(), + delivery_cost: T::InboundDeliveryCost::get().saturated_into::(), + }; + Self::send(PRIMARY_GOVERNANCE_CHANNEL, command, PaysFee::::No)?; + + Self::deposit_event(Event::PricingParametersChanged { params }); + Ok(()) + } + + /// Sends a command to the Gateway contract to instantiate a new agent contract representing + /// `origin`. + /// + /// Fee required: Yes + /// + /// - `origin`: Must be `Location` of a sibling parachain + #[pallet::call_index(3)] + #[pallet::weight(T::WeightInfo::create_agent())] + pub fn create_agent(origin: OriginFor) -> DispatchResult { + let origin_location: Location = T::SiblingOrigin::ensure_origin(origin)?; + + // Ensure that origin location is some consensus system on a sibling parachain + let (para_id, agent_id) = ensure_sibling::(&origin_location)?; + + // Record the agent id or fail if it has already been created + ensure!(!Agents::::contains_key(agent_id), Error::::AgentAlreadyCreated); + Agents::::insert(agent_id, ()); + + let command = Command::CreateAgent { agent_id }; + let pays_fee = PaysFee::::Yes(sibling_sovereign_account::(para_id)); + Self::send(SECONDARY_GOVERNANCE_CHANNEL, command, pays_fee)?; + + Self::deposit_event(Event::::CreateAgent { + location: Box::new(origin_location), + agent_id, + }); + Ok(()) + } + + /// Sends a message to the Gateway contract to create a new channel representing `origin` + /// + /// Fee required: Yes + /// + /// This extrinsic is permissionless, so a fee is charged to prevent spamming and pay + /// for execution costs on the remote side. + /// + /// The message is sent over the bridge on BridgeHub's own channel to the Gateway. + /// + /// - `origin`: Must be `Location` + /// - `mode`: Initial operating mode of the channel + #[pallet::call_index(4)] + #[pallet::weight(T::WeightInfo::create_channel())] + pub fn create_channel(origin: OriginFor, mode: OperatingMode) -> DispatchResult { + let origin_location: Location = T::SiblingOrigin::ensure_origin(origin)?; + + // Ensure that origin location is a sibling parachain + let (para_id, agent_id) = ensure_sibling::(&origin_location)?; + + let channel_id: ChannelId = para_id.into(); + + ensure!(Agents::::contains_key(agent_id), Error::::NoAgent); + ensure!(!Channels::::contains_key(channel_id), Error::::ChannelAlreadyCreated); + + let channel = Channel { agent_id, para_id }; + Channels::::insert(channel_id, channel); + + let command = Command::CreateChannel { channel_id, agent_id, mode }; + let pays_fee = PaysFee::::Yes(sibling_sovereign_account::(para_id)); + Self::send(SECONDARY_GOVERNANCE_CHANNEL, command, pays_fee)?; + + Self::deposit_event(Event::::CreateChannel { channel_id, agent_id }); + Ok(()) + } + + /// Sends a message to the Gateway contract to update a channel configuration + /// + /// The origin must already have a channel initialized, as this message is sent over it. + /// + /// A partial fee will be charged for local processing only. + /// + /// - `origin`: Must be `Location` + /// - `mode`: Initial operating mode of the channel + #[pallet::call_index(5)] + #[pallet::weight(T::WeightInfo::update_channel())] + pub fn update_channel(origin: OriginFor, mode: OperatingMode) -> DispatchResult { + let origin_location: Location = T::SiblingOrigin::ensure_origin(origin)?; + + // Ensure that origin location is a sibling parachain + let (para_id, _) = ensure_sibling::(&origin_location)?; + + let channel_id: ChannelId = para_id.into(); + + ensure!(Channels::::contains_key(channel_id), Error::::NoChannel); + + let command = Command::UpdateChannel { channel_id, mode }; + let pays_fee = PaysFee::::Partial(sibling_sovereign_account::(para_id)); + + // Parachains send the update message on their own channel + Self::send(channel_id, command, pays_fee)?; + + Self::deposit_event(Event::::UpdateChannel { channel_id, mode }); + Ok(()) + } + + /// Sends a message to the Gateway contract to update an arbitrary channel + /// + /// Fee required: No + /// + /// - `origin`: Must be root + /// - `channel_id`: ID of channel + /// - `mode`: Initial operating mode of the channel + /// - `outbound_fee`: Fee charged to users for sending outbound messages to Polkadot + #[pallet::call_index(6)] + #[pallet::weight(T::WeightInfo::force_update_channel())] + pub fn force_update_channel( + origin: OriginFor, + channel_id: ChannelId, + mode: OperatingMode, + ) -> DispatchResult { + ensure_root(origin)?; + + ensure!(Channels::::contains_key(channel_id), Error::::NoChannel); + + let command = Command::UpdateChannel { channel_id, mode }; + Self::send(PRIMARY_GOVERNANCE_CHANNEL, command, PaysFee::::No)?; + + Self::deposit_event(Event::::UpdateChannel { channel_id, mode }); + Ok(()) + } + + /// Sends a message to the Gateway contract to transfer ether from an agent to `recipient`. + /// + /// A partial fee will be charged for local processing only. + /// + /// - `origin`: Must be `Location` + #[pallet::call_index(7)] + #[pallet::weight(T::WeightInfo::transfer_native_from_agent())] + pub fn transfer_native_from_agent( + origin: OriginFor, + recipient: H160, + amount: u128, + ) -> DispatchResult { + let origin_location: Location = T::SiblingOrigin::ensure_origin(origin)?; + + // Ensure that origin location is some consensus system on a sibling parachain + let (para_id, agent_id) = ensure_sibling::(&origin_location)?; + + // Since the origin is also the owner of the channel, they only need to pay + // the local processing fee. + let pays_fee = PaysFee::::Partial(sibling_sovereign_account::(para_id)); + + Self::do_transfer_native_from_agent( + agent_id, + para_id.into(), + recipient, + amount, + pays_fee, + ) + } + + /// Sends a message to the Gateway contract to transfer ether from an agent to `recipient`. + /// + /// Privileged. Can only be called by root. + /// + /// Fee required: No + /// + /// - `origin`: Must be root + /// - `location`: Location used to resolve the agent + /// - `recipient`: Recipient of funds + /// - `amount`: Amount to transfer + #[pallet::call_index(8)] + #[pallet::weight(T::WeightInfo::force_transfer_native_from_agent())] + pub fn force_transfer_native_from_agent( + origin: OriginFor, + location: Box, + recipient: H160, + amount: u128, + ) -> DispatchResult { + ensure_root(origin)?; + + // Ensure that location is some consensus system on a sibling parachain + let location: Location = + (*location).try_into().map_err(|_| Error::::UnsupportedLocationVersion)?; + let (_, agent_id) = + ensure_sibling::(&location).map_err(|_| Error::::InvalidLocation)?; + + let pays_fee = PaysFee::::No; + + Self::do_transfer_native_from_agent( + agent_id, + PRIMARY_GOVERNANCE_CHANNEL, + recipient, + amount, + pays_fee, + ) + } + + /// Sends a message to the Gateway contract to update fee related parameters for + /// token transfers. + /// + /// Privileged. Can only be called by root. + /// + /// Fee required: No + /// + /// - `origin`: Must be root + /// - `create_asset_xcm`: The XCM execution cost for creating a new asset class on AssetHub, + /// in DOT + /// - `transfer_asset_xcm`: The XCM execution cost for performing a reserve transfer on + /// AssetHub, in DOT + /// - `register_token`: The Ether fee for registering a new token, to discourage spamming + #[pallet::call_index(9)] + #[pallet::weight((T::WeightInfo::set_token_transfer_fees(), DispatchClass::Operational))] + pub fn set_token_transfer_fees( + origin: OriginFor, + create_asset_xcm: u128, + transfer_asset_xcm: u128, + register_token: U256, + ) -> DispatchResult { + ensure_root(origin)?; + + // Basic validation of new costs. Particularly for token registration, we want to ensure + // its relatively expensive to discourage spamming. Like at least 100 USD. + ensure!( + create_asset_xcm > 0 && transfer_asset_xcm > 0 && register_token > meth(100), + Error::::InvalidTokenTransferFees + ); + + let command = Command::SetTokenTransferFees { + create_asset_xcm, + transfer_asset_xcm, + register_token, + }; + Self::send(PRIMARY_GOVERNANCE_CHANNEL, command, PaysFee::::No)?; + + Self::deposit_event(Event::::SetTokenTransferFees { + create_asset_xcm, + transfer_asset_xcm, + register_token, + }); + Ok(()) + } + } + + impl Pallet { + /// Send `command` to the Gateway on the Channel identified by `channel_id` + fn send(channel_id: ChannelId, command: Command, pays_fee: PaysFee) -> DispatchResult { + let message = Message { id: None, channel_id, command }; + let (ticket, fee) = + T::OutboundQueue::validate(&message).map_err(|err| Error::::Send(err))?; + + let payment = match pays_fee { + PaysFee::Yes(account) => Some((account, fee.total())), + PaysFee::Partial(account) => Some((account, fee.local)), + PaysFee::No => None, + }; + + if let Some((payer, fee)) = payment { + T::Token::transfer( + &payer, + &T::TreasuryAccount::get(), + fee, + Preservation::Preserve, + )?; + } + + T::OutboundQueue::deliver(ticket).map_err(|err| Error::::Send(err))?; + Ok(()) + } + + /// Issue a `Command::TransferNativeFromAgent` command. The command will be sent on the + /// channel `channel_id` + pub fn do_transfer_native_from_agent( + agent_id: H256, + channel_id: ChannelId, + recipient: H160, + amount: u128, + pays_fee: PaysFee, + ) -> DispatchResult { + ensure!(Agents::::contains_key(agent_id), Error::::NoAgent); + + let command = Command::TransferNativeFromAgent { agent_id, recipient, amount }; + Self::send(channel_id, command, pays_fee)?; + + Self::deposit_event(Event::::TransferNativeFromAgent { + agent_id, + recipient, + amount, + }); + Ok(()) + } + + /// Initializes agents and channels. + pub fn initialize(para_id: ParaId, asset_hub_para_id: ParaId) -> Result<(), DispatchError> { + // Asset Hub + let asset_hub_location: Location = + ParentThen(Parachain(asset_hub_para_id.into()).into()).into(); + let asset_hub_agent_id = agent_id_of::(&asset_hub_location)?; + let asset_hub_channel_id: ChannelId = asset_hub_para_id.into(); + Agents::::insert(asset_hub_agent_id, ()); + Channels::::insert( + asset_hub_channel_id, + Channel { agent_id: asset_hub_agent_id, para_id: asset_hub_para_id }, + ); + + // Governance channels + let bridge_hub_agent_id = agent_id_of::(&Location::here())?; + // Agent for BridgeHub + Agents::::insert(bridge_hub_agent_id, ()); + + // Primary governance channel + Channels::::insert( + PRIMARY_GOVERNANCE_CHANNEL, + Channel { agent_id: bridge_hub_agent_id, para_id }, + ); + + // Secondary governance channel + Channels::::insert( + SECONDARY_GOVERNANCE_CHANNEL, + Channel { agent_id: bridge_hub_agent_id, para_id }, + ); + + Ok(()) + } + + /// Checks if the pallet has been initialized. + pub(crate) fn is_initialized() -> bool { + let primary_exists = Channels::::contains_key(PRIMARY_GOVERNANCE_CHANNEL); + let secondary_exists = Channels::::contains_key(SECONDARY_GOVERNANCE_CHANNEL); + primary_exists && secondary_exists + } + } + + impl StaticLookup for Pallet { + type Source = ChannelId; + type Target = Channel; + fn lookup(channel_id: Self::Source) -> Option { + Channels::::get(channel_id) + } + } + + impl Contains for Pallet { + fn contains(channel_id: &ChannelId) -> bool { + Channels::::get(channel_id).is_some() + } + } + + impl Get> for Pallet { + fn get() -> PricingParametersOf { + PricingParameters::::get() + } + } +} diff --git a/docs/sdk/src/reference_docs/development_environment_advice.rs b/docs/sdk/src/reference_docs/development_environment_advice.rs new file mode 100644 index 000000000000..431769597936 --- /dev/null +++ b/docs/sdk/src/reference_docs/development_environment_advice.rs @@ -0,0 +1,113 @@ +//! # Development Environment Advice +//! +//! Large Rust projects are known for sometimes long compile times and sluggish dev tooling, and +//! polkadot-sdk is no exception. +//! +//! This page contains some advice to improve your workflow when using common tooling. +//! +//! ## Rust Analyzer Configuration +//! +//! [Rust Analyzer](https://rust-analyzer.github.io/) is the defacto [LSP](https://langserver.org/) for Rust. Its default +//! settings are fine for smaller projects, but not well optimised for polkadot-sdk. +//! +//! Below is a suggested configuration for VSCode: +//! +//! ```json +//! { +//! // Use a separate target dir for Rust Analyzer. Helpful if you want to use Rust +//! // Analyzer and cargo on the command line at the same time. +//! "rust-analyzer.rust.analyzerTargetDir": "target/vscode-rust-analyzer", +//! // Improve stability +//! "rust-analyzer.server.extraEnv": { +//! "CHALK_OVERFLOW_DEPTH": "100000000", +//! "CHALK_SOLVER_MAX_SIZE": "10000000" +//! }, +//! // Check feature-gated code +//! "rust-analyzer.cargo.features": "all", +//! "rust-analyzer.cargo.extraEnv": { +//! // Skip building WASM, there is never need for it here +//! "SKIP_WASM_BUILD": "1" +//! }, +//! // Don't expand some problematic proc_macros +//! "rust-analyzer.procMacro.ignored": { +//! "async-trait": ["async_trait"], +//! "napi-derive": ["napi"], +//! "async-recursion": ["async_recursion"], +//! "async-std": ["async_std"] +//! }, +//! // Use nightly formatting. +//! // See the polkadot-sdk CI job that checks formatting for the current version used in +//! // polkadot-sdk. +//! "rust-analyzer.rustfmt.extraArgs": ["+nightly-2024-01-22"], +//! } +//! ``` +//! +//! and the same in Lua for `neovim/nvim-lspconfig`: +//! +//! ```lua +//! ["rust-analyzer"] = { +//! rust = { +//! # Use a separate target dir for Rust Analyzer. Helpful if you want to use Rust +//! # Analyzer and cargo on the command line at the same time. +//! analyzerTargetDir = "target/nvim-rust-analyzer", +//! }, +//! server = { +//! # Improve stability +//! extraEnv = { +//! ["CHALK_OVERFLOW_DEPTH"] = "100000000", +//! ["CHALK_SOLVER_MAX_SIZE"] = "100000000", +//! }, +//! }, +//! cargo = { +//! # Check feature-gated code +//! features = "all", +//! extraEnv = { +//! # Skip building WASM, there is never need for it here +//! ["SKIP_WASM_BUILD"] = "1", +//! }, +//! }, +//! procMacro = { +//! # Don't expand some problematic proc_macros +//! ignored = { +//! ["async-trait"] = { "async_trait" }, +//! ["napi-derive"] = { "napi" }, +//! ["async-recursion"] = { "async_recursion" }, +//! ["async-std"] = { "async_std" }, +//! }, +//! }, +//! rustfmt = { +//! # Use nightly formatting. +//! # See the polkadot-sdk CI job that checks formatting for the current version used in +//! # polkadot-sdk. +//! extraArgs = { "+nightly-2024-01-22" }, +//! }, +//! }, +//! ``` +//! +//! For the full set of configuration options see . +//! +//! ## Cargo Usage +//! +//! ### Using `--package` (a.k.a. `-p`) +//! +//! polkadot-sdk is a monorepo containing many crates. When you run a cargo command without +//! `-p`, you will almost certainly compile crates outside of the scope you are working. +//! +//! Instead, you should identify the name of the crate you are working on by checking the `name` +//! field in the closest `Cargo.toml` file. Then, use `-p` with your cargo commands to only compile +//! that crate. +//! +//! ### `SKIP_WASM_BUILD=1` environment variable +//! +//! When cargo touches a runtime crate, by default it will also compile the WASM binary, +//! approximately doubling the compilation time. +//! +//! The WASM binary is usually not needed, especially when running `check` or `test`. To skip the +//! WASM build, set the `SKIP_WASM_BUILD` environment variable to `1`. For example: +//! `SKIP_WASM_BUILD=1 cargo check -p frame-support`. +//! +//! ### Cargo Remote +//! +//! If you have a powerful remote server available, you may consider using +//! [cargo-remote](https://github.com/sgeisler/cargo-remote) to execute cargo commands on it, +//! freeing up local resources for other tasks like `rust-analyzer`. diff --git a/polkadot/node/subsystem-bench/src/availability/mod.rs b/polkadot/node/subsystem-bench/src/availability/mod.rs new file mode 100644 index 000000000000..f9892efb3c68 --- /dev/null +++ b/polkadot/node/subsystem-bench/src/availability/mod.rs @@ -0,0 +1,660 @@ +// 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 . +use crate::{core::mock::ChainApiState, TestEnvironment}; +use av_store::NetworkAvailabilityState; +use bitvec::bitvec; +use colored::Colorize; +use itertools::Itertools; +use polkadot_availability_bitfield_distribution::BitfieldDistribution; +use polkadot_node_core_av_store::AvailabilityStoreSubsystem; +use polkadot_node_subsystem::{Overseer, OverseerConnector, SpawnGlue}; +use polkadot_node_subsystem_types::{ + messages::{AvailabilityStoreMessage, NetworkBridgeEvent}, + Span, +}; +use polkadot_overseer::Handle as OverseerHandle; +use sc_network::{request_responses::ProtocolConfig, PeerId}; +use sp_core::H256; +use std::{collections::HashMap, iter::Cycle, ops::Sub, sync::Arc, time::Instant}; + +use av_store_helpers::new_av_store; +use futures::{channel::oneshot, stream::FuturesUnordered, StreamExt}; +use polkadot_availability_distribution::{ + AvailabilityDistributionSubsystem, IncomingRequestReceivers, +}; +use polkadot_node_metrics::metrics::Metrics; + +use polkadot_availability_recovery::AvailabilityRecoverySubsystem; +use polkadot_node_primitives::{AvailableData, ErasureChunk}; + +use crate::GENESIS_HASH; +use parity_scale_codec::Encode; +use polkadot_node_network_protocol::{ + request_response::{v1::ChunkFetchingRequest, IncomingRequest, ReqProtocolNames}, + OurView, Versioned, VersionedValidationProtocol, +}; +use sc_network::request_responses::IncomingRequest as RawIncomingRequest; + +use polkadot_node_primitives::{BlockData, PoV}; +use polkadot_node_subsystem::messages::{AllMessages, AvailabilityRecoveryMessage}; + +use crate::core::{ + environment::TestEnvironmentDependencies, + mock::{ + av_store, + network_bridge::{self, MockNetworkBridgeRx, MockNetworkBridgeTx}, + runtime_api, MockAvailabilityStore, MockChainApi, MockRuntimeApi, + }, +}; + +use super::core::{configuration::TestConfiguration, mock::dummy_builder, network::*}; + +const LOG_TARGET: &str = "subsystem-bench::availability"; + +use super::{cli::TestObjective, core::mock::AlwaysSupportsParachains}; +use polkadot_node_subsystem_test_helpers::{ + derive_erasure_chunks_with_proofs_and_root, mock::new_block_import_info, +}; +use polkadot_primitives::{ + AvailabilityBitfield, BlockNumber, CandidateHash, CandidateReceipt, GroupIndex, Hash, HeadData, + Header, PersistedValidationData, Signed, SigningContext, ValidatorIndex, +}; +use polkadot_primitives_test_helpers::{dummy_candidate_receipt, dummy_hash}; +use sc_service::SpawnTaskHandle; + +mod av_store_helpers; +mod cli; +pub use cli::{DataAvailabilityReadOptions, NetworkEmulation}; + +fn build_overseer_for_availability_read( + spawn_task_handle: SpawnTaskHandle, + runtime_api: MockRuntimeApi, + av_store: MockAvailabilityStore, + network_bridge: (MockNetworkBridgeTx, MockNetworkBridgeRx), + availability_recovery: AvailabilityRecoverySubsystem, +) -> (Overseer, AlwaysSupportsParachains>, OverseerHandle) { + let overseer_connector = OverseerConnector::with_event_capacity(64000); + let dummy = dummy_builder!(spawn_task_handle); + let builder = dummy + .replace_runtime_api(|_| runtime_api) + .replace_availability_store(|_| av_store) + .replace_network_bridge_tx(|_| network_bridge.0) + .replace_network_bridge_rx(|_| network_bridge.1) + .replace_availability_recovery(|_| availability_recovery); + + let (overseer, raw_handle) = + builder.build_with_connector(overseer_connector).expect("Should not fail"); + + (overseer, OverseerHandle::new(raw_handle)) +} + +fn build_overseer_for_availability_write( + spawn_task_handle: SpawnTaskHandle, + runtime_api: MockRuntimeApi, + network_bridge: (MockNetworkBridgeTx, MockNetworkBridgeRx), + availability_distribution: AvailabilityDistributionSubsystem, + chain_api: MockChainApi, + availability_store: AvailabilityStoreSubsystem, + bitfield_distribution: BitfieldDistribution, +) -> (Overseer, AlwaysSupportsParachains>, OverseerHandle) { + let overseer_connector = OverseerConnector::with_event_capacity(64000); + let dummy = dummy_builder!(spawn_task_handle); + let builder = dummy + .replace_runtime_api(|_| runtime_api) + .replace_availability_store(|_| availability_store) + .replace_network_bridge_tx(|_| network_bridge.0) + .replace_network_bridge_rx(|_| network_bridge.1) + .replace_chain_api(|_| chain_api) + .replace_bitfield_distribution(|_| bitfield_distribution) + // This is needed to test own chunk recovery for `n_cores`. + .replace_availability_distribution(|_| availability_distribution); + + let (overseer, raw_handle) = + builder.build_with_connector(overseer_connector).expect("Should not fail"); + + (overseer, OverseerHandle::new(raw_handle)) +} + +/// Takes a test configuration and uses it to create the `TestEnvironment`. +pub fn prepare_test( + config: TestConfiguration, + state: &mut TestState, +) -> (TestEnvironment, Vec) { + prepare_test_inner(config, state, TestEnvironmentDependencies::default()) +} + +fn prepare_test_inner( + config: TestConfiguration, + state: &mut TestState, + dependencies: TestEnvironmentDependencies, +) -> (TestEnvironment, Vec) { + // Generate test authorities. + let test_authorities = config.generate_authorities(); + + let mut candidate_hashes: HashMap> = HashMap::new(); + + // Prepare per block candidates. + // Genesis block is always finalized, so we start at 1. + for block_num in 1..=config.num_blocks { + for _ in 0..config.n_cores { + candidate_hashes + .entry(Hash::repeat_byte(block_num as u8)) + .or_default() + .push(state.next_candidate().expect("Cycle iterator")) + } + + // First candidate is our backed candidate. + state.backed_candidates.push( + candidate_hashes + .get(&Hash::repeat_byte(block_num as u8)) + .expect("just inserted above") + .first() + .expect("just inserted above") + .clone(), + ); + } + + let runtime_api = runtime_api::MockRuntimeApi::new( + config.clone(), + test_authorities.clone(), + candidate_hashes, + ); + + let availability_state = NetworkAvailabilityState { + candidate_hashes: state.candidate_hashes.clone(), + available_data: state.available_data.clone(), + chunks: state.chunks.clone(), + }; + + let mut req_cfgs = Vec::new(); + + let (collation_req_receiver, collation_req_cfg) = + IncomingRequest::get_config_receiver(&ReqProtocolNames::new(GENESIS_HASH, None)); + req_cfgs.push(collation_req_cfg); + + let (pov_req_receiver, pov_req_cfg) = + IncomingRequest::get_config_receiver(&ReqProtocolNames::new(GENESIS_HASH, None)); + + let (chunk_req_receiver, chunk_req_cfg) = + IncomingRequest::get_config_receiver(&ReqProtocolNames::new(GENESIS_HASH, None)); + req_cfgs.push(pov_req_cfg); + + let (network, network_interface, network_receiver) = + new_network(&config, &dependencies, &test_authorities, vec![Arc::new(availability_state)]); + + let network_bridge_tx = network_bridge::MockNetworkBridgeTx::new( + network.clone(), + network_interface.subsystem_sender(), + ); + + let network_bridge_rx = + network_bridge::MockNetworkBridgeRx::new(network_receiver, Some(chunk_req_cfg.clone())); + + let (overseer, overseer_handle) = match &state.config().objective { + TestObjective::DataAvailabilityRead(options) => { + let use_fast_path = options.fetch_from_backers; + + let subsystem = if use_fast_path { + AvailabilityRecoverySubsystem::with_fast_path( + collation_req_receiver, + Metrics::try_register(&dependencies.registry).unwrap(), + ) + } else { + AvailabilityRecoverySubsystem::with_chunks_only( + collation_req_receiver, + Metrics::try_register(&dependencies.registry).unwrap(), + ) + }; + + // Use a mocked av-store. + let av_store = av_store::MockAvailabilityStore::new( + state.chunks.clone(), + state.candidate_hashes.clone(), + ); + + build_overseer_for_availability_read( + dependencies.task_manager.spawn_handle(), + runtime_api, + av_store, + (network_bridge_tx, network_bridge_rx), + subsystem, + ) + }, + TestObjective::DataAvailabilityWrite => { + let availability_distribution = AvailabilityDistributionSubsystem::new( + test_authorities.keyring.keystore(), + IncomingRequestReceivers { pov_req_receiver, chunk_req_receiver }, + Metrics::try_register(&dependencies.registry).unwrap(), + ); + + let block_headers = (0..=config.num_blocks) + .map(|block_number| { + ( + Hash::repeat_byte(block_number as u8), + Header { + digest: Default::default(), + number: block_number as BlockNumber, + parent_hash: Default::default(), + extrinsics_root: Default::default(), + state_root: Default::default(), + }, + ) + }) + .collect::>(); + + let chain_api_state = ChainApiState { block_headers }; + let chain_api = MockChainApi::new(chain_api_state); + let bitfield_distribution = + BitfieldDistribution::new(Metrics::try_register(&dependencies.registry).unwrap()); + build_overseer_for_availability_write( + dependencies.task_manager.spawn_handle(), + runtime_api, + (network_bridge_tx, network_bridge_rx), + availability_distribution, + chain_api, + new_av_store(&dependencies), + bitfield_distribution, + ) + }, + _ => { + unimplemented!("Invalid test objective") + }, + }; + + ( + TestEnvironment::new( + dependencies, + config, + network, + overseer, + overseer_handle, + test_authorities, + ), + req_cfgs, + ) +} + +#[derive(Clone)] +pub struct TestState { + // Full test configuration + config: TestConfiguration, + // A cycle iterator on all PoV sizes used in the test. + pov_sizes: Cycle>, + // Generated candidate receipts to be used in the test + candidates: Cycle>, + // Map from pov size to candidate index + pov_size_to_candidate: HashMap, + // Map from generated candidate hashes to candidate index in `available_data` + // and `chunks`. + candidate_hashes: HashMap, + // Per candidate index receipts. + candidate_receipt_templates: Vec, + // Per candidate index `AvailableData` + available_data: Vec, + // Per candiadte index chunks + chunks: Vec>, + // Per relay chain block - candidate backed by our backing group + backed_candidates: Vec, +} + +impl TestState { + fn config(&self) -> &TestConfiguration { + &self.config + } + + pub fn next_candidate(&mut self) -> Option { + let candidate = self.candidates.next(); + let candidate_hash = candidate.as_ref().unwrap().hash(); + gum::trace!(target: LOG_TARGET, "Next candidate selected {:?}", candidate_hash); + candidate + } + + /// Generate candidates to be used in the test. + fn generate_candidates(&mut self) { + let count = self.config.n_cores * self.config.num_blocks; + gum::info!(target: LOG_TARGET,"{}", format!("Pre-generating {} candidates.", count).bright_blue()); + + // Generate all candidates + self.candidates = (0..count) + .map(|index| { + let pov_size = self.pov_sizes.next().expect("This is a cycle; qed"); + let candidate_index = *self + .pov_size_to_candidate + .get(&pov_size) + .expect("pov_size always exists; qed"); + let mut candidate_receipt = + self.candidate_receipt_templates[candidate_index].clone(); + + // Make it unique. + candidate_receipt.descriptor.relay_parent = Hash::from_low_u64_be(index as u64); + // Store the new candidate in the state + self.candidate_hashes.insert(candidate_receipt.hash(), candidate_index); + + gum::debug!(target: LOG_TARGET, candidate_hash = ?candidate_receipt.hash(), "new candidate"); + + candidate_receipt + }) + .collect::>() + .into_iter() + .cycle(); + } + + pub fn new(config: &TestConfiguration) -> Self { + let config = config.clone(); + + let mut chunks = Vec::new(); + let mut available_data = Vec::new(); + let mut candidate_receipt_templates = Vec::new(); + let mut pov_size_to_candidate = HashMap::new(); + + // we use it for all candidates. + let persisted_validation_data = PersistedValidationData { + parent_head: HeadData(vec![7, 8, 9]), + relay_parent_number: Default::default(), + max_pov_size: 1024, + relay_parent_storage_root: Default::default(), + }; + + // For each unique pov we create a candidate receipt. + for (index, pov_size) in config.pov_sizes().iter().cloned().unique().enumerate() { + gum::info!(target: LOG_TARGET, index, pov_size, "{}", "Generating template candidate".bright_blue()); + + let mut candidate_receipt = dummy_candidate_receipt(dummy_hash()); + let pov = PoV { block_data: BlockData(vec![index as u8; pov_size]) }; + + let new_available_data = AvailableData { + validation_data: persisted_validation_data.clone(), + pov: Arc::new(pov), + }; + + let (new_chunks, erasure_root) = derive_erasure_chunks_with_proofs_and_root( + config.n_validators, + &new_available_data, + |_, _| {}, + ); + + candidate_receipt.descriptor.erasure_root = erasure_root; + + chunks.push(new_chunks); + available_data.push(new_available_data); + pov_size_to_candidate.insert(pov_size, index); + candidate_receipt_templates.push(candidate_receipt); + } + + gum::info!(target: LOG_TARGET, "{}","Created test environment.".bright_blue()); + + let mut _self = Self { + available_data, + candidate_receipt_templates, + chunks, + pov_size_to_candidate, + pov_sizes: Vec::from(config.pov_sizes()).into_iter().cycle(), + candidate_hashes: HashMap::new(), + candidates: Vec::new().into_iter().cycle(), + backed_candidates: Vec::new(), + config, + }; + + _self.generate_candidates(); + _self + } + + pub fn backed_candidates(&mut self) -> &mut Vec { + &mut self.backed_candidates + } +} + +pub async fn benchmark_availability_read(env: &mut TestEnvironment, mut state: TestState) { + let config = env.config().clone(); + + env.import_block(new_block_import_info(Hash::repeat_byte(1), 1)).await; + + let test_start = Instant::now(); + let mut batch = FuturesUnordered::new(); + let mut availability_bytes = 0u128; + + env.metrics().set_n_validators(config.n_validators); + env.metrics().set_n_cores(config.n_cores); + + for block_num in 1..=env.config().num_blocks { + gum::info!(target: LOG_TARGET, "Current block {}/{}", block_num, env.config().num_blocks); + env.metrics().set_current_block(block_num); + + let block_start_ts = Instant::now(); + for candidate_num in 0..config.n_cores as u64 { + let candidate = + state.next_candidate().expect("We always send up to n_cores*num_blocks; qed"); + let (tx, rx) = oneshot::channel(); + batch.push(rx); + + let message = AllMessages::AvailabilityRecovery( + AvailabilityRecoveryMessage::RecoverAvailableData( + candidate.clone(), + 1, + Some(GroupIndex( + candidate_num as u32 % (std::cmp::max(5, config.n_cores) / 5) as u32, + )), + tx, + ), + ); + env.send_message(message).await; + } + + gum::info!(target: LOG_TARGET, "{}", format!("{} recoveries pending", batch.len()).bright_black()); + while let Some(completed) = batch.next().await { + let available_data = completed.unwrap().unwrap(); + env.metrics().on_pov_size(available_data.encoded_size()); + availability_bytes += available_data.encoded_size() as u128; + } + + let block_time = Instant::now().sub(block_start_ts).as_millis() as u64; + env.metrics().set_block_time(block_time); + gum::info!(target: LOG_TARGET, "All work for block completed in {}", format!("{:?}ms", block_time).cyan()); + } + + let duration: u128 = test_start.elapsed().as_millis(); + let availability_bytes = availability_bytes / 1024; + gum::info!(target: LOG_TARGET, "All blocks processed in {}", format!("{:?}ms", duration).cyan()); + gum::info!(target: LOG_TARGET, + "Throughput: {}", + format!("{} KiB/block", availability_bytes / env.config().num_blocks as u128).bright_red() + ); + gum::info!(target: LOG_TARGET, + "Avg block time: {}", + format!("{} ms", test_start.elapsed().as_millis() / env.config().num_blocks as u128).red() + ); + + env.display_network_usage(); + env.display_cpu_usage(&["availability-recovery"]); + env.stop().await; +} + +pub async fn benchmark_availability_write(env: &mut TestEnvironment, mut state: TestState) { + let config = env.config().clone(); + + env.metrics().set_n_validators(config.n_validators); + env.metrics().set_n_cores(config.n_cores); + + gum::info!(target: LOG_TARGET, "Seeding availability store with candidates ..."); + for backed_candidate in state.backed_candidates().clone() { + let candidate_index = *state.candidate_hashes.get(&backed_candidate.hash()).unwrap(); + let available_data = state.available_data[candidate_index].clone(); + let (tx, rx) = oneshot::channel(); + env.send_message(AllMessages::AvailabilityStore( + AvailabilityStoreMessage::StoreAvailableData { + candidate_hash: backed_candidate.hash(), + n_validators: config.n_validators as u32, + available_data, + expected_erasure_root: backed_candidate.descriptor().erasure_root, + tx, + }, + )) + .await; + + rx.await + .unwrap() + .expect("Test candidates are stored nicely in availability store"); + } + + gum::info!(target: LOG_TARGET, "Done"); + + let test_start = Instant::now(); + + for block_num in 1..=env.config().num_blocks { + gum::info!(target: LOG_TARGET, "Current block #{}", block_num); + env.metrics().set_current_block(block_num); + + let block_start_ts = Instant::now(); + let relay_block_hash = Hash::repeat_byte(block_num as u8); + env.import_block(new_block_import_info(relay_block_hash, block_num as BlockNumber)) + .await; + + // Inform bitfield distribution about our view of current test block + let message = polkadot_node_subsystem_types::messages::BitfieldDistributionMessage::NetworkBridgeUpdate( + NetworkBridgeEvent::OurViewChange(OurView::new(vec![(relay_block_hash, Arc::new(Span::Disabled))], 0)) + ); + env.send_message(AllMessages::BitfieldDistribution(message)).await; + + let chunk_fetch_start_ts = Instant::now(); + + // Request chunks of our own backed candidate from all other validators. + let mut receivers = Vec::new(); + for index in 1..config.n_validators { + let (pending_response, pending_response_receiver) = oneshot::channel(); + + let request = RawIncomingRequest { + peer: PeerId::random(), + payload: ChunkFetchingRequest { + candidate_hash: state.backed_candidates()[block_num - 1].hash(), + index: ValidatorIndex(index as u32), + } + .encode(), + pending_response, + }; + + let peer = env + .authorities() + .validator_authority_id + .get(index) + .expect("all validators have keys"); + + if env.network().is_peer_connected(peer) && + env.network().send_request_from_peer(peer, request).is_ok() + { + receivers.push(pending_response_receiver); + } + } + + gum::info!(target: LOG_TARGET, "Waiting for all emulated peers to receive their chunk from us ..."); + for receiver in receivers.into_iter() { + let response = receiver.await.expect("Chunk is always served succesfully"); + // TODO: check if chunk is the one the peer expects to receive. + assert!(response.result.is_ok()); + } + + let chunk_fetch_duration = Instant::now().sub(chunk_fetch_start_ts).as_millis(); + + gum::info!(target: LOG_TARGET, "All chunks received in {}ms", chunk_fetch_duration); + + let signing_context = SigningContext { session_index: 0, parent_hash: relay_block_hash }; + let network = env.network().clone(); + let authorities = env.authorities().clone(); + let n_validators = config.n_validators; + + // Spawn a task that will generate `n_validator` - 1 signed bitfiends and + // send them from the emulated peers to the subsystem. + // TODO: Implement topology. + env.spawn_blocking("send-bitfields", async move { + for index in 1..n_validators { + let validator_public = + authorities.validator_public.get(index).expect("All validator keys are known"); + + // Node has all the chunks in the world. + let payload: AvailabilityBitfield = + AvailabilityBitfield(bitvec![u8, bitvec::order::Lsb0; 1u8; 32]); + // TODO(soon): Use pre-signed messages. This is quite intensive on the CPU. + let signed_bitfield = Signed::::sign( + &authorities.keyring.keystore(), + payload, + &signing_context, + ValidatorIndex(index as u32), + validator_public, + ) + .ok() + .flatten() + .expect("should be signed"); + + let from_peer = &authorities.validator_authority_id[index]; + + let message = peer_bitfield_message_v2(relay_block_hash, signed_bitfield); + + // Send the action from peer only if it is connected to our node. + if network.is_peer_connected(from_peer) { + let _ = network.send_message_from_peer(from_peer, message); + } + } + }); + + gum::info!( + "Waiting for {} bitfields to be received and processed", + config.connected_count() + ); + + // Wait for all bitfields to be processed. + env.wait_until_metric_eq( + "polkadot_parachain_received_availabilty_bitfields_total", + config.connected_count() * block_num, + ) + .await; + + gum::info!(target: LOG_TARGET, "All bitfields processed"); + + let block_time = Instant::now().sub(block_start_ts).as_millis() as u64; + env.metrics().set_block_time(block_time); + gum::info!(target: LOG_TARGET, "All work for block completed in {}", format!("{:?}ms", block_time).cyan()); + } + + let duration: u128 = test_start.elapsed().as_millis(); + gum::info!(target: LOG_TARGET, "All blocks processed in {}", format!("{:?}ms", duration).cyan()); + gum::info!(target: LOG_TARGET, + "Avg block time: {}", + format!("{} ms", test_start.elapsed().as_millis() / env.config().num_blocks as u128).red() + ); + + env.display_network_usage(); + + env.display_cpu_usage(&[ + "availability-distribution", + "bitfield-distribution", + "availability-store", + ]); + + env.stop().await; +} + +pub fn peer_bitfield_message_v2( + relay_hash: H256, + signed_bitfield: Signed, +) -> VersionedValidationProtocol { + let bitfield = polkadot_node_network_protocol::v2::BitfieldDistributionMessage::Bitfield( + relay_hash, + signed_bitfield.into(), + ); + + Versioned::V2(polkadot_node_network_protocol::v2::ValidationProtocol::BitfieldDistribution( + bitfield, + )) +} diff --git a/polkadot/node/subsystem-bench/src/core/keyring.rs b/polkadot/node/subsystem-bench/src/core/keyring.rs new file mode 100644 index 000000000000..66c7229847c3 --- /dev/null +++ b/polkadot/node/subsystem-bench/src/core/keyring.rs @@ -0,0 +1,46 @@ +// 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 . + +use polkadot_primitives::ValidatorId; +use sc_keystore::LocalKeystore; +use sp_application_crypto::AppCrypto; +use sp_core::sr25519::Public; +use sp_keystore::Keystore; +use std::sync::Arc; + +/// Set of test accounts generated and kept safe by a keystore. +#[derive(Clone)] +pub struct Keyring { + keystore: Arc, +} + +impl Default for Keyring { + fn default() -> Self { + Self { keystore: Arc::new(LocalKeystore::in_memory()) } + } +} + +impl Keyring { + pub fn sr25519_new(&self, name: String) -> Public { + self.keystore + .sr25519_generate_new(ValidatorId::ID, Some(&format!("//{}", name))) + .expect("Insert key into keystore") + } + + pub fn keystore(&self) -> Arc { + self.keystore.clone() + } +} diff --git a/polkadot/node/subsystem-bench/src/core/mock/mod.rs b/polkadot/node/subsystem-bench/src/core/mock/mod.rs new file mode 100644 index 000000000000..b67c6611e8cd --- /dev/null +++ b/polkadot/node/subsystem-bench/src/core/mock/mod.rs @@ -0,0 +1,78 @@ +// 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 . + +use polkadot_node_subsystem::HeadSupportsParachains; +use polkadot_node_subsystem_types::Hash; + +pub mod av_store; +pub mod chain_api; +pub mod dummy; +pub mod network_bridge; +pub mod runtime_api; + +pub use av_store::*; +pub use chain_api::*; +pub use runtime_api::*; + +pub struct AlwaysSupportsParachains {} +#[async_trait::async_trait] +impl HeadSupportsParachains for AlwaysSupportsParachains { + async fn head_supports_parachains(&self, _head: &Hash) -> bool { + true + } +} + +// An orchestra with dummy subsystems +macro_rules! dummy_builder { + ($spawn_task_handle: ident) => {{ + use super::core::mock::dummy::*; + + // Initialize a mock overseer. + // All subsystem except approval_voting and approval_distribution are mock subsystems. + Overseer::builder() + .approval_voting(MockApprovalVoting {}) + .approval_distribution(MockApprovalDistribution {}) + .availability_recovery(MockAvailabilityRecovery {}) + .candidate_validation(MockCandidateValidation {}) + .chain_api(MockChainApi {}) + .chain_selection(MockChainSelection {}) + .dispute_coordinator(MockDisputeCoordinator {}) + .runtime_api(MockRuntimeApi {}) + .network_bridge_tx(MockNetworkBridgeTx {}) + .availability_distribution(MockAvailabilityDistribution {}) + .availability_store(MockAvailabilityStore {}) + .pvf_checker(MockPvfChecker {}) + .candidate_backing(MockCandidateBacking {}) + .statement_distribution(MockStatementDistribution {}) + .bitfield_signing(MockBitfieldSigning {}) + .bitfield_distribution(MockBitfieldDistribution {}) + .provisioner(MockProvisioner {}) + .network_bridge_rx(MockNetworkBridgeRx {}) + .collation_generation(MockCollationGeneration {}) + .collator_protocol(MockCollatorProtocol {}) + .gossip_support(MockGossipSupport {}) + .dispute_distribution(MockDisputeDistribution {}) + .prospective_parachains(MockProspectiveParachains {}) + .activation_external_listeners(Default::default()) + .span_per_active_leaf(Default::default()) + .active_leaves(Default::default()) + .metrics(Default::default()) + .supports_parachains(AlwaysSupportsParachains {}) + .spawner(SpawnGlue($spawn_task_handle)) + }}; +} + +pub(crate) use dummy_builder; diff --git a/substrate/frame/alliance/src/mock.rs b/substrate/frame/alliance/src/mock.rs index ace5214f145f..c9e5ff84b7f5 100644 --- a/substrate/frame/alliance/src/mock.rs +++ b/substrate/frame/alliance/src/mock.rs @@ -20,7 +20,7 @@ pub use sp_core::H256; use sp_runtime::traits::Hash; pub use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, + traits::{BlakeTwo256, IdentifyAccount, Lazy, Verify}, BuildStorage, }; use sp_std::convert::{TryFrom, TryInto}; diff --git a/substrate/frame/contracts/fixtures/build.rs b/substrate/frame/contracts/fixtures/build.rs new file mode 100644 index 000000000000..12a7805294b6 --- /dev/null +++ b/substrate/frame/contracts/fixtures/build.rs @@ -0,0 +1,350 @@ +// 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. + +//! Compile contracts to wasm and RISC-V binaries. +use anyhow::{bail, Context, Result}; +use parity_wasm::elements::{deserialize_file, serialize_to_file, Internal}; +use std::{ + env, fs, + hash::Hasher, + path::{Path, PathBuf}, + process::Command, +}; +use twox_hash::XxHash32; + +/// Read the file at `path` and return its hash as a hex string. +fn file_hash(path: &Path) -> String { + let data = fs::read(path).expect("file exists; qed"); + let mut hasher = XxHash32::default(); + hasher.write(&data); + hasher.write(include_bytes!("build.rs")); + let hash = hasher.finish(); + format!("{:x}", hash) +} + +/// A contract entry. +struct Entry { + /// The path to the contract source file. + path: PathBuf, + /// The hash of the contract source file. + hash: String, +} + +impl Entry { + /// Create a new contract entry from the given path. + fn new(path: PathBuf) -> Self { + let hash = file_hash(&path); + Self { path, hash } + } + + /// Return the path to the contract source file. + fn path(&self) -> &str { + self.path.to_str().expect("path is valid unicode; qed") + } + + /// Return the name of the contract. + fn name(&self) -> &str { + self.path + .file_stem() + .expect("file exits; qed") + .to_str() + .expect("name is valid unicode; qed") + } + + /// Return whether the contract has already been compiled. + fn is_cached(&self, out_dir: &Path) -> bool { + out_dir.join(self.name()).join(&self.hash).exists() + } + + /// Update the cache file for the contract. + fn update_cache(&self, out_dir: &Path) -> Result<()> { + let cache_dir = out_dir.join(self.name()); + + // clear the cache dir if it exists + if cache_dir.exists() { + fs::remove_dir_all(&cache_dir)?; + } + + // re-populate the cache dir with the new hash + fs::create_dir_all(&cache_dir)?; + fs::write(out_dir.join(&self.hash), "")?; + Ok(()) + } + + /// Return the name of the output wasm file. + fn out_wasm_filename(&self) -> String { + format!("{}.wasm", self.name()) + } + + /// Return the name of the RISC-V polkavm file. + #[cfg(feature = "riscv")] + fn out_riscv_filename(&self) -> String { + format!("{}.polkavm", self.name()) + } +} + +/// Collect all contract entries from the given source directory. +/// Contracts that have already been compiled are filtered out. +fn collect_entries(contracts_dir: &Path, out_dir: &Path) -> Vec { + fs::read_dir(contracts_dir) + .expect("src dir exists; qed") + .filter_map(|file| { + let path = file.expect("file exists; qed").path(); + if path.extension().map_or(true, |ext| ext != "rs") { + return None + } + + let entry = Entry::new(path); + if entry.is_cached(out_dir) { + None + } else { + Some(entry) + } + }) + .collect::>() +} + +/// Create a `Cargo.toml` to compile the given contract entries. +fn create_cargo_toml<'a>( + fixtures_dir: &Path, + entries: impl Iterator, + output_dir: &Path, +) -> Result<()> { + let mut cargo_toml: toml::Value = toml::from_str(include_str!("./build/Cargo.toml"))?; + let mut set_dep = |name, path| -> Result<()> { + cargo_toml["dependencies"][name]["path"] = toml::Value::String( + fixtures_dir.join(path).canonicalize()?.to_str().unwrap().to_string(), + ); + Ok(()) + }; + set_dep("uapi", "../uapi")?; + set_dep("common", "./contracts/common")?; + + cargo_toml["bin"] = toml::Value::Array( + entries + .map(|entry| { + let name = entry.name(); + let path = entry.path(); + toml::Value::Table(toml::toml! { + name = name + path = path + }) + }) + .collect::>(), + ); + + let cargo_toml = toml::to_string_pretty(&cargo_toml)?; + fs::write(output_dir.join("Cargo.toml"), cargo_toml).map_err(Into::into) +} + +/// Invoke `cargo fmt` to check that fixtures files are formatted. +fn invoke_cargo_fmt<'a>( + config_path: &Path, + files: impl Iterator, + contract_dir: &Path, +) -> Result<()> { + // If rustfmt is not installed, skip the check. + if !Command::new("rustup") + .args(["nightly-2024-01-22", "run", "rustfmt", "--version"]) + .output() + .map_or(false, |o| o.status.success()) + { + return Ok(()) + } + + let fmt_res = Command::new("rustup") + .args(["nightly-2024-01-22", "run", "rustfmt", "--check", "--config-path"]) + .arg(config_path) + .args(files) + .output() + .expect("failed to execute process"); + + if fmt_res.status.success() { + return Ok(()) + } + + let stdout = String::from_utf8_lossy(&fmt_res.stdout); + let stderr = String::from_utf8_lossy(&fmt_res.stderr); + eprintln!("{}\n{}", stdout, stderr); + eprintln!( + "Fixtures files are not formatted.\n + Please run `rustup nightly-2024-01-22 run rustfmt --config-path {} {}/*.rs`", + config_path.display(), + contract_dir.display() + ); + + anyhow::bail!("Fixtures files are not formatted") +} + +/// Build contracts for wasm. +fn invoke_wasm_build(current_dir: &Path) -> Result<()> { + let encoded_rustflags = [ + "-Clink-arg=-zstack-size=65536", + "-Clink-arg=--import-memory", + "-Clinker-plugin-lto", + "-Ctarget-cpu=mvp", + "-Dwarnings", + ] + .join("\x1f"); + + let build_res = Command::new(env::var("CARGO")?) + .current_dir(current_dir) + .env("CARGO_TARGET_DIR", current_dir.join("target").display().to_string()) + .env("CARGO_ENCODED_RUSTFLAGS", encoded_rustflags) + .args(["build", "--release", "--target=wasm32-unknown-unknown"]) + .output() + .expect("failed to execute process"); + + if build_res.status.success() { + return Ok(()) + } + + let stderr = String::from_utf8_lossy(&build_res.stderr); + eprintln!("{}", stderr); + bail!("Failed to build wasm contracts"); +} + +/// Post-process the compiled wasm contracts. +fn post_process_wasm(input_path: &Path, output_path: &Path) -> Result<()> { + let mut module = + deserialize_file(input_path).with_context(|| format!("Failed to read {:?}", input_path))?; + if let Some(section) = module.export_section_mut() { + section.entries_mut().retain(|entry| { + matches!(entry.internal(), Internal::Function(_)) && + (entry.field() == "call" || entry.field() == "deploy") + }); + } + + serialize_to_file(output_path, module).map_err(Into::into) +} + +/// Build contracts for RISC-V. +#[cfg(feature = "riscv")] +fn invoke_riscv_build(current_dir: &Path) -> Result<()> { + let encoded_rustflags = [ + "-Crelocation-model=pie", + "-Clink-arg=--emit-relocs", + "-Clink-arg=--export-dynamic-symbol=__polkavm_symbol_export_hack__*", + ] + .join("\x1f"); + + let build_res = Command::new(env::var("CARGO")?) + .current_dir(current_dir) + .env_clear() + .env("PATH", env::var("PATH").unwrap_or_default()) + .env("CARGO_ENCODED_RUSTFLAGS", encoded_rustflags) + .env("RUSTUP_TOOLCHAIN", "rve-nightly") + .env("RUSTUP_HOME", env::var("RUSTUP_HOME").unwrap_or_default()) + .args(["build", "--release", "--target=riscv32ema-unknown-none-elf"]) + .output() + .expect("failed to execute process"); + + if build_res.status.success() { + return Ok(()) + } + + let stderr = String::from_utf8_lossy(&build_res.stderr); + + if stderr.contains("'rve-nightly' is not installed") { + eprintln!("RISC-V toolchain is not installed.\nDownload and install toolchain from https://github.com/paritytech/rustc-rv32e-toolchain."); + eprintln!("{}", stderr); + } else { + eprintln!("{}", stderr); + } + + bail!("Failed to build contracts"); +} +/// Post-process the compiled wasm contracts. +#[cfg(feature = "riscv")] +fn post_process_riscv(input_path: &Path, output_path: &Path) -> Result<()> { + let mut config = polkavm_linker::Config::default(); + config.set_strip(true); + let orig = fs::read(input_path).with_context(|| format!("Failed to read {:?}", input_path))?; + let linked = polkavm_linker::program_from_elf(config, orig.as_ref()) + .map_err(|err| anyhow::format_err!("Failed to link polkavm program: {}", err))?; + fs::write(output_path, linked.as_bytes()).map_err(Into::into) +} + +/// Write the compiled contracts to the given output directory. +fn write_output(build_dir: &Path, out_dir: &Path, entries: Vec) -> Result<()> { + for entry in entries { + let wasm_output = entry.out_wasm_filename(); + post_process_wasm( + &build_dir.join("target/wasm32-unknown-unknown/release").join(&wasm_output), + &out_dir.join(&wasm_output), + )?; + + #[cfg(feature = "riscv")] + post_process_riscv( + &build_dir.join("target/riscv32ema-unknown-none-elf/release").join(entry.name()), + &out_dir.join(entry.out_riscv_filename()), + )?; + + entry.update_cache(out_dir)?; + } + + Ok(()) +} + +/// Returns the root path of the wasm workspace. +fn find_workspace_root(current_dir: &Path) -> Option { + let mut current_dir = current_dir.to_path_buf(); + + while current_dir.parent().is_some() { + if current_dir.join("Cargo.toml").exists() { + let cargo_toml_contents = + std::fs::read_to_string(current_dir.join("Cargo.toml")).ok()?; + if cargo_toml_contents.contains("[workspace]") { + return Some(current_dir); + } + } + + current_dir.pop(); + } + + None +} + +fn main() -> Result<()> { + let fixtures_dir: PathBuf = env::var("CARGO_MANIFEST_DIR")?.into(); + let contracts_dir = fixtures_dir.join("contracts"); + let out_dir: PathBuf = env::var("OUT_DIR")?.into(); + let workspace_root = find_workspace_root(&fixtures_dir).expect("workspace root exists; qed"); + + let entries = collect_entries(&contracts_dir, &out_dir); + if entries.is_empty() { + return Ok(()) + } + + let tmp_dir = tempfile::tempdir()?; + let tmp_dir_path = tmp_dir.path(); + + create_cargo_toml(&fixtures_dir, entries.iter(), tmp_dir.path())?; + invoke_cargo_fmt( + &workspace_root.join(".rustfmt.toml"), + entries.iter().map(|entry| &entry.path as _), + &contracts_dir, + )?; + + invoke_wasm_build(tmp_dir_path)?; + + #[cfg(feature = "riscv")] + invoke_riscv_build(tmp_dir_path)?; + + write_output(tmp_dir_path, &out_dir, entries)?; + Ok(()) +} diff --git a/substrate/frame/support/procedural/src/pallet/expand/call.rs b/substrate/frame/support/procedural/src/pallet/expand/call.rs index cf302faafc78..74332ecf499e 100644 --- a/substrate/frame/support/procedural/src/pallet/expand/call.rs +++ b/substrate/frame/support/procedural/src/pallet/expand/call.rs @@ -252,6 +252,7 @@ pub fn expand_call(def: &mut Def) -> proc_macro2::TokenStream { }); quote::quote_spanned!(span => + #[doc(hidden)] mod warnings { #( #call_index_warnings @@ -261,6 +262,7 @@ pub fn expand_call(def: &mut Def) -> proc_macro2::TokenStream { )* } + #[allow(unused_imports)] #[doc(hidden)] pub mod __substrate_call_check { #[macro_export] @@ -441,6 +443,7 @@ pub fn expand_call(def: &mut Def) -> proc_macro2::TokenStream { } impl<#type_impl_gen> #pallet_ident<#type_use_gen> #where_clause { + #[allow(dead_code)] #[doc(hidden)] pub fn call_functions() -> #frame_support::__private::metadata_ir::PalletCallMetadataIR { #frame_support::__private::scale_info::meta_type::<#call_ident<#type_use_gen>>().into() diff --git a/substrate/frame/support/test/tests/construct_runtime_ui/deprecated_where_block.stderr b/substrate/frame/support/test/tests/construct_runtime_ui/deprecated_where_block.stderr index 08954bb6ab5c..09d62c8ee9e6 100644 --- a/substrate/frame/support/test/tests/construct_runtime_ui/deprecated_where_block.stderr +++ b/substrate/frame/support/test/tests/construct_runtime_ui/deprecated_where_block.stderr @@ -448,3 +448,69 @@ note: required by a bound in `Result` | pub enum Result { | ^ required by this bound in `Result` = note: this error originates in the derive macro `self::sp_api_hidden_includes_construct_runtime::hidden_include::__private::codec::Decode` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0277]: the trait bound `Runtime: Config` is not satisfied + --> tests/construct_runtime_ui/deprecated_where_block.rs:20:1 + | +20 | // construct_runtime! { +21 | || pub struct Runtime where +22 | || Block = Block, +23 | || NodeBlock = Block, +... || +27 | || } +28 | || } + | ||_- in this macro invocation +... | + | + = note: required for `Pallet` to implement `Callable` +note: required because it appears within the type `RuntimeCall` + --> tests/construct_runtime_ui/deprecated_where_block.rs:20:1 + | +20 | // construct_runtime! { +21 | || pub struct Runtime where +22 | || Block = Block, +23 | || NodeBlock = Block, +... || +27 | || } +28 | || } + | ||_- in this macro invocation +... | +note: required by a bound in `frame_support::sp_runtime::traits::Dispatchable::Config` + --> $WORKSPACE/substrate/primitives/runtime/src/traits.rs + | + | type Config; + | ^^^^^^^^^^^^ required by this bound in `Dispatchable::Config` + = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0277]: the trait bound `Runtime: Config` is not satisfied + --> tests/construct_runtime_ui/deprecated_where_block.rs:20:1 + | +20 | // construct_runtime! { +21 | || pub struct Runtime where +22 | || Block = Block, +23 | || NodeBlock = Block, +... || +27 | || } +28 | || } + | ||_- in this macro invocation +... | + | + = note: required for `Pallet` to implement `Callable` +note: required because it appears within the type `RuntimeCall` + --> tests/construct_runtime_ui/deprecated_where_block.rs:20:1 + | +20 | // construct_runtime! { +21 | || pub struct Runtime where +22 | || Block = Block, +23 | || NodeBlock = Block, +... || +27 | || } +28 | || } + | ||_- in this macro invocation +... | +note: required by a bound in `frame_support::pallet_prelude::ValidateUnsigned::Call` + --> $WORKSPACE/substrate/primitives/runtime/src/traits.rs + | + | type Call; + | ^^^^^^^^^^ required by this bound in `ValidateUnsigned::Call` + = note: this error originates in the macro `frame_support::construct_runtime` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/substrate/frame/support/test/tests/pallet_ui/default_config_with_no_default_in_system.stderr b/substrate/frame/support/test/tests/pallet_ui/default_config_with_no_default_in_system.stderr index a86fd96ea28d..5a5b48097369 100644 --- a/substrate/frame/support/test/tests/pallet_ui/default_config_with_no_default_in_system.stderr +++ b/substrate/frame/support/test/tests/pallet_ui/default_config_with_no_default_in_system.stderr @@ -2,4 +2,4 @@ error[E0220]: associated type `Block` not found for `Self` --> tests/pallet_ui/default_config_with_no_default_in_system.rs:25:31 | 25 | type MyGetParam2: Get; - | ^^^^^ there is a similarly named associated type `Block` in the trait `frame_system::Config` + | ^^^^^ there is an associated type `Block` in the trait `frame_system::Config` diff --git a/substrate/frame/support/test/tests/pallet_ui/error_does_not_derive_pallet_error.rs b/substrate/frame/support/test/tests/pallet_ui/error_does_not_derive_pallet_error.rs index 2e92f5358eab..3c6730471cb5 100644 --- a/substrate/frame/support/test/tests/pallet_ui/error_does_not_derive_pallet_error.rs +++ b/substrate/frame/support/test/tests/pallet_ui/error_does_not_derive_pallet_error.rs @@ -16,6 +16,7 @@ // limitations under the License. #[frame_support::pallet] +#[allow(unused_imports)] mod pallet { #[pallet::config] pub trait Config: frame_system::Config {} @@ -32,5 +33,4 @@ mod pallet { #[derive(scale_info::TypeInfo, codec::Encode, codec::Decode)] enum MyError {} -fn main() { -} +fn main() {} diff --git a/substrate/frame/support/test/tests/pallet_ui/error_does_not_derive_pallet_error.stderr b/substrate/frame/support/test/tests/pallet_ui/error_does_not_derive_pallet_error.stderr index ea1d0ed99cd3..f8277d8d8404 100644 --- a/substrate/frame/support/test/tests/pallet_ui/error_does_not_derive_pallet_error.stderr +++ b/substrate/frame/support/test/tests/pallet_ui/error_does_not_derive_pallet_error.stderr @@ -1,8 +1,8 @@ error[E0277]: the trait bound `MyError: PalletError` is not satisfied - --> tests/pallet_ui/error_does_not_derive_pallet_error.rs:18:1 + --> tests/pallet_ui/error_does_not_derive_pallet_error.rs:29:15 | -18 | #[frame_support::pallet] - | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `PalletError` is not implemented for `MyError` +29 | CustomError(crate::MyError), + | ^^^^^^^^^^^^^^ the trait `PalletError` is not implemented for `MyError` | = help: the following other types implement trait `PalletError`: bool diff --git a/substrate/frame/support/test/tests/pallet_ui/event_field_not_member.rs b/substrate/frame/support/test/tests/pallet_ui/event_field_not_member.rs index a7e6d213318f..33603d6f559a 100644 --- a/substrate/frame/support/test/tests/pallet_ui/event_field_not_member.rs +++ b/substrate/frame/support/test/tests/pallet_ui/event_field_not_member.rs @@ -16,6 +16,7 @@ // limitations under the License. #[frame_support::pallet] +#[allow(unused_imports)] mod pallet { use frame_support::pallet_prelude::{Hooks, IsType}; use frame_system::pallet_prelude::BlockNumberFor; @@ -41,5 +42,4 @@ mod pallet { } } -fn main() { -} +fn main() {} diff --git a/substrate/frame/support/test/tests/pallet_ui/event_field_not_member.stderr b/substrate/frame/support/test/tests/pallet_ui/event_field_not_member.stderr index fc4a33b72150..44660d269060 100644 --- a/substrate/frame/support/test/tests/pallet_ui/event_field_not_member.stderr +++ b/substrate/frame/support/test/tests/pallet_ui/event_field_not_member.stderr @@ -1,19 +1,19 @@ error[E0277]: the trait bound `::Bar: Clone` is not satisfied - --> tests/pallet_ui/event_field_not_member.rs:40:7 + --> tests/pallet_ui/event_field_not_member.rs:41:7 | -40 | B { b: T::Bar }, +41 | B { b: T::Bar }, | ^ the trait `Clone` is not implemented for `::Bar` error[E0369]: binary operation `==` cannot be applied to type `&::Bar` - --> tests/pallet_ui/event_field_not_member.rs:40:7 + --> tests/pallet_ui/event_field_not_member.rs:41:7 | -40 | B { b: T::Bar }, +41 | B { b: T::Bar }, | ^ error[E0277]: `::Bar` doesn't implement `std::fmt::Debug` - --> tests/pallet_ui/event_field_not_member.rs:40:7 + --> tests/pallet_ui/event_field_not_member.rs:41:7 | -40 | B { b: T::Bar }, +41 | B { b: T::Bar }, | ^ `::Bar` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug` | = help: the trait `std::fmt::Debug` is not implemented for `::Bar` diff --git a/substrate/frame/support/test/tests/pallet_ui/pass/error_nested_types.rs b/substrate/frame/support/test/tests/pallet_ui/pass/error_nested_types.rs index 2e0df1ac398a..0e0dc5890519 100644 --- a/substrate/frame/support/test/tests/pallet_ui/pass/error_nested_types.rs +++ b/substrate/frame/support/test/tests/pallet_ui/pass/error_nested_types.rs @@ -19,6 +19,7 @@ use codec::{Decode, Encode}; use frame_support::PalletError; #[frame_support::pallet] +#[allow(unused_imports)] mod pallet { #[pallet::config] pub trait Config: frame_system::Config {} @@ -34,25 +35,24 @@ mod pallet { #[derive(Encode, Decode, PalletError, scale_info::TypeInfo)] pub enum MyError { - Foo, - Bar, - Baz(NestedError), - Struct(MyStruct), - Wrapper(Wrapper), + Foo, + Bar, + Baz(NestedError), + Struct(MyStruct), + Wrapper(Wrapper), } #[derive(Encode, Decode, PalletError, scale_info::TypeInfo)] pub enum NestedError { - Quux + Quux, } #[derive(Encode, Decode, PalletError, scale_info::TypeInfo)] pub struct MyStruct { - field: u8, + field: u8, } #[derive(Encode, Decode, PalletError, scale_info::TypeInfo)] pub struct Wrapper(bool); -fn main() { -} +fn main() {} diff --git a/substrate/frame/support/test/tests/pallet_ui/pass/event_type_bound_system_config_assoc_type.rs b/substrate/frame/support/test/tests/pallet_ui/pass/event_type_bound_system_config_assoc_type.rs index 0a70c4a5e68a..d84d320b0b24 100644 --- a/substrate/frame/support/test/tests/pallet_ui/pass/event_type_bound_system_config_assoc_type.rs +++ b/substrate/frame/support/test/tests/pallet_ui/pass/event_type_bound_system_config_assoc_type.rs @@ -16,6 +16,7 @@ // limitations under the License. #[frame_support::pallet] +#[allow(unused_imports)] mod pallet { use frame_support::pallet_prelude::{Hooks, IsType}; use frame_system::pallet_prelude::BlockNumberFor; diff --git a/substrate/frame/support/test/tests/pallet_ui/storage_result_query_missing_generics.rs b/substrate/frame/support/test/tests/pallet_ui/storage_result_query_missing_generics.rs index 4171596ddde7..60f8b9a0cad8 100644 --- a/substrate/frame/support/test/tests/pallet_ui/storage_result_query_missing_generics.rs +++ b/substrate/frame/support/test/tests/pallet_ui/storage_result_query_missing_generics.rs @@ -16,6 +16,7 @@ // limitations under the License. #[frame_support::pallet] +#[allow(unused_imports)] mod pallet { use frame_support::pallet_prelude::*; @@ -34,5 +35,4 @@ mod pallet { type Foo = StorageValue<_, u8, ResultQuery>; } -fn main() { -} +fn main() {} diff --git a/substrate/frame/support/test/tests/pallet_ui/storage_result_query_missing_generics.stderr b/substrate/frame/support/test/tests/pallet_ui/storage_result_query_missing_generics.stderr index 7ca7ec8bbb7d..af8ff50bf421 100644 --- a/substrate/frame/support/test/tests/pallet_ui/storage_result_query_missing_generics.stderr +++ b/substrate/frame/support/test/tests/pallet_ui/storage_result_query_missing_generics.stderr @@ -1,15 +1,15 @@ error[E0107]: missing generics for enum `pallet::Error` - --> tests/pallet_ui/storage_result_query_missing_generics.rs:34:56 + --> tests/pallet_ui/storage_result_query_missing_generics.rs:35:56 | -34 | type Foo = StorageValue<_, u8, ResultQuery>; +35 | type Foo = StorageValue<_, u8, ResultQuery>; | ^^^^^ expected 1 generic argument | note: enum defined here, with 1 generic parameter: `T` - --> tests/pallet_ui/storage_result_query_missing_generics.rs:29:11 + --> tests/pallet_ui/storage_result_query_missing_generics.rs:30:11 | -29 | pub enum Error { +30 | pub enum Error { | ^^^^^ - help: add missing generic argument | -34 | type Foo = StorageValue<_, u8, ResultQuery::NonExistentValue>>; +35 | type Foo = StorageValue<_, u8, ResultQuery::NonExistentValue>>; | +++ diff --git a/substrate/primitives/api/test/tests/ui/impl_two_traits_with_same_name.rs b/substrate/primitives/api/test/tests/ui/impl_two_traits_with_same_name.rs index 4647a78809ab..e6533b4ccda6 100644 --- a/substrate/primitives/api/test/tests/ui/impl_two_traits_with_same_name.rs +++ b/substrate/primitives/api/test/tests/ui/impl_two_traits_with_same_name.rs @@ -25,6 +25,7 @@ sp_api::decl_runtime_apis! { } } +#[allow(unused_imports)] mod second { sp_api::decl_runtime_apis! { pub trait Api { diff --git a/substrate/primitives/api/test/tests/ui/impl_two_traits_with_same_name.stderr b/substrate/primitives/api/test/tests/ui/impl_two_traits_with_same_name.stderr index 2197bbc99cfb..c401c7076e5c 100644 --- a/substrate/primitives/api/test/tests/ui/impl_two_traits_with_same_name.stderr +++ b/substrate/primitives/api/test/tests/ui/impl_two_traits_with_same_name.stderr @@ -1,11 +1,11 @@ error: Two traits with the same name detected! The trait name is used to generate its ID. Please rename one trait at the declaration! - --> tests/ui/impl_two_traits_with_same_name.rs:41:15 + --> tests/ui/impl_two_traits_with_same_name.rs:42:15 | -41 | impl second::Api for Runtime { +42 | impl second::Api for Runtime { | ^^^ error: First trait implementation. - --> tests/ui/impl_two_traits_with_same_name.rs:37:13 + --> tests/ui/impl_two_traits_with_same_name.rs:38:13 | -37 | impl self::Api for Runtime { +38 | impl self::Api for Runtime { | ^^^ From 9e4b9ccfd9fb1324f7a8e3fe071fbd7b1e33bcf5 Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Mon, 5 Feb 2024 13:16:36 +0100 Subject: [PATCH 15/18] Fixes --- .../parachain/pallets/system/src/lib.rs | 685 ------------------ .../development_environment_advice.rs | 113 --- .../subsystem-bench/src/availability/mod.rs | 660 ----------------- .../node/subsystem-bench/src/core/keyring.rs | 46 -- .../node/subsystem-bench/src/core/mock/mod.rs | 78 -- substrate/frame/contracts/fixtures/build.rs | 350 --------- 6 files changed, 1932 deletions(-) delete mode 100644 bridges/snowbridge/parachain/pallets/system/src/lib.rs delete mode 100644 docs/sdk/src/reference_docs/development_environment_advice.rs delete mode 100644 polkadot/node/subsystem-bench/src/availability/mod.rs delete mode 100644 polkadot/node/subsystem-bench/src/core/keyring.rs delete mode 100644 polkadot/node/subsystem-bench/src/core/mock/mod.rs delete mode 100644 substrate/frame/contracts/fixtures/build.rs diff --git a/bridges/snowbridge/parachain/pallets/system/src/lib.rs b/bridges/snowbridge/parachain/pallets/system/src/lib.rs deleted file mode 100644 index b7f38fb753d3..000000000000 --- a/bridges/snowbridge/parachain/pallets/system/src/lib.rs +++ /dev/null @@ -1,685 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2023 Snowfork -//! Governance API for controlling the Ethereum side of the bridge -//! -//! # Extrinsics -//! -//! ## Agents -//! -//! Agents are smart contracts on Ethereum that act as proxies for consensus systems on Polkadot -//! networks. -//! -//! * [`Call::create_agent`]: Create agent for a sibling parachain -//! * [`Call::transfer_native_from_agent`]: Withdraw ether from an agent -//! -//! The `create_agent` extrinsic should be called via an XCM `Transact` instruction from the sibling -//! parachain. -//! -//! ## Channels -//! -//! Each sibling parachain has its own dedicated messaging channel for sending and receiving -//! messages. As a prerequisite to creating a channel, the sibling should have already created -//! an agent using the `create_agent` extrinsic. -//! -//! * [`Call::create_channel`]: Create channel for a sibling -//! * [`Call::update_channel`]: Update a channel for a sibling -//! -//! ## Governance -//! -//! Only Polkadot governance itself can call these extrinsics. Delivery fees are waived. -//! -//! * [`Call::upgrade`]`: Upgrade the gateway contract -//! * [`Call::set_operating_mode`]: Update the operating mode of the gateway contract -//! * [`Call::force_update_channel`]: Allow root to update a channel for a sibling -//! * [`Call::force_transfer_native_from_agent`]: Allow root to withdraw ether from an agent -//! -//! Typically, Polkadot governance will use the `force_transfer_native_from_agent` and -//! `force_update_channel` and extrinsics to manage agents and channels for system parachains. -#![cfg_attr(not(feature = "std"), no_std)] - -pub use pallet::*; - -#[cfg(test)] -mod mock; - -#[cfg(test)] -mod tests; - -#[cfg(feature = "runtime-benchmarks")] -mod benchmarking; -pub mod migration; - -pub mod api; -pub mod weights; -pub use weights::*; - -use frame_support::{ - pallet_prelude::*, - traits::{ - fungible::{Inspect, Mutate}, - tokens::Preservation, - Contains, EnsureOrigin, - }, -}; -use frame_system::pallet_prelude::*; -use snowbridge_core::{ - meth, - outbound::{Command, Initializer, Message, OperatingMode, SendError, SendMessage}, - sibling_sovereign_account, AgentId, Channel, ChannelId, ParaId, - PricingParameters as PricingParametersRecord, PRIMARY_GOVERNANCE_CHANNEL, - SECONDARY_GOVERNANCE_CHANNEL, -}; -use sp_core::{RuntimeDebug, H160, H256}; -use sp_io::hashing::blake2_256; -use sp_runtime::{traits::BadOrigin, DispatchError, SaturatedConversion}; -use sp_std::prelude::*; -use xcm::prelude::*; -use xcm_executor::traits::ConvertLocation; - -#[cfg(feature = "runtime-benchmarks")] -use frame_support::traits::OriginTrait; - -pub type BalanceOf = - <::Token as Inspect<::AccountId>>::Balance; -pub type AccountIdOf = ::AccountId; -pub type PricingParametersOf = PricingParametersRecord>; - -/// Ensure origin location is a sibling -fn ensure_sibling(location: &Location) -> Result<(ParaId, H256), DispatchError> -where - T: Config, -{ - match location.unpack() { - (1, [Parachain(para_id)]) => { - let agent_id = agent_id_of::(location)?; - Ok(((*para_id).into(), agent_id)) - }, - _ => Err(BadOrigin.into()), - } -} - -/// Hash the location to produce an agent id -fn agent_id_of(location: &Location) -> Result { - T::AgentIdOf::convert_location(location).ok_or(Error::::LocationConversionFailed.into()) -} - -#[cfg(feature = "runtime-benchmarks")] -pub trait BenchmarkHelper -where - O: OriginTrait, -{ - fn make_xcm_origin(location: Location) -> O; -} - -/// Whether a fee should be withdrawn to an account for sending an outbound message -#[derive(Clone, PartialEq, RuntimeDebug)] -pub enum PaysFee -where - T: Config, -{ - /// Fully charge includes (local + remote fee) - Yes(AccountIdOf), - /// Partially charge includes local fee only - Partial(AccountIdOf), - /// No charge - No, -} - -#[frame_support::pallet] -pub mod pallet { - use snowbridge_core::StaticLookup; - use sp_core::U256; - - use super::*; - - #[pallet::pallet] - pub struct Pallet(_); - - #[pallet::config] - pub trait Config: frame_system::Config { - type RuntimeEvent: From> + IsType<::RuntimeEvent>; - - /// Send messages to Ethereum - type OutboundQueue: SendMessage>; - - /// Origin check for XCM locations that can create agents - type SiblingOrigin: EnsureOrigin; - - /// Converts Location to AgentId - type AgentIdOf: ConvertLocation; - - /// Token reserved for control operations - type Token: Mutate; - - /// TreasuryAccount to collect fees - #[pallet::constant] - type TreasuryAccount: Get; - - /// Number of decimal places of local currency - type DefaultPricingParameters: Get>; - - /// Cost of delivering a message from Ethereum - type InboundDeliveryCost: Get>; - - type WeightInfo: WeightInfo; - - #[cfg(feature = "runtime-benchmarks")] - type Helper: BenchmarkHelper; - } - - #[pallet::event] - #[pallet::generate_deposit(pub(super) fn deposit_event)] - pub enum Event { - /// An Upgrade message was sent to the Gateway - Upgrade { - impl_address: H160, - impl_code_hash: H256, - initializer_params_hash: Option, - }, - /// An CreateAgent message was sent to the Gateway - CreateAgent { - location: Box, - agent_id: AgentId, - }, - /// An CreateChannel message was sent to the Gateway - CreateChannel { - channel_id: ChannelId, - agent_id: AgentId, - }, - /// An UpdateChannel message was sent to the Gateway - UpdateChannel { - channel_id: ChannelId, - mode: OperatingMode, - }, - /// An SetOperatingMode message was sent to the Gateway - SetOperatingMode { - mode: OperatingMode, - }, - /// An TransferNativeFromAgent message was sent to the Gateway - TransferNativeFromAgent { - agent_id: AgentId, - recipient: H160, - amount: u128, - }, - /// A SetTokenTransferFees message was sent to the Gateway - SetTokenTransferFees { - create_asset_xcm: u128, - transfer_asset_xcm: u128, - register_token: U256, - }, - PricingParametersChanged { - params: PricingParametersOf, - }, - } - - #[pallet::error] - pub enum Error { - LocationConversionFailed, - AgentAlreadyCreated, - NoAgent, - ChannelAlreadyCreated, - NoChannel, - UnsupportedLocationVersion, - InvalidLocation, - Send(SendError), - InvalidTokenTransferFees, - InvalidPricingParameters, - InvalidUpgradeParameters, - } - - /// The set of registered agents - #[pallet::storage] - #[pallet::getter(fn agents)] - pub type Agents = StorageMap<_, Twox64Concat, AgentId, (), OptionQuery>; - - /// The set of registered channels - #[pallet::storage] - #[pallet::getter(fn channels)] - pub type Channels = StorageMap<_, Twox64Concat, ChannelId, Channel, OptionQuery>; - - #[pallet::storage] - #[pallet::getter(fn parameters)] - pub type PricingParameters = - StorageValue<_, PricingParametersOf, ValueQuery, T::DefaultPricingParameters>; - - #[pallet::genesis_config] - #[derive(frame_support::DefaultNoBound)] - pub struct GenesisConfig { - // Own parachain id - pub para_id: ParaId, - // AssetHub's parachain id - pub asset_hub_para_id: ParaId, - #[serde(skip)] - pub _config: PhantomData, - } - - #[pallet::genesis_build] - impl BuildGenesisConfig for GenesisConfig { - fn build(&self) { - Pallet::::initialize(self.para_id, self.asset_hub_para_id).expect("infallible; qed"); - } - } - - #[pallet::call] - impl Pallet { - /// Sends command to the Gateway contract to upgrade itself with a new implementation - /// contract - /// - /// Fee required: No - /// - /// - `origin`: Must be `Root`. - /// - `impl_address`: The address of the implementation contract. - /// - `impl_code_hash`: The codehash of the implementation contract. - /// - `initializer`: Optionally call an initializer on the implementation contract. - #[pallet::call_index(0)] - #[pallet::weight((T::WeightInfo::upgrade(), DispatchClass::Operational))] - pub fn upgrade( - origin: OriginFor, - impl_address: H160, - impl_code_hash: H256, - initializer: Option, - ) -> DispatchResult { - ensure_root(origin)?; - - ensure!( - !impl_address.eq(&H160::zero()) && !impl_code_hash.eq(&H256::zero()), - Error::::InvalidUpgradeParameters - ); - - let initializer_params_hash: Option = - initializer.as_ref().map(|i| H256::from(blake2_256(i.params.as_ref()))); - let command = Command::Upgrade { impl_address, impl_code_hash, initializer }; - Self::send(PRIMARY_GOVERNANCE_CHANNEL, command, PaysFee::::No)?; - - Self::deposit_event(Event::::Upgrade { - impl_address, - impl_code_hash, - initializer_params_hash, - }); - Ok(()) - } - - /// Sends a message to the Gateway contract to change its operating mode - /// - /// Fee required: No - /// - /// - `origin`: Must be `Location` - #[pallet::call_index(1)] - #[pallet::weight((T::WeightInfo::set_operating_mode(), DispatchClass::Operational))] - pub fn set_operating_mode(origin: OriginFor, mode: OperatingMode) -> DispatchResult { - ensure_root(origin)?; - - let command = Command::SetOperatingMode { mode }; - Self::send(PRIMARY_GOVERNANCE_CHANNEL, command, PaysFee::::No)?; - - Self::deposit_event(Event::::SetOperatingMode { mode }); - Ok(()) - } - - /// Set pricing parameters on both sides of the bridge - /// - /// Fee required: No - /// - /// - `origin`: Must be root - #[pallet::call_index(2)] - #[pallet::weight((T::WeightInfo::set_pricing_parameters(), DispatchClass::Operational))] - pub fn set_pricing_parameters( - origin: OriginFor, - params: PricingParametersOf, - ) -> DispatchResult { - ensure_root(origin)?; - params.validate().map_err(|_| Error::::InvalidPricingParameters)?; - PricingParameters::::put(params.clone()); - - let command = Command::SetPricingParameters { - exchange_rate: params.exchange_rate.into(), - delivery_cost: T::InboundDeliveryCost::get().saturated_into::(), - }; - Self::send(PRIMARY_GOVERNANCE_CHANNEL, command, PaysFee::::No)?; - - Self::deposit_event(Event::PricingParametersChanged { params }); - Ok(()) - } - - /// Sends a command to the Gateway contract to instantiate a new agent contract representing - /// `origin`. - /// - /// Fee required: Yes - /// - /// - `origin`: Must be `Location` of a sibling parachain - #[pallet::call_index(3)] - #[pallet::weight(T::WeightInfo::create_agent())] - pub fn create_agent(origin: OriginFor) -> DispatchResult { - let origin_location: Location = T::SiblingOrigin::ensure_origin(origin)?; - - // Ensure that origin location is some consensus system on a sibling parachain - let (para_id, agent_id) = ensure_sibling::(&origin_location)?; - - // Record the agent id or fail if it has already been created - ensure!(!Agents::::contains_key(agent_id), Error::::AgentAlreadyCreated); - Agents::::insert(agent_id, ()); - - let command = Command::CreateAgent { agent_id }; - let pays_fee = PaysFee::::Yes(sibling_sovereign_account::(para_id)); - Self::send(SECONDARY_GOVERNANCE_CHANNEL, command, pays_fee)?; - - Self::deposit_event(Event::::CreateAgent { - location: Box::new(origin_location), - agent_id, - }); - Ok(()) - } - - /// Sends a message to the Gateway contract to create a new channel representing `origin` - /// - /// Fee required: Yes - /// - /// This extrinsic is permissionless, so a fee is charged to prevent spamming and pay - /// for execution costs on the remote side. - /// - /// The message is sent over the bridge on BridgeHub's own channel to the Gateway. - /// - /// - `origin`: Must be `Location` - /// - `mode`: Initial operating mode of the channel - #[pallet::call_index(4)] - #[pallet::weight(T::WeightInfo::create_channel())] - pub fn create_channel(origin: OriginFor, mode: OperatingMode) -> DispatchResult { - let origin_location: Location = T::SiblingOrigin::ensure_origin(origin)?; - - // Ensure that origin location is a sibling parachain - let (para_id, agent_id) = ensure_sibling::(&origin_location)?; - - let channel_id: ChannelId = para_id.into(); - - ensure!(Agents::::contains_key(agent_id), Error::::NoAgent); - ensure!(!Channels::::contains_key(channel_id), Error::::ChannelAlreadyCreated); - - let channel = Channel { agent_id, para_id }; - Channels::::insert(channel_id, channel); - - let command = Command::CreateChannel { channel_id, agent_id, mode }; - let pays_fee = PaysFee::::Yes(sibling_sovereign_account::(para_id)); - Self::send(SECONDARY_GOVERNANCE_CHANNEL, command, pays_fee)?; - - Self::deposit_event(Event::::CreateChannel { channel_id, agent_id }); - Ok(()) - } - - /// Sends a message to the Gateway contract to update a channel configuration - /// - /// The origin must already have a channel initialized, as this message is sent over it. - /// - /// A partial fee will be charged for local processing only. - /// - /// - `origin`: Must be `Location` - /// - `mode`: Initial operating mode of the channel - #[pallet::call_index(5)] - #[pallet::weight(T::WeightInfo::update_channel())] - pub fn update_channel(origin: OriginFor, mode: OperatingMode) -> DispatchResult { - let origin_location: Location = T::SiblingOrigin::ensure_origin(origin)?; - - // Ensure that origin location is a sibling parachain - let (para_id, _) = ensure_sibling::(&origin_location)?; - - let channel_id: ChannelId = para_id.into(); - - ensure!(Channels::::contains_key(channel_id), Error::::NoChannel); - - let command = Command::UpdateChannel { channel_id, mode }; - let pays_fee = PaysFee::::Partial(sibling_sovereign_account::(para_id)); - - // Parachains send the update message on their own channel - Self::send(channel_id, command, pays_fee)?; - - Self::deposit_event(Event::::UpdateChannel { channel_id, mode }); - Ok(()) - } - - /// Sends a message to the Gateway contract to update an arbitrary channel - /// - /// Fee required: No - /// - /// - `origin`: Must be root - /// - `channel_id`: ID of channel - /// - `mode`: Initial operating mode of the channel - /// - `outbound_fee`: Fee charged to users for sending outbound messages to Polkadot - #[pallet::call_index(6)] - #[pallet::weight(T::WeightInfo::force_update_channel())] - pub fn force_update_channel( - origin: OriginFor, - channel_id: ChannelId, - mode: OperatingMode, - ) -> DispatchResult { - ensure_root(origin)?; - - ensure!(Channels::::contains_key(channel_id), Error::::NoChannel); - - let command = Command::UpdateChannel { channel_id, mode }; - Self::send(PRIMARY_GOVERNANCE_CHANNEL, command, PaysFee::::No)?; - - Self::deposit_event(Event::::UpdateChannel { channel_id, mode }); - Ok(()) - } - - /// Sends a message to the Gateway contract to transfer ether from an agent to `recipient`. - /// - /// A partial fee will be charged for local processing only. - /// - /// - `origin`: Must be `Location` - #[pallet::call_index(7)] - #[pallet::weight(T::WeightInfo::transfer_native_from_agent())] - pub fn transfer_native_from_agent( - origin: OriginFor, - recipient: H160, - amount: u128, - ) -> DispatchResult { - let origin_location: Location = T::SiblingOrigin::ensure_origin(origin)?; - - // Ensure that origin location is some consensus system on a sibling parachain - let (para_id, agent_id) = ensure_sibling::(&origin_location)?; - - // Since the origin is also the owner of the channel, they only need to pay - // the local processing fee. - let pays_fee = PaysFee::::Partial(sibling_sovereign_account::(para_id)); - - Self::do_transfer_native_from_agent( - agent_id, - para_id.into(), - recipient, - amount, - pays_fee, - ) - } - - /// Sends a message to the Gateway contract to transfer ether from an agent to `recipient`. - /// - /// Privileged. Can only be called by root. - /// - /// Fee required: No - /// - /// - `origin`: Must be root - /// - `location`: Location used to resolve the agent - /// - `recipient`: Recipient of funds - /// - `amount`: Amount to transfer - #[pallet::call_index(8)] - #[pallet::weight(T::WeightInfo::force_transfer_native_from_agent())] - pub fn force_transfer_native_from_agent( - origin: OriginFor, - location: Box, - recipient: H160, - amount: u128, - ) -> DispatchResult { - ensure_root(origin)?; - - // Ensure that location is some consensus system on a sibling parachain - let location: Location = - (*location).try_into().map_err(|_| Error::::UnsupportedLocationVersion)?; - let (_, agent_id) = - ensure_sibling::(&location).map_err(|_| Error::::InvalidLocation)?; - - let pays_fee = PaysFee::::No; - - Self::do_transfer_native_from_agent( - agent_id, - PRIMARY_GOVERNANCE_CHANNEL, - recipient, - amount, - pays_fee, - ) - } - - /// Sends a message to the Gateway contract to update fee related parameters for - /// token transfers. - /// - /// Privileged. Can only be called by root. - /// - /// Fee required: No - /// - /// - `origin`: Must be root - /// - `create_asset_xcm`: The XCM execution cost for creating a new asset class on AssetHub, - /// in DOT - /// - `transfer_asset_xcm`: The XCM execution cost for performing a reserve transfer on - /// AssetHub, in DOT - /// - `register_token`: The Ether fee for registering a new token, to discourage spamming - #[pallet::call_index(9)] - #[pallet::weight((T::WeightInfo::set_token_transfer_fees(), DispatchClass::Operational))] - pub fn set_token_transfer_fees( - origin: OriginFor, - create_asset_xcm: u128, - transfer_asset_xcm: u128, - register_token: U256, - ) -> DispatchResult { - ensure_root(origin)?; - - // Basic validation of new costs. Particularly for token registration, we want to ensure - // its relatively expensive to discourage spamming. Like at least 100 USD. - ensure!( - create_asset_xcm > 0 && transfer_asset_xcm > 0 && register_token > meth(100), - Error::::InvalidTokenTransferFees - ); - - let command = Command::SetTokenTransferFees { - create_asset_xcm, - transfer_asset_xcm, - register_token, - }; - Self::send(PRIMARY_GOVERNANCE_CHANNEL, command, PaysFee::::No)?; - - Self::deposit_event(Event::::SetTokenTransferFees { - create_asset_xcm, - transfer_asset_xcm, - register_token, - }); - Ok(()) - } - } - - impl Pallet { - /// Send `command` to the Gateway on the Channel identified by `channel_id` - fn send(channel_id: ChannelId, command: Command, pays_fee: PaysFee) -> DispatchResult { - let message = Message { id: None, channel_id, command }; - let (ticket, fee) = - T::OutboundQueue::validate(&message).map_err(|err| Error::::Send(err))?; - - let payment = match pays_fee { - PaysFee::Yes(account) => Some((account, fee.total())), - PaysFee::Partial(account) => Some((account, fee.local)), - PaysFee::No => None, - }; - - if let Some((payer, fee)) = payment { - T::Token::transfer( - &payer, - &T::TreasuryAccount::get(), - fee, - Preservation::Preserve, - )?; - } - - T::OutboundQueue::deliver(ticket).map_err(|err| Error::::Send(err))?; - Ok(()) - } - - /// Issue a `Command::TransferNativeFromAgent` command. The command will be sent on the - /// channel `channel_id` - pub fn do_transfer_native_from_agent( - agent_id: H256, - channel_id: ChannelId, - recipient: H160, - amount: u128, - pays_fee: PaysFee, - ) -> DispatchResult { - ensure!(Agents::::contains_key(agent_id), Error::::NoAgent); - - let command = Command::TransferNativeFromAgent { agent_id, recipient, amount }; - Self::send(channel_id, command, pays_fee)?; - - Self::deposit_event(Event::::TransferNativeFromAgent { - agent_id, - recipient, - amount, - }); - Ok(()) - } - - /// Initializes agents and channels. - pub fn initialize(para_id: ParaId, asset_hub_para_id: ParaId) -> Result<(), DispatchError> { - // Asset Hub - let asset_hub_location: Location = - ParentThen(Parachain(asset_hub_para_id.into()).into()).into(); - let asset_hub_agent_id = agent_id_of::(&asset_hub_location)?; - let asset_hub_channel_id: ChannelId = asset_hub_para_id.into(); - Agents::::insert(asset_hub_agent_id, ()); - Channels::::insert( - asset_hub_channel_id, - Channel { agent_id: asset_hub_agent_id, para_id: asset_hub_para_id }, - ); - - // Governance channels - let bridge_hub_agent_id = agent_id_of::(&Location::here())?; - // Agent for BridgeHub - Agents::::insert(bridge_hub_agent_id, ()); - - // Primary governance channel - Channels::::insert( - PRIMARY_GOVERNANCE_CHANNEL, - Channel { agent_id: bridge_hub_agent_id, para_id }, - ); - - // Secondary governance channel - Channels::::insert( - SECONDARY_GOVERNANCE_CHANNEL, - Channel { agent_id: bridge_hub_agent_id, para_id }, - ); - - Ok(()) - } - - /// Checks if the pallet has been initialized. - pub(crate) fn is_initialized() -> bool { - let primary_exists = Channels::::contains_key(PRIMARY_GOVERNANCE_CHANNEL); - let secondary_exists = Channels::::contains_key(SECONDARY_GOVERNANCE_CHANNEL); - primary_exists && secondary_exists - } - } - - impl StaticLookup for Pallet { - type Source = ChannelId; - type Target = Channel; - fn lookup(channel_id: Self::Source) -> Option { - Channels::::get(channel_id) - } - } - - impl Contains for Pallet { - fn contains(channel_id: &ChannelId) -> bool { - Channels::::get(channel_id).is_some() - } - } - - impl Get> for Pallet { - fn get() -> PricingParametersOf { - PricingParameters::::get() - } - } -} diff --git a/docs/sdk/src/reference_docs/development_environment_advice.rs b/docs/sdk/src/reference_docs/development_environment_advice.rs deleted file mode 100644 index 431769597936..000000000000 --- a/docs/sdk/src/reference_docs/development_environment_advice.rs +++ /dev/null @@ -1,113 +0,0 @@ -//! # Development Environment Advice -//! -//! Large Rust projects are known for sometimes long compile times and sluggish dev tooling, and -//! polkadot-sdk is no exception. -//! -//! This page contains some advice to improve your workflow when using common tooling. -//! -//! ## Rust Analyzer Configuration -//! -//! [Rust Analyzer](https://rust-analyzer.github.io/) is the defacto [LSP](https://langserver.org/) for Rust. Its default -//! settings are fine for smaller projects, but not well optimised for polkadot-sdk. -//! -//! Below is a suggested configuration for VSCode: -//! -//! ```json -//! { -//! // Use a separate target dir for Rust Analyzer. Helpful if you want to use Rust -//! // Analyzer and cargo on the command line at the same time. -//! "rust-analyzer.rust.analyzerTargetDir": "target/vscode-rust-analyzer", -//! // Improve stability -//! "rust-analyzer.server.extraEnv": { -//! "CHALK_OVERFLOW_DEPTH": "100000000", -//! "CHALK_SOLVER_MAX_SIZE": "10000000" -//! }, -//! // Check feature-gated code -//! "rust-analyzer.cargo.features": "all", -//! "rust-analyzer.cargo.extraEnv": { -//! // Skip building WASM, there is never need for it here -//! "SKIP_WASM_BUILD": "1" -//! }, -//! // Don't expand some problematic proc_macros -//! "rust-analyzer.procMacro.ignored": { -//! "async-trait": ["async_trait"], -//! "napi-derive": ["napi"], -//! "async-recursion": ["async_recursion"], -//! "async-std": ["async_std"] -//! }, -//! // Use nightly formatting. -//! // See the polkadot-sdk CI job that checks formatting for the current version used in -//! // polkadot-sdk. -//! "rust-analyzer.rustfmt.extraArgs": ["+nightly-2024-01-22"], -//! } -//! ``` -//! -//! and the same in Lua for `neovim/nvim-lspconfig`: -//! -//! ```lua -//! ["rust-analyzer"] = { -//! rust = { -//! # Use a separate target dir for Rust Analyzer. Helpful if you want to use Rust -//! # Analyzer and cargo on the command line at the same time. -//! analyzerTargetDir = "target/nvim-rust-analyzer", -//! }, -//! server = { -//! # Improve stability -//! extraEnv = { -//! ["CHALK_OVERFLOW_DEPTH"] = "100000000", -//! ["CHALK_SOLVER_MAX_SIZE"] = "100000000", -//! }, -//! }, -//! cargo = { -//! # Check feature-gated code -//! features = "all", -//! extraEnv = { -//! # Skip building WASM, there is never need for it here -//! ["SKIP_WASM_BUILD"] = "1", -//! }, -//! }, -//! procMacro = { -//! # Don't expand some problematic proc_macros -//! ignored = { -//! ["async-trait"] = { "async_trait" }, -//! ["napi-derive"] = { "napi" }, -//! ["async-recursion"] = { "async_recursion" }, -//! ["async-std"] = { "async_std" }, -//! }, -//! }, -//! rustfmt = { -//! # Use nightly formatting. -//! # See the polkadot-sdk CI job that checks formatting for the current version used in -//! # polkadot-sdk. -//! extraArgs = { "+nightly-2024-01-22" }, -//! }, -//! }, -//! ``` -//! -//! For the full set of configuration options see . -//! -//! ## Cargo Usage -//! -//! ### Using `--package` (a.k.a. `-p`) -//! -//! polkadot-sdk is a monorepo containing many crates. When you run a cargo command without -//! `-p`, you will almost certainly compile crates outside of the scope you are working. -//! -//! Instead, you should identify the name of the crate you are working on by checking the `name` -//! field in the closest `Cargo.toml` file. Then, use `-p` with your cargo commands to only compile -//! that crate. -//! -//! ### `SKIP_WASM_BUILD=1` environment variable -//! -//! When cargo touches a runtime crate, by default it will also compile the WASM binary, -//! approximately doubling the compilation time. -//! -//! The WASM binary is usually not needed, especially when running `check` or `test`. To skip the -//! WASM build, set the `SKIP_WASM_BUILD` environment variable to `1`. For example: -//! `SKIP_WASM_BUILD=1 cargo check -p frame-support`. -//! -//! ### Cargo Remote -//! -//! If you have a powerful remote server available, you may consider using -//! [cargo-remote](https://github.com/sgeisler/cargo-remote) to execute cargo commands on it, -//! freeing up local resources for other tasks like `rust-analyzer`. diff --git a/polkadot/node/subsystem-bench/src/availability/mod.rs b/polkadot/node/subsystem-bench/src/availability/mod.rs deleted file mode 100644 index f9892efb3c68..000000000000 --- a/polkadot/node/subsystem-bench/src/availability/mod.rs +++ /dev/null @@ -1,660 +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 . -use crate::{core::mock::ChainApiState, TestEnvironment}; -use av_store::NetworkAvailabilityState; -use bitvec::bitvec; -use colored::Colorize; -use itertools::Itertools; -use polkadot_availability_bitfield_distribution::BitfieldDistribution; -use polkadot_node_core_av_store::AvailabilityStoreSubsystem; -use polkadot_node_subsystem::{Overseer, OverseerConnector, SpawnGlue}; -use polkadot_node_subsystem_types::{ - messages::{AvailabilityStoreMessage, NetworkBridgeEvent}, - Span, -}; -use polkadot_overseer::Handle as OverseerHandle; -use sc_network::{request_responses::ProtocolConfig, PeerId}; -use sp_core::H256; -use std::{collections::HashMap, iter::Cycle, ops::Sub, sync::Arc, time::Instant}; - -use av_store_helpers::new_av_store; -use futures::{channel::oneshot, stream::FuturesUnordered, StreamExt}; -use polkadot_availability_distribution::{ - AvailabilityDistributionSubsystem, IncomingRequestReceivers, -}; -use polkadot_node_metrics::metrics::Metrics; - -use polkadot_availability_recovery::AvailabilityRecoverySubsystem; -use polkadot_node_primitives::{AvailableData, ErasureChunk}; - -use crate::GENESIS_HASH; -use parity_scale_codec::Encode; -use polkadot_node_network_protocol::{ - request_response::{v1::ChunkFetchingRequest, IncomingRequest, ReqProtocolNames}, - OurView, Versioned, VersionedValidationProtocol, -}; -use sc_network::request_responses::IncomingRequest as RawIncomingRequest; - -use polkadot_node_primitives::{BlockData, PoV}; -use polkadot_node_subsystem::messages::{AllMessages, AvailabilityRecoveryMessage}; - -use crate::core::{ - environment::TestEnvironmentDependencies, - mock::{ - av_store, - network_bridge::{self, MockNetworkBridgeRx, MockNetworkBridgeTx}, - runtime_api, MockAvailabilityStore, MockChainApi, MockRuntimeApi, - }, -}; - -use super::core::{configuration::TestConfiguration, mock::dummy_builder, network::*}; - -const LOG_TARGET: &str = "subsystem-bench::availability"; - -use super::{cli::TestObjective, core::mock::AlwaysSupportsParachains}; -use polkadot_node_subsystem_test_helpers::{ - derive_erasure_chunks_with_proofs_and_root, mock::new_block_import_info, -}; -use polkadot_primitives::{ - AvailabilityBitfield, BlockNumber, CandidateHash, CandidateReceipt, GroupIndex, Hash, HeadData, - Header, PersistedValidationData, Signed, SigningContext, ValidatorIndex, -}; -use polkadot_primitives_test_helpers::{dummy_candidate_receipt, dummy_hash}; -use sc_service::SpawnTaskHandle; - -mod av_store_helpers; -mod cli; -pub use cli::{DataAvailabilityReadOptions, NetworkEmulation}; - -fn build_overseer_for_availability_read( - spawn_task_handle: SpawnTaskHandle, - runtime_api: MockRuntimeApi, - av_store: MockAvailabilityStore, - network_bridge: (MockNetworkBridgeTx, MockNetworkBridgeRx), - availability_recovery: AvailabilityRecoverySubsystem, -) -> (Overseer, AlwaysSupportsParachains>, OverseerHandle) { - let overseer_connector = OverseerConnector::with_event_capacity(64000); - let dummy = dummy_builder!(spawn_task_handle); - let builder = dummy - .replace_runtime_api(|_| runtime_api) - .replace_availability_store(|_| av_store) - .replace_network_bridge_tx(|_| network_bridge.0) - .replace_network_bridge_rx(|_| network_bridge.1) - .replace_availability_recovery(|_| availability_recovery); - - let (overseer, raw_handle) = - builder.build_with_connector(overseer_connector).expect("Should not fail"); - - (overseer, OverseerHandle::new(raw_handle)) -} - -fn build_overseer_for_availability_write( - spawn_task_handle: SpawnTaskHandle, - runtime_api: MockRuntimeApi, - network_bridge: (MockNetworkBridgeTx, MockNetworkBridgeRx), - availability_distribution: AvailabilityDistributionSubsystem, - chain_api: MockChainApi, - availability_store: AvailabilityStoreSubsystem, - bitfield_distribution: BitfieldDistribution, -) -> (Overseer, AlwaysSupportsParachains>, OverseerHandle) { - let overseer_connector = OverseerConnector::with_event_capacity(64000); - let dummy = dummy_builder!(spawn_task_handle); - let builder = dummy - .replace_runtime_api(|_| runtime_api) - .replace_availability_store(|_| availability_store) - .replace_network_bridge_tx(|_| network_bridge.0) - .replace_network_bridge_rx(|_| network_bridge.1) - .replace_chain_api(|_| chain_api) - .replace_bitfield_distribution(|_| bitfield_distribution) - // This is needed to test own chunk recovery for `n_cores`. - .replace_availability_distribution(|_| availability_distribution); - - let (overseer, raw_handle) = - builder.build_with_connector(overseer_connector).expect("Should not fail"); - - (overseer, OverseerHandle::new(raw_handle)) -} - -/// Takes a test configuration and uses it to create the `TestEnvironment`. -pub fn prepare_test( - config: TestConfiguration, - state: &mut TestState, -) -> (TestEnvironment, Vec) { - prepare_test_inner(config, state, TestEnvironmentDependencies::default()) -} - -fn prepare_test_inner( - config: TestConfiguration, - state: &mut TestState, - dependencies: TestEnvironmentDependencies, -) -> (TestEnvironment, Vec) { - // Generate test authorities. - let test_authorities = config.generate_authorities(); - - let mut candidate_hashes: HashMap> = HashMap::new(); - - // Prepare per block candidates. - // Genesis block is always finalized, so we start at 1. - for block_num in 1..=config.num_blocks { - for _ in 0..config.n_cores { - candidate_hashes - .entry(Hash::repeat_byte(block_num as u8)) - .or_default() - .push(state.next_candidate().expect("Cycle iterator")) - } - - // First candidate is our backed candidate. - state.backed_candidates.push( - candidate_hashes - .get(&Hash::repeat_byte(block_num as u8)) - .expect("just inserted above") - .first() - .expect("just inserted above") - .clone(), - ); - } - - let runtime_api = runtime_api::MockRuntimeApi::new( - config.clone(), - test_authorities.clone(), - candidate_hashes, - ); - - let availability_state = NetworkAvailabilityState { - candidate_hashes: state.candidate_hashes.clone(), - available_data: state.available_data.clone(), - chunks: state.chunks.clone(), - }; - - let mut req_cfgs = Vec::new(); - - let (collation_req_receiver, collation_req_cfg) = - IncomingRequest::get_config_receiver(&ReqProtocolNames::new(GENESIS_HASH, None)); - req_cfgs.push(collation_req_cfg); - - let (pov_req_receiver, pov_req_cfg) = - IncomingRequest::get_config_receiver(&ReqProtocolNames::new(GENESIS_HASH, None)); - - let (chunk_req_receiver, chunk_req_cfg) = - IncomingRequest::get_config_receiver(&ReqProtocolNames::new(GENESIS_HASH, None)); - req_cfgs.push(pov_req_cfg); - - let (network, network_interface, network_receiver) = - new_network(&config, &dependencies, &test_authorities, vec![Arc::new(availability_state)]); - - let network_bridge_tx = network_bridge::MockNetworkBridgeTx::new( - network.clone(), - network_interface.subsystem_sender(), - ); - - let network_bridge_rx = - network_bridge::MockNetworkBridgeRx::new(network_receiver, Some(chunk_req_cfg.clone())); - - let (overseer, overseer_handle) = match &state.config().objective { - TestObjective::DataAvailabilityRead(options) => { - let use_fast_path = options.fetch_from_backers; - - let subsystem = if use_fast_path { - AvailabilityRecoverySubsystem::with_fast_path( - collation_req_receiver, - Metrics::try_register(&dependencies.registry).unwrap(), - ) - } else { - AvailabilityRecoverySubsystem::with_chunks_only( - collation_req_receiver, - Metrics::try_register(&dependencies.registry).unwrap(), - ) - }; - - // Use a mocked av-store. - let av_store = av_store::MockAvailabilityStore::new( - state.chunks.clone(), - state.candidate_hashes.clone(), - ); - - build_overseer_for_availability_read( - dependencies.task_manager.spawn_handle(), - runtime_api, - av_store, - (network_bridge_tx, network_bridge_rx), - subsystem, - ) - }, - TestObjective::DataAvailabilityWrite => { - let availability_distribution = AvailabilityDistributionSubsystem::new( - test_authorities.keyring.keystore(), - IncomingRequestReceivers { pov_req_receiver, chunk_req_receiver }, - Metrics::try_register(&dependencies.registry).unwrap(), - ); - - let block_headers = (0..=config.num_blocks) - .map(|block_number| { - ( - Hash::repeat_byte(block_number as u8), - Header { - digest: Default::default(), - number: block_number as BlockNumber, - parent_hash: Default::default(), - extrinsics_root: Default::default(), - state_root: Default::default(), - }, - ) - }) - .collect::>(); - - let chain_api_state = ChainApiState { block_headers }; - let chain_api = MockChainApi::new(chain_api_state); - let bitfield_distribution = - BitfieldDistribution::new(Metrics::try_register(&dependencies.registry).unwrap()); - build_overseer_for_availability_write( - dependencies.task_manager.spawn_handle(), - runtime_api, - (network_bridge_tx, network_bridge_rx), - availability_distribution, - chain_api, - new_av_store(&dependencies), - bitfield_distribution, - ) - }, - _ => { - unimplemented!("Invalid test objective") - }, - }; - - ( - TestEnvironment::new( - dependencies, - config, - network, - overseer, - overseer_handle, - test_authorities, - ), - req_cfgs, - ) -} - -#[derive(Clone)] -pub struct TestState { - // Full test configuration - config: TestConfiguration, - // A cycle iterator on all PoV sizes used in the test. - pov_sizes: Cycle>, - // Generated candidate receipts to be used in the test - candidates: Cycle>, - // Map from pov size to candidate index - pov_size_to_candidate: HashMap, - // Map from generated candidate hashes to candidate index in `available_data` - // and `chunks`. - candidate_hashes: HashMap, - // Per candidate index receipts. - candidate_receipt_templates: Vec, - // Per candidate index `AvailableData` - available_data: Vec, - // Per candiadte index chunks - chunks: Vec>, - // Per relay chain block - candidate backed by our backing group - backed_candidates: Vec, -} - -impl TestState { - fn config(&self) -> &TestConfiguration { - &self.config - } - - pub fn next_candidate(&mut self) -> Option { - let candidate = self.candidates.next(); - let candidate_hash = candidate.as_ref().unwrap().hash(); - gum::trace!(target: LOG_TARGET, "Next candidate selected {:?}", candidate_hash); - candidate - } - - /// Generate candidates to be used in the test. - fn generate_candidates(&mut self) { - let count = self.config.n_cores * self.config.num_blocks; - gum::info!(target: LOG_TARGET,"{}", format!("Pre-generating {} candidates.", count).bright_blue()); - - // Generate all candidates - self.candidates = (0..count) - .map(|index| { - let pov_size = self.pov_sizes.next().expect("This is a cycle; qed"); - let candidate_index = *self - .pov_size_to_candidate - .get(&pov_size) - .expect("pov_size always exists; qed"); - let mut candidate_receipt = - self.candidate_receipt_templates[candidate_index].clone(); - - // Make it unique. - candidate_receipt.descriptor.relay_parent = Hash::from_low_u64_be(index as u64); - // Store the new candidate in the state - self.candidate_hashes.insert(candidate_receipt.hash(), candidate_index); - - gum::debug!(target: LOG_TARGET, candidate_hash = ?candidate_receipt.hash(), "new candidate"); - - candidate_receipt - }) - .collect::>() - .into_iter() - .cycle(); - } - - pub fn new(config: &TestConfiguration) -> Self { - let config = config.clone(); - - let mut chunks = Vec::new(); - let mut available_data = Vec::new(); - let mut candidate_receipt_templates = Vec::new(); - let mut pov_size_to_candidate = HashMap::new(); - - // we use it for all candidates. - let persisted_validation_data = PersistedValidationData { - parent_head: HeadData(vec![7, 8, 9]), - relay_parent_number: Default::default(), - max_pov_size: 1024, - relay_parent_storage_root: Default::default(), - }; - - // For each unique pov we create a candidate receipt. - for (index, pov_size) in config.pov_sizes().iter().cloned().unique().enumerate() { - gum::info!(target: LOG_TARGET, index, pov_size, "{}", "Generating template candidate".bright_blue()); - - let mut candidate_receipt = dummy_candidate_receipt(dummy_hash()); - let pov = PoV { block_data: BlockData(vec![index as u8; pov_size]) }; - - let new_available_data = AvailableData { - validation_data: persisted_validation_data.clone(), - pov: Arc::new(pov), - }; - - let (new_chunks, erasure_root) = derive_erasure_chunks_with_proofs_and_root( - config.n_validators, - &new_available_data, - |_, _| {}, - ); - - candidate_receipt.descriptor.erasure_root = erasure_root; - - chunks.push(new_chunks); - available_data.push(new_available_data); - pov_size_to_candidate.insert(pov_size, index); - candidate_receipt_templates.push(candidate_receipt); - } - - gum::info!(target: LOG_TARGET, "{}","Created test environment.".bright_blue()); - - let mut _self = Self { - available_data, - candidate_receipt_templates, - chunks, - pov_size_to_candidate, - pov_sizes: Vec::from(config.pov_sizes()).into_iter().cycle(), - candidate_hashes: HashMap::new(), - candidates: Vec::new().into_iter().cycle(), - backed_candidates: Vec::new(), - config, - }; - - _self.generate_candidates(); - _self - } - - pub fn backed_candidates(&mut self) -> &mut Vec { - &mut self.backed_candidates - } -} - -pub async fn benchmark_availability_read(env: &mut TestEnvironment, mut state: TestState) { - let config = env.config().clone(); - - env.import_block(new_block_import_info(Hash::repeat_byte(1), 1)).await; - - let test_start = Instant::now(); - let mut batch = FuturesUnordered::new(); - let mut availability_bytes = 0u128; - - env.metrics().set_n_validators(config.n_validators); - env.metrics().set_n_cores(config.n_cores); - - for block_num in 1..=env.config().num_blocks { - gum::info!(target: LOG_TARGET, "Current block {}/{}", block_num, env.config().num_blocks); - env.metrics().set_current_block(block_num); - - let block_start_ts = Instant::now(); - for candidate_num in 0..config.n_cores as u64 { - let candidate = - state.next_candidate().expect("We always send up to n_cores*num_blocks; qed"); - let (tx, rx) = oneshot::channel(); - batch.push(rx); - - let message = AllMessages::AvailabilityRecovery( - AvailabilityRecoveryMessage::RecoverAvailableData( - candidate.clone(), - 1, - Some(GroupIndex( - candidate_num as u32 % (std::cmp::max(5, config.n_cores) / 5) as u32, - )), - tx, - ), - ); - env.send_message(message).await; - } - - gum::info!(target: LOG_TARGET, "{}", format!("{} recoveries pending", batch.len()).bright_black()); - while let Some(completed) = batch.next().await { - let available_data = completed.unwrap().unwrap(); - env.metrics().on_pov_size(available_data.encoded_size()); - availability_bytes += available_data.encoded_size() as u128; - } - - let block_time = Instant::now().sub(block_start_ts).as_millis() as u64; - env.metrics().set_block_time(block_time); - gum::info!(target: LOG_TARGET, "All work for block completed in {}", format!("{:?}ms", block_time).cyan()); - } - - let duration: u128 = test_start.elapsed().as_millis(); - let availability_bytes = availability_bytes / 1024; - gum::info!(target: LOG_TARGET, "All blocks processed in {}", format!("{:?}ms", duration).cyan()); - gum::info!(target: LOG_TARGET, - "Throughput: {}", - format!("{} KiB/block", availability_bytes / env.config().num_blocks as u128).bright_red() - ); - gum::info!(target: LOG_TARGET, - "Avg block time: {}", - format!("{} ms", test_start.elapsed().as_millis() / env.config().num_blocks as u128).red() - ); - - env.display_network_usage(); - env.display_cpu_usage(&["availability-recovery"]); - env.stop().await; -} - -pub async fn benchmark_availability_write(env: &mut TestEnvironment, mut state: TestState) { - let config = env.config().clone(); - - env.metrics().set_n_validators(config.n_validators); - env.metrics().set_n_cores(config.n_cores); - - gum::info!(target: LOG_TARGET, "Seeding availability store with candidates ..."); - for backed_candidate in state.backed_candidates().clone() { - let candidate_index = *state.candidate_hashes.get(&backed_candidate.hash()).unwrap(); - let available_data = state.available_data[candidate_index].clone(); - let (tx, rx) = oneshot::channel(); - env.send_message(AllMessages::AvailabilityStore( - AvailabilityStoreMessage::StoreAvailableData { - candidate_hash: backed_candidate.hash(), - n_validators: config.n_validators as u32, - available_data, - expected_erasure_root: backed_candidate.descriptor().erasure_root, - tx, - }, - )) - .await; - - rx.await - .unwrap() - .expect("Test candidates are stored nicely in availability store"); - } - - gum::info!(target: LOG_TARGET, "Done"); - - let test_start = Instant::now(); - - for block_num in 1..=env.config().num_blocks { - gum::info!(target: LOG_TARGET, "Current block #{}", block_num); - env.metrics().set_current_block(block_num); - - let block_start_ts = Instant::now(); - let relay_block_hash = Hash::repeat_byte(block_num as u8); - env.import_block(new_block_import_info(relay_block_hash, block_num as BlockNumber)) - .await; - - // Inform bitfield distribution about our view of current test block - let message = polkadot_node_subsystem_types::messages::BitfieldDistributionMessage::NetworkBridgeUpdate( - NetworkBridgeEvent::OurViewChange(OurView::new(vec![(relay_block_hash, Arc::new(Span::Disabled))], 0)) - ); - env.send_message(AllMessages::BitfieldDistribution(message)).await; - - let chunk_fetch_start_ts = Instant::now(); - - // Request chunks of our own backed candidate from all other validators. - let mut receivers = Vec::new(); - for index in 1..config.n_validators { - let (pending_response, pending_response_receiver) = oneshot::channel(); - - let request = RawIncomingRequest { - peer: PeerId::random(), - payload: ChunkFetchingRequest { - candidate_hash: state.backed_candidates()[block_num - 1].hash(), - index: ValidatorIndex(index as u32), - } - .encode(), - pending_response, - }; - - let peer = env - .authorities() - .validator_authority_id - .get(index) - .expect("all validators have keys"); - - if env.network().is_peer_connected(peer) && - env.network().send_request_from_peer(peer, request).is_ok() - { - receivers.push(pending_response_receiver); - } - } - - gum::info!(target: LOG_TARGET, "Waiting for all emulated peers to receive their chunk from us ..."); - for receiver in receivers.into_iter() { - let response = receiver.await.expect("Chunk is always served succesfully"); - // TODO: check if chunk is the one the peer expects to receive. - assert!(response.result.is_ok()); - } - - let chunk_fetch_duration = Instant::now().sub(chunk_fetch_start_ts).as_millis(); - - gum::info!(target: LOG_TARGET, "All chunks received in {}ms", chunk_fetch_duration); - - let signing_context = SigningContext { session_index: 0, parent_hash: relay_block_hash }; - let network = env.network().clone(); - let authorities = env.authorities().clone(); - let n_validators = config.n_validators; - - // Spawn a task that will generate `n_validator` - 1 signed bitfiends and - // send them from the emulated peers to the subsystem. - // TODO: Implement topology. - env.spawn_blocking("send-bitfields", async move { - for index in 1..n_validators { - let validator_public = - authorities.validator_public.get(index).expect("All validator keys are known"); - - // Node has all the chunks in the world. - let payload: AvailabilityBitfield = - AvailabilityBitfield(bitvec![u8, bitvec::order::Lsb0; 1u8; 32]); - // TODO(soon): Use pre-signed messages. This is quite intensive on the CPU. - let signed_bitfield = Signed::::sign( - &authorities.keyring.keystore(), - payload, - &signing_context, - ValidatorIndex(index as u32), - validator_public, - ) - .ok() - .flatten() - .expect("should be signed"); - - let from_peer = &authorities.validator_authority_id[index]; - - let message = peer_bitfield_message_v2(relay_block_hash, signed_bitfield); - - // Send the action from peer only if it is connected to our node. - if network.is_peer_connected(from_peer) { - let _ = network.send_message_from_peer(from_peer, message); - } - } - }); - - gum::info!( - "Waiting for {} bitfields to be received and processed", - config.connected_count() - ); - - // Wait for all bitfields to be processed. - env.wait_until_metric_eq( - "polkadot_parachain_received_availabilty_bitfields_total", - config.connected_count() * block_num, - ) - .await; - - gum::info!(target: LOG_TARGET, "All bitfields processed"); - - let block_time = Instant::now().sub(block_start_ts).as_millis() as u64; - env.metrics().set_block_time(block_time); - gum::info!(target: LOG_TARGET, "All work for block completed in {}", format!("{:?}ms", block_time).cyan()); - } - - let duration: u128 = test_start.elapsed().as_millis(); - gum::info!(target: LOG_TARGET, "All blocks processed in {}", format!("{:?}ms", duration).cyan()); - gum::info!(target: LOG_TARGET, - "Avg block time: {}", - format!("{} ms", test_start.elapsed().as_millis() / env.config().num_blocks as u128).red() - ); - - env.display_network_usage(); - - env.display_cpu_usage(&[ - "availability-distribution", - "bitfield-distribution", - "availability-store", - ]); - - env.stop().await; -} - -pub fn peer_bitfield_message_v2( - relay_hash: H256, - signed_bitfield: Signed, -) -> VersionedValidationProtocol { - let bitfield = polkadot_node_network_protocol::v2::BitfieldDistributionMessage::Bitfield( - relay_hash, - signed_bitfield.into(), - ); - - Versioned::V2(polkadot_node_network_protocol::v2::ValidationProtocol::BitfieldDistribution( - bitfield, - )) -} diff --git a/polkadot/node/subsystem-bench/src/core/keyring.rs b/polkadot/node/subsystem-bench/src/core/keyring.rs deleted file mode 100644 index 66c7229847c3..000000000000 --- a/polkadot/node/subsystem-bench/src/core/keyring.rs +++ /dev/null @@ -1,46 +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 . - -use polkadot_primitives::ValidatorId; -use sc_keystore::LocalKeystore; -use sp_application_crypto::AppCrypto; -use sp_core::sr25519::Public; -use sp_keystore::Keystore; -use std::sync::Arc; - -/// Set of test accounts generated and kept safe by a keystore. -#[derive(Clone)] -pub struct Keyring { - keystore: Arc, -} - -impl Default for Keyring { - fn default() -> Self { - Self { keystore: Arc::new(LocalKeystore::in_memory()) } - } -} - -impl Keyring { - pub fn sr25519_new(&self, name: String) -> Public { - self.keystore - .sr25519_generate_new(ValidatorId::ID, Some(&format!("//{}", name))) - .expect("Insert key into keystore") - } - - pub fn keystore(&self) -> Arc { - self.keystore.clone() - } -} diff --git a/polkadot/node/subsystem-bench/src/core/mock/mod.rs b/polkadot/node/subsystem-bench/src/core/mock/mod.rs deleted file mode 100644 index b67c6611e8cd..000000000000 --- a/polkadot/node/subsystem-bench/src/core/mock/mod.rs +++ /dev/null @@ -1,78 +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 . - -use polkadot_node_subsystem::HeadSupportsParachains; -use polkadot_node_subsystem_types::Hash; - -pub mod av_store; -pub mod chain_api; -pub mod dummy; -pub mod network_bridge; -pub mod runtime_api; - -pub use av_store::*; -pub use chain_api::*; -pub use runtime_api::*; - -pub struct AlwaysSupportsParachains {} -#[async_trait::async_trait] -impl HeadSupportsParachains for AlwaysSupportsParachains { - async fn head_supports_parachains(&self, _head: &Hash) -> bool { - true - } -} - -// An orchestra with dummy subsystems -macro_rules! dummy_builder { - ($spawn_task_handle: ident) => {{ - use super::core::mock::dummy::*; - - // Initialize a mock overseer. - // All subsystem except approval_voting and approval_distribution are mock subsystems. - Overseer::builder() - .approval_voting(MockApprovalVoting {}) - .approval_distribution(MockApprovalDistribution {}) - .availability_recovery(MockAvailabilityRecovery {}) - .candidate_validation(MockCandidateValidation {}) - .chain_api(MockChainApi {}) - .chain_selection(MockChainSelection {}) - .dispute_coordinator(MockDisputeCoordinator {}) - .runtime_api(MockRuntimeApi {}) - .network_bridge_tx(MockNetworkBridgeTx {}) - .availability_distribution(MockAvailabilityDistribution {}) - .availability_store(MockAvailabilityStore {}) - .pvf_checker(MockPvfChecker {}) - .candidate_backing(MockCandidateBacking {}) - .statement_distribution(MockStatementDistribution {}) - .bitfield_signing(MockBitfieldSigning {}) - .bitfield_distribution(MockBitfieldDistribution {}) - .provisioner(MockProvisioner {}) - .network_bridge_rx(MockNetworkBridgeRx {}) - .collation_generation(MockCollationGeneration {}) - .collator_protocol(MockCollatorProtocol {}) - .gossip_support(MockGossipSupport {}) - .dispute_distribution(MockDisputeDistribution {}) - .prospective_parachains(MockProspectiveParachains {}) - .activation_external_listeners(Default::default()) - .span_per_active_leaf(Default::default()) - .active_leaves(Default::default()) - .metrics(Default::default()) - .supports_parachains(AlwaysSupportsParachains {}) - .spawner(SpawnGlue($spawn_task_handle)) - }}; -} - -pub(crate) use dummy_builder; diff --git a/substrate/frame/contracts/fixtures/build.rs b/substrate/frame/contracts/fixtures/build.rs deleted file mode 100644 index 12a7805294b6..000000000000 --- a/substrate/frame/contracts/fixtures/build.rs +++ /dev/null @@ -1,350 +0,0 @@ -// 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. - -//! Compile contracts to wasm and RISC-V binaries. -use anyhow::{bail, Context, Result}; -use parity_wasm::elements::{deserialize_file, serialize_to_file, Internal}; -use std::{ - env, fs, - hash::Hasher, - path::{Path, PathBuf}, - process::Command, -}; -use twox_hash::XxHash32; - -/// Read the file at `path` and return its hash as a hex string. -fn file_hash(path: &Path) -> String { - let data = fs::read(path).expect("file exists; qed"); - let mut hasher = XxHash32::default(); - hasher.write(&data); - hasher.write(include_bytes!("build.rs")); - let hash = hasher.finish(); - format!("{:x}", hash) -} - -/// A contract entry. -struct Entry { - /// The path to the contract source file. - path: PathBuf, - /// The hash of the contract source file. - hash: String, -} - -impl Entry { - /// Create a new contract entry from the given path. - fn new(path: PathBuf) -> Self { - let hash = file_hash(&path); - Self { path, hash } - } - - /// Return the path to the contract source file. - fn path(&self) -> &str { - self.path.to_str().expect("path is valid unicode; qed") - } - - /// Return the name of the contract. - fn name(&self) -> &str { - self.path - .file_stem() - .expect("file exits; qed") - .to_str() - .expect("name is valid unicode; qed") - } - - /// Return whether the contract has already been compiled. - fn is_cached(&self, out_dir: &Path) -> bool { - out_dir.join(self.name()).join(&self.hash).exists() - } - - /// Update the cache file for the contract. - fn update_cache(&self, out_dir: &Path) -> Result<()> { - let cache_dir = out_dir.join(self.name()); - - // clear the cache dir if it exists - if cache_dir.exists() { - fs::remove_dir_all(&cache_dir)?; - } - - // re-populate the cache dir with the new hash - fs::create_dir_all(&cache_dir)?; - fs::write(out_dir.join(&self.hash), "")?; - Ok(()) - } - - /// Return the name of the output wasm file. - fn out_wasm_filename(&self) -> String { - format!("{}.wasm", self.name()) - } - - /// Return the name of the RISC-V polkavm file. - #[cfg(feature = "riscv")] - fn out_riscv_filename(&self) -> String { - format!("{}.polkavm", self.name()) - } -} - -/// Collect all contract entries from the given source directory. -/// Contracts that have already been compiled are filtered out. -fn collect_entries(contracts_dir: &Path, out_dir: &Path) -> Vec { - fs::read_dir(contracts_dir) - .expect("src dir exists; qed") - .filter_map(|file| { - let path = file.expect("file exists; qed").path(); - if path.extension().map_or(true, |ext| ext != "rs") { - return None - } - - let entry = Entry::new(path); - if entry.is_cached(out_dir) { - None - } else { - Some(entry) - } - }) - .collect::>() -} - -/// Create a `Cargo.toml` to compile the given contract entries. -fn create_cargo_toml<'a>( - fixtures_dir: &Path, - entries: impl Iterator, - output_dir: &Path, -) -> Result<()> { - let mut cargo_toml: toml::Value = toml::from_str(include_str!("./build/Cargo.toml"))?; - let mut set_dep = |name, path| -> Result<()> { - cargo_toml["dependencies"][name]["path"] = toml::Value::String( - fixtures_dir.join(path).canonicalize()?.to_str().unwrap().to_string(), - ); - Ok(()) - }; - set_dep("uapi", "../uapi")?; - set_dep("common", "./contracts/common")?; - - cargo_toml["bin"] = toml::Value::Array( - entries - .map(|entry| { - let name = entry.name(); - let path = entry.path(); - toml::Value::Table(toml::toml! { - name = name - path = path - }) - }) - .collect::>(), - ); - - let cargo_toml = toml::to_string_pretty(&cargo_toml)?; - fs::write(output_dir.join("Cargo.toml"), cargo_toml).map_err(Into::into) -} - -/// Invoke `cargo fmt` to check that fixtures files are formatted. -fn invoke_cargo_fmt<'a>( - config_path: &Path, - files: impl Iterator, - contract_dir: &Path, -) -> Result<()> { - // If rustfmt is not installed, skip the check. - if !Command::new("rustup") - .args(["nightly-2024-01-22", "run", "rustfmt", "--version"]) - .output() - .map_or(false, |o| o.status.success()) - { - return Ok(()) - } - - let fmt_res = Command::new("rustup") - .args(["nightly-2024-01-22", "run", "rustfmt", "--check", "--config-path"]) - .arg(config_path) - .args(files) - .output() - .expect("failed to execute process"); - - if fmt_res.status.success() { - return Ok(()) - } - - let stdout = String::from_utf8_lossy(&fmt_res.stdout); - let stderr = String::from_utf8_lossy(&fmt_res.stderr); - eprintln!("{}\n{}", stdout, stderr); - eprintln!( - "Fixtures files are not formatted.\n - Please run `rustup nightly-2024-01-22 run rustfmt --config-path {} {}/*.rs`", - config_path.display(), - contract_dir.display() - ); - - anyhow::bail!("Fixtures files are not formatted") -} - -/// Build contracts for wasm. -fn invoke_wasm_build(current_dir: &Path) -> Result<()> { - let encoded_rustflags = [ - "-Clink-arg=-zstack-size=65536", - "-Clink-arg=--import-memory", - "-Clinker-plugin-lto", - "-Ctarget-cpu=mvp", - "-Dwarnings", - ] - .join("\x1f"); - - let build_res = Command::new(env::var("CARGO")?) - .current_dir(current_dir) - .env("CARGO_TARGET_DIR", current_dir.join("target").display().to_string()) - .env("CARGO_ENCODED_RUSTFLAGS", encoded_rustflags) - .args(["build", "--release", "--target=wasm32-unknown-unknown"]) - .output() - .expect("failed to execute process"); - - if build_res.status.success() { - return Ok(()) - } - - let stderr = String::from_utf8_lossy(&build_res.stderr); - eprintln!("{}", stderr); - bail!("Failed to build wasm contracts"); -} - -/// Post-process the compiled wasm contracts. -fn post_process_wasm(input_path: &Path, output_path: &Path) -> Result<()> { - let mut module = - deserialize_file(input_path).with_context(|| format!("Failed to read {:?}", input_path))?; - if let Some(section) = module.export_section_mut() { - section.entries_mut().retain(|entry| { - matches!(entry.internal(), Internal::Function(_)) && - (entry.field() == "call" || entry.field() == "deploy") - }); - } - - serialize_to_file(output_path, module).map_err(Into::into) -} - -/// Build contracts for RISC-V. -#[cfg(feature = "riscv")] -fn invoke_riscv_build(current_dir: &Path) -> Result<()> { - let encoded_rustflags = [ - "-Crelocation-model=pie", - "-Clink-arg=--emit-relocs", - "-Clink-arg=--export-dynamic-symbol=__polkavm_symbol_export_hack__*", - ] - .join("\x1f"); - - let build_res = Command::new(env::var("CARGO")?) - .current_dir(current_dir) - .env_clear() - .env("PATH", env::var("PATH").unwrap_or_default()) - .env("CARGO_ENCODED_RUSTFLAGS", encoded_rustflags) - .env("RUSTUP_TOOLCHAIN", "rve-nightly") - .env("RUSTUP_HOME", env::var("RUSTUP_HOME").unwrap_or_default()) - .args(["build", "--release", "--target=riscv32ema-unknown-none-elf"]) - .output() - .expect("failed to execute process"); - - if build_res.status.success() { - return Ok(()) - } - - let stderr = String::from_utf8_lossy(&build_res.stderr); - - if stderr.contains("'rve-nightly' is not installed") { - eprintln!("RISC-V toolchain is not installed.\nDownload and install toolchain from https://github.com/paritytech/rustc-rv32e-toolchain."); - eprintln!("{}", stderr); - } else { - eprintln!("{}", stderr); - } - - bail!("Failed to build contracts"); -} -/// Post-process the compiled wasm contracts. -#[cfg(feature = "riscv")] -fn post_process_riscv(input_path: &Path, output_path: &Path) -> Result<()> { - let mut config = polkavm_linker::Config::default(); - config.set_strip(true); - let orig = fs::read(input_path).with_context(|| format!("Failed to read {:?}", input_path))?; - let linked = polkavm_linker::program_from_elf(config, orig.as_ref()) - .map_err(|err| anyhow::format_err!("Failed to link polkavm program: {}", err))?; - fs::write(output_path, linked.as_bytes()).map_err(Into::into) -} - -/// Write the compiled contracts to the given output directory. -fn write_output(build_dir: &Path, out_dir: &Path, entries: Vec) -> Result<()> { - for entry in entries { - let wasm_output = entry.out_wasm_filename(); - post_process_wasm( - &build_dir.join("target/wasm32-unknown-unknown/release").join(&wasm_output), - &out_dir.join(&wasm_output), - )?; - - #[cfg(feature = "riscv")] - post_process_riscv( - &build_dir.join("target/riscv32ema-unknown-none-elf/release").join(entry.name()), - &out_dir.join(entry.out_riscv_filename()), - )?; - - entry.update_cache(out_dir)?; - } - - Ok(()) -} - -/// Returns the root path of the wasm workspace. -fn find_workspace_root(current_dir: &Path) -> Option { - let mut current_dir = current_dir.to_path_buf(); - - while current_dir.parent().is_some() { - if current_dir.join("Cargo.toml").exists() { - let cargo_toml_contents = - std::fs::read_to_string(current_dir.join("Cargo.toml")).ok()?; - if cargo_toml_contents.contains("[workspace]") { - return Some(current_dir); - } - } - - current_dir.pop(); - } - - None -} - -fn main() -> Result<()> { - let fixtures_dir: PathBuf = env::var("CARGO_MANIFEST_DIR")?.into(); - let contracts_dir = fixtures_dir.join("contracts"); - let out_dir: PathBuf = env::var("OUT_DIR")?.into(); - let workspace_root = find_workspace_root(&fixtures_dir).expect("workspace root exists; qed"); - - let entries = collect_entries(&contracts_dir, &out_dir); - if entries.is_empty() { - return Ok(()) - } - - let tmp_dir = tempfile::tempdir()?; - let tmp_dir_path = tmp_dir.path(); - - create_cargo_toml(&fixtures_dir, entries.iter(), tmp_dir.path())?; - invoke_cargo_fmt( - &workspace_root.join(".rustfmt.toml"), - entries.iter().map(|entry| &entry.path as _), - &contracts_dir, - )?; - - invoke_wasm_build(tmp_dir_path)?; - - #[cfg(feature = "riscv")] - invoke_riscv_build(tmp_dir_path)?; - - write_output(tmp_dir_path, &out_dir, entries)?; - Ok(()) -} From 63d31103cb99ca28e51510e741018c7ce14a2989 Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Tue, 6 Feb 2024 11:05:20 +0100 Subject: [PATCH 16/18] Remove errors on warnings on CI --- .gitlab/pipeline/build.yml | 6 +++--- .gitlab/pipeline/test.yml | 17 ++++++++--------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.gitlab/pipeline/build.yml b/.gitlab/pipeline/build.yml index 5c13045706c4..ff002ab5ab6f 100644 --- a/.gitlab/pipeline/build.yml +++ b/.gitlab/pipeline/build.yml @@ -14,7 +14,7 @@ build-linux-stable: RUST_TOOLCHAIN: stable # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. - RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + RUSTFLAGS: "-Cdebug-assertions=y" # Ensure we run the UI tests. RUN_UI_TESTS: 1 script: @@ -169,7 +169,7 @@ build-linux-stable-cumulus: variables: # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. - RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + RUSTFLAGS: "-Cdebug-assertions=y" script: - echo "___Building a binary, please refrain from using it in production since it goes with the debug assertions.___" - time cargo build --release --locked -p polkadot-parachain-bin --bin polkadot-parachain @@ -189,7 +189,7 @@ build-test-parachain: variables: # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. - RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + RUSTFLAGS: "-Cdebug-assertions=y" script: - echo "___Building a binary, please refrain from using it in production since it goes with the debug assertions.___" - time cargo build --release --locked -p cumulus-test-service --bin test-parachain diff --git a/.gitlab/pipeline/test.yml b/.gitlab/pipeline/test.yml index cf29776f01aa..536685d610be 100644 --- a/.gitlab/pipeline/test.yml +++ b/.gitlab/pipeline/test.yml @@ -16,7 +16,7 @@ test-linux-stable: RUST_TOOLCHAIN: stable # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. - RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + RUSTFLAGS: "-Cdebug-assertions=y" parallel: 3 script: # Build all but only execute 'runtime' tests. @@ -66,7 +66,7 @@ test-linux-stable-runtime-benchmarks: RUST_TOOLCHAIN: stable # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. - RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + RUSTFLAGS: "-Cdebug-assertions=y" script: - time cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet @@ -81,7 +81,7 @@ test-linux-stable-runtime-benchmarks: # RUST_TOOLCHAIN: stable # # Enable debug assertions since we are running optimized builds for testing # # but still want to have debug assertions. -# RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" +# RUSTFLAGS: "-Cdebug-assertions=y" # parallel: 3 # script: # # Build all but only execute 'runtime' tests. @@ -108,7 +108,7 @@ test-linux-stable-additional-tests: RUST_TOOLCHAIN: stable # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. - RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + RUSTFLAGS: "-Cdebug-assertions=y" script: # tests were moved to test-linux-stable # the jobs should be removed @@ -128,7 +128,7 @@ test-linux-stable-slow: RUST_TOOLCHAIN: stable # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. - RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + RUSTFLAGS: "-Cdebug-assertions=y" script: # tests were moved to test-linux-stable # the jobs should be removed @@ -148,7 +148,7 @@ test-linux-stable-slow: # RUST_TOOLCHAIN: stable # # Enable debug assertions since we are running optimized builds for testing # # but still want to have debug assertions. -# RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" +# RUSTFLAGS: "-Cdebug-assertions=y" # script: # - mkdir -p artifacts # - time cargo test --workspace @@ -169,7 +169,7 @@ test-doc: variables: # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. - RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + RUSTFLAGS: "-Cdebug-assertions=y" script: - time cargo test --doc --workspace @@ -207,7 +207,7 @@ test-node-metrics: RUST_TOOLCHAIN: stable # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. - RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + RUSTFLAGS: "-Cdebug-assertions=y" script: # Build the required workers. - cargo build --bin polkadot-execute-worker --bin polkadot-prepare-worker --profile testnet --verbose --locked @@ -439,7 +439,6 @@ cargo-check-each-crate: - .run-immediately # - .collect-artifacts variables: - RUSTFLAGS: "-D warnings" # $CI_JOB_NAME is set manually so that cache could be shared for all jobs # "cargo-check-each-crate I/N" jobs CI_JOB_NAME: cargo-check-each-crate From b92e879d8fb89c1f7c6ae257aaae486ccbf7edbd Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Tue, 6 Feb 2024 11:17:01 +0100 Subject: [PATCH 17/18] Remove more errors on warnings on CI --- .gitlab/pipeline/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab/pipeline/test.yml b/.gitlab/pipeline/test.yml index 536685d610be..0e4edebbcfe1 100644 --- a/.gitlab/pipeline/test.yml +++ b/.gitlab/pipeline/test.yml @@ -326,10 +326,10 @@ test-frame-ui: variables: # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. - RUSTFLAGS: "-C debug-assertions -D warnings" + RUSTFLAGS: "-C debug-assertions" RUST_BACKTRACE: 1 WASM_BUILD_NO_COLOR: 1 - WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings" + WASM_BUILD_RUSTFLAGS: "-C debug-assertions" # Ensure we run the UI tests. RUN_UI_TESTS: 1 script: @@ -347,10 +347,10 @@ quick-benchmarks: variables: # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. - RUSTFLAGS: "-C debug-assertions -D warnings" + RUSTFLAGS: "-C debug-assertions" RUST_BACKTRACE: "full" WASM_BUILD_NO_COLOR: 1 - WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings" + WASM_BUILD_RUSTFLAGS: "-C debug-assertions" script: - time cargo run --locked --release -p staging-node-cli --bin substrate-node --features runtime-benchmarks -- benchmark pallet --execution wasm --wasm-execution compiled --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 @@ -387,10 +387,10 @@ test-linux-stable-int: variables: # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. - RUSTFLAGS: "-C debug-assertions -D warnings" + RUSTFLAGS: "-C debug-assertions" RUST_BACKTRACE: 1 WASM_BUILD_NO_COLOR: 1 - WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings" + WASM_BUILD_RUSTFLAGS: "-C debug-assertions" # Ensure we run the UI tests. RUN_UI_TESTS: 1 script: From 19e02ef08551eb01c801e7f9da00829fa5012502 Mon Sep 17 00:00:00 2001 From: Vladimir Istyufeev Date: Tue, 6 Feb 2024 22:57:51 +0400 Subject: [PATCH 18/18] Disable fail-fast mode for CI --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5e9974da9941..a6099f1b9c2c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -231,7 +231,7 @@ include: stage: .post rules: - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - when: on_failure + when: never variables: PROJECT_ID: "${CI_PROJECT_ID}" PROJECT_NAME: "${CI_PROJECT_NAME}" @@ -246,6 +246,7 @@ remove-cancel-pipeline-message: stage: .post rules: - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + when: never variables: PROJECT_ID: "${CI_PROJECT_ID}" PROJECT_NAME: "${CI_PROJECT_NAME}"