diff --git a/Cargo.lock b/Cargo.lock index 57dfa08f4..61dae56ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9022,9 +9022,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e9ab494af9e6e813c72170f0d3c1de1500990d62c97cc05cc7576f91aa402f" +checksum = "592a28a24b09c9dc20ac8afaa6839abc417c720afe42c12e1e4a9d6aa2508d2e" dependencies = [ "blake2 0.10.6", "crc32fast", @@ -9038,6 +9038,7 @@ dependencies = [ "rand 0.8.5", "siphasher", "snap", + "winapi", ] [[package]] @@ -15193,6 +15194,8 @@ dependencies = [ "cumulus-primitives-core", "frame-support", "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", "sp-std", ] @@ -15441,7 +15444,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand 0.8.5", + "rand 0.7.3", "static_assertions", ] diff --git a/pallets/collator-assignment/src/lib.rs b/pallets/collator-assignment/src/lib.rs index 5df502dec..3cbb01d7c 100644 --- a/pallets/collator-assignment/src/lib.rs +++ b/pallets/collator-assignment/src/lib.rs @@ -166,14 +166,23 @@ pub mod pallet { 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 mut container_chain_ids = + let container_chains = T::ContainerChains::session_container_chains(target_session_index); - let mut parathreads = T::ContainerChains::session_parathreads(target_session_index); - let num_total_registered_paras = container_chain_ids.len() as u32; + let num_total_registered_paras = + (container_chains.parachains.len() + container_chains.parathreads.len()) as u32; + let mut container_chain_ids = container_chains.parachains; + let mut parathreads: Vec<_> = container_chains + .parathreads + .into_iter() + .map(|(para_id, _)| para_id) + .collect(); // Remove the containerChains that do not have enough credits for block production T::RemoveParaIdsWithNoCredits::remove_para_ids_with_no_credits( &mut container_chain_ids, ); + // TODO: parathreads should be treated a bit differently, they don't need to have the same amount of credits + // as paratherads because they will not be producing blocks on every slot. + T::RemoveParaIdsWithNoCredits::remove_para_ids_with_no_credits(&mut parathreads); // If the random_seed is all zeros, we don't shuffle the list of collators nor the list // of container chains. diff --git a/pallets/collator-assignment/src/mock.rs b/pallets/collator-assignment/src/mock.rs index dbe4e095a..b3841e744 100644 --- a/pallets/collator-assignment/src/mock.rs +++ b/pallets/collator-assignment/src/mock.rs @@ -31,7 +31,10 @@ use { BuildStorage, }, sp_std::collections::btree_map::BTreeMap, - tp_traits::{ParaId, RemoveInvulnerables, RemoveParaIdsWithNoCredits}, + tp_traits::{ + ParaId, ParathreadParams, RemoveInvulnerables, RemoveParaIdsWithNoCredits, + SessionContainerChains, + }, tracing_subscriber::{layer::SubscriberExt, FmtSubscriber}, }; @@ -161,22 +164,32 @@ impl GetCollators for CollatorsGetter { pub struct ContainerChainsGetter; impl tp_traits::GetSessionContainerChains for ContainerChainsGetter { - fn session_container_chains(_session_index: u32) -> Vec { - MockData::mock() + fn session_container_chains(_session_index: u32) -> SessionContainerChains { + let parachains = MockData::mock() .container_chains .iter() .cloned() - .map(ParaId::from) - .collect() - } + .map(|para_id| ParaId::from(para_id)) + .collect(); - fn session_parathreads(_session_index: u32) -> Vec { - MockData::mock() + let parathreads = MockData::mock() .parathreads .iter() .cloned() - .map(ParaId::from) - .collect() + .map(|para_id| { + ( + ParaId::from(para_id), + ParathreadParams { + slot_frequency: Default::default(), + }, + ) + }) + .collect(); + + SessionContainerChains { + parachains, + parathreads, + } } #[cfg(feature = "runtime-benchmarks")] diff --git a/pallets/collator-assignment/src/tests.rs b/pallets/collator-assignment/src/tests.rs index 38bc00bcf..ce444c442 100644 --- a/pallets/collator-assignment/src/tests.rs +++ b/pallets/collator-assignment/src/tests.rs @@ -821,18 +821,18 @@ fn assign_collators_rotation_parathreads_are_shuffled() { // 4 collators so we can only assign to one parathread m.collators = vec![1, 2, 3, 4]; - m.parathreads = vec![5001, 5002]; + m.parathreads = vec![3001, 3002]; }); assert_eq!(assigned_collators(), initial_collators(),); run_to_block(11); let initial_assignment = - BTreeMap::from_iter(vec![(1, 1000), (2, 1000), (3, 5001), (4, 5001)]); + BTreeMap::from_iter(vec![(1, 1000), (2, 1000), (3, 3001), (4, 3001)]); assert_eq!(assigned_collators(), initial_assignment,); MockData::mutate(|m| { - // Seed chosen manually to see the case where parathread 5002 is given priority + // Seed chosen manually to see the case where parathread 3002 is given priority m.random_seed = [2; 32]; }); @@ -841,7 +841,7 @@ fn assign_collators_rotation_parathreads_are_shuffled() { // 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, 1000), (2, 5002), (3, 1000), (4, 5002)]); + BTreeMap::from_iter(vec![(1, 1000), (2, 3002), (3, 1000), (4, 3002)]); assert_eq!(assigned_collators(), shuffled_assignment,); }); @@ -1231,3 +1231,57 @@ fn collator_assignment_includes_empty_chains() { assert_eq!(assigned_collators, expected); }); } + +#[test] +fn collator_assignment_remove_parachains_without_credits() { + new_test_ext().execute_with(|| { + run_to_block(1); + + MockData::mutate(|m| { + m.collators_per_container = 2; + m.collators_per_parathread = 2; + m.min_orchestrator_chain_collators = 2; + m.max_orchestrator_chain_collators = 5; + + m.collators = vec![1, 2, 3, 4, 5, 6, 7]; + m.container_chains = vec![2000, 5001, 5002]; + m.parathreads = vec![] + }); + assert_eq!(assigned_collators(), initial_collators(),); + run_to_block(11); + + let assigned_collators = CollatorContainerChain::::get(); + let expected = AssignedCollators { + orchestrator_chain: vec![1, 2, 3, 4, 5], + container_chains: BTreeMap::from_iter(vec![(2000.into(), vec![6, 7])]), + }; + assert_eq!(assigned_collators, expected); + }); +} + +#[test] +fn collator_assignment_remove_parathreads_without_credits() { + new_test_ext().execute_with(|| { + run_to_block(1); + + MockData::mutate(|m| { + m.collators_per_container = 2; + m.collators_per_parathread = 2; + m.min_orchestrator_chain_collators = 2; + m.max_orchestrator_chain_collators = 5; + + m.collators = vec![1, 2, 3, 4, 5, 6, 7]; + m.container_chains = vec![]; + m.parathreads = vec![3000, 5001, 5002] + }); + assert_eq!(assigned_collators(), initial_collators(),); + run_to_block(11); + + let assigned_collators = CollatorContainerChain::::get(); + let expected = AssignedCollators { + orchestrator_chain: vec![1, 2, 3, 4, 5], + container_chains: BTreeMap::from_iter(vec![(3000.into(), vec![6, 7])]), + }; + assert_eq!(assigned_collators, expected); + }); +} diff --git a/pallets/configuration/src/lib.rs b/pallets/configuration/src/lib.rs index 0a7a035ca..724fb4a61 100644 --- a/pallets/configuration/src/lib.rs +++ b/pallets/configuration/src/lib.rs @@ -131,7 +131,7 @@ impl HostConfiguration { if self.max_orchestrator_collators < self.min_orchestrator_collators { return Err(InconsistentError::MaxCollatorsLowerThanMinCollators); } - if self.collators_per_parathread != 1 || self.parathreads_per_collator != 1 { + if self.parathreads_per_collator != 1 { return Err(InconsistentError::UnimplementedParameter); } Ok(()) diff --git a/pallets/registrar/src/benchmarks.rs b/pallets/registrar/src/benchmarks.rs index f684d9ce2..6a1b4591a 100644 --- a/pallets/registrar/src/benchmarks.rs +++ b/pallets/registrar/src/benchmarks.rs @@ -25,7 +25,7 @@ use { sp_core::Get, sp_std::{vec, vec::Vec}, tp_container_chain_genesis_data::{ContainerChainGenesisData, ContainerChainGenesisDataItem}, - tp_traits::ParaId, + tp_traits::{ParaId, SlotFrequency}, }; /// Create a funded user. @@ -355,5 +355,93 @@ mod benchmarks { assert!(Pallet::::registered_para_ids().contains(&ParaId::from(1000))); } + #[benchmark] + fn register_parathread(x: Linear<5, 3_000_000>, y: Linear<1, 50>, z: Linear<1, 10>) { + let mut data = vec![]; + // Number of keys + for _i in 1..z { + data.push((b"code".to_vec(), vec![1; (x / z) as usize]).into()) + } + + let slot_frequency = SlotFrequency::default(); + let storage = new_genesis_data(data); + + for i in 1..y { + // Twice the deposit just in case + let (caller, _deposit_amount) = + create_funded_user::("caller", i, T::DepositAmount::get()); + Pallet::::register_parathread( + RawOrigin::Signed(caller.clone()).into(), + i.into(), + slot_frequency.clone(), + storage.clone(), + ) + .unwrap(); + } + + // We should have registered y-1 + assert_eq!(Pallet::::pending_verification().len(), (y - 1) as usize); + + let (caller, _deposit_amount) = + create_funded_user::("caller", 0, T::DepositAmount::get()); + + #[extrinsic_call] + Pallet::::register_parathread( + RawOrigin::Signed(caller), + Default::default(), + slot_frequency, + storage, + ); + + // verification code + assert_eq!(Pallet::::pending_verification().len(), y as usize); + assert!(Pallet::::registrar_deposit(ParaId::default()).is_some()); + } + + #[benchmark] + fn set_parathread_params(y: Linear<1, 50>) { + let storage = vec![(vec![1; 4], vec![1; 3_000_000usize]).into()]; + let storage = new_genesis_data(storage); + let slot_frequency = SlotFrequency::default(); + + // Deregister all the existing chains to avoid conflicts with the new ones + for para_id in Pallet::::registered_para_ids() { + Pallet::::deregister(RawOrigin::Root.into(), para_id).unwrap(); + } + + for i in 0..y { + // Twice the deposit just in case + let (caller, _deposit_amount) = + create_funded_user::("caller", i, T::DepositAmount::get()); + Pallet::::register_parathread( + RawOrigin::Signed(caller.clone()).into(), + i.into(), + slot_frequency.clone(), + storage.clone(), + ) + .unwrap(); + T::RegistrarHooks::benchmarks_ensure_valid_for_collating(i.into()); + Pallet::::mark_valid_for_collating(RawOrigin::Root.into(), i.into()).unwrap(); + } + + let new_slot_frequency = SlotFrequency { min: 2, max: 2 }; + + #[extrinsic_call] + Pallet::::set_parathread_params( + RawOrigin::Root, + (y - 1).into(), + new_slot_frequency.clone(), + ); + + // Start a new session + Pallet::::initializer_on_new_session(&T::SessionDelay::get()); + + // Check y-1 has new slot frequency + assert_eq!( + Pallet::::parathread_params(&ParaId::from(y - 1)).map(|x| x.slot_frequency), + Some(new_slot_frequency) + ); + } + impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test); } diff --git a/pallets/registrar/src/lib.rs b/pallets/registrar/src/lib.rs index 994cd4644..9bc52c405 100644 --- a/pallets/registrar/src/lib.rs +++ b/pallets/registrar/src/lib.rs @@ -47,15 +47,20 @@ use { DefaultNoBound, LOG_TARGET, }, frame_system::pallet_prelude::*, + parity_scale_codec::{Decode, Encode}, sp_runtime::{traits::AtLeast32BitUnsigned, Saturating}, - sp_std::prelude::*, + sp_std::{collections::btree_set::BTreeSet, prelude::*}, tp_container_chain_genesis_data::ContainerChainGenesisData, - tp_traits::{GetCurrentContainerChains, GetSessionContainerChains, GetSessionIndex, ParaId}, + tp_traits::{ + GetCurrentContainerChains, GetSessionContainerChains, GetSessionIndex, ParaId, + ParathreadParams as ParathreadParamsTy, SlotFrequency, + }, }; #[frame_support::pallet] pub mod pallet { use super::*; + use tp_traits::SessionContainerChains; #[pallet::pallet] #[pallet::without_storage_info] @@ -193,6 +198,22 @@ pub mod pallet { ValueQuery, >; + #[pallet::storage] + #[pallet::getter(fn parathread_params)] + pub type ParathreadParams = + StorageMap<_, Blake2_128Concat, ParaId, ParathreadParamsTy, OptionQuery>; + + #[pallet::storage] + #[pallet::getter(fn pending_parathread_params)] + pub type PendingParathreadParams = StorageValue< + _, + Vec<( + T::SessionIndex, + BoundedVec<(ParaId, ParathreadParamsTy), T::MaxLengthParaIds>, + )>, + ValueQuery, + >; + pub type DepositBalanceOf = <::Currency as Currency<::AccountId>>::Balance; @@ -223,6 +244,8 @@ pub mod pallet { ParaIdPaused { para_id: ParaId }, /// A para id has been unpaused. ParaIdUnpaused { para_id: ParaId }, + /// Parathread params changed + ParathreadParamsChanged { para_id: ParaId }, } #[pallet::error] @@ -245,6 +268,8 @@ pub mod pallet { ParaIdNotInPendingVerification, /// Tried to register a ParaId with an account that did not have enough balance for the deposit NotSufficientDeposit, + /// Tried to change parathread params for a para id that is not a registered parathread + NotAParathread, } #[pallet::hooks] @@ -364,58 +389,7 @@ pub mod pallet { genesis_data: ContainerChainGenesisData, ) -> DispatchResult { let account = ensure_signed(origin)?; - let deposit = T::DepositAmount::get(); - - // Verify we can reserve - T::Currency::can_reserve(&account, deposit) - .then_some(true) - .ok_or(Error::::NotSufficientDeposit)?; - - // Check if the para id is already registered by looking at the genesis data - if ParaGenesisData::::contains_key(para_id) { - return Err(Error::::ParaIdAlreadyRegistered.into()); - } - - // Insert para id into PendingVerification - let mut pending_verification = PendingVerification::::get(); - match pending_verification.binary_search(¶_id) { - // This Ok is unreachable - Ok(_) => return Err(Error::::ParaIdAlreadyRegistered.into()), - Err(index) => { - pending_verification - .try_insert(index, para_id) - .map_err(|_e| Error::::ParaIdListFull)?; - } - } - - // The actual registration takes place 2 sessions after the call to - // `mark_valid_for_collating`, but the genesis data is inserted now. - // This is because collators should be able to start syncing the new container chain - // before the first block is mined. However, we could store the genesis data in a - // different key, like PendingParaGenesisData. - // TODO: for benchmarks, this call to .encoded_size is O(n) with respect to the number - // of key-values in `genesis_data.storage`, even if those key-values are empty. And we - // won't detect that the size is too big until after iterating over all of them, so the - // limit in that case would be the transaction size. - let genesis_data_size = genesis_data.encoded_size(); - if genesis_data_size > T::MaxGenesisDataSize::get() as usize { - return Err(Error::::GenesisDataTooBig.into()); - } - - // Reserve the deposit, we verified we can do this - T::Currency::reserve(&account, deposit)?; - - // Update DepositInfo - RegistrarDeposit::::insert( - para_id, - DepositInfo { - creator: account, - deposit, - }, - ); - ParaGenesisData::::insert(para_id, genesis_data); - PendingVerification::::put(pending_verification); - + Self::do_register(account, para_id, genesis_data)?; Self::deposit_event(Event::ParaIdRegistered { para_id }); Ok(()) @@ -581,6 +555,46 @@ pub mod pallet { Ok(()) } + + /// Register parathread + #[pallet::call_index(6)] + #[pallet::weight(T::WeightInfo::register_parathread(genesis_data.encoded_size() as u32, T::MaxLengthParaIds::get(), genesis_data.storage.len() as u32))] + pub fn register_parathread( + origin: OriginFor, + para_id: ParaId, + slot_frequency: SlotFrequency, + genesis_data: ContainerChainGenesisData, + ) -> DispatchResult { + let account = ensure_signed(origin)?; + Self::do_register(account, para_id, genesis_data)?; + // Insert parathread params + let params = ParathreadParamsTy { slot_frequency }; + ParathreadParams::::insert(para_id, params); + Self::deposit_event(Event::ParaIdRegistered { para_id }); + + Ok(()) + } + + /// Change parathread params + #[pallet::call_index(7)] + #[pallet::weight(T::WeightInfo::set_parathread_params(T::MaxLengthParaIds::get()))] + pub fn set_parathread_params( + origin: OriginFor, + para_id: ParaId, + slot_frequency: SlotFrequency, + ) -> DispatchResult { + T::RegistrarOrigin::ensure_origin(origin)?; + + Self::schedule_parathread_params_change(para_id, |params| { + params.slot_frequency = slot_frequency; + + Self::deposit_event(Event::ParathreadParamsChanged { para_id }); + + Ok(()) + })?; + + Ok(()) + } } pub struct SessionChangeOutcome { @@ -642,6 +656,66 @@ pub mod pallet { Ok(deposit_info.creator) } + fn do_register( + account: T::AccountId, + para_id: ParaId, + genesis_data: ContainerChainGenesisData, + ) -> DispatchResult { + let deposit = T::DepositAmount::get(); + + // Verify we can reserve + T::Currency::can_reserve(&account, deposit) + .then_some(true) + .ok_or(Error::::NotSufficientDeposit)?; + + // Check if the para id is already registered by looking at the genesis data + if ParaGenesisData::::contains_key(para_id) { + return Err(Error::::ParaIdAlreadyRegistered.into()); + } + + // Insert para id into PendingVerification + let mut pending_verification = PendingVerification::::get(); + match pending_verification.binary_search(¶_id) { + // This Ok is unreachable + Ok(_) => return Err(Error::::ParaIdAlreadyRegistered.into()), + Err(index) => { + pending_verification + .try_insert(index, para_id) + .map_err(|_e| Error::::ParaIdListFull)?; + } + } + + // The actual registration takes place 2 sessions after the call to + // `mark_valid_for_collating`, but the genesis data is inserted now. + // This is because collators should be able to start syncing the new container chain + // before the first block is mined. However, we could store the genesis data in a + // different key, like PendingParaGenesisData. + // TODO: for benchmarks, this call to .encoded_size is O(n) with respect to the number + // of key-values in `genesis_data.storage`, even if those key-values are empty. And we + // won't detect that the size is too big until after iterating over all of them, so the + // limit in that case would be the transaction size. + let genesis_data_size = genesis_data.encoded_size(); + if genesis_data_size > T::MaxGenesisDataSize::get() as usize { + return Err(Error::::GenesisDataTooBig.into()); + } + + // Reserve the deposit, we verified we can do this + T::Currency::reserve(&account, deposit)?; + + // Update DepositInfo + RegistrarDeposit::::insert( + para_id, + DepositInfo { + creator: account, + deposit, + }, + ); + ParaGenesisData::::insert(para_id, genesis_data); + PendingVerification::::put(pending_verification); + + Ok(()) + } + fn schedule_parachain_change( updater: impl FnOnce(&mut BoundedVec) -> DispatchResult, ) -> DispatchResult { @@ -731,6 +805,68 @@ pub mod pallet { Ok(()) } + fn schedule_parathread_params_change( + para_id: ParaId, + updater: impl FnOnce(&mut ParathreadParamsTy) -> DispatchResult, + ) -> DispatchResult { + // Check that the para id is a parathread by reading the old params + let params = match ParathreadParams::::get(para_id) { + Some(x) => x, + None => { + return Err(Error::::NotAParathread.into()); + } + }; + + let mut pending_params = PendingParathreadParams::::get(); + // First, we need to decide what we should use as the base params. + let mut base_params = pending_params + .last() + .and_then(|(_, para_id_params)| { + match para_id_params + .binary_search_by_key(¶_id, |(para_id, _params)| *para_id) + { + Ok(idx) => { + let (_para_id, params) = ¶_id_params[idx]; + Some(params.clone()) + } + Err(_idx) => None, + } + }) + .unwrap_or(params); + + updater(&mut base_params)?; + let new_params = base_params; + + let scheduled_session = Self::scheduled_session(); + + if let Some(&mut (_, ref mut para_id_params)) = pending_params + .iter_mut() + .find(|&&mut (apply_at_session, _)| apply_at_session >= scheduled_session) + { + match para_id_params.binary_search_by_key(¶_id, |(para_id, _params)| *para_id) { + Ok(idx) => { + let (_para_id, params) = &mut para_id_params[idx]; + *params = new_params; + } + Err(idx) => { + para_id_params + .try_insert(idx, (para_id, new_params)) + .map_err(|_e| Error::::ParaIdListFull)?; + } + } + } else { + // We are scheduling a new parathread params change for the scheduled session. + pending_params.push(( + scheduled_session, + BoundedVec::truncate_from(vec![(para_id, new_params)]), + )); + } + + >::put(pending_params); + + Ok(()) + } + /// Return the session index that should be used for any future scheduled changes. fn scheduled_session() -> T::SessionIndex { T::CurrentSessionIndex::session_index().saturating_add(T::SessionDelay::get()) @@ -801,6 +937,32 @@ pub mod pallet { } } + let pending_parathread_params = >::get(); + if !pending_parathread_params.is_empty() { + let (mut past_and_present, future) = pending_parathread_params + .into_iter() + .partition::, _>(|&(apply_at_session, _)| { + apply_at_session <= *session_index + }); + + if past_and_present.len() > 1 { + // This should never happen since we schedule parachain changes only into the future + // sessions and this handler called for each session change. + log::error!( + target: LOG_TARGET, + "Skipping applying parathread params changes scheduled sessions in the past", + ); + } + + let new_params = past_and_present.pop().map(|(_, params)| params); + if let Some(ref new_params) = new_params { + for (para_id, params) in new_params { + >::insert(para_id, params); + } + >::put(future); + } + } + let pending_to_remove = >::get(); if !pending_to_remove.is_empty() { let (past_and_present, future) = @@ -808,16 +970,27 @@ pub mod pallet { |&(apply_at_session, _)| apply_at_session <= *session_index, ); - // Unlike `PendingParaIds`, this cannot skip items because we must cleanup all parachains. - // But this will only happen if `initializer_on_new_session` is not called for a big range of - // sessions, and many parachains are deregistered in the meantime. - for (_, new_paras) in &past_and_present { - for para_id in new_paras { - Self::cleanup_deregistered_para_id(*para_id); + if !past_and_present.is_empty() { + // Unlike `PendingParaIds`, this cannot skip items because we must cleanup all parachains. + // But this will only happen if `initializer_on_new_session` is not called for a big range of + // sessions, and many parachains are deregistered in the meantime. + let mut removed_para_ids = BTreeSet::new(); + for (_, new_paras) in &past_and_present { + for para_id in new_paras { + Self::cleanup_deregistered_para_id(*para_id); + removed_para_ids.insert(*para_id); + } } - } - if !past_and_present.is_empty() { + // Also need to remove PendingParams to avoid setting params for a para id that does not exist + let mut pending_parathread_params = >::get(); + for (_, new_params) in &mut pending_parathread_params { + new_params.retain(|(para_id, _params)| { + // Retain para ids that are not in the list of removed para ids + !removed_para_ids.contains(para_id) + }); + } + >::put(pending_parathread_params); >::put(future); } } @@ -832,6 +1005,7 @@ pub mod pallet { /// and execute para_deregistered hook to clean up other pallets as well fn cleanup_deregistered_para_id(para_id: ParaId) { ParaGenesisData::::remove(para_id); + ParathreadParams::::remove(para_id); // Get asset creator and deposit amount // Deposit may not exist, for example if the para id was registered on genesis if let Some(asset_info) = RegistrarDeposit::::take(para_id) { @@ -891,7 +1065,7 @@ pub mod pallet { } impl GetSessionContainerChains for Pallet { - fn session_container_chains(session_index: T::SessionIndex) -> Vec { + fn session_container_chains(session_index: T::SessionIndex) -> SessionContainerChains { let (past_and_present, _) = Pallet::::pending_registered_para_ids() .into_iter() .partition::, _>(|&(apply_at_session, _)| apply_at_session <= session_index); @@ -902,12 +1076,22 @@ pub mod pallet { Pallet::::registered_para_ids() }; - paras.into_iter().collect() - } + let mut parachains = vec![]; + let mut parathreads = vec![]; + + for para_id in paras { + // TODO: sweet O(n) db reads + if let Some(parathread_params) = ParathreadParams::::get(¶_id) { + parathreads.push((para_id, parathread_params)); + } else { + parachains.push(para_id); + } + } - fn session_parathreads(_session_index: T::SessionIndex) -> Vec { - // FIXME(parathreads) - vec![] + SessionContainerChains { + parachains, + parathreads, + } } #[cfg(feature = "runtime-benchmarks")] diff --git a/pallets/registrar/src/tests.rs b/pallets/registrar/src/tests.rs index faca9e31a..1e93aa6d4 100644 --- a/pallets/registrar/src/tests.rs +++ b/pallets/registrar/src/tests.rs @@ -21,7 +21,7 @@ use { sp_core::Get, sp_runtime::DispatchError, tp_container_chain_genesis_data::ContainerChainGenesisData, - tp_traits::ParaId, + tp_traits::{ParaId, SlotFrequency}, }; const ALICE: u64 = 1; @@ -1174,6 +1174,141 @@ fn deposit_removed_after_2_sessions_if_marked_as_valid() { }); } +#[test] +fn parathread_change_params_after_two_sessions() { + new_test_ext().execute_with(|| { + run_to_block(1); + assert_ok!(ParaRegistrar::register_parathread( + RuntimeOrigin::signed(ALICE), + 42.into(), + SlotFrequency { min: 1, max: 1 }, + empty_genesis_data() + )); + assert!(ParaRegistrar::registrar_deposit(ParaId::from(42)).is_some()); + assert_ok!(ParaRegistrar::mark_valid_for_collating( + RuntimeOrigin::root(), + 42.into(), + )); + assert_ok!(ParaRegistrar::set_parathread_params( + RuntimeOrigin::root(), + ParaId::from(42), + SlotFrequency { min: 2, max: 2 } + )); + // Params are not updated immediately + assert_eq!( + ParaRegistrar::parathread_params(ParaId::from(42)).map(|x| x.slot_frequency), + Some(SlotFrequency { min: 1, max: 1 }) + ); + + // Params are updated after 2 sessions + run_to_session(2); + assert_eq!( + ParaRegistrar::parathread_params(ParaId::from(42)).map(|x| x.slot_frequency), + Some(SlotFrequency { min: 2, max: 2 }) + ); + }); +} + +#[test] +fn parathread_params_cannot_be_set_for_parachains() { + new_test_ext().execute_with(|| { + run_to_block(1); + assert_ok!(ParaRegistrar::register( + RuntimeOrigin::signed(ALICE), + 42.into(), + empty_genesis_data() + )); + assert!(ParaRegistrar::registrar_deposit(ParaId::from(42)).is_some()); + assert_ok!(ParaRegistrar::mark_valid_for_collating( + RuntimeOrigin::root(), + 42.into(), + )); + assert_noop!( + ParaRegistrar::set_parathread_params( + RuntimeOrigin::root(), + ParaId::from(42), + SlotFrequency { min: 2, max: 2 } + ), + Error::::NotAParathread + ); + }); +} + +#[test] +fn parathread_register_change_params_deregister() { + new_test_ext().execute_with(|| { + run_to_block(1); + assert_ok!(ParaRegistrar::register_parathread( + RuntimeOrigin::signed(ALICE), + 42.into(), + SlotFrequency { min: 1, max: 1 }, + empty_genesis_data() + )); + assert!(ParaRegistrar::registrar_deposit(ParaId::from(42)).is_some()); + assert_ok!(ParaRegistrar::mark_valid_for_collating( + RuntimeOrigin::root(), + 42.into(), + )); + assert_ok!(ParaRegistrar::set_parathread_params( + RuntimeOrigin::root(), + ParaId::from(42), + SlotFrequency { min: 2, max: 2 } + )); + + // Deregister parathread while parathread params are pending + assert_ok!(ParaRegistrar::deregister(RuntimeOrigin::root(), 42.into())); + assert!(ParaRegistrar::para_genesis_data(ParaId::from(42)).is_some()); + assert_eq!( + ParaRegistrar::parathread_params(ParaId::from(42)).map(|x| x.slot_frequency), + Some(SlotFrequency { min: 1, max: 1 }) + ); + + // Params removed after 2 sessions + run_to_session(2); + assert!(ParaRegistrar::para_genesis_data(ParaId::from(42)).is_none()); + assert!(ParaRegistrar::parathread_params(ParaId::from(42)).is_none()); + }); +} + +#[test] +fn parathread_register_deregister_change_params() { + new_test_ext().execute_with(|| { + run_to_block(1); + assert_ok!(ParaRegistrar::register_parathread( + RuntimeOrigin::signed(ALICE), + 42.into(), + SlotFrequency { min: 1, max: 1 }, + empty_genesis_data() + )); + assert!(ParaRegistrar::registrar_deposit(ParaId::from(42)).is_some()); + assert_ok!(ParaRegistrar::mark_valid_for_collating( + RuntimeOrigin::root(), + 42.into(), + )); + + // Deregister parathread while parathread params are pending + assert_ok!(ParaRegistrar::deregister(RuntimeOrigin::root(), 42.into())); + assert!(ParaRegistrar::para_genesis_data(ParaId::from(42)).is_some()); + assert!(ParaRegistrar::parathread_params(ParaId::from(42)).is_some()); + + run_to_session(1); + assert_ok!(ParaRegistrar::set_parathread_params( + RuntimeOrigin::root(), + ParaId::from(42), + SlotFrequency { min: 2, max: 2 } + )); + + // Params removed after 2 sessions + run_to_session(2); + assert!(ParaRegistrar::para_genesis_data(ParaId::from(42)).is_none()); + assert!(ParaRegistrar::parathread_params(ParaId::from(42)).is_none()); + + // Params not updated after 3 sessions + run_to_session(3); + assert!(ParaRegistrar::parathread_params(ParaId::from(42)).is_none()); + }); +} + #[test] fn weights_assigned_to_extrinsics_are_correct() { new_test_ext().execute_with(|| { diff --git a/pallets/registrar/src/weights.rs b/pallets/registrar/src/weights.rs index 30b244e71..6d0ba3903 100644 --- a/pallets/registrar/src/weights.rs +++ b/pallets/registrar/src/weights.rs @@ -18,10 +18,10 @@ //! Autogenerated weights for pallet_registrar //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-12-11, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-01-30, STEPS: `16`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `tomasz-XPS-15-9520`, CPU: `12th Gen Intel(R) Core(TM) i7-12700H` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 // Executed Command: // ./target/release/tanssi-node @@ -33,15 +33,16 @@ // pallet_registrar // --extrinsic // * +// --chain=dev // --steps -// 50 +// 16 // --repeat -// 20 +// 1 // --template=./benchmarking/frame-weight-template.hbs // --json-file // raw.json // --output -// weights.rs +// tmp/pallet_registrar.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -58,6 +59,8 @@ pub trait WeightInfo { fn mark_valid_for_collating(y: u32, ) -> Weight; fn pause_container_chain(y: u32, ) -> Weight; fn unpause_container_chain(y: u32, ) -> Weight; + fn register_parathread(x: u32, y: u32, z: u32, ) -> Weight; + fn set_parathread_params(y: u32, ) -> Weight; } /// Weights for pallet_registrar using the Substrate node and recommended hardware. @@ -76,18 +79,18 @@ impl WeightInfo for SubstrateWeight { /// The range of component `z` is `[1, 10]`. fn register(x: u32, y: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `389 + y * (12 ±0)` - // Estimated: `3833 + y * (12 ±0) + z * (2 ±0)` - // Minimum execution time: 36_211_000 picoseconds. - Weight::from_parts(37_222_000, 3833) - // Standard Error: 8 - .saturating_add(Weight::from_parts(612, 0).saturating_mul(x.into())) - // Standard Error: 2_644_145 - .saturating_add(Weight::from_parts(77_565_165, 0).saturating_mul(z.into())) + // Measured: `350 + y * (13 ±0)` + // Estimated: `3809 + y * (13 ±0) + z * (3 ±2)` + // Minimum execution time: 38_408_000 picoseconds. + Weight::from_parts(38_408_000, 3809) + // Standard Error: 53 + .saturating_add(Weight::from_parts(751, 0).saturating_mul(x.into())) + // Standard Error: 16_331_035 + .saturating_add(Weight::from_parts(115_744_655, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) - .saturating_add(Weight::from_parts(0, 12).saturating_mul(y.into())) - .saturating_add(Weight::from_parts(0, 2).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(0, 13).saturating_mul(y.into())) + .saturating_add(Weight::from_parts(0, 3).saturating_mul(z.into())) } /// Storage: `Registrar::PendingVerification` (r:1 w:1) /// Proof: `Registrar::PendingVerification` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -99,6 +102,8 @@ impl WeightInfo for SubstrateWeight { /// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) /// Storage: `Registrar::ParaGenesisData` (r:0 w:1) /// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Registrar::ParathreadParams` (r:0 w:1) + /// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `DataPreservers::BootNodes` (r:0 w:1) /// Proof: `DataPreservers::BootNodes` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1) @@ -107,16 +112,16 @@ impl WeightInfo for SubstrateWeight { /// The range of component `y` is `[1, 50]`. fn deregister_immediate(x: u32, y: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `237 + y * (17 ±0)` - // Estimated: `3795 + y * (15 ±0)` - // Minimum execution time: 39_973_000 picoseconds. - Weight::from_parts(46_896_246, 3795) - // Standard Error: 0 - .saturating_add(Weight::from_parts(4, 0).saturating_mul(x.into())) - // Standard Error: 10_525 - .saturating_add(Weight::from_parts(423_186, 0).saturating_mul(y.into())) + // Measured: `250 + y * (17 ±0)` + // Estimated: `3785 + y * (15 ±0)` + // Minimum execution time: 48_129_000 picoseconds. + Weight::from_parts(52_650_930, 3785) + // Standard Error: 1 + .saturating_add(Weight::from_parts(2, 0).saturating_mul(x.into())) + // Standard Error: 87_727 + .saturating_add(Weight::from_parts(372_523, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().writes(7_u64)) + .saturating_add(T::DbWeight::get().writes(8_u64)) .saturating_add(Weight::from_parts(0, 15).saturating_mul(y.into())) } /// Storage: `Registrar::PendingVerification` (r:1 w:0) @@ -139,12 +144,12 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `396 + y * (4 ±0)` // Estimated: `1879 + y * (4 ±0)` - // Minimum execution time: 18_423_000 picoseconds. - Weight::from_parts(22_847_101, 1879) - // Standard Error: 0 - .saturating_add(Weight::from_parts(2, 0).saturating_mul(x.into())) - // Standard Error: 7_235 - .saturating_add(Weight::from_parts(310_069, 0).saturating_mul(y.into())) + // Minimum execution time: 23_181_000 picoseconds. + Weight::from_parts(24_298_819, 1879) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1, 0).saturating_mul(x.into())) + // Standard Error: 91_621 + .saturating_add(Weight::from_parts(304_778, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 4).saturating_mul(y.into())) @@ -166,12 +171,12 @@ impl WeightInfo for SubstrateWeight { /// The range of component `y` is `[1, 50]`. fn mark_valid_for_collating(y: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1124 + y * (35 ±0)` - // Estimated: `4539 + y * (36 ±0)` - // Minimum execution time: 35_171_000 picoseconds. - Weight::from_parts(63_871_159, 4539) - // Standard Error: 17_776 - .saturating_add(Weight::from_parts(412_046, 0).saturating_mul(y.into())) + // Measured: `1111 + y * (36 ±0)` + // Estimated: `4514 + y * (36 ±2)` + // Minimum execution time: 49_292_000 picoseconds. + Weight::from_parts(58_444_147, 4514) + // Standard Error: 202_350 + .saturating_add(Weight::from_parts(578_764, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(7_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 36).saturating_mul(y.into())) @@ -185,12 +190,12 @@ impl WeightInfo for SubstrateWeight { /// The range of component `y` is `[1, 50]`. fn pause_container_chain(y: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `431 + y * (8 ±0)` + // Measured: `428 + y * (8 ±0)` // Estimated: `1912 + y * (8 ±0)` - // Minimum execution time: 17_880_000 picoseconds. - Weight::from_parts(31_481_525, 1912) - // Standard Error: 10_053 - .saturating_add(Weight::from_parts(239_195, 0).saturating_mul(y.into())) + // Minimum execution time: 30_666_000 picoseconds. + Weight::from_parts(35_290_910, 1912) + // Standard Error: 50_241 + .saturating_add(Weight::from_parts(104_888, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(y.into())) @@ -204,16 +209,60 @@ impl WeightInfo for SubstrateWeight { /// The range of component `y` is `[1, 50]`. fn unpause_container_chain(y: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `431 + y * (8 ±0)` + // Measured: `428 + y * (8 ±0)` // Estimated: `1912 + y * (8 ±0)` - // Minimum execution time: 16_507_000 picoseconds. - Weight::from_parts(27_573_892, 1912) - // Standard Error: 9_325 - .saturating_add(Weight::from_parts(393_980, 0).saturating_mul(y.into())) + // Minimum execution time: 25_774_000 picoseconds. + Weight::from_parts(29_010_669, 1912) + // Standard Error: 39_979 + .saturating_add(Weight::from_parts(267_751, 0).saturating_mul(y.into())) .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(y.into())) } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Registrar::ParaGenesisData` (r:1 w:1) + /// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Registrar::PendingVerification` (r:1 w:1) + /// Proof: `Registrar::PendingVerification` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Registrar::ParathreadParams` (r:0 w:1) + /// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Registrar::RegistrarDeposit` (r:0 w:1) + /// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `x` is `[5, 3000000]`. + /// The range of component `y` is `[1, 50]`. + /// The range of component `z` is `[1, 10]`. + fn register_parathread(x: u32, y: u32, z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `384 + y * (13 ±0)` + // Estimated: `3833 + y * (13 ±0) + z * (3 ±2)` + // Minimum execution time: 42_264_000 picoseconds. + Weight::from_parts(42_264_000, 3833) + // Standard Error: 51 + .saturating_add(Weight::from_parts(722, 0).saturating_mul(x.into())) + // Standard Error: 15_908_841 + .saturating_add(Weight::from_parts(112_465_553, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(5_u64)) + .saturating_add(Weight::from_parts(0, 13).saturating_mul(y.into())) + .saturating_add(Weight::from_parts(0, 3).saturating_mul(z.into())) + } + /// Storage: `Registrar::ParathreadParams` (r:1 w:0) + /// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Registrar::PendingParathreadParams` (r:1 w:1) + /// Proof: `Registrar::PendingParathreadParams` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Session::CurrentIndex` (r:1 w:0) + /// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `y` is `[1, 50]`. + fn set_parathread_params(_y: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `483` + // Estimated: `3948` + // Minimum execution time: 19_970_000 picoseconds. + Weight::from_parts(23_219_566, 3948) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } } // For backwards compatibility and tests @@ -231,18 +280,18 @@ impl WeightInfo for () { /// The range of component `z` is `[1, 10]`. fn register(x: u32, y: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `389 + y * (12 ±0)` - // Estimated: `3833 + y * (12 ±0) + z * (2 ±0)` - // Minimum execution time: 36_211_000 picoseconds. - Weight::from_parts(37_222_000, 3833) - // Standard Error: 8 - .saturating_add(Weight::from_parts(612, 0).saturating_mul(x.into())) - // Standard Error: 2_644_145 - .saturating_add(Weight::from_parts(77_565_165, 0).saturating_mul(z.into())) + // Measured: `350 + y * (13 ±0)` + // Estimated: `3809 + y * (13 ±0) + z * (3 ±2)` + // Minimum execution time: 38_408_000 picoseconds. + Weight::from_parts(38_408_000, 3809) + // Standard Error: 53 + .saturating_add(Weight::from_parts(751, 0).saturating_mul(x.into())) + // Standard Error: 16_331_035 + .saturating_add(Weight::from_parts(115_744_655, 0).saturating_mul(z.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) - .saturating_add(Weight::from_parts(0, 12).saturating_mul(y.into())) - .saturating_add(Weight::from_parts(0, 2).saturating_mul(z.into())) + .saturating_add(Weight::from_parts(0, 13).saturating_mul(y.into())) + .saturating_add(Weight::from_parts(0, 3).saturating_mul(z.into())) } /// Storage: `Registrar::PendingVerification` (r:1 w:1) /// Proof: `Registrar::PendingVerification` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -254,6 +303,8 @@ impl WeightInfo for () { /// Proof: `ServicesPayment::BlockProductionCredits` (`max_values`: None, `max_size`: Some(24), added: 2499, mode: `MaxEncodedLen`) /// Storage: `Registrar::ParaGenesisData` (r:0 w:1) /// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Registrar::ParathreadParams` (r:0 w:1) + /// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `DataPreservers::BootNodes` (r:0 w:1) /// Proof: `DataPreservers::BootNodes` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `AuthorNoting::LatestAuthor` (r:0 w:1) @@ -262,16 +313,16 @@ impl WeightInfo for () { /// The range of component `y` is `[1, 50]`. fn deregister_immediate(x: u32, y: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `237 + y * (17 ±0)` - // Estimated: `3795 + y * (15 ±0)` - // Minimum execution time: 39_973_000 picoseconds. - Weight::from_parts(46_896_246, 3795) - // Standard Error: 0 - .saturating_add(Weight::from_parts(4, 0).saturating_mul(x.into())) - // Standard Error: 10_525 - .saturating_add(Weight::from_parts(423_186, 0).saturating_mul(y.into())) + // Measured: `250 + y * (17 ±0)` + // Estimated: `3785 + y * (15 ±0)` + // Minimum execution time: 48_129_000 picoseconds. + Weight::from_parts(52_650_930, 3785) + // Standard Error: 1 + .saturating_add(Weight::from_parts(2, 0).saturating_mul(x.into())) + // Standard Error: 87_727 + .saturating_add(Weight::from_parts(372_523, 0).saturating_mul(y.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) - .saturating_add(RocksDbWeight::get().writes(7_u64)) + .saturating_add(RocksDbWeight::get().writes(8_u64)) .saturating_add(Weight::from_parts(0, 15).saturating_mul(y.into())) } /// Storage: `Registrar::PendingVerification` (r:1 w:0) @@ -294,12 +345,12 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `396 + y * (4 ±0)` // Estimated: `1879 + y * (4 ±0)` - // Minimum execution time: 18_423_000 picoseconds. - Weight::from_parts(22_847_101, 1879) - // Standard Error: 0 - .saturating_add(Weight::from_parts(2, 0).saturating_mul(x.into())) - // Standard Error: 7_235 - .saturating_add(Weight::from_parts(310_069, 0).saturating_mul(y.into())) + // Minimum execution time: 23_181_000 picoseconds. + Weight::from_parts(24_298_819, 1879) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1, 0).saturating_mul(x.into())) + // Standard Error: 91_621 + .saturating_add(Weight::from_parts(304_778, 0).saturating_mul(y.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 4).saturating_mul(y.into())) @@ -321,12 +372,12 @@ impl WeightInfo for () { /// The range of component `y` is `[1, 50]`. fn mark_valid_for_collating(y: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1124 + y * (35 ±0)` - // Estimated: `4539 + y * (36 ±0)` - // Minimum execution time: 35_171_000 picoseconds. - Weight::from_parts(63_871_159, 4539) - // Standard Error: 17_776 - .saturating_add(Weight::from_parts(412_046, 0).saturating_mul(y.into())) + // Measured: `1111 + y * (36 ±0)` + // Estimated: `4514 + y * (36 ±2)` + // Minimum execution time: 49_292_000 picoseconds. + Weight::from_parts(58_444_147, 4514) + // Standard Error: 202_350 + .saturating_add(Weight::from_parts(578_764, 0).saturating_mul(y.into())) .saturating_add(RocksDbWeight::get().reads(7_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) .saturating_add(Weight::from_parts(0, 36).saturating_mul(y.into())) @@ -340,12 +391,12 @@ impl WeightInfo for () { /// The range of component `y` is `[1, 50]`. fn pause_container_chain(y: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `431 + y * (8 ±0)` + // Measured: `428 + y * (8 ±0)` // Estimated: `1912 + y * (8 ±0)` - // Minimum execution time: 17_880_000 picoseconds. - Weight::from_parts(31_481_525, 1912) - // Standard Error: 10_053 - .saturating_add(Weight::from_parts(239_195, 0).saturating_mul(y.into())) + // Minimum execution time: 30_666_000 picoseconds. + Weight::from_parts(35_290_910, 1912) + // Standard Error: 50_241 + .saturating_add(Weight::from_parts(104_888, 0).saturating_mul(y.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(y.into())) @@ -359,14 +410,58 @@ impl WeightInfo for () { /// The range of component `y` is `[1, 50]`. fn unpause_container_chain(y: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `431 + y * (8 ±0)` + // Measured: `428 + y * (8 ±0)` // Estimated: `1912 + y * (8 ±0)` - // Minimum execution time: 16_507_000 picoseconds. - Weight::from_parts(27_573_892, 1912) - // Standard Error: 9_325 - .saturating_add(Weight::from_parts(393_980, 0).saturating_mul(y.into())) + // Minimum execution time: 25_774_000 picoseconds. + Weight::from_parts(29_010_669, 1912) + // Standard Error: 39_979 + .saturating_add(Weight::from_parts(267_751, 0).saturating_mul(y.into())) .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(2_u64)) .saturating_add(Weight::from_parts(0, 8).saturating_mul(y.into())) } + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// Storage: `Registrar::ParaGenesisData` (r:1 w:1) + /// Proof: `Registrar::ParaGenesisData` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Registrar::PendingVerification` (r:1 w:1) + /// Proof: `Registrar::PendingVerification` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Registrar::ParathreadParams` (r:0 w:1) + /// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Registrar::RegistrarDeposit` (r:0 w:1) + /// Proof: `Registrar::RegistrarDeposit` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `x` is `[5, 3000000]`. + /// The range of component `y` is `[1, 50]`. + /// The range of component `z` is `[1, 10]`. + fn register_parathread(x: u32, y: u32, z: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `384 + y * (13 ±0)` + // Estimated: `3833 + y * (13 ±0) + z * (3 ±2)` + // Minimum execution time: 42_264_000 picoseconds. + Weight::from_parts(42_264_000, 3833) + // Standard Error: 51 + .saturating_add(Weight::from_parts(722, 0).saturating_mul(x.into())) + // Standard Error: 15_908_841 + .saturating_add(Weight::from_parts(112_465_553, 0).saturating_mul(z.into())) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + .saturating_add(RocksDbWeight::get().writes(5_u64)) + .saturating_add(Weight::from_parts(0, 13).saturating_mul(y.into())) + .saturating_add(Weight::from_parts(0, 3).saturating_mul(z.into())) + } + /// Storage: `Registrar::ParathreadParams` (r:1 w:0) + /// Proof: `Registrar::ParathreadParams` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Registrar::PendingParathreadParams` (r:1 w:1) + /// Proof: `Registrar::PendingParathreadParams` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Session::CurrentIndex` (r:1 w:0) + /// Proof: `Session::CurrentIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// The range of component `y` is `[1, 50]`. + fn set_parathread_params(_y: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `483` + // Estimated: `3948` + // Minimum execution time: 19_970_000 picoseconds. + Weight::from_parts(23_219_566, 3948) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } } diff --git a/primitives/traits/Cargo.toml b/primitives/traits/Cargo.toml index 953961a46..621360dba 100644 --- a/primitives/traits/Cargo.toml +++ b/primitives/traits/Cargo.toml @@ -9,6 +9,8 @@ version = "0.1.0" [dependencies] frame-support = { workspace = true } impl-trait-for-tuples = { workspace = true } +parity-scale-codec = { workspace = true } +scale-info = { workspace = true } sp-std = { workspace = true } # Cumulus @@ -19,6 +21,8 @@ default = [ "std" ] std = [ "cumulus-primitives-core/std", "frame-support/std", + "parity-scale-codec/std", + "scale-info/std", "sp-std/std", ] runtime-benchmarks = [ diff --git a/primitives/traits/src/lib.rs b/primitives/traits/src/lib.rs index 3b0537cee..5b8dd2744 100644 --- a/primitives/traits/src/lib.rs +++ b/primitives/traits/src/lib.rs @@ -25,7 +25,7 @@ pub use cumulus_primitives_core::{ }; use { frame_support::{ - pallet_prelude::{DispatchResultWithPostInfo, Get, Weight}, + pallet_prelude::{Decode, DispatchResultWithPostInfo, Encode, Get, Weight}, BoundedVec, }, sp_std::vec::Vec, @@ -72,11 +72,42 @@ pub trait GetCurrentContainerChains { fn set_current_container_chains(container_chains: &[ParaId]); } +/// How often should a parathread collator propose blocks. The units are "1 out of n slots", where the slot time is the +/// tanssi slot time, 12 seconds by default. +// TODO: this is currently ignored +#[derive(Clone, Debug, Encode, Decode, scale_info::TypeInfo, PartialEq, Eq)] +pub struct SlotFrequency { + /// The parathread will produce at most 1 block every x slots. min=10 means that collators can produce 1 block + /// every `x >= 10` slots, but they are not enforced to. If collators produce a block after less than 10 + /// slots, they will not be rewarded by tanssi. + pub min: u32, + /// The parathread will produce at least 1 block every x slots. max=10 means that collators are forced to + /// produce 1 block every `x <= 10` slots. Collators can produce a block sooner than that if the `min` allows it, but + /// waiting more than 10 slots will make them lose the block reward. + pub max: u32, +} + +impl Default for SlotFrequency { + fn default() -> Self { + Self { min: 1, max: 1 } + } +} + +#[derive(Clone, Debug, Encode, Decode, scale_info::TypeInfo, PartialEq, Eq)] +pub struct ParathreadParams { + pub slot_frequency: SlotFrequency, +} + +#[derive(Clone, Debug, Encode, Decode, scale_info::TypeInfo, PartialEq, Eq)] +pub struct SessionContainerChains { + pub parachains: Vec, + pub parathreads: Vec<(ParaId, ParathreadParams)>, +} + /// Get the list of container chains parachain ids at given /// session index. pub trait GetSessionContainerChains { - fn session_container_chains(session_index: SessionIndex) -> Vec; - fn session_parathreads(session_index: SessionIndex) -> Vec; + fn session_container_chains(session_index: SessionIndex) -> SessionContainerChains; #[cfg(feature = "runtime-benchmarks")] fn set_session_container_chains(session_index: SessionIndex, container_chains: &[ParaId]); } diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index 3077595ad..b2484fa4b 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -1799,7 +1799,12 @@ impl_runtime_apis! { Session::current_index() }; - Registrar::session_container_chains(session_index).to_vec() + let container_chains = Registrar::session_container_chains(session_index); + let mut para_ids = vec![]; + para_ids.extend(container_chains.parachains); + para_ids.extend(container_chains.parathreads.into_iter().map(|(para_id, _)| para_id)); + + para_ids } /// Fetch genesis data for this para id diff --git a/runtime/dancebox/tests/integration_test.rs b/runtime/dancebox/tests/integration_test.rs index 4f340e3e2..cb773dff6 100644 --- a/runtime/dancebox/tests/integration_test.rs +++ b/runtime/dancebox/tests/integration_test.rs @@ -16,8 +16,6 @@ #![cfg(test)] -use pallet_balances::Instance1; - use { common::*, cumulus_primitives_core::ParaId, @@ -33,6 +31,7 @@ use { nimbus_primitives::NIMBUS_KEY_ID, pallet_author_noting::ContainerChainBlockInfo, pallet_author_noting_runtime_api::runtime_decl_for_author_noting_api::AuthorNotingApi, + pallet_balances::Instance1, pallet_collator_assignment_runtime_api::runtime_decl_for_collator_assignment_api::CollatorAssignmentApi, pallet_migrations::Migration, pallet_pooled_staking::{ @@ -54,6 +53,7 @@ use { staging_xcm::latest::prelude::*, test_relay_sproof_builder::{HeaderAs, ParaHeaderSproofBuilder, ParaHeaderSproofBuilderItem}, tp_consensus::runtime_decl_for_tanssi_authority_assignment_api::TanssiAuthorityAssignmentApiV1, + tp_traits::SlotFrequency, }; mod common; @@ -4988,3 +4988,50 @@ fn test_division_by_0() { assert!(balance.is_err()); }); } + +#[test] +fn test_register_parathread() { + 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_config(default_config()) + .build() + .execute_with(|| { + run_to_block(2); + + // Register + assert_ok!(Registrar::register_parathread( + origin_of(ALICE.into()), + 3001.into(), + SlotFrequency { min: 1, max: 1 }, + empty_genesis_data() + )); + assert_ok!(DataPreservers::set_boot_nodes( + origin_of(ALICE.into()), + 3001.into(), + dummy_boot_nodes() + )); + assert_ok!(Registrar::mark_valid_for_collating( + root_origin(), + 3001.into() + )); + + run_to_session(2); + let assignment = CollatorAssignment::collator_container_chain(); + assert_eq!( + assignment.container_chains[&ParaId::from(3001)], + vec![CHARLIE.into()] + ); + }); +} diff --git a/runtime/flashbox/src/lib.rs b/runtime/flashbox/src/lib.rs index 6d7e55455..0e4bdd564 100644 --- a/runtime/flashbox/src/lib.rs +++ b/runtime/flashbox/src/lib.rs @@ -1468,7 +1468,12 @@ impl_runtime_apis! { Session::current_index() }; - Registrar::session_container_chains(session_index).to_vec() + let container_chains = Registrar::session_container_chains(session_index); + let mut para_ids = vec![]; + para_ids.extend(container_chains.parachains); + para_ids.extend(container_chains.parathreads.into_iter().map(|(para_id, _)| para_id)); + + para_ids } /// Fetch genesis data for this para id diff --git a/runtime/flashbox/tests/integration_test.rs b/runtime/flashbox/tests/integration_test.rs index 59dd94bb8..bf47d003b 100644 --- a/runtime/flashbox/tests/integration_test.rs +++ b/runtime/flashbox/tests/integration_test.rs @@ -40,6 +40,7 @@ use { sp_std::vec, test_relay_sproof_builder::{HeaderAs, ParaHeaderSproofBuilder, ParaHeaderSproofBuilderItem}, tp_consensus::runtime_decl_for_tanssi_authority_assignment_api::TanssiAuthorityAssignmentApiV1, + tp_traits::SlotFrequency, }; mod common; @@ -2698,3 +2699,50 @@ fn test_deregister_and_register_again_does_not_give_free_credits() { assert_eq!(credits, credits_before_2nd_register); }); } + +#[test] +fn test_register_parathread() { + 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_config(default_config()) + .build() + .execute_with(|| { + run_to_block(2); + + // Register + assert_ok!(Registrar::register_parathread( + origin_of(ALICE.into()), + 3001.into(), + SlotFrequency { min: 1, max: 1 }, + empty_genesis_data() + )); + assert_ok!(DataPreservers::set_boot_nodes( + origin_of(ALICE.into()), + 3001.into(), + dummy_boot_nodes() + )); + assert_ok!(Registrar::mark_valid_for_collating( + root_origin(), + 3001.into() + )); + + run_to_session(2); + let assignment = CollatorAssignment::collator_container_chain(); + assert_eq!( + assignment.container_chains[&ParaId::from(3001)], + vec![CHARLIE.into()] + ); + }); +} diff --git a/test/suites/common-tanssi/registrar/test_registrar_deregister.ts b/test/suites/common-tanssi/registrar/test_registrar_deregister.ts index 16a342e6c..a5b4be024 100644 --- a/test/suites/common-tanssi/registrar/test_registrar_deregister.ts +++ b/test/suites/common-tanssi/registrar/test_registrar_deregister.ts @@ -84,8 +84,8 @@ describeSuite({ // Check the number of keys in storage const palletKeysWithOnePara = await polkadotJs.rpc.state.getKeys("0x3fba98689ebed1138735e0e7a5a790ab"); - // 4 fixed keys + genesis data - expect(palletKeysWithOnePara.length).to.be.eq(5); + // 5 fixed keys + genesis data + expect(palletKeysWithOnePara.length).to.be.eq(6); const currentSesssion = await polkadotJs.query.session.currentIndex(); const sessionDelay = await polkadotJs.consts.registrar.sessionDelay; @@ -118,8 +118,8 @@ describeSuite({ // Check the number of keys in storage const palletKeys = await polkadotJs.rpc.state.getKeys("0x3fba98689ebed1138735e0e7a5a790ab"); - // 4 keys: version, registeredParas, pendingParas, pendingToRemove - expect(palletKeys.length).to.be.eq(4); + // 5 keys: Version, RegisteredParas, PendingParas, PendingToRemove, PendingParathreadParams + expect(palletKeys.length).to.be.eq(5); // Check that deregistered hook cleared storage of pallet_author_noting and pallet_services_payment const authorData2000 = (await polkadotJs.query.authorNoting.latestAuthor(2000)).toJSON(); diff --git a/test/suites/common-tanssi/registrar/test_registrar_register_parathread.ts b/test/suites/common-tanssi/registrar/test_registrar_register_parathread.ts new file mode 100644 index 000000000..6f44f18fc --- /dev/null +++ b/test/suites/common-tanssi/registrar/test_registrar_register_parathread.ts @@ -0,0 +1,155 @@ +import "@tanssi/api-augment"; +import { describeSuite, expect, beforeAll } from "@moonwall/cli"; +import { KeyringPair } from "@moonwall/util"; +import { ApiPromise } from "@polkadot/api"; +import { jumpSessions } from "../../../util/block"; + +describeSuite({ + id: "CT0506", + title: "Registrar test suite", + foundationMethods: "dev", + testCases: ({ it, context }) => { + let polkadotJs: ApiPromise; + let alice: KeyringPair; + + beforeAll(() => { + alice = context.keyring.alice; + polkadotJs = context.polkadotJs(); + }); + + it({ + id: "E01", + title: "Checking that fetching registered paraIds is possible", + test: async function () { + const parasRegistered = await polkadotJs.query.registrar.registeredParaIds(); + + // These are registered in genesis + // TODO: fix once we have types + expect(parasRegistered.toJSON()).to.deep.equal([2000, 2001]); + }, + }); + + it({ + id: "E02", + title: "Checking that registering paraIds is possible", + test: async function () { + await context.createBlock(); + + const currentSesssion = await polkadotJs.query.session.currentIndex(); + const sessionDelay = await polkadotJs.consts.registrar.sessionDelay; + const expectedScheduledOnboarding = + BigInt(currentSesssion.toString()) + BigInt(sessionDelay.toString()); + + const slotFrequency = polkadotJs.createType("TpTraitsSlotFrequency", { + min: 1, + max: 1, + }); + const emptyGenesisData = () => { + const g = polkadotJs.createType("TpContainerChainGenesisDataContainerChainGenesisData", { + storage: [ + { + key: "0x636f6465", + value: "0x010203040506", + }, + ], + name: "0x436f6e7461696e657220436861696e2032303030", + id: "0x636f6e7461696e65722d636861696e2d32303030", + forkId: null, + extensions: "0x", + properties: { + tokenMetadata: { + tokenSymbol: "0x61626364", + ss58Format: 42, + tokenDecimals: 12, + }, + isEthereum: false, + }, + }); + return g; + }; + const containerChainGenesisData = emptyGenesisData(); + const bootNodes = [ + "/ip4/127.0.0.1/tcp/33051/ws/p2p/12D3KooWSDsmAa7iFbHdQW4X8B2KbeRYPDLarK6EbevUSYfGkeQw", + ]; + + const tx = polkadotJs.tx.registrar.registerParathread(2002, slotFrequency, containerChainGenesisData); + const tx2 = polkadotJs.tx.dataPreservers.setBootNodes(2002, bootNodes); + const tx3 = polkadotJs.tx.registrar.markValidForCollating(2002); + const nonce = await polkadotJs.rpc.system.accountNextIndex(alice.publicKey); + await context.createBlock([ + await tx.signAsync(alice, { nonce }), + await tx2.signAsync(alice, { nonce: nonce.addn(1) }), + await polkadotJs.tx.sudo.sudo(tx3).signAsync(alice, { nonce: nonce.addn(2) }), + ]); + + const pendingParas = await polkadotJs.query.registrar.pendingParaIds(); + expect(pendingParas.length).to.be.eq(1); + const sessionScheduling = pendingParas[0][0]; + const parasScheduled = pendingParas[0][1]; + + expect(sessionScheduling.toBigInt()).to.be.eq(expectedScheduledOnboarding); + + // These will be the paras in session 2 + // TODO: fix once we have types + expect(parasScheduled.toJSON()).to.deep.equal([2000, 2001, 2002]); + + // Check that the on chain genesis data is set correctly + const onChainGenesisData = await polkadotJs.query.registrar.paraGenesisData(2002); + // TODO: fix once we have types + expect(emptyGenesisData().toJSON()).to.deep.equal(onChainGenesisData.toJSON()); + + // Check the para id has been given some free credits + const credits = (await polkadotJs.query.servicesPayment.blockProductionCredits(2002)).toJSON(); + expect(credits, "Container chain 2002 should have been given credits").toBeGreaterThan(0); + + // Checking that in session 2 paras are registered + await jumpSessions(context, 2); + + // Expect now paraIds to be registered + const parasRegistered = await polkadotJs.query.registrar.registeredParaIds(); + // TODO: fix once we have types + expect(parasRegistered.toJSON()).to.deep.equal([2000, 2001, 2002]); + }, + }); + + it({ + id: "E03", + title: "Registered paraId has been given free credits, and flag can be cleared", + test: async function () { + const paraId = 2002; + const givenFreeCredits = await polkadotJs.query.servicesPayment.givenFreeCredits(paraId); + expect(givenFreeCredits.isNone).to.be.false; + // Test that the storage can be cleared as root + const tx = polkadotJs.tx.servicesPayment.setGivenFreeCredits(paraId, false); + await context.createBlock([await polkadotJs.tx.sudo.sudo(tx).signAsync(alice)]); + + // Flag has been cleared + const givenFreeCredits2 = await polkadotJs.query.servicesPayment.givenFreeCredits(paraId); + expect(givenFreeCredits2.isNone).to.be.true; + }, + }); + + it({ + id: "E04", + title: "Parathread params can be changed", + test: async function () { + const paraId = 2002; + const slotFrequency = polkadotJs.createType("TpTraitsSlotFrequency", { + min: 2, + max: 2, + }); + const tx = polkadotJs.tx.registrar.setParathreadParams(paraId, slotFrequency); + await context.createBlock([await polkadotJs.tx.sudo.sudo(tx).signAsync(alice)]); + + // Checking that in session 2 params have changed + await jumpSessions(context, 2); + + const params = await polkadotJs.query.registrar.parathreadParams(paraId); + expect(params.unwrap().slotFrequency.toJSON()).to.deep.equal({ + min: 2, + max: 2, + }); + }, + }); + }, +}); diff --git a/typescript-api/src/dancebox/interfaces/augment-api-errors.ts b/typescript-api/src/dancebox/interfaces/augment-api-errors.ts index fb8199d96..7728773e8 100644 --- a/typescript-api/src/dancebox/interfaces/augment-api-errors.ts +++ b/typescript-api/src/dancebox/interfaces/augment-api-errors.ts @@ -324,6 +324,8 @@ declare module "@polkadot/api-base/types/errors" { registrar: { /** Attempted to register a ParaId with a genesis data size greater than the limit */ GenesisDataTooBig: AugmentedError; + /** Tried to change parathread params for a para id that is not a registered parathread */ + NotAParathread: AugmentedError; /** Tried to register a ParaId with an account that did not have enough balance for the deposit */ NotSufficientDeposit: AugmentedError; /** Attempted to deregister a ParaId that is already being deregistered */ diff --git a/typescript-api/src/dancebox/interfaces/augment-api-events.ts b/typescript-api/src/dancebox/interfaces/augment-api-events.ts index 50b0e88ed..6a546f7ce 100644 --- a/typescript-api/src/dancebox/interfaces/augment-api-events.ts +++ b/typescript-api/src/dancebox/interfaces/augment-api-events.ts @@ -926,6 +926,8 @@ declare module "@polkadot/api-base/types/events" { ParaIdUnpaused: AugmentedEvent; /** A new para id is now valid for collating. [para_id] */ ParaIdValidForCollating: AugmentedEvent; + /** Parathread params changed */ + ParathreadParamsChanged: AugmentedEvent; /** Generic event */ [key: string]: AugmentedEvent; }; diff --git a/typescript-api/src/dancebox/interfaces/augment-api-query.ts b/typescript-api/src/dancebox/interfaces/augment-api-query.ts index 190744dbb..90e5deeb3 100644 --- a/typescript-api/src/dancebox/interfaces/augment-api-query.ts +++ b/typescript-api/src/dancebox/interfaces/augment-api-query.ts @@ -77,6 +77,7 @@ import type { SpWeightsWeightV2Weight, StagingXcmV3MultiLocation, TpContainerChainGenesisDataContainerChainGenesisData, + TpTraitsParathreadParams, XcmVersionedAssetId, XcmVersionedMultiLocation, } from "@polkadot/types/lookup"; @@ -871,9 +872,21 @@ declare module "@polkadot/api-base/types/storage" { [u32] > & QueryableStorageEntry; + parathreadParams: AugmentedQuery< + ApiType, + (arg: u32 | AnyNumber | Uint8Array) => Observable>, + [u32] + > & + QueryableStorageEntry; paused: AugmentedQuery Observable>, []> & QueryableStorageEntry; pendingParaIds: AugmentedQuery Observable]>>>, []> & QueryableStorageEntry; + pendingParathreadParams: AugmentedQuery< + ApiType, + () => Observable>]>>>, + [] + > & + QueryableStorageEntry; pendingPaused: AugmentedQuery Observable]>>>, []> & QueryableStorageEntry; pendingToRemove: AugmentedQuery Observable]>>>, []> & diff --git a/typescript-api/src/dancebox/interfaces/augment-api-tx.ts b/typescript-api/src/dancebox/interfaces/augment-api-tx.ts index 51dbe7124..d70257e77 100644 --- a/typescript-api/src/dancebox/interfaces/augment-api-tx.ts +++ b/typescript-api/src/dancebox/interfaces/augment-api-tx.ts @@ -31,6 +31,7 @@ import type { StagingXcmV3MultiLocation, TpAuthorNotingInherentOwnParachainInherentData, TpContainerChainGenesisDataContainerChainGenesisData, + TpTraitsSlotFrequency, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, @@ -1519,6 +1520,27 @@ declare module "@polkadot/api-base/types/submittable" { ) => SubmittableExtrinsic, [u32, TpContainerChainGenesisDataContainerChainGenesisData] >; + /** See [`Pallet::register_parathread`]. */ + registerParathread: AugmentedSubmittable< + ( + paraId: u32 | AnyNumber | Uint8Array, + slotFrequency: TpTraitsSlotFrequency | { min?: any; max?: any } | string | Uint8Array, + genesisData: + | TpContainerChainGenesisDataContainerChainGenesisData + | { storage?: any; name?: any; id?: any; forkId?: any; extensions?: any; properties?: any } + | string + | Uint8Array + ) => SubmittableExtrinsic, + [u32, TpTraitsSlotFrequency, TpContainerChainGenesisDataContainerChainGenesisData] + >; + /** See [`Pallet::set_parathread_params`]. */ + setParathreadParams: AugmentedSubmittable< + ( + paraId: u32 | AnyNumber | Uint8Array, + slotFrequency: TpTraitsSlotFrequency | { min?: any; max?: any } | string | Uint8Array + ) => SubmittableExtrinsic, + [u32, TpTraitsSlotFrequency] + >; /** See [`Pallet::unpause_container_chain`]. */ unpauseContainerChain: AugmentedSubmittable< (paraId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic, diff --git a/typescript-api/src/dancebox/interfaces/lookup.ts b/typescript-api/src/dancebox/interfaces/lookup.ts index b1d5a60aa..707ab642c 100644 --- a/typescript-api/src/dancebox/interfaces/lookup.ts +++ b/typescript-api/src/dancebox/interfaces/lookup.ts @@ -444,6 +444,9 @@ export default { ParaIdUnpaused: { paraId: "u32", }, + ParathreadParamsChanged: { + paraId: "u32", + }, }, }, /** Lookup51: pallet_collator_assignment::pallet::Event */ @@ -2139,6 +2142,15 @@ export default { unpause_container_chain: { paraId: "u32", }, + register_parathread: { + paraId: "u32", + slotFrequency: "TpTraitsSlotFrequency", + genesisData: "TpContainerChainGenesisDataContainerChainGenesisData", + }, + set_parathread_params: { + paraId: "u32", + slotFrequency: "TpTraitsSlotFrequency", + }, }, }, /** Lookup248: tp_container_chain_genesis_data::ContainerChainGenesisData */ @@ -2166,7 +2178,12 @@ export default { ss58Format: "u32", tokenDecimals: "u32", }, - /** Lookup255: pallet_configuration::pallet::Call */ + /** Lookup255: tp_traits::SlotFrequency */ + TpTraitsSlotFrequency: { + min: "u32", + max: "u32", + }, + /** Lookup256: pallet_configuration::pallet::Call */ PalletConfigurationCall: { _enum: { set_max_collators: { @@ -2261,9 +2278,9 @@ export default { }, }, }, - /** Lookup257: pallet_collator_assignment::pallet::Call */ + /** Lookup258: pallet_collator_assignment::pallet::Call */ PalletCollatorAssignmentCall: "Null", - /** Lookup258: pallet_author_noting::pallet::Call */ + /** Lookup259: pallet_author_noting::pallet::Call */ PalletAuthorNotingCall: { _enum: { set_latest_author_data: { @@ -2279,13 +2296,13 @@ export default { }, }, }, - /** Lookup259: tp_author_noting_inherent::OwnParachainInherentData */ + /** Lookup260: tp_author_noting_inherent::OwnParachainInherentData */ TpAuthorNotingInherentOwnParachainInherentData: { relayStorageProof: "SpTrieStorageProof", }, - /** Lookup260: pallet_authority_assignment::pallet::Call */ + /** Lookup261: pallet_authority_assignment::pallet::Call */ PalletAuthorityAssignmentCall: "Null", - /** Lookup261: pallet_services_payment::pallet::Call */ + /** Lookup262: pallet_services_payment::pallet::Call */ PalletServicesPaymentCall: { _enum: { purchase_credits: { @@ -2303,7 +2320,7 @@ export default { }, }, }, - /** Lookup263: pallet_data_preservers::pallet::Call */ + /** Lookup264: pallet_data_preservers::pallet::Call */ PalletDataPreserversCall: { _enum: { set_boot_nodes: { @@ -2312,7 +2329,7 @@ export default { }, }, }, - /** Lookup267: pallet_invulnerables::pallet::Call */ + /** Lookup268: pallet_invulnerables::pallet::Call */ PalletInvulnerablesCall: { _enum: { set_invulnerables: { @@ -2329,7 +2346,7 @@ export default { }, }, }, - /** Lookup268: pallet_session::pallet::Call */ + /** Lookup269: pallet_session::pallet::Call */ PalletSessionCall: { _enum: { set_keys: { @@ -2342,19 +2359,19 @@ export default { purge_keys: "Null", }, }, - /** Lookup269: dancebox_runtime::SessionKeys */ + /** Lookup270: dancebox_runtime::SessionKeys */ DanceboxRuntimeSessionKeys: { nimbus: "NimbusPrimitivesNimbusCryptoPublic", }, - /** Lookup270: nimbus_primitives::nimbus_crypto::Public */ + /** Lookup271: nimbus_primitives::nimbus_crypto::Public */ NimbusPrimitivesNimbusCryptoPublic: "SpCoreSr25519Public", - /** Lookup271: sp_core::sr25519::Public */ + /** Lookup272: sp_core::sr25519::Public */ SpCoreSr25519Public: "[u8;32]", - /** Lookup272: pallet_author_inherent::pallet::Call */ + /** Lookup273: pallet_author_inherent::pallet::Call */ PalletAuthorInherentCall: { _enum: ["kick_off_authorship_validation"], }, - /** Lookup273: pallet_pooled_staking::pallet::Call */ + /** Lookup274: pallet_pooled_staking::pallet::Call */ PalletPooledStakingCall: { _enum: { rebalance_hold: { @@ -2388,16 +2405,16 @@ export default { }, }, }, - /** Lookup274: pallet_pooled_staking::pallet::AllTargetPool */ + /** Lookup275: pallet_pooled_staking::pallet::AllTargetPool */ PalletPooledStakingAllTargetPool: { _enum: ["Joining", "AutoCompounding", "ManualRewards", "Leaving"], }, - /** Lookup276: pallet_pooled_staking::pallet::PendingOperationQuery */ + /** Lookup277: pallet_pooled_staking::pallet::PendingOperationQuery */ PalletPooledStakingPendingOperationQuery: { delegator: "AccountId32", operation: "PalletPooledStakingPendingOperationKey", }, - /** Lookup277: pallet_pooled_staking::pallet::PendingOperationKey */ + /** Lookup278: pallet_pooled_staking::pallet::PendingOperationKey */ PalletPooledStakingPendingOperationKey: { _enum: { JoiningAutoCompounding: { @@ -2414,14 +2431,14 @@ export default { }, }, }, - /** Lookup278: pallet_pooled_staking::pallet::SharesOrStake */ + /** Lookup279: pallet_pooled_staking::pallet::SharesOrStake */ PalletPooledStakingSharesOrStake: { _enum: { Shares: "u128", Stake: "u128", }, }, - /** Lookup281: cumulus_pallet_xcmp_queue::pallet::Call */ + /** Lookup282: cumulus_pallet_xcmp_queue::pallet::Call */ CumulusPalletXcmpQueueCall: { _enum: { service_overweight: { @@ -2468,7 +2485,7 @@ export default { }, }, }, - /** Lookup282: cumulus_pallet_dmp_queue::pallet::Call */ + /** Lookup283: cumulus_pallet_dmp_queue::pallet::Call */ CumulusPalletDmpQueueCall: { _enum: { service_overweight: { @@ -2477,7 +2494,7 @@ export default { }, }, }, - /** Lookup283: pallet_xcm::pallet::Call */ + /** Lookup284: pallet_xcm::pallet::Call */ PalletXcmCall: { _enum: { send: { @@ -2532,7 +2549,7 @@ export default { }, }, }, - /** Lookup284: xcm::VersionedXcm */ + /** Lookup285: xcm::VersionedXcm */ XcmVersionedXcm: { _enum: { __Unused0: "Null", @@ -2541,9 +2558,9 @@ export default { V3: "XcmV3Xcm", }, }, - /** Lookup285: xcm::v2::Xcm */ + /** Lookup286: xcm::v2::Xcm */ XcmV2Xcm: "Vec", - /** Lookup287: xcm::v2::Instruction */ + /** Lookup288: xcm::v2::Instruction */ XcmV2Instruction: { _enum: { WithdrawAsset: "XcmV2MultiassetMultiAssets", @@ -2639,7 +2656,7 @@ export default { UnsubscribeVersion: "Null", }, }, - /** Lookup288: xcm::v2::Response */ + /** Lookup289: xcm::v2::Response */ XcmV2Response: { _enum: { Null: "Null", @@ -2648,7 +2665,7 @@ export default { Version: "u32", }, }, - /** Lookup291: xcm::v2::traits::Error */ + /** Lookup292: xcm::v2::traits::Error */ XcmV2TraitsError: { _enum: { Overflow: "Null", @@ -2679,14 +2696,14 @@ export default { WeightNotComputable: "Null", }, }, - /** Lookup292: xcm::v2::multiasset::MultiAssetFilter */ + /** Lookup293: xcm::v2::multiasset::MultiAssetFilter */ XcmV2MultiassetMultiAssetFilter: { _enum: { Definite: "XcmV2MultiassetMultiAssets", Wild: "XcmV2MultiassetWildMultiAsset", }, }, - /** Lookup293: xcm::v2::multiasset::WildMultiAsset */ + /** Lookup294: xcm::v2::multiasset::WildMultiAsset */ XcmV2MultiassetWildMultiAsset: { _enum: { All: "Null", @@ -2696,18 +2713,18 @@ export default { }, }, }, - /** Lookup294: xcm::v2::multiasset::WildFungibility */ + /** Lookup295: xcm::v2::multiasset::WildFungibility */ XcmV2MultiassetWildFungibility: { _enum: ["Fungible", "NonFungible"], }, - /** Lookup295: xcm::v2::WeightLimit */ + /** Lookup296: xcm::v2::WeightLimit */ XcmV2WeightLimit: { _enum: { Unlimited: "Null", Limited: "Compact", }, }, - /** Lookup304: pallet_assets::pallet::Call */ + /** Lookup305: pallet_assets::pallet::Call */ PalletAssetsCall: { _enum: { create: { @@ -2857,7 +2874,7 @@ export default { }, }, }, - /** Lookup305: pallet_foreign_asset_creator::pallet::Call */ + /** Lookup306: pallet_foreign_asset_creator::pallet::Call */ PalletForeignAssetCreatorCall: { _enum: { create_foreign_asset: { @@ -2879,7 +2896,7 @@ export default { }, }, }, - /** Lookup306: pallet_asset_rate::pallet::Call */ + /** Lookup307: pallet_asset_rate::pallet::Call */ PalletAssetRateCall: { _enum: { create: { @@ -2895,7 +2912,7 @@ export default { }, }, }, - /** Lookup307: pallet_root_testing::pallet::Call */ + /** Lookup308: pallet_root_testing::pallet::Call */ PalletRootTestingCall: { _enum: { fill_block: { @@ -2903,27 +2920,27 @@ export default { }, }, }, - /** Lookup308: pallet_sudo::pallet::Error */ + /** Lookup309: pallet_sudo::pallet::Error */ PalletSudoError: { _enum: ["RequireSudo"], }, - /** Lookup309: pallet_utility::pallet::Error */ + /** Lookup310: pallet_utility::pallet::Error */ PalletUtilityError: { _enum: ["TooManyCalls"], }, - /** Lookup312: pallet_proxy::ProxyDefinition */ + /** Lookup313: pallet_proxy::ProxyDefinition */ PalletProxyProxyDefinition: { delegate: "AccountId32", proxyType: "DanceboxRuntimeProxyType", delay: "u32", }, - /** Lookup316: pallet_proxy::Announcement */ + /** Lookup317: pallet_proxy::Announcement */ PalletProxyAnnouncement: { real: "AccountId32", callHash: "H256", height: "u32", }, - /** Lookup318: pallet_proxy::pallet::Error */ + /** Lookup319: pallet_proxy::pallet::Error */ PalletProxyError: { _enum: [ "TooMany", @@ -2936,34 +2953,34 @@ export default { "NoSelfProxy", ], }, - /** Lookup319: pallet_migrations::pallet::Error */ + /** Lookup320: pallet_migrations::pallet::Error */ PalletMigrationsError: { _enum: ["PreimageMissing", "WrongUpperBound", "PreimageIsTooBig", "PreimageAlreadyExists"], }, - /** Lookup320: pallet_maintenance_mode::pallet::Error */ + /** Lookup321: pallet_maintenance_mode::pallet::Error */ PalletMaintenanceModeError: { _enum: ["AlreadyInMaintenanceMode", "NotInMaintenanceMode"], }, - /** Lookup321: pallet_tx_pause::pallet::Error */ + /** Lookup322: pallet_tx_pause::pallet::Error */ PalletTxPauseError: { _enum: ["IsPaused", "IsUnpaused", "Unpausable", "NotFound"], }, - /** Lookup323: pallet_balances::types::BalanceLock */ + /** Lookup324: pallet_balances::types::BalanceLock */ PalletBalancesBalanceLock: { id: "[u8;8]", amount: "u128", reasons: "PalletBalancesReasons", }, - /** Lookup324: pallet_balances::types::Reasons */ + /** Lookup325: pallet_balances::types::Reasons */ PalletBalancesReasons: { _enum: ["Fee", "Misc", "All"], }, - /** Lookup327: pallet_balances::types::ReserveData */ + /** Lookup328: pallet_balances::types::ReserveData */ PalletBalancesReserveData: { id: "[u8;8]", amount: "u128", }, - /** Lookup331: dancebox_runtime::RuntimeHoldReason */ + /** Lookup332: dancebox_runtime::RuntimeHoldReason */ DanceboxRuntimeRuntimeHoldReason: { _enum: { __Unused0: "Null", @@ -3003,16 +3020,16 @@ export default { PooledStaking: "PalletPooledStakingHoldReason", }, }, - /** Lookup332: pallet_pooled_staking::pallet::HoldReason */ + /** Lookup333: pallet_pooled_staking::pallet::HoldReason */ PalletPooledStakingHoldReason: { _enum: ["PooledStake"], }, - /** Lookup335: pallet_balances::types::IdAmount */ + /** Lookup336: pallet_balances::types::IdAmount */ PalletBalancesIdAmount: { id: "[u8;8]", amount: "u128", }, - /** Lookup337: pallet_balances::pallet::Error */ + /** Lookup338: pallet_balances::pallet::Error */ PalletBalancesError: { _enum: [ "VestingBalance", @@ -3027,18 +3044,18 @@ export default { "TooManyFreezes", ], }, - /** Lookup338: pallet_transaction_payment::Releases */ + /** Lookup339: pallet_transaction_payment::Releases */ PalletTransactionPaymentReleases: { _enum: ["V1Ancient", "V2"], }, - /** Lookup339: pallet_identity::types::Registration> */ + /** Lookup340: pallet_identity::types::Registration> */ PalletIdentityRegistration: { judgements: "Vec<(u32,PalletIdentityJudgement)>", deposit: "u128", info: "PalletIdentitySimpleIdentityInfo", }, /** - * Lookup347: pallet_identity::types::RegistrarInfo */ PalletIdentityRegistrarInfo: { @@ -3046,7 +3063,7 @@ export default { fee: "u128", fields: "PalletIdentityBitFlags", }, - /** Lookup349: pallet_identity::pallet::Error */ + /** Lookup350: pallet_identity::pallet::Error */ PalletIdentityError: { _enum: [ "TooManySubAccounts", @@ -3069,12 +3086,16 @@ export default { "JudgementPaymentFailed", ], }, - /** Lookup354: pallet_registrar::pallet::DepositInfo */ + /** Lookup355: tp_traits::ParathreadParams */ + TpTraitsParathreadParams: { + slotFrequency: "TpTraitsSlotFrequency", + }, + /** Lookup361: pallet_registrar::pallet::DepositInfo */ PalletRegistrarDepositInfo: { creator: "AccountId32", deposit: "u128", }, - /** Lookup355: pallet_registrar::pallet::Error */ + /** Lookup362: pallet_registrar::pallet::Error */ PalletRegistrarError: { _enum: [ "ParaIdAlreadyRegistered", @@ -3086,9 +3107,10 @@ export default { "GenesisDataTooBig", "ParaIdNotInPendingVerification", "NotSufficientDeposit", + "NotAParathread", ], }, - /** Lookup356: pallet_configuration::HostConfiguration */ + /** Lookup363: pallet_configuration::HostConfiguration */ PalletConfigurationHostConfiguration: { maxCollators: "u32", minOrchestratorCollators: "u32", @@ -3099,21 +3121,21 @@ export default { parathreadsPerCollator: "u32", targetContainerChainFullness: "Perbill", }, - /** Lookup359: pallet_configuration::pallet::Error */ + /** Lookup366: pallet_configuration::pallet::Error */ PalletConfigurationError: { _enum: ["InvalidNewValue"], }, - /** Lookup360: dp_collator_assignment::AssignedCollators */ + /** Lookup367: dp_collator_assignment::AssignedCollators */ DpCollatorAssignmentAssignedCollatorsAccountId32: { orchestratorChain: "Vec", containerChains: "BTreeMap>", }, - /** Lookup365: pallet_author_noting::pallet::ContainerChainBlockInfo */ + /** Lookup372: pallet_author_noting::pallet::ContainerChainBlockInfo */ PalletAuthorNotingContainerChainBlockInfo: { blockNumber: "u32", author: "AccountId32", }, - /** Lookup366: pallet_author_noting::pallet::Error */ + /** Lookup373: pallet_author_noting::pallet::Error */ PalletAuthorNotingError: { _enum: [ "FailedReading", @@ -3125,39 +3147,39 @@ export default { "NonAuraDigest", ], }, - /** Lookup367: dp_collator_assignment::AssignedCollators */ + /** Lookup374: dp_collator_assignment::AssignedCollators */ DpCollatorAssignmentAssignedCollatorsPublic: { orchestratorChain: "Vec", containerChains: "BTreeMap>", }, - /** Lookup372: pallet_services_payment::pallet::Error */ + /** Lookup379: pallet_services_payment::pallet::Error */ PalletServicesPaymentError: { _enum: ["InsufficientFundsToPurchaseCredits", "InsufficientCredits", "CreditPriceTooExpensive"], }, - /** Lookup373: pallet_data_preservers::pallet::Error */ + /** Lookup380: pallet_data_preservers::pallet::Error */ PalletDataPreserversError: { _enum: ["NoBootNodes"], }, - /** Lookup375: pallet_invulnerables::pallet::Error */ + /** Lookup382: pallet_invulnerables::pallet::Error */ PalletInvulnerablesError: { _enum: ["TooManyInvulnerables", "AlreadyInvulnerable", "NotInvulnerable"], }, - /** Lookup380: sp_core::crypto::KeyTypeId */ + /** Lookup387: sp_core::crypto::KeyTypeId */ SpCoreCryptoKeyTypeId: "[u8;4]", - /** Lookup381: pallet_session::pallet::Error */ + /** Lookup388: pallet_session::pallet::Error */ PalletSessionError: { _enum: ["InvalidProof", "NoAssociatedValidatorId", "DuplicatedKey", "NoKeys", "NoAccount"], }, - /** Lookup385: pallet_author_inherent::pallet::Error */ + /** Lookup392: pallet_author_inherent::pallet::Error */ PalletAuthorInherentError: { _enum: ["AuthorAlreadySet", "NoAccountId", "CannotBeAuthor"], }, - /** Lookup387: pallet_pooled_staking::candidate::EligibleCandidate */ + /** Lookup394: pallet_pooled_staking::candidate::EligibleCandidate */ PalletPooledStakingCandidateEligibleCandidate: { candidate: "AccountId32", stake: "u128", }, - /** Lookup390: pallet_pooled_staking::pallet::PoolsKey */ + /** Lookup397: pallet_pooled_staking::pallet::PoolsKey */ PalletPooledStakingPoolsKey: { _enum: { CandidateTotalStake: "Null", @@ -3199,7 +3221,7 @@ export default { }, }, }, - /** Lookup392: pallet_pooled_staking::pallet::Error */ + /** Lookup399: pallet_pooled_staking::pallet::Error */ PalletPooledStakingError: { _enum: { InvalidPalletSetting: "Null", @@ -3218,26 +3240,26 @@ export default { SwapResultsInZeroShares: "Null", }, }, - /** Lookup393: pallet_inflation_rewards::pallet::ChainsToRewardValue */ + /** Lookup400: pallet_inflation_rewards::pallet::ChainsToRewardValue */ PalletInflationRewardsChainsToRewardValue: { paraIds: "Vec", rewardsPerChain: "u128", }, - /** Lookup395: cumulus_pallet_xcmp_queue::InboundChannelDetails */ + /** Lookup402: cumulus_pallet_xcmp_queue::InboundChannelDetails */ CumulusPalletXcmpQueueInboundChannelDetails: { sender: "u32", state: "CumulusPalletXcmpQueueInboundState", messageMetadata: "Vec<(u32,PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat)>", }, - /** Lookup396: cumulus_pallet_xcmp_queue::InboundState */ + /** Lookup403: cumulus_pallet_xcmp_queue::InboundState */ CumulusPalletXcmpQueueInboundState: { _enum: ["Ok", "Suspended"], }, - /** Lookup399: polkadot_parachain_primitives::primitives::XcmpMessageFormat */ + /** Lookup406: polkadot_parachain_primitives::primitives::XcmpMessageFormat */ PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat: { _enum: ["ConcatenatedVersionedXcm", "ConcatenatedEncodedBlob", "Signals"], }, - /** Lookup402: cumulus_pallet_xcmp_queue::OutboundChannelDetails */ + /** Lookup409: cumulus_pallet_xcmp_queue::OutboundChannelDetails */ CumulusPalletXcmpQueueOutboundChannelDetails: { recipient: "u32", state: "CumulusPalletXcmpQueueOutboundState", @@ -3245,11 +3267,11 @@ export default { firstIndex: "u16", lastIndex: "u16", }, - /** Lookup403: cumulus_pallet_xcmp_queue::OutboundState */ + /** Lookup410: cumulus_pallet_xcmp_queue::OutboundState */ CumulusPalletXcmpQueueOutboundState: { _enum: ["Ok", "Suspended"], }, - /** Lookup405: cumulus_pallet_xcmp_queue::QueueConfigData */ + /** Lookup412: cumulus_pallet_xcmp_queue::QueueConfigData */ CumulusPalletXcmpQueueQueueConfigData: { suspendThreshold: "u32", dropThreshold: "u32", @@ -3258,27 +3280,27 @@ export default { weightRestrictDecay: "SpWeightsWeightV2Weight", xcmpMaxIndividualWeight: "SpWeightsWeightV2Weight", }, - /** Lookup407: cumulus_pallet_xcmp_queue::pallet::Error */ + /** Lookup414: cumulus_pallet_xcmp_queue::pallet::Error */ CumulusPalletXcmpQueueError: { _enum: ["FailedToSend", "BadXcmOrigin", "BadXcm", "BadOverweightIndex", "WeightOverLimit"], }, - /** Lookup408: cumulus_pallet_xcm::pallet::Error */ + /** Lookup415: cumulus_pallet_xcm::pallet::Error */ CumulusPalletXcmError: "Null", - /** Lookup409: cumulus_pallet_dmp_queue::ConfigData */ + /** Lookup416: cumulus_pallet_dmp_queue::ConfigData */ CumulusPalletDmpQueueConfigData: { maxIndividual: "SpWeightsWeightV2Weight", }, - /** Lookup410: cumulus_pallet_dmp_queue::PageIndexData */ + /** Lookup417: cumulus_pallet_dmp_queue::PageIndexData */ CumulusPalletDmpQueuePageIndexData: { beginUsed: "u32", endUsed: "u32", overweightCount: "u64", }, - /** Lookup413: cumulus_pallet_dmp_queue::pallet::Error */ + /** Lookup420: cumulus_pallet_dmp_queue::pallet::Error */ CumulusPalletDmpQueueError: { _enum: ["Unknown", "OverLimit"], }, - /** Lookup414: pallet_xcm::pallet::QueryStatus */ + /** Lookup421: pallet_xcm::pallet::QueryStatus */ PalletXcmQueryStatus: { _enum: { Pending: { @@ -3297,7 +3319,7 @@ export default { }, }, }, - /** Lookup418: xcm::VersionedResponse */ + /** Lookup425: xcm::VersionedResponse */ XcmVersionedResponse: { _enum: { __Unused0: "Null", @@ -3306,7 +3328,7 @@ export default { V3: "XcmV3Response", }, }, - /** Lookup424: pallet_xcm::pallet::VersionMigrationStage */ + /** Lookup431: pallet_xcm::pallet::VersionMigrationStage */ PalletXcmVersionMigrationStage: { _enum: { MigrateSupportedVersion: "Null", @@ -3315,7 +3337,7 @@ export default { MigrateAndNotifyOldTargets: "Null", }, }, - /** Lookup426: xcm::VersionedAssetId */ + /** Lookup433: xcm::VersionedAssetId */ XcmVersionedAssetId: { _enum: { __Unused0: "Null", @@ -3324,14 +3346,14 @@ export default { V3: "XcmV3MultiassetAssetId", }, }, - /** Lookup427: pallet_xcm::pallet::RemoteLockedFungibleRecord */ + /** Lookup434: pallet_xcm::pallet::RemoteLockedFungibleRecord */ PalletXcmRemoteLockedFungibleRecord: { amount: "u128", owner: "XcmVersionedMultiLocation", locker: "XcmVersionedMultiLocation", consumers: "Vec<(Null,u128)>", }, - /** Lookup434: pallet_xcm::pallet::Error */ + /** Lookup441: pallet_xcm::pallet::Error */ PalletXcmError: { _enum: [ "Unreachable", @@ -3356,7 +3378,7 @@ export default { "InUse", ], }, - /** Lookup435: pallet_assets::types::AssetDetails */ + /** Lookup442: pallet_assets::types::AssetDetails */ PalletAssetsAssetDetails: { owner: "AccountId32", issuer: "AccountId32", @@ -3371,22 +3393,22 @@ export default { approvals: "u32", status: "PalletAssetsAssetStatus", }, - /** Lookup436: pallet_assets::types::AssetStatus */ + /** Lookup443: pallet_assets::types::AssetStatus */ PalletAssetsAssetStatus: { _enum: ["Live", "Frozen", "Destroying"], }, - /** Lookup438: pallet_assets::types::AssetAccount */ + /** Lookup445: pallet_assets::types::AssetAccount */ PalletAssetsAssetAccount: { balance: "u128", status: "PalletAssetsAccountStatus", reason: "PalletAssetsExistenceReason", extra: "Null", }, - /** Lookup439: pallet_assets::types::AccountStatus */ + /** Lookup446: pallet_assets::types::AccountStatus */ PalletAssetsAccountStatus: { _enum: ["Liquid", "Frozen", "Blocked"], }, - /** Lookup440: pallet_assets::types::ExistenceReason */ + /** Lookup447: pallet_assets::types::ExistenceReason */ PalletAssetsExistenceReason: { _enum: { Consumer: "Null", @@ -3396,12 +3418,12 @@ export default { DepositFrom: "(AccountId32,u128)", }, }, - /** Lookup442: pallet_assets::types::Approval */ + /** Lookup449: pallet_assets::types::Approval */ PalletAssetsApproval: { amount: "u128", deposit: "u128", }, - /** Lookup443: pallet_assets::types::AssetMetadata> */ + /** Lookup450: pallet_assets::types::AssetMetadata> */ PalletAssetsAssetMetadata: { deposit: "u128", name: "Bytes", @@ -3409,7 +3431,7 @@ export default { decimals: "u8", isFrozen: "bool", }, - /** Lookup445: pallet_assets::pallet::Error */ + /** Lookup452: pallet_assets::pallet::Error */ PalletAssetsError: { _enum: [ "BalanceLow", @@ -3434,15 +3456,15 @@ export default { "CallbackFailed", ], }, - /** Lookup446: pallet_foreign_asset_creator::pallet::Error */ + /** Lookup453: pallet_foreign_asset_creator::pallet::Error */ PalletForeignAssetCreatorError: { _enum: ["AssetAlreadyExists", "AssetDoesNotExist"], }, - /** Lookup447: pallet_asset_rate::pallet::Error */ + /** Lookup454: pallet_asset_rate::pallet::Error */ PalletAssetRateError: { _enum: ["UnknownAssetKind", "AlreadyExists"], }, - /** Lookup452: sp_runtime::MultiSignature */ + /** Lookup459: sp_runtime::MultiSignature */ SpRuntimeMultiSignature: { _enum: { Ed25519: "SpCoreEd25519Signature", @@ -3450,26 +3472,26 @@ export default { Ecdsa: "SpCoreEcdsaSignature", }, }, - /** Lookup453: sp_core::ed25519::Signature */ + /** Lookup460: sp_core::ed25519::Signature */ SpCoreEd25519Signature: "[u8;64]", - /** Lookup455: sp_core::sr25519::Signature */ + /** Lookup462: sp_core::sr25519::Signature */ SpCoreSr25519Signature: "[u8;64]", - /** Lookup456: sp_core::ecdsa::Signature */ + /** Lookup463: sp_core::ecdsa::Signature */ SpCoreEcdsaSignature: "[u8;65]", - /** Lookup459: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ + /** Lookup466: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ FrameSystemExtensionsCheckNonZeroSender: "Null", - /** Lookup460: frame_system::extensions::check_spec_version::CheckSpecVersion */ + /** Lookup467: frame_system::extensions::check_spec_version::CheckSpecVersion */ FrameSystemExtensionsCheckSpecVersion: "Null", - /** Lookup461: frame_system::extensions::check_tx_version::CheckTxVersion */ + /** Lookup468: frame_system::extensions::check_tx_version::CheckTxVersion */ FrameSystemExtensionsCheckTxVersion: "Null", - /** Lookup462: frame_system::extensions::check_genesis::CheckGenesis */ + /** Lookup469: frame_system::extensions::check_genesis::CheckGenesis */ FrameSystemExtensionsCheckGenesis: "Null", - /** Lookup465: frame_system::extensions::check_nonce::CheckNonce */ + /** Lookup472: frame_system::extensions::check_nonce::CheckNonce */ FrameSystemExtensionsCheckNonce: "Compact", - /** Lookup466: frame_system::extensions::check_weight::CheckWeight */ + /** Lookup473: frame_system::extensions::check_weight::CheckWeight */ FrameSystemExtensionsCheckWeight: "Null", - /** Lookup467: pallet_transaction_payment::ChargeTransactionPayment */ + /** Lookup474: pallet_transaction_payment::ChargeTransactionPayment */ PalletTransactionPaymentChargeTransactionPayment: "Compact", - /** Lookup468: dancebox_runtime::Runtime */ + /** Lookup475: dancebox_runtime::Runtime */ DanceboxRuntimeRuntime: "Null", }; diff --git a/typescript-api/src/dancebox/interfaces/registry.ts b/typescript-api/src/dancebox/interfaces/registry.ts index 127b7c504..ba71ee2d5 100644 --- a/typescript-api/src/dancebox/interfaces/registry.ts +++ b/typescript-api/src/dancebox/interfaces/registry.ts @@ -205,6 +205,8 @@ import type { TpContainerChainGenesisDataContainerChainGenesisDataItem, TpContainerChainGenesisDataProperties, TpContainerChainGenesisDataTokenMetadata, + TpTraitsParathreadParams, + TpTraitsSlotFrequency, XcmDoubleEncoded, XcmV2BodyId, XcmV2BodyPart, @@ -456,6 +458,8 @@ declare module "@polkadot/types/types/registry" { TpContainerChainGenesisDataContainerChainGenesisDataItem: TpContainerChainGenesisDataContainerChainGenesisDataItem; TpContainerChainGenesisDataProperties: TpContainerChainGenesisDataProperties; TpContainerChainGenesisDataTokenMetadata: TpContainerChainGenesisDataTokenMetadata; + TpTraitsParathreadParams: TpTraitsParathreadParams; + TpTraitsSlotFrequency: TpTraitsSlotFrequency; XcmDoubleEncoded: XcmDoubleEncoded; XcmV2BodyId: XcmV2BodyId; XcmV2BodyPart: XcmV2BodyPart; diff --git a/typescript-api/src/dancebox/interfaces/types-lookup.ts b/typescript-api/src/dancebox/interfaces/types-lookup.ts index ae95d81e7..8bbffe2f7 100644 --- a/typescript-api/src/dancebox/interfaces/types-lookup.ts +++ b/typescript-api/src/dancebox/interfaces/types-lookup.ts @@ -665,12 +665,17 @@ declare module "@polkadot/types/lookup" { readonly asParaIdUnpaused: { readonly paraId: u32; } & Struct; + readonly isParathreadParamsChanged: boolean; + readonly asParathreadParamsChanged: { + readonly paraId: u32; + } & Struct; readonly type: | "ParaIdRegistered" | "ParaIdDeregistered" | "ParaIdValidForCollating" | "ParaIdPaused" - | "ParaIdUnpaused"; + | "ParaIdUnpaused" + | "ParathreadParamsChanged"; } /** @name PalletCollatorAssignmentEvent (51) */ @@ -2955,12 +2960,25 @@ declare module "@polkadot/types/lookup" { readonly asUnpauseContainerChain: { readonly paraId: u32; } & Struct; + readonly isRegisterParathread: boolean; + readonly asRegisterParathread: { + readonly paraId: u32; + readonly slotFrequency: TpTraitsSlotFrequency; + readonly genesisData: TpContainerChainGenesisDataContainerChainGenesisData; + } & Struct; + readonly isSetParathreadParams: boolean; + readonly asSetParathreadParams: { + readonly paraId: u32; + readonly slotFrequency: TpTraitsSlotFrequency; + } & Struct; readonly type: | "Register" | "Deregister" | "MarkValidForCollating" | "PauseContainerChain" - | "UnpauseContainerChain"; + | "UnpauseContainerChain" + | "RegisterParathread" + | "SetParathreadParams"; } /** @name TpContainerChainGenesisDataContainerChainGenesisData (248) */ @@ -2992,7 +3010,13 @@ declare module "@polkadot/types/lookup" { readonly tokenDecimals: u32; } - /** @name PalletConfigurationCall (255) */ + /** @name TpTraitsSlotFrequency (255) */ + interface TpTraitsSlotFrequency extends Struct { + readonly min: u32; + readonly max: u32; + } + + /** @name PalletConfigurationCall (256) */ interface PalletConfigurationCall extends Enum { readonly isSetMaxCollators: boolean; readonly asSetMaxCollators: { @@ -3042,10 +3066,10 @@ declare module "@polkadot/types/lookup" { | "SetBypassConsistencyCheck"; } - /** @name PalletCollatorAssignmentCall (257) */ + /** @name PalletCollatorAssignmentCall (258) */ type PalletCollatorAssignmentCall = Null; - /** @name PalletAuthorNotingCall (258) */ + /** @name PalletAuthorNotingCall (259) */ interface PalletAuthorNotingCall extends Enum { readonly isSetLatestAuthorData: boolean; readonly asSetLatestAuthorData: { @@ -3064,15 +3088,15 @@ declare module "@polkadot/types/lookup" { readonly type: "SetLatestAuthorData" | "SetAuthor" | "KillAuthorData"; } - /** @name TpAuthorNotingInherentOwnParachainInherentData (259) */ + /** @name TpAuthorNotingInherentOwnParachainInherentData (260) */ interface TpAuthorNotingInherentOwnParachainInherentData extends Struct { readonly relayStorageProof: SpTrieStorageProof; } - /** @name PalletAuthorityAssignmentCall (260) */ + /** @name PalletAuthorityAssignmentCall (261) */ type PalletAuthorityAssignmentCall = Null; - /** @name PalletServicesPaymentCall (261) */ + /** @name PalletServicesPaymentCall (262) */ interface PalletServicesPaymentCall extends Enum { readonly isPurchaseCredits: boolean; readonly asPurchaseCredits: { @@ -3093,7 +3117,7 @@ declare module "@polkadot/types/lookup" { readonly type: "PurchaseCredits" | "SetCredits" | "SetGivenFreeCredits"; } - /** @name PalletDataPreserversCall (263) */ + /** @name PalletDataPreserversCall (264) */ interface PalletDataPreserversCall extends Enum { readonly isSetBootNodes: boolean; readonly asSetBootNodes: { @@ -3103,7 +3127,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SetBootNodes"; } - /** @name PalletInvulnerablesCall (267) */ + /** @name PalletInvulnerablesCall (268) */ interface PalletInvulnerablesCall extends Enum { readonly isSetInvulnerables: boolean; readonly asSetInvulnerables: { @@ -3120,7 +3144,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SetInvulnerables" | "AddInvulnerable" | "RemoveInvulnerable"; } - /** @name PalletSessionCall (268) */ + /** @name PalletSessionCall (269) */ interface PalletSessionCall extends Enum { readonly isSetKeys: boolean; readonly asSetKeys: { @@ -3131,24 +3155,24 @@ declare module "@polkadot/types/lookup" { readonly type: "SetKeys" | "PurgeKeys"; } - /** @name DanceboxRuntimeSessionKeys (269) */ + /** @name DanceboxRuntimeSessionKeys (270) */ interface DanceboxRuntimeSessionKeys extends Struct { readonly nimbus: NimbusPrimitivesNimbusCryptoPublic; } - /** @name NimbusPrimitivesNimbusCryptoPublic (270) */ + /** @name NimbusPrimitivesNimbusCryptoPublic (271) */ interface NimbusPrimitivesNimbusCryptoPublic extends SpCoreSr25519Public {} - /** @name SpCoreSr25519Public (271) */ + /** @name SpCoreSr25519Public (272) */ interface SpCoreSr25519Public extends U8aFixed {} - /** @name PalletAuthorInherentCall (272) */ + /** @name PalletAuthorInherentCall (273) */ interface PalletAuthorInherentCall extends Enum { readonly isKickOffAuthorshipValidation: boolean; readonly type: "KickOffAuthorshipValidation"; } - /** @name PalletPooledStakingCall (273) */ + /** @name PalletPooledStakingCall (274) */ interface PalletPooledStakingCall extends Enum { readonly isRebalanceHold: boolean; readonly asRebalanceHold: { @@ -3196,7 +3220,7 @@ declare module "@polkadot/types/lookup" { | "SwapPool"; } - /** @name PalletPooledStakingAllTargetPool (274) */ + /** @name PalletPooledStakingAllTargetPool (275) */ interface PalletPooledStakingAllTargetPool extends Enum { readonly isJoining: boolean; readonly isAutoCompounding: boolean; @@ -3205,13 +3229,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Joining" | "AutoCompounding" | "ManualRewards" | "Leaving"; } - /** @name PalletPooledStakingPendingOperationQuery (276) */ + /** @name PalletPooledStakingPendingOperationQuery (277) */ interface PalletPooledStakingPendingOperationQuery extends Struct { readonly delegator: AccountId32; readonly operation: PalletPooledStakingPendingOperationKey; } - /** @name PalletPooledStakingPendingOperationKey (277) */ + /** @name PalletPooledStakingPendingOperationKey (278) */ interface PalletPooledStakingPendingOperationKey extends Enum { readonly isJoiningAutoCompounding: boolean; readonly asJoiningAutoCompounding: { @@ -3231,7 +3255,7 @@ declare module "@polkadot/types/lookup" { readonly type: "JoiningAutoCompounding" | "JoiningManualRewards" | "Leaving"; } - /** @name PalletPooledStakingSharesOrStake (278) */ + /** @name PalletPooledStakingSharesOrStake (279) */ interface PalletPooledStakingSharesOrStake extends Enum { readonly isShares: boolean; readonly asShares: u128; @@ -3240,7 +3264,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Shares" | "Stake"; } - /** @name CumulusPalletXcmpQueueCall (281) */ + /** @name CumulusPalletXcmpQueueCall (282) */ interface CumulusPalletXcmpQueueCall extends Enum { readonly isServiceOverweight: boolean; readonly asServiceOverweight: { @@ -3285,7 +3309,7 @@ declare module "@polkadot/types/lookup" { | "UpdateXcmpMaxIndividualWeight"; } - /** @name CumulusPalletDmpQueueCall (282) */ + /** @name CumulusPalletDmpQueueCall (283) */ interface CumulusPalletDmpQueueCall extends Enum { readonly isServiceOverweight: boolean; readonly asServiceOverweight: { @@ -3295,7 +3319,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ServiceOverweight"; } - /** @name PalletXcmCall (283) */ + /** @name PalletXcmCall (284) */ interface PalletXcmCall extends Enum { readonly isSend: boolean; readonly asSend: { @@ -3372,7 +3396,7 @@ declare module "@polkadot/types/lookup" { | "ForceSuspension"; } - /** @name XcmVersionedXcm (284) */ + /** @name XcmVersionedXcm (285) */ interface XcmVersionedXcm extends Enum { readonly isV2: boolean; readonly asV2: XcmV2Xcm; @@ -3381,10 +3405,10 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3"; } - /** @name XcmV2Xcm (285) */ + /** @name XcmV2Xcm (286) */ interface XcmV2Xcm extends Vec {} - /** @name XcmV2Instruction (287) */ + /** @name XcmV2Instruction (288) */ interface XcmV2Instruction extends Enum { readonly isWithdrawAsset: boolean; readonly asWithdrawAsset: XcmV2MultiassetMultiAssets; @@ -3532,7 +3556,7 @@ declare module "@polkadot/types/lookup" { | "UnsubscribeVersion"; } - /** @name XcmV2Response (288) */ + /** @name XcmV2Response (289) */ interface XcmV2Response extends Enum { readonly isNull: boolean; readonly isAssets: boolean; @@ -3544,7 +3568,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Null" | "Assets" | "ExecutionResult" | "Version"; } - /** @name XcmV2TraitsError (291) */ + /** @name XcmV2TraitsError (292) */ interface XcmV2TraitsError extends Enum { readonly isOverflow: boolean; readonly isUnimplemented: boolean; @@ -3603,7 +3627,7 @@ declare module "@polkadot/types/lookup" { | "WeightNotComputable"; } - /** @name XcmV2MultiassetMultiAssetFilter (292) */ + /** @name XcmV2MultiassetMultiAssetFilter (293) */ interface XcmV2MultiassetMultiAssetFilter extends Enum { readonly isDefinite: boolean; readonly asDefinite: XcmV2MultiassetMultiAssets; @@ -3612,7 +3636,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Definite" | "Wild"; } - /** @name XcmV2MultiassetWildMultiAsset (293) */ + /** @name XcmV2MultiassetWildMultiAsset (294) */ interface XcmV2MultiassetWildMultiAsset extends Enum { readonly isAll: boolean; readonly isAllOf: boolean; @@ -3623,14 +3647,14 @@ declare module "@polkadot/types/lookup" { readonly type: "All" | "AllOf"; } - /** @name XcmV2MultiassetWildFungibility (294) */ + /** @name XcmV2MultiassetWildFungibility (295) */ interface XcmV2MultiassetWildFungibility extends Enum { readonly isFungible: boolean; readonly isNonFungible: boolean; readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV2WeightLimit (295) */ + /** @name XcmV2WeightLimit (296) */ interface XcmV2WeightLimit extends Enum { readonly isUnlimited: boolean; readonly isLimited: boolean; @@ -3638,7 +3662,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unlimited" | "Limited"; } - /** @name PalletAssetsCall (304) */ + /** @name PalletAssetsCall (305) */ interface PalletAssetsCall extends Enum { readonly isCreate: boolean; readonly asCreate: { @@ -3852,7 +3876,7 @@ declare module "@polkadot/types/lookup" { | "Block"; } - /** @name PalletForeignAssetCreatorCall (305) */ + /** @name PalletForeignAssetCreatorCall (306) */ interface PalletForeignAssetCreatorCall extends Enum { readonly isCreateForeignAsset: boolean; readonly asCreateForeignAsset: { @@ -3882,7 +3906,7 @@ declare module "@polkadot/types/lookup" { | "DestroyForeignAsset"; } - /** @name PalletAssetRateCall (306) */ + /** @name PalletAssetRateCall (307) */ interface PalletAssetRateCall extends Enum { readonly isCreate: boolean; readonly asCreate: { @@ -3901,7 +3925,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Create" | "Update" | "Remove"; } - /** @name PalletRootTestingCall (307) */ + /** @name PalletRootTestingCall (308) */ interface PalletRootTestingCall extends Enum { readonly isFillBlock: boolean; readonly asFillBlock: { @@ -3910,33 +3934,33 @@ declare module "@polkadot/types/lookup" { readonly type: "FillBlock"; } - /** @name PalletSudoError (308) */ + /** @name PalletSudoError (309) */ interface PalletSudoError extends Enum { readonly isRequireSudo: boolean; readonly type: "RequireSudo"; } - /** @name PalletUtilityError (309) */ + /** @name PalletUtilityError (310) */ interface PalletUtilityError extends Enum { readonly isTooManyCalls: boolean; readonly type: "TooManyCalls"; } - /** @name PalletProxyProxyDefinition (312) */ + /** @name PalletProxyProxyDefinition (313) */ interface PalletProxyProxyDefinition extends Struct { readonly delegate: AccountId32; readonly proxyType: DanceboxRuntimeProxyType; readonly delay: u32; } - /** @name PalletProxyAnnouncement (316) */ + /** @name PalletProxyAnnouncement (317) */ interface PalletProxyAnnouncement extends Struct { readonly real: AccountId32; readonly callHash: H256; readonly height: u32; } - /** @name PalletProxyError (318) */ + /** @name PalletProxyError (319) */ interface PalletProxyError extends Enum { readonly isTooMany: boolean; readonly isNotFound: boolean; @@ -3957,7 +3981,7 @@ declare module "@polkadot/types/lookup" { | "NoSelfProxy"; } - /** @name PalletMigrationsError (319) */ + /** @name PalletMigrationsError (320) */ interface PalletMigrationsError extends Enum { readonly isPreimageMissing: boolean; readonly isWrongUpperBound: boolean; @@ -3966,14 +3990,14 @@ declare module "@polkadot/types/lookup" { readonly type: "PreimageMissing" | "WrongUpperBound" | "PreimageIsTooBig" | "PreimageAlreadyExists"; } - /** @name PalletMaintenanceModeError (320) */ + /** @name PalletMaintenanceModeError (321) */ interface PalletMaintenanceModeError extends Enum { readonly isAlreadyInMaintenanceMode: boolean; readonly isNotInMaintenanceMode: boolean; readonly type: "AlreadyInMaintenanceMode" | "NotInMaintenanceMode"; } - /** @name PalletTxPauseError (321) */ + /** @name PalletTxPauseError (322) */ interface PalletTxPauseError extends Enum { readonly isIsPaused: boolean; readonly isIsUnpaused: boolean; @@ -3982,14 +4006,14 @@ declare module "@polkadot/types/lookup" { readonly type: "IsPaused" | "IsUnpaused" | "Unpausable" | "NotFound"; } - /** @name PalletBalancesBalanceLock (323) */ + /** @name PalletBalancesBalanceLock (324) */ interface PalletBalancesBalanceLock extends Struct { readonly id: U8aFixed; readonly amount: u128; readonly reasons: PalletBalancesReasons; } - /** @name PalletBalancesReasons (324) */ + /** @name PalletBalancesReasons (325) */ interface PalletBalancesReasons extends Enum { readonly isFee: boolean; readonly isMisc: boolean; @@ -3997,32 +4021,32 @@ declare module "@polkadot/types/lookup" { readonly type: "Fee" | "Misc" | "All"; } - /** @name PalletBalancesReserveData (327) */ + /** @name PalletBalancesReserveData (328) */ interface PalletBalancesReserveData extends Struct { readonly id: U8aFixed; readonly amount: u128; } - /** @name DanceboxRuntimeRuntimeHoldReason (331) */ + /** @name DanceboxRuntimeRuntimeHoldReason (332) */ interface DanceboxRuntimeRuntimeHoldReason extends Enum { readonly isPooledStaking: boolean; readonly asPooledStaking: PalletPooledStakingHoldReason; readonly type: "PooledStaking"; } - /** @name PalletPooledStakingHoldReason (332) */ + /** @name PalletPooledStakingHoldReason (333) */ interface PalletPooledStakingHoldReason extends Enum { readonly isPooledStake: boolean; readonly type: "PooledStake"; } - /** @name PalletBalancesIdAmount (335) */ + /** @name PalletBalancesIdAmount (336) */ interface PalletBalancesIdAmount extends Struct { readonly id: U8aFixed; readonly amount: u128; } - /** @name PalletBalancesError (337) */ + /** @name PalletBalancesError (338) */ interface PalletBalancesError extends Enum { readonly isVestingBalance: boolean; readonly isLiquidityRestrictions: boolean; @@ -4047,28 +4071,28 @@ declare module "@polkadot/types/lookup" { | "TooManyFreezes"; } - /** @name PalletTransactionPaymentReleases (338) */ + /** @name PalletTransactionPaymentReleases (339) */ interface PalletTransactionPaymentReleases extends Enum { readonly isV1Ancient: boolean; readonly isV2: boolean; readonly type: "V1Ancient" | "V2"; } - /** @name PalletIdentityRegistration (339) */ + /** @name PalletIdentityRegistration (340) */ interface PalletIdentityRegistration extends Struct { readonly judgements: Vec>; readonly deposit: u128; readonly info: PalletIdentitySimpleIdentityInfo; } - /** @name PalletIdentityRegistrarInfo (347) */ + /** @name PalletIdentityRegistrarInfo (348) */ interface PalletIdentityRegistrarInfo extends Struct { readonly account: AccountId32; readonly fee: u128; readonly fields: PalletIdentityBitFlags; } - /** @name PalletIdentityError (349) */ + /** @name PalletIdentityError (350) */ interface PalletIdentityError extends Enum { readonly isTooManySubAccounts: boolean; readonly isNotFound: boolean; @@ -4109,13 +4133,18 @@ declare module "@polkadot/types/lookup" { | "JudgementPaymentFailed"; } - /** @name PalletRegistrarDepositInfo (354) */ + /** @name TpTraitsParathreadParams (355) */ + interface TpTraitsParathreadParams extends Struct { + readonly slotFrequency: TpTraitsSlotFrequency; + } + + /** @name PalletRegistrarDepositInfo (361) */ interface PalletRegistrarDepositInfo extends Struct { readonly creator: AccountId32; readonly deposit: u128; } - /** @name PalletRegistrarError (355) */ + /** @name PalletRegistrarError (362) */ interface PalletRegistrarError extends Enum { readonly isParaIdAlreadyRegistered: boolean; readonly isParaIdNotRegistered: boolean; @@ -4126,6 +4155,7 @@ declare module "@polkadot/types/lookup" { readonly isGenesisDataTooBig: boolean; readonly isParaIdNotInPendingVerification: boolean; readonly isNotSufficientDeposit: boolean; + readonly isNotAParathread: boolean; readonly type: | "ParaIdAlreadyRegistered" | "ParaIdNotRegistered" @@ -4135,10 +4165,11 @@ declare module "@polkadot/types/lookup" { | "ParaIdListFull" | "GenesisDataTooBig" | "ParaIdNotInPendingVerification" - | "NotSufficientDeposit"; + | "NotSufficientDeposit" + | "NotAParathread"; } - /** @name PalletConfigurationHostConfiguration (356) */ + /** @name PalletConfigurationHostConfiguration (363) */ interface PalletConfigurationHostConfiguration extends Struct { readonly maxCollators: u32; readonly minOrchestratorCollators: u32; @@ -4150,25 +4181,25 @@ declare module "@polkadot/types/lookup" { readonly targetContainerChainFullness: Perbill; } - /** @name PalletConfigurationError (359) */ + /** @name PalletConfigurationError (366) */ interface PalletConfigurationError extends Enum { readonly isInvalidNewValue: boolean; readonly type: "InvalidNewValue"; } - /** @name DpCollatorAssignmentAssignedCollatorsAccountId32 (360) */ + /** @name DpCollatorAssignmentAssignedCollatorsAccountId32 (367) */ interface DpCollatorAssignmentAssignedCollatorsAccountId32 extends Struct { readonly orchestratorChain: Vec; readonly containerChains: BTreeMap>; } - /** @name PalletAuthorNotingContainerChainBlockInfo (365) */ + /** @name PalletAuthorNotingContainerChainBlockInfo (372) */ interface PalletAuthorNotingContainerChainBlockInfo extends Struct { readonly blockNumber: u32; readonly author: AccountId32; } - /** @name PalletAuthorNotingError (366) */ + /** @name PalletAuthorNotingError (373) */ interface PalletAuthorNotingError extends Enum { readonly isFailedReading: boolean; readonly isFailedDecodingHeader: boolean; @@ -4187,13 +4218,13 @@ declare module "@polkadot/types/lookup" { | "NonAuraDigest"; } - /** @name DpCollatorAssignmentAssignedCollatorsPublic (367) */ + /** @name DpCollatorAssignmentAssignedCollatorsPublic (374) */ interface DpCollatorAssignmentAssignedCollatorsPublic extends Struct { readonly orchestratorChain: Vec; readonly containerChains: BTreeMap>; } - /** @name PalletServicesPaymentError (372) */ + /** @name PalletServicesPaymentError (379) */ interface PalletServicesPaymentError extends Enum { readonly isInsufficientFundsToPurchaseCredits: boolean; readonly isInsufficientCredits: boolean; @@ -4201,13 +4232,13 @@ declare module "@polkadot/types/lookup" { readonly type: "InsufficientFundsToPurchaseCredits" | "InsufficientCredits" | "CreditPriceTooExpensive"; } - /** @name PalletDataPreserversError (373) */ + /** @name PalletDataPreserversError (380) */ interface PalletDataPreserversError extends Enum { readonly isNoBootNodes: boolean; readonly type: "NoBootNodes"; } - /** @name PalletInvulnerablesError (375) */ + /** @name PalletInvulnerablesError (382) */ interface PalletInvulnerablesError extends Enum { readonly isTooManyInvulnerables: boolean; readonly isAlreadyInvulnerable: boolean; @@ -4215,10 +4246,10 @@ declare module "@polkadot/types/lookup" { readonly type: "TooManyInvulnerables" | "AlreadyInvulnerable" | "NotInvulnerable"; } - /** @name SpCoreCryptoKeyTypeId (380) */ + /** @name SpCoreCryptoKeyTypeId (387) */ interface SpCoreCryptoKeyTypeId extends U8aFixed {} - /** @name PalletSessionError (381) */ + /** @name PalletSessionError (388) */ interface PalletSessionError extends Enum { readonly isInvalidProof: boolean; readonly isNoAssociatedValidatorId: boolean; @@ -4228,7 +4259,7 @@ declare module "@polkadot/types/lookup" { readonly type: "InvalidProof" | "NoAssociatedValidatorId" | "DuplicatedKey" | "NoKeys" | "NoAccount"; } - /** @name PalletAuthorInherentError (385) */ + /** @name PalletAuthorInherentError (392) */ interface PalletAuthorInherentError extends Enum { readonly isAuthorAlreadySet: boolean; readonly isNoAccountId: boolean; @@ -4236,13 +4267,13 @@ declare module "@polkadot/types/lookup" { readonly type: "AuthorAlreadySet" | "NoAccountId" | "CannotBeAuthor"; } - /** @name PalletPooledStakingCandidateEligibleCandidate (387) */ + /** @name PalletPooledStakingCandidateEligibleCandidate (394) */ interface PalletPooledStakingCandidateEligibleCandidate extends Struct { readonly candidate: AccountId32; readonly stake: u128; } - /** @name PalletPooledStakingPoolsKey (390) */ + /** @name PalletPooledStakingPoolsKey (397) */ interface PalletPooledStakingPoolsKey extends Enum { readonly isCandidateTotalStake: boolean; readonly isJoiningShares: boolean; @@ -4312,7 +4343,7 @@ declare module "@polkadot/types/lookup" { | "LeavingSharesHeldStake"; } - /** @name PalletPooledStakingError (392) */ + /** @name PalletPooledStakingError (399) */ interface PalletPooledStakingError extends Enum { readonly isInvalidPalletSetting: boolean; readonly isDisabledFeature: boolean; @@ -4346,27 +4377,27 @@ declare module "@polkadot/types/lookup" { | "SwapResultsInZeroShares"; } - /** @name PalletInflationRewardsChainsToRewardValue (393) */ + /** @name PalletInflationRewardsChainsToRewardValue (400) */ interface PalletInflationRewardsChainsToRewardValue extends Struct { readonly paraIds: Vec; readonly rewardsPerChain: u128; } - /** @name CumulusPalletXcmpQueueInboundChannelDetails (395) */ + /** @name CumulusPalletXcmpQueueInboundChannelDetails (402) */ interface CumulusPalletXcmpQueueInboundChannelDetails extends Struct { readonly sender: u32; readonly state: CumulusPalletXcmpQueueInboundState; readonly messageMetadata: Vec>; } - /** @name CumulusPalletXcmpQueueInboundState (396) */ + /** @name CumulusPalletXcmpQueueInboundState (403) */ interface CumulusPalletXcmpQueueInboundState extends Enum { readonly isOk: boolean; readonly isSuspended: boolean; readonly type: "Ok" | "Suspended"; } - /** @name PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat (399) */ + /** @name PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat (406) */ interface PolkadotParachainPrimitivesPrimitivesXcmpMessageFormat extends Enum { readonly isConcatenatedVersionedXcm: boolean; readonly isConcatenatedEncodedBlob: boolean; @@ -4374,7 +4405,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ConcatenatedVersionedXcm" | "ConcatenatedEncodedBlob" | "Signals"; } - /** @name CumulusPalletXcmpQueueOutboundChannelDetails (402) */ + /** @name CumulusPalletXcmpQueueOutboundChannelDetails (409) */ interface CumulusPalletXcmpQueueOutboundChannelDetails extends Struct { readonly recipient: u32; readonly state: CumulusPalletXcmpQueueOutboundState; @@ -4383,14 +4414,14 @@ declare module "@polkadot/types/lookup" { readonly lastIndex: u16; } - /** @name CumulusPalletXcmpQueueOutboundState (403) */ + /** @name CumulusPalletXcmpQueueOutboundState (410) */ interface CumulusPalletXcmpQueueOutboundState extends Enum { readonly isOk: boolean; readonly isSuspended: boolean; readonly type: "Ok" | "Suspended"; } - /** @name CumulusPalletXcmpQueueQueueConfigData (405) */ + /** @name CumulusPalletXcmpQueueQueueConfigData (412) */ interface CumulusPalletXcmpQueueQueueConfigData extends Struct { readonly suspendThreshold: u32; readonly dropThreshold: u32; @@ -4400,7 +4431,7 @@ declare module "@polkadot/types/lookup" { readonly xcmpMaxIndividualWeight: SpWeightsWeightV2Weight; } - /** @name CumulusPalletXcmpQueueError (407) */ + /** @name CumulusPalletXcmpQueueError (414) */ interface CumulusPalletXcmpQueueError extends Enum { readonly isFailedToSend: boolean; readonly isBadXcmOrigin: boolean; @@ -4410,29 +4441,29 @@ declare module "@polkadot/types/lookup" { readonly type: "FailedToSend" | "BadXcmOrigin" | "BadXcm" | "BadOverweightIndex" | "WeightOverLimit"; } - /** @name CumulusPalletXcmError (408) */ + /** @name CumulusPalletXcmError (415) */ type CumulusPalletXcmError = Null; - /** @name CumulusPalletDmpQueueConfigData (409) */ + /** @name CumulusPalletDmpQueueConfigData (416) */ interface CumulusPalletDmpQueueConfigData extends Struct { readonly maxIndividual: SpWeightsWeightV2Weight; } - /** @name CumulusPalletDmpQueuePageIndexData (410) */ + /** @name CumulusPalletDmpQueuePageIndexData (417) */ interface CumulusPalletDmpQueuePageIndexData extends Struct { readonly beginUsed: u32; readonly endUsed: u32; readonly overweightCount: u64; } - /** @name CumulusPalletDmpQueueError (413) */ + /** @name CumulusPalletDmpQueueError (420) */ interface CumulusPalletDmpQueueError extends Enum { readonly isUnknown: boolean; readonly isOverLimit: boolean; readonly type: "Unknown" | "OverLimit"; } - /** @name PalletXcmQueryStatus (414) */ + /** @name PalletXcmQueryStatus (421) */ interface PalletXcmQueryStatus extends Enum { readonly isPending: boolean; readonly asPending: { @@ -4454,7 +4485,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Pending" | "VersionNotifier" | "Ready"; } - /** @name XcmVersionedResponse (418) */ + /** @name XcmVersionedResponse (425) */ interface XcmVersionedResponse extends Enum { readonly isV2: boolean; readonly asV2: XcmV2Response; @@ -4463,7 +4494,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3"; } - /** @name PalletXcmVersionMigrationStage (424) */ + /** @name PalletXcmVersionMigrationStage (431) */ interface PalletXcmVersionMigrationStage extends Enum { readonly isMigrateSupportedVersion: boolean; readonly isMigrateVersionNotifiers: boolean; @@ -4477,14 +4508,14 @@ declare module "@polkadot/types/lookup" { | "MigrateAndNotifyOldTargets"; } - /** @name XcmVersionedAssetId (426) */ + /** @name XcmVersionedAssetId (433) */ interface XcmVersionedAssetId extends Enum { readonly isV3: boolean; readonly asV3: XcmV3MultiassetAssetId; readonly type: "V3"; } - /** @name PalletXcmRemoteLockedFungibleRecord (427) */ + /** @name PalletXcmRemoteLockedFungibleRecord (434) */ interface PalletXcmRemoteLockedFungibleRecord extends Struct { readonly amount: u128; readonly owner: XcmVersionedMultiLocation; @@ -4492,7 +4523,7 @@ declare module "@polkadot/types/lookup" { readonly consumers: Vec>; } - /** @name PalletXcmError (434) */ + /** @name PalletXcmError (441) */ interface PalletXcmError extends Enum { readonly isUnreachable: boolean; readonly isSendFailure: boolean; @@ -4537,7 +4568,7 @@ declare module "@polkadot/types/lookup" { | "InUse"; } - /** @name PalletAssetsAssetDetails (435) */ + /** @name PalletAssetsAssetDetails (442) */ interface PalletAssetsAssetDetails extends Struct { readonly owner: AccountId32; readonly issuer: AccountId32; @@ -4553,7 +4584,7 @@ declare module "@polkadot/types/lookup" { readonly status: PalletAssetsAssetStatus; } - /** @name PalletAssetsAssetStatus (436) */ + /** @name PalletAssetsAssetStatus (443) */ interface PalletAssetsAssetStatus extends Enum { readonly isLive: boolean; readonly isFrozen: boolean; @@ -4561,7 +4592,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Live" | "Frozen" | "Destroying"; } - /** @name PalletAssetsAssetAccount (438) */ + /** @name PalletAssetsAssetAccount (445) */ interface PalletAssetsAssetAccount extends Struct { readonly balance: u128; readonly status: PalletAssetsAccountStatus; @@ -4569,7 +4600,7 @@ declare module "@polkadot/types/lookup" { readonly extra: Null; } - /** @name PalletAssetsAccountStatus (439) */ + /** @name PalletAssetsAccountStatus (446) */ interface PalletAssetsAccountStatus extends Enum { readonly isLiquid: boolean; readonly isFrozen: boolean; @@ -4577,7 +4608,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Liquid" | "Frozen" | "Blocked"; } - /** @name PalletAssetsExistenceReason (440) */ + /** @name PalletAssetsExistenceReason (447) */ interface PalletAssetsExistenceReason extends Enum { readonly isConsumer: boolean; readonly isSufficient: boolean; @@ -4589,13 +4620,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Consumer" | "Sufficient" | "DepositHeld" | "DepositRefunded" | "DepositFrom"; } - /** @name PalletAssetsApproval (442) */ + /** @name PalletAssetsApproval (449) */ interface PalletAssetsApproval extends Struct { readonly amount: u128; readonly deposit: u128; } - /** @name PalletAssetsAssetMetadata (443) */ + /** @name PalletAssetsAssetMetadata (450) */ interface PalletAssetsAssetMetadata extends Struct { readonly deposit: u128; readonly name: Bytes; @@ -4604,7 +4635,7 @@ declare module "@polkadot/types/lookup" { readonly isFrozen: bool; } - /** @name PalletAssetsError (445) */ + /** @name PalletAssetsError (452) */ interface PalletAssetsError extends Enum { readonly isBalanceLow: boolean; readonly isNoAccount: boolean; @@ -4649,21 +4680,21 @@ declare module "@polkadot/types/lookup" { | "CallbackFailed"; } - /** @name PalletForeignAssetCreatorError (446) */ + /** @name PalletForeignAssetCreatorError (453) */ interface PalletForeignAssetCreatorError extends Enum { readonly isAssetAlreadyExists: boolean; readonly isAssetDoesNotExist: boolean; readonly type: "AssetAlreadyExists" | "AssetDoesNotExist"; } - /** @name PalletAssetRateError (447) */ + /** @name PalletAssetRateError (454) */ interface PalletAssetRateError extends Enum { readonly isUnknownAssetKind: boolean; readonly isAlreadyExists: boolean; readonly type: "UnknownAssetKind" | "AlreadyExists"; } - /** @name SpRuntimeMultiSignature (452) */ + /** @name SpRuntimeMultiSignature (459) */ interface SpRuntimeMultiSignature extends Enum { readonly isEd25519: boolean; readonly asEd25519: SpCoreEd25519Signature; @@ -4674,36 +4705,36 @@ declare module "@polkadot/types/lookup" { readonly type: "Ed25519" | "Sr25519" | "Ecdsa"; } - /** @name SpCoreEd25519Signature (453) */ + /** @name SpCoreEd25519Signature (460) */ interface SpCoreEd25519Signature extends U8aFixed {} - /** @name SpCoreSr25519Signature (455) */ + /** @name SpCoreSr25519Signature (462) */ interface SpCoreSr25519Signature extends U8aFixed {} - /** @name SpCoreEcdsaSignature (456) */ + /** @name SpCoreEcdsaSignature (463) */ interface SpCoreEcdsaSignature extends U8aFixed {} - /** @name FrameSystemExtensionsCheckNonZeroSender (459) */ + /** @name FrameSystemExtensionsCheckNonZeroSender (466) */ type FrameSystemExtensionsCheckNonZeroSender = Null; - /** @name FrameSystemExtensionsCheckSpecVersion (460) */ + /** @name FrameSystemExtensionsCheckSpecVersion (467) */ type FrameSystemExtensionsCheckSpecVersion = Null; - /** @name FrameSystemExtensionsCheckTxVersion (461) */ + /** @name FrameSystemExtensionsCheckTxVersion (468) */ type FrameSystemExtensionsCheckTxVersion = Null; - /** @name FrameSystemExtensionsCheckGenesis (462) */ + /** @name FrameSystemExtensionsCheckGenesis (469) */ type FrameSystemExtensionsCheckGenesis = Null; - /** @name FrameSystemExtensionsCheckNonce (465) */ + /** @name FrameSystemExtensionsCheckNonce (472) */ interface FrameSystemExtensionsCheckNonce extends Compact {} - /** @name FrameSystemExtensionsCheckWeight (466) */ + /** @name FrameSystemExtensionsCheckWeight (473) */ type FrameSystemExtensionsCheckWeight = Null; - /** @name PalletTransactionPaymentChargeTransactionPayment (467) */ + /** @name PalletTransactionPaymentChargeTransactionPayment (474) */ interface PalletTransactionPaymentChargeTransactionPayment extends Compact {} - /** @name DanceboxRuntimeRuntime (468) */ + /** @name DanceboxRuntimeRuntime (475) */ type DanceboxRuntimeRuntime = Null; } // declare module diff --git a/typescript-api/src/flashbox/interfaces/augment-api-errors.ts b/typescript-api/src/flashbox/interfaces/augment-api-errors.ts index 96690121c..b2f2361cf 100644 --- a/typescript-api/src/flashbox/interfaces/augment-api-errors.ts +++ b/typescript-api/src/flashbox/interfaces/augment-api-errors.ts @@ -182,6 +182,8 @@ declare module "@polkadot/api-base/types/errors" { registrar: { /** Attempted to register a ParaId with a genesis data size greater than the limit */ GenesisDataTooBig: AugmentedError; + /** Tried to change parathread params for a para id that is not a registered parathread */ + NotAParathread: AugmentedError; /** Tried to register a ParaId with an account that did not have enough balance for the deposit */ NotSufficientDeposit: AugmentedError; /** Attempted to deregister a ParaId that is already being deregistered */ diff --git a/typescript-api/src/flashbox/interfaces/augment-api-events.ts b/typescript-api/src/flashbox/interfaces/augment-api-events.ts index 49fb77522..0cb7730b4 100644 --- a/typescript-api/src/flashbox/interfaces/augment-api-events.ts +++ b/typescript-api/src/flashbox/interfaces/augment-api-events.ts @@ -337,6 +337,8 @@ declare module "@polkadot/api-base/types/events" { ParaIdUnpaused: AugmentedEvent; /** A new para id is now valid for collating. [para_id] */ ParaIdValidForCollating: AugmentedEvent; + /** Parathread params changed */ + ParathreadParamsChanged: AugmentedEvent; /** Generic event */ [key: string]: AugmentedEvent; }; diff --git a/typescript-api/src/flashbox/interfaces/augment-api-query.ts b/typescript-api/src/flashbox/interfaces/augment-api-query.ts index 7b5a3e77c..ffa54e075 100644 --- a/typescript-api/src/flashbox/interfaces/augment-api-query.ts +++ b/typescript-api/src/flashbox/interfaces/augment-api-query.ts @@ -48,6 +48,7 @@ import type { SpTrieStorageProof, SpWeightsWeightV2Weight, TpContainerChainGenesisDataContainerChainGenesisData, + TpTraitsParathreadParams, } from "@polkadot/types/lookup"; import type { Observable } from "@polkadot/types/types"; @@ -571,9 +572,21 @@ declare module "@polkadot/api-base/types/storage" { [u32] > & QueryableStorageEntry; + parathreadParams: AugmentedQuery< + ApiType, + (arg: u32 | AnyNumber | Uint8Array) => Observable>, + [u32] + > & + QueryableStorageEntry; paused: AugmentedQuery Observable>, []> & QueryableStorageEntry; pendingParaIds: AugmentedQuery Observable]>>>, []> & QueryableStorageEntry; + pendingParathreadParams: AugmentedQuery< + ApiType, + () => Observable>]>>>, + [] + > & + QueryableStorageEntry; pendingPaused: AugmentedQuery Observable]>>>, []> & QueryableStorageEntry; pendingToRemove: AugmentedQuery Observable]>>>, []> & diff --git a/typescript-api/src/flashbox/interfaces/augment-api-tx.ts b/typescript-api/src/flashbox/interfaces/augment-api-tx.ts index 6bfd8322b..7ecf49dd8 100644 --- a/typescript-api/src/flashbox/interfaces/augment-api-tx.ts +++ b/typescript-api/src/flashbox/interfaces/augment-api-tx.ts @@ -26,6 +26,7 @@ import type { SpWeightsWeightV2Weight, TpAuthorNotingInherentOwnParachainInherentData, TpContainerChainGenesisDataContainerChainGenesisData, + TpTraitsSlotFrequency, } from "@polkadot/types/lookup"; export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>; @@ -797,6 +798,27 @@ declare module "@polkadot/api-base/types/submittable" { ) => SubmittableExtrinsic, [u32, TpContainerChainGenesisDataContainerChainGenesisData] >; + /** See [`Pallet::register_parathread`]. */ + registerParathread: AugmentedSubmittable< + ( + paraId: u32 | AnyNumber | Uint8Array, + slotFrequency: TpTraitsSlotFrequency | { min?: any; max?: any } | string | Uint8Array, + genesisData: + | TpContainerChainGenesisDataContainerChainGenesisData + | { storage?: any; name?: any; id?: any; forkId?: any; extensions?: any; properties?: any } + | string + | Uint8Array + ) => SubmittableExtrinsic, + [u32, TpTraitsSlotFrequency, TpContainerChainGenesisDataContainerChainGenesisData] + >; + /** See [`Pallet::set_parathread_params`]. */ + setParathreadParams: AugmentedSubmittable< + ( + paraId: u32 | AnyNumber | Uint8Array, + slotFrequency: TpTraitsSlotFrequency | { min?: any; max?: any } | string | Uint8Array + ) => SubmittableExtrinsic, + [u32, TpTraitsSlotFrequency] + >; /** See [`Pallet::unpause_container_chain`]. */ unpauseContainerChain: AugmentedSubmittable< (paraId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic, diff --git a/typescript-api/src/flashbox/interfaces/lookup.ts b/typescript-api/src/flashbox/interfaces/lookup.ts index da1643a02..e49c605e6 100644 --- a/typescript-api/src/flashbox/interfaces/lookup.ts +++ b/typescript-api/src/flashbox/interfaces/lookup.ts @@ -444,6 +444,9 @@ export default { ParaIdUnpaused: { paraId: "u32", }, + ParathreadParamsChanged: { + paraId: "u32", + }, }, }, /** Lookup51: pallet_collator_assignment::pallet::Event */ @@ -1072,6 +1075,15 @@ export default { unpause_container_chain: { paraId: "u32", }, + register_parathread: { + paraId: "u32", + slotFrequency: "TpTraitsSlotFrequency", + genesisData: "TpContainerChainGenesisDataContainerChainGenesisData", + }, + set_parathread_params: { + paraId: "u32", + slotFrequency: "TpTraitsSlotFrequency", + }, }, }, /** Lookup187: tp_container_chain_genesis_data::ContainerChainGenesisData */ @@ -1099,7 +1111,12 @@ export default { ss58Format: "u32", tokenDecimals: "u32", }, - /** Lookup194: pallet_configuration::pallet::Call */ + /** Lookup194: tp_traits::SlotFrequency */ + TpTraitsSlotFrequency: { + min: "u32", + max: "u32", + }, + /** Lookup195: pallet_configuration::pallet::Call */ PalletConfigurationCall: { _enum: { set_max_collators: { @@ -1194,9 +1211,9 @@ export default { }, }, }, - /** Lookup196: pallet_collator_assignment::pallet::Call */ + /** Lookup197: pallet_collator_assignment::pallet::Call */ PalletCollatorAssignmentCall: "Null", - /** Lookup197: pallet_author_noting::pallet::Call */ + /** Lookup198: pallet_author_noting::pallet::Call */ PalletAuthorNotingCall: { _enum: { set_latest_author_data: { @@ -1212,13 +1229,13 @@ export default { }, }, }, - /** Lookup198: tp_author_noting_inherent::OwnParachainInherentData */ + /** Lookup199: tp_author_noting_inherent::OwnParachainInherentData */ TpAuthorNotingInherentOwnParachainInherentData: { relayStorageProof: "SpTrieStorageProof", }, - /** Lookup199: pallet_authority_assignment::pallet::Call */ + /** Lookup200: pallet_authority_assignment::pallet::Call */ PalletAuthorityAssignmentCall: "Null", - /** Lookup200: pallet_services_payment::pallet::Call */ + /** Lookup201: pallet_services_payment::pallet::Call */ PalletServicesPaymentCall: { _enum: { purchase_credits: { @@ -1236,7 +1253,7 @@ export default { }, }, }, - /** Lookup202: pallet_data_preservers::pallet::Call */ + /** Lookup203: pallet_data_preservers::pallet::Call */ PalletDataPreserversCall: { _enum: { set_boot_nodes: { @@ -1245,7 +1262,7 @@ export default { }, }, }, - /** Lookup206: pallet_invulnerables::pallet::Call */ + /** Lookup207: pallet_invulnerables::pallet::Call */ PalletInvulnerablesCall: { _enum: { set_invulnerables: { @@ -1262,7 +1279,7 @@ export default { }, }, }, - /** Lookup207: pallet_session::pallet::Call */ + /** Lookup208: pallet_session::pallet::Call */ PalletSessionCall: { _enum: { set_keys: { @@ -1275,19 +1292,19 @@ export default { purge_keys: "Null", }, }, - /** Lookup208: flashbox_runtime::SessionKeys */ + /** Lookup209: flashbox_runtime::SessionKeys */ FlashboxRuntimeSessionKeys: { nimbus: "NimbusPrimitivesNimbusCryptoPublic", }, - /** Lookup209: nimbus_primitives::nimbus_crypto::Public */ + /** Lookup210: nimbus_primitives::nimbus_crypto::Public */ NimbusPrimitivesNimbusCryptoPublic: "SpCoreSr25519Public", - /** Lookup210: sp_core::sr25519::Public */ + /** Lookup211: sp_core::sr25519::Public */ SpCoreSr25519Public: "[u8;32]", - /** Lookup211: pallet_author_inherent::pallet::Call */ + /** Lookup212: pallet_author_inherent::pallet::Call */ PalletAuthorInherentCall: { _enum: ["kick_off_authorship_validation"], }, - /** Lookup212: pallet_root_testing::pallet::Call */ + /** Lookup213: pallet_root_testing::pallet::Call */ PalletRootTestingCall: { _enum: { fill_block: { @@ -1295,27 +1312,27 @@ export default { }, }, }, - /** Lookup213: pallet_sudo::pallet::Error */ + /** Lookup214: pallet_sudo::pallet::Error */ PalletSudoError: { _enum: ["RequireSudo"], }, - /** Lookup214: pallet_utility::pallet::Error */ + /** Lookup215: pallet_utility::pallet::Error */ PalletUtilityError: { _enum: ["TooManyCalls"], }, - /** Lookup217: pallet_proxy::ProxyDefinition */ + /** Lookup218: pallet_proxy::ProxyDefinition */ PalletProxyProxyDefinition: { delegate: "AccountId32", proxyType: "FlashboxRuntimeProxyType", delay: "u32", }, - /** Lookup221: pallet_proxy::Announcement */ + /** Lookup222: pallet_proxy::Announcement */ PalletProxyAnnouncement: { real: "AccountId32", callHash: "H256", height: "u32", }, - /** Lookup223: pallet_proxy::pallet::Error */ + /** Lookup224: pallet_proxy::pallet::Error */ PalletProxyError: { _enum: [ "TooMany", @@ -1328,41 +1345,41 @@ export default { "NoSelfProxy", ], }, - /** Lookup224: pallet_migrations::pallet::Error */ + /** Lookup225: pallet_migrations::pallet::Error */ PalletMigrationsError: { _enum: ["PreimageMissing", "WrongUpperBound", "PreimageIsTooBig", "PreimageAlreadyExists"], }, - /** Lookup225: pallet_maintenance_mode::pallet::Error */ + /** Lookup226: pallet_maintenance_mode::pallet::Error */ PalletMaintenanceModeError: { _enum: ["AlreadyInMaintenanceMode", "NotInMaintenanceMode"], }, - /** Lookup226: pallet_tx_pause::pallet::Error */ + /** Lookup227: pallet_tx_pause::pallet::Error */ PalletTxPauseError: { _enum: ["IsPaused", "IsUnpaused", "Unpausable", "NotFound"], }, - /** Lookup228: pallet_balances::types::BalanceLock */ + /** Lookup229: pallet_balances::types::BalanceLock */ PalletBalancesBalanceLock: { id: "[u8;8]", amount: "u128", reasons: "PalletBalancesReasons", }, - /** Lookup229: pallet_balances::types::Reasons */ + /** Lookup230: pallet_balances::types::Reasons */ PalletBalancesReasons: { _enum: ["Fee", "Misc", "All"], }, - /** Lookup232: pallet_balances::types::ReserveData */ + /** Lookup233: pallet_balances::types::ReserveData */ PalletBalancesReserveData: { id: "[u8;8]", amount: "u128", }, - /** Lookup236: flashbox_runtime::RuntimeHoldReason */ + /** Lookup237: flashbox_runtime::RuntimeHoldReason */ FlashboxRuntimeRuntimeHoldReason: "Null", - /** Lookup239: pallet_balances::types::IdAmount */ + /** Lookup240: pallet_balances::types::IdAmount */ PalletBalancesIdAmount: { id: "[u8;8]", amount: "u128", }, - /** Lookup241: pallet_balances::pallet::Error */ + /** Lookup242: pallet_balances::pallet::Error */ PalletBalancesError: { _enum: [ "VestingBalance", @@ -1377,18 +1394,18 @@ export default { "TooManyFreezes", ], }, - /** Lookup242: pallet_transaction_payment::Releases */ + /** Lookup243: pallet_transaction_payment::Releases */ PalletTransactionPaymentReleases: { _enum: ["V1Ancient", "V2"], }, - /** Lookup243: pallet_identity::types::Registration> */ + /** Lookup244: pallet_identity::types::Registration> */ PalletIdentityRegistration: { judgements: "Vec<(u32,PalletIdentityJudgement)>", deposit: "u128", info: "PalletIdentitySimpleIdentityInfo", }, /** - * Lookup251: pallet_identity::types::RegistrarInfo */ PalletIdentityRegistrarInfo: { @@ -1396,7 +1413,7 @@ export default { fee: "u128", fields: "PalletIdentityBitFlags", }, - /** Lookup253: pallet_identity::pallet::Error */ + /** Lookup254: pallet_identity::pallet::Error */ PalletIdentityError: { _enum: [ "TooManySubAccounts", @@ -1419,12 +1436,16 @@ export default { "JudgementPaymentFailed", ], }, - /** Lookup258: pallet_registrar::pallet::DepositInfo */ + /** Lookup259: tp_traits::ParathreadParams */ + TpTraitsParathreadParams: { + slotFrequency: "TpTraitsSlotFrequency", + }, + /** Lookup265: pallet_registrar::pallet::DepositInfo */ PalletRegistrarDepositInfo: { creator: "AccountId32", deposit: "u128", }, - /** Lookup259: pallet_registrar::pallet::Error */ + /** Lookup266: pallet_registrar::pallet::Error */ PalletRegistrarError: { _enum: [ "ParaIdAlreadyRegistered", @@ -1436,9 +1457,10 @@ export default { "GenesisDataTooBig", "ParaIdNotInPendingVerification", "NotSufficientDeposit", + "NotAParathread", ], }, - /** Lookup260: pallet_configuration::HostConfiguration */ + /** Lookup267: pallet_configuration::HostConfiguration */ PalletConfigurationHostConfiguration: { maxCollators: "u32", minOrchestratorCollators: "u32", @@ -1449,21 +1471,21 @@ export default { parathreadsPerCollator: "u32", targetContainerChainFullness: "Perbill", }, - /** Lookup263: pallet_configuration::pallet::Error */ + /** Lookup270: pallet_configuration::pallet::Error */ PalletConfigurationError: { _enum: ["InvalidNewValue"], }, - /** Lookup264: dp_collator_assignment::AssignedCollators */ + /** Lookup271: dp_collator_assignment::AssignedCollators */ DpCollatorAssignmentAssignedCollatorsAccountId32: { orchestratorChain: "Vec", containerChains: "BTreeMap>", }, - /** Lookup269: pallet_author_noting::pallet::ContainerChainBlockInfo */ + /** Lookup276: pallet_author_noting::pallet::ContainerChainBlockInfo */ PalletAuthorNotingContainerChainBlockInfo: { blockNumber: "u32", author: "AccountId32", }, - /** Lookup270: pallet_author_noting::pallet::Error */ + /** Lookup277: pallet_author_noting::pallet::Error */ PalletAuthorNotingError: { _enum: [ "FailedReading", @@ -1475,39 +1497,39 @@ export default { "NonAuraDigest", ], }, - /** Lookup271: dp_collator_assignment::AssignedCollators */ + /** Lookup278: dp_collator_assignment::AssignedCollators */ DpCollatorAssignmentAssignedCollatorsPublic: { orchestratorChain: "Vec", containerChains: "BTreeMap>", }, - /** Lookup276: pallet_services_payment::pallet::Error */ + /** Lookup283: pallet_services_payment::pallet::Error */ PalletServicesPaymentError: { _enum: ["InsufficientFundsToPurchaseCredits", "InsufficientCredits", "CreditPriceTooExpensive"], }, - /** Lookup277: pallet_data_preservers::pallet::Error */ + /** Lookup284: pallet_data_preservers::pallet::Error */ PalletDataPreserversError: { _enum: ["NoBootNodes"], }, - /** Lookup279: pallet_invulnerables::pallet::Error */ + /** Lookup286: pallet_invulnerables::pallet::Error */ PalletInvulnerablesError: { _enum: ["TooManyInvulnerables", "AlreadyInvulnerable", "NotInvulnerable"], }, - /** Lookup284: sp_core::crypto::KeyTypeId */ + /** Lookup291: sp_core::crypto::KeyTypeId */ SpCoreCryptoKeyTypeId: "[u8;4]", - /** Lookup285: pallet_session::pallet::Error */ + /** Lookup292: pallet_session::pallet::Error */ PalletSessionError: { _enum: ["InvalidProof", "NoAssociatedValidatorId", "DuplicatedKey", "NoKeys", "NoAccount"], }, - /** Lookup289: pallet_author_inherent::pallet::Error */ + /** Lookup296: pallet_author_inherent::pallet::Error */ PalletAuthorInherentError: { _enum: ["AuthorAlreadySet", "NoAccountId", "CannotBeAuthor"], }, - /** Lookup290: pallet_inflation_rewards::pallet::ChainsToRewardValue */ + /** Lookup297: pallet_inflation_rewards::pallet::ChainsToRewardValue */ PalletInflationRewardsChainsToRewardValue: { paraIds: "Vec", rewardsPerChain: "u128", }, - /** Lookup295: sp_runtime::MultiSignature */ + /** Lookup302: sp_runtime::MultiSignature */ SpRuntimeMultiSignature: { _enum: { Ed25519: "SpCoreEd25519Signature", @@ -1515,26 +1537,26 @@ export default { Ecdsa: "SpCoreEcdsaSignature", }, }, - /** Lookup296: sp_core::ed25519::Signature */ + /** Lookup303: sp_core::ed25519::Signature */ SpCoreEd25519Signature: "[u8;64]", - /** Lookup298: sp_core::sr25519::Signature */ + /** Lookup305: sp_core::sr25519::Signature */ SpCoreSr25519Signature: "[u8;64]", - /** Lookup299: sp_core::ecdsa::Signature */ + /** Lookup306: sp_core::ecdsa::Signature */ SpCoreEcdsaSignature: "[u8;65]", - /** Lookup302: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ + /** Lookup309: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ FrameSystemExtensionsCheckNonZeroSender: "Null", - /** Lookup303: frame_system::extensions::check_spec_version::CheckSpecVersion */ + /** Lookup310: frame_system::extensions::check_spec_version::CheckSpecVersion */ FrameSystemExtensionsCheckSpecVersion: "Null", - /** Lookup304: frame_system::extensions::check_tx_version::CheckTxVersion */ + /** Lookup311: frame_system::extensions::check_tx_version::CheckTxVersion */ FrameSystemExtensionsCheckTxVersion: "Null", - /** Lookup305: frame_system::extensions::check_genesis::CheckGenesis */ + /** Lookup312: frame_system::extensions::check_genesis::CheckGenesis */ FrameSystemExtensionsCheckGenesis: "Null", - /** Lookup308: frame_system::extensions::check_nonce::CheckNonce */ + /** Lookup315: frame_system::extensions::check_nonce::CheckNonce */ FrameSystemExtensionsCheckNonce: "Compact", - /** Lookup309: frame_system::extensions::check_weight::CheckWeight */ + /** Lookup316: frame_system::extensions::check_weight::CheckWeight */ FrameSystemExtensionsCheckWeight: "Null", - /** Lookup310: pallet_transaction_payment::ChargeTransactionPayment */ + /** Lookup317: pallet_transaction_payment::ChargeTransactionPayment */ PalletTransactionPaymentChargeTransactionPayment: "Compact", - /** Lookup311: flashbox_runtime::Runtime */ + /** Lookup318: flashbox_runtime::Runtime */ FlashboxRuntimeRuntime: "Null", }; diff --git a/typescript-api/src/flashbox/interfaces/registry.ts b/typescript-api/src/flashbox/interfaces/registry.ts index 391d24000..9a5db4d5b 100644 --- a/typescript-api/src/flashbox/interfaces/registry.ts +++ b/typescript-api/src/flashbox/interfaces/registry.ts @@ -153,6 +153,8 @@ import type { TpContainerChainGenesisDataContainerChainGenesisDataItem, TpContainerChainGenesisDataProperties, TpContainerChainGenesisDataTokenMetadata, + TpTraitsParathreadParams, + TpTraitsSlotFrequency, } from "@polkadot/types/lookup"; declare module "@polkadot/types/types/registry" { @@ -304,5 +306,7 @@ declare module "@polkadot/types/types/registry" { TpContainerChainGenesisDataContainerChainGenesisDataItem: TpContainerChainGenesisDataContainerChainGenesisDataItem; TpContainerChainGenesisDataProperties: TpContainerChainGenesisDataProperties; TpContainerChainGenesisDataTokenMetadata: TpContainerChainGenesisDataTokenMetadata; + TpTraitsParathreadParams: TpTraitsParathreadParams; + TpTraitsSlotFrequency: TpTraitsSlotFrequency; } // InterfaceTypes } // declare module diff --git a/typescript-api/src/flashbox/interfaces/types-lookup.ts b/typescript-api/src/flashbox/interfaces/types-lookup.ts index d4a8e0869..217fca157 100644 --- a/typescript-api/src/flashbox/interfaces/types-lookup.ts +++ b/typescript-api/src/flashbox/interfaces/types-lookup.ts @@ -665,12 +665,17 @@ declare module "@polkadot/types/lookup" { readonly asParaIdUnpaused: { readonly paraId: u32; } & Struct; + readonly isParathreadParamsChanged: boolean; + readonly asParathreadParamsChanged: { + readonly paraId: u32; + } & Struct; readonly type: | "ParaIdRegistered" | "ParaIdDeregistered" | "ParaIdValidForCollating" | "ParaIdPaused" - | "ParaIdUnpaused"; + | "ParaIdUnpaused" + | "ParathreadParamsChanged"; } /** @name PalletCollatorAssignmentEvent (51) */ @@ -1460,12 +1465,25 @@ declare module "@polkadot/types/lookup" { readonly asUnpauseContainerChain: { readonly paraId: u32; } & Struct; + readonly isRegisterParathread: boolean; + readonly asRegisterParathread: { + readonly paraId: u32; + readonly slotFrequency: TpTraitsSlotFrequency; + readonly genesisData: TpContainerChainGenesisDataContainerChainGenesisData; + } & Struct; + readonly isSetParathreadParams: boolean; + readonly asSetParathreadParams: { + readonly paraId: u32; + readonly slotFrequency: TpTraitsSlotFrequency; + } & Struct; readonly type: | "Register" | "Deregister" | "MarkValidForCollating" | "PauseContainerChain" - | "UnpauseContainerChain"; + | "UnpauseContainerChain" + | "RegisterParathread" + | "SetParathreadParams"; } /** @name TpContainerChainGenesisDataContainerChainGenesisData (187) */ @@ -1497,7 +1515,13 @@ declare module "@polkadot/types/lookup" { readonly tokenDecimals: u32; } - /** @name PalletConfigurationCall (194) */ + /** @name TpTraitsSlotFrequency (194) */ + interface TpTraitsSlotFrequency extends Struct { + readonly min: u32; + readonly max: u32; + } + + /** @name PalletConfigurationCall (195) */ interface PalletConfigurationCall extends Enum { readonly isSetMaxCollators: boolean; readonly asSetMaxCollators: { @@ -1547,10 +1571,10 @@ declare module "@polkadot/types/lookup" { | "SetBypassConsistencyCheck"; } - /** @name PalletCollatorAssignmentCall (196) */ + /** @name PalletCollatorAssignmentCall (197) */ type PalletCollatorAssignmentCall = Null; - /** @name PalletAuthorNotingCall (197) */ + /** @name PalletAuthorNotingCall (198) */ interface PalletAuthorNotingCall extends Enum { readonly isSetLatestAuthorData: boolean; readonly asSetLatestAuthorData: { @@ -1569,15 +1593,15 @@ declare module "@polkadot/types/lookup" { readonly type: "SetLatestAuthorData" | "SetAuthor" | "KillAuthorData"; } - /** @name TpAuthorNotingInherentOwnParachainInherentData (198) */ + /** @name TpAuthorNotingInherentOwnParachainInherentData (199) */ interface TpAuthorNotingInherentOwnParachainInherentData extends Struct { readonly relayStorageProof: SpTrieStorageProof; } - /** @name PalletAuthorityAssignmentCall (199) */ + /** @name PalletAuthorityAssignmentCall (200) */ type PalletAuthorityAssignmentCall = Null; - /** @name PalletServicesPaymentCall (200) */ + /** @name PalletServicesPaymentCall (201) */ interface PalletServicesPaymentCall extends Enum { readonly isPurchaseCredits: boolean; readonly asPurchaseCredits: { @@ -1598,7 +1622,7 @@ declare module "@polkadot/types/lookup" { readonly type: "PurchaseCredits" | "SetCredits" | "SetGivenFreeCredits"; } - /** @name PalletDataPreserversCall (202) */ + /** @name PalletDataPreserversCall (203) */ interface PalletDataPreserversCall extends Enum { readonly isSetBootNodes: boolean; readonly asSetBootNodes: { @@ -1608,7 +1632,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SetBootNodes"; } - /** @name PalletInvulnerablesCall (206) */ + /** @name PalletInvulnerablesCall (207) */ interface PalletInvulnerablesCall extends Enum { readonly isSetInvulnerables: boolean; readonly asSetInvulnerables: { @@ -1625,7 +1649,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SetInvulnerables" | "AddInvulnerable" | "RemoveInvulnerable"; } - /** @name PalletSessionCall (207) */ + /** @name PalletSessionCall (208) */ interface PalletSessionCall extends Enum { readonly isSetKeys: boolean; readonly asSetKeys: { @@ -1636,24 +1660,24 @@ declare module "@polkadot/types/lookup" { readonly type: "SetKeys" | "PurgeKeys"; } - /** @name FlashboxRuntimeSessionKeys (208) */ + /** @name FlashboxRuntimeSessionKeys (209) */ interface FlashboxRuntimeSessionKeys extends Struct { readonly nimbus: NimbusPrimitivesNimbusCryptoPublic; } - /** @name NimbusPrimitivesNimbusCryptoPublic (209) */ + /** @name NimbusPrimitivesNimbusCryptoPublic (210) */ interface NimbusPrimitivesNimbusCryptoPublic extends SpCoreSr25519Public {} - /** @name SpCoreSr25519Public (210) */ + /** @name SpCoreSr25519Public (211) */ interface SpCoreSr25519Public extends U8aFixed {} - /** @name PalletAuthorInherentCall (211) */ + /** @name PalletAuthorInherentCall (212) */ interface PalletAuthorInherentCall extends Enum { readonly isKickOffAuthorshipValidation: boolean; readonly type: "KickOffAuthorshipValidation"; } - /** @name PalletRootTestingCall (212) */ + /** @name PalletRootTestingCall (213) */ interface PalletRootTestingCall extends Enum { readonly isFillBlock: boolean; readonly asFillBlock: { @@ -1662,33 +1686,33 @@ declare module "@polkadot/types/lookup" { readonly type: "FillBlock"; } - /** @name PalletSudoError (213) */ + /** @name PalletSudoError (214) */ interface PalletSudoError extends Enum { readonly isRequireSudo: boolean; readonly type: "RequireSudo"; } - /** @name PalletUtilityError (214) */ + /** @name PalletUtilityError (215) */ interface PalletUtilityError extends Enum { readonly isTooManyCalls: boolean; readonly type: "TooManyCalls"; } - /** @name PalletProxyProxyDefinition (217) */ + /** @name PalletProxyProxyDefinition (218) */ interface PalletProxyProxyDefinition extends Struct { readonly delegate: AccountId32; readonly proxyType: FlashboxRuntimeProxyType; readonly delay: u32; } - /** @name PalletProxyAnnouncement (221) */ + /** @name PalletProxyAnnouncement (222) */ interface PalletProxyAnnouncement extends Struct { readonly real: AccountId32; readonly callHash: H256; readonly height: u32; } - /** @name PalletProxyError (223) */ + /** @name PalletProxyError (224) */ interface PalletProxyError extends Enum { readonly isTooMany: boolean; readonly isNotFound: boolean; @@ -1709,7 +1733,7 @@ declare module "@polkadot/types/lookup" { | "NoSelfProxy"; } - /** @name PalletMigrationsError (224) */ + /** @name PalletMigrationsError (225) */ interface PalletMigrationsError extends Enum { readonly isPreimageMissing: boolean; readonly isWrongUpperBound: boolean; @@ -1718,14 +1742,14 @@ declare module "@polkadot/types/lookup" { readonly type: "PreimageMissing" | "WrongUpperBound" | "PreimageIsTooBig" | "PreimageAlreadyExists"; } - /** @name PalletMaintenanceModeError (225) */ + /** @name PalletMaintenanceModeError (226) */ interface PalletMaintenanceModeError extends Enum { readonly isAlreadyInMaintenanceMode: boolean; readonly isNotInMaintenanceMode: boolean; readonly type: "AlreadyInMaintenanceMode" | "NotInMaintenanceMode"; } - /** @name PalletTxPauseError (226) */ + /** @name PalletTxPauseError (227) */ interface PalletTxPauseError extends Enum { readonly isIsPaused: boolean; readonly isIsUnpaused: boolean; @@ -1734,14 +1758,14 @@ declare module "@polkadot/types/lookup" { readonly type: "IsPaused" | "IsUnpaused" | "Unpausable" | "NotFound"; } - /** @name PalletBalancesBalanceLock (228) */ + /** @name PalletBalancesBalanceLock (229) */ interface PalletBalancesBalanceLock extends Struct { readonly id: U8aFixed; readonly amount: u128; readonly reasons: PalletBalancesReasons; } - /** @name PalletBalancesReasons (229) */ + /** @name PalletBalancesReasons (230) */ interface PalletBalancesReasons extends Enum { readonly isFee: boolean; readonly isMisc: boolean; @@ -1749,22 +1773,22 @@ declare module "@polkadot/types/lookup" { readonly type: "Fee" | "Misc" | "All"; } - /** @name PalletBalancesReserveData (232) */ + /** @name PalletBalancesReserveData (233) */ interface PalletBalancesReserveData extends Struct { readonly id: U8aFixed; readonly amount: u128; } - /** @name FlashboxRuntimeRuntimeHoldReason (236) */ + /** @name FlashboxRuntimeRuntimeHoldReason (237) */ type FlashboxRuntimeRuntimeHoldReason = Null; - /** @name PalletBalancesIdAmount (239) */ + /** @name PalletBalancesIdAmount (240) */ interface PalletBalancesIdAmount extends Struct { readonly id: U8aFixed; readonly amount: u128; } - /** @name PalletBalancesError (241) */ + /** @name PalletBalancesError (242) */ interface PalletBalancesError extends Enum { readonly isVestingBalance: boolean; readonly isLiquidityRestrictions: boolean; @@ -1789,28 +1813,28 @@ declare module "@polkadot/types/lookup" { | "TooManyFreezes"; } - /** @name PalletTransactionPaymentReleases (242) */ + /** @name PalletTransactionPaymentReleases (243) */ interface PalletTransactionPaymentReleases extends Enum { readonly isV1Ancient: boolean; readonly isV2: boolean; readonly type: "V1Ancient" | "V2"; } - /** @name PalletIdentityRegistration (243) */ + /** @name PalletIdentityRegistration (244) */ interface PalletIdentityRegistration extends Struct { readonly judgements: Vec>; readonly deposit: u128; readonly info: PalletIdentitySimpleIdentityInfo; } - /** @name PalletIdentityRegistrarInfo (251) */ + /** @name PalletIdentityRegistrarInfo (252) */ interface PalletIdentityRegistrarInfo extends Struct { readonly account: AccountId32; readonly fee: u128; readonly fields: PalletIdentityBitFlags; } - /** @name PalletIdentityError (253) */ + /** @name PalletIdentityError (254) */ interface PalletIdentityError extends Enum { readonly isTooManySubAccounts: boolean; readonly isNotFound: boolean; @@ -1851,13 +1875,18 @@ declare module "@polkadot/types/lookup" { | "JudgementPaymentFailed"; } - /** @name PalletRegistrarDepositInfo (258) */ + /** @name TpTraitsParathreadParams (259) */ + interface TpTraitsParathreadParams extends Struct { + readonly slotFrequency: TpTraitsSlotFrequency; + } + + /** @name PalletRegistrarDepositInfo (265) */ interface PalletRegistrarDepositInfo extends Struct { readonly creator: AccountId32; readonly deposit: u128; } - /** @name PalletRegistrarError (259) */ + /** @name PalletRegistrarError (266) */ interface PalletRegistrarError extends Enum { readonly isParaIdAlreadyRegistered: boolean; readonly isParaIdNotRegistered: boolean; @@ -1868,6 +1897,7 @@ declare module "@polkadot/types/lookup" { readonly isGenesisDataTooBig: boolean; readonly isParaIdNotInPendingVerification: boolean; readonly isNotSufficientDeposit: boolean; + readonly isNotAParathread: boolean; readonly type: | "ParaIdAlreadyRegistered" | "ParaIdNotRegistered" @@ -1877,10 +1907,11 @@ declare module "@polkadot/types/lookup" { | "ParaIdListFull" | "GenesisDataTooBig" | "ParaIdNotInPendingVerification" - | "NotSufficientDeposit"; + | "NotSufficientDeposit" + | "NotAParathread"; } - /** @name PalletConfigurationHostConfiguration (260) */ + /** @name PalletConfigurationHostConfiguration (267) */ interface PalletConfigurationHostConfiguration extends Struct { readonly maxCollators: u32; readonly minOrchestratorCollators: u32; @@ -1892,25 +1923,25 @@ declare module "@polkadot/types/lookup" { readonly targetContainerChainFullness: Perbill; } - /** @name PalletConfigurationError (263) */ + /** @name PalletConfigurationError (270) */ interface PalletConfigurationError extends Enum { readonly isInvalidNewValue: boolean; readonly type: "InvalidNewValue"; } - /** @name DpCollatorAssignmentAssignedCollatorsAccountId32 (264) */ + /** @name DpCollatorAssignmentAssignedCollatorsAccountId32 (271) */ interface DpCollatorAssignmentAssignedCollatorsAccountId32 extends Struct { readonly orchestratorChain: Vec; readonly containerChains: BTreeMap>; } - /** @name PalletAuthorNotingContainerChainBlockInfo (269) */ + /** @name PalletAuthorNotingContainerChainBlockInfo (276) */ interface PalletAuthorNotingContainerChainBlockInfo extends Struct { readonly blockNumber: u32; readonly author: AccountId32; } - /** @name PalletAuthorNotingError (270) */ + /** @name PalletAuthorNotingError (277) */ interface PalletAuthorNotingError extends Enum { readonly isFailedReading: boolean; readonly isFailedDecodingHeader: boolean; @@ -1929,13 +1960,13 @@ declare module "@polkadot/types/lookup" { | "NonAuraDigest"; } - /** @name DpCollatorAssignmentAssignedCollatorsPublic (271) */ + /** @name DpCollatorAssignmentAssignedCollatorsPublic (278) */ interface DpCollatorAssignmentAssignedCollatorsPublic extends Struct { readonly orchestratorChain: Vec; readonly containerChains: BTreeMap>; } - /** @name PalletServicesPaymentError (276) */ + /** @name PalletServicesPaymentError (283) */ interface PalletServicesPaymentError extends Enum { readonly isInsufficientFundsToPurchaseCredits: boolean; readonly isInsufficientCredits: boolean; @@ -1943,13 +1974,13 @@ declare module "@polkadot/types/lookup" { readonly type: "InsufficientFundsToPurchaseCredits" | "InsufficientCredits" | "CreditPriceTooExpensive"; } - /** @name PalletDataPreserversError (277) */ + /** @name PalletDataPreserversError (284) */ interface PalletDataPreserversError extends Enum { readonly isNoBootNodes: boolean; readonly type: "NoBootNodes"; } - /** @name PalletInvulnerablesError (279) */ + /** @name PalletInvulnerablesError (286) */ interface PalletInvulnerablesError extends Enum { readonly isTooManyInvulnerables: boolean; readonly isAlreadyInvulnerable: boolean; @@ -1957,10 +1988,10 @@ declare module "@polkadot/types/lookup" { readonly type: "TooManyInvulnerables" | "AlreadyInvulnerable" | "NotInvulnerable"; } - /** @name SpCoreCryptoKeyTypeId (284) */ + /** @name SpCoreCryptoKeyTypeId (291) */ interface SpCoreCryptoKeyTypeId extends U8aFixed {} - /** @name PalletSessionError (285) */ + /** @name PalletSessionError (292) */ interface PalletSessionError extends Enum { readonly isInvalidProof: boolean; readonly isNoAssociatedValidatorId: boolean; @@ -1970,7 +2001,7 @@ declare module "@polkadot/types/lookup" { readonly type: "InvalidProof" | "NoAssociatedValidatorId" | "DuplicatedKey" | "NoKeys" | "NoAccount"; } - /** @name PalletAuthorInherentError (289) */ + /** @name PalletAuthorInherentError (296) */ interface PalletAuthorInherentError extends Enum { readonly isAuthorAlreadySet: boolean; readonly isNoAccountId: boolean; @@ -1978,13 +2009,13 @@ declare module "@polkadot/types/lookup" { readonly type: "AuthorAlreadySet" | "NoAccountId" | "CannotBeAuthor"; } - /** @name PalletInflationRewardsChainsToRewardValue (290) */ + /** @name PalletInflationRewardsChainsToRewardValue (297) */ interface PalletInflationRewardsChainsToRewardValue extends Struct { readonly paraIds: Vec; readonly rewardsPerChain: u128; } - /** @name SpRuntimeMultiSignature (295) */ + /** @name SpRuntimeMultiSignature (302) */ interface SpRuntimeMultiSignature extends Enum { readonly isEd25519: boolean; readonly asEd25519: SpCoreEd25519Signature; @@ -1995,36 +2026,36 @@ declare module "@polkadot/types/lookup" { readonly type: "Ed25519" | "Sr25519" | "Ecdsa"; } - /** @name SpCoreEd25519Signature (296) */ + /** @name SpCoreEd25519Signature (303) */ interface SpCoreEd25519Signature extends U8aFixed {} - /** @name SpCoreSr25519Signature (298) */ + /** @name SpCoreSr25519Signature (305) */ interface SpCoreSr25519Signature extends U8aFixed {} - /** @name SpCoreEcdsaSignature (299) */ + /** @name SpCoreEcdsaSignature (306) */ interface SpCoreEcdsaSignature extends U8aFixed {} - /** @name FrameSystemExtensionsCheckNonZeroSender (302) */ + /** @name FrameSystemExtensionsCheckNonZeroSender (309) */ type FrameSystemExtensionsCheckNonZeroSender = Null; - /** @name FrameSystemExtensionsCheckSpecVersion (303) */ + /** @name FrameSystemExtensionsCheckSpecVersion (310) */ type FrameSystemExtensionsCheckSpecVersion = Null; - /** @name FrameSystemExtensionsCheckTxVersion (304) */ + /** @name FrameSystemExtensionsCheckTxVersion (311) */ type FrameSystemExtensionsCheckTxVersion = Null; - /** @name FrameSystemExtensionsCheckGenesis (305) */ + /** @name FrameSystemExtensionsCheckGenesis (312) */ type FrameSystemExtensionsCheckGenesis = Null; - /** @name FrameSystemExtensionsCheckNonce (308) */ + /** @name FrameSystemExtensionsCheckNonce (315) */ interface FrameSystemExtensionsCheckNonce extends Compact {} - /** @name FrameSystemExtensionsCheckWeight (309) */ + /** @name FrameSystemExtensionsCheckWeight (316) */ type FrameSystemExtensionsCheckWeight = Null; - /** @name PalletTransactionPaymentChargeTransactionPayment (310) */ + /** @name PalletTransactionPaymentChargeTransactionPayment (317) */ interface PalletTransactionPaymentChargeTransactionPayment extends Compact {} - /** @name FlashboxRuntimeRuntime (311) */ + /** @name FlashboxRuntimeRuntime (318) */ type FlashboxRuntimeRuntime = Null; } // declare module