From 9ea58f41524936b9422d9c46bbdaf78b14b000bf Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 13 Sep 2023 17:48:01 +0200 Subject: [PATCH 01/52] Add randomness to pallet-collator-assignment --- Cargo.lock | 3 ++ Cargo.toml | 2 + pallets/collator-assignment/Cargo.toml | 4 +- pallets/collator-assignment/src/lib.rs | 7 ++- pallets/collator-assignment/src/mock.rs | 2 + runtime/dancebox/Cargo.toml | 3 +- runtime/dancebox/src/lib.rs | 66 ++++++++++++++++++++++++- runtime/dancebox/tests/common/mod.rs | 30 +++++++++++ 8 files changed, 111 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 59dd076ef..b679d73b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2597,8 +2597,10 @@ dependencies = [ "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", "cumulus-primitives-timestamp", "cumulus-primitives-utility", + "cumulus-test-relay-sproof-builder", "frame-benchmarking", "frame-executive", "frame-support", @@ -7187,6 +7189,7 @@ dependencies = [ "log", "parity-scale-codec", "rand 0.8.5", + "rand_chacha 0.3.1", "scale-info", "serde", "sp-core", diff --git a/Cargo.toml b/Cargo.toml index 1f732ce58..43c2d7ace 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -183,6 +183,7 @@ cumulus-client-pov-recovery = { git = "https://github.com/moondance-labs/cumulus cumulus-client-service = { git = "https://github.com/moondance-labs/cumulus", branch = "tanssi-polkadot-v0.9.43", default-features = false } cumulus-primitives-parachain-inherent = { git = "https://github.com/moondance-labs/cumulus", branch = "tanssi-polkadot-v0.9.43", default-features = false } cumulus-relay-chain-interface = { git = "https://github.com/moondance-labs/cumulus", branch = "tanssi-polkadot-v0.9.43", default-features = false } +cumulus-test-relay-sproof-builder = { git = "https://github.com/moondance-labs/cumulus", branch = "tanssi-polkadot-v0.9.43", default-features = false } xcm-emulator = { git = "https://github.com/moondance-labs/cumulus", branch = "tanssi-polkadot-v0.9.43", default-features = false } # Frontier (wasm) @@ -216,6 +217,7 @@ hex-literal = { version = "0.3.4" } log = { version = "0.4.17", default-features = false } serde = { version = "1.0.152", default-features = false } smallvec = "1.10.0" +rand_chacha = { version = "0.3.1", default-features = false } # General (client) async-io = "1.3" diff --git a/pallets/collator-assignment/Cargo.toml b/pallets/collator-assignment/Cargo.toml index b957c13b5..0e55cb101 100644 --- a/pallets/collator-assignment/Cargo.toml +++ b/pallets/collator-assignment/Cargo.toml @@ -21,7 +21,8 @@ sp-std = { workspace = true } tp-collator-assignment = { workspace = true } tp-traits = { workspace = true } frame-benchmarking = { workspace = true } -rand = { workspace = true, optional = true } +rand = { workspace = true } +rand_chacha = { workspace = true } [dev-dependencies] sp-io = { workspace = true } @@ -44,7 +45,6 @@ runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "rand", "tp-traits/runtime-benchmarks", ] try-runtime = [ "frame-support/try-runtime" ] diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index 2e59067e0..715c5a770 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -45,6 +45,8 @@ pub use pallet::*; use { crate::weights::WeightInfo, frame_support::pallet_prelude::*, + rand::{seq::SliceRandom, SeedableRng}, + rand_chacha::ChaCha20Rng, sp_runtime::{ traits::{AtLeast32BitUnsigned, One, Zero}, Saturating, @@ -271,8 +273,11 @@ pub mod pallet { pub fn initializer_on_new_session( session_index: &T::SessionIndex, - collators: Vec, + random_seed: [u8; 32], + mut collators: Vec, ) -> SessionChangeOutcome { + let mut rng: ChaCha20Rng = SeedableRng::from_seed(random_seed); + collators.shuffle(&mut rng); let num_collators = collators.len(); let assigned_collators = Self::assign_collators(session_index, collators); let num_parachains = assigned_collators.next_assignment.container_chains.len(); diff --git a/pallets/collator-assignment/src/mock.rs b/pallets/collator-assignment/src/mock.rs index 8de34fc0f..44e72b07b 100644 --- a/pallets/collator-assignment/src/mock.rs +++ b/pallets/collator-assignment/src/mock.rs @@ -187,11 +187,13 @@ pub fn run_to_block(n: u64) { for x in (old_block_number + 1)..=n { System::set_block_number(x); + let randomness = [0u8; 32]; if x % session_len == 1 { let session_index = (x / session_len) as u32; CollatorAssignment::initializer_on_new_session( &session_index, + randomness, CollatorsGetter::collators(session_index), ); } diff --git a/runtime/dancebox/Cargo.toml b/runtime/dancebox/Cargo.toml index 8ad0ea588..c1516b16b 100644 --- a/runtime/dancebox/Cargo.toml +++ b/runtime/dancebox/Cargo.toml @@ -85,7 +85,6 @@ cumulus-pallet-parachain-system = { workspace = true } cumulus-pallet-session-benchmarking = { workspace = true } cumulus-pallet-xcm = { workspace = true } cumulus-pallet-xcmp-queue = { workspace = true } - cumulus-primitives-core = { workspace = true } cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } @@ -100,6 +99,8 @@ frame-try-runtime = { workspace = true, optional = true } [dev-dependencies] container-chain-template-frontier-runtime = { workspace = true, features = [ "std" ] } container-chain-template-simple-runtime = { workspace = true, features = [ "std" ] } +cumulus-primitives-parachain-inherent = { workspace = true } +cumulus-test-relay-sproof-builder = { workspace = true } hex-literal = { workspace = true } pallet-im-online = { workspace = true, features = [ "std" ] } pallet-message-queue = { workspace = true } diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index 90fbe71ff..9187ef4dc 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -34,7 +34,9 @@ pub mod migrations; pub mod weights; use { + cumulus_pallet_parachain_system::RelayChainStateProof, cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases, + cumulus_primitives_core::relay_chain, cumulus_primitives_core::{relay_chain::SessionIndex, BodyId, ParaId}, frame_support::{ construct_runtime, @@ -431,6 +433,51 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases; } +/// Only callable after `set_validation_data` is called which forms this proof the same way +fn relay_chain_state_proof() -> RelayChainStateProof { + let relay_storage_root = ParachainSystem::validation_data() + .expect("set in `set_validation_data`") + .relay_parent_storage_root; + let relay_chain_state = + ParachainSystem::relay_state_proof().expect("set in `set_validation_data`"); + RelayChainStateProof::new(ParachainInfo::get(), relay_storage_root, relay_chain_state) + .expect("Invalid relay chain state proof, already constructed in `set_validation_data`") +} + +pub struct BabeDataGetter; +impl BabeDataGetter { + /* + // Tolerate panic here because only ever called in inherent (so can be omitted) + fn get_epoch_index() -> u64 { + if cfg!(feature = "runtime-benchmarks") { + // storage reads as per actual reads + let _relay_storage_root = ParachainSystem::validation_data(); + let _relay_chain_state = ParachainSystem::relay_state_proof(); + const BENCHMARKING_NEW_EPOCH: u64 = 10u64; + return BENCHMARKING_NEW_EPOCH; + } + relay_chain_state_proof() + .read_optional_entry(relay_chain::well_known_keys::EPOCH_INDEX) + .ok() + .flatten() + .expect("expected to be able to read epoch index from relay chain state proof") + } + */ + fn get_epoch_randomness() -> Option { + if cfg!(feature = "runtime-benchmarks") { + // storage reads as per actual reads + let _relay_storage_root = ParachainSystem::validation_data(); + let _relay_chain_state = ParachainSystem::relay_state_proof(); + let benchmarking_babe_output = Hash::default(); + return Some(benchmarking_babe_output); + } + relay_chain_state_proof() + .read_optional_entry(relay_chain::well_known_keys::ONE_EPOCH_AGO_RANDOMNESS) + .ok() + .flatten() + } +} + pub struct OwnApplySession; impl pallet_initializer::ApplyNewSession for OwnApplySession { fn apply_new_session( @@ -439,6 +486,18 @@ impl pallet_initializer::ApplyNewSession for OwnApplySession { all_validators: Vec<(AccountId, NimbusId)>, queued: Vec<(AccountId, NimbusId)>, ) { + let random_seed = { + let mut buf = [0u8; 32]; + // TODO: mix some key like b"paras" + let random_hash = BabeDataGetter::get_epoch_randomness().unwrap(); + // TODO: audit usage of randomness API + // https://github.com/paritytech/polkadot/issues/2601 + //let (random_hash, _) = pallet_babe::RandomnessFromOneEpochAgo::::random(&b"paras"[..]); + let len = sp_std::cmp::min(32, random_hash.as_ref().len()); + buf[..len].copy_from_slice(&random_hash.as_ref()[..len]); + buf + }; + // We first initialize Configuration Configuration::initializer_on_new_session(&session_index); // Next: Registrar @@ -449,8 +508,11 @@ impl pallet_initializer::ApplyNewSession for OwnApplySession { let next_collators = queued.iter().map(|(k, _)| k.clone()).collect(); // Next: CollatorAssignment - let assignments = - CollatorAssignment::initializer_on_new_session(&session_index, next_collators); + let assignments = CollatorAssignment::initializer_on_new_session( + &session_index, + random_seed, + next_collators, + ); let queued_id_to_nimbus_map = queued.iter().cloned().collect(); AuthorityAssignment::initializer_on_new_session( diff --git a/runtime/dancebox/tests/common/mod.rs b/runtime/dancebox/tests/common/mod.rs index 960ef13a2..ff79d5af8 100644 --- a/runtime/dancebox/tests/common/mod.rs +++ b/runtime/dancebox/tests/common/mod.rs @@ -16,6 +16,7 @@ use { cumulus_primitives_core::{ParaId, PersistedValidationData}, + cumulus_primitives_parachain_inherent::ParachainInherentData, dancebox_runtime::{AuthorInherent, AuthorityAssignment}, frame_support::{ assert_ok, @@ -78,6 +79,8 @@ pub fn run_to_block(n: u32) { &pre_digest, ); + set_parachain_inherent_data(); + // Initialize the new block Session::on_initialize(System::block_number()); Initializer::on_initialize(System::block_number()); @@ -93,6 +96,32 @@ pub fn run_to_block(n: u32) { } } +// Mock the inherent that sets validation data in ParachainSystem, which +/// contains the `relay_chain_block_number`, which is used in `author-filter` as a +/// source of randomness to filter valid authors at each block. +pub fn set_parachain_inherent_data() { + use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder; + let (relay_parent_storage_root, relay_chain_state) = + RelayStateSproofBuilder::default().into_state_root_and_proof(); + let vfp = PersistedValidationData { + relay_parent_number: 1u32, + relay_parent_storage_root, + ..Default::default() + }; + let parachain_inherent_data = ParachainInherentData { + validation_data: vfp, + relay_chain_state: relay_chain_state, + downward_messages: Default::default(), + horizontal_messages: Default::default(), + }; + assert_ok!(RuntimeCall::ParachainSystem( + cumulus_pallet_parachain_system::Call::::set_validation_data { + data: parachain_inherent_data + } + ) + .dispatch(inherent_origin())); +} + #[derive(Default)] pub struct ExtBuilder { // endowed accounts with balances @@ -245,6 +274,7 @@ impl ExtBuilder { ext.execute_with(|| { System::set_block_number(1); + set_parachain_inherent_data(); }); ext } From e2d8b30e6a4b7fcea62cfb5c182dbb53828a4e9c Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 14 Sep 2023 12:10:25 +0200 Subject: [PATCH 02/52] Mock randomness inherent in tests --- runtime/dancebox/src/lib.rs | 8 ++++++-- runtime/dancebox/tests/common/mod.rs | 2 -- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index 9187ef4dc..dd37c0e1d 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -486,9 +486,10 @@ impl pallet_initializer::ApplyNewSession for OwnApplySession { all_validators: Vec<(AccountId, NimbusId)>, queued: Vec<(AccountId, NimbusId)>, ) { - let random_seed = { + let random_seed = if session_index != 0 { let mut buf = [0u8; 32]; - // TODO: mix some key like b"paras" + // TODO: mix some key like b"paras" and also the block number to ensure the seed changes + // on every tanssi block let random_hash = BabeDataGetter::get_epoch_randomness().unwrap(); // TODO: audit usage of randomness API // https://github.com/paritytech/polkadot/issues/2601 @@ -496,6 +497,9 @@ impl pallet_initializer::ApplyNewSession for OwnApplySession { let len = sp_std::cmp::min(32, random_hash.as_ref().len()); buf[..len].copy_from_slice(&random_hash.as_ref()[..len]); buf + } else { + // On genesis, there is no randomness + [0; 32] }; // We first initialize Configuration diff --git a/runtime/dancebox/tests/common/mod.rs b/runtime/dancebox/tests/common/mod.rs index ff79d5af8..ee0b13ae5 100644 --- a/runtime/dancebox/tests/common/mod.rs +++ b/runtime/dancebox/tests/common/mod.rs @@ -79,8 +79,6 @@ pub fn run_to_block(n: u32) { &pre_digest, ); - set_parachain_inherent_data(); - // Initialize the new block Session::on_initialize(System::block_number()); Initializer::on_initialize(System::block_number()); From b56ad1935c7985f6b256b9d43781085e48c68344 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 14 Sep 2023 18:06:25 +0200 Subject: [PATCH 03/52] Do not shuffle collators if seed is 0 --- pallets/collator-assignment/src/lib.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index 715c5a770..f57dd133e 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -276,8 +276,12 @@ pub mod pallet { random_seed: [u8; 32], mut collators: Vec, ) -> SessionChangeOutcome { - let mut rng: ChaCha20Rng = SeedableRng::from_seed(random_seed); - collators.shuffle(&mut rng); + // If the random_seed is all zeros, we don't shuffle the list of collators + // This should only happen in tests, and in the genesis block + if random_seed != [0; 32] { + let mut rng: ChaCha20Rng = SeedableRng::from_seed(random_seed); + collators.shuffle(&mut rng); + } let num_collators = collators.len(); let assigned_collators = Self::assign_collators(session_index, collators); let num_parachains = assigned_collators.next_assignment.container_chains.len(); From eac5238917a91088e31ade222509e12b10bf49e3 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 14 Sep 2023 18:31:42 +0200 Subject: [PATCH 04/52] Fix benchmarks --- .../collator-assignment/src/benchmarking.rs | 4 ++- pallets/collator-assignment/src/lib.rs | 29 ++++++++++--------- runtime/dancebox/src/lib.rs | 1 + 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/pallets/collator-assignment/src/benchmarking.rs b/pallets/collator-assignment/src/benchmarking.rs index 105bd38cc..b166b0bfb 100644 --- a/pallets/collator-assignment/src/benchmarking.rs +++ b/pallets/collator-assignment/src/benchmarking.rs @@ -75,10 +75,12 @@ mod benchmarks { container_chains: BTreeMap::from_iter(old_container_chains), }; >::put(&old_assigned); + // Do not use [0; 32] because that seed will not shuffle the list of collators + let random_seed = [1; 32]; #[block] { - >::initializer_on_new_session(&session_index, collators); + >::initializer_on_new_session(&session_index, random_seed, collators); } // Assignment changed diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index f57dd133e..9658f6546 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -123,8 +123,16 @@ pub mod pallet { /// collators should be queued collators pub fn assign_collators( current_session_index: &T::SessionIndex, - collators: Vec, + random_seed: [u8; 32], + mut collators: Vec, ) -> SessionChangeOutcome { + // If the random_seed is all zeros, we don't shuffle the list of collators + // This should only happen in tests, and in the genesis block + if random_seed != [0; 32] { + let mut rng: ChaCha20Rng = SeedableRng::from_seed(random_seed); + collators.shuffle(&mut rng); + } + // We work with one session delay to calculate assignments let session_delay = T::SessionIndex::one(); let target_session_index = current_session_index.saturating_add(session_delay); @@ -179,6 +187,9 @@ pub mod pallet { /// Assign new collators to missing container_chains. /// Old collators always have preference to remain on the same chain. /// If there are no missing collators, nothing is changed. + /// `container_chain_ids` should be shuffled or at least rotated on every session, because + /// that order affects container chain priority: the first container chain on that list will + /// be the first one to get new collators. fn assign_collators_always_keep_old( collators: Vec, container_chain_ids: &[ParaId], @@ -198,10 +209,8 @@ pub mod pallet { new_assigned.remove_container_chain_excess_collators(num_each_container_chain); // Collators that are not present in old_assigned - // TODO: unless we save all the old_collators somewhere, it is still possible for a - // collator to change from container_chain 1001 to None to 1002 - // And ideally that should not happen until the automatic chain rotation is implemented - // But the current implementation allows changes, even without passing through None + // This is used to keep track of which collators are old and which ones are new, to keep + // the old collators on the same chain if possible. let mut new_collators = vec![]; for c in collators { if !new_assigned.find_collator(&c) && !extra_orchestrator_collators.contains(&c) { @@ -274,16 +283,10 @@ pub mod pallet { pub fn initializer_on_new_session( session_index: &T::SessionIndex, random_seed: [u8; 32], - mut collators: Vec, + collators: Vec, ) -> SessionChangeOutcome { - // If the random_seed is all zeros, we don't shuffle the list of collators - // This should only happen in tests, and in the genesis block - if random_seed != [0; 32] { - let mut rng: ChaCha20Rng = SeedableRng::from_seed(random_seed); - collators.shuffle(&mut rng); - } let num_collators = collators.len(); - let assigned_collators = Self::assign_collators(session_index, collators); + let assigned_collators = Self::assign_collators(session_index, random_seed, collators); let num_parachains = assigned_collators.next_assignment.container_chains.len(); frame_system::Pallet::::register_extra_weight_unchecked( diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index dd37c0e1d..ec14431a1 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -471,6 +471,7 @@ impl BabeDataGetter { let benchmarking_babe_output = Hash::default(); return Some(benchmarking_babe_output); } + // TODO: use CURRENT_BLOCK_RANDOMNESS instead relay_chain_state_proof() .read_optional_entry(relay_chain::well_known_keys::ONE_EPOCH_AGO_RANDOMNESS) .ok() From 72f0755f808839acba1fa3a60a4d9caa8b495e26 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 14 Sep 2023 18:39:23 +0200 Subject: [PATCH 05/52] Merge the functions to add and fill new container chains into one --- pallets/collator-assignment/src/lib.rs | 12 ++++++----- primitives/collator-assignment/src/lib.rs | 26 +++++++++++++++-------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index 9658f6546..bb9bb4916 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -187,9 +187,10 @@ pub mod pallet { /// Assign new collators to missing container_chains. /// Old collators always have preference to remain on the same chain. /// If there are no missing collators, nothing is changed. - /// `container_chain_ids` should be shuffled or at least rotated on every session, because - /// that order affects container chain priority: the first container chain on that list will - /// be the first one to get new collators. + /// + /// `container_chain_ids` should be shuffled or at least rotated on every session to ensure + /// a fair distribution, because the order of that list affects container chain priority: + /// the first container chain on that list will be the first one to get new collators. fn assign_collators_always_keep_old( collators: Vec, container_chain_ids: &[ParaId], @@ -230,9 +231,10 @@ pub mod pallet { let mut new_plus_extra_collators = new_collators .by_ref() .chain(&mut extra_orchestrator_collators); - new_assigned.add_new_container_chains(container_chain_ids); - new_assigned.fill_container_chain_collators( + + new_assigned.add_and_fill_new_container_chains_in_order( num_each_container_chain, + container_chain_ids, &mut new_plus_extra_collators, ); diff --git a/primitives/collator-assignment/src/lib.rs b/primitives/collator-assignment/src/lib.rs index d1f341933..75ab5eab3 100644 --- a/primitives/collator-assignment/src/lib.rs +++ b/primitives/collator-assignment/src/lib.rs @@ -97,6 +97,13 @@ where } } + /// Fill orchestrator chain with collators until it has `num_orchestrator_chain`. + /// + /// If the `next_collator` iterator does not have enough elements, this function will try to + /// fill the list as much as it can. + /// + /// Call `remove_orchestrator_chain_excess_collators` before calling this function to ensure + /// that the list has no more than `num_orchestrator_chain`. pub fn fill_orchestrator_chain_collators( &mut self, num_orchestrator_chain: usize, @@ -113,30 +120,31 @@ where } } - pub fn fill_container_chain_collators( + /// For each container chain in `container_chains`, add it to the list if it didn't already + /// exist, and fill it with collators. The order determines priority. + pub fn add_and_fill_new_container_chains_in_order( &mut self, num_each_container_chain: usize, + container_chains: &[ParaId], next_collator: &mut I, ) where I: Iterator, { - for (_id, cs) in self.container_chains.iter_mut() { + for para_id in container_chains { + let cs = self.container_chains.entry(*para_id).or_default(); + while cs.len() < num_each_container_chain { if let Some(nc) = next_collator.next() { cs.push(nc); } else { - return; + // No more collators but continue the outer for loop to add all the remaining + // container chains + break; } } } } - pub fn add_new_container_chains(&mut self, container_chains: &[ParaId]) { - for para_id in container_chains { - self.container_chains.entry(*para_id).or_default(); - } - } - /// Check container chains and remove all collators from container chains /// that do not reach the target number of collators. Reassign those to other /// container chains. From cb342ff5fd7b8f85e87163c23cf37109a36a5b89 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 14 Sep 2023 18:47:21 +0200 Subject: [PATCH 06/52] Shuffle list of container chains as well --- pallets/collator-assignment/src/lib.rs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index bb9bb4916..36d66dd9a 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -126,19 +126,22 @@ pub mod pallet { random_seed: [u8; 32], mut collators: Vec, ) -> SessionChangeOutcome { - // If the random_seed is all zeros, we don't shuffle the list of collators - // This should only happen in tests, and in the genesis block - if random_seed != [0; 32] { - let mut rng: ChaCha20Rng = SeedableRng::from_seed(random_seed); - collators.shuffle(&mut rng); - } - // We work with one session delay to calculate assignments let session_delay = T::SessionIndex::one(); let target_session_index = current_session_index.saturating_add(session_delay); // We get the containerChains that we will have at the target session - let container_chain_ids = + let mut container_chain_ids = T::ContainerChains::session_container_chains(target_session_index); + + // If the random_seed is all zeros, we don't shuffle the list of collators nor the list + // of container chains. + // This should only happen in tests, and in the genesis block. + if random_seed != [0; 32] { + let mut rng: ChaCha20Rng = SeedableRng::from_seed(random_seed); + collators.shuffle(&mut rng); + container_chain_ids.shuffle(&mut rng); + } + // We read current assigned collators let old_assigned = Self::read_assigned_collators(); // We assign new collators From d5ad1b57c28192557990a17a3bd1b736c0370ef5 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 14 Sep 2023 19:00:57 +0200 Subject: [PATCH 07/52] Add config parameter to force collator rotation --- pallets/collator-assignment/src/lib.rs | 4 +++- pallets/collator-assignment/src/mock.rs | 23 ++++++++++++++++++++++- primitives/traits/src/lib.rs | 5 +++++ runtime/dancebox/src/lib.rs | 14 ++++++++++++++ 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index 36d66dd9a..2c899749d 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -54,7 +54,8 @@ use { sp_std::{prelude::*, vec}, tp_collator_assignment::AssignedCollators, tp_traits::{ - GetContainerChainAuthor, GetHostConfiguration, GetSessionContainerChains, ParaId, Slot, + GetContainerChainAuthor, GetHostConfiguration, GetSessionContainerChains, ParaId, + ShouldRotateAllCollators, Slot, }, }; @@ -85,6 +86,7 @@ pub mod pallet { // which guarantees that at least one full session has passed before any changes are applied. type HostConfiguration: GetHostConfiguration; type ContainerChains: GetSessionContainerChains; + type ShouldRotateAllCollators: ShouldRotateAllCollators; /// The weight information of this pallet. type WeightInfo: WeightInfo; } diff --git a/pallets/collator-assignment/src/mock.rs b/pallets/collator-assignment/src/mock.rs index 44e72b07b..adb60c4d4 100644 --- a/pallets/collator-assignment/src/mock.rs +++ b/pallets/collator-assignment/src/mock.rs @@ -16,7 +16,10 @@ use { crate::{self as pallet_collator_assignment}, - frame_support::traits::{ConstU16, ConstU64}, + frame_support::{ + parameter_types, + traits::{ConstU16, ConstU64, Get}, + }, frame_system as system, parity_scale_codec::{Decode, Encode}, sp_core::H256, @@ -24,7 +27,9 @@ use { testing::Header, traits::{BlakeTwo256, IdentityLookup}, }, + std::marker::PhantomData, tp_traits::ParaId, + tp_traits::ShouldRotateAllCollators, }; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; @@ -162,10 +167,26 @@ impl tp_traits::GetSessionContainerChains for ContainerChainsGetter { } } +pub struct RotateCollatorsEveryNSessions(PhantomData); + +impl ShouldRotateAllCollators for RotateCollatorsEveryNSessions +where + Period: Get, +{ + fn should_rotate_all_collators(session_index: u32) -> bool { + session_index % Period::get() == 0 + } +} + +parameter_types! { + pub const CollatorRotationSessionPeriod: u32 = 5; +} + impl pallet_collator_assignment::Config for Test { type SessionIndex = u32; type HostConfiguration = HostConfigurationGetter; type ContainerChains = ContainerChainsGetter; + type ShouldRotateAllCollators = RotateCollatorsEveryNSessions; type WeightInfo = (); } diff --git a/primitives/traits/src/lib.rs b/primitives/traits/src/lib.rs index 6e753f071..68b17b37a 100644 --- a/primitives/traits/src/lib.rs +++ b/primitives/traits/src/lib.rs @@ -57,3 +57,8 @@ pub trait GetHostConfiguration { pub trait GetSessionIndex { fn session_index() -> SessionIndex; } + +/// Should pallet_collator_assignment trigger a full rotation on this session? +pub trait ShouldRotateAllCollators { + fn should_rotate_all_collators(session_index: SessionIndex) -> bool; +} diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index ec14431a1..3e54706ff 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -77,6 +77,7 @@ use { }, sp_std::{marker::PhantomData, prelude::*}, sp_version::RuntimeVersion, + tp_traits::ShouldRotateAllCollators, }; pub use { sp_runtime::{MultiAddress, Perbill, Permill}, @@ -591,6 +592,7 @@ impl SessionManager for CollatorsFromInvulnerablesAndThenFromStaking parameter_types! { pub const Period: u32 = prod_or_fast!(1 * HOURS, 1 * MINUTES); pub const Offset: u32 = 0; + pub const CollatorRotationSessionPeriod: u32 = 5; } impl pallet_session::Config for Runtime { @@ -607,10 +609,22 @@ impl pallet_session::Config for Runtime { type WeightInfo = pallet_session::weights::SubstrateWeight; } +pub struct RotateCollatorsEveryNSessions(PhantomData); + +impl ShouldRotateAllCollators for RotateCollatorsEveryNSessions +where + Period: Get, +{ + fn should_rotate_all_collators(session_index: SessionIndex) -> bool { + session_index % Period::get() == 0 + } +} + impl pallet_collator_assignment::Config for Runtime { type HostConfiguration = Configuration; type ContainerChains = Registrar; type SessionIndex = u32; + type ShouldRotateAllCollators = RotateCollatorsEveryNSessions; type WeightInfo = pallet_collator_assignment::weights::SubstrateWeight; } From 5bd49e3f2cb69c676c9dc40d2122fda1c5b81a02 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 14 Sep 2023 19:14:43 +0200 Subject: [PATCH 08/52] Rotate collators according to config param --- .../collator-assignment/src/benchmarking.rs | 3 + pallets/collator-assignment/src/lib.rs | 55 ++++++++++++++++--- 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/pallets/collator-assignment/src/benchmarking.rs b/pallets/collator-assignment/src/benchmarking.rs index b166b0bfb..896dea01c 100644 --- a/pallets/collator-assignment/src/benchmarking.rs +++ b/pallets/collator-assignment/src/benchmarking.rs @@ -91,6 +91,9 @@ mod benchmarks { 0 ); + // TODO: make sure this did not call assign_collators_rotate_all, because that's cheaper + // than assign_collators_always_keep_old. + Ok(()) } diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index 2c899749d..1cff36b58 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -148,14 +148,31 @@ pub mod pallet { let old_assigned = Self::read_assigned_collators(); // We assign new collators // we use the config scheduled at the target_session_index - let new_assigned = Self::assign_collators_always_keep_old( - collators, - &container_chain_ids, - T::HostConfiguration::min_collators_for_orchestrator(target_session_index) as usize, - T::HostConfiguration::max_collators_for_orchestrator(target_session_index) as usize, - T::HostConfiguration::collators_per_container(target_session_index) as usize, - old_assigned.clone(), - ); + let new_assigned = + if T::ShouldRotateAllCollators::should_rotate_all_collators(target_session_index) { + Self::assign_collators_rotate_all( + collators, + &container_chain_ids, + T::HostConfiguration::min_collators_for_orchestrator(target_session_index) + as usize, + T::HostConfiguration::max_collators_for_orchestrator(target_session_index) + as usize, + T::HostConfiguration::collators_per_container(target_session_index) + as usize, + ) + } else { + Self::assign_collators_always_keep_old( + collators, + &container_chain_ids, + T::HostConfiguration::min_collators_for_orchestrator(target_session_index) + as usize, + T::HostConfiguration::max_collators_for_orchestrator(target_session_index) + as usize, + T::HostConfiguration::collators_per_container(target_session_index) + as usize, + old_assigned.clone(), + ) + }; let mut pending = PendingCollatorContainerChain::::get(); let old_assigned_changed = old_assigned != new_assigned; @@ -189,6 +206,28 @@ pub mod pallet { } } + /// Recompute collator assignment from scratch. If the list of collators and the list of + /// container chains are shuffled, this returns a random assignment. + fn assign_collators_rotate_all( + collators: Vec, + container_chain_ids: &[ParaId], + min_num_orchestrator_chain: usize, + max_num_orchestrator_chain: usize, + num_each_container_chain: usize, + ) -> AssignedCollators { + // This is just the "always_keep_old" algorithm but with an empty "old" + let old_assigned = Default::default(); + + Self::assign_collators_always_keep_old( + collators, + container_chain_ids, + min_num_orchestrator_chain, + max_num_orchestrator_chain, + num_each_container_chain, + old_assigned, + ) + } + /// Assign new collators to missing container_chains. /// Old collators always have preference to remain on the same chain. /// If there are no missing collators, nothing is changed. From cddb14954e1bb8cc57858dc2279968703b547fd6 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 18 Sep 2023 10:08:39 +0200 Subject: [PATCH 09/52] WIP tests --- runtime/dancebox/tests/integration_test.rs | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/runtime/dancebox/tests/integration_test.rs b/runtime/dancebox/tests/integration_test.rs index e233c3055..6400b6421 100644 --- a/runtime/dancebox/tests/integration_test.rs +++ b/runtime/dancebox/tests/integration_test.rs @@ -1561,6 +1561,50 @@ fn test_author_noting_not_self_para() { }); } +#[test] +fn test_author_noting_rotation() { + ExtBuilder::default() + .with_balances(vec![ + // Alice gets 10k extra tokens for her mapping deposit + (AccountId::from(ALICE), 210_000 * UNIT), + (AccountId::from(BOB), 100_000 * UNIT), + (AccountId::from(CHARLIE), 100_000 * UNIT), + (AccountId::from(DAVE), 100_000 * UNIT), + ]) + .with_collators(vec![ + (AccountId::from(ALICE), 210 * UNIT), + (AccountId::from(BOB), 100 * UNIT), + (AccountId::from(CHARLIE), 100 * UNIT), + (AccountId::from(DAVE), 100 * UNIT), + ]) + .with_para_ids(vec![ + (1001, empty_genesis_data(), vec![]), + (1002, empty_genesis_data(), vec![]), + ]) + .build() + .execute_with(|| { + let mut sproof = ParaHeaderSproofBuilder::default(); + let slot: u64 = 5; + let other_para: ParaId = 1001u32.into(); + + // Charlie and Dave to 1001 + let assignment = CollatorAssignment::collator_container_chain(); + let initial_assignment = assignment.clone(); + assert_eq!( + assignment.container_chains[&1001u32.into()], + vec![CHARLIE.into(), DAVE.into()] + ); + + for i in 1..20 { + println!("goto session {}", i); + run_to_session(i); + + let assignment = CollatorAssignment::collator_container_chain(); + assert_eq!(assignment, initial_assignment); + } + }); +} + #[test] fn test_author_noting_runtime_api() { ExtBuilder::default() From 8553f9f0cdce23d2a31c0d3c89520e16736f4762 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 20 Sep 2023 13:02:21 +0200 Subject: [PATCH 10/52] Use shuffled order in reorganize_collators function And add unrelated test --- pallets/collator-assignment/src/lib.rs | 5 ++- pallets/collator-assignment/src/tests.rs | 48 +++++++++++++++++++++++ primitives/collator-assignment/src/lib.rs | 9 ++++- 3 files changed, 59 insertions(+), 3 deletions(-) diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index 1cff36b58..11527edfb 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -300,7 +300,10 @@ pub mod pallet { // [2, 2, 0, 0, 0] // and assign 1 extra collator to the orchestrator chain, if needed. let incomplete_container_chains_collators = new_assigned - .reorganize_incomplete_container_chains_collators(num_each_container_chain); + .reorganize_incomplete_container_chains_collators( + container_chain_ids, + num_each_container_chain, + ); // Assign collators from container chains that do not reach // "num_each_container_chain" to orchestrator chain diff --git a/pallets/collator-assignment/src/tests.rs b/pallets/collator-assignment/src/tests.rs index 006973c0d..428036d00 100644 --- a/pallets/collator-assignment/src/tests.rs +++ b/pallets/collator-assignment/src/tests.rs @@ -638,3 +638,51 @@ fn assign_collators_reorganize_container_chains_if_not_enough_collators() { ); }); } + +#[test] +fn assign_collators_set_zero_per_container() { + new_test_ext().execute_with(|| { + run_to_block(1); + + MockData::mutate(|m| { + m.collators_per_container = 2; + m.min_orchestrator_chain_collators = 2; + m.max_orchestrator_chain_collators = 5; + + m.collators = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; + m.container_chains = vec![1001, 1002, 1003, 1004]; + }); + assert_eq!(assigned_collators(), BTreeMap::new(),); + run_to_block(11); + + assert_eq!( + assigned_collators(), + BTreeMap::from_iter(vec![ + (1, 999), + (2, 999), + (3, 1001), + (4, 1001), + (5, 1002), + (6, 1002), + (7, 1003), + (8, 1003), + (9, 1004), + (10, 1004), + (11, 999), + (12, 999) + ]), + ); + + MockData::mutate(|m| { + // We don't want to assign collators to container chains anymore + m.collators_per_container = 0; + }); + run_to_block(21); + + // There are 5 collators in total: 0x4 container chains, plus 5 in the orchestrator chain + assert_eq!( + assigned_collators(), + BTreeMap::from_iter(vec![(1, 999), (2, 999), (3, 999), (11, 999), (12, 999),]), + ); + }); +} diff --git a/primitives/collator-assignment/src/lib.rs b/primitives/collator-assignment/src/lib.rs index 75ab5eab3..f9b7a8ca7 100644 --- a/primitives/collator-assignment/src/lib.rs +++ b/primitives/collator-assignment/src/lib.rs @@ -147,17 +147,21 @@ where /// Check container chains and remove all collators from container chains /// that do not reach the target number of collators. Reassign those to other - /// container chains. + /// container chains, giving priority to the container chains with most collators + /// first, and in case of tie the container chains that appear first in the input + /// `container_chains` parameter. /// /// Returns the collators that could not be assigned to any container chain, /// those can be assigned to the orchestrator chain by the caller. pub fn reorganize_incomplete_container_chains_collators( &mut self, + container_chains: &[ParaId], num_each_container_chain: usize, ) -> Vec { let mut incomplete_container_chains: VecDeque<_> = VecDeque::new(); - for (para_id, collators) in self.container_chains.iter_mut() { + for para_id in container_chains { + let collators = self.container_chains.entry(*para_id).or_default(); if !collators.is_empty() && collators.len() < num_each_container_chain { // Do not remove the para_id from the map, instead replace the list of // collators with an empty vec using mem::take. @@ -168,6 +172,7 @@ where } } + // Stable sort because we want to keep input order in case of tie incomplete_container_chains .make_contiguous() .sort_by_key(|(_para_id, collators)| collators.len()); From f864585f7d159b645553e793a55bc8bfd8765760 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 20 Sep 2023 15:05:44 +0200 Subject: [PATCH 11/52] Use per-block randomness instead of per-epoch randomness Breaks zombienet tests because the collator2002 is not assigned to container chain 2002 --- pallets/collator-assignment/src/lib.rs | 5 +++++ runtime/dancebox/src/lib.rs | 3 +-- runtime/dancebox/tests/common/mod.rs | 12 ++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index 11527edfb..7fe1f1555 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -150,6 +150,11 @@ pub mod pallet { // we use the config scheduled at the target_session_index let new_assigned = if T::ShouldRotateAllCollators::should_rotate_all_collators(target_session_index) { + log::info!( + "Collator assignment: rotating collators. Seed: {:?}", + random_seed + ); + Self::assign_collators_rotate_all( collators, &container_chain_ids, diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index 0ebd0dbda..ffc75b18d 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -475,9 +475,8 @@ impl BabeDataGetter { let benchmarking_babe_output = Hash::default(); return Some(benchmarking_babe_output); } - // TODO: use CURRENT_BLOCK_RANDOMNESS instead relay_chain_state_proof() - .read_optional_entry(relay_chain::well_known_keys::ONE_EPOCH_AGO_RANDOMNESS) + .read_optional_entry(relay_chain::well_known_keys::CURRENT_BLOCK_RANDOMNESS) .ok() .flatten() } diff --git a/runtime/dancebox/tests/common/mod.rs b/runtime/dancebox/tests/common/mod.rs index ee0b13ae5..517d6785f 100644 --- a/runtime/dancebox/tests/common/mod.rs +++ b/runtime/dancebox/tests/common/mod.rs @@ -37,6 +37,7 @@ use { mod xcm; +use cumulus_primitives_core::relay_chain::well_known_keys; use dancebox_runtime::MaxLengthTokenSymbol; pub use dancebox_runtime::{ AccountId, Balance, Balances, Initializer, ParachainInfo, Registrar, Runtime, RuntimeCall, @@ -99,8 +100,15 @@ pub fn run_to_block(n: u32) { /// source of randomness to filter valid authors at each block. pub fn set_parachain_inherent_data() { use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder; - let (relay_parent_storage_root, relay_chain_state) = - RelayStateSproofBuilder::default().into_state_root_and_proof(); + let (relay_parent_storage_root, relay_chain_state) = { + let mut sproof = RelayStateSproofBuilder::default(); + sproof.additional_key_values.push(( + well_known_keys::CURRENT_BLOCK_RANDOMNESS.to_vec(), + cumulus_primitives_core::relay_chain::Hash::default().encode(), + )); + + sproof.into_state_root_and_proof() + }; let vfp = PersistedValidationData { relay_parent_number: 1u32, relay_parent_storage_root, From 6b7587cc5f994497b7eebba9ae25a2031d1b9bfb Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Fri, 22 Sep 2023 16:08:59 +0200 Subject: [PATCH 12/52] Dont check collator2002-01 dbpath Because a different collator may be assigned to container 2002 --- test/suites/para/test_tanssi_containers.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/test/suites/para/test_tanssi_containers.ts b/test/suites/para/test_tanssi_containers.ts index fab928647..9d10533e0 100644 --- a/test/suites/para/test_tanssi_containers.ts +++ b/test/suites/para/test_tanssi_containers.ts @@ -257,19 +257,8 @@ describeSuite({ // TODO: fix once we have types expect(registered3.toJSON().includes(2002)).to.be.false; - // The node should be syncing the container 2002, but not collating yet - // so it should still try to produce blocks in orchestrator chain. - // Use database path to check that the container chain started - // TODO: use collator rpc instead to check if the container chain is running, - // that's not possible now because we would need to guess the port number - - const container2002DbPath = - getTmpZombiePath() + - "/Collator2002-01/data/containers/chains/simple_container_2002/db/full-container-2002"; - expect(await directoryExists(container2002DbPath)).to.be.false; // The node starts one session before the container chain is in registered list await waitSessions(context, paraApi, 1); - expect(await directoryExists(container2002DbPath)).to.be.true; // Not registered yet, still pending const registered4 = await paraApi.query.registrar.registeredParaIds(); // TODO: fix once we have types From a34faff64bd92a0e8bd6c8969311e8d2258c93ac Mon Sep 17 00:00:00 2001 From: tmpolaczyk <44604217+tmpolaczyk@users.noreply.github.com> Date: Thu, 21 Sep 2023 17:48:36 +0200 Subject: [PATCH 13/52] Fix metrics server not stopping if there are open connections (#270) --- Cargo.lock | 369 ++++++++++++----------- test/configs/zombieTanssiMetrics.json | 82 +++++ test/moonwall.config.json | 28 ++ test/suites/metrics/test_metrics_stop.ts | 220 ++++++++++++++ 4 files changed, 515 insertions(+), 184 deletions(-) create mode 100644 test/configs/zombieTanssiMetrics.json create mode 100644 test/suites/metrics/test_metrics_stop.ts diff --git a/Cargo.lock b/Cargo.lock index 272dca55f..755f47e4f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -576,7 +576,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "hash-db 0.16.0", "log", @@ -3747,7 +3747,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "parity-scale-codec", ] @@ -3878,7 +3878,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-support", "frame-support-procedural", @@ -3903,7 +3903,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "Inflector", "array-bytes 4.2.0", @@ -3950,7 +3950,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3961,7 +3961,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3978,7 +3978,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-support", "frame-system", @@ -4007,7 +4007,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-recursion", "futures 0.3.28", @@ -4028,7 +4028,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "bitflags 1.3.2", "environmental", @@ -4062,7 +4062,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "Inflector", "cfg-expr", @@ -4078,7 +4078,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -4090,7 +4090,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "proc-macro2", "quote", @@ -4100,7 +4100,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "cfg-if", "frame-support", @@ -4119,7 +4119,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -4134,7 +4134,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "parity-scale-codec", "sp-api", @@ -4143,7 +4143,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-support", "parity-scale-codec", @@ -6195,7 +6195,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "futures 0.3.28", "log", @@ -6214,7 +6214,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "anyhow", "jsonrpsee", @@ -6845,7 +6845,7 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -6863,7 +6863,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -6957,7 +6957,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-support", "frame-system", @@ -6987,7 +6987,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-support", "frame-system", @@ -7001,7 +7001,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7025,7 +7025,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7045,7 +7045,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7074,7 +7074,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-support", "frame-system", @@ -7093,7 +7093,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "array-bytes 4.2.0", "binary-merkle-tree", @@ -7117,7 +7117,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7170,7 +7170,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7238,7 +7238,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7273,7 +7273,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "assert_matches", "frame-benchmarking", @@ -7290,7 +7290,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7324,7 +7324,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7347,7 +7347,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7360,7 +7360,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7465,7 +7465,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7483,7 +7483,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7522,7 +7522,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "enumflags2", "frame-benchmarking", @@ -7538,7 +7538,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7558,7 +7558,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7626,7 +7626,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7643,7 +7643,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "7.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7680,7 +7680,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7697,7 +7697,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7713,7 +7713,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7729,7 +7729,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-support", "frame-system", @@ -7746,7 +7746,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7766,7 +7766,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -7777,7 +7777,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-support", "frame-system", @@ -7794,7 +7794,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7839,7 +7839,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7856,7 +7856,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7871,7 +7871,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7889,7 +7889,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -7904,7 +7904,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "assert_matches", "frame-benchmarking", @@ -7956,7 +7956,7 @@ dependencies = [ [[package]] name = "pallet-root-testing" version = "1.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-support", "frame-system", @@ -7971,7 +7971,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -8005,7 +8005,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-support", "frame-system", @@ -8026,7 +8026,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -8042,7 +8042,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-support", "frame-system", @@ -8056,7 +8056,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -8079,7 +8079,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8090,7 +8090,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "log", "sp-arithmetic", @@ -8099,7 +8099,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "parity-scale-codec", "sp-api", @@ -8108,7 +8108,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -8125,7 +8125,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -8140,7 +8140,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -8158,7 +8158,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -8177,7 +8177,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-support", "frame-system", @@ -8193,7 +8193,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -8209,7 +8209,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -8221,7 +8221,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -8238,7 +8238,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -8254,7 +8254,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -8269,7 +8269,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-benchmarking", "frame-support", @@ -10988,7 +10988,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "log", "sp-core", @@ -10999,7 +10999,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "futures 0.3.28", @@ -11028,7 +11028,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "futures 0.3.28", "futures-timer", @@ -11051,7 +11051,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -11066,7 +11066,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -11085,7 +11085,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11096,7 +11096,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "array-bytes 4.2.0", "chrono", @@ -11136,7 +11136,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "fnv", "futures 0.3.28", @@ -11163,7 +11163,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "hash-db 0.16.0", "kvdb", @@ -11189,7 +11189,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "futures 0.3.28", @@ -11214,7 +11214,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "futures 0.3.28", @@ -11243,7 +11243,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "fork-tree", @@ -11279,7 +11279,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "futures 0.3.28", "jsonrpsee", @@ -11301,7 +11301,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "array-bytes 4.2.0", "async-channel", @@ -11337,7 +11337,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "futures 0.3.28", "jsonrpsee", @@ -11356,7 +11356,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "fork-tree", "parity-scale-codec", @@ -11369,7 +11369,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "ahash 0.8.3", "array-bytes 4.2.0", @@ -11409,7 +11409,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "finality-grandpa", "futures 0.3.28", @@ -11429,7 +11429,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "assert_matches", "async-trait", @@ -11464,7 +11464,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "futures 0.3.28", @@ -11487,7 +11487,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -11509,7 +11509,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -11521,7 +11521,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "anyhow", "cfg-if", @@ -11539,7 +11539,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "ansi_term", "futures 0.3.28", @@ -11555,7 +11555,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "array-bytes 4.2.0", "parking_lot 0.12.1", @@ -11569,7 +11569,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "array-bytes 4.2.0", "async-channel", @@ -11614,7 +11614,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-channel", "cid", @@ -11635,7 +11635,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -11663,7 +11663,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "ahash 0.8.3", "futures 0.3.28", @@ -11682,7 +11682,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "array-bytes 4.2.0", "async-channel", @@ -11705,7 +11705,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "array-bytes 4.2.0", "async-channel", @@ -11740,7 +11740,7 @@ dependencies = [ [[package]] name = "sc-network-test" version = "0.8.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "futures 0.3.28", @@ -11772,7 +11772,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "array-bytes 4.2.0", "futures 0.3.28", @@ -11792,7 +11792,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "array-bytes 4.2.0", "bytes", @@ -11823,7 +11823,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "futures 0.3.28", "libp2p-identity", @@ -11839,7 +11839,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -11848,7 +11848,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "futures 0.3.28", "jsonrpsee", @@ -11879,7 +11879,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -11898,7 +11898,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "http", "jsonrpsee", @@ -11913,7 +11913,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "array-bytes 4.2.0", "futures 0.3.28", @@ -11939,7 +11939,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "directories", @@ -12005,7 +12005,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "log", "parity-scale-codec", @@ -12016,7 +12016,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "clap", "fs4", @@ -12032,7 +12032,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -12051,7 +12051,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "futures 0.3.28", "libc", @@ -12070,7 +12070,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "chrono", "futures 0.3.28", @@ -12089,7 +12089,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "ansi_term", "atty", @@ -12120,7 +12120,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -12131,7 +12131,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "futures 0.3.28", @@ -12158,7 +12158,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "futures 0.3.28", @@ -12172,7 +12172,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-channel", "futures 0.3.28", @@ -12692,7 +12692,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "hash-db 0.16.0", "log", @@ -12712,7 +12712,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "Inflector", "blake2", @@ -12726,7 +12726,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "parity-scale-codec", "scale-info", @@ -12739,7 +12739,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "integer-sqrt", "num-traits", @@ -12753,7 +12753,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "parity-scale-codec", "scale-info", @@ -12766,7 +12766,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "parity-scale-codec", "sp-api", @@ -12778,7 +12778,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "futures 0.3.28", "log", @@ -12796,7 +12796,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "futures 0.3.28", @@ -12811,7 +12811,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "parity-scale-codec", @@ -12829,7 +12829,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "parity-scale-codec", @@ -12850,7 +12850,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "lazy_static", "parity-scale-codec", @@ -12869,7 +12869,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "finality-grandpa", "log", @@ -12887,7 +12887,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "parity-scale-codec", "scale-info", @@ -12899,7 +12899,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "array-bytes 4.2.0", "bitflags 1.3.2", @@ -12943,7 +12943,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "blake2b_simd", "byteorder", @@ -12957,7 +12957,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "proc-macro2", "quote", @@ -12968,7 +12968,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -12977,7 +12977,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "proc-macro2", "quote", @@ -12987,7 +12987,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "environmental", "parity-scale-codec", @@ -12998,7 +12998,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -13013,7 +13013,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "bytes", "ed25519", @@ -13039,7 +13039,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "lazy_static", "sp-core", @@ -13050,7 +13050,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "futures 0.3.28", "parity-scale-codec", @@ -13064,7 +13064,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "thiserror", "zstd 0.12.3+zstd.1.5.2", @@ -13073,7 +13073,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -13084,7 +13084,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -13102,7 +13102,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "parity-scale-codec", "scale-info", @@ -13116,7 +13116,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "sp-api", "sp-core", @@ -13126,7 +13126,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "backtrace", "lazy_static", @@ -13136,7 +13136,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "rustc-hash", "serde", @@ -13146,7 +13146,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "either", "hash256-std-hasher", @@ -13168,7 +13168,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -13186,7 +13186,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "Inflector", "proc-macro-crate", @@ -13198,7 +13198,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "parity-scale-codec", "scale-info", @@ -13212,7 +13212,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "parity-scale-codec", "scale-info", @@ -13225,7 +13225,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "hash-db 0.16.0", "log", @@ -13245,7 +13245,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "log", "parity-scale-codec", @@ -13263,12 +13263,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "impl-serde", "parity-scale-codec", @@ -13281,7 +13281,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "futures-timer", @@ -13296,7 +13296,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "parity-scale-codec", "sp-std", @@ -13308,7 +13308,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "sp-api", "sp-runtime", @@ -13317,7 +13317,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "log", @@ -13333,7 +13333,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "ahash 0.8.3", "hash-db 0.16.0", @@ -13356,7 +13356,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "impl-serde", "parity-scale-codec", @@ -13373,7 +13373,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -13384,7 +13384,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -13398,7 +13398,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "parity-scale-codec", "scale-info", @@ -13721,7 +13721,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "platforms 2.0.0", ] @@ -13729,7 +13729,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.28", @@ -13748,8 +13748,9 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ + "exit-future", "hyper", "log", "prometheus", @@ -13760,7 +13761,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "jsonrpsee", @@ -13773,7 +13774,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "jsonrpsee", "log", @@ -13792,7 +13793,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -13818,7 +13819,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime" version = "2.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "array-bytes 6.1.0", "frame-executive", @@ -13866,7 +13867,7 @@ dependencies = [ [[package]] name = "substrate-test-runtime-client" version = "2.0.0" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "futures 0.3.28", "parity-scale-codec", @@ -13886,7 +13887,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "ansi_term", "build-helper", @@ -14836,7 +14837,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#9202622403b4ecb4949ba48a3f8ba117d2f3b9bd" +source = "git+https://github.com/moondance-labs/substrate?branch=tanssi-polkadot-v0.9.43#b06f357724147a9bc4d2b5cf831f8ff714d74f37" dependencies = [ "async-trait", "clap", diff --git a/test/configs/zombieTanssiMetrics.json b/test/configs/zombieTanssiMetrics.json new file mode 100644 index 000000000..ce321fb1c --- /dev/null +++ b/test/configs/zombieTanssiMetrics.json @@ -0,0 +1,82 @@ +{ + "settings": { + "timeout": 1000, + "provider": "native" + }, + "relaychain": { + "chain": "rococo-local", + "default_command": "tmp/polkadot", + "default_args": ["--no-hardware-benchmarks", "-lparachain=debug", "--database=paritydb"], + "nodes": [ + { + "name": "alice", + "ws_port": "9947", + "validator": true + }, + { + "name": "bob", + "validator": true + }, + { + "name": "charlie", + "validator": true + }, + { + "name": "dave", + "validator": true + } + ] + }, + "parachains": [ + { + "id": 1000, + "chain_spec_path": "specs/warp-sync-tanssi-1000.json", + "COMMENT": "Important: these collators will not be injected to pallet-invulnerables because zombienet does not support that. When changing the collators list, make sure to update `scripts/build-spec-warp-sync.sh`", + "collators": [ + { + "name": "Collator1000-01", + "ws_port": "9948", + "command": "../target/release/tanssi-node" + }, + { + "name": "Collator1000-02", + "command": "../target/release/tanssi-node" + }, + { + "name": "Collator2000-01", + "command": "../target/release/tanssi-node", + "args": ["-- --tmp --prometheus-external --prometheus-port 27124"] + }, + { + "name": "Collator2000-02", + "command": "../target/release/tanssi-node", + "args": ["-- --tmp --prometheus-external --prometheus-port 27125"] + }, + { + "name": "Collator1000-03", + "command": "../target/release/tanssi-node" + } + ] + }, + { + "id": 2000, + "chain_spec_path": "specs/warp-sync-template-container-2000.json", + "collators": [ + { + "name": "FullNode-2000", + "validator": false, + "command": "../target/release/container-chain-template-simple-node", + "ws_port": 9949, + "p2p_port": 33049 + } + ] + } + ], + "types": { + "Header": { + "number": "u64", + "parent_hash": "Hash", + "post_state": "Hash" + } + } +} diff --git a/test/moonwall.config.json b/test/moonwall.config.json index 9a097f698..e839b0423 100644 --- a/test/moonwall.config.json +++ b/test/moonwall.config.json @@ -115,6 +115,34 @@ } ] }, + { + "name": "zombie_tanssi_metrics", + "testFileDir": ["suites/metrics"], + "runScripts": ["build-spec-warp-sync.sh", "download-polkadot.sh"], + "foundation": { + "type": "zombie", + "zombieSpec": { + "configPath": "./configs/zombieTanssiMetrics.json" + } + }, + "connections": [ + { + "name": "Relay", + "type": "polkadotJs", + "endpoints": ["ws://127.0.0.1:9947"] + }, + { + "name": "Tanssi", + "type": "polkadotJs", + "endpoints": ["ws://127.0.0.1:9948"] + }, + { + "name": "Container2000", + "type": "polkadotJs", + "endpoints": ["ws://127.0.0.1:9949"] + } + ] + }, { "name": "zombie_tanssi_warp_sync", "testFileDir": ["suites/warp-sync"], diff --git a/test/suites/metrics/test_metrics_stop.ts b/test/suites/metrics/test_metrics_stop.ts new file mode 100644 index 000000000..095659600 --- /dev/null +++ b/test/suites/metrics/test_metrics_stop.ts @@ -0,0 +1,220 @@ +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; +import { ApiPromise, Keyring } from "@polkadot/api"; +import { getAuthorFromDigest } from "../../util/author"; +import { signAndSendAndInclude, waitSessions } from "../../util/block"; +import { getKeyringNimbusIdHex } from "../../util/keys"; +import { getHeaderFromRelay } from "../../util/relayInterface"; +import net from "net"; + +describeSuite({ + id: "ZM01", + title: "Zombie Tanssi Metrics Test", + foundationMethods: "zombie", + testCases: function ({ it, context }) { + let paraApi: ApiPromise; + let relayApi: ApiPromise; + let container2000Api: ApiPromise; + + beforeAll(async () => { + paraApi = context.polkadotJs("Tanssi"); + relayApi = context.polkadotJs("Relay"); + container2000Api = context.polkadotJs("Container2000"); + + const relayNetwork = relayApi.consts.system.version.specName.toString(); + expect(relayNetwork, "Relay API incorrect").to.contain("rococo"); + + const paraNetwork = paraApi.consts.system.version.specName.toString(); + const paraId1000 = (await paraApi.query.parachainInfo.parachainId()).toString(); + expect(paraNetwork, "Para API incorrect").to.contain("dancebox"); + expect(paraId1000, "Para API incorrect").to.be.equal("1000"); + + const container2000Network = container2000Api.consts.system.version.specName.toString(); + const paraId2000 = (await container2000Api.query.parachainInfo.parachainId()).toString(); + expect(container2000Network, "Container2000 API incorrect").to.contain("container-chain-template"); + expect(paraId2000, "Container2000 API incorrect").to.be.equal("2000"); + + // Test block numbers in relay are 0 yet + const header2000 = await getHeaderFromRelay(relayApi, 2000); + + expect(header2000.number.toNumber()).to.be.equal(0); + }, 120000); + + it({ + id: "T01", + title: "Blocks are being produced on parachain", + test: async function () { + const blockNum = (await paraApi.rpc.chain.getBlock()).block.header.number.toNumber(); + expect(blockNum).to.be.greaterThan(0); + }, + }); + + it({ + id: "T03", + title: "Test assignation did not change", + test: async function () { + const currentSession = (await paraApi.query.session.currentIndex()).toNumber(); + // TODO: fix once we have types + const allCollators = ( + await paraApi.query.authorityAssignment.collatorContainerChain(currentSession) + ).toJSON(); + const expectedAllCollators = { + orchestratorChain: [ + getKeyringNimbusIdHex("Collator1000-01"), + getKeyringNimbusIdHex("Collator1000-02"), + getKeyringNimbusIdHex("Collator1000-03"), + ], + containerChains: { + "2000": [getKeyringNimbusIdHex("Collator2000-01"), getKeyringNimbusIdHex("Collator2000-02")], + }, + }; + + expect(allCollators).to.deep.equal(expectedAllCollators); + }, + }); + + it({ + id: "T04", + title: "Blocks are being produced on container 2000", + test: async function () { + const blockNum = (await container2000Api.rpc.chain.getBlock()).block.header.number.toNumber(); + expect(blockNum).to.be.greaterThan(0); + }, + }); + + it({ + id: "T06", + title: "Test container chain 2000 assignation is correct", + test: async function () { + const currentSession = (await paraApi.query.session.currentIndex()).toNumber(); + const paraId = (await container2000Api.query.parachainInfo.parachainId()).toString(); + const containerChainCollators = ( + await paraApi.query.authorityAssignment.collatorContainerChain(currentSession) + ).toJSON().containerChains[paraId]; + + // TODO: fix once we have types + const writtenCollators = (await container2000Api.query.authoritiesNoting.authorities()).toJSON(); + + expect(containerChainCollators).to.deep.equal(writtenCollators); + }, + }); + + it({ + id: "T08", + title: "Test author noting is correct for both containers", + timeout: 60000, + test: async function () { + const assignment = await paraApi.query.collatorAssignment.collatorContainerChain(); + const paraId2000 = await container2000Api.query.parachainInfo.parachainId(); + + // TODO: fix once we have types + const containerChainCollators2000 = assignment.containerChains.toJSON()[paraId2000.toString()]; + + await context.waitBlock(3, "Tanssi"); + const author2000 = await paraApi.query.authorNoting.latestAuthor(paraId2000); + + expect(containerChainCollators2000.includes(author2000.toJSON().author)).to.be.true; + }, + }); + + it({ + id: "T09", + title: "Test author is correct in Orchestrator", + test: async function () { + const sessionIndex = (await paraApi.query.session.currentIndex()).toNumber(); + const authorities = await paraApi.query.authorityAssignment.collatorContainerChain(sessionIndex); + const author = await getAuthorFromDigest(paraApi); + // TODO: fix once we have types + expect(authorities.toJSON().orchestratorChain.includes(author.toString())).to.be.true; + }, + }); + + it({ + id: "T10", + title: "Test frontier template isEthereum", + test: async function () { + // TODO: fix once we have types + const genesisData2000 = await paraApi.query.registrar.paraGenesisData(2000); + expect(genesisData2000.toJSON().properties.isEthereum).to.be.false; + }, + }); + + it({ + id: "T12", + title: "Test metrics: deregister container chain and metrics should stop", + timeout: 300000, + test: async function () { + const keyring = new Keyring({ type: "sr25519" }); + const alice = keyring.addFromUri("//Alice", { name: "Alice default" }); + + // Begin sending GET /metrics requests in a loop to try to prevent the server from closing + const connectionHandle = sendMetricsRequestLoop("127.0.0.1", 27124, 1000); + expect(isServerAlive(connectionHandle)).to.be.true; + + const registered1 = await paraApi.query.registrar.registeredParaIds(); + // TODO: fix once we have types + expect(registered1.toJSON().includes(2000)).to.be.true; + + const tx = paraApi.tx.registrar.deregister(2000); + await signAndSendAndInclude(paraApi.tx.sudo.sudo(tx), alice); + await waitSessions(context, paraApi, 2); + + // Check that pending para ids removes 2000 + const registered = await paraApi.query.registrar.registeredParaIds(); + // TODO: fix once we have types + expect(registered.toJSON().includes(2000)).to.be.false; + expect(isServerAlive(connectionHandle)).to.be.false; + }, + }); + }, +}); + +// Send periodic "GET /metrics" requests using the same socket every time. +// This is to reproduce a bug where the metrics server would not close if there are any open connections. +function sendMetricsRequestLoop(hostname: string, port: number, period: number) { + // Use a TCP client instead of an HTTP client because I was unable to configure the HTTP client to use only + // one socket + const client = new net.Socket(); + + // Connect to the server + client.connect(port, hostname, () => { + console.log(`Connected to ${hostname}:${port}`); + + // Define the function to send the metrics request + const sendMetrics = () => { + if (!client.destroyed) { + const request = "GET /metrics HTTP/1.1\r\n\r\n"; + client.write(request); + console.log(`Sent request: ${request}`); + } + }; + + // Initially send the request + sendMetrics(); + + // Set up periodic sending of the request + const intervalId = setInterval(sendMetrics, period); + + // Handle data received from the server + client.on("data", (data) => { + console.log(`Received data: ${data}`); + }); + + // Handle errors + client.on("error", (error) => { + console.error(`Error: ${error}`); + }); + + // Handle connection close + client.on("close", () => { + console.log("Connection closed"); + clearInterval(intervalId); + }); + }); + + return client; +} + +// Check if the connection is still alive +function isServerAlive(socket: net.Socket): boolean { + return !socket.destroyed && !socket.closed; +} From d178f8f2964b06c66ffd3f54ffc55a2c9d219dd9 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Fri, 22 Sep 2023 16:59:16 +0200 Subject: [PATCH 14/52] debug logs --- pallets/collator-assignment/src/lib.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index 7fe1f1555..76d3f5217 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -151,7 +151,8 @@ pub mod pallet { let new_assigned = if T::ShouldRotateAllCollators::should_rotate_all_collators(target_session_index) { log::info!( - "Collator assignment: rotating collators. Seed: {:?}", + "Collator assignment: rotating collators. Session {:?}, Seed: {:?}", + current_session_index.encode(), random_seed ); @@ -166,6 +167,12 @@ pub mod pallet { as usize, ) } else { + log::info!( + "Collator assignment: keep old assigned. Session {:?}, Seed: {:?}", + current_session_index.encode(), + random_seed + ); + Self::assign_collators_always_keep_old( collators, &container_chain_ids, From 8966fec3e79cd29d3ae6dac377acc43ef4c0ef91 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Fri, 22 Sep 2023 17:40:45 +0200 Subject: [PATCH 15/52] Fix dev_tanssi suite --- runtime/dancebox/src/lib.rs | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index ffc75b18d..65e195352 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -492,17 +492,22 @@ impl pallet_initializer::ApplyNewSession for OwnApplySession { ) { let random_seed = if session_index != 0 { let mut buf = [0u8; 32]; - // TODO: mix some key like b"paras" and also the block number to ensure the seed changes - // on every tanssi block - let random_hash = BabeDataGetter::get_epoch_randomness().unwrap(); - // TODO: audit usage of randomness API - // https://github.com/paritytech/polkadot/issues/2601 - //let (random_hash, _) = pallet_babe::RandomnessFromOneEpochAgo::::random(&b"paras"[..]); - let len = sp_std::cmp::min(32, random_hash.as_ref().len()); - buf[..len].copy_from_slice(&random_hash.as_ref()[..len]); - buf + if let Some(random_hash) = BabeDataGetter::get_epoch_randomness() { + // TODO: mix some key like b"paras" and also the block number to ensure the seed changes + // on every tanssi block + // TODO: audit usage of randomness API + // https://github.com/paritytech/polkadot/issues/2601 + //let (random_hash, _) = pallet_babe::RandomnessFromOneEpochAgo::::random(&b"paras"[..]); + let len = sp_std::cmp::min(32, random_hash.as_ref().len()); + buf[..len].copy_from_slice(&random_hash.as_ref()[..len]); + buf + } else { + // If there is no randomness (e.g when running in dev mode), return [0; 32] + // TODO: smoke test to ensure this never happens in a live network + [0; 32] + } } else { - // On genesis, there is no randomness + // In session 0 (genesis) there is randomness [0; 32] }; From cf86856478ceff080a4e3be78dc38874e035c571 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Fri, 22 Sep 2023 17:47:46 +0200 Subject: [PATCH 16/52] Add zombie_tanssi_rotation test suite --- test/configs/zombieTanssiRotation.json | 105 ++++++++ test/moonwall.config.json | 49 ++++ test/suites/para-rotation/test_rotation.ts | 282 +++++++++++++++++++++ 3 files changed, 436 insertions(+) create mode 100644 test/configs/zombieTanssiRotation.json create mode 100644 test/suites/para-rotation/test_rotation.ts diff --git a/test/configs/zombieTanssiRotation.json b/test/configs/zombieTanssiRotation.json new file mode 100644 index 000000000..a3e9603d7 --- /dev/null +++ b/test/configs/zombieTanssiRotation.json @@ -0,0 +1,105 @@ +{ + "settings": { + "timeout": 1000, + "provider": "native" + }, + "relaychain": { + "chain": "rococo-local", + "default_command": "tmp/polkadot", + "default_args": ["--no-hardware-benchmarks", "-lparachain=debug", "--database=paritydb"], + "nodes": [ + { + "name": "alice", + "ws_port": "9947", + "validator": true + }, + { + "name": "bob", + "validator": true + }, + { + "name": "charlie", + "validator": true + }, + { + "name": "dave", + "validator": true + } + ] + }, + "parachains": [ + { + "id": 1000, + "chain_spec_path": "specs/tanssi-1000.json", + "COMMENT": "Important: these collators will not be injected to pallet-invulnerables because zombienet does not support that. When changing the collators list, make sure to update `scripts/build-spec.sh`", + "collators": [ + { + "name": "Collator1000-01", + "ws_port": "9948", + "command": "../target/release/tanssi-node" + }, + { + "name": "Collator1000-02", + "command": "../target/release/tanssi-node" + }, + { + "name": "Collator2000-01", + "command": "../target/release/tanssi-node" + }, + { + "name": "Collator2000-02", + "command": "../target/release/tanssi-node" + }, + { + "name": "Collator2001-01", + "command": "../target/release/tanssi-node" + }, + { + "name": "Collator2001-02", + "command": "../target/release/tanssi-node" + }, + { + "name": "Collator2002-01", + "command": "../target/release/tanssi-node" + }, + { + "name": "Collator2002-02", + "command": "../target/release/tanssi-node" + } + ] + }, + { + "id": 2000, + "chain_spec_path": "specs/template-container-2000.json", + "collators": [ + { + "name": "FullNode-2000", + "validator": false, + "command": "../target/release/container-chain-template-simple-node", + "ws_port": 9949, + "p2p_port": 33049 + } + ] + }, + { + "id": 2001, + "chain_spec_path": "specs/template-container-2001.json", + "collators": [ + { + "name": "FullNode-2001", + "validator": false, + "command": "../target/release/container-chain-template-frontier-node", + "ws_port": 9950, + "p2p_port": 33050 + } + ] + } + ], + "types": { + "Header": { + "number": "u64", + "parent_hash": "Hash", + "post_state": "Hash" + } + } +} diff --git a/test/moonwall.config.json b/test/moonwall.config.json index e839b0423..fb6380e14 100644 --- a/test/moonwall.config.json +++ b/test/moonwall.config.json @@ -115,6 +115,55 @@ } ] }, + { + "name": "zombie_tanssi_rotation", + "testFileDir": ["suites/para-rotation"], + "runScripts": ["build-spec.sh", "download-polkadot.sh"], + "foundation": { + "type": "zombie", + "zombieSpec": { + "configPath": "./configs/zombieTanssi.json", + "skipBlockCheck": ["Container2002"] + } + }, + "connections": [ + { + "name": "Relay", + "type": "polkadotJs", + "endpoints": ["ws://127.0.0.1:9947"] + }, + { + "name": "Tanssi", + "type": "polkadotJs", + "endpoints": ["ws://127.0.0.1:9948"] + }, + { + "name": "Container2000", + "type": "polkadotJs", + "endpoints": ["ws://127.0.0.1:9949"] + }, + { + "name": "Container2001", + "type": "polkadotJs", + "endpoints": ["ws://127.0.0.1:9950"] + }, + { + "name": "Container2002", + "type": "polkadotJs", + "endpoints": ["ws://127.0.0.1:9951"] + }, + { + "name": "ethers", + "type": "ethers", + "endpoints": ["ws://127.0.0.1:9950"] + }, + { + "name": "w3", + "type": "web3", + "endpoints": ["ws://127.0.0.1:9950"] + } + ] + }, { "name": "zombie_tanssi_metrics", "testFileDir": ["suites/metrics"], diff --git a/test/suites/para-rotation/test_rotation.ts b/test/suites/para-rotation/test_rotation.ts new file mode 100644 index 000000000..7ddbcb6db --- /dev/null +++ b/test/suites/para-rotation/test_rotation.ts @@ -0,0 +1,282 @@ +import { beforeAll, describeSuite, expect } from "@moonwall/cli"; +import { MIN_GAS_PRICE, customWeb3Request, generateKeyringPair } from "@moonwall/util"; +import { ApiPromise, Keyring } from "@polkadot/api"; +import { Signer } from "ethers"; +import fs from "fs/promises"; +import { getAuthorFromDigest, getAuthorFromDigestRange } from "../../util/author"; +import { signAndSendAndInclude, waitSessions } from "../../util/block"; +import { createTransfer, waitUntilEthTxIncluded } from "../../util/ethereum"; +import { chainSpecToContainerChainGenesisData } from "../../util/genesis_data"; +import { getKeyringNimbusIdHex } from "../../util/keys"; +import { getHeaderFromRelay } from "../../util/relayInterface"; + +describeSuite({ + id: "R01", + title: "Zombie Tanssi Rotation Test", + foundationMethods: "zombie", + testCases: function ({ it, context }) { + let paraApi: ApiPromise; + let relayApi: ApiPromise; + let container2000Api: ApiPromise; + let container2001Api: ApiPromise; + let container2002Api: ApiPromise; + let blockNumber2002Start; + let blockNumber2002End; + let ethersSigner: Signer; + + beforeAll(async () => { + paraApi = context.polkadotJs("Tanssi"); + relayApi = context.polkadotJs("Relay"); + container2000Api = context.polkadotJs("Container2000"); + container2001Api = context.polkadotJs("Container2001"); + container2002Api = context.polkadotJs("Container2002"); + ethersSigner = context.ethers(); + + const relayNetwork = relayApi.consts.system.version.specName.toString(); + expect(relayNetwork, "Relay API incorrect").to.contain("rococo"); + + const paraNetwork = paraApi.consts.system.version.specName.toString(); + const paraId1000 = (await paraApi.query.parachainInfo.parachainId()).toString(); + expect(paraNetwork, "Para API incorrect").to.contain("dancebox"); + expect(paraId1000, "Para API incorrect").to.be.equal("1000"); + + const container2000Network = container2000Api.consts.system.version.specName.toString(); + const paraId2000 = (await container2000Api.query.parachainInfo.parachainId()).toString(); + expect(container2000Network, "Container2000 API incorrect").to.contain("container-chain-template"); + expect(paraId2000, "Container2000 API incorrect").to.be.equal("2000"); + + const container2001Network = container2001Api.consts.system.version.specName.toString(); + const paraId2001 = (await container2001Api.query.parachainInfo.parachainId()).toString(); + expect(container2001Network, "Container2001 API incorrect").to.contain("frontier-template"); + expect(paraId2001, "Container2001 API incorrect").to.be.equal("2001"); + + const container2002Network = container2002Api.consts.system.version.specName.toString(); + const paraId2002 = (await container2002Api.query.parachainInfo.parachainId()).toString(); + expect(container2002Network, "Container2002 API incorrect").to.contain("container-chain-template"); + expect(paraId2002, "Container2002 API incorrect").to.be.equal("2002"); + + // Test block numbers in relay are 0 yet + const header2000 = await getHeaderFromRelay(relayApi, 2000); + const header2001 = await getHeaderFromRelay(relayApi, 2001); + const header2002 = await getHeaderFromRelay(relayApi, 2002); + + expect(header2000.number.toNumber()).to.be.equal(0); + expect(header2001.number.toNumber()).to.be.equal(0); + expect(header2002.number.toNumber()).to.be.equal(0); + }, 120000); + + it({ + id: "T01", + title: "Blocks are being produced on parachain", + test: async function () { + const blockNum = (await paraApi.rpc.chain.getBlock()).block.header.number.toNumber(); + expect(blockNum).to.be.greaterThan(0); + }, + }); + + it({ + id: "T03", + title: "Test assignation did not change", + test: async function () { + const currentSession = (await paraApi.query.session.currentIndex()).toNumber(); + // TODO: fix once we have types + const allCollators = ( + await paraApi.query.authorityAssignment.collatorContainerChain(currentSession) + ).toJSON(); + const expectedAllCollators = { + orchestratorChain: [ + getKeyringNimbusIdHex("Collator1000-01"), + getKeyringNimbusIdHex("Collator1000-02"), + getKeyringNimbusIdHex("Collator2002-01"), + getKeyringNimbusIdHex("Collator2002-02"), + ], + containerChains: { + "2000": [getKeyringNimbusIdHex("Collator2000-01"), getKeyringNimbusIdHex("Collator2000-02")], + "2001": [getKeyringNimbusIdHex("Collator2001-01"), getKeyringNimbusIdHex("Collator2001-02")], + }, + }; + + expect(allCollators).to.deep.equal(expectedAllCollators); + }, + }); + + it({ + id: "T04", + title: "Blocks are being produced on container 2000", + test: async function () { + const blockNum = (await container2000Api.rpc.chain.getBlock()).block.header.number.toNumber(); + expect(blockNum).to.be.greaterThan(0); + }, + }); + + it({ + id: "T05", + title: "Blocks are being produced on container 2001", + test: async function () { + const blockNum = (await container2001Api.rpc.chain.getBlock()).block.header.number.toNumber(); + + expect(blockNum).to.be.greaterThan(0); + expect(await ethersSigner.provider.getBlockNumber(), "Safe tag is not present").to.be.greaterThan(0); + }, + }); + + it({ + id: "T06", + title: "Test container chain 2000 assignation is correct", + test: async function () { + const currentSession = (await paraApi.query.session.currentIndex()).toNumber(); + const paraId = (await container2000Api.query.parachainInfo.parachainId()).toString(); + const containerChainCollators = ( + await paraApi.query.authorityAssignment.collatorContainerChain(currentSession) + ).toJSON().containerChains[paraId]; + + // TODO: fix once we have types + const writtenCollators = (await container2000Api.query.authoritiesNoting.authorities()).toJSON(); + + expect(containerChainCollators).to.deep.equal(writtenCollators); + }, + }); + + it({ + id: "T07", + title: "Test container chain 2001 assignation is correct", + test: async function () { + const currentSession = (await paraApi.query.session.currentIndex()).toNumber(); + const paraId = (await container2001Api.query.parachainInfo.parachainId()).toString(); + const containerChainCollators = ( + await paraApi.query.authorityAssignment.collatorContainerChain(currentSession) + ).toJSON().containerChains[paraId]; + + const writtenCollators = (await container2001Api.query.authoritiesNoting.authorities()).toJSON(); + + expect(containerChainCollators).to.deep.equal(writtenCollators); + }, + }); + + it({ + id: "T08", + title: "Test author noting is correct for both containers", + timeout: 60000, + test: async function () { + const assignment = await paraApi.query.collatorAssignment.collatorContainerChain(); + const paraId2000 = await container2000Api.query.parachainInfo.parachainId(); + const paraId2001 = await container2001Api.query.parachainInfo.parachainId(); + + // TODO: fix once we have types + const containerChainCollators2000 = assignment.containerChains.toJSON()[paraId2000.toString()]; + const containerChainCollators2001 = assignment.containerChains.toJSON()[paraId2001.toString()]; + + await context.waitBlock(3, "Tanssi"); + const author2000 = await paraApi.query.authorNoting.latestAuthor(paraId2000); + const author2001 = await paraApi.query.authorNoting.latestAuthor(paraId2001); + + expect(containerChainCollators2000.includes(author2000.toJSON().author)).to.be.true; + expect(containerChainCollators2001.includes(author2001.toJSON().author)).to.be.true; + }, + }); + + it({ + id: "T09", + title: "Test author is correct in Orchestrator", + test: async function () { + const sessionIndex = (await paraApi.query.session.currentIndex()).toNumber(); + const authorities = await paraApi.query.authorityAssignment.collatorContainerChain(sessionIndex); + const author = await getAuthorFromDigest(paraApi); + // TODO: fix once we have types + expect(authorities.toJSON().orchestratorChain.includes(author.toString())).to.be.true; + }, + }); + + it({ + id: "T10", + title: "Test frontier template isEthereum", + test: async function () { + // TODO: fix once we have types + const genesisData2000 = await paraApi.query.registrar.paraGenesisData(2000); + expect(genesisData2000.toJSON().properties.isEthereum).to.be.false; + const genesisData2001 = await paraApi.query.registrar.paraGenesisData(2001); + expect(genesisData2001.toJSON().properties.isEthereum).to.be.true; + }, + }); + it({ + id: "T11", + title: "Transactions can be made with ethers", + timeout: 30000, + test: async function () { + const randomAccount = generateKeyringPair(); + const tx = await createTransfer(context, randomAccount.address, 1_000_000_000_000, { + gasPrice: MIN_GAS_PRICE, + }); + const txHash = await customWeb3Request(context.web3(), "eth_sendRawTransaction", [tx]); + await waitUntilEthTxIncluded( + () => context.waitBlock(1, "Container2001"), + context.web3(), + txHash.result + ); + expect(Number(await context.web3().eth.getBalance(randomAccount.address))).to.be.greaterThan(0); + }, + }); + }, +}); + +/// Verify that the next `numBlocks` have no more than `numAuthors` different authors +/// +/// Concepts: blocks and slots. +/// A slot is a time-based period where one author can propose a block. +/// Block numbers are always consecutive, but some slots may have no block. +/// One session consists of a fixed number of blocks, but a variable number of slots. +/// +/// We want to ensure that all the eligible block authors are trying to propose blocks. +/// Since nodes may fail to propose blocks because of high system load, we cannot easily +/// test that all the eligible nodes are creating blocks. +async function countUniqueBlockAuthors(paraApi, blockStart, blockEnd, numAuthors) { + // These are the authorities for the next block, so we need to wait 1 block before fetching the first author + const currentSession = (await paraApi.query.session.currentIndex()).toNumber(); + // TODO: fix once we have types + const authorities = (await paraApi.query.authorityAssignment.collatorContainerChain(currentSession)).toJSON(); + const actualAuthors = []; + const blockNumbers = []; + + const authors = await getAuthorFromDigestRange(paraApi, blockStart, blockEnd); + for (let i = 0; i < authors.length; i++) { + const [blockNum, author] = authors[i]; + blockNumbers.push(blockNum); + actualAuthors.push(author); + } + + const uniq = [...new Set(actualAuthors)]; + + if (uniq.length > numAuthors || (uniq.length == 1 && numAuthors > 1)) { + console.error( + "Mismatch between authorities and actual block authors: authorities: ", + authorities, + ", actual authors: ", + actualAuthors, + ", block numbers: ", + blockNumbers + ); + expect(false).to.be.true; + } +} + +async function directoryExists(directoryPath) { + try { + await fs.access(directoryPath, fs.constants.F_OK); + return true; + } catch (err) { + return false; + } +} + +/// Returns the /tmp/zombie-52234... path +function getTmpZombiePath() { + const logFilePath = process.env.MOON_MONITORED_NODE; + + if (logFilePath) { + const lastIndex = logFilePath.lastIndexOf("/"); + return lastIndex !== -1 ? logFilePath.substring(0, lastIndex) : null; + } + + // Return null if the environment variable is not set + return null; +} From d21191624882a77eb3aad20aa3284b4434bd3afd Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 25 Sep 2023 12:45:51 +0200 Subject: [PATCH 17/52] Unit test collator assignment rotation --- pallets/collator-assignment/src/mock.rs | 3 +- pallets/collator-assignment/src/tests.rs | 170 ++++++++++++++++++++++- 2 files changed, 171 insertions(+), 2 deletions(-) diff --git a/pallets/collator-assignment/src/mock.rs b/pallets/collator-assignment/src/mock.rs index adb60c4d4..3871304c3 100644 --- a/pallets/collator-assignment/src/mock.rs +++ b/pallets/collator-assignment/src/mock.rs @@ -117,6 +117,7 @@ pub struct Mocks { pub collators_per_container: u32, pub collators: Vec, pub container_chains: Vec, + pub random_seed: [u8; 32], } impl mock_data::Config for Test {} @@ -208,7 +209,7 @@ pub fn run_to_block(n: u64) { for x in (old_block_number + 1)..=n { System::set_block_number(x); - let randomness = [0u8; 32]; + let randomness = MockData::mock().random_seed; if x % session_len == 1 { let session_index = (x / session_len) as u32; diff --git a/pallets/collator-assignment/src/tests.rs b/pallets/collator-assignment/src/tests.rs index 428036d00..d7c69b828 100644 --- a/pallets/collator-assignment/src/tests.rs +++ b/pallets/collator-assignment/src/tests.rs @@ -15,7 +15,7 @@ // along with Tanssi. If not, see use { - crate::{mock::*, CollatorContainerChain}, + crate::{mock::*, CollatorContainerChain, PendingCollatorContainerChain}, std::collections::BTreeMap, }; @@ -686,3 +686,171 @@ fn assign_collators_set_zero_per_container() { ); }); } + +#[test] +fn assign_collators_rotation() { + new_test_ext().execute_with(|| { + run_to_block(1); + + MockData::mutate(|m| { + m.collators_per_container = 2; + m.min_orchestrator_chain_collators = 2; + m.max_orchestrator_chain_collators = 5; + + m.collators = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; + m.container_chains = vec![1001, 1002, 1003, 1004]; + }); + assert_eq!(assigned_collators(), BTreeMap::new(),); + run_to_block(11); + + let initial_assignment = BTreeMap::from_iter(vec![ + (1, 999), + (2, 999), + (3, 1001), + (4, 1001), + (5, 1002), + (6, 1002), + (7, 1003), + (8, 1003), + (9, 1004), + (10, 1004), + (11, 999), + (12, 999), + ]); + + assert_eq!(assigned_collators(), initial_assignment,); + + MockData::mutate(|m| { + m.random_seed = [1; 32]; + }); + + // The rotation period is every 5 sessions, so the first session with a different assignment + // will be session 5. Collators are calculated one session in advance, so they will be decided + // on session 4. + run_to_block(20); + + assert_eq!(assigned_collators(), initial_assignment,); + assert_eq!(PendingCollatorContainerChain::::get(), None,); + + run_to_block(21); + assert_eq!(assigned_collators(), initial_assignment,); + + assert!(PendingCollatorContainerChain::::get().is_some(),); + + run_to_block(25); + assert_eq!(assigned_collators(), initial_assignment,); + run_to_block(26); + + // Random assignment depends on the seed, shouldn't change unless the algorithm changes + let shuffled_assignment = BTreeMap::from_iter(vec![ + (1, 1004), + (2, 999), + (3, 999), + (4, 1003), + (5, 1001), + (6, 1001), + (7, 999), + (8, 1002), + (9, 999), + (10, 1003), + (11, 1004), + (12, 1002), + ]); + + assert_eq!(assigned_collators(), shuffled_assignment,); + }); +} + +#[test] +fn assign_collators_rotation_container_chains_are_shuffled() { + new_test_ext().execute_with(|| { + run_to_block(1); + + MockData::mutate(|m| { + m.collators_per_container = 2; + m.min_orchestrator_chain_collators = 2; + m.max_orchestrator_chain_collators = 5; + + // 4 collators so we can only assign to one container chain + m.collators = vec![1, 2, 3, 4]; + m.container_chains = vec![1001, 1002]; + }); + assert_eq!(assigned_collators(), BTreeMap::new(),); + run_to_block(11); + + let initial_assignment = + BTreeMap::from_iter(vec![(1, 999), (2, 999), (3, 1001), (4, 1001)]); + + assert_eq!(assigned_collators(), initial_assignment,); + + MockData::mutate(|m| { + // Seed chosen manually to see the case where container 1002 is given priority + m.random_seed = [2; 32]; + }); + + run_to_block(26); + + // Random assignment depends on the seed, shouldn't change unless the algorithm changes + // Test that container chains are shuffled because 1001 does not have priority + let shuffled_assignment = + BTreeMap::from_iter(vec![(1, 999), (2, 1002), (3, 999), (4, 1002)]); + + assert_eq!(assigned_collators(), shuffled_assignment,); + }); +} + +#[test] +fn assign_collators_rotation_collators_are_shuffled() { + new_test_ext().execute_with(|| { + run_to_block(1); + + MockData::mutate(|m| { + m.collators_per_container = 2; + m.min_orchestrator_chain_collators = 2; + m.max_orchestrator_chain_collators = 5; + + // 10 collators but we only need 9, so 1 collator will not be assigned + m.collators = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + m.container_chains = vec![1001, 1002]; + }); + assert_eq!(assigned_collators(), BTreeMap::new(),); + run_to_block(11); + + let initial_assignment = BTreeMap::from_iter(vec![ + (1, 999), + (2, 999), + (3, 1001), + (4, 1001), + (5, 1002), + (6, 1002), + (7, 999), + (8, 999), + (9, 999), + ]); + + assert_eq!(assigned_collators(), initial_assignment,); + + MockData::mutate(|m| { + m.random_seed = [1; 32]; + }); + + run_to_block(26); + + // Random assignment depends on the seed, shouldn't change unless the algorithm changes + // Test that collators are shuffled because collator 10 should be the last one to be assigned, + // and here it is present + let shuffled_assignment = BTreeMap::from_iter(vec![ + (1, 999), + (3, 1001), + (4, 1001), + (5, 1002), + (6, 999), + (7, 999), + (8, 999), + (9, 1002), + (10, 999), + ]); + + assert_eq!(assigned_collators(), shuffled_assignment,); + }); +} From d829db149637c34aa62ca8a2684c6e52d30fe96b Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 25 Sep 2023 12:47:51 +0200 Subject: [PATCH 18/52] Fix warnings in zombienet tests --- test/suites/para-rotation/test_rotation.ts | 83 ++++------------------ test/suites/para/test_tanssi_containers.ts | 22 ------ 2 files changed, 14 insertions(+), 91 deletions(-) diff --git a/test/suites/para-rotation/test_rotation.ts b/test/suites/para-rotation/test_rotation.ts index 7ddbcb6db..91cd2436e 100644 --- a/test/suites/para-rotation/test_rotation.ts +++ b/test/suites/para-rotation/test_rotation.ts @@ -1,12 +1,9 @@ import { beforeAll, describeSuite, expect } from "@moonwall/cli"; import { MIN_GAS_PRICE, customWeb3Request, generateKeyringPair } from "@moonwall/util"; -import { ApiPromise, Keyring } from "@polkadot/api"; +import { ApiPromise } from "@polkadot/api"; import { Signer } from "ethers"; -import fs from "fs/promises"; -import { getAuthorFromDigest, getAuthorFromDigestRange } from "../../util/author"; -import { signAndSendAndInclude, waitSessions } from "../../util/block"; +import { getAuthorFromDigest } from "../../util/author"; import { createTransfer, waitUntilEthTxIncluded } from "../../util/ethereum"; -import { chainSpecToContainerChainGenesisData } from "../../util/genesis_data"; import { getKeyringNimbusIdHex } from "../../util/keys"; import { getHeaderFromRelay } from "../../util/relayInterface"; @@ -20,8 +17,6 @@ describeSuite({ let container2000Api: ApiPromise; let container2001Api: ApiPromise; let container2002Api: ApiPromise; - let blockNumber2002Start; - let blockNumber2002End; let ethersSigner: Signer; beforeAll(async () => { @@ -216,67 +211,17 @@ describeSuite({ expect(Number(await context.web3().eth.getBalance(randomAccount.address))).to.be.greaterThan(0); }, }); + it({ + id: "T12", + title: "Rotation works", + timeout: 30000, + test: async function () { + // TODO: for the missing tests: + // go to session 4, check that future assignment changes + // also check that collators start syncing the new chains (check if db path exists) + // go to session 5, check that collators stopped the previously assigned chain + // check that all the chains are still producing blocks + }, + }); }, }); - -/// Verify that the next `numBlocks` have no more than `numAuthors` different authors -/// -/// Concepts: blocks and slots. -/// A slot is a time-based period where one author can propose a block. -/// Block numbers are always consecutive, but some slots may have no block. -/// One session consists of a fixed number of blocks, but a variable number of slots. -/// -/// We want to ensure that all the eligible block authors are trying to propose blocks. -/// Since nodes may fail to propose blocks because of high system load, we cannot easily -/// test that all the eligible nodes are creating blocks. -async function countUniqueBlockAuthors(paraApi, blockStart, blockEnd, numAuthors) { - // These are the authorities for the next block, so we need to wait 1 block before fetching the first author - const currentSession = (await paraApi.query.session.currentIndex()).toNumber(); - // TODO: fix once we have types - const authorities = (await paraApi.query.authorityAssignment.collatorContainerChain(currentSession)).toJSON(); - const actualAuthors = []; - const blockNumbers = []; - - const authors = await getAuthorFromDigestRange(paraApi, blockStart, blockEnd); - for (let i = 0; i < authors.length; i++) { - const [blockNum, author] = authors[i]; - blockNumbers.push(blockNum); - actualAuthors.push(author); - } - - const uniq = [...new Set(actualAuthors)]; - - if (uniq.length > numAuthors || (uniq.length == 1 && numAuthors > 1)) { - console.error( - "Mismatch between authorities and actual block authors: authorities: ", - authorities, - ", actual authors: ", - actualAuthors, - ", block numbers: ", - blockNumbers - ); - expect(false).to.be.true; - } -} - -async function directoryExists(directoryPath) { - try { - await fs.access(directoryPath, fs.constants.F_OK); - return true; - } catch (err) { - return false; - } -} - -/// Returns the /tmp/zombie-52234... path -function getTmpZombiePath() { - const logFilePath = process.env.MOON_MONITORED_NODE; - - if (logFilePath) { - const lastIndex = logFilePath.lastIndexOf("/"); - return lastIndex !== -1 ? logFilePath.substring(0, lastIndex) : null; - } - - // Return null if the environment variable is not set - return null; -} diff --git a/test/suites/para/test_tanssi_containers.ts b/test/suites/para/test_tanssi_containers.ts index 9d10533e0..ba506b172 100644 --- a/test/suites/para/test_tanssi_containers.ts +++ b/test/suites/para/test_tanssi_containers.ts @@ -409,25 +409,3 @@ async function countUniqueBlockAuthors(paraApi, blockStart, blockEnd, numAuthors expect(false).to.be.true; } } - -async function directoryExists(directoryPath) { - try { - await fs.access(directoryPath, fs.constants.F_OK); - return true; - } catch (err) { - return false; - } -} - -/// Returns the /tmp/zombie-52234... path -function getTmpZombiePath() { - const logFilePath = process.env.MOON_MONITORED_NODE; - - if (logFilePath) { - const lastIndex = logFilePath.lastIndexOf("/"); - return lastIndex !== -1 ? logFilePath.substring(0, lastIndex) : null; - } - - // Return null if the environment variable is not set - return null; -} From 677ef040ee2f41e2c15a9b45dce645645d982af1 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 25 Sep 2023 13:14:53 +0200 Subject: [PATCH 19/52] Try to add integration test, fails --- runtime/dancebox/tests/common/mod.rs | 6 +- runtime/dancebox/tests/integration_test.rs | 65 ++++++++++++++++++---- 2 files changed, 58 insertions(+), 13 deletions(-) diff --git a/runtime/dancebox/tests/common/mod.rs b/runtime/dancebox/tests/common/mod.rs index 517d6785f..db422cd47 100644 --- a/runtime/dancebox/tests/common/mod.rs +++ b/runtime/dancebox/tests/common/mod.rs @@ -95,9 +95,9 @@ pub fn run_to_block(n: u32) { } } -// Mock the inherent that sets validation data in ParachainSystem, which -/// contains the `relay_chain_block_number`, which is used in `author-filter` as a -/// source of randomness to filter valid authors at each block. +/// Mock the inherent that sets validation data in ParachainSystem, which +/// contains the `relay_chain_block_number`, which is used in `collator-assignment` as a +/// source of randomness. pub fn set_parachain_inherent_data() { use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder; let (relay_parent_storage_root, relay_chain_state) = { diff --git a/runtime/dancebox/tests/integration_test.rs b/runtime/dancebox/tests/integration_test.rs index 6400b6421..c91076016 100644 --- a/runtime/dancebox/tests/integration_test.rs +++ b/runtime/dancebox/tests/integration_test.rs @@ -1562,7 +1562,7 @@ fn test_author_noting_not_self_para() { } #[test] -fn test_author_noting_rotation() { +fn test_collator_assignment_rotation() { ExtBuilder::default() .with_balances(vec![ // Alice gets 10k extra tokens for her mapping deposit @@ -1583,10 +1583,6 @@ fn test_author_noting_rotation() { ]) .build() .execute_with(|| { - let mut sproof = ParaHeaderSproofBuilder::default(); - let slot: u64 = 5; - let other_para: ParaId = 1001u32.into(); - // Charlie and Dave to 1001 let assignment = CollatorAssignment::collator_container_chain(); let initial_assignment = assignment.clone(); @@ -1595,13 +1591,62 @@ fn test_author_noting_rotation() { vec![CHARLIE.into(), DAVE.into()] ); - for i in 1..20 { - println!("goto session {}", i); - run_to_session(i); + pub fn set_parachain_inherent_data_random_seed(random_seed: [u8; 32]) { + use cumulus_primitives_core::relay_chain::well_known_keys; + use cumulus_primitives_core::PersistedValidationData; + use cumulus_primitives_parachain_inherent::ParachainInherentData; + use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder; + use frame_support::dispatch::Dispatchable; + + let (relay_parent_storage_root, relay_chain_state) = { + let mut sproof = RelayStateSproofBuilder::default(); + sproof.additional_key_values.push(( + well_known_keys::CURRENT_BLOCK_RANDOMNESS.to_vec(), + random_seed.to_vec(), + )); - let assignment = CollatorAssignment::collator_container_chain(); - assert_eq!(assignment, initial_assignment); + sproof.into_state_root_and_proof() + }; + let vfp = PersistedValidationData { + relay_parent_number: 1u32, + relay_parent_storage_root, + ..Default::default() + }; + let parachain_inherent_data = ParachainInherentData { + validation_data: vfp, + relay_chain_state: relay_chain_state, + downward_messages: Default::default(), + horizontal_messages: Default::default(), + }; + assert_ok!( + RuntimeCall::ParachainSystem( + cumulus_pallet_parachain_system::Call::::set_validation_data { + data: parachain_inherent_data + } + ) + .dispatch(inherent_origin()) + ); } + + run_to_session(3); + + // TODO: this fails with error + // thread 'test_collator_assignment_rotation' panicked at 'ValidationData must be updated only once in a block' + // How to set a different seed? + set_parachain_inherent_data_random_seed([1; 32]); + + run_to_session(4); + assert_eq!( + CollatorAssignment::collator_container_chain(), + initial_assignment, + ); + + run_to_session(5); + // Assignment changed + assert_ne!( + CollatorAssignment::collator_container_chain(), + initial_assignment, + ); }); } From 3a24a453867833a1b6724471358851b6dbe013cd Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 26 Sep 2023 13:55:51 +0200 Subject: [PATCH 20/52] Fix integration test by killing storage value --- runtime/dancebox/tests/integration_test.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/runtime/dancebox/tests/integration_test.rs b/runtime/dancebox/tests/integration_test.rs index c91076016..38ef463db 100644 --- a/runtime/dancebox/tests/integration_test.rs +++ b/runtime/dancebox/tests/integration_test.rs @@ -1608,7 +1608,8 @@ fn test_collator_assignment_rotation() { sproof.into_state_root_and_proof() }; let vfp = PersistedValidationData { - relay_parent_number: 1u32, + // TODO: this is previous relay_parent_number + 1, but not sure where can I get that value + relay_parent_number: 2u32, relay_parent_storage_root, ..Default::default() }; @@ -1618,6 +1619,13 @@ fn test_collator_assignment_rotation() { downward_messages: Default::default(), horizontal_messages: Default::default(), }; + // Delete existing flag to avoid error + // 'ValidationData must be updated only once in a block' + // TODO: this is a hack + frame_support::storage::unhashed::kill(&frame_support::storage::storage_prefix( + b"ParachainSystem", + b"ValidationData", + )); assert_ok!( RuntimeCall::ParachainSystem( cumulus_pallet_parachain_system::Call::::set_validation_data { @@ -1630,16 +1638,16 @@ fn test_collator_assignment_rotation() { run_to_session(3); - // TODO: this fails with error - // thread 'test_collator_assignment_rotation' panicked at 'ValidationData must be updated only once in a block' - // How to set a different seed? set_parachain_inherent_data_random_seed([1; 32]); + assert!(CollatorAssignment::pending_collator_container_chain().is_none()); + run_to_session(4); assert_eq!( CollatorAssignment::collator_container_chain(), initial_assignment, ); + assert!(CollatorAssignment::pending_collator_container_chain().is_some()); run_to_session(5); // Assignment changed From da3faa891d0b746b615e08d4789758bcb6337747 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 26 Sep 2023 15:30:05 +0200 Subject: [PATCH 21/52] Rename para-rotation suite to avoid moonwall bug --- test/moonwall.config.json | 2 +- test/suites/{para-rotation => rotation-para}/test_rotation.ts | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename test/suites/{para-rotation => rotation-para}/test_rotation.ts (100%) diff --git a/test/moonwall.config.json b/test/moonwall.config.json index 95bc1e9a0..69939e793 100644 --- a/test/moonwall.config.json +++ b/test/moonwall.config.json @@ -145,7 +145,7 @@ }, { "name": "zombie_tanssi_rotation", - "testFileDir": ["suites/para-rotation"], + "testFileDir": ["suites/rotation-para"], "runScripts": ["build-spec.sh", "download-polkadot.sh"], "foundation": { "type": "zombie", diff --git a/test/suites/para-rotation/test_rotation.ts b/test/suites/rotation-para/test_rotation.ts similarity index 100% rename from test/suites/para-rotation/test_rotation.ts rename to test/suites/rotation-para/test_rotation.ts From f1d9f6cd3a3ab851094871909b04187bdea3b3aa Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 26 Sep 2023 16:24:40 +0200 Subject: [PATCH 22/52] Increase zombienet test timeout --- test/suites/para/test_tanssi_containers.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/suites/para/test_tanssi_containers.ts b/test/suites/para/test_tanssi_containers.ts index ba506b172..1790a3500 100644 --- a/test/suites/para/test_tanssi_containers.ts +++ b/test/suites/para/test_tanssi_containers.ts @@ -220,7 +220,7 @@ describeSuite({ it({ id: "T12", title: "Test live registration of container chain 2002", - timeout: 300000, + timeout: 360000, test: async function () { const keyring = new Keyring({ type: "sr25519" }); const alice = keyring.addFromUri("//Alice", { name: "Alice default" }); @@ -278,8 +278,16 @@ describeSuite({ it({ id: "T13", title: "Blocks are being produced on container 2002", - timeout: 60000, + timeout: 120000, test: async function () { + // This test uses a high timeout because container-chains verify authorship against a state of tanssi + // seen by the relay, and this only happens when the tanssi block is included in the relay. + // However nodes are notified of their assignment sooner, because they have a direct connection to + // tanssi. + // Therefore it might happen that container-chain collators try to collate for a container-chain that + // has not yet seen the latest state of tanssi. + // This is the error message in that case: + // [Container-2002] panicked at 'Block invalid, supplied author is not eligible.' let blockNum = (await container2002Api.rpc.chain.getBlock()).block.header.number.toNumber(); // Wait 3 blocks because the next test needs to get a non empty value from From ae44deef0fd3ee42b6898e986e27d2b848bc67bc Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 26 Sep 2023 18:46:04 +0200 Subject: [PATCH 23/52] Mix subject with relay randomness, and fix bug all seeds starting with 1 There was a bug because we tried to read an Option as a Hash, and this results in the first byte of the [u8; 32] being always 1, which is the marker for "Some" --- runtime/dancebox/src/lib.rs | 75 +++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 29 deletions(-) diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index 65e195352..6df0ed019 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -74,7 +74,9 @@ use { sp_core::{crypto::KeyTypeId, Decode, Encode, Get, MaxEncodedLen, OpaqueMetadata}, sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, - traits::{AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT}, + traits::{ + AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, Hash as HashT, + }, transaction_validity::{TransactionSource, TransactionValidity}, AccountId32, ApplyExtrinsicResult, }, @@ -448,26 +450,9 @@ fn relay_chain_state_proof() -> RelayChainStateProof { .expect("Invalid relay chain state proof, already constructed in `set_validation_data`") } -pub struct BabeDataGetter; -impl BabeDataGetter { - /* - // Tolerate panic here because only ever called in inherent (so can be omitted) - fn get_epoch_index() -> u64 { - if cfg!(feature = "runtime-benchmarks") { - // storage reads as per actual reads - let _relay_storage_root = ParachainSystem::validation_data(); - let _relay_chain_state = ParachainSystem::relay_state_proof(); - const BENCHMARKING_NEW_EPOCH: u64 = 10u64; - return BENCHMARKING_NEW_EPOCH; - } - relay_chain_state_proof() - .read_optional_entry(relay_chain::well_known_keys::EPOCH_INDEX) - .ok() - .flatten() - .expect("expected to be able to read epoch index from relay chain state proof") - } - */ - fn get_epoch_randomness() -> Option { +pub struct BabeCurrentBlockRandomnessGetter; +impl BabeCurrentBlockRandomnessGetter { + fn get_block_randomness() -> Option { if cfg!(feature = "runtime-benchmarks") { // storage reads as per actual reads let _relay_storage_root = ParachainSystem::validation_data(); @@ -475,10 +460,43 @@ impl BabeDataGetter { let benchmarking_babe_output = Hash::default(); return Some(benchmarking_babe_output); } + relay_chain_state_proof() - .read_optional_entry(relay_chain::well_known_keys::CURRENT_BLOCK_RANDOMNESS) + .read_optional_entry::>( + relay_chain::well_known_keys::CURRENT_BLOCK_RANDOMNESS, + ) .ok() .flatten() + .flatten() + } + + /// Return the block randomness from the relay mixed with the provided subject. + /// This ensures that the randomness will be different on different pallets, as long as the subject is different. + // TODO: audit usage of randomness API + // https://github.com/paritytech/polkadot/issues/2601 + fn get_block_randomness_mixed(subject: &[u8]) -> Option { + Self::get_block_randomness() + .map(|random_hash| mix_randomness::(random_hash, subject)) + } +} + +/// Combines the vrf output of the previous relay block with the provided subject. +/// This ensures that the randomness will be different on different pallets, as long as the subject is different. +fn mix_randomness(vrf_output: Hash, subject: &[u8]) -> T::Hash { + let mut digest = Vec::new(); + digest.extend_from_slice(vrf_output.as_ref()); + digest.extend_from_slice(subject); + + T::Hashing::hash(digest.as_slice()) +} + +// Randomness trait +impl frame_support::traits::Randomness for BabeCurrentBlockRandomnessGetter { + fn random(subject: &[u8]) -> (Hash, BlockNumber) { + let block_number = frame_system::Pallet::::block_number(); + let randomness = Self::get_block_randomness_mixed(subject).unwrap_or_default(); + + (randomness, block_number) } } @@ -491,15 +509,14 @@ impl pallet_initializer::ApplyNewSession for OwnApplySession { queued: Vec<(AccountId, NimbusId)>, ) { let random_seed = if session_index != 0 { - let mut buf = [0u8; 32]; - if let Some(random_hash) = BabeDataGetter::get_epoch_randomness() { - // TODO: mix some key like b"paras" and also the block number to ensure the seed changes - // on every tanssi block - // TODO: audit usage of randomness API - // https://github.com/paritytech/polkadot/issues/2601 - //let (random_hash, _) = pallet_babe::RandomnessFromOneEpochAgo::::random(&b"paras"[..]); + if let Some(random_hash) = + BabeCurrentBlockRandomnessGetter::get_block_randomness_mixed(b"CollatorAssignment") + { + // Return random_hash as a [u8; 32] instead of a Hash + let mut buf = [0u8; 32]; let len = sp_std::cmp::min(32, random_hash.as_ref().len()); buf[..len].copy_from_slice(&random_hash.as_ref()[..len]); + buf } else { // If there is no randomness (e.g when running in dev mode), return [0; 32] From 5658cfb52cf451cdcf1c7fffec16d98193ec58de Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 27 Sep 2023 11:58:16 +0200 Subject: [PATCH 24/52] Fix collators rotating 1 block too early --- node/src/service.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node/src/service.rs b/node/src/service.rs index 099cc5da3..fccbda63d 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -227,7 +227,9 @@ pub fn build_check_assigned_para_id( spawner: impl SpawnEssentialNamed, ) { // Subscribe to new blocks in order to react to para id assignment - let mut import_notifications = client.import_notification_stream(); + // This must be the stream of finalized blocks, otherwise the collators may rotate to a + // different chain before the block is finalized, and that could lead to a stalled chain + let mut import_notifications = client.finality_notification_stream(); let check_assigned_para_id_task = async move { while let Some(msg) = import_notifications.next().await { From 2734f75445f897878d45341bdb16c41a1604b8c8 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 27 Sep 2023 13:03:59 +0200 Subject: [PATCH 25/52] Fix zombienet tests --- test/suites/para/test_tanssi_containers.ts | 3 +++ test/suites/warp-sync/test_warp_sync.ts | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/test/suites/para/test_tanssi_containers.ts b/test/suites/para/test_tanssi_containers.ts index fab928647..e3249c40b 100644 --- a/test/suites/para/test_tanssi_containers.ts +++ b/test/suites/para/test_tanssi_containers.ts @@ -269,6 +269,9 @@ describeSuite({ expect(await directoryExists(container2002DbPath)).to.be.false; // The node starts one session before the container chain is in registered list await waitSessions(context, paraApi, 1); + // The node detects assignment when the block is finalized, but "waitSessions" ignores finality. + // So wait a few blocks more hoping that the current block will be finalized by then. + await context.waitBlock(3, "Tanssi"); expect(await directoryExists(container2002DbPath)).to.be.true; // Not registered yet, still pending const registered4 = await paraApi.query.registrar.registeredParaIds(); diff --git a/test/suites/warp-sync/test_warp_sync.ts b/test/suites/warp-sync/test_warp_sync.ts index 6d105f298..d8fa7fd0b 100644 --- a/test/suites/warp-sync/test_warp_sync.ts +++ b/test/suites/warp-sync/test_warp_sync.ts @@ -191,6 +191,10 @@ describeSuite({ expect(allCollators).to.deep.equal(expectedAllCollators); + // The node detects assignment when the block is finalized, but "waitSessions" ignores finality. + // So wait a few blocks more hoping that the current block will be finalized by then. + await context.waitBlock(3, "Tanssi"); + // Collator2000-02 container chain db should have been deleted expect(await directoryExists(container200002DbPath)).to.be.false; @@ -204,7 +208,7 @@ describeSuite({ title: "Collator1000-03 is producing blocks on Container 2000", timeout: 300000, test: async function () { - const blockStart = (await container2000Api.rpc.chain.getBlock()).block.header.number.toNumber(); + const blockStart = (await container2000Api.rpc.chain.getBlock()).block.header.number.toNumber() - 3; // Wait up to 8 blocks, giving the new collator 4 chances to build a block const blockEnd = blockStart + 8; const authors = []; @@ -222,7 +226,10 @@ describeSuite({ if (author == getKeyringNimbusIdHex("Collator1000-03")) { break; } - await context.waitBlock(1, "Container2000"); + const currentBlock = (await container2000Api.rpc.chain.getBlock()).block.header.number.toNumber(); + if (currentBlock == blockNumber) { + await context.waitBlock(1, "Container2000"); + } } expect(authors).to.contain(getKeyringNimbusIdHex("Collator1000-03")); From c35632d8a978d0f8609100fca3bacf17cf521b3c Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 27 Sep 2023 14:43:29 +0200 Subject: [PATCH 26/52] Fix mock randomness Default to None in integration tests, if needed it can be set to Some(x) --- runtime/dancebox/tests/common/mod.rs | 11 ++--------- runtime/dancebox/tests/integration_test.rs | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/runtime/dancebox/tests/common/mod.rs b/runtime/dancebox/tests/common/mod.rs index db422cd47..55a20edbe 100644 --- a/runtime/dancebox/tests/common/mod.rs +++ b/runtime/dancebox/tests/common/mod.rs @@ -100,15 +100,8 @@ pub fn run_to_block(n: u32) { /// source of randomness. pub fn set_parachain_inherent_data() { use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder; - let (relay_parent_storage_root, relay_chain_state) = { - let mut sproof = RelayStateSproofBuilder::default(); - sproof.additional_key_values.push(( - well_known_keys::CURRENT_BLOCK_RANDOMNESS.to_vec(), - cumulus_primitives_core::relay_chain::Hash::default().encode(), - )); - - sproof.into_state_root_and_proof() - }; + let (relay_parent_storage_root, relay_chain_state) = + RelayStateSproofBuilder::default().into_state_root_and_proof(); let vfp = PersistedValidationData { relay_parent_number: 1u32, relay_parent_storage_root, diff --git a/runtime/dancebox/tests/integration_test.rs b/runtime/dancebox/tests/integration_test.rs index 38ef463db..8e2680436 100644 --- a/runtime/dancebox/tests/integration_test.rs +++ b/runtime/dancebox/tests/integration_test.rs @@ -1602,7 +1602,7 @@ fn test_collator_assignment_rotation() { let mut sproof = RelayStateSproofBuilder::default(); sproof.additional_key_values.push(( well_known_keys::CURRENT_BLOCK_RANDOMNESS.to_vec(), - random_seed.to_vec(), + Some(random_seed).encode(), )); sproof.into_state_root_and_proof() From d15139fc7c6af96656f1eebb0c6e9383c3ec8375 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 27 Sep 2023 15:00:33 +0200 Subject: [PATCH 27/52] Fix unused import --- runtime/dancebox/tests/common/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/runtime/dancebox/tests/common/mod.rs b/runtime/dancebox/tests/common/mod.rs index 55a20edbe..5f1a0ec91 100644 --- a/runtime/dancebox/tests/common/mod.rs +++ b/runtime/dancebox/tests/common/mod.rs @@ -17,7 +17,7 @@ use { cumulus_primitives_core::{ParaId, PersistedValidationData}, cumulus_primitives_parachain_inherent::ParachainInherentData, - dancebox_runtime::{AuthorInherent, AuthorityAssignment}, + dancebox_runtime::{AuthorInherent, AuthorityAssignment, MaxLengthTokenSymbol}, frame_support::{ assert_ok, dispatch::Dispatchable, @@ -37,8 +37,6 @@ use { mod xcm; -use cumulus_primitives_core::relay_chain::well_known_keys; -use dancebox_runtime::MaxLengthTokenSymbol; pub use dancebox_runtime::{ AccountId, Balance, Balances, Initializer, ParachainInfo, Registrar, Runtime, RuntimeCall, RuntimeEvent, Session, System, From ee373d7ae7384fceb5e4f3e0b07e89c3f1e534ce Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 27 Sep 2023 18:17:10 +0200 Subject: [PATCH 28/52] WIP tests --- test/suites/rotation-para/test_rotation.ts | 110 ++++++++++++++++++++- 1 file changed, 107 insertions(+), 3 deletions(-) diff --git a/test/suites/rotation-para/test_rotation.ts b/test/suites/rotation-para/test_rotation.ts index 91cd2436e..f85e297ac 100644 --- a/test/suites/rotation-para/test_rotation.ts +++ b/test/suites/rotation-para/test_rotation.ts @@ -1,8 +1,9 @@ import { beforeAll, describeSuite, expect } from "@moonwall/cli"; import { MIN_GAS_PRICE, customWeb3Request, generateKeyringPair } from "@moonwall/util"; -import { ApiPromise } from "@polkadot/api"; +import { ApiPromise, Keyring } from "@polkadot/api"; import { Signer } from "ethers"; import { getAuthorFromDigest } from "../../util/author"; +import { signAndSendAndInclude, waitSessions, waitToSession } from "../../util/block"; import { createTransfer, waitUntilEthTxIncluded } from "../../util/ethereum"; import { getKeyringNimbusIdHex } from "../../util/keys"; import { getHeaderFromRelay } from "../../util/relayInterface"; @@ -18,6 +19,10 @@ describeSuite({ let container2001Api: ApiPromise; let container2002Api: ApiPromise; let ethersSigner: Signer; + let assignment3; + let assignment5; + let allCollators; + let collatorName; beforeAll(async () => { paraApi = context.polkadotJs("Tanssi"); @@ -58,6 +63,21 @@ describeSuite({ expect(header2000.number.toNumber()).to.be.equal(0); expect(header2001.number.toNumber()).to.be.equal(0); expect(header2002.number.toNumber()).to.be.equal(0); + + // Initialize list of all collators, this should match the names from build-spec.sh script + allCollators = [ + "Collator1000-01", + "Collator1000-02", + "Collator2000-01", + "Collator2000-02", + "Collator2001-01", + "Collator2001-02", + "Collator2002-01", + "Collator2002-02", + ]; + // Initialize reverse map of collator key to collator name + collatorName = createCollatorKeyToNameMap(paraApi, allCollators); + console.log(collatorName); }, 120000); it({ @@ -66,6 +86,24 @@ describeSuite({ test: async function () { const blockNum = (await paraApi.rpc.chain.getBlock()).block.header.number.toNumber(); expect(blockNum).to.be.greaterThan(0); + + const assignment = await paraApi.query.collatorAssignment.collatorContainerChain(); + console.log("assignment session 0: ", assignment.toJSON()); + }, + }); + + it({ + id: "T02", + title: "Set 1 collator per parachain", + test: async function () { + const keyring = new Keyring({ type: "sr25519" }); + const alice = keyring.addFromUri("//Alice", { name: "Alice default" }); + + const tx1 = await paraApi.tx.configuration.setCollatorsPerContainer(1); + const tx2 = await paraApi.tx.configuration.setMinOrchestratorCollators(1); + const tx3 = await paraApi.tx.configuration.setMaxOrchestratorCollators(1); + const tx123 = paraApi.tx.utility.batchAll([tx1, tx2, tx3]); + await signAndSendAndInclude(paraApi.tx.sudo.sudo(tx123), alice); }, }); @@ -213,9 +251,59 @@ describeSuite({ }); it({ id: "T12", - title: "Rotation works", - timeout: 30000, + title: "On session 3 we have 1 collator per chain", + timeout: 90000, + test: async function () { + await waitToSession(context, paraApi, 3); + const assignment = await paraApi.query.collatorAssignment.collatorContainerChain(); + assignment3 = assignment.toJSON(); + console.log("assignment session 3: ", assignment.toJSON()); + expect(assignment.orchestratorChain.length).toBe(1); + expect(assignment.containerChains.toJSON()[2000].length).toBe(1); + expect(assignment.containerChains.toJSON()[2001].length).toBe(1); + }, + }); + it({ + id: "T13", + title: "On session 4 collators start syncing the new chains", + timeout: 300000, test: async function () { + await waitToSession(context, paraApi, 4); + const futureAssignment = await paraApi.query.collatorAssignment.pendingCollatorContainerChain(); + console.log("future assignment session 5: ", futureAssignment.toJSON()); + // The assignment is random, so there is a small chance that it will be the same, + // and in that case this test shouldn't fail + if (futureAssignment.isNone) { + assignment5 = assignment3; + } else { + assignment5 = futureAssignment.toJSON(); + } + + // The node detects assignment when the block is finalized, but "waitSessions" ignores finality. + // So wait a few blocks more hoping that the current block will be finalized by then. + await context.waitBlock(3, "Tanssi"); + + let c2000 = collatorName[assignment5.containerChains[2000][0]]; + let c2001 = collatorName[assignment5.containerChains[2001][0]]; + console.log("c2000: ", c2000); + console.log("c2001: ", c2001); + let otherCollators = getUnassignedCollators(allCollators, [c2000, c2001]); + console.log("otherCollators: ", otherCollators); + + // TODO: verify that collators have db path running, and otherCollators do not have the db path + }, + }); + it({ + id: "T14", + title: "On session 5 collators stop the previously assigned chains", + timeout: 300000, + test: async function () { + await waitToSession(context, paraApi, 5); + const assignment = await paraApi.query.collatorAssignment.collatorContainerChain(); + console.log("assignment session 5: ", assignment.toJSON()); + expect(assignment.orchestratorChain.length).toBe(1); + expect(assignment.containerChains.toJSON()[2000].length).toBe(1); + expect(assignment.containerChains.toJSON()[2001].length).toBe(1); // TODO: for the missing tests: // go to session 4, check that future assignment changes // also check that collators start syncing the new chains (check if db path exists) @@ -225,3 +313,19 @@ describeSuite({ }); }, }); + +function createCollatorKeyToNameMap(paraApi, collatorNames: string[]): Record { + const collatorName: Record = {}; + + collatorNames.forEach(name => { + const hexAddress = getKeyringNimbusIdHex(name); + const k = paraApi.createType("AccountId", hexAddress); + collatorName[k] = name; + }); + + return collatorName; +} + +function getUnassignedCollators(allCollators: string[], assignedToContainers: string[]): string[] { + return allCollators.filter(collator => !assignedToContainers.includes(collator)); +} \ No newline at end of file From 30be0c3a337846b4be0a3cad476e72e537cebe95 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 28 Sep 2023 11:54:42 +0200 Subject: [PATCH 29/52] Implement zombie_tanssi_rotation test suite And fix random seed because of a bug related with db lock --- .github/workflows/release.yml | 55 ++++++ runtime/dancebox/src/lib.rs | 20 ++ test/suites/para/test_tanssi_containers.ts | 12 +- test/suites/rotation-para/test_rotation.ts | 210 ++++++++++++++++----- 4 files changed, 243 insertions(+), 54 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9315fc135..f692d6437 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -440,6 +440,61 @@ jobs: name: logs path: logs + zombienet-tests-rotation: + runs-on: self-hosted + needs: ["set-tags", "build"] + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ needs.set-tags.outputs.git_ref }} + + - name: Pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 20.x + cache: "pnpm" + + - name: "Download binaries" + uses: actions/download-artifact@v3.0.2 + with: + name: binaries + path: target/release + + - name: "Run zombie test" + run: | + chmod uog+x target/release/tanssi-node + chmod uog+x target/release/container-chain-template-simple-node + chmod uog+x target/release/container-chain-template-frontier-node + + cd test + pnpm install + + ## Run tests + + pnpm moonwall test zombie_tanssi_rotation + + - name: "Gather zombie logs" + if: failure() + run: | + ls -ltr /tmp + latest_zombie_dir=$(find /tmp -type d -iname "*zombie*" -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" ") + logs_dir="logs" + mkdir -p "$logs_dir" + find "$latest_zombie_dir" -type f -name "*.log" -exec cp {} "$logs_dir" \; + + - name: "Upload zombie logs" + if: failure() + uses: actions/upload-artifact@v3.1.2 + with: + name: logs-rotation + path: logs + zombienet-tests-warp-sync: runs-on: ubuntu-latest needs: ["set-tags", "build"] diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index 6df0ed019..a442f8d2b 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -528,6 +528,26 @@ impl pallet_initializer::ApplyNewSession for OwnApplySession { [0; 32] }; + let random_seed = match session_index { + 1 => [ + 29, 200, 110, 219, 124, 225, 239, 107, 218, 231, 160, 108, 251, 109, 37, 229, 19, + 62, 202, 118, 12, 1, 157, 85, 119, 237, 26, 15, 154, 255, 63, 246, + ], + 2 => [ + 84, 44, 234, 18, 195, 111, 223, 207, 97, 84, 67, 58, 222, 144, 143, 35, 191, 200, + 210, 167, 157, 32, 68, 122, 40, 72, 174, 114, 8, 132, 158, 196, + ], + 3 => [ + 64, 121, 243, 25, 201, 106, 244, 248, 15, 179, 110, 224, 117, 251, 126, 221, 136, + 123, 209, 51, 191, 54, 114, 75, 154, 130, 13, 15, 104, 149, 34, 207, + ], + 4 => [ + 185, 26, 51, 210, 96, 190, 204, 173, 155, 184, 156, 217, 148, 114, 226, 98, 91, + 133, 9, 201, 21, 109, 97, 76, 219, 188, 251, 114, 37, 198, 141, 96, + ], + _ => random_seed, + }; + // We first initialize Configuration Configuration::initializer_on_new_session(&session_index); // Next: Registrar diff --git a/test/suites/para/test_tanssi_containers.ts b/test/suites/para/test_tanssi_containers.ts index 1790a3500..add517cdf 100644 --- a/test/suites/para/test_tanssi_containers.ts +++ b/test/suites/para/test_tanssi_containers.ts @@ -220,7 +220,7 @@ describeSuite({ it({ id: "T12", title: "Test live registration of container chain 2002", - timeout: 360000, + timeout: 240000, test: async function () { const keyring = new Keyring({ type: "sr25519" }); const alice = keyring.addFromUri("//Alice", { name: "Alice default" }); @@ -278,16 +278,8 @@ describeSuite({ it({ id: "T13", title: "Blocks are being produced on container 2002", - timeout: 120000, + timeout: 60000, test: async function () { - // This test uses a high timeout because container-chains verify authorship against a state of tanssi - // seen by the relay, and this only happens when the tanssi block is included in the relay. - // However nodes are notified of their assignment sooner, because they have a direct connection to - // tanssi. - // Therefore it might happen that container-chain collators try to collate for a container-chain that - // has not yet seen the latest state of tanssi. - // This is the error message in that case: - // [Container-2002] panicked at 'Block invalid, supplied author is not eligible.' let blockNum = (await container2002Api.rpc.chain.getBlock()).block.header.number.toNumber(); // Wait 3 blocks because the next test needs to get a non empty value from diff --git a/test/suites/rotation-para/test_rotation.ts b/test/suites/rotation-para/test_rotation.ts index f85e297ac..a226d498d 100644 --- a/test/suites/rotation-para/test_rotation.ts +++ b/test/suites/rotation-para/test_rotation.ts @@ -2,8 +2,9 @@ import { beforeAll, describeSuite, expect } from "@moonwall/cli"; import { MIN_GAS_PRICE, customWeb3Request, generateKeyringPair } from "@moonwall/util"; import { ApiPromise, Keyring } from "@polkadot/api"; import { Signer } from "ethers"; +import fs from "fs/promises"; import { getAuthorFromDigest } from "../../util/author"; -import { signAndSendAndInclude, waitSessions, waitToSession } from "../../util/block"; +import { signAndSendAndInclude, waitToSession } from "../../util/block"; import { createTransfer, waitUntilEthTxIncluded } from "../../util/ethereum"; import { getKeyringNimbusIdHex } from "../../util/keys"; import { getHeaderFromRelay } from "../../util/relayInterface"; @@ -17,19 +18,18 @@ describeSuite({ let relayApi: ApiPromise; let container2000Api: ApiPromise; let container2001Api: ApiPromise; - let container2002Api: ApiPromise; let ethersSigner: Signer; let assignment3; let assignment5; - let allCollators; - let collatorName; + let allCollators: string[]; + let collatorName: Record; + let containerDbPaths: string[]; beforeAll(async () => { paraApi = context.polkadotJs("Tanssi"); relayApi = context.polkadotJs("Relay"); container2000Api = context.polkadotJs("Container2000"); container2001Api = context.polkadotJs("Container2001"); - container2002Api = context.polkadotJs("Container2002"); ethersSigner = context.ethers(); const relayNetwork = relayApi.consts.system.version.specName.toString(); @@ -50,19 +50,12 @@ describeSuite({ expect(container2001Network, "Container2001 API incorrect").to.contain("frontier-template"); expect(paraId2001, "Container2001 API incorrect").to.be.equal("2001"); - const container2002Network = container2002Api.consts.system.version.specName.toString(); - const paraId2002 = (await container2002Api.query.parachainInfo.parachainId()).toString(); - expect(container2002Network, "Container2002 API incorrect").to.contain("container-chain-template"); - expect(paraId2002, "Container2002 API incorrect").to.be.equal("2002"); - // Test block numbers in relay are 0 yet const header2000 = await getHeaderFromRelay(relayApi, 2000); const header2001 = await getHeaderFromRelay(relayApi, 2001); - const header2002 = await getHeaderFromRelay(relayApi, 2002); expect(header2000.number.toNumber()).to.be.equal(0); expect(header2001.number.toNumber()).to.be.equal(0); - expect(header2002.number.toNumber()).to.be.equal(0); // Initialize list of all collators, this should match the names from build-spec.sh script allCollators = [ @@ -78,6 +71,11 @@ describeSuite({ // Initialize reverse map of collator key to collator name collatorName = createCollatorKeyToNameMap(paraApi, allCollators); console.log(collatorName); + + containerDbPaths = [ + "/data/containers/chains/simple_container_2000/db/full-container-2000", + "/data/containers/chains/frontier_container_2001/db/full-container-2001", + ]; }, 120000); it({ @@ -86,9 +84,6 @@ describeSuite({ test: async function () { const blockNum = (await paraApi.rpc.chain.getBlock()).block.header.number.toNumber(); expect(blockNum).to.be.greaterThan(0); - - const assignment = await paraApi.query.collatorAssignment.collatorContainerChain(); - console.log("assignment session 0: ", assignment.toJSON()); }, }); @@ -255,9 +250,15 @@ describeSuite({ timeout: 90000, test: async function () { await waitToSession(context, paraApi, 3); + + // The node detects assignment when the block is finalized, but "waitSessions" ignores finality. + // So wait a few blocks more hoping that the current block will be finalized by then. + await context.waitBlock(3, "Tanssi"); const assignment = await paraApi.query.collatorAssignment.collatorContainerChain(); assignment3 = assignment.toJSON(); - console.log("assignment session 3: ", assignment.toJSON()); + console.log("assignment session 3:"); + logAssignment(collatorName, assignment3); + expect(assignment.orchestratorChain.length).toBe(1); expect(assignment.containerChains.toJSON()[2000].length).toBe(1); expect(assignment.containerChains.toJSON()[2001].length).toBe(1); @@ -266,11 +267,14 @@ describeSuite({ it({ id: "T13", title: "On session 4 collators start syncing the new chains", - timeout: 300000, + timeout: 90000, test: async function () { await waitToSession(context, paraApi, 4); + + // The node detects assignment when the block is finalized, but "waitSessions" ignores finality. + // So wait a few blocks more hoping that the current block will be finalized by then. + await context.waitBlock(3, "Tanssi"); const futureAssignment = await paraApi.query.collatorAssignment.pendingCollatorContainerChain(); - console.log("future assignment session 5: ", futureAssignment.toJSON()); // The assignment is random, so there is a small chance that it will be the same, // and in that case this test shouldn't fail if (futureAssignment.isNone) { @@ -278,54 +282,172 @@ describeSuite({ } else { assignment5 = futureAssignment.toJSON(); } + console.log("assignment session 5:"); + logAssignment(collatorName, assignment5); + + // First, check that nodes are still running in their previously assigned chain + const oldC2000 = collatorName[assignment3.containerChains[2000][0]]; + const oldC2001 = collatorName[assignment3.containerChains[2001][0]]; + const oldContainer2000DbPath = + getTmpZombiePath() + + `/${oldC2000}/data/containers/chains/simple_container_2000/db/full-container-2000`; + const oldContainer2001DbPath = + getTmpZombiePath() + + `/${oldC2001}/data/containers/chains/frontier_container_2001/db/full-container-2001`; + expect(await directoryExists(oldContainer2000DbPath)).to.be.true; + expect(await directoryExists(oldContainer2001DbPath)).to.be.true; + + // Check that new assigned collators have started syncing + const c2000 = collatorName[assignment5.containerChains[2000][0]]; + const c2001 = collatorName[assignment5.containerChains[2001][0]]; + let unassignedCollators = getUnassignedCollators(allCollators, [c2000, c2001]); + // Remove old collators because they will still have some chains running + unassignedCollators = unassignedCollators.filter((x) => x !== oldC2000); + unassignedCollators = unassignedCollators.filter((x) => x !== oldC2001); + + // Verify that collators have container chain running by looking at db path, + // and unassignedCollators should not have any db path + const container2000DbPath = + getTmpZombiePath() + + `/${c2000}/data/containers/chains/simple_container_2000/db/full-container-2000`; + const container2001DbPath = + getTmpZombiePath() + + `/${c2001}/data/containers/chains/frontier_container_2001/db/full-container-2001`; + expect(await directoryExists(container2000DbPath)).to.be.true; + expect(await directoryExists(container2001DbPath)).to.be.true; + + await ensureContainerDbPathsDontExist(unassignedCollators, containerDbPaths); + }, + }); + it({ + id: "T14", + title: "On session 5 collators stop the previously assigned chains", + timeout: 90000, + test: async function () { + await waitToSession(context, paraApi, 5); + const assignment = await paraApi.query.collatorAssignment.collatorContainerChain(); + expect(assignment.toJSON()).to.deep.equal(assignment5); // The node detects assignment when the block is finalized, but "waitSessions" ignores finality. // So wait a few blocks more hoping that the current block will be finalized by then. + // This also serves to check that Tanssi is producing blocks after the rotation await context.waitBlock(3, "Tanssi"); - let c2000 = collatorName[assignment5.containerChains[2000][0]]; - let c2001 = collatorName[assignment5.containerChains[2001][0]]; - console.log("c2000: ", c2000); - console.log("c2001: ", c2001); - let otherCollators = getUnassignedCollators(allCollators, [c2000, c2001]); - console.log("otherCollators: ", otherCollators); + // First, check that nodes have stopped in their previously assigned chain + const oldC2000 = collatorName[assignment3.containerChains[2000][0]]; + const oldC2001 = collatorName[assignment3.containerChains[2001][0]]; + const c2000 = collatorName[assignment5.containerChains[2000][0]]; + const c2001 = collatorName[assignment5.containerChains[2001][0]]; + const oldContainer2000DbPath = + getTmpZombiePath() + + `/${oldC2000}/data/containers/chains/simple_container_2000/db/full-container-2000`; + const oldContainer2001DbPath = + getTmpZombiePath() + + `/${oldC2001}/data/containers/chains/frontier_container_2001/db/full-container-2001`; + // Edge case: collators may be assigned to the same chain, in that case the directory will still exist + if (oldC2000 != c2000) { + expect(await directoryExists(oldContainer2000DbPath)).to.be.false; + } + if (oldC2001 != c2001) { + expect(await directoryExists(oldContainer2001DbPath)).to.be.false; + } - // TODO: verify that collators have db path running, and otherCollators do not have the db path + // Check that new assigned collators are running + const unassignedCollators = getUnassignedCollators(allCollators, [c2000, c2001]); + + // Verify that collators have container chain running by looking at db path, + // and unassignedCollators should not have any db path + const container2000DbPath = + getTmpZombiePath() + + `/${c2000}/data/containers/chains/simple_container_2000/db/full-container-2000`; + const container2001DbPath = + getTmpZombiePath() + + `/${c2001}/data/containers/chains/frontier_container_2001/db/full-container-2001`; + expect(await directoryExists(container2000DbPath)).to.be.true; + expect(await directoryExists(container2001DbPath)).to.be.true; + await ensureContainerDbPathsDontExist(unassignedCollators, containerDbPaths); }, }); + it({ - id: "T14", - title: "On session 5 collators stop the previously assigned chains", - timeout: 300000, + id: "T15", + title: "Blocks are being produced on container 2000", test: async function () { - await waitToSession(context, paraApi, 5); - const assignment = await paraApi.query.collatorAssignment.collatorContainerChain(); - console.log("assignment session 5: ", assignment.toJSON()); - expect(assignment.orchestratorChain.length).toBe(1); - expect(assignment.containerChains.toJSON()[2000].length).toBe(1); - expect(assignment.containerChains.toJSON()[2001].length).toBe(1); - // TODO: for the missing tests: - // go to session 4, check that future assignment changes - // also check that collators start syncing the new chains (check if db path exists) - // go to session 5, check that collators stopped the previously assigned chain - // check that all the chains are still producing blocks + await context.waitBlock(1, "Container2000"); + }, + }); + + it({ + id: "T16", + title: "Blocks are being produced on container 2001", + test: async function () { + await context.waitBlock(1, "Container2001"); }, }); }, }); +async function directoryExists(directoryPath) { + try { + await fs.access(directoryPath, fs.constants.F_OK); + return true; + } catch (err) { + return false; + } +} + +/// Returns the /tmp/zombie-52234... path +function getTmpZombiePath() { + const logFilePath = process.env.MOON_MONITORED_NODE; + + if (logFilePath) { + const lastIndex = logFilePath.lastIndexOf("/"); + return lastIndex !== -1 ? logFilePath.substring(0, lastIndex) : null; + } + + // Return null if the environment variable is not set + return null; +} + +/// Given a list of collators and a list of dbPaths, checks that the path does not exist for all the collators. +/// This can be used to ensure that all the unassigned collators do not have any container chains running. +async function ensureContainerDbPathsDontExist(collators: string[], pathsToVerify: string[]) { + for (const collator of collators) { + for (const path of pathsToVerify) { + const fullPath = getTmpZombiePath() + `/${collator}${path}`; + expect(await directoryExists(fullPath), `Container DB path exists for ${collator}: ${fullPath}`).to.be + .false; + } + } +} + +/// Create a map of collator key "5C5p..." to collator name "Collator1000-01". function createCollatorKeyToNameMap(paraApi, collatorNames: string[]): Record { const collatorName: Record = {}; - - collatorNames.forEach(name => { + + collatorNames.forEach((name) => { const hexAddress = getKeyringNimbusIdHex(name); const k = paraApi.createType("AccountId", hexAddress); collatorName[k] = name; }); - + return collatorName; } +/// Given a list of all collators and collators assigned to containers, returns the collators that are not assigned to +/// containers. function getUnassignedCollators(allCollators: string[], assignedToContainers: string[]): string[] { - return allCollators.filter(collator => !assignedToContainers.includes(collator)); -} \ No newline at end of file + return allCollators.filter((collator) => !assignedToContainers.includes(collator)); +} + +function logAssignment(collatorName, assignment) { + const nameAssignment = { + orchestratorChain: assignment.orchestratorChain.map((x) => collatorName[x]), + containerChains: Object.keys(assignment.containerChains).reduce((result, key) => { + result[key] = assignment.containerChains[key].map((x) => collatorName[x]); + return result; + }, {}), + }; + + console.log(nameAssignment); +} From 37567eff8c0ca10826f4ddb1107ba2c0aa091043 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 4 Oct 2023 16:20:32 +0200 Subject: [PATCH 30/52] Remove fixed random seed, was used for testing --- runtime/dancebox/src/lib.rs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index a442f8d2b..6df0ed019 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -528,26 +528,6 @@ impl pallet_initializer::ApplyNewSession for OwnApplySession { [0; 32] }; - let random_seed = match session_index { - 1 => [ - 29, 200, 110, 219, 124, 225, 239, 107, 218, 231, 160, 108, 251, 109, 37, 229, 19, - 62, 202, 118, 12, 1, 157, 85, 119, 237, 26, 15, 154, 255, 63, 246, - ], - 2 => [ - 84, 44, 234, 18, 195, 111, 223, 207, 97, 84, 67, 58, 222, 144, 143, 35, 191, 200, - 210, 167, 157, 32, 68, 122, 40, 72, 174, 114, 8, 132, 158, 196, - ], - 3 => [ - 64, 121, 243, 25, 201, 106, 244, 248, 15, 179, 110, 224, 117, 251, 126, 221, 136, - 123, 209, 51, 191, 54, 114, 75, 154, 130, 13, 15, 104, 149, 34, 207, - ], - 4 => [ - 185, 26, 51, 210, 96, 190, 204, 173, 155, 184, 156, 217, 148, 114, 226, 98, 91, - 133, 9, 201, 21, 109, 97, 76, 219, 188, 251, 114, 37, 198, 141, 96, - ], - _ => random_seed, - }; - // We first initialize Configuration Configuration::initializer_on_new_session(&session_index); // Next: Registrar From 1301a67dd595cd0dc1111f38ab9e05011794fcbc Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 9 Oct 2023 17:44:19 +0200 Subject: [PATCH 31/52] Fix merge --- runtime/dancebox/tests/integration_test.rs | 110 ++++++++++++++------- 1 file changed, 76 insertions(+), 34 deletions(-) diff --git a/runtime/dancebox/tests/integration_test.rs b/runtime/dancebox/tests/integration_test.rs index dfb37979f..6d5971d85 100644 --- a/runtime/dancebox/tests/integration_test.rs +++ b/runtime/dancebox/tests/integration_test.rs @@ -1562,45 +1562,87 @@ fn test_author_noting_not_self_para() { } #[test] -fn test_kill_author_data() { - BlockTests::new() - .with_relay_sproof_builder(|_, relay_block_num, sproof| match relay_block_num { - 1 => { - let slot: InherentType = 13u64.into(); - let mut s = ParaHeaderSproofBuilderItem::default(); - s.para_id = 1001.into(); - s.author_id = - HeaderAs::NonEncoded(sp_runtime::generic::Header:: { - parent_hash: Default::default(), - number: 1, - state_root: Default::default(), - extrinsics_root: Default::default(), - digest: sp_runtime::generic::Digest { - logs: vec![DigestItem::PreRuntime(AURA_ENGINE_ID, slot.encode())], - }, - }); - sproof.items.push(s); - } - _ => unreachable!(), - }) - .add(1, || { +fn test_author_noting_set_author_and_kill_author_data() { + ExtBuilder::default() + .with_balances(vec![ + // Alice gets 10k extra tokens for her mapping deposit + (AccountId::from(ALICE), 210_000 * UNIT), + (AccountId::from(BOB), 100_000 * UNIT), + (AccountId::from(CHARLIE), 100_000 * UNIT), + (AccountId::from(DAVE), 100_000 * UNIT), + ]) + .with_collators(vec![ + (AccountId::from(ALICE), 210 * UNIT), + (AccountId::from(BOB), 100 * UNIT), + (AccountId::from(CHARLIE), 100 * UNIT), + (AccountId::from(DAVE), 100 * UNIT), + ]) + .with_para_ids(vec![ + (1001, empty_genesis_data(), vec![]), + (1002, empty_genesis_data(), vec![]), + ]) + .build() + .execute_with(|| { + let other_para: ParaId = 1001u32.into(); + + assert_ok!(AuthorNoting::set_author( + root_origin(), + other_para, + 1, + AccountId::from(DAVE) + )); + assert_eq!( - AuthorNoting::latest_author(ParaId::from(1001)), + AuthorNoting::latest_author(other_para), Some(ContainerChainBlockInfo { block_number: 1, - author: 13u64 + author: AccountId::from(DAVE) }) ); - assert_ok!(AuthorNoting::kill_author_data( - RuntimeOrigin::root(), - 1001.into(), - )); - assert_eq!(AuthorNoting::latest_author(ParaId::from(1001)), None); - System::assert_last_event( - Event::RemovedAuthorData { - para_id: 1001.into(), - } - .into(), + + assert_ok!(AuthorNoting::kill_author_data(root_origin(), other_para)); + + assert_eq!(AuthorNoting::latest_author(other_para), None); + }); +} + +#[test] +fn test_author_noting_set_author_and_kill_author_data_bad_origin() { + ExtBuilder::default() + .with_balances(vec![ + // Alice gets 10k extra tokens for her mapping deposit + (AccountId::from(ALICE), 210_000 * UNIT), + (AccountId::from(BOB), 100_000 * UNIT), + (AccountId::from(CHARLIE), 100_000 * UNIT), + (AccountId::from(DAVE), 100_000 * UNIT), + ]) + .with_collators(vec![ + (AccountId::from(ALICE), 210 * UNIT), + (AccountId::from(BOB), 100 * UNIT), + (AccountId::from(CHARLIE), 100 * UNIT), + (AccountId::from(DAVE), 100 * UNIT), + ]) + .with_para_ids(vec![ + (1001, empty_genesis_data(), vec![]), + (1002, empty_genesis_data(), vec![]), + ]) + .build() + .execute_with(|| { + let other_para: ParaId = 1001u32.into(); + + assert_noop!( + AuthorNoting::set_author( + origin_of(ALICE.into()), + other_para, + 1, + AccountId::from(DAVE) + ), + BadOrigin + ); + + assert_noop!( + AuthorNoting::kill_author_data(origin_of(ALICE.into()), other_para), + BadOrigin ); }); } From 901b6f6e07e1f98ee5f1dfbe2b5a89de23371abc Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 9 Oct 2023 17:44:25 +0200 Subject: [PATCH 32/52] Fix PR comments --- pallets/collator-assignment/src/lib.rs | 11 +++++++++++ pallets/collator-assignment/src/mock.rs | 17 ++--------------- runtime/dancebox/src/lib.rs | 15 ++------------- runtime/dancebox/tests/integration_test.rs | 8 +++++--- 4 files changed, 20 insertions(+), 31 deletions(-) diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index 76d3f5217..48b6f4e0b 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -379,3 +379,14 @@ pub mod pallet { } } } + +pub struct RotateCollatorsEveryNSessions(PhantomData); + +impl ShouldRotateAllCollators for RotateCollatorsEveryNSessions +where + Period: Get, +{ + fn should_rotate_all_collators(session_index: u32) -> bool { + session_index % Period::get() == 0 + } +} diff --git a/pallets/collator-assignment/src/mock.rs b/pallets/collator-assignment/src/mock.rs index 3871304c3..177abb011 100644 --- a/pallets/collator-assignment/src/mock.rs +++ b/pallets/collator-assignment/src/mock.rs @@ -15,10 +15,10 @@ // along with Tanssi. If not, see use { - crate::{self as pallet_collator_assignment}, + crate::{self as pallet_collator_assignment, RotateCollatorsEveryNSessions}, frame_support::{ parameter_types, - traits::{ConstU16, ConstU64, Get}, + traits::{ConstU16, ConstU64}, }, frame_system as system, parity_scale_codec::{Decode, Encode}, @@ -27,9 +27,7 @@ use { testing::Header, traits::{BlakeTwo256, IdentityLookup}, }, - std::marker::PhantomData, tp_traits::ParaId, - tp_traits::ShouldRotateAllCollators, }; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; @@ -168,17 +166,6 @@ impl tp_traits::GetSessionContainerChains for ContainerChainsGetter { } } -pub struct RotateCollatorsEveryNSessions(PhantomData); - -impl ShouldRotateAllCollators for RotateCollatorsEveryNSessions -where - Period: Get, -{ - fn should_rotate_all_collators(session_index: u32) -> bool { - session_index % Period::get() == 0 - } -} - parameter_types! { pub const CollatorRotationSessionPeriod: u32 = 5; } diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index 6df0ed019..773611c02 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -63,6 +63,7 @@ use { EnsureRoot, }, nimbus_primitives::NimbusId, + pallet_collator_assignment::RotateCollatorsEveryNSessions, pallet_pooled_staking::traits::{IsCandidateEligible, Timer}, pallet_registrar_runtime_api::ContainerChainGenesisData, pallet_session::{SessionManager, ShouldEndSession}, @@ -82,7 +83,6 @@ use { }, sp_std::{marker::PhantomData, prelude::*}, sp_version::RuntimeVersion, - tp_traits::ShouldRotateAllCollators, }; pub use { sp_runtime::{MultiAddress, Perbill, Permill}, @@ -616,7 +616,7 @@ impl SessionManager for CollatorsFromInvulnerablesAndThenFromStaking parameter_types! { pub const Period: u32 = prod_or_fast!(1 * HOURS, 1 * MINUTES); pub const Offset: u32 = 0; - pub const CollatorRotationSessionPeriod: u32 = 5; + pub const CollatorRotationSessionPeriod: u32 = prod_or_fast!(24, 5); } impl pallet_session::Config for Runtime { @@ -633,17 +633,6 @@ impl pallet_session::Config for Runtime { type WeightInfo = pallet_session::weights::SubstrateWeight; } -pub struct RotateCollatorsEveryNSessions(PhantomData); - -impl ShouldRotateAllCollators for RotateCollatorsEveryNSessions -where - Period: Get, -{ - fn should_rotate_all_collators(session_index: SessionIndex) -> bool { - session_index % Period::get() == 0 - } -} - impl pallet_collator_assignment::Config for Runtime { type HostConfiguration = Configuration; type ContainerChains = Registrar; diff --git a/runtime/dancebox/tests/integration_test.rs b/runtime/dancebox/tests/integration_test.rs index 6d5971d85..20752c45a 100644 --- a/runtime/dancebox/tests/integration_test.rs +++ b/runtime/dancebox/tests/integration_test.rs @@ -1786,20 +1786,22 @@ fn test_collator_assignment_rotation() { ); } - run_to_session(3); + let rotation_period = dancebox_runtime::CollatorRotationSessionPeriod::get(); + + run_to_session(rotation_period - 2); set_parachain_inherent_data_random_seed([1; 32]); assert!(CollatorAssignment::pending_collator_container_chain().is_none()); - run_to_session(4); + run_to_session(rotation_period - 1); assert_eq!( CollatorAssignment::collator_container_chain(), initial_assignment, ); assert!(CollatorAssignment::pending_collator_container_chain().is_some()); - run_to_session(5); + run_to_session(rotation_period); // Assignment changed assert_ne!( CollatorAssignment::collator_container_chain(), From b03e51e2f7f7bef4193d92bb292ffbe8b0eeabdb Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 10 Oct 2023 17:24:14 +0200 Subject: [PATCH 33/52] Add event CollatorAssignment::NewPendingAssignment --- pallets/authority-assignment/src/mock.rs | 1 + .../collator-assignment/src/benchmarking.rs | 19 +++- pallets/collator-assignment/src/lib.rs | 31 +++++- pallets/collator-assignment/src/mock.rs | 2 + pallets/collator-assignment/src/tests.rs | 95 ++++++++++++++++++- pallets/configuration/src/mock.rs | 1 + runtime/dancebox/src/lib.rs | 1 + 7 files changed, 146 insertions(+), 4 deletions(-) diff --git a/pallets/authority-assignment/src/mock.rs b/pallets/authority-assignment/src/mock.rs index f6a333a84..7fe0b90fb 100644 --- a/pallets/authority-assignment/src/mock.rs +++ b/pallets/authority-assignment/src/mock.rs @@ -145,6 +145,7 @@ pub fn run_to_block(n: u64) { let old_block_number = System::block_number(); for x in (old_block_number + 1)..=n { + System::reset_events(); System::set_block_number(x); if x % SESSION_LEN == 1 { diff --git a/pallets/collator-assignment/src/benchmarking.rs b/pallets/collator-assignment/src/benchmarking.rs index 896dea01c..f2b876c9c 100644 --- a/pallets/collator-assignment/src/benchmarking.rs +++ b/pallets/collator-assignment/src/benchmarking.rs @@ -47,6 +47,14 @@ fn invulnerables(count: u32, seed: u32) -> Vec invulnerables } +fn assert_last_event(generic_event: ::RuntimeEvent) { + let events = frame_system::Pallet::::events(); + let system_event: ::RuntimeEvent = generic_event.into(); + // compare to the last event record + let EventRecord { event, .. } = &events[events.len() - 1]; + assert_eq!(event, &system_event); +} + #[benchmarks] mod benchmarks { use super::*; @@ -91,8 +99,15 @@ mod benchmarks { 0 ); - // TODO: make sure this did not call assign_collators_rotate_all, because that's cheaper - // than assign_collators_always_keep_old. + // Worst case is `full_rotation: false` because it needs to check the previous assignment + assert_last_event::( + Event::NewPendingAssignment { + random_seed, + full_rotation: false, + target_session: T::SessionIndex::from(1u32), + } + .into(), + ); Ok(()) } diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index 48b6f4e0b..816dcbdd0 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -80,7 +80,13 @@ pub mod pallet { /// Configure the pallet by specifying the parameters and types on which it depends. #[pallet::config] pub trait Config: frame_system::Config { - type SessionIndex: parity_scale_codec::FullCodec + TypeInfo + Copy + AtLeast32BitUnsigned; + /// The overarching event type. + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + type SessionIndex: parity_scale_codec::FullCodec + + TypeInfo + + Copy + + AtLeast32BitUnsigned + + std::fmt::Debug; // `SESSION_DELAY` is used to delay any changes to Paras registration or configurations. // Wait until the session index is 2 larger then the current index to apply any changes, // which guarantees that at least one full session has passed before any changes are applied. @@ -91,6 +97,17 @@ pub mod pallet { type WeightInfo: WeightInfo; } + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + // TODO: rename + NewPendingAssignment { + random_seed: [u8; 32], + full_rotation: bool, + target_session: T::SessionIndex, + }, + } + #[pallet::storage] #[pallet::getter(fn collator_container_chain)] pub(crate) type CollatorContainerChain = @@ -156,6 +173,12 @@ pub mod pallet { random_seed ); + Self::deposit_event(Event::NewPendingAssignment { + random_seed, + full_rotation: true, + target_session: target_session_index, + }); + Self::assign_collators_rotate_all( collators, &container_chain_ids, @@ -173,6 +196,12 @@ pub mod pallet { random_seed ); + Self::deposit_event(Event::NewPendingAssignment { + random_seed, + full_rotation: false, + target_session: target_session_index, + }); + Self::assign_collators_always_keep_old( collators, &container_chain_ids, diff --git a/pallets/collator-assignment/src/mock.rs b/pallets/collator-assignment/src/mock.rs index 177abb011..2101c8956 100644 --- a/pallets/collator-assignment/src/mock.rs +++ b/pallets/collator-assignment/src/mock.rs @@ -171,6 +171,7 @@ parameter_types! { } impl pallet_collator_assignment::Config for Test { + type RuntimeEvent = RuntimeEvent; type SessionIndex = u32; type HostConfiguration = HostConfigurationGetter; type ContainerChains = ContainerChainsGetter; @@ -195,6 +196,7 @@ pub fn run_to_block(n: u64) { let session_len = 5; for x in (old_block_number + 1)..=n { + System::reset_events(); System::set_block_number(x); let randomness = MockData::mock().random_seed; diff --git a/pallets/collator-assignment/src/tests.rs b/pallets/collator-assignment/src/tests.rs index d7c69b828..35737d260 100644 --- a/pallets/collator-assignment/src/tests.rs +++ b/pallets/collator-assignment/src/tests.rs @@ -15,7 +15,7 @@ // along with Tanssi. If not, see use { - crate::{mock::*, CollatorContainerChain, PendingCollatorContainerChain}, + crate::{mock::*, CollatorContainerChain, Event, PendingCollatorContainerChain}, std::collections::BTreeMap, }; @@ -854,3 +854,96 @@ fn assign_collators_rotation_collators_are_shuffled() { assert_eq!(assigned_collators(), shuffled_assignment,); }); } + +#[test] +fn rotation_events() { + // Ensure that the NewPendingAssignment is correct + new_test_ext().execute_with(|| { + run_to_block(1); + + MockData::mutate(|m| { + m.collators_per_container = 2; + m.min_orchestrator_chain_collators = 2; + m.max_orchestrator_chain_collators = 5; + + m.collators = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; + m.container_chains = vec![1001, 1002, 1003, 1004]; + }); + assert_eq!(assigned_collators(), BTreeMap::new(),); + + // Block 1 should emit event, random seed was not set + System::assert_last_event( + Event::NewPendingAssignment { + random_seed: [0; 32], + full_rotation: false, + target_session: 1, + } + .into(), + ); + + for i in 2..=11 { + run_to_block(i); + match i { + 6 | 11 => { + System::assert_last_event( + Event::NewPendingAssignment { + random_seed: [0; 32], + full_rotation: false, + target_session: (i / 5) as u32 + 1, + } + .into(), + ); + } + _ => { + assert_eq!( + System::events(), + vec![], + "Block #{} should not have any events", + i + ); + } + } + } + + MockData::mutate(|m| { + m.random_seed = [1; 32]; + }); + + // The rotation period is every 5 sessions, so the first session with a different assignment + // will be session 5. Collators are calculated one session in advance, so they will be decided + // on session 4, which starts on block 21. + for i in 12..=51 { + run_to_block(i); + match i { + 16 | 26 | 31 | 36 | 41 | 51 => { + System::assert_last_event( + Event::NewPendingAssignment { + random_seed: [1; 32], + full_rotation: false, + target_session: (i / 5) as u32 + 1, + } + .into(), + ); + } + 21 | 46 => { + System::assert_last_event( + Event::NewPendingAssignment { + random_seed: [1; 32], + full_rotation: true, + target_session: (i / 5) as u32 + 1, + } + .into(), + ); + } + _ => { + assert_eq!( + System::events(), + vec![], + "Block #{} should not have any events", + i + ); + } + } + } + }); +} diff --git a/pallets/configuration/src/mock.rs b/pallets/configuration/src/mock.rs index 6e0765314..95c780fda 100644 --- a/pallets/configuration/src/mock.rs +++ b/pallets/configuration/src/mock.rs @@ -110,6 +110,7 @@ pub fn run_to_block(n: u64) { let session_len = 5; for x in (old_block_number + 1)..=n { + System::reset_events(); System::set_block_number(x); if x % session_len == 1 { diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index 773611c02..ba4505f63 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -634,6 +634,7 @@ impl pallet_session::Config for Runtime { } impl pallet_collator_assignment::Config for Runtime { + type RuntimeEvent = RuntimeEvent; type HostConfiguration = Configuration; type ContainerChains = Registrar; type SessionIndex = u32; From 317cf5ee34d2ea2ffe23698c7227ee1f60edb41e Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 10 Oct 2023 17:39:10 +0200 Subject: [PATCH 34/52] Fix build --- pallets/collator-assignment/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index 816dcbdd0..7af2c6574 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -51,7 +51,7 @@ use { traits::{AtLeast32BitUnsigned, One, Zero}, Saturating, }, - sp_std::{prelude::*, vec}, + sp_std::{fmt::Debug, prelude::*, vec}, tp_collator_assignment::AssignedCollators, tp_traits::{ GetContainerChainAuthor, GetHostConfiguration, GetSessionContainerChains, ParaId, @@ -86,7 +86,7 @@ pub mod pallet { + TypeInfo + Copy + AtLeast32BitUnsigned - + std::fmt::Debug; + + Debug; // `SESSION_DELAY` is used to delay any changes to Paras registration or configurations. // Wait until the session index is 2 larger then the current index to apply any changes, // which guarantees that at least one full session has passed before any changes are applied. From 9a84aec58b2f9215b18c123f5522f5019c26f255 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 11 Oct 2023 17:18:07 +0200 Subject: [PATCH 35/52] Already renamed --- pallets/collator-assignment/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index 7af2c6574..f2eca9f31 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -100,7 +100,6 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { - // TODO: rename NewPendingAssignment { random_seed: [u8; 32], full_rotation: bool, From cf47360ae8c0b39a6d566097affdeda262a10b36 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 16 Oct 2023 11:56:56 +0200 Subject: [PATCH 36/52] Fix Cargo.toml --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 9ab002230..e57f29689 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -186,6 +186,7 @@ cumulus-client-pov-recovery = { git = "https://github.com/moondance-labs/polkado cumulus-client-service = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.1.0", default-features = false } cumulus-primitives-parachain-inherent = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.1.0", default-features = false } cumulus-relay-chain-interface = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.1.0", default-features = false } +cumulus-test-relay-sproof-builder = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.1.0", default-features = false } xcm-emulator = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.1.0", default-features = false } # Frontier (wasm) From 4057a444e157711b668bead1132ca1df4eb14d8e Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 16 Oct 2023 12:30:01 +0200 Subject: [PATCH 37/52] Fix tests after 1.1.0 upgrade --- runtime/dancebox/tests/integration_test.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/runtime/dancebox/tests/integration_test.rs b/runtime/dancebox/tests/integration_test.rs index 20752c45a..fdeaab089 100644 --- a/runtime/dancebox/tests/integration_test.rs +++ b/runtime/dancebox/tests/integration_test.rs @@ -41,7 +41,7 @@ use { sp_consensus_aura::AURA_ENGINE_ID, sp_core::Get, sp_runtime::{ - traits::{BadOrigin, BlakeTwo256, OpaqueKeys}, + traits::{BadOrigin, BlakeTwo256, OpaqueKeys, Dispatchable}, DigestItem, }, sp_std::vec, @@ -1746,7 +1746,6 @@ fn test_collator_assignment_rotation() { use cumulus_primitives_core::PersistedValidationData; use cumulus_primitives_parachain_inherent::ParachainInherentData; use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder; - use frame_support::dispatch::Dispatchable; let (relay_parent_storage_root, relay_chain_state) = { let mut sproof = RelayStateSproofBuilder::default(); From 59b1b077d62383b1e5003f4830901ef2e39bacf3 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 16 Oct 2023 12:53:19 +0200 Subject: [PATCH 38/52] Make full_rotatio_period configurable, defined in pallet_configuration --- node/src/chain_spec.rs | 2 + pallets/configuration/src/lib.rs | 19 ++ pallets/configuration/src/tests.rs | 12 + pallets/invulnerables/src/lib.rs | 2 +- runtime/dancebox/src/lib.rs | 12 +- runtime/dancebox/src/migrations.rs | 51 +++- runtime/dancebox/tests/integration_test.rs | 269 ++++----------------- 7 files changed, 143 insertions(+), 224 deletions(-) diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index caaea5549..c10515ff3 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -195,6 +195,7 @@ pub fn development_config( min_orchestrator_collators: 1u32, max_orchestrator_collators: 1u32, collators_per_container: 2u32, + full_rotation_period: 24u32, }, ..Default::default() }, @@ -259,6 +260,7 @@ pub fn local_dancebox_config( min_orchestrator_collators: 2u32, max_orchestrator_collators: 5u32, collators_per_container: 2u32, + full_rotation_period: 24u32, }, ..Default::default() }, diff --git a/pallets/configuration/src/lib.rs b/pallets/configuration/src/lib.rs index 3d2fea224..867a0240a 100644 --- a/pallets/configuration/src/lib.rs +++ b/pallets/configuration/src/lib.rs @@ -69,6 +69,7 @@ pub struct HostConfiguration { pub min_orchestrator_collators: u32, pub max_orchestrator_collators: u32, pub collators_per_container: u32, + pub full_rotation_period: u32, } impl Default for HostConfiguration { @@ -79,6 +80,7 @@ impl Default for HostConfiguration { // TODO: for zombienet testing max_orchestrator_collators: 5u32, collators_per_container: 2u32, + full_rotation_period: 24u32, } } } @@ -92,6 +94,8 @@ pub enum InconsistentError { MinOrchestratorCollatorsTooLow, /// `max_collators` must be at least 1 MaxCollatorsTooLow, + /// `full_rotation_period` must be at least 1 + FullRotationPeriodTooLow, } impl HostConfiguration { @@ -110,6 +114,9 @@ impl HostConfiguration { if self.max_orchestrator_collators < self.min_orchestrator_collators { return Err(InconsistentError::MaxCollatorsLowerThanMinCollators); } + if self.full_rotation_period < 1 { + return Err(InconsistentError::FullRotationPeriodTooLow); + } Ok(()) } @@ -258,6 +265,18 @@ pub mod pallet { }) } + #[pallet::call_index(4)] + #[pallet::weight(( + T::WeightInfo::set_config_with_u32(), + DispatchClass::Operational, + ))] + pub fn set_full_rotation_period(origin: OriginFor, new: u32) -> DispatchResult { + ensure_root(origin)?; + Self::schedule_config_update(|config| { + config.full_rotation_period = new; + }) + } + /// Setting this to true will disable consistency checks for the configuration setters. /// Use with caution. #[pallet::call_index(44)] diff --git a/pallets/configuration/src/tests.rs b/pallets/configuration/src/tests.rs index 7e0926d02..9ba88a7fb 100644 --- a/pallets/configuration/src/tests.rs +++ b/pallets/configuration/src/tests.rs @@ -27,6 +27,7 @@ fn config_sets_values_from_genesis() { min_orchestrator_collators: 40, max_orchestrator_collators: 40, collators_per_container: 20, + full_rotation_period: 24, }; new_test_ext_with_genesis(custom_config.clone()).execute_with(|| { run_to_block(1); @@ -41,6 +42,7 @@ fn config_sets_default_values() { min_orchestrator_collators: 2, max_orchestrator_collators: 5, collators_per_container: 2, + full_rotation_period: 24, }; new_test_ext().execute_with(|| { run_to_block(1); @@ -55,6 +57,7 @@ fn config_set_value() { min_orchestrator_collators: 2, max_orchestrator_collators: 5, collators_per_container: 2, + full_rotation_period: 24, }) .execute_with(|| { run_to_block(1); @@ -73,6 +76,7 @@ fn config_set_value() { min_orchestrator_collators: 2, max_orchestrator_collators: 5, collators_per_container: 2, + full_rotation_period: 24, } )] ); @@ -100,6 +104,7 @@ fn config_set_many_values_same_block() { min_orchestrator_collators: 2, max_orchestrator_collators: 5, collators_per_container: 2, + full_rotation_period: 24, }) .execute_with(|| { run_to_block(1); @@ -128,6 +133,7 @@ fn config_set_many_values_same_block() { min_orchestrator_collators: 20, max_orchestrator_collators: 20, collators_per_container: 10, + full_rotation_period: 24, } )] ); @@ -153,6 +159,7 @@ fn config_set_many_values_different_blocks() { min_orchestrator_collators: 2, max_orchestrator_collators: 5, collators_per_container: 2, + full_rotation_period: 24, }) .execute_with(|| { run_to_block(1); @@ -183,6 +190,7 @@ fn config_set_many_values_different_blocks() { min_orchestrator_collators: 20, max_orchestrator_collators: 20, collators_per_container: 10, + full_rotation_period: 24, } )] ); @@ -208,6 +216,7 @@ fn config_set_many_values_different_sessions() { min_orchestrator_collators: 2, max_orchestrator_collators: 5, collators_per_container: 2, + full_rotation_period: 24, }) .execute_with(|| { run_to_block(1); @@ -242,6 +251,7 @@ fn config_set_many_values_different_sessions() { min_orchestrator_collators: 20, max_orchestrator_collators: 20, collators_per_container: 2, + full_rotation_period: 24, } ), ( @@ -251,6 +261,7 @@ fn config_set_many_values_different_sessions() { min_orchestrator_collators: 20, max_orchestrator_collators: 20, collators_per_container: 10, + full_rotation_period: 24, } ) ] @@ -277,6 +288,7 @@ fn config_cannot_set_invalid_values() { min_orchestrator_collators: 2, max_orchestrator_collators: 5, collators_per_container: 2, + full_rotation_period: 24, }) .execute_with(|| { run_to_block(1); diff --git a/pallets/invulnerables/src/lib.rs b/pallets/invulnerables/src/lib.rs index e6ee27336..0a87195dc 100644 --- a/pallets/invulnerables/src/lib.rs +++ b/pallets/invulnerables/src/lib.rs @@ -39,8 +39,8 @@ pub mod weights; #[frame_support::pallet] pub mod pallet { - pub use crate::weights::WeightInfo; use { + crate::weights::WeightInfo, frame_support::{ dispatch::DispatchResultWithPostInfo, pallet_prelude::*, diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index 350237899..88462c594 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -614,7 +614,6 @@ impl SessionManager for CollatorsFromInvulnerablesAndThenFromStaking parameter_types! { pub const Period: u32 = prod_or_fast!(1 * HOURS, 1 * MINUTES); pub const Offset: u32 = 0; - pub const CollatorRotationSessionPeriod: u32 = prod_or_fast!(24, 5); } impl pallet_session::Config for Runtime { @@ -631,12 +630,21 @@ impl pallet_session::Config for Runtime { type WeightInfo = pallet_session::weights::SubstrateWeight; } +/// Read full_rotation_period from pallet_configuration +pub struct ConfigurationCollatorRotationSessionPeriod; + +impl Get for ConfigurationCollatorRotationSessionPeriod { + fn get() -> u32 { + Configuration::config().full_rotation_period + } +} + impl pallet_collator_assignment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type HostConfiguration = Configuration; type ContainerChains = Registrar; type SessionIndex = u32; - type ShouldRotateAllCollators = RotateCollatorsEveryNSessions; + type ShouldRotateAllCollators = RotateCollatorsEveryNSessions; type WeightInfo = pallet_collator_assignment::weights::SubstrateWeight; } diff --git a/runtime/dancebox/src/migrations.rs b/runtime/dancebox/src/migrations.rs index bd6bb4a36..e88b6d1dd 100644 --- a/runtime/dancebox/src/migrations.rs +++ b/runtime/dancebox/src/migrations.rs @@ -24,9 +24,10 @@ use frame_support::{ }; use { - crate::{Invulnerables, Runtime, RuntimeOrigin, LOG_TARGET}, + crate::{Configuration, Invulnerables, Runtime, RuntimeOrigin, LOG_TARGET}, pallet_balances::IdAmount, - pallet_invulnerables::WeightInfo, + pallet_configuration::weights::WeightInfo as _, + pallet_invulnerables::weights::WeightInfo as _, pallet_migrations::{GetMigrations, Migration}, sp_core::Get, sp_runtime::BoundedVec, @@ -209,6 +210,44 @@ where } } +pub struct MigrateConfigurationFullRotationPeriod(pub PhantomData); +impl Migration for MigrateConfigurationFullRotationPeriod +where + T: pallet_configuration::Config, +{ + fn friendly_name(&self) -> &str { + "TM_MigrateConfigurationFullRotationPeriod" + } + + fn migrate(&self, _available_weight: Weight) -> Weight { + log::info!(target: LOG_TARGET, "migrate"); + + Configuration::set_full_rotation_period(RuntimeOrigin::root(), 24u32) + .expect("Failed to set full_rotation_period"); + ::WeightInfo::set_config_with_u32() + } + + /// Run a standard pre-runtime test. This works the same way as in a normal runtime upgrade. + #[cfg(feature = "try-runtime")] + fn pre_upgrade(&self) -> Result, sp_runtime::DispatchError> { + let zero_period = Configuration::config().full_rotation_period; + assert_eq!(zero_period, 0); + + Ok((zero_period).encode()) + } + + /// Run a standard post-runtime test. This works the same way as in a normal runtime upgrade. + #[cfg(feature = "try-runtime")] + fn post_upgrade( + &self, + number_of_invulnerables: Vec, + ) -> Result<(), sp_runtime::DispatchError> { + let new_period = Configuration::config().full_rotation_period; + assert_ne!(new_period, 0); + + Ok(()) + } +} pub struct DanceboxMigrations(PhantomData); impl GetMigrations for DanceboxMigrations @@ -216,12 +255,18 @@ where Runtime: pallet_invulnerables::Config, Runtime: pallet_pooled_staking::Config, Runtime: pallet_balances::Config, + Runtime: pallet_configuration::Config, Runtime::RuntimeHoldReason: From, { fn get_migrations() -> Vec> { let migrate_invulnerables = MigrateInvulnerables::(Default::default()); let migrate_holds = MigrateHoldReason::(Default::default()); + let migrate_config = MigrateConfigurationFullRotationPeriod::(Default::default()); - vec![Box::new(migrate_invulnerables), Box::new(migrate_holds)] + vec![ + Box::new(migrate_invulnerables), + Box::new(migrate_holds), + Box::new(migrate_config), + ] } } diff --git a/runtime/dancebox/tests/integration_test.rs b/runtime/dancebox/tests/integration_test.rs index fdeaab089..c91b73f43 100644 --- a/runtime/dancebox/tests/integration_test.rs +++ b/runtime/dancebox/tests/integration_test.rs @@ -41,7 +41,7 @@ use { sp_consensus_aura::AURA_ENGINE_ID, sp_core::Get, sp_runtime::{ - traits::{BadOrigin, BlakeTwo256, OpaqueKeys, Dispatchable}, + traits::{BadOrigin, BlakeTwo256, Dispatchable, OpaqueKeys}, DigestItem, }, sp_std::vec, @@ -96,6 +96,16 @@ fn genesis_para_registrar() { }); } +fn default_config() -> pallet_configuration::HostConfiguration { + pallet_configuration::HostConfiguration { + max_collators: 100, + min_orchestrator_collators: 2, + max_orchestrator_collators: 2, + collators_per_container: 2, + full_rotation_period: 24, + } +} + #[test] fn genesis_para_registrar_deregister() { ExtBuilder::default() @@ -112,12 +122,7 @@ fn genesis_para_registrar_deregister() { (AccountId::from(ALICE), 210 * UNIT), (AccountId::from(BOB), 100 * UNIT), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { assert_eq!( @@ -166,12 +171,7 @@ fn genesis_para_registrar_runtime_api() { (AccountId::from(ALICE), 210 * UNIT), (AccountId::from(BOB), 100 * UNIT), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { assert_eq!( @@ -222,12 +222,7 @@ fn genesis_para_registrar_container_chain_genesis_data_runtime_api() { (AccountId::from(ALICE), 210 * UNIT), (AccountId::from(BOB), 100 * UNIT), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { assert_eq!( @@ -299,12 +294,7 @@ fn test_author_collation_aura() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(5); @@ -339,12 +329,7 @@ fn test_author_collation_aura_change_of_authorities_on_session() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -416,12 +401,7 @@ fn test_author_collation_aura_add_assigned_to_paras() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -490,12 +470,7 @@ fn test_authors_without_paras() { (AccountId::from(CHARLIE), 100 * UNIT), (AccountId::from(DAVE), 100 * UNIT), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -543,12 +518,7 @@ fn test_authors_paras_inserted_a_posteriori() { (AccountId::from(CHARLIE), 100 * UNIT), (AccountId::from(DAVE), 100 * UNIT), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -615,6 +585,7 @@ fn test_authors_paras_inserted_a_posteriori_with_collators_already_assigned() { min_orchestrator_collators: 2, max_orchestrator_collators: 5, collators_per_container: 2, + full_rotation_period: 24, }) .build() .execute_with(|| { @@ -679,12 +650,7 @@ fn test_parachains_deregister_collators_re_assigned() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -747,12 +713,7 @@ fn test_parachains_deregister_collators_config_change_reassigned() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -819,12 +780,7 @@ fn test_orchestrator_collators_with_non_sufficient_collators() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -851,12 +807,7 @@ fn test_configuration_on_session_change() { (AccountId::from(ALICE), 210 * UNIT), (AccountId::from(BOB), 100 * UNIT), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(1); @@ -916,12 +867,7 @@ fn test_author_collation_aura_add_assigned_to_paras_runtime_api() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -1085,12 +1031,7 @@ fn test_consensus_runtime_api() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -1185,12 +1126,7 @@ fn test_consensus_runtime_api_session_changes() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -1306,12 +1242,7 @@ fn test_consensus_runtime_api_next_session() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -1785,7 +1716,7 @@ fn test_collator_assignment_rotation() { ); } - let rotation_period = dancebox_runtime::CollatorRotationSessionPeriod::get(); + let rotation_period = Configuration::config().full_rotation_period; run_to_session(rotation_period - 2); @@ -1835,12 +1766,7 @@ fn test_session_keys_with_authority_mapping() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -1925,12 +1851,7 @@ fn test_session_keys_with_authority_assignment() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -2064,12 +1985,7 @@ fn test_proxy_any() { (AccountId::from(ALICE), 210 * UNIT), (AccountId::from(BOB), 100 * UNIT), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -2110,12 +2026,7 @@ fn test_proxy_non_transfer() { (AccountId::from(ALICE), 210 * UNIT), (AccountId::from(BOB), 100 * UNIT), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -2186,12 +2097,7 @@ fn test_invulnerables_migration() { (AccountId::from(ALICE), 210 * UNIT), (AccountId::from(BOB), 100 * UNIT), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { // Populate the invulnerables storage @@ -2236,12 +2142,7 @@ fn test_staking_no_candidates_in_genesis() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -2273,12 +2174,7 @@ fn test_staking_join() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -2331,12 +2227,7 @@ fn test_staking_join_no_keys_registered() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -2392,12 +2283,7 @@ fn test_staking_register_keys_after_joining() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -2486,12 +2372,7 @@ fn test_staking_join_bad_origin() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -2529,12 +2410,7 @@ fn test_staking_join_below_self_delegation_min() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -2607,12 +2483,7 @@ fn test_staking_join_no_self_delegation() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -2652,12 +2523,7 @@ fn test_staking_join_before_self_delegation() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -2728,12 +2594,7 @@ fn test_staking_join_twice_in_same_block() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -2803,12 +2664,7 @@ fn test_staking_join_execute_before_time() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -2884,12 +2740,7 @@ fn test_staking_join_execute_any_origin() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -2949,12 +2800,7 @@ fn test_staking_join_execute_bad_origin() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -3023,12 +2869,7 @@ fn setup_staking_join_and_execute(ops: Vec, f: impl FnOnce() -> R) { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -3473,12 +3314,7 @@ fn test_pallet_session_takes_validators_from_invulnerables_and_staking() { (1001, empty_genesis_data(), vec![]), (1002, empty_genesis_data(), vec![]), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { run_to_block(2); @@ -3574,6 +3410,7 @@ fn test_pallet_session_limits_num_validators() { min_orchestrator_collators: 2, max_orchestrator_collators: 2, collators_per_container: 2, + full_rotation_period: 24, }) .build() .execute_with(|| { @@ -3661,6 +3498,7 @@ fn test_pallet_session_limits_num_validators_from_staking() { min_orchestrator_collators: 2, max_orchestrator_collators: 2, collators_per_container: 2, + full_rotation_period: 24, }) .build() .execute_with(|| { @@ -3766,12 +3604,7 @@ fn test_migration_holds() { (AccountId::from(ALICE), 210 * UNIT), (AccountId::from(BOB), 100 * UNIT), ]) - .with_config(pallet_configuration::HostConfiguration { - max_collators: 100, - min_orchestrator_collators: 2, - max_orchestrator_collators: 2, - collators_per_container: 2, - }) + .with_config(default_config()) .build() .execute_with(|| { let pallet_prefix: &[u8] = b"Balances"; From 9312833c6fe0c95b4916e2517b972884d0ebbcd1 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 16 Oct 2023 12:54:14 +0200 Subject: [PATCH 39/52] fmt --- runtime/dancebox/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index 88462c594..38ec86177 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -644,7 +644,8 @@ impl pallet_collator_assignment::Config for Runtime { type HostConfiguration = Configuration; type ContainerChains = Registrar; type SessionIndex = u32; - type ShouldRotateAllCollators = RotateCollatorsEveryNSessions; + type ShouldRotateAllCollators = + RotateCollatorsEveryNSessions; type WeightInfo = pallet_collator_assignment::weights::SubstrateWeight; } From 62ec7404d42f3b3bba87e105b8ac87fbab19e914 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 16 Oct 2023 14:10:13 +0200 Subject: [PATCH 40/52] Use fast_or_prod macro to set full_rotation_period = 5 for tests --- node/src/chain_spec.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index c10515ff3..a839793db 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -17,8 +17,8 @@ use { cumulus_primitives_core::ParaId, dancebox_runtime::{ - AccountId, MaintenanceModeConfig, MigrationsConfig, PolkadotXcmConfig, RegistrarConfig, - Signature, SudoConfig, + prod_or_fast, AccountId, MaintenanceModeConfig, MigrationsConfig, PolkadotXcmConfig, + RegistrarConfig, Signature, SudoConfig, }, nimbus_primitives::NimbusId, pallet_configuration::HostConfiguration, @@ -195,7 +195,7 @@ pub fn development_config( min_orchestrator_collators: 1u32, max_orchestrator_collators: 1u32, collators_per_container: 2u32, - full_rotation_period: 24u32, + full_rotation_period: prod_or_fast!(24u32, 5u32), }, ..Default::default() }, @@ -260,7 +260,7 @@ pub fn local_dancebox_config( min_orchestrator_collators: 2u32, max_orchestrator_collators: 5u32, collators_per_container: 2u32, - full_rotation_period: 24u32, + full_rotation_period: prod_or_fast!(24u32, 5u32), }, ..Default::default() }, From 157395789c409ed06641c508a3e442c47c246965 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 17 Oct 2023 09:19:55 +0200 Subject: [PATCH 41/52] augment-api --- .../dancebox/interfaces/augment-api-events.ts | 11 +- .../src/dancebox/interfaces/augment-api-tx.ts | 5 + .../src/dancebox/interfaces/lookup.ts | 384 +++++++++--------- .../src/dancebox/interfaces/registry.ts | 2 + .../src/dancebox/interfaces/types-lookup.ts | 383 ++++++++--------- 5 files changed, 417 insertions(+), 368 deletions(-) diff --git a/typescript-api/src/dancebox/interfaces/augment-api-events.ts b/typescript-api/src/dancebox/interfaces/augment-api-events.ts index 7ec1f3ad3..0a0447546 100644 --- a/typescript-api/src/dancebox/interfaces/augment-api-events.ts +++ b/typescript-api/src/dancebox/interfaces/augment-api-events.ts @@ -6,7 +6,7 @@ import "@polkadot/api-base/types/events"; import type { ApiTypes, AugmentedEvent } from "@polkadot/api-base/types"; -import type { Bytes, Null, Option, Result, U8aFixed, Vec, u128, u16, u32, u64, u8 } from "@polkadot/types-codec"; +import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from "@polkadot/types-codec"; import type { AccountId32, H256 } from "@polkadot/types/interfaces/runtime"; import type { DanceboxRuntimeProxyType, @@ -116,6 +116,15 @@ declare module "@polkadot/api-base/types/events" { /** Generic event */ [key: string]: AugmentedEvent; }; + collatorAssignment: { + NewPendingAssignment: AugmentedEvent< + ApiType, + [randomSeed: U8aFixed, fullRotation: bool, targetSession: u32], + { randomSeed: U8aFixed; fullRotation: bool; targetSession: u32 } + >; + /** Generic event */ + [key: string]: AugmentedEvent; + }; cumulusXcm: { /** Downward message executed with the given outcome. [ id, outcome ] */ ExecutedDownward: AugmentedEvent; diff --git a/typescript-api/src/dancebox/interfaces/augment-api-tx.ts b/typescript-api/src/dancebox/interfaces/augment-api-tx.ts index 0d63c63ad..33b4de79a 100644 --- a/typescript-api/src/dancebox/interfaces/augment-api-tx.ts +++ b/typescript-api/src/dancebox/interfaces/augment-api-tx.ts @@ -240,6 +240,11 @@ declare module "@polkadot/api-base/types/submittable" { (updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic, [u32] >; + /** See [`Pallet::set_full_rotation_period`]. */ + setFullRotationPeriod: AugmentedSubmittable< + (updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic, + [u32] + >; /** See [`Pallet::set_max_collators`]. */ setMaxCollators: AugmentedSubmittable< (updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic, diff --git a/typescript-api/src/dancebox/interfaces/lookup.ts b/typescript-api/src/dancebox/interfaces/lookup.ts index bbf9fbc79..cf81f426d 100644 --- a/typescript-api/src/dancebox/interfaces/lookup.ts +++ b/typescript-api/src/dancebox/interfaces/lookup.ts @@ -389,7 +389,17 @@ export default { }, }, }, - /** Lookup47: pallet_author_noting::pallet::Event */ + /** Lookup47: pallet_collator_assignment::pallet::Event */ + PalletCollatorAssignmentEvent: { + _enum: { + NewPendingAssignment: { + randomSeed: "[u8;32]", + fullRotation: "bool", + targetSession: "u32", + }, + }, + }, + /** Lookup49: pallet_author_noting::pallet::Event */ PalletAuthorNotingEvent: { _enum: { LatestAuthorChanged: { @@ -402,7 +412,7 @@ export default { }, }, }, - /** Lookup48: pallet_invulnerables::pallet::Event */ + /** Lookup50: pallet_invulnerables::pallet::Event */ PalletInvulnerablesEvent: { _enum: { NewInvulnerables: { @@ -419,7 +429,7 @@ export default { }, }, }, - /** Lookup50: pallet_session::pallet::Event */ + /** Lookup52: pallet_session::pallet::Event */ PalletSessionEvent: { _enum: { NewSession: { @@ -427,7 +437,7 @@ export default { }, }, }, - /** Lookup51: pallet_pooled_staking::pallet::Event */ + /** Lookup53: pallet_pooled_staking::pallet::Event */ PalletPooledStakingEvent: { _enum: { UpdatedCandidatePosition: { @@ -522,11 +532,11 @@ export default { }, }, }, - /** Lookup53: pallet_pooled_staking::pallet::TargetPool */ + /** Lookup55: pallet_pooled_staking::pallet::TargetPool */ PalletPooledStakingTargetPool: { _enum: ["AutoCompounding", "ManualRewards"], }, - /** Lookup54: cumulus_pallet_xcmp_queue::pallet::Event */ + /** Lookup56: cumulus_pallet_xcmp_queue::pallet::Event */ CumulusPalletXcmpQueueEvent: { _enum: { Success: { @@ -561,7 +571,7 @@ export default { }, }, }, - /** Lookup55: staging_xcm::v3::traits::Error */ + /** Lookup57: staging_xcm::v3::traits::Error */ StagingXcmV3TraitsError: { _enum: { Overflow: "Null", @@ -606,7 +616,7 @@ export default { ExceedsStackLimit: "Null", }, }, - /** Lookup56: cumulus_pallet_xcm::pallet::Event */ + /** Lookup58: cumulus_pallet_xcm::pallet::Event */ CumulusPalletXcmEvent: { _enum: { InvalidFormat: "[u8;32]", @@ -614,7 +624,7 @@ export default { ExecutedDownward: "([u8;32],StagingXcmV3TraitsOutcome)", }, }, - /** Lookup57: staging_xcm::v3::traits::Outcome */ + /** Lookup59: staging_xcm::v3::traits::Outcome */ StagingXcmV3TraitsOutcome: { _enum: { Complete: "SpWeightsWeightV2Weight", @@ -622,7 +632,7 @@ export default { Error: "StagingXcmV3TraitsError", }, }, - /** Lookup58: cumulus_pallet_dmp_queue::pallet::Event */ + /** Lookup60: cumulus_pallet_dmp_queue::pallet::Event */ CumulusPalletDmpQueueEvent: { _enum: { InvalidFormat: { @@ -657,7 +667,7 @@ export default { }, }, }, - /** Lookup59: pallet_xcm::pallet::Event */ + /** Lookup61: pallet_xcm::pallet::Event */ PalletXcmEvent: { _enum: { Attempted: { @@ -777,12 +787,12 @@ export default { }, }, }, - /** Lookup60: staging_xcm::v3::multilocation::MultiLocation */ + /** Lookup62: staging_xcm::v3::multilocation::MultiLocation */ StagingXcmV3MultiLocation: { parents: "u8", interior: "StagingXcmV3Junctions", }, - /** Lookup61: staging_xcm::v3::junctions::Junctions */ + /** Lookup63: staging_xcm::v3::junctions::Junctions */ StagingXcmV3Junctions: { _enum: { Here: "Null", @@ -796,7 +806,7 @@ export default { X8: "(StagingXcmV3Junction,StagingXcmV3Junction,StagingXcmV3Junction,StagingXcmV3Junction,StagingXcmV3Junction,StagingXcmV3Junction,StagingXcmV3Junction,StagingXcmV3Junction)", }, }, - /** Lookup62: staging_xcm::v3::junction::Junction */ + /** Lookup64: staging_xcm::v3::junction::Junction */ StagingXcmV3Junction: { _enum: { Parachain: "Compact", @@ -826,7 +836,7 @@ export default { GlobalConsensus: "StagingXcmV3JunctionNetworkId", }, }, - /** Lookup65: staging_xcm::v3::junction::NetworkId */ + /** Lookup67: staging_xcm::v3::junction::NetworkId */ StagingXcmV3JunctionNetworkId: { _enum: { ByGenesis: "[u8;32]", @@ -846,7 +856,7 @@ export default { BitcoinCash: "Null", }, }, - /** Lookup68: staging_xcm::v3::junction::BodyId */ + /** Lookup70: staging_xcm::v3::junction::BodyId */ StagingXcmV3JunctionBodyId: { _enum: { Unit: "Null", @@ -861,7 +871,7 @@ export default { Treasury: "Null", }, }, - /** Lookup69: staging_xcm::v3::junction::BodyPart */ + /** Lookup71: staging_xcm::v3::junction::BodyPart */ StagingXcmV3JunctionBodyPart: { _enum: { Voice: "Null", @@ -882,9 +892,9 @@ export default { }, }, }, - /** Lookup70: staging_xcm::v3::Xcm */ + /** Lookup72: staging_xcm::v3::Xcm */ StagingXcmV3Xcm: "Vec", - /** Lookup72: staging_xcm::v3::Instruction */ + /** Lookup74: staging_xcm::v3::Instruction */ StagingXcmV3Instruction: { _enum: { WithdrawAsset: "StagingXcmV3MultiassetMultiAssets", @@ -1024,28 +1034,28 @@ export default { }, }, }, - /** Lookup73: staging_xcm::v3::multiasset::MultiAssets */ + /** Lookup75: staging_xcm::v3::multiasset::MultiAssets */ StagingXcmV3MultiassetMultiAssets: "Vec", - /** Lookup75: staging_xcm::v3::multiasset::MultiAsset */ + /** Lookup77: staging_xcm::v3::multiasset::MultiAsset */ StagingXcmV3MultiAsset: { id: "StagingXcmV3MultiassetAssetId", fun: "StagingXcmV3MultiassetFungibility", }, - /** Lookup76: staging_xcm::v3::multiasset::AssetId */ + /** Lookup78: staging_xcm::v3::multiasset::AssetId */ StagingXcmV3MultiassetAssetId: { _enum: { Concrete: "StagingXcmV3MultiLocation", Abstract: "[u8;32]", }, }, - /** Lookup77: staging_xcm::v3::multiasset::Fungibility */ + /** Lookup79: staging_xcm::v3::multiasset::Fungibility */ StagingXcmV3MultiassetFungibility: { _enum: { Fungible: "Compact", NonFungible: "StagingXcmV3MultiassetAssetInstance", }, }, - /** Lookup78: staging_xcm::v3::multiasset::AssetInstance */ + /** Lookup80: staging_xcm::v3::multiasset::AssetInstance */ StagingXcmV3MultiassetAssetInstance: { _enum: { Undefined: "Null", @@ -1056,7 +1066,7 @@ export default { Array32: "[u8;32]", }, }, - /** Lookup81: staging_xcm::v3::Response */ + /** Lookup83: staging_xcm::v3::Response */ StagingXcmV3Response: { _enum: { Null: "Null", @@ -1067,7 +1077,7 @@ export default { DispatchResult: "StagingXcmV3MaybeErrorCode", }, }, - /** Lookup85: staging_xcm::v3::PalletInfo */ + /** Lookup87: staging_xcm::v3::PalletInfo */ StagingXcmV3PalletInfo: { index: "Compact", name: "Bytes", @@ -1076,7 +1086,7 @@ export default { minor: "Compact", patch: "Compact", }, - /** Lookup88: staging_xcm::v3::MaybeErrorCode */ + /** Lookup90: staging_xcm::v3::MaybeErrorCode */ StagingXcmV3MaybeErrorCode: { _enum: { Success: "Null", @@ -1084,28 +1094,28 @@ export default { TruncatedError: "Bytes", }, }, - /** Lookup91: staging_xcm::v2::OriginKind */ + /** Lookup93: staging_xcm::v2::OriginKind */ StagingXcmV2OriginKind: { _enum: ["Native", "SovereignAccount", "Superuser", "Xcm"], }, - /** Lookup92: staging_xcm::double_encoded::DoubleEncoded */ + /** Lookup94: staging_xcm::double_encoded::DoubleEncoded */ StagingXcmDoubleEncoded: { encoded: "Bytes", }, - /** Lookup93: staging_xcm::v3::QueryResponseInfo */ + /** Lookup95: staging_xcm::v3::QueryResponseInfo */ StagingXcmV3QueryResponseInfo: { destination: "StagingXcmV3MultiLocation", queryId: "Compact", maxWeight: "SpWeightsWeightV2Weight", }, - /** Lookup94: staging_xcm::v3::multiasset::MultiAssetFilter */ + /** Lookup96: staging_xcm::v3::multiasset::MultiAssetFilter */ StagingXcmV3MultiassetMultiAssetFilter: { _enum: { Definite: "StagingXcmV3MultiassetMultiAssets", Wild: "StagingXcmV3MultiassetWildMultiAsset", }, }, - /** Lookup95: staging_xcm::v3::multiasset::WildMultiAsset */ + /** Lookup97: staging_xcm::v3::multiasset::WildMultiAsset */ StagingXcmV3MultiassetWildMultiAsset: { _enum: { All: "Null", @@ -1121,18 +1131,18 @@ export default { }, }, }, - /** Lookup96: staging_xcm::v3::multiasset::WildFungibility */ + /** Lookup98: staging_xcm::v3::multiasset::WildFungibility */ StagingXcmV3MultiassetWildFungibility: { _enum: ["Fungible", "NonFungible"], }, - /** Lookup98: staging_xcm::v3::WeightLimit */ + /** Lookup99: staging_xcm::v3::WeightLimit */ StagingXcmV3WeightLimit: { _enum: { Unlimited: "Null", Limited: "SpWeightsWeightV2Weight", }, }, - /** Lookup99: staging_xcm::VersionedMultiAssets */ + /** Lookup100: staging_xcm::VersionedMultiAssets */ StagingXcmVersionedMultiAssets: { _enum: { __Unused0: "Null", @@ -1141,26 +1151,26 @@ export default { V3: "StagingXcmV3MultiassetMultiAssets", }, }, - /** Lookup100: staging_xcm::v2::multiasset::MultiAssets */ + /** Lookup101: staging_xcm::v2::multiasset::MultiAssets */ StagingXcmV2MultiassetMultiAssets: "Vec", - /** Lookup102: staging_xcm::v2::multiasset::MultiAsset */ + /** Lookup103: staging_xcm::v2::multiasset::MultiAsset */ StagingXcmV2MultiAsset: { id: "StagingXcmV2MultiassetAssetId", fun: "StagingXcmV2MultiassetFungibility", }, - /** Lookup103: staging_xcm::v2::multiasset::AssetId */ + /** Lookup104: staging_xcm::v2::multiasset::AssetId */ StagingXcmV2MultiassetAssetId: { _enum: { Concrete: "StagingXcmV2MultiLocation", Abstract: "Bytes", }, }, - /** Lookup104: staging_xcm::v2::multilocation::MultiLocation */ + /** Lookup105: staging_xcm::v2::multilocation::MultiLocation */ StagingXcmV2MultiLocation: { parents: "u8", interior: "StagingXcmV2MultilocationJunctions", }, - /** Lookup105: staging_xcm::v2::multilocation::Junctions */ + /** Lookup106: staging_xcm::v2::multilocation::Junctions */ StagingXcmV2MultilocationJunctions: { _enum: { Here: "Null", @@ -1174,7 +1184,7 @@ export default { X8: "(StagingXcmV2Junction,StagingXcmV2Junction,StagingXcmV2Junction,StagingXcmV2Junction,StagingXcmV2Junction,StagingXcmV2Junction,StagingXcmV2Junction,StagingXcmV2Junction)", }, }, - /** Lookup106: staging_xcm::v2::junction::Junction */ + /** Lookup107: staging_xcm::v2::junction::Junction */ StagingXcmV2Junction: { _enum: { Parachain: "Compact", @@ -1200,7 +1210,7 @@ export default { }, }, }, - /** Lookup107: staging_xcm::v2::NetworkId */ + /** Lookup108: staging_xcm::v2::NetworkId */ StagingXcmV2NetworkId: { _enum: { Any: "Null", @@ -1209,7 +1219,7 @@ export default { Kusama: "Null", }, }, - /** Lookup109: staging_xcm::v2::BodyId */ + /** Lookup110: staging_xcm::v2::BodyId */ StagingXcmV2BodyId: { _enum: { Unit: "Null", @@ -1224,7 +1234,7 @@ export default { Treasury: "Null", }, }, - /** Lookup110: staging_xcm::v2::BodyPart */ + /** Lookup111: staging_xcm::v2::BodyPart */ StagingXcmV2BodyPart: { _enum: { Voice: "Null", @@ -1245,14 +1255,14 @@ export default { }, }, }, - /** Lookup111: staging_xcm::v2::multiasset::Fungibility */ + /** Lookup112: staging_xcm::v2::multiasset::Fungibility */ StagingXcmV2MultiassetFungibility: { _enum: { Fungible: "Compact", NonFungible: "StagingXcmV2MultiassetAssetInstance", }, }, - /** Lookup112: staging_xcm::v2::multiasset::AssetInstance */ + /** Lookup113: staging_xcm::v2::multiasset::AssetInstance */ StagingXcmV2MultiassetAssetInstance: { _enum: { Undefined: "Null", @@ -1264,7 +1274,7 @@ export default { Blob: "Bytes", }, }, - /** Lookup113: staging_xcm::VersionedMultiLocation */ + /** Lookup114: staging_xcm::VersionedMultiLocation */ StagingXcmVersionedMultiLocation: { _enum: { __Unused0: "Null", @@ -1273,7 +1283,7 @@ export default { V3: "StagingXcmV3MultiLocation", }, }, - /** Lookup114: frame_system::Phase */ + /** Lookup115: frame_system::Phase */ FrameSystemPhase: { _enum: { ApplyExtrinsic: "u32", @@ -1281,12 +1291,12 @@ export default { Initialization: "Null", }, }, - /** Lookup118: frame_system::LastRuntimeUpgradeInfo */ + /** Lookup119: frame_system::LastRuntimeUpgradeInfo */ FrameSystemLastRuntimeUpgradeInfo: { specVersion: "Compact", specName: "Text", }, - /** Lookup120: frame_system::pallet::Call */ + /** Lookup121: frame_system::pallet::Call */ FrameSystemCall: { _enum: { remark: { @@ -1319,41 +1329,41 @@ export default { }, }, }, - /** Lookup124: frame_system::limits::BlockWeights */ + /** Lookup125: frame_system::limits::BlockWeights */ FrameSystemLimitsBlockWeights: { baseBlock: "SpWeightsWeightV2Weight", maxBlock: "SpWeightsWeightV2Weight", perClass: "FrameSupportDispatchPerDispatchClassWeightsPerClass", }, - /** Lookup125: frame_support::dispatch::PerDispatchClass */ + /** Lookup126: frame_support::dispatch::PerDispatchClass */ FrameSupportDispatchPerDispatchClassWeightsPerClass: { normal: "FrameSystemLimitsWeightsPerClass", operational: "FrameSystemLimitsWeightsPerClass", mandatory: "FrameSystemLimitsWeightsPerClass", }, - /** Lookup126: frame_system::limits::WeightsPerClass */ + /** Lookup127: frame_system::limits::WeightsPerClass */ FrameSystemLimitsWeightsPerClass: { baseExtrinsic: "SpWeightsWeightV2Weight", maxExtrinsic: "Option", maxTotal: "Option", reserved: "Option", }, - /** Lookup128: frame_system::limits::BlockLength */ + /** Lookup129: frame_system::limits::BlockLength */ FrameSystemLimitsBlockLength: { max: "FrameSupportDispatchPerDispatchClassU32", }, - /** Lookup129: frame_support::dispatch::PerDispatchClass */ + /** Lookup130: frame_support::dispatch::PerDispatchClass */ FrameSupportDispatchPerDispatchClassU32: { normal: "u32", operational: "u32", mandatory: "u32", }, - /** Lookup130: sp_weights::RuntimeDbWeight */ + /** Lookup131: sp_weights::RuntimeDbWeight */ SpWeightsRuntimeDbWeight: { read: "u64", write: "u64", }, - /** Lookup131: sp_version::RuntimeVersion */ + /** Lookup132: sp_version::RuntimeVersion */ SpVersionRuntimeVersion: { specName: "Text", implName: "Text", @@ -1364,7 +1374,7 @@ export default { transactionVersion: "u32", stateVersion: "u8", }, - /** Lookup135: frame_system::pallet::Error */ + /** Lookup136: frame_system::pallet::Error */ FrameSystemError: { _enum: [ "InvalidSpecName", @@ -1375,49 +1385,49 @@ export default { "CallFiltered", ], }, - /** Lookup137: cumulus_pallet_parachain_system::unincluded_segment::Ancestor */ + /** Lookup138: cumulus_pallet_parachain_system::unincluded_segment::Ancestor */ CumulusPalletParachainSystemUnincludedSegmentAncestor: { usedBandwidth: "CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth", paraHeadHash: "Option", consumedGoAheadSignal: "Option", }, - /** Lookup138: cumulus_pallet_parachain_system::unincluded_segment::UsedBandwidth */ + /** Lookup139: cumulus_pallet_parachain_system::unincluded_segment::UsedBandwidth */ CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth: { umpMsgCount: "u32", umpTotalBytes: "u32", hrmpOutgoing: "BTreeMap", }, - /** Lookup140: cumulus_pallet_parachain_system::unincluded_segment::HrmpChannelUpdate */ + /** Lookup141: cumulus_pallet_parachain_system::unincluded_segment::HrmpChannelUpdate */ CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate: { msgCount: "u32", totalBytes: "u32", }, - /** Lookup145: polkadot_primitives::v5::UpgradeGoAhead */ + /** Lookup146: polkadot_primitives::v5::UpgradeGoAhead */ PolkadotPrimitivesV5UpgradeGoAhead: { _enum: ["Abort", "GoAhead"], }, - /** Lookup146: cumulus_pallet_parachain_system::unincluded_segment::SegmentTracker */ + /** Lookup147: cumulus_pallet_parachain_system::unincluded_segment::SegmentTracker */ CumulusPalletParachainSystemUnincludedSegmentSegmentTracker: { usedBandwidth: "CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth", hrmpWatermark: "Option", consumedGoAheadSignal: "Option", }, - /** Lookup147: polkadot_primitives::v5::PersistedValidationData */ + /** Lookup148: polkadot_primitives::v5::PersistedValidationData */ PolkadotPrimitivesV5PersistedValidationData: { parentHead: "Bytes", relayParentNumber: "u32", relayParentStorageRoot: "H256", maxPovSize: "u32", }, - /** Lookup150: polkadot_primitives::v5::UpgradeRestriction */ + /** Lookup151: polkadot_primitives::v5::UpgradeRestriction */ PolkadotPrimitivesV5UpgradeRestriction: { _enum: ["Present"], }, - /** Lookup151: sp_trie::storage_proof::StorageProof */ + /** Lookup152: sp_trie::storage_proof::StorageProof */ SpTrieStorageProof: { trieNodes: "BTreeSet", }, - /** Lookup153: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot */ + /** Lookup154: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot */ CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot: { dmqMqcHead: "H256", relayDispatchQueueRemainingCapacity: @@ -1425,12 +1435,12 @@ export default { ingressChannels: "Vec<(u32,PolkadotPrimitivesV5AbridgedHrmpChannel)>", egressChannels: "Vec<(u32,PolkadotPrimitivesV5AbridgedHrmpChannel)>", }, - /** Lookup154: cumulus_pallet_parachain_system::relay_state_snapshot::RelayDispatchQueueRemainingCapacity */ + /** Lookup155: cumulus_pallet_parachain_system::relay_state_snapshot::RelayDispatchQueueRemainingCapacity */ CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity: { remainingCount: "u32", remainingSize: "u32", }, - /** Lookup157: polkadot_primitives::v5::AbridgedHrmpChannel */ + /** Lookup158: polkadot_primitives::v5::AbridgedHrmpChannel */ PolkadotPrimitivesV5AbridgedHrmpChannel: { maxCapacity: "u32", maxTotalSize: "u32", @@ -1439,7 +1449,7 @@ export default { totalSize: "u32", mqcHead: "Option", }, - /** Lookup158: polkadot_primitives::v5::AbridgedHostConfiguration */ + /** Lookup159: polkadot_primitives::v5::AbridgedHostConfiguration */ PolkadotPrimitivesV5AbridgedHostConfiguration: { maxCodeSize: "u32", maxHeadDataSize: "u32", @@ -1452,22 +1462,22 @@ export default { validationUpgradeDelay: "u32", asyncBackingParams: "PolkadotPrimitivesVstagingAsyncBackingParams", }, - /** Lookup159: polkadot_primitives::vstaging::AsyncBackingParams */ + /** Lookup160: polkadot_primitives::vstaging::AsyncBackingParams */ PolkadotPrimitivesVstagingAsyncBackingParams: { maxCandidateDepth: "u32", allowedAncestryLen: "u32", }, - /** Lookup165: polkadot_core_primitives::OutboundHrmpMessage */ + /** Lookup166: polkadot_core_primitives::OutboundHrmpMessage */ PolkadotCorePrimitivesOutboundHrmpMessage: { recipient: "u32", data: "Bytes", }, - /** Lookup166: cumulus_pallet_parachain_system::CodeUpgradeAuthorization */ + /** Lookup167: cumulus_pallet_parachain_system::CodeUpgradeAuthorization */ CumulusPalletParachainSystemCodeUpgradeAuthorization: { codeHash: "H256", checkVersion: "bool", }, - /** Lookup167: cumulus_pallet_parachain_system::pallet::Call */ + /** Lookup168: cumulus_pallet_parachain_system::pallet::Call */ CumulusPalletParachainSystemCall: { _enum: { set_validation_data: { @@ -1485,24 +1495,24 @@ export default { }, }, }, - /** Lookup168: cumulus_primitives_parachain_inherent::ParachainInherentData */ + /** Lookup169: cumulus_primitives_parachain_inherent::ParachainInherentData */ CumulusPrimitivesParachainInherentParachainInherentData: { validationData: "PolkadotPrimitivesV5PersistedValidationData", relayChainState: "SpTrieStorageProof", downwardMessages: "Vec", horizontalMessages: "BTreeMap>", }, - /** Lookup170: polkadot_core_primitives::InboundDownwardMessage */ + /** Lookup171: polkadot_core_primitives::InboundDownwardMessage */ PolkadotCorePrimitivesInboundDownwardMessage: { sentAt: "u32", msg: "Bytes", }, - /** Lookup173: polkadot_core_primitives::InboundHrmpMessage */ + /** Lookup174: polkadot_core_primitives::InboundHrmpMessage */ PolkadotCorePrimitivesInboundHrmpMessage: { sentAt: "u32", data: "Bytes", }, - /** Lookup176: cumulus_pallet_parachain_system::pallet::Error */ + /** Lookup177: cumulus_pallet_parachain_system::pallet::Error */ CumulusPalletParachainSystemError: { _enum: [ "OverlappingUpgrades", @@ -1515,7 +1525,7 @@ export default { "Unauthorized", ], }, - /** Lookup177: pallet_timestamp::pallet::Call */ + /** Lookup178: pallet_timestamp::pallet::Call */ PalletTimestampCall: { _enum: { set: { @@ -1523,9 +1533,9 @@ export default { }, }, }, - /** Lookup178: parachain_info::pallet::Call */ + /** Lookup179: parachain_info::pallet::Call */ ParachainInfoCall: "Null", - /** Lookup179: pallet_sudo::pallet::Call */ + /** Lookup180: pallet_sudo::pallet::Call */ PalletSudoCall: { _enum: { sudo: { @@ -1547,7 +1557,7 @@ export default { }, }, }, - /** Lookup181: pallet_utility::pallet::Call */ + /** Lookup182: pallet_utility::pallet::Call */ PalletUtilityCall: { _enum: { batch: { @@ -1573,7 +1583,7 @@ export default { }, }, }, - /** Lookup183: dancebox_runtime::OriginCaller */ + /** Lookup184: dancebox_runtime::OriginCaller */ DanceboxRuntimeOriginCaller: { _enum: { system: "FrameSupportDispatchRawOrigin", @@ -1632,7 +1642,7 @@ export default { PolkadotXcm: "PalletXcmOrigin", }, }, - /** Lookup184: frame_support::dispatch::RawOrigin */ + /** Lookup185: frame_support::dispatch::RawOrigin */ FrameSupportDispatchRawOrigin: { _enum: { Root: "Null", @@ -1640,23 +1650,23 @@ export default { None: "Null", }, }, - /** Lookup185: cumulus_pallet_xcm::pallet::Origin */ + /** Lookup186: cumulus_pallet_xcm::pallet::Origin */ CumulusPalletXcmOrigin: { _enum: { Relay: "Null", SiblingParachain: "u32", }, }, - /** Lookup186: pallet_xcm::pallet::Origin */ + /** Lookup187: pallet_xcm::pallet::Origin */ PalletXcmOrigin: { _enum: { Xcm: "StagingXcmV3MultiLocation", Response: "StagingXcmV3MultiLocation", }, }, - /** Lookup187: sp_core::Void */ + /** Lookup188: sp_core::Void */ SpCoreVoid: "Null", - /** Lookup188: pallet_proxy::pallet::Call */ + /** Lookup189: pallet_proxy::pallet::Call */ PalletProxyCall: { _enum: { proxy: { @@ -1707,11 +1717,11 @@ export default { }, }, }, - /** Lookup192: pallet_maintenance_mode::pallet::Call */ + /** Lookup193: pallet_maintenance_mode::pallet::Call */ PalletMaintenanceModeCall: { _enum: ["enter_maintenance_mode", "resume_normal_operation"], }, - /** Lookup193: pallet_balances::pallet::Call */ + /** Lookup194: pallet_balances::pallet::Call */ PalletBalancesCall: { _enum: { transfer_allow_death: { @@ -1753,7 +1763,7 @@ export default { }, }, }, - /** Lookup194: pallet_registrar::pallet::Call */ + /** Lookup195: pallet_registrar::pallet::Call */ PalletRegistrarCall: { _enum: { register: { @@ -1775,7 +1785,7 @@ export default { }, }, }, - /** Lookup195: tp_container_chain_genesis_data::ContainerChainGenesisData */ + /** Lookup196: tp_container_chain_genesis_data::ContainerChainGenesisData */ TpContainerChainGenesisDataContainerChainGenesisData: { storage: "Vec", name: "Bytes", @@ -1784,23 +1794,23 @@ export default { extensions: "Bytes", properties: "TpContainerChainGenesisDataProperties", }, - /** Lookup197: tp_container_chain_genesis_data::ContainerChainGenesisDataItem */ + /** Lookup198: tp_container_chain_genesis_data::ContainerChainGenesisDataItem */ TpContainerChainGenesisDataContainerChainGenesisDataItem: { key: "Bytes", value: "Bytes", }, - /** Lookup199: tp_container_chain_genesis_data::Properties */ + /** Lookup200: tp_container_chain_genesis_data::Properties */ TpContainerChainGenesisDataProperties: { tokenMetadata: "TpContainerChainGenesisDataTokenMetadata", isEthereum: "bool", }, - /** Lookup200: tp_container_chain_genesis_data::TokenMetadata */ + /** Lookup201: tp_container_chain_genesis_data::TokenMetadata */ TpContainerChainGenesisDataTokenMetadata: { tokenSymbol: "Bytes", ss58Format: "u32", tokenDecimals: "u32", }, - /** Lookup205: pallet_configuration::pallet::Call */ + /** Lookup206: pallet_configuration::pallet::Call */ PalletConfigurationCall: { _enum: { set_max_collators: { @@ -1827,7 +1837,12 @@ export default { }, new_: "u32", }, - __Unused4: "Null", + set_full_rotation_period: { + _alias: { + new_: "new", + }, + new_: "u32", + }, __Unused5: "Null", __Unused6: "Null", __Unused7: "Null", @@ -1875,9 +1890,9 @@ export default { }, }, }, - /** Lookup206: pallet_collator_assignment::pallet::Call */ + /** Lookup207: pallet_collator_assignment::pallet::Call */ PalletCollatorAssignmentCall: "Null", - /** Lookup207: pallet_author_noting::pallet::Call */ + /** Lookup208: pallet_author_noting::pallet::Call */ PalletAuthorNotingCall: { _enum: { set_latest_author_data: { @@ -1893,13 +1908,13 @@ export default { }, }, }, - /** Lookup208: tp_author_noting_inherent::OwnParachainInherentData */ + /** Lookup209: tp_author_noting_inherent::OwnParachainInherentData */ TpAuthorNotingInherentOwnParachainInherentData: { relayStorageProof: "SpTrieStorageProof", }, - /** Lookup209: pallet_authority_assignment::pallet::Call */ + /** Lookup210: pallet_authority_assignment::pallet::Call */ PalletAuthorityAssignmentCall: "Null", - /** Lookup210: pallet_invulnerables::pallet::Call */ + /** Lookup211: pallet_invulnerables::pallet::Call */ PalletInvulnerablesCall: { _enum: { set_invulnerables: { @@ -1916,7 +1931,7 @@ export default { }, }, }, - /** Lookup211: pallet_session::pallet::Call */ + /** Lookup212: pallet_session::pallet::Call */ PalletSessionCall: { _enum: { set_keys: { @@ -1929,19 +1944,19 @@ export default { purge_keys: "Null", }, }, - /** Lookup212: dancebox_runtime::SessionKeys */ + /** Lookup213: dancebox_runtime::SessionKeys */ DanceboxRuntimeSessionKeys: { nimbus: "NimbusPrimitivesNimbusCryptoPublic", }, - /** Lookup213: nimbus_primitives::nimbus_crypto::Public */ + /** Lookup214: nimbus_primitives::nimbus_crypto::Public */ NimbusPrimitivesNimbusCryptoPublic: "SpCoreSr25519Public", - /** Lookup214: sp_core::sr25519::Public */ + /** Lookup215: sp_core::sr25519::Public */ SpCoreSr25519Public: "[u8;32]", - /** Lookup215: pallet_author_inherent::pallet::Call */ + /** Lookup216: pallet_author_inherent::pallet::Call */ PalletAuthorInherentCall: { _enum: ["kick_off_authorship_validation"], }, - /** Lookup216: pallet_pooled_staking::pallet::Call */ + /** Lookup217: pallet_pooled_staking::pallet::Call */ PalletPooledStakingCall: { _enum: { rebalance_hold: { @@ -1975,16 +1990,16 @@ export default { }, }, }, - /** Lookup217: pallet_pooled_staking::pallet::AllTargetPool */ + /** Lookup218: pallet_pooled_staking::pallet::AllTargetPool */ PalletPooledStakingAllTargetPool: { _enum: ["Joining", "AutoCompounding", "ManualRewards", "Leaving"], }, - /** Lookup219: pallet_pooled_staking::pallet::PendingOperationQuery */ + /** Lookup220: pallet_pooled_staking::pallet::PendingOperationQuery */ PalletPooledStakingPendingOperationQuery: { delegator: "AccountId32", operation: "PalletPooledStakingPendingOperationKey", }, - /** Lookup220: pallet_pooled_staking::pallet::PendingOperationKey */ + /** Lookup221: pallet_pooled_staking::pallet::PendingOperationKey */ PalletPooledStakingPendingOperationKey: { _enum: { JoiningAutoCompounding: { @@ -2001,14 +2016,14 @@ export default { }, }, }, - /** Lookup221: pallet_pooled_staking::pallet::SharesOrStake */ + /** Lookup222: pallet_pooled_staking::pallet::SharesOrStake */ PalletPooledStakingSharesOrStake: { _enum: { Shares: "u128", Stake: "u128", }, }, - /** Lookup224: cumulus_pallet_xcmp_queue::pallet::Call */ + /** Lookup225: cumulus_pallet_xcmp_queue::pallet::Call */ CumulusPalletXcmpQueueCall: { _enum: { service_overweight: { @@ -2055,7 +2070,7 @@ export default { }, }, }, - /** Lookup225: cumulus_pallet_dmp_queue::pallet::Call */ + /** Lookup226: cumulus_pallet_dmp_queue::pallet::Call */ CumulusPalletDmpQueueCall: { _enum: { service_overweight: { @@ -2064,7 +2079,7 @@ export default { }, }, }, - /** Lookup226: pallet_xcm::pallet::Call */ + /** Lookup227: pallet_xcm::pallet::Call */ PalletXcmCall: { _enum: { send: { @@ -2119,7 +2134,7 @@ export default { }, }, }, - /** Lookup227: staging_xcm::VersionedXcm */ + /** Lookup228: staging_xcm::VersionedXcm */ StagingXcmVersionedXcm: { _enum: { __Unused0: "Null", @@ -2128,9 +2143,9 @@ export default { V3: "StagingXcmV3Xcm", }, }, - /** Lookup228: staging_xcm::v2::Xcm */ + /** Lookup229: staging_xcm::v2::Xcm */ StagingXcmV2Xcm: "Vec", - /** Lookup230: staging_xcm::v2::Instruction */ + /** Lookup231: staging_xcm::v2::Instruction */ StagingXcmV2Instruction: { _enum: { WithdrawAsset: "StagingXcmV2MultiassetMultiAssets", @@ -2226,7 +2241,7 @@ export default { UnsubscribeVersion: "Null", }, }, - /** Lookup231: staging_xcm::v2::Response */ + /** Lookup232: staging_xcm::v2::Response */ StagingXcmV2Response: { _enum: { Null: "Null", @@ -2235,7 +2250,7 @@ export default { Version: "u32", }, }, - /** Lookup234: staging_xcm::v2::traits::Error */ + /** Lookup235: staging_xcm::v2::traits::Error */ StagingXcmV2TraitsError: { _enum: { Overflow: "Null", @@ -2266,14 +2281,14 @@ export default { WeightNotComputable: "Null", }, }, - /** Lookup235: staging_xcm::v2::multiasset::MultiAssetFilter */ + /** Lookup236: staging_xcm::v2::multiasset::MultiAssetFilter */ StagingXcmV2MultiassetMultiAssetFilter: { _enum: { Definite: "StagingXcmV2MultiassetMultiAssets", Wild: "StagingXcmV2MultiassetWildMultiAsset", }, }, - /** Lookup236: staging_xcm::v2::multiasset::WildMultiAsset */ + /** Lookup237: staging_xcm::v2::multiasset::WildMultiAsset */ StagingXcmV2MultiassetWildMultiAsset: { _enum: { All: "Null", @@ -2283,18 +2298,18 @@ export default { }, }, }, - /** Lookup237: staging_xcm::v2::multiasset::WildFungibility */ + /** Lookup238: staging_xcm::v2::multiasset::WildFungibility */ StagingXcmV2MultiassetWildFungibility: { _enum: ["Fungible", "NonFungible"], }, - /** Lookup238: staging_xcm::v2::WeightLimit */ + /** Lookup239: staging_xcm::v2::WeightLimit */ StagingXcmV2WeightLimit: { _enum: { Unlimited: "Null", Limited: "Compact", }, }, - /** Lookup247: pallet_root_testing::pallet::Call */ + /** Lookup248: pallet_root_testing::pallet::Call */ PalletRootTestingCall: { _enum: { fill_block: { @@ -2302,27 +2317,27 @@ export default { }, }, }, - /** Lookup249: pallet_sudo::pallet::Error */ + /** Lookup250: pallet_sudo::pallet::Error */ PalletSudoError: { _enum: ["RequireSudo"], }, - /** Lookup250: pallet_utility::pallet::Error */ + /** Lookup251: pallet_utility::pallet::Error */ PalletUtilityError: { _enum: ["TooManyCalls"], }, - /** Lookup253: pallet_proxy::ProxyDefinition */ + /** Lookup254: pallet_proxy::ProxyDefinition */ PalletProxyProxyDefinition: { delegate: "AccountId32", proxyType: "DanceboxRuntimeProxyType", delay: "u32", }, - /** Lookup257: pallet_proxy::Announcement */ + /** Lookup258: pallet_proxy::Announcement */ PalletProxyAnnouncement: { real: "AccountId32", callHash: "H256", height: "u32", }, - /** Lookup259: pallet_proxy::pallet::Error */ + /** Lookup260: pallet_proxy::pallet::Error */ PalletProxyError: { _enum: [ "TooMany", @@ -2335,39 +2350,39 @@ export default { "NoSelfProxy", ], }, - /** Lookup260: pallet_migrations::pallet::Error */ + /** Lookup261: pallet_migrations::pallet::Error */ PalletMigrationsError: { _enum: ["PreimageMissing", "WrongUpperBound", "PreimageIsTooBig", "PreimageAlreadyExists"], }, - /** Lookup261: pallet_maintenance_mode::pallet::Error */ + /** Lookup262: pallet_maintenance_mode::pallet::Error */ PalletMaintenanceModeError: { _enum: ["AlreadyInMaintenanceMode", "NotInMaintenanceMode"], }, - /** Lookup263: pallet_balances::types::BalanceLock */ + /** Lookup264: pallet_balances::types::BalanceLock */ PalletBalancesBalanceLock: { id: "[u8;8]", amount: "u128", reasons: "PalletBalancesReasons", }, - /** Lookup264: pallet_balances::types::Reasons */ + /** Lookup265: pallet_balances::types::Reasons */ PalletBalancesReasons: { _enum: ["Fee", "Misc", "All"], }, - /** Lookup267: pallet_balances::types::ReserveData */ + /** Lookup268: pallet_balances::types::ReserveData */ PalletBalancesReserveData: { id: "[u8;8]", amount: "u128", }, - /** Lookup271: dancebox_runtime::HoldReason */ + /** Lookup272: dancebox_runtime::HoldReason */ DanceboxRuntimeHoldReason: { _enum: ["PooledStake"], }, - /** Lookup274: pallet_balances::types::IdAmount */ + /** Lookup275: pallet_balances::types::IdAmount */ PalletBalancesIdAmount: { id: "[u8;8]", amount: "u128", }, - /** Lookup276: pallet_balances::pallet::Error */ + /** Lookup277: pallet_balances::pallet::Error */ PalletBalancesError: { _enum: [ "VestingBalance", @@ -2382,16 +2397,16 @@ export default { "TooManyFreezes", ], }, - /** Lookup278: pallet_transaction_payment::Releases */ + /** Lookup279: pallet_transaction_payment::Releases */ PalletTransactionPaymentReleases: { _enum: ["V1Ancient", "V2"], }, - /** Lookup283: pallet_registrar::pallet::DepositInfo */ + /** Lookup284: pallet_registrar::pallet::DepositInfo */ PalletRegistrarDepositInfo: { creator: "AccountId32", deposit: "u128", }, - /** Lookup284: pallet_registrar::pallet::Error */ + /** Lookup285: pallet_registrar::pallet::Error */ PalletRegistrarError: { _enum: [ "ParaIdAlreadyRegistered", @@ -2403,35 +2418,36 @@ export default { "NotSufficientDeposit", ], }, - /** Lookup285: pallet_configuration::HostConfiguration */ + /** Lookup286: pallet_configuration::HostConfiguration */ PalletConfigurationHostConfiguration: { maxCollators: "u32", minOrchestratorCollators: "u32", maxOrchestratorCollators: "u32", collatorsPerContainer: "u32", + fullRotationPeriod: "u32", }, - /** Lookup288: pallet_configuration::pallet::Error */ + /** Lookup289: pallet_configuration::pallet::Error */ PalletConfigurationError: { _enum: ["InvalidNewValue"], }, - /** Lookup289: tp_collator_assignment::AssignedCollators */ + /** Lookup290: tp_collator_assignment::AssignedCollators */ TpCollatorAssignmentAssignedCollatorsAccountId32: { orchestratorChain: "Vec", containerChains: "BTreeMap>", }, - /** Lookup294: pallet_initializer::pallet::BufferedSessionChange */ + /** Lookup295: pallet_initializer::pallet::BufferedSessionChange */ PalletInitializerBufferedSessionChange: { changed: "bool", validators: "Vec<(AccountId32,NimbusPrimitivesNimbusCryptoPublic)>", queued: "Vec<(AccountId32,NimbusPrimitivesNimbusCryptoPublic)>", sessionIndex: "u32", }, - /** Lookup297: pallet_author_noting::pallet::ContainerChainBlockInfo */ + /** Lookup298: pallet_author_noting::pallet::ContainerChainBlockInfo */ PalletAuthorNotingContainerChainBlockInfo: { blockNumber: "u32", author: "AccountId32", }, - /** Lookup298: pallet_author_noting::pallet::Error */ + /** Lookup299: pallet_author_noting::pallet::Error */ PalletAuthorNotingError: { _enum: [ "FailedReading", @@ -2443,31 +2459,31 @@ export default { "NonAuraDigest", ], }, - /** Lookup299: tp_collator_assignment::AssignedCollators */ + /** Lookup300: tp_collator_assignment::AssignedCollators */ TpCollatorAssignmentAssignedCollatorsPublic: { orchestratorChain: "Vec", containerChains: "BTreeMap>", }, - /** Lookup305: pallet_invulnerables::pallet::Error */ + /** Lookup306: pallet_invulnerables::pallet::Error */ PalletInvulnerablesError: { _enum: ["TooManyInvulnerables", "AlreadyInvulnerable", "NotInvulnerable"], }, - /** Lookup310: sp_core::crypto::KeyTypeId */ + /** Lookup311: sp_core::crypto::KeyTypeId */ SpCoreCryptoKeyTypeId: "[u8;4]", - /** Lookup311: pallet_session::pallet::Error */ + /** Lookup312: pallet_session::pallet::Error */ PalletSessionError: { _enum: ["InvalidProof", "NoAssociatedValidatorId", "DuplicatedKey", "NoKeys", "NoAccount"], }, - /** Lookup315: pallet_author_inherent::pallet::Error */ + /** Lookup316: pallet_author_inherent::pallet::Error */ PalletAuthorInherentError: { _enum: ["AuthorAlreadySet", "NoAccountId", "CannotBeAuthor"], }, - /** Lookup317: pallet_pooled_staking::candidate::EligibleCandidate */ + /** Lookup318: pallet_pooled_staking::candidate::EligibleCandidate */ PalletPooledStakingCandidateEligibleCandidate: { candidate: "AccountId32", stake: "u128", }, - /** Lookup320: pallet_pooled_staking::pallet::PoolsKey */ + /** Lookup321: pallet_pooled_staking::pallet::PoolsKey */ PalletPooledStakingPoolsKey: { _enum: { CandidateTotalStake: "Null", @@ -2509,7 +2525,7 @@ export default { }, }, }, - /** Lookup322: pallet_pooled_staking::pallet::Error */ + /** Lookup323: pallet_pooled_staking::pallet::Error */ PalletPooledStakingError: { _enum: { InvalidPalletSetting: "Null", @@ -2528,21 +2544,21 @@ export default { SwapResultsInZeroShares: "Null", }, }, - /** Lookup324: cumulus_pallet_xcmp_queue::InboundChannelDetails */ + /** Lookup325: cumulus_pallet_xcmp_queue::InboundChannelDetails */ CumulusPalletXcmpQueueInboundChannelDetails: { sender: "u32", state: "CumulusPalletXcmpQueueInboundState", messageMetadata: "Vec<(u32,PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat)>", }, - /** Lookup325: cumulus_pallet_xcmp_queue::InboundState */ + /** Lookup326: cumulus_pallet_xcmp_queue::InboundState */ CumulusPalletXcmpQueueInboundState: { _enum: ["Ok", "Suspended"], }, - /** Lookup328: polkadot_parachain_primitives::primitives::XcmpMessageFormat */ + /** Lookup329: polkadot_parachain_primitives::primitives::XcmpMessageFormat */ PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat: { _enum: ["ConcatenatedVersionedXcm", "ConcatenatedEncodedBlob", "Signals"], }, - /** Lookup331: cumulus_pallet_xcmp_queue::OutboundChannelDetails */ + /** Lookup332: cumulus_pallet_xcmp_queue::OutboundChannelDetails */ CumulusPalletXcmpQueueOutboundChannelDetails: { recipient: "u32", state: "CumulusPalletXcmpQueueOutboundState", @@ -2550,11 +2566,11 @@ export default { firstIndex: "u16", lastIndex: "u16", }, - /** Lookup332: cumulus_pallet_xcmp_queue::OutboundState */ + /** Lookup333: cumulus_pallet_xcmp_queue::OutboundState */ CumulusPalletXcmpQueueOutboundState: { _enum: ["Ok", "Suspended"], }, - /** Lookup334: cumulus_pallet_xcmp_queue::QueueConfigData */ + /** Lookup335: cumulus_pallet_xcmp_queue::QueueConfigData */ CumulusPalletXcmpQueueQueueConfigData: { suspendThreshold: "u32", dropThreshold: "u32", @@ -2563,27 +2579,27 @@ export default { weightRestrictDecay: "SpWeightsWeightV2Weight", xcmpMaxIndividualWeight: "SpWeightsWeightV2Weight", }, - /** Lookup336: cumulus_pallet_xcmp_queue::pallet::Error */ + /** Lookup337: cumulus_pallet_xcmp_queue::pallet::Error */ CumulusPalletXcmpQueueError: { _enum: ["FailedToSend", "BadXcmOrigin", "BadXcm", "BadOverweightIndex", "WeightOverLimit"], }, - /** Lookup337: cumulus_pallet_xcm::pallet::Error */ + /** Lookup338: cumulus_pallet_xcm::pallet::Error */ CumulusPalletXcmError: "Null", - /** Lookup338: cumulus_pallet_dmp_queue::ConfigData */ + /** Lookup339: cumulus_pallet_dmp_queue::ConfigData */ CumulusPalletDmpQueueConfigData: { maxIndividual: "SpWeightsWeightV2Weight", }, - /** Lookup339: cumulus_pallet_dmp_queue::PageIndexData */ + /** Lookup340: cumulus_pallet_dmp_queue::PageIndexData */ CumulusPalletDmpQueuePageIndexData: { beginUsed: "u32", endUsed: "u32", overweightCount: "u64", }, - /** Lookup342: cumulus_pallet_dmp_queue::pallet::Error */ + /** Lookup343: cumulus_pallet_dmp_queue::pallet::Error */ CumulusPalletDmpQueueError: { _enum: ["Unknown", "OverLimit"], }, - /** Lookup343: pallet_xcm::pallet::QueryStatus */ + /** Lookup344: pallet_xcm::pallet::QueryStatus */ PalletXcmQueryStatus: { _enum: { Pending: { @@ -2602,7 +2618,7 @@ export default { }, }, }, - /** Lookup347: staging_xcm::VersionedResponse */ + /** Lookup348: staging_xcm::VersionedResponse */ StagingXcmVersionedResponse: { _enum: { __Unused0: "Null", @@ -2611,7 +2627,7 @@ export default { V3: "StagingXcmV3Response", }, }, - /** Lookup353: pallet_xcm::pallet::VersionMigrationStage */ + /** Lookup354: pallet_xcm::pallet::VersionMigrationStage */ PalletXcmVersionMigrationStage: { _enum: { MigrateSupportedVersion: "Null", @@ -2620,7 +2636,7 @@ export default { MigrateAndNotifyOldTargets: "Null", }, }, - /** Lookup355: staging_xcm::VersionedAssetId */ + /** Lookup356: staging_xcm::VersionedAssetId */ StagingXcmVersionedAssetId: { _enum: { __Unused0: "Null", @@ -2629,14 +2645,14 @@ export default { V3: "StagingXcmV3MultiassetAssetId", }, }, - /** Lookup356: pallet_xcm::pallet::RemoteLockedFungibleRecord */ + /** Lookup357: pallet_xcm::pallet::RemoteLockedFungibleRecord */ PalletXcmRemoteLockedFungibleRecord: { amount: "u128", owner: "StagingXcmVersionedMultiLocation", locker: "StagingXcmVersionedMultiLocation", consumers: "Vec<(Null,u128)>", }, - /** Lookup363: pallet_xcm::pallet::Error */ + /** Lookup364: pallet_xcm::pallet::Error */ PalletXcmError: { _enum: [ "Unreachable", @@ -2661,7 +2677,7 @@ export default { "InUse", ], }, - /** Lookup365: sp_runtime::MultiSignature */ + /** Lookup366: sp_runtime::MultiSignature */ SpRuntimeMultiSignature: { _enum: { Ed25519: "SpCoreEd25519Signature", @@ -2669,26 +2685,26 @@ export default { Ecdsa: "SpCoreEcdsaSignature", }, }, - /** Lookup366: sp_core::ed25519::Signature */ + /** Lookup367: sp_core::ed25519::Signature */ SpCoreEd25519Signature: "[u8;64]", - /** Lookup368: sp_core::sr25519::Signature */ + /** Lookup369: sp_core::sr25519::Signature */ SpCoreSr25519Signature: "[u8;64]", - /** Lookup369: sp_core::ecdsa::Signature */ + /** Lookup370: sp_core::ecdsa::Signature */ SpCoreEcdsaSignature: "[u8;65]", - /** Lookup372: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ + /** Lookup373: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ FrameSystemExtensionsCheckNonZeroSender: "Null", - /** Lookup373: frame_system::extensions::check_spec_version::CheckSpecVersion */ + /** Lookup374: frame_system::extensions::check_spec_version::CheckSpecVersion */ FrameSystemExtensionsCheckSpecVersion: "Null", - /** Lookup374: frame_system::extensions::check_tx_version::CheckTxVersion */ + /** Lookup375: frame_system::extensions::check_tx_version::CheckTxVersion */ FrameSystemExtensionsCheckTxVersion: "Null", - /** Lookup375: frame_system::extensions::check_genesis::CheckGenesis */ + /** Lookup376: frame_system::extensions::check_genesis::CheckGenesis */ FrameSystemExtensionsCheckGenesis: "Null", - /** Lookup378: frame_system::extensions::check_nonce::CheckNonce */ + /** Lookup379: frame_system::extensions::check_nonce::CheckNonce */ FrameSystemExtensionsCheckNonce: "Compact", - /** Lookup379: frame_system::extensions::check_weight::CheckWeight */ + /** Lookup380: frame_system::extensions::check_weight::CheckWeight */ FrameSystemExtensionsCheckWeight: "Null", - /** Lookup380: pallet_transaction_payment::ChargeTransactionPayment */ + /** Lookup381: pallet_transaction_payment::ChargeTransactionPayment */ PalletTransactionPaymentChargeTransactionPayment: "Compact", - /** Lookup381: dancebox_runtime::Runtime */ + /** Lookup382: dancebox_runtime::Runtime */ DanceboxRuntimeRuntime: "Null", }; diff --git a/typescript-api/src/dancebox/interfaces/registry.ts b/typescript-api/src/dancebox/interfaces/registry.ts index 616c0b431..48054b0c6 100644 --- a/typescript-api/src/dancebox/interfaces/registry.ts +++ b/typescript-api/src/dancebox/interfaces/registry.ts @@ -79,6 +79,7 @@ import type { PalletBalancesReasons, PalletBalancesReserveData, PalletCollatorAssignmentCall, + PalletCollatorAssignmentEvent, PalletConfigurationCall, PalletConfigurationError, PalletConfigurationHostConfiguration, @@ -293,6 +294,7 @@ declare module "@polkadot/types/types/registry" { PalletBalancesReasons: PalletBalancesReasons; PalletBalancesReserveData: PalletBalancesReserveData; PalletCollatorAssignmentCall: PalletCollatorAssignmentCall; + PalletCollatorAssignmentEvent: PalletCollatorAssignmentEvent; PalletConfigurationCall: PalletConfigurationCall; PalletConfigurationError: PalletConfigurationError; PalletConfigurationHostConfiguration: PalletConfigurationHostConfiguration; diff --git a/typescript-api/src/dancebox/interfaces/types-lookup.ts b/typescript-api/src/dancebox/interfaces/types-lookup.ts index 449fc5d9b..eb1e7acd4 100644 --- a/typescript-api/src/dancebox/interfaces/types-lookup.ts +++ b/typescript-api/src/dancebox/interfaces/types-lookup.ts @@ -582,7 +582,18 @@ declare module "@polkadot/types/lookup" { | "BootNodesChanged"; } - /** @name PalletAuthorNotingEvent (47) */ + /** @name PalletCollatorAssignmentEvent (47) */ + interface PalletCollatorAssignmentEvent extends Enum { + readonly isNewPendingAssignment: boolean; + readonly asNewPendingAssignment: { + readonly randomSeed: U8aFixed; + readonly fullRotation: bool; + readonly targetSession: u32; + } & Struct; + readonly type: "NewPendingAssignment"; + } + + /** @name PalletAuthorNotingEvent (49) */ interface PalletAuthorNotingEvent extends Enum { readonly isLatestAuthorChanged: boolean; readonly asLatestAuthorChanged: { @@ -597,7 +608,7 @@ declare module "@polkadot/types/lookup" { readonly type: "LatestAuthorChanged" | "RemovedAuthorData"; } - /** @name PalletInvulnerablesEvent (48) */ + /** @name PalletInvulnerablesEvent (50) */ interface PalletInvulnerablesEvent extends Enum { readonly isNewInvulnerables: boolean; readonly asNewInvulnerables: { @@ -618,7 +629,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NewInvulnerables" | "InvulnerableAdded" | "InvulnerableRemoved" | "InvalidInvulnerableSkipped"; } - /** @name PalletSessionEvent (50) */ + /** @name PalletSessionEvent (52) */ interface PalletSessionEvent extends Enum { readonly isNewSession: boolean; readonly asNewSession: { @@ -627,7 +638,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NewSession"; } - /** @name PalletPooledStakingEvent (51) */ + /** @name PalletPooledStakingEvent (53) */ interface PalletPooledStakingEvent extends Enum { readonly isUpdatedCandidatePosition: boolean; readonly asUpdatedCandidatePosition: { @@ -752,14 +763,14 @@ declare module "@polkadot/types/lookup" { | "SwappedPool"; } - /** @name PalletPooledStakingTargetPool (53) */ + /** @name PalletPooledStakingTargetPool (55) */ interface PalletPooledStakingTargetPool extends Enum { readonly isAutoCompounding: boolean; readonly isManualRewards: boolean; readonly type: "AutoCompounding" | "ManualRewards"; } - /** @name CumulusPalletXcmpQueueEvent (54) */ + /** @name CumulusPalletXcmpQueueEvent (56) */ interface CumulusPalletXcmpQueueEvent extends Enum { readonly isSuccess: boolean; readonly asSuccess: { @@ -808,7 +819,7 @@ declare module "@polkadot/types/lookup" { | "OverweightServiced"; } - /** @name StagingXcmV3TraitsError (55) */ + /** @name StagingXcmV3TraitsError (57) */ interface StagingXcmV3TraitsError extends Enum { readonly isOverflow: boolean; readonly isUnimplemented: boolean; @@ -895,7 +906,7 @@ declare module "@polkadot/types/lookup" { | "ExceedsStackLimit"; } - /** @name CumulusPalletXcmEvent (56) */ + /** @name CumulusPalletXcmEvent (58) */ interface CumulusPalletXcmEvent extends Enum { readonly isInvalidFormat: boolean; readonly asInvalidFormat: U8aFixed; @@ -906,7 +917,7 @@ declare module "@polkadot/types/lookup" { readonly type: "InvalidFormat" | "UnsupportedVersion" | "ExecutedDownward"; } - /** @name StagingXcmV3TraitsOutcome (57) */ + /** @name StagingXcmV3TraitsOutcome (59) */ interface StagingXcmV3TraitsOutcome extends Enum { readonly isComplete: boolean; readonly asComplete: SpWeightsWeightV2Weight; @@ -917,7 +928,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Complete" | "Incomplete" | "Error"; } - /** @name CumulusPalletDmpQueueEvent (58) */ + /** @name CumulusPalletDmpQueueEvent (60) */ interface CumulusPalletDmpQueueEvent extends Enum { readonly isInvalidFormat: boolean; readonly asInvalidFormat: { @@ -966,7 +977,7 @@ declare module "@polkadot/types/lookup" { | "MaxMessagesExhausted"; } - /** @name PalletXcmEvent (59) */ + /** @name PalletXcmEvent (61) */ interface PalletXcmEvent extends Enum { readonly isAttempted: boolean; readonly asAttempted: { @@ -1126,13 +1137,13 @@ declare module "@polkadot/types/lookup" { | "AssetsClaimed"; } - /** @name StagingXcmV3MultiLocation (60) */ + /** @name StagingXcmV3MultiLocation (62) */ interface StagingXcmV3MultiLocation extends Struct { readonly parents: u8; readonly interior: StagingXcmV3Junctions; } - /** @name StagingXcmV3Junctions (61) */ + /** @name StagingXcmV3Junctions (63) */ interface StagingXcmV3Junctions extends Enum { readonly isHere: boolean; readonly isX1: boolean; @@ -1192,7 +1203,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "X1" | "X2" | "X3" | "X4" | "X5" | "X6" | "X7" | "X8"; } - /** @name StagingXcmV3Junction (62) */ + /** @name StagingXcmV3Junction (64) */ interface StagingXcmV3Junction extends Enum { readonly isParachain: boolean; readonly asParachain: Compact; @@ -1241,7 +1252,7 @@ declare module "@polkadot/types/lookup" { | "GlobalConsensus"; } - /** @name StagingXcmV3JunctionNetworkId (65) */ + /** @name StagingXcmV3JunctionNetworkId (67) */ interface StagingXcmV3JunctionNetworkId extends Enum { readonly isByGenesis: boolean; readonly asByGenesis: U8aFixed; @@ -1274,7 +1285,7 @@ declare module "@polkadot/types/lookup" { | "BitcoinCash"; } - /** @name StagingXcmV3JunctionBodyId (68) */ + /** @name StagingXcmV3JunctionBodyId (70) */ interface StagingXcmV3JunctionBodyId extends Enum { readonly isUnit: boolean; readonly isMoniker: boolean; @@ -1301,7 +1312,7 @@ declare module "@polkadot/types/lookup" { | "Treasury"; } - /** @name StagingXcmV3JunctionBodyPart (69) */ + /** @name StagingXcmV3JunctionBodyPart (71) */ interface StagingXcmV3JunctionBodyPart extends Enum { readonly isVoice: boolean; readonly isMembers: boolean; @@ -1326,10 +1337,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Voice" | "Members" | "Fraction" | "AtLeastProportion" | "MoreThanProportion"; } - /** @name StagingXcmV3Xcm (70) */ + /** @name StagingXcmV3Xcm (72) */ interface StagingXcmV3Xcm extends Vec {} - /** @name StagingXcmV3Instruction (72) */ + /** @name StagingXcmV3Instruction (74) */ interface StagingXcmV3Instruction extends Enum { readonly isWithdrawAsset: boolean; readonly asWithdrawAsset: StagingXcmV3MultiassetMultiAssets; @@ -1559,16 +1570,16 @@ declare module "@polkadot/types/lookup" { | "UnpaidExecution"; } - /** @name StagingXcmV3MultiassetMultiAssets (73) */ + /** @name StagingXcmV3MultiassetMultiAssets (75) */ interface StagingXcmV3MultiassetMultiAssets extends Vec {} - /** @name StagingXcmV3MultiAsset (75) */ + /** @name StagingXcmV3MultiAsset (77) */ interface StagingXcmV3MultiAsset extends Struct { readonly id: StagingXcmV3MultiassetAssetId; readonly fun: StagingXcmV3MultiassetFungibility; } - /** @name StagingXcmV3MultiassetAssetId (76) */ + /** @name StagingXcmV3MultiassetAssetId (78) */ interface StagingXcmV3MultiassetAssetId extends Enum { readonly isConcrete: boolean; readonly asConcrete: StagingXcmV3MultiLocation; @@ -1577,7 +1588,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Concrete" | "Abstract"; } - /** @name StagingXcmV3MultiassetFungibility (77) */ + /** @name StagingXcmV3MultiassetFungibility (79) */ interface StagingXcmV3MultiassetFungibility extends Enum { readonly isFungible: boolean; readonly asFungible: Compact; @@ -1586,7 +1597,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Fungible" | "NonFungible"; } - /** @name StagingXcmV3MultiassetAssetInstance (78) */ + /** @name StagingXcmV3MultiassetAssetInstance (80) */ interface StagingXcmV3MultiassetAssetInstance extends Enum { readonly isUndefined: boolean; readonly isIndex: boolean; @@ -1602,7 +1613,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Undefined" | "Index" | "Array4" | "Array8" | "Array16" | "Array32"; } - /** @name StagingXcmV3Response (81) */ + /** @name StagingXcmV3Response (83) */ interface StagingXcmV3Response extends Enum { readonly isNull: boolean; readonly isAssets: boolean; @@ -1618,7 +1629,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Null" | "Assets" | "ExecutionResult" | "Version" | "PalletsInfo" | "DispatchResult"; } - /** @name StagingXcmV3PalletInfo (85) */ + /** @name StagingXcmV3PalletInfo (87) */ interface StagingXcmV3PalletInfo extends Struct { readonly index: Compact; readonly name: Bytes; @@ -1628,7 +1639,7 @@ declare module "@polkadot/types/lookup" { readonly patch: Compact; } - /** @name StagingXcmV3MaybeErrorCode (88) */ + /** @name StagingXcmV3MaybeErrorCode (90) */ interface StagingXcmV3MaybeErrorCode extends Enum { readonly isSuccess: boolean; readonly isError: boolean; @@ -1638,7 +1649,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Success" | "Error" | "TruncatedError"; } - /** @name StagingXcmV2OriginKind (91) */ + /** @name StagingXcmV2OriginKind (93) */ interface StagingXcmV2OriginKind extends Enum { readonly isNative: boolean; readonly isSovereignAccount: boolean; @@ -1647,19 +1658,19 @@ declare module "@polkadot/types/lookup" { readonly type: "Native" | "SovereignAccount" | "Superuser" | "Xcm"; } - /** @name StagingXcmDoubleEncoded (92) */ + /** @name StagingXcmDoubleEncoded (94) */ interface StagingXcmDoubleEncoded extends Struct { readonly encoded: Bytes; } - /** @name StagingXcmV3QueryResponseInfo (93) */ + /** @name StagingXcmV3QueryResponseInfo (95) */ interface StagingXcmV3QueryResponseInfo extends Struct { readonly destination: StagingXcmV3MultiLocation; readonly queryId: Compact; readonly maxWeight: SpWeightsWeightV2Weight; } - /** @name StagingXcmV3MultiassetMultiAssetFilter (94) */ + /** @name StagingXcmV3MultiassetMultiAssetFilter (96) */ interface StagingXcmV3MultiassetMultiAssetFilter extends Enum { readonly isDefinite: boolean; readonly asDefinite: StagingXcmV3MultiassetMultiAssets; @@ -1668,7 +1679,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Definite" | "Wild"; } - /** @name StagingXcmV3MultiassetWildMultiAsset (95) */ + /** @name StagingXcmV3MultiassetWildMultiAsset (97) */ interface StagingXcmV3MultiassetWildMultiAsset extends Enum { readonly isAll: boolean; readonly isAllOf: boolean; @@ -1687,14 +1698,14 @@ declare module "@polkadot/types/lookup" { readonly type: "All" | "AllOf" | "AllCounted" | "AllOfCounted"; } - /** @name StagingXcmV3MultiassetWildFungibility (96) */ + /** @name StagingXcmV3MultiassetWildFungibility (98) */ interface StagingXcmV3MultiassetWildFungibility extends Enum { readonly isFungible: boolean; readonly isNonFungible: boolean; readonly type: "Fungible" | "NonFungible"; } - /** @name StagingXcmV3WeightLimit (98) */ + /** @name StagingXcmV3WeightLimit (99) */ interface StagingXcmV3WeightLimit extends Enum { readonly isUnlimited: boolean; readonly isLimited: boolean; @@ -1702,7 +1713,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unlimited" | "Limited"; } - /** @name StagingXcmVersionedMultiAssets (99) */ + /** @name StagingXcmVersionedMultiAssets (100) */ interface StagingXcmVersionedMultiAssets extends Enum { readonly isV2: boolean; readonly asV2: StagingXcmV2MultiassetMultiAssets; @@ -1711,16 +1722,16 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3"; } - /** @name StagingXcmV2MultiassetMultiAssets (100) */ + /** @name StagingXcmV2MultiassetMultiAssets (101) */ interface StagingXcmV2MultiassetMultiAssets extends Vec {} - /** @name StagingXcmV2MultiAsset (102) */ + /** @name StagingXcmV2MultiAsset (103) */ interface StagingXcmV2MultiAsset extends Struct { readonly id: StagingXcmV2MultiassetAssetId; readonly fun: StagingXcmV2MultiassetFungibility; } - /** @name StagingXcmV2MultiassetAssetId (103) */ + /** @name StagingXcmV2MultiassetAssetId (104) */ interface StagingXcmV2MultiassetAssetId extends Enum { readonly isConcrete: boolean; readonly asConcrete: StagingXcmV2MultiLocation; @@ -1729,13 +1740,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Concrete" | "Abstract"; } - /** @name StagingXcmV2MultiLocation (104) */ + /** @name StagingXcmV2MultiLocation (105) */ interface StagingXcmV2MultiLocation extends Struct { readonly parents: u8; readonly interior: StagingXcmV2MultilocationJunctions; } - /** @name StagingXcmV2MultilocationJunctions (105) */ + /** @name StagingXcmV2MultilocationJunctions (106) */ interface StagingXcmV2MultilocationJunctions extends Enum { readonly isHere: boolean; readonly isX1: boolean; @@ -1795,7 +1806,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "X1" | "X2" | "X3" | "X4" | "X5" | "X6" | "X7" | "X8"; } - /** @name StagingXcmV2Junction (106) */ + /** @name StagingXcmV2Junction (107) */ interface StagingXcmV2Junction extends Enum { readonly isParachain: boolean; readonly asParachain: Compact; @@ -1838,7 +1849,7 @@ declare module "@polkadot/types/lookup" { | "Plurality"; } - /** @name StagingXcmV2NetworkId (107) */ + /** @name StagingXcmV2NetworkId (108) */ interface StagingXcmV2NetworkId extends Enum { readonly isAny: boolean; readonly isNamed: boolean; @@ -1848,7 +1859,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Any" | "Named" | "Polkadot" | "Kusama"; } - /** @name StagingXcmV2BodyId (109) */ + /** @name StagingXcmV2BodyId (110) */ interface StagingXcmV2BodyId extends Enum { readonly isUnit: boolean; readonly isNamed: boolean; @@ -1875,7 +1886,7 @@ declare module "@polkadot/types/lookup" { | "Treasury"; } - /** @name StagingXcmV2BodyPart (110) */ + /** @name StagingXcmV2BodyPart (111) */ interface StagingXcmV2BodyPart extends Enum { readonly isVoice: boolean; readonly isMembers: boolean; @@ -1900,7 +1911,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Voice" | "Members" | "Fraction" | "AtLeastProportion" | "MoreThanProportion"; } - /** @name StagingXcmV2MultiassetFungibility (111) */ + /** @name StagingXcmV2MultiassetFungibility (112) */ interface StagingXcmV2MultiassetFungibility extends Enum { readonly isFungible: boolean; readonly asFungible: Compact; @@ -1909,7 +1920,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Fungible" | "NonFungible"; } - /** @name StagingXcmV2MultiassetAssetInstance (112) */ + /** @name StagingXcmV2MultiassetAssetInstance (113) */ interface StagingXcmV2MultiassetAssetInstance extends Enum { readonly isUndefined: boolean; readonly isIndex: boolean; @@ -1927,7 +1938,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Undefined" | "Index" | "Array4" | "Array8" | "Array16" | "Array32" | "Blob"; } - /** @name StagingXcmVersionedMultiLocation (113) */ + /** @name StagingXcmVersionedMultiLocation (114) */ interface StagingXcmVersionedMultiLocation extends Enum { readonly isV2: boolean; readonly asV2: StagingXcmV2MultiLocation; @@ -1936,7 +1947,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3"; } - /** @name FrameSystemPhase (114) */ + /** @name FrameSystemPhase (115) */ interface FrameSystemPhase extends Enum { readonly isApplyExtrinsic: boolean; readonly asApplyExtrinsic: u32; @@ -1945,13 +1956,13 @@ declare module "@polkadot/types/lookup" { readonly type: "ApplyExtrinsic" | "Finalization" | "Initialization"; } - /** @name FrameSystemLastRuntimeUpgradeInfo (118) */ + /** @name FrameSystemLastRuntimeUpgradeInfo (119) */ interface FrameSystemLastRuntimeUpgradeInfo extends Struct { readonly specVersion: Compact; readonly specName: Text; } - /** @name FrameSystemCall (120) */ + /** @name FrameSystemCall (121) */ interface FrameSystemCall extends Enum { readonly isRemark: boolean; readonly asRemark: { @@ -1997,21 +2008,21 @@ declare module "@polkadot/types/lookup" { | "RemarkWithEvent"; } - /** @name FrameSystemLimitsBlockWeights (124) */ + /** @name FrameSystemLimitsBlockWeights (125) */ interface FrameSystemLimitsBlockWeights extends Struct { readonly baseBlock: SpWeightsWeightV2Weight; readonly maxBlock: SpWeightsWeightV2Weight; readonly perClass: FrameSupportDispatchPerDispatchClassWeightsPerClass; } - /** @name FrameSupportDispatchPerDispatchClassWeightsPerClass (125) */ + /** @name FrameSupportDispatchPerDispatchClassWeightsPerClass (126) */ interface FrameSupportDispatchPerDispatchClassWeightsPerClass extends Struct { readonly normal: FrameSystemLimitsWeightsPerClass; readonly operational: FrameSystemLimitsWeightsPerClass; readonly mandatory: FrameSystemLimitsWeightsPerClass; } - /** @name FrameSystemLimitsWeightsPerClass (126) */ + /** @name FrameSystemLimitsWeightsPerClass (127) */ interface FrameSystemLimitsWeightsPerClass extends Struct { readonly baseExtrinsic: SpWeightsWeightV2Weight; readonly maxExtrinsic: Option; @@ -2019,25 +2030,25 @@ declare module "@polkadot/types/lookup" { readonly reserved: Option; } - /** @name FrameSystemLimitsBlockLength (128) */ + /** @name FrameSystemLimitsBlockLength (129) */ interface FrameSystemLimitsBlockLength extends Struct { readonly max: FrameSupportDispatchPerDispatchClassU32; } - /** @name FrameSupportDispatchPerDispatchClassU32 (129) */ + /** @name FrameSupportDispatchPerDispatchClassU32 (130) */ interface FrameSupportDispatchPerDispatchClassU32 extends Struct { readonly normal: u32; readonly operational: u32; readonly mandatory: u32; } - /** @name SpWeightsRuntimeDbWeight (130) */ + /** @name SpWeightsRuntimeDbWeight (131) */ interface SpWeightsRuntimeDbWeight extends Struct { readonly read: u64; readonly write: u64; } - /** @name SpVersionRuntimeVersion (131) */ + /** @name SpVersionRuntimeVersion (132) */ interface SpVersionRuntimeVersion extends Struct { readonly specName: Text; readonly implName: Text; @@ -2049,7 +2060,7 @@ declare module "@polkadot/types/lookup" { readonly stateVersion: u8; } - /** @name FrameSystemError (135) */ + /** @name FrameSystemError (136) */ interface FrameSystemError extends Enum { readonly isInvalidSpecName: boolean; readonly isSpecVersionNeedsToIncrease: boolean; @@ -2066,41 +2077,41 @@ declare module "@polkadot/types/lookup" { | "CallFiltered"; } - /** @name CumulusPalletParachainSystemUnincludedSegmentAncestor (137) */ + /** @name CumulusPalletParachainSystemUnincludedSegmentAncestor (138) */ interface CumulusPalletParachainSystemUnincludedSegmentAncestor extends Struct { readonly usedBandwidth: CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth; readonly paraHeadHash: Option; readonly consumedGoAheadSignal: Option; } - /** @name CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth (138) */ + /** @name CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth (139) */ interface CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth extends Struct { readonly umpMsgCount: u32; readonly umpTotalBytes: u32; readonly hrmpOutgoing: BTreeMap; } - /** @name CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate (140) */ + /** @name CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate (141) */ interface CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate extends Struct { readonly msgCount: u32; readonly totalBytes: u32; } - /** @name PolkadotPrimitivesV5UpgradeGoAhead (145) */ + /** @name PolkadotPrimitivesV5UpgradeGoAhead (146) */ interface PolkadotPrimitivesV5UpgradeGoAhead extends Enum { readonly isAbort: boolean; readonly isGoAhead: boolean; readonly type: "Abort" | "GoAhead"; } - /** @name CumulusPalletParachainSystemUnincludedSegmentSegmentTracker (146) */ + /** @name CumulusPalletParachainSystemUnincludedSegmentSegmentTracker (147) */ interface CumulusPalletParachainSystemUnincludedSegmentSegmentTracker extends Struct { readonly usedBandwidth: CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth; readonly hrmpWatermark: Option; readonly consumedGoAheadSignal: Option; } - /** @name PolkadotPrimitivesV5PersistedValidationData (147) */ + /** @name PolkadotPrimitivesV5PersistedValidationData (148) */ interface PolkadotPrimitivesV5PersistedValidationData extends Struct { readonly parentHead: Bytes; readonly relayParentNumber: u32; @@ -2108,18 +2119,18 @@ declare module "@polkadot/types/lookup" { readonly maxPovSize: u32; } - /** @name PolkadotPrimitivesV5UpgradeRestriction (150) */ + /** @name PolkadotPrimitivesV5UpgradeRestriction (151) */ interface PolkadotPrimitivesV5UpgradeRestriction extends Enum { readonly isPresent: boolean; readonly type: "Present"; } - /** @name SpTrieStorageProof (151) */ + /** @name SpTrieStorageProof (152) */ interface SpTrieStorageProof extends Struct { readonly trieNodes: BTreeSet; } - /** @name CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot (153) */ + /** @name CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot (154) */ interface CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot extends Struct { readonly dmqMqcHead: H256; readonly relayDispatchQueueRemainingCapacity: CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity; @@ -2127,13 +2138,13 @@ declare module "@polkadot/types/lookup" { readonly egressChannels: Vec>; } - /** @name CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity (154) */ + /** @name CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity (155) */ interface CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity extends Struct { readonly remainingCount: u32; readonly remainingSize: u32; } - /** @name PolkadotPrimitivesV5AbridgedHrmpChannel (157) */ + /** @name PolkadotPrimitivesV5AbridgedHrmpChannel (158) */ interface PolkadotPrimitivesV5AbridgedHrmpChannel extends Struct { readonly maxCapacity: u32; readonly maxTotalSize: u32; @@ -2143,7 +2154,7 @@ declare module "@polkadot/types/lookup" { readonly mqcHead: Option; } - /** @name PolkadotPrimitivesV5AbridgedHostConfiguration (158) */ + /** @name PolkadotPrimitivesV5AbridgedHostConfiguration (159) */ interface PolkadotPrimitivesV5AbridgedHostConfiguration extends Struct { readonly maxCodeSize: u32; readonly maxHeadDataSize: u32; @@ -2157,25 +2168,25 @@ declare module "@polkadot/types/lookup" { readonly asyncBackingParams: PolkadotPrimitivesVstagingAsyncBackingParams; } - /** @name PolkadotPrimitivesVstagingAsyncBackingParams (159) */ + /** @name PolkadotPrimitivesVstagingAsyncBackingParams (160) */ interface PolkadotPrimitivesVstagingAsyncBackingParams extends Struct { readonly maxCandidateDepth: u32; readonly allowedAncestryLen: u32; } - /** @name PolkadotCorePrimitivesOutboundHrmpMessage (165) */ + /** @name PolkadotCorePrimitivesOutboundHrmpMessage (166) */ interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct { readonly recipient: u32; readonly data: Bytes; } - /** @name CumulusPalletParachainSystemCodeUpgradeAuthorization (166) */ + /** @name CumulusPalletParachainSystemCodeUpgradeAuthorization (167) */ interface CumulusPalletParachainSystemCodeUpgradeAuthorization extends Struct { readonly codeHash: H256; readonly checkVersion: bool; } - /** @name CumulusPalletParachainSystemCall (167) */ + /** @name CumulusPalletParachainSystemCall (168) */ interface CumulusPalletParachainSystemCall extends Enum { readonly isSetValidationData: boolean; readonly asSetValidationData: { @@ -2197,7 +2208,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SetValidationData" | "SudoSendUpwardMessage" | "AuthorizeUpgrade" | "EnactAuthorizedUpgrade"; } - /** @name CumulusPrimitivesParachainInherentParachainInherentData (168) */ + /** @name CumulusPrimitivesParachainInherentParachainInherentData (169) */ interface CumulusPrimitivesParachainInherentParachainInherentData extends Struct { readonly validationData: PolkadotPrimitivesV5PersistedValidationData; readonly relayChainState: SpTrieStorageProof; @@ -2205,19 +2216,19 @@ declare module "@polkadot/types/lookup" { readonly horizontalMessages: BTreeMap>; } - /** @name PolkadotCorePrimitivesInboundDownwardMessage (170) */ + /** @name PolkadotCorePrimitivesInboundDownwardMessage (171) */ interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct { readonly sentAt: u32; readonly msg: Bytes; } - /** @name PolkadotCorePrimitivesInboundHrmpMessage (173) */ + /** @name PolkadotCorePrimitivesInboundHrmpMessage (174) */ interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct { readonly sentAt: u32; readonly data: Bytes; } - /** @name CumulusPalletParachainSystemError (176) */ + /** @name CumulusPalletParachainSystemError (177) */ interface CumulusPalletParachainSystemError extends Enum { readonly isOverlappingUpgrades: boolean; readonly isProhibitedByPolkadot: boolean; @@ -2238,7 +2249,7 @@ declare module "@polkadot/types/lookup" { | "Unauthorized"; } - /** @name PalletTimestampCall (177) */ + /** @name PalletTimestampCall (178) */ interface PalletTimestampCall extends Enum { readonly isSet: boolean; readonly asSet: { @@ -2247,10 +2258,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Set"; } - /** @name ParachainInfoCall (178) */ + /** @name ParachainInfoCall (179) */ type ParachainInfoCall = Null; - /** @name PalletSudoCall (179) */ + /** @name PalletSudoCall (180) */ interface PalletSudoCall extends Enum { readonly isSudo: boolean; readonly asSudo: { @@ -2273,7 +2284,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Sudo" | "SudoUncheckedWeight" | "SetKey" | "SudoAs"; } - /** @name PalletUtilityCall (181) */ + /** @name PalletUtilityCall (182) */ interface PalletUtilityCall extends Enum { readonly isBatch: boolean; readonly asBatch: { @@ -2305,7 +2316,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Batch" | "AsDerivative" | "BatchAll" | "DispatchAs" | "ForceBatch" | "WithWeight"; } - /** @name DanceboxRuntimeOriginCaller (183) */ + /** @name DanceboxRuntimeOriginCaller (184) */ interface DanceboxRuntimeOriginCaller extends Enum { readonly isSystem: boolean; readonly asSystem: FrameSupportDispatchRawOrigin; @@ -2317,7 +2328,7 @@ declare module "@polkadot/types/lookup" { readonly type: "System" | "Void" | "CumulusXcm" | "PolkadotXcm"; } - /** @name FrameSupportDispatchRawOrigin (184) */ + /** @name FrameSupportDispatchRawOrigin (185) */ interface FrameSupportDispatchRawOrigin extends Enum { readonly isRoot: boolean; readonly isSigned: boolean; @@ -2326,7 +2337,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Root" | "Signed" | "None"; } - /** @name CumulusPalletXcmOrigin (185) */ + /** @name CumulusPalletXcmOrigin (186) */ interface CumulusPalletXcmOrigin extends Enum { readonly isRelay: boolean; readonly isSiblingParachain: boolean; @@ -2334,7 +2345,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Relay" | "SiblingParachain"; } - /** @name PalletXcmOrigin (186) */ + /** @name PalletXcmOrigin (187) */ interface PalletXcmOrigin extends Enum { readonly isXcm: boolean; readonly asXcm: StagingXcmV3MultiLocation; @@ -2343,10 +2354,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Xcm" | "Response"; } - /** @name SpCoreVoid (187) */ + /** @name SpCoreVoid (188) */ type SpCoreVoid = Null; - /** @name PalletProxyCall (188) */ + /** @name PalletProxyCall (189) */ interface PalletProxyCall extends Enum { readonly isProxy: boolean; readonly asProxy: { @@ -2416,14 +2427,14 @@ declare module "@polkadot/types/lookup" { | "ProxyAnnounced"; } - /** @name PalletMaintenanceModeCall (192) */ + /** @name PalletMaintenanceModeCall (193) */ interface PalletMaintenanceModeCall extends Enum { readonly isEnterMaintenanceMode: boolean; readonly isResumeNormalOperation: boolean; readonly type: "EnterMaintenanceMode" | "ResumeNormalOperation"; } - /** @name PalletBalancesCall (193) */ + /** @name PalletBalancesCall (194) */ interface PalletBalancesCall extends Enum { readonly isTransferAllowDeath: boolean; readonly asTransferAllowDeath: { @@ -2483,7 +2494,7 @@ declare module "@polkadot/types/lookup" { | "ForceSetBalance"; } - /** @name PalletRegistrarCall (194) */ + /** @name PalletRegistrarCall (195) */ interface PalletRegistrarCall extends Enum { readonly isRegister: boolean; readonly asRegister: { @@ -2510,7 +2521,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Register" | "Deregister" | "MarkValidForCollating" | "SetBootNodes" | "PauseContainerChain"; } - /** @name TpContainerChainGenesisDataContainerChainGenesisData (195) */ + /** @name TpContainerChainGenesisDataContainerChainGenesisData (196) */ interface TpContainerChainGenesisDataContainerChainGenesisData extends Struct { readonly storage: Vec; readonly name: Bytes; @@ -2520,26 +2531,26 @@ declare module "@polkadot/types/lookup" { readonly properties: TpContainerChainGenesisDataProperties; } - /** @name TpContainerChainGenesisDataContainerChainGenesisDataItem (197) */ + /** @name TpContainerChainGenesisDataContainerChainGenesisDataItem (198) */ interface TpContainerChainGenesisDataContainerChainGenesisDataItem extends Struct { readonly key: Bytes; readonly value: Bytes; } - /** @name TpContainerChainGenesisDataProperties (199) */ + /** @name TpContainerChainGenesisDataProperties (200) */ interface TpContainerChainGenesisDataProperties extends Struct { readonly tokenMetadata: TpContainerChainGenesisDataTokenMetadata; readonly isEthereum: bool; } - /** @name TpContainerChainGenesisDataTokenMetadata (200) */ + /** @name TpContainerChainGenesisDataTokenMetadata (201) */ interface TpContainerChainGenesisDataTokenMetadata extends Struct { readonly tokenSymbol: Bytes; readonly ss58Format: u32; readonly tokenDecimals: u32; } - /** @name PalletConfigurationCall (205) */ + /** @name PalletConfigurationCall (206) */ interface PalletConfigurationCall extends Enum { readonly isSetMaxCollators: boolean; readonly asSetMaxCollators: { @@ -2557,6 +2568,10 @@ declare module "@polkadot/types/lookup" { readonly asSetCollatorsPerContainer: { readonly new_: u32; } & Struct; + readonly isSetFullRotationPeriod: boolean; + readonly asSetFullRotationPeriod: { + readonly new_: u32; + } & Struct; readonly isSetBypassConsistencyCheck: boolean; readonly asSetBypassConsistencyCheck: { readonly new_: bool; @@ -2566,13 +2581,14 @@ declare module "@polkadot/types/lookup" { | "SetMinOrchestratorCollators" | "SetMaxOrchestratorCollators" | "SetCollatorsPerContainer" + | "SetFullRotationPeriod" | "SetBypassConsistencyCheck"; } - /** @name PalletCollatorAssignmentCall (206) */ + /** @name PalletCollatorAssignmentCall (207) */ type PalletCollatorAssignmentCall = Null; - /** @name PalletAuthorNotingCall (207) */ + /** @name PalletAuthorNotingCall (208) */ interface PalletAuthorNotingCall extends Enum { readonly isSetLatestAuthorData: boolean; readonly asSetLatestAuthorData: { @@ -2591,15 +2607,15 @@ declare module "@polkadot/types/lookup" { readonly type: "SetLatestAuthorData" | "SetAuthor" | "KillAuthorData"; } - /** @name TpAuthorNotingInherentOwnParachainInherentData (208) */ + /** @name TpAuthorNotingInherentOwnParachainInherentData (209) */ interface TpAuthorNotingInherentOwnParachainInherentData extends Struct { readonly relayStorageProof: SpTrieStorageProof; } - /** @name PalletAuthorityAssignmentCall (209) */ + /** @name PalletAuthorityAssignmentCall (210) */ type PalletAuthorityAssignmentCall = Null; - /** @name PalletInvulnerablesCall (210) */ + /** @name PalletInvulnerablesCall (211) */ interface PalletInvulnerablesCall extends Enum { readonly isSetInvulnerables: boolean; readonly asSetInvulnerables: { @@ -2616,7 +2632,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SetInvulnerables" | "AddInvulnerable" | "RemoveInvulnerable"; } - /** @name PalletSessionCall (211) */ + /** @name PalletSessionCall (212) */ interface PalletSessionCall extends Enum { readonly isSetKeys: boolean; readonly asSetKeys: { @@ -2627,24 +2643,24 @@ declare module "@polkadot/types/lookup" { readonly type: "SetKeys" | "PurgeKeys"; } - /** @name DanceboxRuntimeSessionKeys (212) */ + /** @name DanceboxRuntimeSessionKeys (213) */ interface DanceboxRuntimeSessionKeys extends Struct { readonly nimbus: NimbusPrimitivesNimbusCryptoPublic; } - /** @name NimbusPrimitivesNimbusCryptoPublic (213) */ + /** @name NimbusPrimitivesNimbusCryptoPublic (214) */ interface NimbusPrimitivesNimbusCryptoPublic extends SpCoreSr25519Public {} - /** @name SpCoreSr25519Public (214) */ + /** @name SpCoreSr25519Public (215) */ interface SpCoreSr25519Public extends U8aFixed {} - /** @name PalletAuthorInherentCall (215) */ + /** @name PalletAuthorInherentCall (216) */ interface PalletAuthorInherentCall extends Enum { readonly isKickOffAuthorshipValidation: boolean; readonly type: "KickOffAuthorshipValidation"; } - /** @name PalletPooledStakingCall (216) */ + /** @name PalletPooledStakingCall (217) */ interface PalletPooledStakingCall extends Enum { readonly isRebalanceHold: boolean; readonly asRebalanceHold: { @@ -2692,7 +2708,7 @@ declare module "@polkadot/types/lookup" { | "SwapPool"; } - /** @name PalletPooledStakingAllTargetPool (217) */ + /** @name PalletPooledStakingAllTargetPool (218) */ interface PalletPooledStakingAllTargetPool extends Enum { readonly isJoining: boolean; readonly isAutoCompounding: boolean; @@ -2701,13 +2717,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Joining" | "AutoCompounding" | "ManualRewards" | "Leaving"; } - /** @name PalletPooledStakingPendingOperationQuery (219) */ + /** @name PalletPooledStakingPendingOperationQuery (220) */ interface PalletPooledStakingPendingOperationQuery extends Struct { readonly delegator: AccountId32; readonly operation: PalletPooledStakingPendingOperationKey; } - /** @name PalletPooledStakingPendingOperationKey (220) */ + /** @name PalletPooledStakingPendingOperationKey (221) */ interface PalletPooledStakingPendingOperationKey extends Enum { readonly isJoiningAutoCompounding: boolean; readonly asJoiningAutoCompounding: { @@ -2727,7 +2743,7 @@ declare module "@polkadot/types/lookup" { readonly type: "JoiningAutoCompounding" | "JoiningManualRewards" | "Leaving"; } - /** @name PalletPooledStakingSharesOrStake (221) */ + /** @name PalletPooledStakingSharesOrStake (222) */ interface PalletPooledStakingSharesOrStake extends Enum { readonly isShares: boolean; readonly asShares: u128; @@ -2736,7 +2752,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Shares" | "Stake"; } - /** @name CumulusPalletXcmpQueueCall (224) */ + /** @name CumulusPalletXcmpQueueCall (225) */ interface CumulusPalletXcmpQueueCall extends Enum { readonly isServiceOverweight: boolean; readonly asServiceOverweight: { @@ -2781,7 +2797,7 @@ declare module "@polkadot/types/lookup" { | "UpdateXcmpMaxIndividualWeight"; } - /** @name CumulusPalletDmpQueueCall (225) */ + /** @name CumulusPalletDmpQueueCall (226) */ interface CumulusPalletDmpQueueCall extends Enum { readonly isServiceOverweight: boolean; readonly asServiceOverweight: { @@ -2791,7 +2807,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ServiceOverweight"; } - /** @name PalletXcmCall (226) */ + /** @name PalletXcmCall (227) */ interface PalletXcmCall extends Enum { readonly isSend: boolean; readonly asSend: { @@ -2868,7 +2884,7 @@ declare module "@polkadot/types/lookup" { | "ForceSuspension"; } - /** @name StagingXcmVersionedXcm (227) */ + /** @name StagingXcmVersionedXcm (228) */ interface StagingXcmVersionedXcm extends Enum { readonly isV2: boolean; readonly asV2: StagingXcmV2Xcm; @@ -2877,10 +2893,10 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3"; } - /** @name StagingXcmV2Xcm (228) */ + /** @name StagingXcmV2Xcm (229) */ interface StagingXcmV2Xcm extends Vec {} - /** @name StagingXcmV2Instruction (230) */ + /** @name StagingXcmV2Instruction (231) */ interface StagingXcmV2Instruction extends Enum { readonly isWithdrawAsset: boolean; readonly asWithdrawAsset: StagingXcmV2MultiassetMultiAssets; @@ -3028,7 +3044,7 @@ declare module "@polkadot/types/lookup" { | "UnsubscribeVersion"; } - /** @name StagingXcmV2Response (231) */ + /** @name StagingXcmV2Response (232) */ interface StagingXcmV2Response extends Enum { readonly isNull: boolean; readonly isAssets: boolean; @@ -3040,7 +3056,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Null" | "Assets" | "ExecutionResult" | "Version"; } - /** @name StagingXcmV2TraitsError (234) */ + /** @name StagingXcmV2TraitsError (235) */ interface StagingXcmV2TraitsError extends Enum { readonly isOverflow: boolean; readonly isUnimplemented: boolean; @@ -3099,7 +3115,7 @@ declare module "@polkadot/types/lookup" { | "WeightNotComputable"; } - /** @name StagingXcmV2MultiassetMultiAssetFilter (235) */ + /** @name StagingXcmV2MultiassetMultiAssetFilter (236) */ interface StagingXcmV2MultiassetMultiAssetFilter extends Enum { readonly isDefinite: boolean; readonly asDefinite: StagingXcmV2MultiassetMultiAssets; @@ -3108,7 +3124,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Definite" | "Wild"; } - /** @name StagingXcmV2MultiassetWildMultiAsset (236) */ + /** @name StagingXcmV2MultiassetWildMultiAsset (237) */ interface StagingXcmV2MultiassetWildMultiAsset extends Enum { readonly isAll: boolean; readonly isAllOf: boolean; @@ -3119,14 +3135,14 @@ declare module "@polkadot/types/lookup" { readonly type: "All" | "AllOf"; } - /** @name StagingXcmV2MultiassetWildFungibility (237) */ + /** @name StagingXcmV2MultiassetWildFungibility (238) */ interface StagingXcmV2MultiassetWildFungibility extends Enum { readonly isFungible: boolean; readonly isNonFungible: boolean; readonly type: "Fungible" | "NonFungible"; } - /** @name StagingXcmV2WeightLimit (238) */ + /** @name StagingXcmV2WeightLimit (239) */ interface StagingXcmV2WeightLimit extends Enum { readonly isUnlimited: boolean; readonly isLimited: boolean; @@ -3134,7 +3150,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unlimited" | "Limited"; } - /** @name PalletRootTestingCall (247) */ + /** @name PalletRootTestingCall (248) */ interface PalletRootTestingCall extends Enum { readonly isFillBlock: boolean; readonly asFillBlock: { @@ -3143,33 +3159,33 @@ declare module "@polkadot/types/lookup" { readonly type: "FillBlock"; } - /** @name PalletSudoError (249) */ + /** @name PalletSudoError (250) */ interface PalletSudoError extends Enum { readonly isRequireSudo: boolean; readonly type: "RequireSudo"; } - /** @name PalletUtilityError (250) */ + /** @name PalletUtilityError (251) */ interface PalletUtilityError extends Enum { readonly isTooManyCalls: boolean; readonly type: "TooManyCalls"; } - /** @name PalletProxyProxyDefinition (253) */ + /** @name PalletProxyProxyDefinition (254) */ interface PalletProxyProxyDefinition extends Struct { readonly delegate: AccountId32; readonly proxyType: DanceboxRuntimeProxyType; readonly delay: u32; } - /** @name PalletProxyAnnouncement (257) */ + /** @name PalletProxyAnnouncement (258) */ interface PalletProxyAnnouncement extends Struct { readonly real: AccountId32; readonly callHash: H256; readonly height: u32; } - /** @name PalletProxyError (259) */ + /** @name PalletProxyError (260) */ interface PalletProxyError extends Enum { readonly isTooMany: boolean; readonly isNotFound: boolean; @@ -3190,7 +3206,7 @@ declare module "@polkadot/types/lookup" { | "NoSelfProxy"; } - /** @name PalletMigrationsError (260) */ + /** @name PalletMigrationsError (261) */ interface PalletMigrationsError extends Enum { readonly isPreimageMissing: boolean; readonly isWrongUpperBound: boolean; @@ -3199,21 +3215,21 @@ declare module "@polkadot/types/lookup" { readonly type: "PreimageMissing" | "WrongUpperBound" | "PreimageIsTooBig" | "PreimageAlreadyExists"; } - /** @name PalletMaintenanceModeError (261) */ + /** @name PalletMaintenanceModeError (262) */ interface PalletMaintenanceModeError extends Enum { readonly isAlreadyInMaintenanceMode: boolean; readonly isNotInMaintenanceMode: boolean; readonly type: "AlreadyInMaintenanceMode" | "NotInMaintenanceMode"; } - /** @name PalletBalancesBalanceLock (263) */ + /** @name PalletBalancesBalanceLock (264) */ interface PalletBalancesBalanceLock extends Struct { readonly id: U8aFixed; readonly amount: u128; readonly reasons: PalletBalancesReasons; } - /** @name PalletBalancesReasons (264) */ + /** @name PalletBalancesReasons (265) */ interface PalletBalancesReasons extends Enum { readonly isFee: boolean; readonly isMisc: boolean; @@ -3221,25 +3237,25 @@ declare module "@polkadot/types/lookup" { readonly type: "Fee" | "Misc" | "All"; } - /** @name PalletBalancesReserveData (267) */ + /** @name PalletBalancesReserveData (268) */ interface PalletBalancesReserveData extends Struct { readonly id: U8aFixed; readonly amount: u128; } - /** @name DanceboxRuntimeHoldReason (271) */ + /** @name DanceboxRuntimeHoldReason (272) */ interface DanceboxRuntimeHoldReason extends Enum { readonly isPooledStake: boolean; readonly type: "PooledStake"; } - /** @name PalletBalancesIdAmount (274) */ + /** @name PalletBalancesIdAmount (275) */ interface PalletBalancesIdAmount extends Struct { readonly id: U8aFixed; readonly amount: u128; } - /** @name PalletBalancesError (276) */ + /** @name PalletBalancesError (277) */ interface PalletBalancesError extends Enum { readonly isVestingBalance: boolean; readonly isLiquidityRestrictions: boolean; @@ -3264,20 +3280,20 @@ declare module "@polkadot/types/lookup" { | "TooManyFreezes"; } - /** @name PalletTransactionPaymentReleases (278) */ + /** @name PalletTransactionPaymentReleases (279) */ interface PalletTransactionPaymentReleases extends Enum { readonly isV1Ancient: boolean; readonly isV2: boolean; readonly type: "V1Ancient" | "V2"; } - /** @name PalletRegistrarDepositInfo (283) */ + /** @name PalletRegistrarDepositInfo (284) */ interface PalletRegistrarDepositInfo extends Struct { readonly creator: AccountId32; readonly deposit: u128; } - /** @name PalletRegistrarError (284) */ + /** @name PalletRegistrarError (285) */ interface PalletRegistrarError extends Enum { readonly isParaIdAlreadyRegistered: boolean; readonly isParaIdAlreadyPaused: boolean; @@ -3296,27 +3312,28 @@ declare module "@polkadot/types/lookup" { | "NotSufficientDeposit"; } - /** @name PalletConfigurationHostConfiguration (285) */ + /** @name PalletConfigurationHostConfiguration (286) */ interface PalletConfigurationHostConfiguration extends Struct { readonly maxCollators: u32; readonly minOrchestratorCollators: u32; readonly maxOrchestratorCollators: u32; readonly collatorsPerContainer: u32; + readonly fullRotationPeriod: u32; } - /** @name PalletConfigurationError (288) */ + /** @name PalletConfigurationError (289) */ interface PalletConfigurationError extends Enum { readonly isInvalidNewValue: boolean; readonly type: "InvalidNewValue"; } - /** @name TpCollatorAssignmentAssignedCollatorsAccountId32 (289) */ + /** @name TpCollatorAssignmentAssignedCollatorsAccountId32 (290) */ interface TpCollatorAssignmentAssignedCollatorsAccountId32 extends Struct { readonly orchestratorChain: Vec; readonly containerChains: BTreeMap>; } - /** @name PalletInitializerBufferedSessionChange (294) */ + /** @name PalletInitializerBufferedSessionChange (295) */ interface PalletInitializerBufferedSessionChange extends Struct { readonly changed: bool; readonly validators: Vec>; @@ -3324,13 +3341,13 @@ declare module "@polkadot/types/lookup" { readonly sessionIndex: u32; } - /** @name PalletAuthorNotingContainerChainBlockInfo (297) */ + /** @name PalletAuthorNotingContainerChainBlockInfo (298) */ interface PalletAuthorNotingContainerChainBlockInfo extends Struct { readonly blockNumber: u32; readonly author: AccountId32; } - /** @name PalletAuthorNotingError (298) */ + /** @name PalletAuthorNotingError (299) */ interface PalletAuthorNotingError extends Enum { readonly isFailedReading: boolean; readonly isFailedDecodingHeader: boolean; @@ -3349,13 +3366,13 @@ declare module "@polkadot/types/lookup" { | "NonAuraDigest"; } - /** @name TpCollatorAssignmentAssignedCollatorsPublic (299) */ + /** @name TpCollatorAssignmentAssignedCollatorsPublic (300) */ interface TpCollatorAssignmentAssignedCollatorsPublic extends Struct { readonly orchestratorChain: Vec; readonly containerChains: BTreeMap>; } - /** @name PalletInvulnerablesError (305) */ + /** @name PalletInvulnerablesError (306) */ interface PalletInvulnerablesError extends Enum { readonly isTooManyInvulnerables: boolean; readonly isAlreadyInvulnerable: boolean; @@ -3363,10 +3380,10 @@ declare module "@polkadot/types/lookup" { readonly type: "TooManyInvulnerables" | "AlreadyInvulnerable" | "NotInvulnerable"; } - /** @name SpCoreCryptoKeyTypeId (310) */ + /** @name SpCoreCryptoKeyTypeId (311) */ interface SpCoreCryptoKeyTypeId extends U8aFixed {} - /** @name PalletSessionError (311) */ + /** @name PalletSessionError (312) */ interface PalletSessionError extends Enum { readonly isInvalidProof: boolean; readonly isNoAssociatedValidatorId: boolean; @@ -3376,7 +3393,7 @@ declare module "@polkadot/types/lookup" { readonly type: "InvalidProof" | "NoAssociatedValidatorId" | "DuplicatedKey" | "NoKeys" | "NoAccount"; } - /** @name PalletAuthorInherentError (315) */ + /** @name PalletAuthorInherentError (316) */ interface PalletAuthorInherentError extends Enum { readonly isAuthorAlreadySet: boolean; readonly isNoAccountId: boolean; @@ -3384,13 +3401,13 @@ declare module "@polkadot/types/lookup" { readonly type: "AuthorAlreadySet" | "NoAccountId" | "CannotBeAuthor"; } - /** @name PalletPooledStakingCandidateEligibleCandidate (317) */ + /** @name PalletPooledStakingCandidateEligibleCandidate (318) */ interface PalletPooledStakingCandidateEligibleCandidate extends Struct { readonly candidate: AccountId32; readonly stake: u128; } - /** @name PalletPooledStakingPoolsKey (320) */ + /** @name PalletPooledStakingPoolsKey (321) */ interface PalletPooledStakingPoolsKey extends Enum { readonly isCandidateTotalStake: boolean; readonly isJoiningShares: boolean; @@ -3460,7 +3477,7 @@ declare module "@polkadot/types/lookup" { | "LeavingSharesHeldStake"; } - /** @name PalletPooledStakingError (322) */ + /** @name PalletPooledStakingError (323) */ interface PalletPooledStakingError extends Enum { readonly isInvalidPalletSetting: boolean; readonly isDisabledFeature: boolean; @@ -3494,21 +3511,21 @@ declare module "@polkadot/types/lookup" { | "SwapResultsInZeroShares"; } - /** @name CumulusPalletXcmpQueueInboundChannelDetails (324) */ + /** @name CumulusPalletXcmpQueueInboundChannelDetails (325) */ interface CumulusPalletXcmpQueueInboundChannelDetails extends Struct { readonly sender: u32; readonly state: CumulusPalletXcmpQueueInboundState; readonly messageMetadata: Vec>; } - /** @name CumulusPalletXcmpQueueInboundState (325) */ + /** @name CumulusPalletXcmpQueueInboundState (326) */ interface CumulusPalletXcmpQueueInboundState extends Enum { readonly isOk: boolean; readonly isSuspended: boolean; readonly type: "Ok" | "Suspended"; } - /** @name PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat (328) */ + /** @name PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat (329) */ interface PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat extends Enum { readonly isConcatenatedVersionedXcm: boolean; readonly isConcatenatedEncodedBlob: boolean; @@ -3516,7 +3533,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ConcatenatedVersionedXcm" | "ConcatenatedEncodedBlob" | "Signals"; } - /** @name CumulusPalletXcmpQueueOutboundChannelDetails (331) */ + /** @name CumulusPalletXcmpQueueOutboundChannelDetails (332) */ interface CumulusPalletXcmpQueueOutboundChannelDetails extends Struct { readonly recipient: u32; readonly state: CumulusPalletXcmpQueueOutboundState; @@ -3525,14 +3542,14 @@ declare module "@polkadot/types/lookup" { readonly lastIndex: u16; } - /** @name CumulusPalletXcmpQueueOutboundState (332) */ + /** @name CumulusPalletXcmpQueueOutboundState (333) */ interface CumulusPalletXcmpQueueOutboundState extends Enum { readonly isOk: boolean; readonly isSuspended: boolean; readonly type: "Ok" | "Suspended"; } - /** @name CumulusPalletXcmpQueueQueueConfigData (334) */ + /** @name CumulusPalletXcmpQueueQueueConfigData (335) */ interface CumulusPalletXcmpQueueQueueConfigData extends Struct { readonly suspendThreshold: u32; readonly dropThreshold: u32; @@ -3542,7 +3559,7 @@ declare module "@polkadot/types/lookup" { readonly xcmpMaxIndividualWeight: SpWeightsWeightV2Weight; } - /** @name CumulusPalletXcmpQueueError (336) */ + /** @name CumulusPalletXcmpQueueError (337) */ interface CumulusPalletXcmpQueueError extends Enum { readonly isFailedToSend: boolean; readonly isBadXcmOrigin: boolean; @@ -3552,29 +3569,29 @@ declare module "@polkadot/types/lookup" { readonly type: "FailedToSend" | "BadXcmOrigin" | "BadXcm" | "BadOverweightIndex" | "WeightOverLimit"; } - /** @name CumulusPalletXcmError (337) */ + /** @name CumulusPalletXcmError (338) */ type CumulusPalletXcmError = Null; - /** @name CumulusPalletDmpQueueConfigData (338) */ + /** @name CumulusPalletDmpQueueConfigData (339) */ interface CumulusPalletDmpQueueConfigData extends Struct { readonly maxIndividual: SpWeightsWeightV2Weight; } - /** @name CumulusPalletDmpQueuePageIndexData (339) */ + /** @name CumulusPalletDmpQueuePageIndexData (340) */ interface CumulusPalletDmpQueuePageIndexData extends Struct { readonly beginUsed: u32; readonly endUsed: u32; readonly overweightCount: u64; } - /** @name CumulusPalletDmpQueueError (342) */ + /** @name CumulusPalletDmpQueueError (343) */ interface CumulusPalletDmpQueueError extends Enum { readonly isUnknown: boolean; readonly isOverLimit: boolean; readonly type: "Unknown" | "OverLimit"; } - /** @name PalletXcmQueryStatus (343) */ + /** @name PalletXcmQueryStatus (344) */ interface PalletXcmQueryStatus extends Enum { readonly isPending: boolean; readonly asPending: { @@ -3596,7 +3613,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Pending" | "VersionNotifier" | "Ready"; } - /** @name StagingXcmVersionedResponse (347) */ + /** @name StagingXcmVersionedResponse (348) */ interface StagingXcmVersionedResponse extends Enum { readonly isV2: boolean; readonly asV2: StagingXcmV2Response; @@ -3605,7 +3622,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3"; } - /** @name PalletXcmVersionMigrationStage (353) */ + /** @name PalletXcmVersionMigrationStage (354) */ interface PalletXcmVersionMigrationStage extends Enum { readonly isMigrateSupportedVersion: boolean; readonly isMigrateVersionNotifiers: boolean; @@ -3619,14 +3636,14 @@ declare module "@polkadot/types/lookup" { | "MigrateAndNotifyOldTargets"; } - /** @name StagingXcmVersionedAssetId (355) */ + /** @name StagingXcmVersionedAssetId (356) */ interface StagingXcmVersionedAssetId extends Enum { readonly isV3: boolean; readonly asV3: StagingXcmV3MultiassetAssetId; readonly type: "V3"; } - /** @name PalletXcmRemoteLockedFungibleRecord (356) */ + /** @name PalletXcmRemoteLockedFungibleRecord (357) */ interface PalletXcmRemoteLockedFungibleRecord extends Struct { readonly amount: u128; readonly owner: StagingXcmVersionedMultiLocation; @@ -3634,7 +3651,7 @@ declare module "@polkadot/types/lookup" { readonly consumers: Vec>; } - /** @name PalletXcmError (363) */ + /** @name PalletXcmError (364) */ interface PalletXcmError extends Enum { readonly isUnreachable: boolean; readonly isSendFailure: boolean; @@ -3679,7 +3696,7 @@ declare module "@polkadot/types/lookup" { | "InUse"; } - /** @name SpRuntimeMultiSignature (365) */ + /** @name SpRuntimeMultiSignature (366) */ interface SpRuntimeMultiSignature extends Enum { readonly isEd25519: boolean; readonly asEd25519: SpCoreEd25519Signature; @@ -3690,36 +3707,36 @@ declare module "@polkadot/types/lookup" { readonly type: "Ed25519" | "Sr25519" | "Ecdsa"; } - /** @name SpCoreEd25519Signature (366) */ + /** @name SpCoreEd25519Signature (367) */ interface SpCoreEd25519Signature extends U8aFixed {} - /** @name SpCoreSr25519Signature (368) */ + /** @name SpCoreSr25519Signature (369) */ interface SpCoreSr25519Signature extends U8aFixed {} - /** @name SpCoreEcdsaSignature (369) */ + /** @name SpCoreEcdsaSignature (370) */ interface SpCoreEcdsaSignature extends U8aFixed {} - /** @name FrameSystemExtensionsCheckNonZeroSender (372) */ + /** @name FrameSystemExtensionsCheckNonZeroSender (373) */ type FrameSystemExtensionsCheckNonZeroSender = Null; - /** @name FrameSystemExtensionsCheckSpecVersion (373) */ + /** @name FrameSystemExtensionsCheckSpecVersion (374) */ type FrameSystemExtensionsCheckSpecVersion = Null; - /** @name FrameSystemExtensionsCheckTxVersion (374) */ + /** @name FrameSystemExtensionsCheckTxVersion (375) */ type FrameSystemExtensionsCheckTxVersion = Null; - /** @name FrameSystemExtensionsCheckGenesis (375) */ + /** @name FrameSystemExtensionsCheckGenesis (376) */ type FrameSystemExtensionsCheckGenesis = Null; - /** @name FrameSystemExtensionsCheckNonce (378) */ + /** @name FrameSystemExtensionsCheckNonce (379) */ interface FrameSystemExtensionsCheckNonce extends Compact {} - /** @name FrameSystemExtensionsCheckWeight (379) */ + /** @name FrameSystemExtensionsCheckWeight (380) */ type FrameSystemExtensionsCheckWeight = Null; - /** @name PalletTransactionPaymentChargeTransactionPayment (380) */ + /** @name PalletTransactionPaymentChargeTransactionPayment (381) */ interface PalletTransactionPaymentChargeTransactionPayment extends Compact {} - /** @name DanceboxRuntimeRuntime (381) */ + /** @name DanceboxRuntimeRuntime (382) */ type DanceboxRuntimeRuntime = Null; } // declare module From a3b77c92cc13627bb42c08bbd9e7dab3a06abd42 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 17 Oct 2023 12:15:20 +0200 Subject: [PATCH 42/52] Fix tests zombie_tanssi_rotation --- test/suites/rotation-para/test_rotation.ts | 58 +++++++++++++--------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/test/suites/rotation-para/test_rotation.ts b/test/suites/rotation-para/test_rotation.ts index a226d498d..70511bedf 100644 --- a/test/suites/rotation-para/test_rotation.ts +++ b/test/suites/rotation-para/test_rotation.ts @@ -20,6 +20,7 @@ describeSuite({ let container2001Api: ApiPromise; let ethersSigner: Signer; let assignment3; + let assignment4; let assignment5; let allCollators: string[]; let collatorName: Record; @@ -89,7 +90,8 @@ describeSuite({ it({ id: "T02", - title: "Set 1 collator per parachain", + title: "Set 1 collator per parachain, and full_rotation every session", + timeout: 60000, test: async function () { const keyring = new Keyring({ type: "sr25519" }); const alice = keyring.addFromUri("//Alice", { name: "Alice default" }); @@ -97,8 +99,9 @@ describeSuite({ const tx1 = await paraApi.tx.configuration.setCollatorsPerContainer(1); const tx2 = await paraApi.tx.configuration.setMinOrchestratorCollators(1); const tx3 = await paraApi.tx.configuration.setMaxOrchestratorCollators(1); - const tx123 = paraApi.tx.utility.batchAll([tx1, tx2, tx3]); - await signAndSendAndInclude(paraApi.tx.sudo.sudo(tx123), alice); + const tx4 = await paraApi.tx.configuration.setFullRotationPeriod(1); + const tx1234 = paraApi.tx.utility.batchAll([tx1, tx2, tx3, tx4]); + await signAndSendAndInclude(paraApi.tx.sudo.sudo(tx1234), alice); }, }); @@ -229,7 +232,7 @@ describeSuite({ it({ id: "T11", title: "Transactions can be made with ethers", - timeout: 30000, + timeout: 60000, test: async function () { const randomAccount = generateKeyringPair(); const tx = await createTransfer(context, randomAccount.address, 1_000_000_000_000, { @@ -266,24 +269,19 @@ describeSuite({ }); it({ id: "T13", - title: "On session 4 collators start syncing the new chains", + title: "On session 3 collators start syncing the new chains", timeout: 90000, test: async function () { - await waitToSession(context, paraApi, 4); - - // The node detects assignment when the block is finalized, but "waitSessions" ignores finality. - // So wait a few blocks more hoping that the current block will be finalized by then. - await context.waitBlock(3, "Tanssi"); const futureAssignment = await paraApi.query.collatorAssignment.pendingCollatorContainerChain(); // The assignment is random, so there is a small chance that it will be the same, // and in that case this test shouldn't fail if (futureAssignment.isNone) { - assignment5 = assignment3; + assignment4 = assignment3; } else { - assignment5 = futureAssignment.toJSON(); + assignment4 = futureAssignment.toJSON(); } - console.log("assignment session 5:"); - logAssignment(collatorName, assignment5); + console.log("assignment session 4:"); + logAssignment(collatorName, assignment4); // First, check that nodes are still running in their previously assigned chain const oldC2000 = collatorName[assignment3.containerChains[2000][0]]; @@ -298,8 +296,8 @@ describeSuite({ expect(await directoryExists(oldContainer2001DbPath)).to.be.true; // Check that new assigned collators have started syncing - const c2000 = collatorName[assignment5.containerChains[2000][0]]; - const c2001 = collatorName[assignment5.containerChains[2001][0]]; + const c2000 = collatorName[assignment4.containerChains[2000][0]]; + const c2001 = collatorName[assignment4.containerChains[2001][0]]; let unassignedCollators = getUnassignedCollators(allCollators, [c2000, c2001]); // Remove old collators because they will still have some chains running unassignedCollators = unassignedCollators.filter((x) => x !== oldC2000); @@ -321,12 +319,22 @@ describeSuite({ }); it({ id: "T14", - title: "On session 5 collators stop the previously assigned chains", + title: "On session 4 collators stop the previously assigned chains", timeout: 90000, test: async function () { - await waitToSession(context, paraApi, 5); + await waitToSession(context, paraApi, 4); const assignment = await paraApi.query.collatorAssignment.collatorContainerChain(); - expect(assignment.toJSON()).to.deep.equal(assignment5); + expect(assignment.toJSON()).to.deep.equal(assignment4); + const futureAssignment = await paraApi.query.collatorAssignment.pendingCollatorContainerChain(); + // The assignment is random, so there is a small chance that it will be the same, + // and in that case this test shouldn't fail + if (futureAssignment.isNone) { + assignment5 = assignment4; + } else { + assignment5 = futureAssignment.toJSON(); + } + console.log("assignment session 5:"); + logAssignment(collatorName, assignment5); // The node detects assignment when the block is finalized, but "waitSessions" ignores finality. // So wait a few blocks more hoping that the current block will be finalized by then. @@ -336,8 +344,10 @@ describeSuite({ // First, check that nodes have stopped in their previously assigned chain const oldC2000 = collatorName[assignment3.containerChains[2000][0]]; const oldC2001 = collatorName[assignment3.containerChains[2001][0]]; - const c2000 = collatorName[assignment5.containerChains[2000][0]]; - const c2001 = collatorName[assignment5.containerChains[2001][0]]; + const c2000 = collatorName[assignment4.containerChains[2000][0]]; + const c2001 = collatorName[assignment4.containerChains[2001][0]]; + const futc2000 = collatorName[assignment5.containerChains[2000][0]]; + const futc2001 = collatorName[assignment5.containerChains[2001][0]]; const oldContainer2000DbPath = getTmpZombiePath() + `/${oldC2000}/data/containers/chains/simple_container_2000/db/full-container-2000`; @@ -345,15 +355,15 @@ describeSuite({ getTmpZombiePath() + `/${oldC2001}/data/containers/chains/frontier_container_2001/db/full-container-2001`; // Edge case: collators may be assigned to the same chain, in that case the directory will still exist - if (oldC2000 != c2000) { + if (oldC2000 != c2000 && oldC2000 != futc2000) { expect(await directoryExists(oldContainer2000DbPath)).to.be.false; } - if (oldC2001 != c2001) { + if (oldC2001 != c2001 && oldC2001 != futc2001) { expect(await directoryExists(oldContainer2001DbPath)).to.be.false; } // Check that new assigned collators are running - const unassignedCollators = getUnassignedCollators(allCollators, [c2000, c2001]); + const unassignedCollators = getUnassignedCollators(allCollators, [c2000, c2001, futc2000, futc2001]); // Verify that collators have container chain running by looking at db path, // and unassignedCollators should not have any db path From f6bcc3711c170e38c8701f2cb0efbedd437dca9a Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 17 Oct 2023 12:50:00 +0200 Subject: [PATCH 43/52] augment-api --- .../dancebox/interfaces/augment-api-query.ts | 19 ---- .../src/dancebox/interfaces/lookup.ts | 85 +++++++++--------- .../src/dancebox/interfaces/registry.ts | 2 - .../src/dancebox/interfaces/types-lookup.ts | 86 +++++++++---------- 4 files changed, 78 insertions(+), 114 deletions(-) diff --git a/typescript-api/src/dancebox/interfaces/augment-api-query.ts b/typescript-api/src/dancebox/interfaces/augment-api-query.ts index 40d96455f..96e3286c5 100644 --- a/typescript-api/src/dancebox/interfaces/augment-api-query.ts +++ b/typescript-api/src/dancebox/interfaces/augment-api-query.ts @@ -33,7 +33,6 @@ import type { PalletBalancesIdAmount, PalletBalancesReserveData, PalletConfigurationHostConfiguration, - PalletInitializerBufferedSessionChange, PalletPooledStakingCandidateEligibleCandidate, PalletPooledStakingPendingOperationKey, PalletPooledStakingPoolsKey, @@ -263,24 +262,6 @@ declare module "@polkadot/api-base/types/storage" { /** Generic query */ [key: string]: QueryableStorageEntry; }; - initializer: { - /** - * Buffered session changes along with the block number at which they should be applied. - * - * Typically this will be empty or one element long. Apart from that this item never hits the storage. - * - * However this is a `Vec` regardless to handle various edge cases that may occur at runtime upgrade boundaries or - * if governance intervenes. - */ - bufferedSessionChanges: AugmentedQuery< - ApiType, - () => Observable>, - [] - > & - QueryableStorageEntry; - /** Generic query */ - [key: string]: QueryableStorageEntry; - }; invulnerables: { /** The invulnerable, permissioned collators. This list must be sorted. */ invulnerables: AugmentedQuery Observable>, []> & diff --git a/typescript-api/src/dancebox/interfaces/lookup.ts b/typescript-api/src/dancebox/interfaces/lookup.ts index cf81f426d..ed58dd3e2 100644 --- a/typescript-api/src/dancebox/interfaces/lookup.ts +++ b/typescript-api/src/dancebox/interfaces/lookup.ts @@ -2435,19 +2435,12 @@ export default { orchestratorChain: "Vec", containerChains: "BTreeMap>", }, - /** Lookup295: pallet_initializer::pallet::BufferedSessionChange */ - PalletInitializerBufferedSessionChange: { - changed: "bool", - validators: "Vec<(AccountId32,NimbusPrimitivesNimbusCryptoPublic)>", - queued: "Vec<(AccountId32,NimbusPrimitivesNimbusCryptoPublic)>", - sessionIndex: "u32", - }, - /** Lookup298: pallet_author_noting::pallet::ContainerChainBlockInfo */ + /** Lookup295: pallet_author_noting::pallet::ContainerChainBlockInfo */ PalletAuthorNotingContainerChainBlockInfo: { blockNumber: "u32", author: "AccountId32", }, - /** Lookup299: pallet_author_noting::pallet::Error */ + /** Lookup296: pallet_author_noting::pallet::Error */ PalletAuthorNotingError: { _enum: [ "FailedReading", @@ -2459,31 +2452,31 @@ export default { "NonAuraDigest", ], }, - /** Lookup300: tp_collator_assignment::AssignedCollators */ + /** Lookup297: tp_collator_assignment::AssignedCollators */ TpCollatorAssignmentAssignedCollatorsPublic: { orchestratorChain: "Vec", containerChains: "BTreeMap>", }, - /** Lookup306: pallet_invulnerables::pallet::Error */ + /** Lookup303: pallet_invulnerables::pallet::Error */ PalletInvulnerablesError: { _enum: ["TooManyInvulnerables", "AlreadyInvulnerable", "NotInvulnerable"], }, - /** Lookup311: sp_core::crypto::KeyTypeId */ + /** Lookup308: sp_core::crypto::KeyTypeId */ SpCoreCryptoKeyTypeId: "[u8;4]", - /** Lookup312: pallet_session::pallet::Error */ + /** Lookup309: pallet_session::pallet::Error */ PalletSessionError: { _enum: ["InvalidProof", "NoAssociatedValidatorId", "DuplicatedKey", "NoKeys", "NoAccount"], }, - /** Lookup316: pallet_author_inherent::pallet::Error */ + /** Lookup313: pallet_author_inherent::pallet::Error */ PalletAuthorInherentError: { _enum: ["AuthorAlreadySet", "NoAccountId", "CannotBeAuthor"], }, - /** Lookup318: pallet_pooled_staking::candidate::EligibleCandidate */ + /** Lookup315: pallet_pooled_staking::candidate::EligibleCandidate */ PalletPooledStakingCandidateEligibleCandidate: { candidate: "AccountId32", stake: "u128", }, - /** Lookup321: pallet_pooled_staking::pallet::PoolsKey */ + /** Lookup318: pallet_pooled_staking::pallet::PoolsKey */ PalletPooledStakingPoolsKey: { _enum: { CandidateTotalStake: "Null", @@ -2525,7 +2518,7 @@ export default { }, }, }, - /** Lookup323: pallet_pooled_staking::pallet::Error */ + /** Lookup320: pallet_pooled_staking::pallet::Error */ PalletPooledStakingError: { _enum: { InvalidPalletSetting: "Null", @@ -2544,21 +2537,21 @@ export default { SwapResultsInZeroShares: "Null", }, }, - /** Lookup325: cumulus_pallet_xcmp_queue::InboundChannelDetails */ + /** Lookup322: cumulus_pallet_xcmp_queue::InboundChannelDetails */ CumulusPalletXcmpQueueInboundChannelDetails: { sender: "u32", state: "CumulusPalletXcmpQueueInboundState", messageMetadata: "Vec<(u32,PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat)>", }, - /** Lookup326: cumulus_pallet_xcmp_queue::InboundState */ + /** Lookup323: cumulus_pallet_xcmp_queue::InboundState */ CumulusPalletXcmpQueueInboundState: { _enum: ["Ok", "Suspended"], }, - /** Lookup329: polkadot_parachain_primitives::primitives::XcmpMessageFormat */ + /** Lookup326: polkadot_parachain_primitives::primitives::XcmpMessageFormat */ PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat: { _enum: ["ConcatenatedVersionedXcm", "ConcatenatedEncodedBlob", "Signals"], }, - /** Lookup332: cumulus_pallet_xcmp_queue::OutboundChannelDetails */ + /** Lookup329: cumulus_pallet_xcmp_queue::OutboundChannelDetails */ CumulusPalletXcmpQueueOutboundChannelDetails: { recipient: "u32", state: "CumulusPalletXcmpQueueOutboundState", @@ -2566,11 +2559,11 @@ export default { firstIndex: "u16", lastIndex: "u16", }, - /** Lookup333: cumulus_pallet_xcmp_queue::OutboundState */ + /** Lookup330: cumulus_pallet_xcmp_queue::OutboundState */ CumulusPalletXcmpQueueOutboundState: { _enum: ["Ok", "Suspended"], }, - /** Lookup335: cumulus_pallet_xcmp_queue::QueueConfigData */ + /** Lookup332: cumulus_pallet_xcmp_queue::QueueConfigData */ CumulusPalletXcmpQueueQueueConfigData: { suspendThreshold: "u32", dropThreshold: "u32", @@ -2579,27 +2572,27 @@ export default { weightRestrictDecay: "SpWeightsWeightV2Weight", xcmpMaxIndividualWeight: "SpWeightsWeightV2Weight", }, - /** Lookup337: cumulus_pallet_xcmp_queue::pallet::Error */ + /** Lookup334: cumulus_pallet_xcmp_queue::pallet::Error */ CumulusPalletXcmpQueueError: { _enum: ["FailedToSend", "BadXcmOrigin", "BadXcm", "BadOverweightIndex", "WeightOverLimit"], }, - /** Lookup338: cumulus_pallet_xcm::pallet::Error */ + /** Lookup335: cumulus_pallet_xcm::pallet::Error */ CumulusPalletXcmError: "Null", - /** Lookup339: cumulus_pallet_dmp_queue::ConfigData */ + /** Lookup336: cumulus_pallet_dmp_queue::ConfigData */ CumulusPalletDmpQueueConfigData: { maxIndividual: "SpWeightsWeightV2Weight", }, - /** Lookup340: cumulus_pallet_dmp_queue::PageIndexData */ + /** Lookup337: cumulus_pallet_dmp_queue::PageIndexData */ CumulusPalletDmpQueuePageIndexData: { beginUsed: "u32", endUsed: "u32", overweightCount: "u64", }, - /** Lookup343: cumulus_pallet_dmp_queue::pallet::Error */ + /** Lookup340: cumulus_pallet_dmp_queue::pallet::Error */ CumulusPalletDmpQueueError: { _enum: ["Unknown", "OverLimit"], }, - /** Lookup344: pallet_xcm::pallet::QueryStatus */ + /** Lookup341: pallet_xcm::pallet::QueryStatus */ PalletXcmQueryStatus: { _enum: { Pending: { @@ -2618,7 +2611,7 @@ export default { }, }, }, - /** Lookup348: staging_xcm::VersionedResponse */ + /** Lookup345: staging_xcm::VersionedResponse */ StagingXcmVersionedResponse: { _enum: { __Unused0: "Null", @@ -2627,7 +2620,7 @@ export default { V3: "StagingXcmV3Response", }, }, - /** Lookup354: pallet_xcm::pallet::VersionMigrationStage */ + /** Lookup351: pallet_xcm::pallet::VersionMigrationStage */ PalletXcmVersionMigrationStage: { _enum: { MigrateSupportedVersion: "Null", @@ -2636,7 +2629,7 @@ export default { MigrateAndNotifyOldTargets: "Null", }, }, - /** Lookup356: staging_xcm::VersionedAssetId */ + /** Lookup353: staging_xcm::VersionedAssetId */ StagingXcmVersionedAssetId: { _enum: { __Unused0: "Null", @@ -2645,14 +2638,14 @@ export default { V3: "StagingXcmV3MultiassetAssetId", }, }, - /** Lookup357: pallet_xcm::pallet::RemoteLockedFungibleRecord */ + /** Lookup354: pallet_xcm::pallet::RemoteLockedFungibleRecord */ PalletXcmRemoteLockedFungibleRecord: { amount: "u128", owner: "StagingXcmVersionedMultiLocation", locker: "StagingXcmVersionedMultiLocation", consumers: "Vec<(Null,u128)>", }, - /** Lookup364: pallet_xcm::pallet::Error */ + /** Lookup361: pallet_xcm::pallet::Error */ PalletXcmError: { _enum: [ "Unreachable", @@ -2677,7 +2670,7 @@ export default { "InUse", ], }, - /** Lookup366: sp_runtime::MultiSignature */ + /** Lookup363: sp_runtime::MultiSignature */ SpRuntimeMultiSignature: { _enum: { Ed25519: "SpCoreEd25519Signature", @@ -2685,26 +2678,26 @@ export default { Ecdsa: "SpCoreEcdsaSignature", }, }, - /** Lookup367: sp_core::ed25519::Signature */ + /** Lookup364: sp_core::ed25519::Signature */ SpCoreEd25519Signature: "[u8;64]", - /** Lookup369: sp_core::sr25519::Signature */ + /** Lookup366: sp_core::sr25519::Signature */ SpCoreSr25519Signature: "[u8;64]", - /** Lookup370: sp_core::ecdsa::Signature */ + /** Lookup367: sp_core::ecdsa::Signature */ SpCoreEcdsaSignature: "[u8;65]", - /** Lookup373: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ + /** Lookup370: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ FrameSystemExtensionsCheckNonZeroSender: "Null", - /** Lookup374: frame_system::extensions::check_spec_version::CheckSpecVersion */ + /** Lookup371: frame_system::extensions::check_spec_version::CheckSpecVersion */ FrameSystemExtensionsCheckSpecVersion: "Null", - /** Lookup375: frame_system::extensions::check_tx_version::CheckTxVersion */ + /** Lookup372: frame_system::extensions::check_tx_version::CheckTxVersion */ FrameSystemExtensionsCheckTxVersion: "Null", - /** Lookup376: frame_system::extensions::check_genesis::CheckGenesis */ + /** Lookup373: frame_system::extensions::check_genesis::CheckGenesis */ FrameSystemExtensionsCheckGenesis: "Null", - /** Lookup379: frame_system::extensions::check_nonce::CheckNonce */ + /** Lookup376: frame_system::extensions::check_nonce::CheckNonce */ FrameSystemExtensionsCheckNonce: "Compact", - /** Lookup380: frame_system::extensions::check_weight::CheckWeight */ + /** Lookup377: frame_system::extensions::check_weight::CheckWeight */ FrameSystemExtensionsCheckWeight: "Null", - /** Lookup381: pallet_transaction_payment::ChargeTransactionPayment */ + /** Lookup378: pallet_transaction_payment::ChargeTransactionPayment */ PalletTransactionPaymentChargeTransactionPayment: "Compact", - /** Lookup382: dancebox_runtime::Runtime */ + /** Lookup379: dancebox_runtime::Runtime */ DanceboxRuntimeRuntime: "Null", }; diff --git a/typescript-api/src/dancebox/interfaces/registry.ts b/typescript-api/src/dancebox/interfaces/registry.ts index 48054b0c6..51fc1a9f6 100644 --- a/typescript-api/src/dancebox/interfaces/registry.ts +++ b/typescript-api/src/dancebox/interfaces/registry.ts @@ -83,7 +83,6 @@ import type { PalletConfigurationCall, PalletConfigurationError, PalletConfigurationHostConfiguration, - PalletInitializerBufferedSessionChange, PalletInvulnerablesCall, PalletInvulnerablesError, PalletInvulnerablesEvent, @@ -298,7 +297,6 @@ declare module "@polkadot/types/types/registry" { PalletConfigurationCall: PalletConfigurationCall; PalletConfigurationError: PalletConfigurationError; PalletConfigurationHostConfiguration: PalletConfigurationHostConfiguration; - PalletInitializerBufferedSessionChange: PalletInitializerBufferedSessionChange; PalletInvulnerablesCall: PalletInvulnerablesCall; PalletInvulnerablesError: PalletInvulnerablesError; PalletInvulnerablesEvent: PalletInvulnerablesEvent; diff --git a/typescript-api/src/dancebox/interfaces/types-lookup.ts b/typescript-api/src/dancebox/interfaces/types-lookup.ts index eb1e7acd4..6bdb78493 100644 --- a/typescript-api/src/dancebox/interfaces/types-lookup.ts +++ b/typescript-api/src/dancebox/interfaces/types-lookup.ts @@ -3333,21 +3333,13 @@ declare module "@polkadot/types/lookup" { readonly containerChains: BTreeMap>; } - /** @name PalletInitializerBufferedSessionChange (295) */ - interface PalletInitializerBufferedSessionChange extends Struct { - readonly changed: bool; - readonly validators: Vec>; - readonly queued: Vec>; - readonly sessionIndex: u32; - } - - /** @name PalletAuthorNotingContainerChainBlockInfo (298) */ + /** @name PalletAuthorNotingContainerChainBlockInfo (295) */ interface PalletAuthorNotingContainerChainBlockInfo extends Struct { readonly blockNumber: u32; readonly author: AccountId32; } - /** @name PalletAuthorNotingError (299) */ + /** @name PalletAuthorNotingError (296) */ interface PalletAuthorNotingError extends Enum { readonly isFailedReading: boolean; readonly isFailedDecodingHeader: boolean; @@ -3366,13 +3358,13 @@ declare module "@polkadot/types/lookup" { | "NonAuraDigest"; } - /** @name TpCollatorAssignmentAssignedCollatorsPublic (300) */ + /** @name TpCollatorAssignmentAssignedCollatorsPublic (297) */ interface TpCollatorAssignmentAssignedCollatorsPublic extends Struct { readonly orchestratorChain: Vec; readonly containerChains: BTreeMap>; } - /** @name PalletInvulnerablesError (306) */ + /** @name PalletInvulnerablesError (303) */ interface PalletInvulnerablesError extends Enum { readonly isTooManyInvulnerables: boolean; readonly isAlreadyInvulnerable: boolean; @@ -3380,10 +3372,10 @@ declare module "@polkadot/types/lookup" { readonly type: "TooManyInvulnerables" | "AlreadyInvulnerable" | "NotInvulnerable"; } - /** @name SpCoreCryptoKeyTypeId (311) */ + /** @name SpCoreCryptoKeyTypeId (308) */ interface SpCoreCryptoKeyTypeId extends U8aFixed {} - /** @name PalletSessionError (312) */ + /** @name PalletSessionError (309) */ interface PalletSessionError extends Enum { readonly isInvalidProof: boolean; readonly isNoAssociatedValidatorId: boolean; @@ -3393,7 +3385,7 @@ declare module "@polkadot/types/lookup" { readonly type: "InvalidProof" | "NoAssociatedValidatorId" | "DuplicatedKey" | "NoKeys" | "NoAccount"; } - /** @name PalletAuthorInherentError (316) */ + /** @name PalletAuthorInherentError (313) */ interface PalletAuthorInherentError extends Enum { readonly isAuthorAlreadySet: boolean; readonly isNoAccountId: boolean; @@ -3401,13 +3393,13 @@ declare module "@polkadot/types/lookup" { readonly type: "AuthorAlreadySet" | "NoAccountId" | "CannotBeAuthor"; } - /** @name PalletPooledStakingCandidateEligibleCandidate (318) */ + /** @name PalletPooledStakingCandidateEligibleCandidate (315) */ interface PalletPooledStakingCandidateEligibleCandidate extends Struct { readonly candidate: AccountId32; readonly stake: u128; } - /** @name PalletPooledStakingPoolsKey (321) */ + /** @name PalletPooledStakingPoolsKey (318) */ interface PalletPooledStakingPoolsKey extends Enum { readonly isCandidateTotalStake: boolean; readonly isJoiningShares: boolean; @@ -3477,7 +3469,7 @@ declare module "@polkadot/types/lookup" { | "LeavingSharesHeldStake"; } - /** @name PalletPooledStakingError (323) */ + /** @name PalletPooledStakingError (320) */ interface PalletPooledStakingError extends Enum { readonly isInvalidPalletSetting: boolean; readonly isDisabledFeature: boolean; @@ -3511,21 +3503,21 @@ declare module "@polkadot/types/lookup" { | "SwapResultsInZeroShares"; } - /** @name CumulusPalletXcmpQueueInboundChannelDetails (325) */ + /** @name CumulusPalletXcmpQueueInboundChannelDetails (322) */ interface CumulusPalletXcmpQueueInboundChannelDetails extends Struct { readonly sender: u32; readonly state: CumulusPalletXcmpQueueInboundState; readonly messageMetadata: Vec>; } - /** @name CumulusPalletXcmpQueueInboundState (326) */ + /** @name CumulusPalletXcmpQueueInboundState (323) */ interface CumulusPalletXcmpQueueInboundState extends Enum { readonly isOk: boolean; readonly isSuspended: boolean; readonly type: "Ok" | "Suspended"; } - /** @name PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat (329) */ + /** @name PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat (326) */ interface PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat extends Enum { readonly isConcatenatedVersionedXcm: boolean; readonly isConcatenatedEncodedBlob: boolean; @@ -3533,7 +3525,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ConcatenatedVersionedXcm" | "ConcatenatedEncodedBlob" | "Signals"; } - /** @name CumulusPalletXcmpQueueOutboundChannelDetails (332) */ + /** @name CumulusPalletXcmpQueueOutboundChannelDetails (329) */ interface CumulusPalletXcmpQueueOutboundChannelDetails extends Struct { readonly recipient: u32; readonly state: CumulusPalletXcmpQueueOutboundState; @@ -3542,14 +3534,14 @@ declare module "@polkadot/types/lookup" { readonly lastIndex: u16; } - /** @name CumulusPalletXcmpQueueOutboundState (333) */ + /** @name CumulusPalletXcmpQueueOutboundState (330) */ interface CumulusPalletXcmpQueueOutboundState extends Enum { readonly isOk: boolean; readonly isSuspended: boolean; readonly type: "Ok" | "Suspended"; } - /** @name CumulusPalletXcmpQueueQueueConfigData (335) */ + /** @name CumulusPalletXcmpQueueQueueConfigData (332) */ interface CumulusPalletXcmpQueueQueueConfigData extends Struct { readonly suspendThreshold: u32; readonly dropThreshold: u32; @@ -3559,7 +3551,7 @@ declare module "@polkadot/types/lookup" { readonly xcmpMaxIndividualWeight: SpWeightsWeightV2Weight; } - /** @name CumulusPalletXcmpQueueError (337) */ + /** @name CumulusPalletXcmpQueueError (334) */ interface CumulusPalletXcmpQueueError extends Enum { readonly isFailedToSend: boolean; readonly isBadXcmOrigin: boolean; @@ -3569,29 +3561,29 @@ declare module "@polkadot/types/lookup" { readonly type: "FailedToSend" | "BadXcmOrigin" | "BadXcm" | "BadOverweightIndex" | "WeightOverLimit"; } - /** @name CumulusPalletXcmError (338) */ + /** @name CumulusPalletXcmError (335) */ type CumulusPalletXcmError = Null; - /** @name CumulusPalletDmpQueueConfigData (339) */ + /** @name CumulusPalletDmpQueueConfigData (336) */ interface CumulusPalletDmpQueueConfigData extends Struct { readonly maxIndividual: SpWeightsWeightV2Weight; } - /** @name CumulusPalletDmpQueuePageIndexData (340) */ + /** @name CumulusPalletDmpQueuePageIndexData (337) */ interface CumulusPalletDmpQueuePageIndexData extends Struct { readonly beginUsed: u32; readonly endUsed: u32; readonly overweightCount: u64; } - /** @name CumulusPalletDmpQueueError (343) */ + /** @name CumulusPalletDmpQueueError (340) */ interface CumulusPalletDmpQueueError extends Enum { readonly isUnknown: boolean; readonly isOverLimit: boolean; readonly type: "Unknown" | "OverLimit"; } - /** @name PalletXcmQueryStatus (344) */ + /** @name PalletXcmQueryStatus (341) */ interface PalletXcmQueryStatus extends Enum { readonly isPending: boolean; readonly asPending: { @@ -3613,7 +3605,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Pending" | "VersionNotifier" | "Ready"; } - /** @name StagingXcmVersionedResponse (348) */ + /** @name StagingXcmVersionedResponse (345) */ interface StagingXcmVersionedResponse extends Enum { readonly isV2: boolean; readonly asV2: StagingXcmV2Response; @@ -3622,7 +3614,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3"; } - /** @name PalletXcmVersionMigrationStage (354) */ + /** @name PalletXcmVersionMigrationStage (351) */ interface PalletXcmVersionMigrationStage extends Enum { readonly isMigrateSupportedVersion: boolean; readonly isMigrateVersionNotifiers: boolean; @@ -3636,14 +3628,14 @@ declare module "@polkadot/types/lookup" { | "MigrateAndNotifyOldTargets"; } - /** @name StagingXcmVersionedAssetId (356) */ + /** @name StagingXcmVersionedAssetId (353) */ interface StagingXcmVersionedAssetId extends Enum { readonly isV3: boolean; readonly asV3: StagingXcmV3MultiassetAssetId; readonly type: "V3"; } - /** @name PalletXcmRemoteLockedFungibleRecord (357) */ + /** @name PalletXcmRemoteLockedFungibleRecord (354) */ interface PalletXcmRemoteLockedFungibleRecord extends Struct { readonly amount: u128; readonly owner: StagingXcmVersionedMultiLocation; @@ -3651,7 +3643,7 @@ declare module "@polkadot/types/lookup" { readonly consumers: Vec>; } - /** @name PalletXcmError (364) */ + /** @name PalletXcmError (361) */ interface PalletXcmError extends Enum { readonly isUnreachable: boolean; readonly isSendFailure: boolean; @@ -3696,7 +3688,7 @@ declare module "@polkadot/types/lookup" { | "InUse"; } - /** @name SpRuntimeMultiSignature (366) */ + /** @name SpRuntimeMultiSignature (363) */ interface SpRuntimeMultiSignature extends Enum { readonly isEd25519: boolean; readonly asEd25519: SpCoreEd25519Signature; @@ -3707,36 +3699,36 @@ declare module "@polkadot/types/lookup" { readonly type: "Ed25519" | "Sr25519" | "Ecdsa"; } - /** @name SpCoreEd25519Signature (367) */ + /** @name SpCoreEd25519Signature (364) */ interface SpCoreEd25519Signature extends U8aFixed {} - /** @name SpCoreSr25519Signature (369) */ + /** @name SpCoreSr25519Signature (366) */ interface SpCoreSr25519Signature extends U8aFixed {} - /** @name SpCoreEcdsaSignature (370) */ + /** @name SpCoreEcdsaSignature (367) */ interface SpCoreEcdsaSignature extends U8aFixed {} - /** @name FrameSystemExtensionsCheckNonZeroSender (373) */ + /** @name FrameSystemExtensionsCheckNonZeroSender (370) */ type FrameSystemExtensionsCheckNonZeroSender = Null; - /** @name FrameSystemExtensionsCheckSpecVersion (374) */ + /** @name FrameSystemExtensionsCheckSpecVersion (371) */ type FrameSystemExtensionsCheckSpecVersion = Null; - /** @name FrameSystemExtensionsCheckTxVersion (375) */ + /** @name FrameSystemExtensionsCheckTxVersion (372) */ type FrameSystemExtensionsCheckTxVersion = Null; - /** @name FrameSystemExtensionsCheckGenesis (376) */ + /** @name FrameSystemExtensionsCheckGenesis (373) */ type FrameSystemExtensionsCheckGenesis = Null; - /** @name FrameSystemExtensionsCheckNonce (379) */ + /** @name FrameSystemExtensionsCheckNonce (376) */ interface FrameSystemExtensionsCheckNonce extends Compact {} - /** @name FrameSystemExtensionsCheckWeight (380) */ + /** @name FrameSystemExtensionsCheckWeight (377) */ type FrameSystemExtensionsCheckWeight = Null; - /** @name PalletTransactionPaymentChargeTransactionPayment (381) */ + /** @name PalletTransactionPaymentChargeTransactionPayment (378) */ interface PalletTransactionPaymentChargeTransactionPayment extends Compact {} - /** @name DanceboxRuntimeRuntime (382) */ + /** @name DanceboxRuntimeRuntime (379) */ type DanceboxRuntimeRuntime = Null; } // declare module From 1223f9b00cd8ad5eb5c4ea49b4a602cbabfa47a5 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 17 Oct 2023 15:07:06 +0200 Subject: [PATCH 44/52] Store randomness from previous relay block in pallet storage Because since #288 collator rotation is handled in on_initialize, and we can only read the relay randomness after the set_validation_data inherent, which happens after on_initialize. The solution is to read the randomness on the on_finalize hook of the previous block, store it in pallet_collator_assignment, and delete it when reading it. --- pallets/collator-assignment/src/lib.rs | 38 ++++++++++++++- pallets/collator-assignment/src/mock.rs | 25 ++++++++-- runtime/dancebox/src/lib.rs | 63 +++++++++++++++---------- runtime/dancebox/tests/common/mod.rs | 10 ++-- 4 files changed, 103 insertions(+), 33 deletions(-) diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index f2eca9f31..f8f29d783 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -45,6 +45,7 @@ pub use pallet::*; use { crate::weights::WeightInfo, frame_support::pallet_prelude::*, + frame_system::pallet_prelude::BlockNumberFor, rand::{seq::SliceRandom, SeedableRng}, rand_chacha::ChaCha20Rng, sp_runtime::{ @@ -93,6 +94,7 @@ pub mod pallet { type HostConfiguration: GetHostConfiguration; type ContainerChains: GetSessionContainerChains; type ShouldRotateAllCollators: ShouldRotateAllCollators; + type GetRandomnessForNextBlock: GetRandomnessForNextBlock>; /// The weight information of this pallet. type WeightInfo: WeightInfo; } @@ -124,6 +126,13 @@ pub mod pallet { pub(crate) type PendingCollatorContainerChain = StorageValue<_, Option>, ValueQuery>; + /// Randomness from previous block. Used to shuffle collators on session change. + /// Should only be set on the last block of each session and should be killed on the on_initialize of the next block. + /// The default value of [0; 32] disables randomness in the pallet. + #[pallet::storage] + #[pallet::getter(fn randomness)] + pub(crate) type Randomness = StorageValue<_, [u8; 32], ValueQuery>; + #[pallet::call] impl Pallet {} @@ -371,9 +380,9 @@ pub mod pallet { pub fn initializer_on_new_session( session_index: &T::SessionIndex, - random_seed: [u8; 32], collators: Vec, ) -> SessionChangeOutcome { + let random_seed = Randomness::::take(); let num_collators = collators.len(); let assigned_collators = Self::assign_collators(session_index, random_seed, collators); let num_parachains = assigned_collators.next_assignment.container_chains.len(); @@ -406,6 +415,28 @@ pub mod pallet { CollatorContainerChain::::put(assigned_collators); } } + + #[pallet::hooks] + impl Hooks> for Pallet { + fn on_initialize(n: BlockNumberFor) -> Weight { + let mut weight = Weight::zero(); + + // Account reads and writes for on_finalize + if T::GetRandomnessForNextBlock::should_end_session(n.saturating_add(One::one())) { + weight += T::DbWeight::get().reads_writes(1, 1); + } + + weight + } + + fn on_finalize(n: BlockNumberFor) { + // If the next block is a session change, read randomness and store in pallet storage + if T::GetRandomnessForNextBlock::should_end_session(n.saturating_add(One::one())) { + let random_seed = T::GetRandomnessForNextBlock::get_randomness(); + Randomness::::put(random_seed); + } + } + } } pub struct RotateCollatorsEveryNSessions(PhantomData); @@ -418,3 +449,8 @@ where session_index % Period::get() == 0 } } + +pub trait GetRandomnessForNextBlock { + fn should_end_session(block_number: BlockNumber) -> bool; + fn get_randomness() -> [u8; 32]; +} diff --git a/pallets/collator-assignment/src/mock.rs b/pallets/collator-assignment/src/mock.rs index 9aac5a0a9..b6c9b721f 100644 --- a/pallets/collator-assignment/src/mock.rs +++ b/pallets/collator-assignment/src/mock.rs @@ -14,8 +14,13 @@ // You should have received a copy of the GNU General Public License // along with Tanssi. If not, see +use frame_support::traits::Hooks; + use { - crate::{self as pallet_collator_assignment, RotateCollatorsEveryNSessions}, + crate::{ + self as pallet_collator_assignment, GetRandomnessForNextBlock, + RotateCollatorsEveryNSessions, + }, frame_support::{ parameter_types, traits::{ConstU16, ConstU64}, @@ -161,6 +166,18 @@ impl tp_traits::GetSessionContainerChains for ContainerChainsGetter { } } +pub struct MockGetRandomnessForNextBlock; + +impl GetRandomnessForNextBlock for MockGetRandomnessForNextBlock { + fn should_end_session(n: u64) -> bool { + n % 5 == 0 + } + + fn get_randomness() -> [u8; 32] { + MockData::mock().random_seed + } +} + parameter_types! { pub const CollatorRotationSessionPeriod: u32 = 5; } @@ -171,6 +188,7 @@ impl pallet_collator_assignment::Config for Test { type HostConfiguration = HostConfigurationGetter; type ContainerChains = ContainerChainsGetter; type ShouldRotateAllCollators = RotateCollatorsEveryNSessions; + type GetRandomnessForNextBlock = MockGetRandomnessForNextBlock; type WeightInfo = (); } @@ -193,15 +211,16 @@ pub fn run_to_block(n: u64) { for x in (old_block_number + 1)..=n { System::reset_events(); System::set_block_number(x); - let randomness = MockData::mock().random_seed; + CollatorAssignment::on_initialize(x); if x % session_len == 1 { let session_index = (x / session_len) as u32; CollatorAssignment::initializer_on_new_session( &session_index, - randomness, CollatorsGetter::collators(session_index), ); } + + CollatorAssignment::on_finalize(x); } } diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index 14a50f513..54f3f9b88 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -63,7 +63,7 @@ use { EnsureRoot, }, nimbus_primitives::NimbusId, - pallet_collator_assignment::RotateCollatorsEveryNSessions, + pallet_collator_assignment::{GetRandomnessForNextBlock, RotateCollatorsEveryNSessions}, pallet_pooled_staking::traits::{IsCandidateEligible, Timer}, pallet_registrar_runtime_api::ContainerChainGenesisData, pallet_session::{SessionManager, ShouldEndSession}, @@ -507,26 +507,6 @@ impl pallet_initializer::ApplyNewSession for OwnApplySession { all_validators: Vec<(AccountId, NimbusId)>, queued: Vec<(AccountId, NimbusId)>, ) { - let random_seed = if session_index != 0 { - if let Some(random_hash) = - BabeCurrentBlockRandomnessGetter::get_block_randomness_mixed(b"CollatorAssignment") - { - // Return random_hash as a [u8; 32] instead of a Hash - let mut buf = [0u8; 32]; - let len = sp_std::cmp::min(32, random_hash.as_ref().len()); - buf[..len].copy_from_slice(&random_hash.as_ref()[..len]); - - buf - } else { - // If there is no randomness (e.g when running in dev mode), return [0; 32] - // TODO: smoke test to ensure this never happens in a live network - [0; 32] - } - } else { - // In session 0 (genesis) there is randomness - [0; 32] - }; - // We first initialize Configuration Configuration::initializer_on_new_session(&session_index); // Next: Registrar @@ -537,11 +517,8 @@ impl pallet_initializer::ApplyNewSession for OwnApplySession { let next_collators = queued.iter().map(|(k, _)| k.clone()).collect(); // Next: CollatorAssignment - let assignments = CollatorAssignment::initializer_on_new_session( - &session_index, - random_seed, - next_collators, - ); + let assignments = + CollatorAssignment::initializer_on_new_session(&session_index, next_collators); let queued_id_to_nimbus_map = queued.iter().cloned().collect(); AuthorityAssignment::initializer_on_new_session( @@ -640,6 +617,39 @@ impl Get for ConfigurationCollatorRotationSessionPeriod { } } +pub struct BabeGetRandomnessForNextBlock; + +impl GetRandomnessForNextBlock for BabeGetRandomnessForNextBlock { + fn should_end_session(n: u32) -> bool { + ::ShouldEndSession::should_end_session(n) + } + + fn get_randomness() -> [u8; 32] { + let block_number = System::block_number(); + let random_seed = if block_number != 0 { + if let Some(random_hash) = + BabeCurrentBlockRandomnessGetter::get_block_randomness_mixed(b"CollatorAssignment") + { + // Return random_hash as a [u8; 32] instead of a Hash + let mut buf = [0u8; 32]; + let len = sp_std::cmp::min(32, random_hash.as_ref().len()); + buf[..len].copy_from_slice(&random_hash.as_ref()[..len]); + + buf + } else { + // If there is no randomness (e.g when running in dev mode), return [0; 32] + // TODO: smoke test to ensure this never happens in a live network + [0; 32] + } + } else { + // In block 0 (genesis) there is randomness + [0; 32] + }; + + random_seed + } +} + impl pallet_collator_assignment::Config for Runtime { type RuntimeEvent = RuntimeEvent; type HostConfiguration = Configuration; @@ -647,6 +657,7 @@ impl pallet_collator_assignment::Config for Runtime { type SessionIndex = u32; type ShouldRotateAllCollators = RotateCollatorsEveryNSessions; + type GetRandomnessForNextBlock = BabeGetRandomnessForNextBlock; type WeightInfo = pallet_collator_assignment::weights::SubstrateWeight; } diff --git a/runtime/dancebox/tests/common/mod.rs b/runtime/dancebox/tests/common/mod.rs index 768078711..79b2428ea 100644 --- a/runtime/dancebox/tests/common/mod.rs +++ b/runtime/dancebox/tests/common/mod.rs @@ -17,7 +17,9 @@ use { cumulus_primitives_core::{ParaId, PersistedValidationData}, cumulus_primitives_parachain_inherent::ParachainInherentData, - dancebox_runtime::{AuthorInherent, AuthorityAssignment, MaxLengthTokenSymbol}, + dancebox_runtime::{ + AuthorInherent, AuthorityAssignment, CollatorAssignment, MaxLengthTokenSymbol, + }, frame_support::{ assert_ok, traits::{OnFinalize, OnInitialize}, @@ -78,16 +80,18 @@ pub fn run_to_block(n: u32) { ); // Initialize the new block - Session::on_initialize(System::block_number()); + CollatorAssignment::on_initialize(System::block_number()); Initializer::on_initialize(System::block_number()); + Session::on_initialize(System::block_number()); AuthorInherent::on_initialize(System::block_number()); pallet_author_inherent::Pallet::::kick_off_authorship_validation(None.into()) .expect("author inherent to dispatch correctly"); // Finalize the block - Session::on_finalize(System::block_number()); + CollatorAssignment::on_finalize(System::block_number()); Initializer::on_finalize(System::block_number()); + Session::on_finalize(System::block_number()); AuthorInherent::on_finalize(System::block_number()); } } From 0d6d67f3afbc480980aa2d1c0f6e3edc6f0d3577 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 17 Oct 2023 15:10:00 +0200 Subject: [PATCH 45/52] augment-api --- typescript-api/src/dancebox/interfaces/augment-api-query.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/typescript-api/src/dancebox/interfaces/augment-api-query.ts b/typescript-api/src/dancebox/interfaces/augment-api-query.ts index 96e3286c5..d1f4abdee 100644 --- a/typescript-api/src/dancebox/interfaces/augment-api-query.ts +++ b/typescript-api/src/dancebox/interfaces/augment-api-query.ts @@ -205,6 +205,12 @@ declare module "@polkadot/api-base/types/storage" { [] > & QueryableStorageEntry; + /** + * Randomness from previous block. Used to shuffle collators on session change. Should only be set on the last + * block of each session and should be killed on the on_initialize of the next block. The default value of [0; 32] + * disables randomness in the pallet. + */ + randomness: AugmentedQuery Observable, []> & QueryableStorageEntry; /** Generic query */ [key: string]: QueryableStorageEntry; }; From 5de5bc6d1c7be870b456a6c9ed4eade36057f4e6 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 17 Oct 2023 15:56:36 +0200 Subject: [PATCH 46/52] Fix benchmarks --- pallets/collator-assignment/src/benchmarking.rs | 3 ++- pallets/collator-assignment/src/mock.rs | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pallets/collator-assignment/src/benchmarking.rs b/pallets/collator-assignment/src/benchmarking.rs index f2b876c9c..851fbdfd3 100644 --- a/pallets/collator-assignment/src/benchmarking.rs +++ b/pallets/collator-assignment/src/benchmarking.rs @@ -85,10 +85,11 @@ mod benchmarks { >::put(&old_assigned); // Do not use [0; 32] because that seed will not shuffle the list of collators let random_seed = [1; 32]; + >::put(random_seed); #[block] { - >::initializer_on_new_session(&session_index, random_seed, collators); + >::initializer_on_new_session(&session_index, collators); } // Assignment changed diff --git a/pallets/collator-assignment/src/mock.rs b/pallets/collator-assignment/src/mock.rs index b6c9b721f..db2e8f5bd 100644 --- a/pallets/collator-assignment/src/mock.rs +++ b/pallets/collator-assignment/src/mock.rs @@ -14,8 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Tanssi. If not, see -use frame_support::traits::Hooks; - use { crate::{ self as pallet_collator_assignment, GetRandomnessForNextBlock, @@ -23,7 +21,7 @@ use { }, frame_support::{ parameter_types, - traits::{ConstU16, ConstU64}, + traits::{ConstU16, ConstU64, Hooks}, }, frame_system as system, parity_scale_codec::{Decode, Encode}, From 8697c519ffc2c0bda2c58c616451f8c081260744 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 17 Oct 2023 18:44:09 +0200 Subject: [PATCH 47/52] Change para-rotation test to rotate every 5 sessions instead of every 1 Rotating every session does not leave enough time for collators to detect their assignment, and some tests result in timeout --- test/suites/rotation-para/test_rotation.ts | 52 +++++++++------------- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/test/suites/rotation-para/test_rotation.ts b/test/suites/rotation-para/test_rotation.ts index 70511bedf..d28356d07 100644 --- a/test/suites/rotation-para/test_rotation.ts +++ b/test/suites/rotation-para/test_rotation.ts @@ -20,7 +20,6 @@ describeSuite({ let container2001Api: ApiPromise; let ethersSigner: Signer; let assignment3; - let assignment4; let assignment5; let allCollators: string[]; let collatorName: Record; @@ -90,7 +89,7 @@ describeSuite({ it({ id: "T02", - title: "Set 1 collator per parachain, and full_rotation every session", + title: "Set 1 collator per parachain, and full_rotation every 5 sessions", timeout: 60000, test: async function () { const keyring = new Keyring({ type: "sr25519" }); @@ -99,7 +98,7 @@ describeSuite({ const tx1 = await paraApi.tx.configuration.setCollatorsPerContainer(1); const tx2 = await paraApi.tx.configuration.setMinOrchestratorCollators(1); const tx3 = await paraApi.tx.configuration.setMaxOrchestratorCollators(1); - const tx4 = await paraApi.tx.configuration.setFullRotationPeriod(1); + const tx4 = await paraApi.tx.configuration.setFullRotationPeriod(5); const tx1234 = paraApi.tx.utility.batchAll([tx1, tx2, tx3, tx4]); await signAndSendAndInclude(paraApi.tx.sudo.sudo(tx1234), alice); }, @@ -269,19 +268,24 @@ describeSuite({ }); it({ id: "T13", - title: "On session 3 collators start syncing the new chains", + title: "On session 4 collators start syncing the new chains", timeout: 90000, test: async function () { + await waitToSession(context, paraApi, 4); + + // The node detects assignment when the block is finalized, but "waitSessions" ignores finality. + // So wait a few blocks more hoping that the current block will be finalized by then. + await context.waitBlock(3, "Tanssi"); const futureAssignment = await paraApi.query.collatorAssignment.pendingCollatorContainerChain(); // The assignment is random, so there is a small chance that it will be the same, // and in that case this test shouldn't fail if (futureAssignment.isNone) { - assignment4 = assignment3; + assignment5 = assignment3; } else { - assignment4 = futureAssignment.toJSON(); + assignment5 = futureAssignment.toJSON(); } - console.log("assignment session 4:"); - logAssignment(collatorName, assignment4); + console.log("assignment session 5:"); + logAssignment(collatorName, assignment5); // First, check that nodes are still running in their previously assigned chain const oldC2000 = collatorName[assignment3.containerChains[2000][0]]; @@ -296,8 +300,8 @@ describeSuite({ expect(await directoryExists(oldContainer2001DbPath)).to.be.true; // Check that new assigned collators have started syncing - const c2000 = collatorName[assignment4.containerChains[2000][0]]; - const c2001 = collatorName[assignment4.containerChains[2001][0]]; + const c2000 = collatorName[assignment5.containerChains[2000][0]]; + const c2001 = collatorName[assignment5.containerChains[2001][0]]; let unassignedCollators = getUnassignedCollators(allCollators, [c2000, c2001]); // Remove old collators because they will still have some chains running unassignedCollators = unassignedCollators.filter((x) => x !== oldC2000); @@ -319,22 +323,12 @@ describeSuite({ }); it({ id: "T14", - title: "On session 4 collators stop the previously assigned chains", + title: "On session 5 collators stop the previously assigned chains", timeout: 90000, test: async function () { - await waitToSession(context, paraApi, 4); + await waitToSession(context, paraApi, 5); const assignment = await paraApi.query.collatorAssignment.collatorContainerChain(); - expect(assignment.toJSON()).to.deep.equal(assignment4); - const futureAssignment = await paraApi.query.collatorAssignment.pendingCollatorContainerChain(); - // The assignment is random, so there is a small chance that it will be the same, - // and in that case this test shouldn't fail - if (futureAssignment.isNone) { - assignment5 = assignment4; - } else { - assignment5 = futureAssignment.toJSON(); - } - console.log("assignment session 5:"); - logAssignment(collatorName, assignment5); + expect(assignment.toJSON()).to.deep.equal(assignment5); // The node detects assignment when the block is finalized, but "waitSessions" ignores finality. // So wait a few blocks more hoping that the current block will be finalized by then. @@ -344,10 +338,8 @@ describeSuite({ // First, check that nodes have stopped in their previously assigned chain const oldC2000 = collatorName[assignment3.containerChains[2000][0]]; const oldC2001 = collatorName[assignment3.containerChains[2001][0]]; - const c2000 = collatorName[assignment4.containerChains[2000][0]]; - const c2001 = collatorName[assignment4.containerChains[2001][0]]; - const futc2000 = collatorName[assignment5.containerChains[2000][0]]; - const futc2001 = collatorName[assignment5.containerChains[2001][0]]; + const c2000 = collatorName[assignment5.containerChains[2000][0]]; + const c2001 = collatorName[assignment5.containerChains[2001][0]]; const oldContainer2000DbPath = getTmpZombiePath() + `/${oldC2000}/data/containers/chains/simple_container_2000/db/full-container-2000`; @@ -355,15 +347,15 @@ describeSuite({ getTmpZombiePath() + `/${oldC2001}/data/containers/chains/frontier_container_2001/db/full-container-2001`; // Edge case: collators may be assigned to the same chain, in that case the directory will still exist - if (oldC2000 != c2000 && oldC2000 != futc2000) { + if (oldC2000 != c2000) { expect(await directoryExists(oldContainer2000DbPath)).to.be.false; } - if (oldC2001 != c2001 && oldC2001 != futc2001) { + if (oldC2001 != c2001) { expect(await directoryExists(oldContainer2001DbPath)).to.be.false; } // Check that new assigned collators are running - const unassignedCollators = getUnassignedCollators(allCollators, [c2000, c2001, futc2000, futc2001]); + const unassignedCollators = getUnassignedCollators(allCollators, [c2000, c2001]); // Verify that collators have container chain running by looking at db path, // and unassignedCollators should not have any db path From b554eedae8cb08ea0d824b2d6103c35e9dc2de40 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 19 Oct 2023 11:36:46 +0200 Subject: [PATCH 48/52] Rewrite migration using get_raw and put_raw --- runtime/dancebox/Cargo.toml | 4 +- runtime/dancebox/src/migrations.rs | 65 ++++++++++++++++++++++++++---- 2 files changed, 59 insertions(+), 10 deletions(-) diff --git a/runtime/dancebox/Cargo.toml b/runtime/dancebox/Cargo.toml index edbc305a1..5b4441cea 100644 --- a/runtime/dancebox/Cargo.toml +++ b/runtime/dancebox/Cargo.toml @@ -10,7 +10,7 @@ version = "0.1.0" targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] -hex-literal = { workspace = true, optional = true } +hex-literal = { workspace = true } log = { workspace = true } parity-scale-codec = { workspace = true, features = [ "derive" ] } scale-info = { workspace = true, features = [ "derive" ] } @@ -102,7 +102,6 @@ container-chain-template-frontier-runtime = { workspace = true, features = [ "s container-chain-template-simple-runtime = { workspace = true, features = [ "std" ] } cumulus-primitives-parachain-inherent = { workspace = true } cumulus-test-relay-sproof-builder = { workspace = true } -hex-literal = { workspace = true } pallet-im-online = { workspace = true, features = [ "std" ] } pallet-message-queue = { workspace = true } pallet-staking = { workspace = true, features = [ "std" ] } @@ -194,7 +193,6 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", - "hex-literal", "pallet-author-noting/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-collator-assignment/runtime-benchmarks", diff --git a/runtime/dancebox/src/migrations.rs b/runtime/dancebox/src/migrations.rs index e88b6d1dd..f1c13407a 100644 --- a/runtime/dancebox/src/migrations.rs +++ b/runtime/dancebox/src/migrations.rs @@ -24,7 +24,7 @@ use frame_support::{ }; use { - crate::{Configuration, Invulnerables, Runtime, RuntimeOrigin, LOG_TARGET}, + crate::{Invulnerables, Runtime, RuntimeOrigin, LOG_TARGET}, pallet_balances::IdAmount, pallet_configuration::weights::WeightInfo as _, pallet_invulnerables::weights::WeightInfo as _, @@ -222,18 +222,69 @@ where fn migrate(&self, _available_weight: Weight) -> Weight { log::info!(target: LOG_TARGET, "migrate"); - Configuration::set_full_rotation_period(RuntimeOrigin::root(), 24u32) - .expect("Failed to set full_rotation_period"); + const CONFIGURATION_ACTIVE_CONFIG_KEY: &[u8] = + &hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385"); + const CONFIGURATION_PENDING_CONFIGS_KEY: &[u8] = + &hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22d53b4123b2e186e07fb7bad5dda5f55c0"); + + // Modify active config + let old_config_bytes = + frame_support::storage::unhashed::get_raw(CONFIGURATION_ACTIVE_CONFIG_KEY) + .expect("configuration.activeConfig should have value"); + assert_eq!(old_config_bytes.len(), 20); + let append_bytes = hex_literal::hex!("18000000"); + let new_config_bytes: Vec = old_config_bytes + .iter() + .chain(append_bytes.iter()) + .copied() + .collect(); + frame_support::storage::unhashed::put_raw( + CONFIGURATION_ACTIVE_CONFIG_KEY, + &new_config_bytes, + ); + + // Modify pending configs, if any + let old_pending_configs: Vec<[u8; 20]> = + frame_support::storage::unhashed::get(CONFIGURATION_PENDING_CONFIGS_KEY) + .unwrap_or_default(); + let mut new_pending_configs: Vec<[u8; 24]> = vec![]; + + for old_config_bytes in old_pending_configs { + let new_config_bytes: Vec = old_config_bytes + .iter() + .chain(append_bytes.iter()) + .copied() + .collect(); + let new_config_bytes: [u8; 24] = new_config_bytes + .try_into() + .expect("20 bytes + 4 bytes == 24 bytes"); + new_pending_configs.push(new_config_bytes); + } + + if !new_pending_configs.is_empty() { + frame_support::storage::unhashed::put( + CONFIGURATION_PENDING_CONFIGS_KEY, + &new_pending_configs, + ); + } + ::WeightInfo::set_config_with_u32() } /// Run a standard pre-runtime test. This works the same way as in a normal runtime upgrade. #[cfg(feature = "try-runtime")] fn pre_upgrade(&self) -> Result, sp_runtime::DispatchError> { - let zero_period = Configuration::config().full_rotation_period; - assert_eq!(zero_period, 0); + const CONFIGURATION_ACTIVE_CONFIG_KEY: &[u8] = + &hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385"); + const CONFIGURATION_PENDING_CONFIGS_KEY: &[u8] = + &hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22d53b4123b2e186e07fb7bad5dda5f55c0"); + + let old_config_bytes = + frame_support::storage::unhashed::get_raw(CONFIGURATION_ACTIVE_CONFIG_KEY) + .expect("configuration.activeConfig should have value"); + assert_eq!(old_config_bytes.len(), 20); - Ok((zero_period).encode()) + Ok((old_config_bytes).encode()) } /// Run a standard post-runtime test. This works the same way as in a normal runtime upgrade. @@ -243,7 +294,7 @@ where number_of_invulnerables: Vec, ) -> Result<(), sp_runtime::DispatchError> { let new_period = Configuration::config().full_rotation_period; - assert_ne!(new_period, 0); + assert_eq!(new_period, 24); Ok(()) } From ac80d4b376b9d1243c289e3582ea2a17155ab00f Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 19 Oct 2023 11:38:34 +0200 Subject: [PATCH 49/52] Rotation period of 0 disables rotation --- pallets/collator-assignment/src/lib.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index f8f29d783..561e4cb01 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -446,7 +446,14 @@ where Period: Get, { fn should_rotate_all_collators(session_index: u32) -> bool { - session_index % Period::get() == 0 + let period = Period::get(); + + if period == 0 { + // A period of 0 disables rotation + false + } else { + session_index % Period::get() == 0 + } } } From 39db625f5a06381f87778e4d72b0832a09d2f7be Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 19 Oct 2023 11:49:37 +0200 Subject: [PATCH 50/52] Fix byte count in migration --- runtime/dancebox/src/migrations.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/dancebox/src/migrations.rs b/runtime/dancebox/src/migrations.rs index f1c13407a..d1502780b 100644 --- a/runtime/dancebox/src/migrations.rs +++ b/runtime/dancebox/src/migrations.rs @@ -231,7 +231,7 @@ where let old_config_bytes = frame_support::storage::unhashed::get_raw(CONFIGURATION_ACTIVE_CONFIG_KEY) .expect("configuration.activeConfig should have value"); - assert_eq!(old_config_bytes.len(), 20); + assert_eq!(old_config_bytes.len(), 16); let append_bytes = hex_literal::hex!("18000000"); let new_config_bytes: Vec = old_config_bytes .iter() @@ -244,6 +244,7 @@ where ); // Modify pending configs, if any + // Pending configs is a `Vec<(u32, HostConfiguration)>`, so 20 bytes instead of 16 let old_pending_configs: Vec<[u8; 20]> = frame_support::storage::unhashed::get(CONFIGURATION_PENDING_CONFIGS_KEY) .unwrap_or_default(); From 2fa1ca1011a4734c4148479fe81d8d5c957b36b5 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 19 Oct 2023 12:33:26 +0200 Subject: [PATCH 51/52] Add integration test for migration --- runtime/dancebox/tests/integration_test.rs | 49 +++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/runtime/dancebox/tests/integration_test.rs b/runtime/dancebox/tests/integration_test.rs index c91b73f43..e051d6968 100644 --- a/runtime/dancebox/tests/integration_test.rs +++ b/runtime/dancebox/tests/integration_test.rs @@ -20,7 +20,10 @@ use { common::*, cumulus_primitives_core::ParaId, dancebox_runtime::{ - migrations::{CollatorSelectionInvulnerablesValue, MigrateInvulnerables}, + migrations::{ + CollatorSelectionInvulnerablesValue, MigrateConfigurationFullRotationPeriod, + MigrateInvulnerables, + }, AuthorNoting, AuthorityAssignment, AuthorityMapping, CollatorAssignment, Configuration, Invulnerables, MinimumSelfDelegation, PooledStaking, Proxy, ProxyType, }, @@ -3638,3 +3641,47 @@ fn test_migration_holds() { assert_eq!(new_holds[0].amount, 100u128); }); } + +#[test] +fn test_migration_config_full_rotation_period() { + ExtBuilder::default() + .with_balances(vec![ + // Alice gets 10k extra tokens for her mapping deposit + (AccountId::from(ALICE), 210_000 * UNIT), + (AccountId::from(BOB), 100_000 * UNIT), + ]) + .with_collators(vec![ + (AccountId::from(ALICE), 210 * UNIT), + (AccountId::from(BOB), 100 * UNIT), + ]) + .with_config(default_config()) + .build() + .execute_with(|| { + const CONFIGURATION_ACTIVE_CONFIG_KEY: &[u8] = + &hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22db4b49d95320d9021994c850f25b8e385"); + const CONFIGURATION_PENDING_CONFIGS_KEY: &[u8] = + &hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22d53b4123b2e186e07fb7bad5dda5f55c0"); + + // Modify active config + frame_support::storage::unhashed::put_raw(CONFIGURATION_ACTIVE_CONFIG_KEY, &hex_literal::hex!("63000000020000000500000002000000")); + // Modify pending configs + frame_support::storage::unhashed::put_raw(CONFIGURATION_PENDING_CONFIGS_KEY, &hex_literal::hex!("08b108000063000000020000000500000002000000b208000064000000020000000500000002000000")); + + let migration = MigrateConfigurationFullRotationPeriod::(Default::default()); + migration.migrate(Default::default()); + + let expected_active = pallet_configuration::HostConfiguration { + max_collators: 99, + min_orchestrator_collators: 2, + max_orchestrator_collators: 5, + collators_per_container: 2, + full_rotation_period: 24, + }; + assert_eq!(Configuration::config(), expected_active); + + let expected_pending = vec![ + (2225, pallet_configuration::HostConfiguration { max_collators: 99, min_orchestrator_collators: 2, max_orchestrator_collators: 5, collators_per_container: 2, full_rotation_period: 24 }), (2226, pallet_configuration::HostConfiguration { max_collators: 100, min_orchestrator_collators: 2, max_orchestrator_collators: 5, collators_per_container: 2, full_rotation_period: 24 }) + ]; + assert_eq!(Configuration::pending_configs(), expected_pending); + }); +} From 3ba29332f07b06b8c542fbd4bf5668e9da619139 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 19 Oct 2023 13:16:36 +0200 Subject: [PATCH 52/52] Rewrite migration using a less hacky approach --- runtime/dancebox/src/migrations.rs | 76 +++++++++++++++++------------- 1 file changed, 43 insertions(+), 33 deletions(-) diff --git a/runtime/dancebox/src/migrations.rs b/runtime/dancebox/src/migrations.rs index d1502780b..e5a649e06 100644 --- a/runtime/dancebox/src/migrations.rs +++ b/runtime/dancebox/src/migrations.rs @@ -19,14 +19,14 @@ //! This module acts as a registry where each migration is defined. Each migration should implement //! the "Migration" trait declared in the pallet-migrations crate. -use frame_support::{ - migration::storage_key_iter, storage::types::StorageValue, weights::Weight, Blake2_128Concat, -}; - use { crate::{Invulnerables, Runtime, RuntimeOrigin, LOG_TARGET}, + frame_support::{ + migration::storage_key_iter, storage::types::StorageValue, weights::Weight, + Blake2_128Concat, + }, pallet_balances::IdAmount, - pallet_configuration::weights::WeightInfo as _, + pallet_configuration::{weights::WeightInfo as _, HostConfiguration}, pallet_invulnerables::weights::WeightInfo as _, pallet_migrations::{GetMigrations, Migration}, sp_core::Get, @@ -34,6 +34,21 @@ use { sp_std::{marker::PhantomData, prelude::*}, }; +#[derive( + Clone, + parity_scale_codec::Encode, + parity_scale_codec::Decode, + PartialEq, + sp_core::RuntimeDebug, + scale_info::TypeInfo, +)] +struct HostConfigurationV0 { + pub max_collators: u32, + pub min_orchestrator_collators: u32, + pub max_orchestrator_collators: u32, + pub collators_per_container: u32, +} + pub struct CollatorSelectionStorageValuePrefix; impl frame_support::traits::StorageInstance for CollatorSelectionStorageValuePrefix { const STORAGE_PREFIX: &'static str = "Invulnerables"; @@ -228,38 +243,33 @@ where &hex_literal::hex!("06de3d8a54d27e44a9d5ce189618f22d53b4123b2e186e07fb7bad5dda5f55c0"); // Modify active config - let old_config_bytes = - frame_support::storage::unhashed::get_raw(CONFIGURATION_ACTIVE_CONFIG_KEY) + let old_config: HostConfigurationV0 = + frame_support::storage::unhashed::get(CONFIGURATION_ACTIVE_CONFIG_KEY) .expect("configuration.activeConfig should have value"); - assert_eq!(old_config_bytes.len(), 16); - let append_bytes = hex_literal::hex!("18000000"); - let new_config_bytes: Vec = old_config_bytes - .iter() - .chain(append_bytes.iter()) - .copied() - .collect(); - frame_support::storage::unhashed::put_raw( - CONFIGURATION_ACTIVE_CONFIG_KEY, - &new_config_bytes, - ); + let new_config = HostConfiguration { + max_collators: old_config.max_collators, + min_orchestrator_collators: old_config.min_orchestrator_collators, + max_orchestrator_collators: old_config.max_orchestrator_collators, + collators_per_container: old_config.collators_per_container, + full_rotation_period: 24, + }; + frame_support::storage::unhashed::put(CONFIGURATION_ACTIVE_CONFIG_KEY, &new_config); // Modify pending configs, if any - // Pending configs is a `Vec<(u32, HostConfiguration)>`, so 20 bytes instead of 16 - let old_pending_configs: Vec<[u8; 20]> = + let old_pending_configs: Vec<(u32, HostConfigurationV0)> = frame_support::storage::unhashed::get(CONFIGURATION_PENDING_CONFIGS_KEY) .unwrap_or_default(); - let mut new_pending_configs: Vec<[u8; 24]> = vec![]; - - for old_config_bytes in old_pending_configs { - let new_config_bytes: Vec = old_config_bytes - .iter() - .chain(append_bytes.iter()) - .copied() - .collect(); - let new_config_bytes: [u8; 24] = new_config_bytes - .try_into() - .expect("20 bytes + 4 bytes == 24 bytes"); - new_pending_configs.push(new_config_bytes); + let mut new_pending_configs: Vec<(u32, HostConfiguration)> = vec![]; + + for (session_index, old_config) in old_pending_configs { + let new_config = HostConfiguration { + max_collators: old_config.max_collators, + min_orchestrator_collators: old_config.min_orchestrator_collators, + max_orchestrator_collators: old_config.max_orchestrator_collators, + collators_per_container: old_config.collators_per_container, + full_rotation_period: 24, + }; + new_pending_configs.push((session_index, new_config)); } if !new_pending_configs.is_empty() { @@ -283,7 +293,7 @@ where let old_config_bytes = frame_support::storage::unhashed::get_raw(CONFIGURATION_ACTIVE_CONFIG_KEY) .expect("configuration.activeConfig should have value"); - assert_eq!(old_config_bytes.len(), 20); + assert_eq!(old_config_bytes.len(), 16); Ok((old_config_bytes).encode()) }