From 58110242c1929214af570afb30369aba8ea268c1 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 15 Oct 2024 18:18:05 +0200 Subject: [PATCH 01/82] Add pallet_external_validators, remove ValidatorManager --- Cargo.lock | 25 + Cargo.toml | 1 + pallets/external-validators/Cargo.toml | 77 ++++ .../external-validators/src/benchmarking.rs | 246 ++++++++++ pallets/external-validators/src/lib.rs | 427 ++++++++++++++++++ pallets/external-validators/src/mock.rs | 226 +++++++++ pallets/external-validators/src/tests.rs | 150 ++++++ pallets/external-validators/src/weights.rs | 224 +++++++++ pnpm-lock.yaml | 9 - runtime/common/Cargo.toml | 2 + runtime/common/src/migrations.rs | 53 ++- solo-chains/runtime/dancelight/Cargo.toml | 4 + .../dancelight/src/genesis_config_presets.rs | 10 +- solo-chains/runtime/dancelight/src/lib.rs | 18 +- .../dancelight/src/validator_manager.rs | 151 ------- 15 files changed, 1455 insertions(+), 168 deletions(-) create mode 100644 pallets/external-validators/Cargo.toml create mode 100644 pallets/external-validators/src/benchmarking.rs create mode 100644 pallets/external-validators/src/lib.rs create mode 100644 pallets/external-validators/src/mock.rs create mode 100644 pallets/external-validators/src/tests.rs create mode 100644 pallets/external-validators/src/weights.rs delete mode 100644 solo-chains/runtime/dancelight/src/validator_manager.rs diff --git a/Cargo.lock b/Cargo.lock index 0a1cdf691..c704abf72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3248,6 +3248,7 @@ dependencies = [ "pallet-data-preservers", "pallet-democracy", "pallet-elections-phragmen", + "pallet-external-validators", "pallet-grandpa", "pallet-identity", "pallet-inflation-rewards", @@ -9347,6 +9348,28 @@ dependencies = [ "xcm-primitives", ] +[[package]] +name = "pallet-external-validators" +version = "0.1.0" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-balances", + "pallet-session", + "pallet-timestamp", + "parity-scale-codec", + "rand", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", + "tp-traits", +] + [[package]] name = "pallet-fast-unstake" version = "36.0.0" @@ -17373,12 +17396,14 @@ dependencies = [ "pallet-balances", "pallet-configuration", "pallet-data-preservers", + "pallet-external-validators", "pallet-foreign-asset-creator", "pallet-invulnerables", "pallet-migrations 0.1.0", "pallet-pooled-staking", "pallet-registrar", "pallet-services-payment", + "pallet-session", "pallet-treasury", "pallet-xcm", "parity-scale-codec", diff --git a/Cargo.toml b/Cargo.toml index b15f706a7..5cbaf8ac4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,6 +60,7 @@ pallet-collator-assignment-runtime-api = { path = "pallets/collator-assignment/r pallet-configuration = { path = "pallets/configuration", default-features = false } pallet-data-preservers = { path = "pallets/data-preservers", default-features = false } pallet-data-preservers-runtime-api = { path = "pallets/data-preservers/runtime-api", default-features = false } +pallet-external-validators = { path = "pallets/external-validators", default-features = false } pallet-inflation-rewards = { path = "pallets/inflation-rewards", default-features = false } pallet-initializer = { path = "pallets/initializer", default-features = false } pallet-invulnerables = { path = "pallets/invulnerables", default-features = false } diff --git a/pallets/external-validators/Cargo.toml b/pallets/external-validators/Cargo.toml new file mode 100644 index 000000000..50e57f871 --- /dev/null +++ b/pallets/external-validators/Cargo.toml @@ -0,0 +1,77 @@ +[package] +name = "pallet-external-validators" +authors = { workspace = true } +description = "Simple pallet to store invulnarable collators." +edition = "2021" +license = "GPL-3.0-only" +version = "0.1.0" + +[package.metadata.docs.rs] +targets = [ "x86_64-unknown-linux-gnu" ] + +[lints] +workspace = true + +[dependencies] +log = { workspace = true } +parity-scale-codec = { workspace = true } +rand = { workspace = true, optional = true } +scale-info = { workspace = true, features = [ "derive" ] } + +frame-support = { workspace = true } +frame-system = { workspace = true } +sp-runtime = { workspace = true } +sp-staking = { workspace = true } +sp-std = { workspace = true } +tp-traits = { workspace = true } + +frame-benchmarking = { workspace = true } + +pallet-balances = { workspace = true, optional = true } +pallet-session = { workspace = true, features = ["historical"] } + +[dev-dependencies] +sp-core = { workspace = true } +sp-io = { workspace = true } +pallet-timestamp = { workspace = true } + +[features] +default = [ "std" ] +std = [ + "frame-benchmarking/std", + "frame-support/std", + "frame-system/std", + "log/std", + "pallet-balances/std", + "pallet-session/std", + "parity-scale-codec/std", + "rand?/std", + "scale-info/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-staking/std", + "sp-std/std", + "tp-traits/std", + "pallet-timestamp/std" +] +runtime-benchmarks = [ + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "rand", + "sp-runtime/runtime-benchmarks", + "sp-staking/runtime-benchmarks", + "tp-traits/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks" +] + +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "pallet-balances?/try-runtime", + "pallet-session/try-runtime", + "sp-runtime/try-runtime", + "pallet-timestamp/try-runtime" +] diff --git a/pallets/external-validators/src/benchmarking.rs b/pallets/external-validators/src/benchmarking.rs new file mode 100644 index 000000000..3aa77b363 --- /dev/null +++ b/pallets/external-validators/src/benchmarking.rs @@ -0,0 +1,246 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + +//! Benchmarking setup for pallet-invulnerables + +use super::*; + +#[allow(unused)] +use crate::Pallet as InvulnerablesPallet; +use { + frame_benchmarking::{account, v2::*, BenchmarkError}, + frame_support::{ + pallet_prelude::*, + traits::{tokens::fungible::Balanced, Currency, EnsureOrigin, Get}, + }, + frame_system::{EventRecord, RawOrigin}, + pallet_session::{self as session, SessionManager}, + sp_runtime::traits::AtLeast32BitUnsigned, + sp_std::prelude::*, + tp_traits::DistributeRewards, +}; +const SEED: u32 = 0; + +fn assert_last_event(generic_event: ::RuntimeEvent) { + let events = frame_system::Pallet::::events(); + let system_event: ::RuntimeEvent = generic_event.into(); + // compare to the last event record + let EventRecord { event, .. } = &events[events.len() - 1]; + assert_eq!(event, &system_event); +} + +fn create_funded_user( + string: &'static str, + n: u32, + balance_factor: u32, +) -> T::AccountId { + let user = account(string, n, SEED); + let balance = as Currency>::minimum_balance() + * balance_factor.into(); + let _ = as Currency>::make_free_balance_be( + &user, balance, + ); + user +} + +fn keys(c: u32) -> ::Keys { + use rand::{RngCore, SeedableRng}; + + let keys = { + let mut keys = [0u8; 128]; + + if c > 0 { + let mut rng = rand::rngs::StdRng::seed_from_u64(u64::from(c)); + rng.fill_bytes(&mut keys); + } + + keys + }; + + Decode::decode(&mut &keys[..]).unwrap() +} + +fn invulnerable( + c: u32, +) -> (T::AccountId, T::CollatorId, ::Keys) { + let funded_user = create_funded_user::("candidate", c, 100); + let collator_id = T::CollatorIdOf::convert(funded_user.clone()) + .expect("Converstion of account id of collator id failed."); + (funded_user, collator_id, keys::(c)) +} + +fn invulnerables< + T: Config + frame_system::Config + pallet_session::Config + pallet_balances::Config, +>( + count: u32, +) -> Vec<(T::AccountId, T::CollatorId)> { + let invulnerables = (0..count).map(|c| invulnerable::(c)).collect::>(); + + for (who, _collator_id, keys) in invulnerables.clone() { + >::set_keys(RawOrigin::Signed(who).into(), keys, Vec::new()).unwrap(); + } + + invulnerables + .into_iter() + .map(|(who, collator_id, _)| (who, collator_id)) + .collect() +} + +pub type BalanceOf = + <::Currency as frame_support::traits::fungible::Inspect< + ::AccountId, + >>::Balance; + +pub(crate) fn currency_issue( + amount: BalanceOf, +) -> crate::CreditOf { + <::Currency as Balanced>::issue(amount) +} + +#[allow(clippy::multiple_bound_locations)] +#[benchmarks(where T: session::Config + pallet_balances::Config, BalanceOf: AtLeast32BitUnsigned)] +mod benchmarks { + use super::*; + + #[benchmark] + fn add_invulnerable( + b: Linear<1, { T::MaxInvulnerables::get() - 1 }>, + ) -> Result<(), BenchmarkError> { + let origin = + T::UpdateOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; + + // now we need to fill up invulnerables + let mut invulnerables = invulnerables::(b); + invulnerables.sort(); + + let (_account_ids, collator_ids): (Vec, Vec) = + invulnerables.into_iter().unzip(); + + let invulnerables: frame_support::BoundedVec<_, T::MaxInvulnerables> = + frame_support::BoundedVec::try_from(collator_ids).unwrap(); + >::put(invulnerables); + + let (new_invulnerable, _collator_id, keys) = invulnerable::(b + 1); + >::set_keys( + RawOrigin::Signed(new_invulnerable.clone()).into(), + keys, + Vec::new(), + ) + .unwrap(); + + #[extrinsic_call] + _(origin as T::RuntimeOrigin, new_invulnerable.clone()); + + assert_last_event::( + Event::InvulnerableAdded { + account_id: new_invulnerable, + } + .into(), + ); + Ok(()) + } + + #[benchmark] + fn remove_invulnerable( + b: Linear<{ 1 }, { T::MaxInvulnerables::get() }>, + ) -> Result<(), BenchmarkError> { + let origin = + T::UpdateOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; + let mut invulnerables = invulnerables::(b); + invulnerables.sort(); + + let (account_ids, collator_ids): (Vec, Vec) = + invulnerables.into_iter().unzip(); + + let invulnerables: frame_support::BoundedVec<_, T::MaxInvulnerables> = + frame_support::BoundedVec::try_from(collator_ids).unwrap(); + >::put(invulnerables); + + let to_remove = account_ids.last().unwrap().clone(); + + #[extrinsic_call] + _(origin as T::RuntimeOrigin, to_remove.clone()); + + assert_last_event::( + Event::InvulnerableRemoved { + account_id: to_remove, + } + .into(), + ); + Ok(()) + } + + // worst case for new session. + #[benchmark] + fn new_session(r: Linear<1, { T::MaxInvulnerables::get() }>) -> Result<(), BenchmarkError> { + // start fresh + Invulnerables::::kill(); + + let origin = + T::UpdateOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; + + frame_system::Pallet::::set_block_number(0u32.into()); + // now we need to fill up invulnerables + let mut invulnerables = invulnerables::(r); + invulnerables.sort(); + + let (account_ids, _collator_ids): (Vec, Vec) = + invulnerables.into_iter().unzip(); + + for account in account_ids { + >::add_invulnerable(origin.clone(), account) + .expect("add invulnerable failed"); + } + + #[block] + { + as SessionManager<_>>::new_session(0); + } + + Ok(()) + } + + #[benchmark] + fn reward_invulnerable( + b: Linear<{ 1 }, { T::MaxInvulnerables::get() }>, + ) -> Result<(), BenchmarkError> where { + let mut invulnerables = invulnerables::(b); + invulnerables.sort(); + + let (account_ids, collator_ids): (Vec, Vec) = + invulnerables.into_iter().unzip(); + + let invulnerables: frame_support::BoundedVec<_, T::MaxInvulnerables> = + frame_support::BoundedVec::try_from(collator_ids).unwrap(); + >::put(invulnerables); + let to_reward = account_ids.first().unwrap().clone(); + // Create new supply for rewards + let new_supply = currency_issue::(1000u32.into()); + #[block] + { + let _ = InvulnerableRewardDistribution::::distribute_rewards( + to_reward, new_supply, + ); + } + + Ok(()) + } + impl_benchmark_test_suite!( + InvulnerablesPallet, + crate::mock::new_test_ext(), + crate::mock::Test, + ); +} diff --git a/pallets/external-validators/src/lib.rs b/pallets/external-validators/src/lib.rs new file mode 100644 index 000000000..23dc94b92 --- /dev/null +++ b/pallets/external-validators/src/lib.rs @@ -0,0 +1,427 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + +//! Invulnerables pallet. +//! +//! A pallet to manage invulnerable collators in a parachain. +//! +//! ## Terminology +//! +//! - Collator: A parachain block producer. +//! - Invulnerable: An account appointed by governance and guaranteed to be in the collator set. + +#![cfg_attr(not(feature = "std"), no_std)] + +pub use pallet::*; +use sp_staking::SessionIndex; +use { + core::marker::PhantomData, + sp_runtime::{traits::Convert, TokenError}, + sp_std::vec::Vec, +}; + +#[cfg(test)] +mod mock; + +#[cfg(test)] +mod tests; + +#[cfg(feature = "runtime-benchmarks")] +mod benchmarking; +pub mod weights; + +#[frame_support::pallet] +pub mod pallet { + pub use crate::weights::WeightInfo; + + #[cfg(feature = "runtime-benchmarks")] + use frame_support::traits::Currency; + + use { + frame_support::{ + dispatch::DispatchResultWithPostInfo, + pallet_prelude::*, + traits::{EnsureOrigin, UnixTime, ValidatorRegistration}, + BoundedVec, DefaultNoBound, + }, + frame_system::pallet_prelude::*, + pallet_session::SessionManager, + sp_runtime::{traits::Convert, SaturatedConversion}, + sp_staking::SessionIndex, + sp_std::vec::Vec, + }; + + /// The current storage version. + const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); + + /// A convertor from collators id. Since this pallet does not have stash/controller, this is + /// just identity. + pub struct IdentityCollator; + impl sp_runtime::traits::Convert> for IdentityCollator { + fn convert(t: T) -> Option { + Some(t) + } + } + + /// Configure the pallet by specifying the parameters and types on which it depends. + #[pallet::config] + pub trait Config: frame_system::Config { + /// Overarching event type. + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + + /// Origin that can dictate updating parameters of this pallet. + type UpdateOrigin: EnsureOrigin; + + /// Maximum number of invulnerables. + #[pallet::constant] + type MaxInvulnerables: Get; + + /// A stable ID for a validator. + type ValidatorId: Member + + Parameter + + MaybeSerializeDeserialize + + MaxEncodedLen + + TryFrom; + + /// A conversion from account ID to validator ID. + /// + /// Its cost must be at most one storage read. + type ValidatorIdOf: Convert>; + + // Validate a user is registered + //type ValidatorRegistration: ValidatorRegistration; + + /// Time used for computing era duration. + /// + /// It is guaranteed to start being called from the first `on_finalize`. Thus value at + /// genesis is not used. + type UnixTime: UnixTime; + + /// The weight information of this pallet. + type WeightInfo: WeightInfo; + + #[cfg(feature = "runtime-benchmarks")] + type Currency: Currency + + frame_support::traits::fungible::Balanced; + } + + #[pallet::pallet] + #[pallet::storage_version(STORAGE_VERSION)] + pub struct Pallet(_); + + /// The invulnerable, permissioned collators. This list must be sorted. + #[pallet::storage] + pub type WhitelistedValidators = + StorageValue<_, BoundedVec, ValueQuery>; + + /// The invulnerable, permissioned collators. This list must be sorted. + #[pallet::storage] + pub type ExternalValidators = + StorageValue<_, BoundedVec, ValueQuery>; + + /// The invulnerable, permissioned collators. This list must be sorted. + #[pallet::storage] + pub type SkipExternalValidators = StorageValue<_, bool, ValueQuery>; + + /// The invulnerable, permissioned collators. This list must be sorted. + #[pallet::storage] + pub type ActiveEra = StorageValue<_, ActiveEraInfo>; + + /// Information regarding the active era (era in used in session). + #[derive(Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] + pub struct ActiveEraInfo { + /// Index of era. + pub index: EraIndex, + /// Moment of start expressed as millisecond from `$UNIX_EPOCH`. + /// + /// Start can be none if start hasn't been set for the era yet, + /// Start is set on the first on_finalize of the era to guarantee usage of `Time`. + pub start: Option, + } + + /// Counter for the number of eras that have passed. + pub type EraIndex = u32; + + #[pallet::genesis_config] + #[derive(DefaultNoBound)] + pub struct GenesisConfig { + pub invulnerables: Vec, + } + + #[pallet::genesis_build] + impl BuildGenesisConfig for GenesisConfig { + fn build(&self) { + let duplicate_invulnerables = self + .invulnerables + .iter() + // T::ValidatorId does not impl Ord or Hash so we cannot collect into set directly, + // but we can check for duplicates if we encode them first. + .map(|x| x.encode()) + .collect::>(); + assert!( + duplicate_invulnerables.len() == self.invulnerables.len(), + "duplicate invulnerables in genesis." + ); + + let bounded_invulnerables = + BoundedVec::<_, T::MaxInvulnerables>::try_from(self.invulnerables.clone()) + .expect("genesis invulnerables are more than T::MaxInvulnerables"); + + >::put(bounded_invulnerables); + } + } + + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + /// New Invulnerables were set. + NewInvulnerables { invulnerables: Vec }, + /// A new Invulnerable was added. + InvulnerableAdded { account_id: T::AccountId }, + /// An Invulnerable was removed. + InvulnerableRemoved { account_id: T::AccountId }, + /// An account was unable to be added to the Invulnerables because they did not have keys + /// registered. Other Invulnerables may have been set. + InvalidInvulnerableSkipped { account_id: T::AccountId }, + } + + #[pallet::error] + pub enum Error { + /// There are too many Invulnerables. + TooManyInvulnerables, + /// Account is already an Invulnerable. + AlreadyInvulnerable, + /// Account is not an Invulnerable. + NotInvulnerable, + /// Account does not have keys registered + NoKeysRegistered, + /// Unable to derive collator id from account id + UnableToDeriveCollatorId, + } + + #[pallet::call] + impl Pallet { + /// Remove an account `who` from the list of `Invulnerables` collators. `Invulnerables` must + /// be sorted. + /// + /// The origin for this call must be the `UpdateOrigin`. + #[pallet::call_index(0)] + #[pallet::weight(T::WeightInfo::skip_external_validators())] + pub fn skip_external_validators(origin: OriginFor, skip: bool) -> DispatchResult { + T::UpdateOrigin::ensure_origin(origin)?; + + >::put(skip); + + Ok(()) + } + + /// Add a new account `who` to the list of `Invulnerables` collators. + /// + /// The origin for this call must be the `UpdateOrigin`. + #[pallet::call_index(1)] + #[pallet::weight(T::WeightInfo::add_invulnerable( + T::MaxInvulnerables::get().saturating_sub(1), + ))] + pub fn add_invulnerable( + origin: OriginFor, + who: T::AccountId, + ) -> DispatchResultWithPostInfo { + T::UpdateOrigin::ensure_origin(origin)?; + // don't let one unprepared collator ruin things for everyone. + let maybe_collator_id = T::ValidatorIdOf::convert(who.clone()); + //.filter(T::ValidatorRegistration::is_registered); + + let collator_id = maybe_collator_id.ok_or(Error::::NoKeysRegistered)?; + + >::try_mutate(|invulnerables| -> DispatchResult { + if invulnerables.contains(&collator_id) { + Err(Error::::AlreadyInvulnerable)?; + } + invulnerables + .try_push(collator_id.clone()) + .map_err(|_| Error::::TooManyInvulnerables)?; + Ok(()) + })?; + + Self::deposit_event(Event::InvulnerableAdded { account_id: who }); + + let weight_used = ::WeightInfo::add_invulnerable( + WhitelistedValidators::::decode_len() + .unwrap_or_default() + .try_into() + .unwrap_or(T::MaxInvulnerables::get().saturating_sub(1)), + ); + + Ok(Some(weight_used).into()) + } + + /// Remove an account `who` from the list of `Invulnerables` collators. `Invulnerables` must + /// be sorted. + /// + /// The origin for this call must be the `UpdateOrigin`. + #[pallet::call_index(2)] + #[pallet::weight(T::WeightInfo::remove_invulnerable(T::MaxInvulnerables::get()))] + pub fn remove_invulnerable(origin: OriginFor, who: T::AccountId) -> DispatchResult { + T::UpdateOrigin::ensure_origin(origin)?; + + let collator_id = T::ValidatorIdOf::convert(who.clone()) + .ok_or(Error::::UnableToDeriveCollatorId)?; + + >::try_mutate(|invulnerables| -> DispatchResult { + let pos = invulnerables + .iter() + .position(|x| x == &collator_id) + .ok_or(Error::::NotInvulnerable)?; + invulnerables.remove(pos); + Ok(()) + })?; + + Self::deposit_event(Event::InvulnerableRemoved { account_id: who }); + Ok(()) + } + } + + impl Pallet { + pub fn set_external_validators(validators: Vec) -> DispatchResult { + // If more validators than max, take the first n + let validators = BoundedVec::truncate_from(validators); + >::put(validators); + + Self::increase_era(); + + Ok(()) + } + + fn increase_era() { + // Increase era + >::mutate(|q| { + if q.is_none() { + *q = Default::default(); + } + + let q = q.as_mut().unwrap(); + q.index += 1; + // Set new active era start in next `on_finalize`. To guarantee usage of `Time` + q.start = None; + }); + } + + // TODO: for testing, remove + pub fn invulnerables() -> Vec { + >::get().into() + } + } + + #[pallet::hooks] + impl Hooks> for Pallet { + fn on_initialize(_now: BlockNumberFor) -> Weight { + // just return the weight of the on_finalize. + T::DbWeight::get().reads(1) + } + + fn on_finalize(_n: BlockNumberFor) { + // Set the start of the first era. + if let Some(mut active_era) = >::get() { + if active_era.start.is_none() { + let now_as_millis_u64 = T::UnixTime::now().as_millis().saturated_into::(); + active_era.start = Some(now_as_millis_u64); + // This write only ever happens once, we don't include it in the weight in + // general + ActiveEra::::put(active_era); + } + } + // `on_finalize` weight is tracked in `on_initialize` + } + } +} + +/// If the rewarded account is an Invulnerable, distribute the entire reward +/// amount to them. Otherwise use the `Fallback` distribution. +pub struct InvulnerableRewardDistribution( + PhantomData<(Runtime, Currency, Fallback)>, +); + +use {frame_support::pallet_prelude::Weight, sp_runtime::traits::Get}; + +type CreditOf = + frame_support::traits::fungible::Credit<::AccountId, Currency>; +pub type AccountIdOf = ::AccountId; + +impl + tp_traits::DistributeRewards, CreditOf> + for InvulnerableRewardDistribution +where + Runtime: frame_system::Config + Config, + Fallback: tp_traits::DistributeRewards, CreditOf>, + Currency: frame_support::traits::fungible::Balanced>, +{ + fn distribute_rewards( + rewarded: AccountIdOf, + amount: CreditOf, + ) -> frame_support::pallet_prelude::DispatchResultWithPostInfo { + let mut total_weight = Weight::zero(); + let collator_id = Runtime::ValidatorIdOf::convert(rewarded.clone()) + .ok_or(Error::::UnableToDeriveCollatorId)?; + // weight to read invulnerables + total_weight += Runtime::DbWeight::get().reads(1); + if !WhitelistedValidators::::get().contains(&collator_id) { + let post_info = Fallback::distribute_rewards(rewarded, amount)?; + if let Some(weight) = post_info.actual_weight { + total_weight += weight; + } + } else { + Currency::resolve(&rewarded, amount).map_err(|_| TokenError::NotExpendable)?; + total_weight += + Runtime::WeightInfo::reward_invulnerable(Runtime::MaxInvulnerables::get()) + } + Ok(Some(total_weight).into()) + } +} + +impl pallet_session::SessionManager for Pallet { + fn new_session(new_index: SessionIndex) -> Option> { + if new_index <= 1 { + return None; + } + + let mut validators: Vec<_> = WhitelistedValidators::::get().into(); + + if !SkipExternalValidators::::get() { + validators.extend(ExternalValidators::::get()) + } + + Some(validators) + } + + fn end_session(_: SessionIndex) {} + + fn start_session(_start_index: SessionIndex) {} +} + +impl pallet_session::historical::SessionManager for Pallet { + fn new_session(new_index: SessionIndex) -> Option> { + >::new_session(new_index) + .map(|r| r.into_iter().map(|v| (v, Default::default())).collect()) + } + + fn start_session(start_index: SessionIndex) { + >::start_session(start_index) + } + + fn end_session(end_index: SessionIndex) { + >::end_session(end_index) + } +} diff --git a/pallets/external-validators/src/mock.rs b/pallets/external-validators/src/mock.rs new file mode 100644 index 000000000..fa1097ee2 --- /dev/null +++ b/pallets/external-validators/src/mock.rs @@ -0,0 +1,226 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + +use frame_support::traits::ConstU64; +use { + super::*, + crate as pallet_external_validators, + frame_support::{ + ord_parameter_types, parameter_types, + traits::{ConstU32, ValidatorRegistration}, + }, + frame_system::{self as system, EnsureSignedBy}, + pallet_balances::AccountData, + sp_core::H256, + sp_runtime::{ + testing::UintAuthorityId, + traits::{BlakeTwo256, IdentityLookup, OpaqueKeys}, + BuildStorage, RuntimeAppPublic, + }, +}; + +type Block = frame_system::mocking::MockBlock; + +// Configure a mock runtime to test the pallet. +frame_support::construct_runtime!( + pub enum Test + { + System: frame_system, + ExternalValidators: pallet_external_validators, + Session: pallet_session, + Balances: pallet_balances, + Timestamp: pallet_timestamp, + } +); + +parameter_types! { + pub const BlockHashCount: u64 = 250; + pub const SS58Prefix: u8 = 42; +} + +impl system::Config for Test { + type BaseCallFilter = frame_support::traits::Everything; + type BlockWeights = (); + type BlockLength = (); + type DbWeight = (); + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = BlockHashCount; + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = AccountData; + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = SS58Prefix; + type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; + type Nonce = u64; + type Block = Block; + type RuntimeTask = (); + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); +} + +parameter_types! { + pub const ExistentialDeposit: u64 = 5; + pub const MaxReserves: u32 = 50; +} + +impl pallet_balances::Config for Test { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = (); + type Balance = u64; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type ReserveIdentifier = [u8; 8]; + type RuntimeHoldReason = (); + type RuntimeFreezeReason = (); + type FreezeIdentifier = (); + type MaxLocks = (); + type MaxReserves = MaxReserves; + type MaxFreezes = ConstU32<0>; +} + +impl pallet_timestamp::Config for Test { + type Moment = u64; + type OnTimestampSet = (); + type MinimumPeriod = ConstU64<5>; + type WeightInfo = (); +} + +ord_parameter_types! { + pub const RootAccount: u64 = 777; +} + +pub struct IsRegistered; +impl ValidatorRegistration for IsRegistered { + fn is_registered(id: &u64) -> bool { + *id != 42u64 + } +} + +impl Config for Test { + type RuntimeEvent = RuntimeEvent; + type UpdateOrigin = EnsureSignedBy; + type MaxInvulnerables = ConstU32<20>; + type ValidatorId = ::AccountId; + type ValidatorIdOf = IdentityCollator; + //type ValidatorRegistration = IsRegistered; + type UnixTime = Timestamp; + type WeightInfo = (); + #[cfg(feature = "runtime-benchmarks")] + type Currency = Balances; +} + +sp_runtime::impl_opaque_keys! { + pub struct MockSessionKeys { + // a key for aura authoring + pub aura: UintAuthorityId, + } +} + +impl From for MockSessionKeys { + fn from(aura: sp_runtime::testing::UintAuthorityId) -> Self { + Self { aura } + } +} + +parameter_types! { + pub static SessionHandlerCollators: Vec = Vec::new(); + pub static SessionChangeBlock: u64 = 0; +} + +pub struct TestSessionHandler; +impl pallet_session::SessionHandler for TestSessionHandler { + const KEY_TYPE_IDS: &'static [sp_runtime::KeyTypeId] = &[UintAuthorityId::ID]; + fn on_genesis_session(keys: &[(u64, Ks)]) { + SessionHandlerCollators::set(keys.iter().map(|(a, _)| *a).collect::>()) + } + fn on_new_session(_: bool, keys: &[(u64, Ks)], _: &[(u64, Ks)]) { + SessionChangeBlock::set(System::block_number()); + SessionHandlerCollators::set(keys.iter().map(|(a, _)| *a).collect::>()) + } + fn on_before_session_ending() {} + fn on_disabled(_: u32) {} +} + +parameter_types! { + pub const Offset: u64 = 0; + pub const Period: u64 = 10; +} + +impl pallet_session::Config for Test { + type RuntimeEvent = RuntimeEvent; + type ValidatorId = ::AccountId; + // we don't have stash and controller, thus we don't need the convert as well. + type ValidatorIdOf = IdentityCollator; + type ShouldEndSession = pallet_session::PeriodicSessions; + type NextSessionRotation = pallet_session::PeriodicSessions; + type SessionManager = ExternalValidators; + type SessionHandler = TestSessionHandler; + type Keys = MockSessionKeys; + type WeightInfo = (); +} + +pub fn new_test_ext() -> sp_io::TestExternalities { + let mut t = frame_system::GenesisConfig::::default() + .build_storage() + .unwrap(); + let invulnerables = vec![1, 2]; + + let balances = vec![(1, 100), (2, 100), (3, 100), (4, 100), (5, 100)]; + let keys = balances + .iter() + .map(|&(i, _)| { + ( + i, + i, + MockSessionKeys { + aura: UintAuthorityId(i), + }, + ) + }) + .collect::>(); + let session = pallet_session::GenesisConfig:: { + keys, + ..Default::default() + }; + pallet_balances::GenesisConfig:: { balances } + .assimilate_storage(&mut t) + .unwrap(); + pallet_external_validators::GenesisConfig:: { invulnerables } + .assimilate_storage(&mut t) + .unwrap(); + session.assimilate_storage(&mut t).unwrap(); + + t.into() +} + +pub fn initialize_to_block(n: u64) { + for i in System::block_number() + 1..=n { + System::set_block_number(i); + >::on_initialize(i); + } +} diff --git a/pallets/external-validators/src/tests.rs b/pallets/external-validators/src/tests.rs new file mode 100644 index 000000000..a43d8c922 --- /dev/null +++ b/pallets/external-validators/src/tests.rs @@ -0,0 +1,150 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + +use { + crate::{ + mock::{ + initialize_to_block, new_test_ext, ExternalValidators, RootAccount, RuntimeEvent, + RuntimeOrigin, System, Test, + }, + Error, + }, + frame_support::{assert_noop, assert_ok}, + sp_runtime::traits::BadOrigin, +}; + +#[test] +fn basic_setup_works() { + new_test_ext().execute_with(|| { + // genesis should sort input + assert_eq!(ExternalValidators::invulnerables(), vec![1, 2]); + }); +} + +#[test] +fn add_invulnerable_works() { + new_test_ext().execute_with(|| { + initialize_to_block(1); + assert_eq!(ExternalValidators::invulnerables(), vec![1, 2]); + let new = 3; + + // function runs + assert_ok!(ExternalValidators::add_invulnerable( + RuntimeOrigin::signed(RootAccount::get()), + new + )); + + System::assert_last_event(RuntimeEvent::ExternalValidators( + crate::Event::InvulnerableAdded { account_id: new }, + )); + + // same element cannot be added more than once + assert_noop!( + ExternalValidators::add_invulnerable(RuntimeOrigin::signed(RootAccount::get()), new), + Error::::AlreadyInvulnerable + ); + + // new element is now part of the invulnerables list + assert!(ExternalValidators::invulnerables().to_vec().contains(&new)); + + // cannot add with non-root + assert_noop!( + ExternalValidators::add_invulnerable(RuntimeOrigin::signed(1), new), + BadOrigin + ); + }); +} + +#[test] +fn add_invulnerable_does_not_work_if_not_registered() { + new_test_ext().execute_with(|| { + initialize_to_block(1); + assert_eq!(ExternalValidators::invulnerables(), vec![1, 2]); + let new = 42; + + assert_noop!( + ExternalValidators::add_invulnerable(RuntimeOrigin::signed(RootAccount::get()), new), + Error::::NoKeysRegistered + ); + }); +} + +#[test] +fn invulnerable_limit_works() { + new_test_ext().execute_with(|| { + assert_eq!(ExternalValidators::invulnerables(), vec![1, 2]); + + // MaxExternalValidators: u32 = 20 + for ii in 3..=21 { + if ii < 21 { + assert_ok!(ExternalValidators::add_invulnerable( + RuntimeOrigin::signed(RootAccount::get()), + ii + )); + } else { + assert_noop!( + ExternalValidators::add_invulnerable( + RuntimeOrigin::signed(RootAccount::get()), + ii + ), + Error::::TooManyInvulnerables + ); + } + } + let expected: Vec = (1..=20).collect(); + assert_eq!(ExternalValidators::invulnerables(), expected); + }); +} + +#[test] +fn remove_invulnerable_works() { + new_test_ext().execute_with(|| { + initialize_to_block(1); + assert_eq!(ExternalValidators::invulnerables(), vec![1, 2]); + + assert_ok!(ExternalValidators::add_invulnerable( + RuntimeOrigin::signed(RootAccount::get()), + 4 + )); + assert_ok!(ExternalValidators::add_invulnerable( + RuntimeOrigin::signed(RootAccount::get()), + 3 + )); + + assert_eq!(ExternalValidators::invulnerables(), vec![1, 2, 4, 3]); + + assert_ok!(ExternalValidators::remove_invulnerable( + RuntimeOrigin::signed(RootAccount::get()), + 2 + )); + + System::assert_last_event(RuntimeEvent::ExternalValidators( + crate::Event::InvulnerableRemoved { account_id: 2 }, + )); + assert_eq!(ExternalValidators::invulnerables(), vec![1, 4, 3]); + + // cannot remove invulnerable not in the list + assert_noop!( + ExternalValidators::remove_invulnerable(RuntimeOrigin::signed(RootAccount::get()), 2), + Error::::NotInvulnerable + ); + + // cannot remove without privilege + assert_noop!( + ExternalValidators::remove_invulnerable(RuntimeOrigin::signed(1), 3), + BadOrigin + ); + }); +} diff --git a/pallets/external-validators/src/weights.rs b/pallets/external-validators/src/weights.rs new file mode 100644 index 000000000..bb47be798 --- /dev/null +++ b/pallets/external-validators/src/weights.rs @@ -0,0 +1,224 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + + +//! Autogenerated weights for pallet_invulnerables +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2024-04-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `girazoki-XPS-15-9530`, CPU: `13th Gen Intel(R) Core(TM) i9-13900H` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/release/tanssi-node +// benchmark +// pallet +// --execution=wasm +// --wasm-execution=compiled +// --pallet +// pallet_invulnerables +// --extrinsic +// * +// --chain=dev +// --steps +// 50 +// --repeat +// 20 +// --template=./benchmarking/frame-weight-template.hbs +// --json-file +// raw.json +// --output +// tmp/pallet_invulnerables.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +/// Weight functions needed for pallet_invulnerables. +pub trait WeightInfo { + fn skip_external_validators() -> Weight; + fn add_invulnerable(_b: u32) -> Weight; + fn remove_invulnerable(_b: u32) -> Weight; + fn new_session(_b: u32) -> Weight; + fn reward_invulnerable(_b: u32) -> Weight; +} + +/// Weights for pallet_invulnerables using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl WeightInfo for SubstrateWeight { + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 99]`. + fn skip_external_validators() -> Weight { + // Proof Size summary in bytes: + // Measured: `549 + b * (36 ±0)` + // Estimated: `4687 + b * (37 ±0)` + // Minimum execution time: 14_073_000 picoseconds. + Weight::from_parts(17_124_910, 4687) + // Standard Error: 1_519 + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 99]`. + fn add_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `549 + b * (36 ±0)` + // Estimated: `4687 + b * (37 ±0)` + // Minimum execution time: 14_073_000 picoseconds. + Weight::from_parts(17_124_910, 4687) + // Standard Error: 1_519 + .saturating_add(Weight::from_parts(76_594, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) + } + /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 100]`. + fn remove_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `70 + b * (32 ±0)` + // Estimated: `4687` + // Minimum execution time: 8_623_000 picoseconds. + Weight::from_parts(10_574_224, 4687) + // Standard Error: 992 + .saturating_add(Weight::from_parts(52_490, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Invulnerables::Invulnerables` (r:1 w:0) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 100]`. + fn new_session(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `70 + r * (32 ±0)` + // Estimated: `4687` + // Minimum execution time: 7_295_000 picoseconds. + Weight::from_parts(7_742_784, 4687) + // Standard Error: 4_715 + .saturating_add(Weight::from_parts(105_985, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Invulnerables::Invulnerables` (r:1 w:0) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 100]`. + fn reward_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `218 + b * (33 ±0)` + // Estimated: `4687` + // Minimum execution time: 17_514_000 picoseconds. + Weight::from_parts(19_797_082, 4687) + // Standard Error: 1_701 + .saturating_add(Weight::from_parts(69_693, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } +} + +// For backwards compatibility and tests +impl WeightInfo for () { + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 99]`. + fn skip_external_validators() -> Weight { + // Proof Size summary in bytes: + // Measured: `549 + b * (36 ±0)` + // Estimated: `4687 + b * (37 ±0)` + // Minimum execution time: 14_073_000 picoseconds. + Weight::from_parts(17_124_910, 4687) + // Standard Error: 1_519 + } + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 99]`. + fn add_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `549 + b * (36 ±0)` + // Estimated: `4687 + b * (37 ±0)` + // Minimum execution time: 14_073_000 picoseconds. + Weight::from_parts(17_124_910, 4687) + // Standard Error: 1_519 + .saturating_add(Weight::from_parts(76_594, 0).saturating_mul(b.into())) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) + } + /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 100]`. + fn remove_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `70 + b * (32 ±0)` + // Estimated: `4687` + // Minimum execution time: 8_623_000 picoseconds. + Weight::from_parts(10_574_224, 4687) + // Standard Error: 992 + .saturating_add(Weight::from_parts(52_490, 0).saturating_mul(b.into())) + .saturating_add(RocksDbWeight::get().reads(1_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `Invulnerables::Invulnerables` (r:1 w:0) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `System::BlockWeight` (r:1 w:1) + /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 100]`. + fn new_session(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `70 + r * (32 ±0)` + // Estimated: `4687` + // Minimum execution time: 7_295_000 picoseconds. + Weight::from_parts(7_742_784, 4687) + // Standard Error: 4_715 + .saturating_add(Weight::from_parts(105_985, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `Invulnerables::Invulnerables` (r:1 w:0) + /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 100]`. + fn reward_invulnerable(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `218 + b * (33 ±0)` + // Estimated: `4687` + // Minimum execution time: 17_514_000 picoseconds. + Weight::from_parts(19_797_082, 4687) + // Standard Error: 1_701 + .saturating_add(Weight::from_parts(69_693, 0).saturating_mul(b.into())) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 47e2cacc6..b6b8921a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,15 +6,6 @@ settings: importers: - .: - dependencies: - api-augment:0.400.0: - specifier: link:@tanssi/api-augment:0.400.0 - version: link:@tanssi/api-augment:0.400.0 - api-augment:latest: - specifier: link:@tanssi/api-augment:latest - version: link:@tanssi/api-augment:latest - test: dependencies: '@zombienet/orchestrator': diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 994076aee..ab14415b9 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -21,11 +21,13 @@ scale-info = { workspace = true, features = [ "derive" ] } # Own pallet-configuration = { workspace = true } pallet-data-preservers = { workspace = true } +pallet-external-validators = { workspace = true } pallet-foreign-asset-creator = { workspace = true } pallet-invulnerables = { workspace = true } pallet-pooled-staking = { workspace = true } pallet-registrar = { workspace = true } pallet-services-payment = { workspace = true } +pallet-session = { workspace = true } pallet-treasury = { workspace = true } # Moonkit diff --git a/runtime/common/src/migrations.rs b/runtime/common/src/migrations.rs index 99e5fffb3..8031c7f22 100644 --- a/runtime/common/src/migrations.rs +++ b/runtime/common/src/migrations.rs @@ -896,6 +896,46 @@ where } } +pub struct ExternalValidatorsInitialMigration(pub PhantomData); + +impl Migration for ExternalValidatorsInitialMigration +where + Runtime: pallet_external_validators::Config, + Runtime: pallet_session::Config< + ValidatorId = ::ValidatorId, + >, +{ + fn friendly_name(&self) -> &str { + "TM_ExternalValidatorsInitialMigration" + } + + fn migrate(&self, _available_weight: Weight) -> Weight { + use frame_support::pallet_prelude::*; + + // Set initial WhitelistedValidators to current validators from pallet session + let session_validators = pallet_session::Validators::::get(); + let session_validators = BoundedVec::truncate_from(session_validators); + pallet_external_validators::WhitelistedValidators::::put(session_validators); + + // Kill storage of ValidatorManager pallet + let pallet_prefix: &[u8] = b"ValidatorManager"; + let _ = clear_storage_prefix(pallet_prefix, b"", b"", None, None); + + // One db read and one db write per element, plus the on-chain storage + Runtime::DbWeight::get().reads_writes(1, 1) + } + + #[cfg(feature = "try-runtime")] + fn pre_upgrade(&self) -> Result, sp_runtime::DispatchError> { + Ok(vec![]) + } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(&self, _state: Vec) -> Result<(), sp_runtime::DispatchError> { + Ok(()) + } +} + pub struct FlashboxMigrations(PhantomData); impl GetMigrations for FlashboxMigrations @@ -1032,8 +1072,17 @@ where pub struct DancelightMigrations(PhantomData); -impl GetMigrations for DancelightMigrations { +impl GetMigrations for DancelightMigrations +where + Runtime: pallet_external_validators::Config, + Runtime: pallet_session::Config< + ValidatorId = ::ValidatorId, + >, +{ fn get_migrations() -> Vec> { - vec![] + let migrate_external_validators = + ExternalValidatorsInitialMigration::(Default::default()); + + vec![Box::new(migrate_external_validators)] } } diff --git a/solo-chains/runtime/dancelight/Cargo.toml b/solo-chains/runtime/dancelight/Cargo.toml index 18a018646..b29e92e17 100644 --- a/solo-chains/runtime/dancelight/Cargo.toml +++ b/solo-chains/runtime/dancelight/Cargo.toml @@ -69,6 +69,7 @@ pallet-collective = { workspace = true } pallet-conviction-voting = { workspace = true } pallet-democracy = { workspace = true } pallet-elections-phragmen = { workspace = true } +pallet-external-validators = { workspace = true } pallet-grandpa = { workspace = true } pallet-identity = { workspace = true } pallet-initializer = { workspace = true } @@ -268,6 +269,7 @@ std = [ "xcm-executor/std", "xcm-runtime-apis/std", "xcm/std", + "pallet-external-validators/std" ] no_std = [] runtime-benchmarks = [ @@ -330,6 +332,7 @@ runtime-benchmarks = [ "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", "xcm-runtime-apis/runtime-benchmarks", + "pallet-external-validators/runtime-benchmarks" ] try-runtime = [ "cumulus-pallet-parachain-system/try-runtime", @@ -391,6 +394,7 @@ try-runtime = [ "runtime-parachains/try-runtime", "sp-runtime/try-runtime", "tanssi-runtime-common/try-runtime", + "pallet-external-validators/try-runtime" ] # Set timing constants (e.g. session period) to faster versions to speed up testing. diff --git a/solo-chains/runtime/dancelight/src/genesis_config_presets.rs b/solo-chains/runtime/dancelight/src/genesis_config_presets.rs index f1f321ce7..ec41a3001 100644 --- a/solo-chains/runtime/dancelight/src/genesis_config_presets.rs +++ b/solo-chains/runtime/dancelight/src/genesis_config_presets.rs @@ -400,7 +400,15 @@ fn dancelight_testnet_genesis( "collatorConfiguration": crate::CollatorConfigurationConfig { config: host_configuration, ..Default::default() - } + }, + "externalValidators": crate::ExternalValidatorsConfig { + invulnerables: initial_authorities + .iter() + .map(|x| { + x.stash.clone() + }) + .collect::>(), + }, }) } diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index 11bc0a9a0..a9863a4be 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -160,7 +160,6 @@ use { mod tests; pub mod genesis_config_presets; -mod validator_manager; impl_runtime_weights!(dancelight_runtime_constants); @@ -467,7 +466,7 @@ impl pallet_session::Config for Runtime { type ValidatorIdOf = ValidatorIdOf; type ShouldEndSession = Babe; type NextSessionRotation = Babe; - type SessionManager = pallet_session::historical::NoteHistoricalRoot; + type SessionManager = pallet_session::historical::NoteHistoricalRoot; type SessionHandler = ::KeyTypeIdProviders; type Keys = SessionKeys; type WeightInfo = (); @@ -1192,9 +1191,17 @@ parameter_types! { pub const MaxTemporarySlotPerLeasePeriod: u32 = 5; } -impl validator_manager::Config for Runtime { +impl pallet_external_validators::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type PrivilegedOrigin = EnsureRoot; + type UpdateOrigin = EnsureRoot; + type MaxInvulnerables = MaxInvulnerables; + type ValidatorId = AccountId; + type ValidatorIdOf = ValidatorIdOf; + //type ValidatorRegistration = (); + type UnixTime = Timestamp; + type WeightInfo = (); + #[cfg(feature = "runtime-benchmarks")] + type Currency = Balances; } impl pallet_sudo::Config for Runtime { @@ -1580,7 +1587,8 @@ construct_runtime! { ParasSudoWrapper: paras_sudo_wrapper = 250, // Validator Manager pallet. - ValidatorManager: validator_manager = 252, + //ValidatorManager: validator_manager = 252, + ExternalValidators: pallet_external_validators = 253, // Root testing pallet. RootTesting: pallet_root_testing = 249, diff --git a/solo-chains/runtime/dancelight/src/validator_manager.rs b/solo-chains/runtime/dancelight/src/validator_manager.rs deleted file mode 100644 index 638fb9abe..000000000 --- a/solo-chains/runtime/dancelight/src/validator_manager.rs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (C) Moondance Labs Ltd. -// This file is part of Tanssi. - -// Tanssi is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Tanssi is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Tanssi. If not, see - -//! A pallet for managing validators on Dancelight. - -use {sp_staking::SessionIndex, sp_std::vec::Vec}; - -pub use pallet::*; - -type Session = pallet_session::Pallet; - -#[frame_support::pallet] -pub mod pallet { - use { - super::*, - frame_support::{dispatch::DispatchResult, pallet_prelude::*, traits::EnsureOrigin}, - frame_system::pallet_prelude::*, - }; - - #[pallet::pallet] - pub struct Pallet(_); - - /// Configuration for the parachain proposer. - #[pallet::config] - pub trait Config: frame_system::Config + pallet_session::Config { - /// The overreaching event type. - type RuntimeEvent: From> + IsType<::RuntimeEvent>; - - /// Privileged origin that can add or remove validators. - type PrivilegedOrigin: EnsureOrigin<::RuntimeOrigin>; - } - - #[pallet::event] - #[pallet::generate_deposit(pub(super) fn deposit_event)] - pub enum Event { - /// New validators were added to the set. - ValidatorsRegistered(Vec), - /// Validators were removed from the set. - ValidatorsDeregistered(Vec), - } - - /// Validators that should be retired, because their Parachain was deregistered. - #[pallet::storage] - #[pallet::unbounded] - pub(crate) type ValidatorsToRetire = - StorageValue<_, Vec, ValueQuery>; - - /// Validators that should be added. - #[pallet::storage] - #[pallet::unbounded] - pub(crate) type ValidatorsToAdd = StorageValue<_, Vec, ValueQuery>; - - #[pallet::call] - impl Pallet { - /// Add new validators to the set. - /// - /// The new validators will be active from current session + 2. - #[pallet::call_index(0)] - #[pallet::weight({100_000})] - pub fn register_validators( - origin: OriginFor, - validators: Vec, - ) -> DispatchResult { - T::PrivilegedOrigin::ensure_origin(origin)?; - - validators - .clone() - .into_iter() - .for_each(ValidatorsToAdd::::append); - - Self::deposit_event(Event::ValidatorsRegistered(validators)); - Ok(()) - } - - /// Remove validators from the set. - /// - /// The removed validators will be deactivated from current session + 2. - #[pallet::call_index(1)] - #[pallet::weight({100_000})] - pub fn deregister_validators( - origin: OriginFor, - validators: Vec, - ) -> DispatchResult { - T::PrivilegedOrigin::ensure_origin(origin)?; - - validators - .clone() - .into_iter() - .for_each(ValidatorsToRetire::::append); - - Self::deposit_event(Event::ValidatorsDeregistered(validators)); - Ok(()) - } - } -} - -impl pallet_session::SessionManager for Pallet { - fn new_session(new_index: SessionIndex) -> Option> { - if new_index <= 1 { - return None; - } - - let mut validators = Session::::validators(); - - ValidatorsToRetire::::take().iter().for_each(|v| { - if let Some(pos) = validators.iter().position(|r| r == v) { - validators.swap_remove(pos); - } - }); - - ValidatorsToAdd::::take().into_iter().for_each(|v| { - if !validators.contains(&v) { - validators.push(v); - } - }); - - Some(validators) - } - - fn end_session(_: SessionIndex) {} - - fn start_session(_start_index: SessionIndex) {} -} - -impl pallet_session::historical::SessionManager for Pallet { - fn new_session(new_index: SessionIndex) -> Option> { - >::new_session(new_index) - .map(|r| r.into_iter().map(|v| (v, Default::default())).collect()) - } - - fn start_session(start_index: SessionIndex) { - >::start_session(start_index) - } - - fn end_session(end_index: SessionIndex) { - >::end_session(end_index) - } -} From 8fa98f0f1684c60cef9540a73354547dc1e2ec46 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 17 Oct 2024 11:52:21 +0200 Subject: [PATCH 02/82] Rename extrinsics and add tests --- pallets/external-validators/Cargo.toml | 2 +- .../external-validators/src/benchmarking.rs | 6 +- pallets/external-validators/src/lib.rs | 107 ++++++++++-------- pallets/external-validators/src/mock.rs | 15 ++- pallets/external-validators/src/tests.rs | 87 +++++++++----- pallets/external-validators/src/weights.rs | 18 +-- pallets/invulnerables/src/lib.rs | 10 +- pallets/invulnerables/src/tests.rs | 1 - .../dancelight/src/genesis_config_presets.rs | 2 +- solo-chains/runtime/dancelight/src/lib.rs | 7 +- 10 files changed, 145 insertions(+), 110 deletions(-) diff --git a/pallets/external-validators/Cargo.toml b/pallets/external-validators/Cargo.toml index 50e57f871..d28ee62f0 100644 --- a/pallets/external-validators/Cargo.toml +++ b/pallets/external-validators/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallet-external-validators" authors = { workspace = true } -description = "Simple pallet to store invulnarable collators." +description = "Simple pallet to store external validators." edition = "2021" license = "GPL-3.0-only" version = "0.1.0" diff --git a/pallets/external-validators/src/benchmarking.rs b/pallets/external-validators/src/benchmarking.rs index 3aa77b363..6b0a078c4 100644 --- a/pallets/external-validators/src/benchmarking.rs +++ b/pallets/external-validators/src/benchmarking.rs @@ -145,7 +145,7 @@ mod benchmarks { _(origin as T::RuntimeOrigin, new_invulnerable.clone()); assert_last_event::( - Event::InvulnerableAdded { + Event::WhitelistedValidatorAdded { account_id: new_invulnerable, } .into(), @@ -175,7 +175,7 @@ mod benchmarks { _(origin as T::RuntimeOrigin, to_remove.clone()); assert_last_event::( - Event::InvulnerableRemoved { + Event::WhitelistedValidatorRemoved { account_id: to_remove, } .into(), @@ -201,7 +201,7 @@ mod benchmarks { invulnerables.into_iter().unzip(); for account in account_ids { - >::add_invulnerable(origin.clone(), account) + >::add_whitelisted(origin.clone(), account) .expect("add invulnerable failed"); } diff --git a/pallets/external-validators/src/lib.rs b/pallets/external-validators/src/lib.rs index 23dc94b92..e534fe2f1 100644 --- a/pallets/external-validators/src/lib.rs +++ b/pallets/external-validators/src/lib.rs @@ -14,22 +14,24 @@ // You should have received a copy of the GNU General Public License // along with Tanssi. If not, see -//! Invulnerables pallet. +//! ExternalValidators pallet. //! -//! A pallet to manage invulnerable collators in a parachain. +//! A pallet to manage external validators for a solochain. //! //! ## Terminology //! -//! - Collator: A parachain block producer. -//! - Invulnerable: An account appointed by governance and guaranteed to be in the collator set. +//! - WhitelistedValidators: Fixed validators set by root/governance. Have priority over the external validators. +//! - ExternalValidators: Validators set using storage proofs from another blockchain. Changing them triggers a +//! new era. Can be disabled by setting `SkipExternalValidators` to true. #![cfg_attr(not(feature = "std"), no_std)] +use frame_support::dispatch::DispatchClass; pub use pallet::*; -use sp_staking::SessionIndex; use { core::marker::PhantomData, sp_runtime::{traits::Convert, TokenError}, + sp_staking::SessionIndex, sp_std::vec::Vec, }; @@ -51,6 +53,7 @@ pub mod pallet { use frame_support::traits::Currency; use { + super::*, frame_support::{ dispatch::DispatchResultWithPostInfo, pallet_prelude::*, @@ -58,9 +61,7 @@ pub mod pallet { BoundedVec, DefaultNoBound, }, frame_system::pallet_prelude::*, - pallet_session::SessionManager, sp_runtime::{traits::Convert, SaturatedConversion}, - sp_staking::SessionIndex, sp_std::vec::Vec, }; @@ -85,9 +86,13 @@ pub mod pallet { /// Origin that can dictate updating parameters of this pallet. type UpdateOrigin: EnsureOrigin; - /// Maximum number of invulnerables. + /// Maximum number of whitelisted validators. #[pallet::constant] - type MaxInvulnerables: Get; + type MaxWhitelistedValidators: Get; + + /// Maximum number of external validators. + #[pallet::constant] + type MaxExternalValidators: Get; /// A stable ID for a validator. type ValidatorId: Member @@ -101,8 +106,8 @@ pub mod pallet { /// Its cost must be at most one storage read. type ValidatorIdOf: Convert>; - // Validate a user is registered - //type ValidatorRegistration: ValidatorRegistration; + /// Validate a user is registered + type ValidatorRegistration: ValidatorRegistration; /// Time used for computing era duration. /// @@ -125,12 +130,12 @@ pub mod pallet { /// The invulnerable, permissioned collators. This list must be sorted. #[pallet::storage] pub type WhitelistedValidators = - StorageValue<_, BoundedVec, ValueQuery>; + StorageValue<_, BoundedVec, ValueQuery>; /// The invulnerable, permissioned collators. This list must be sorted. #[pallet::storage] pub type ExternalValidators = - StorageValue<_, BoundedVec, ValueQuery>; + StorageValue<_, BoundedVec, ValueQuery>; /// The invulnerable, permissioned collators. This list must be sorted. #[pallet::storage] @@ -158,44 +163,40 @@ pub mod pallet { #[pallet::genesis_config] #[derive(DefaultNoBound)] pub struct GenesisConfig { - pub invulnerables: Vec, + pub whitelisted_validators: Vec, } #[pallet::genesis_build] impl BuildGenesisConfig for GenesisConfig { fn build(&self) { - let duplicate_invulnerables = self - .invulnerables + let duplicate_validators = self + .whitelisted_validators .iter() // T::ValidatorId does not impl Ord or Hash so we cannot collect into set directly, // but we can check for duplicates if we encode them first. .map(|x| x.encode()) .collect::>(); assert!( - duplicate_invulnerables.len() == self.invulnerables.len(), - "duplicate invulnerables in genesis." + duplicate_validators.len() == self.whitelisted_validators.len(), + "duplicate validators in genesis." ); - let bounded_invulnerables = - BoundedVec::<_, T::MaxInvulnerables>::try_from(self.invulnerables.clone()) - .expect("genesis invulnerables are more than T::MaxInvulnerables"); + let bounded_validators = BoundedVec::<_, T::MaxWhitelistedValidators>::try_from( + self.whitelisted_validators.clone(), + ) + .expect("genesis validators are more than T::MaxWhitelistedValidators"); - >::put(bounded_invulnerables); + >::put(bounded_validators); } } #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { - /// New Invulnerables were set. - NewInvulnerables { invulnerables: Vec }, /// A new Invulnerable was added. - InvulnerableAdded { account_id: T::AccountId }, + WhitelistedValidatorAdded { account_id: T::AccountId }, /// An Invulnerable was removed. - InvulnerableRemoved { account_id: T::AccountId }, - /// An account was unable to be added to the Invulnerables because they did not have keys - /// registered. Other Invulnerables may have been set. - InvalidInvulnerableSkipped { account_id: T::AccountId }, + WhitelistedValidatorRemoved { account_id: T::AccountId }, } #[pallet::error] @@ -214,8 +215,7 @@ pub mod pallet { #[pallet::call] impl Pallet { - /// Remove an account `who` from the list of `Invulnerables` collators. `Invulnerables` must - /// be sorted. + /// Allow to ignore external validators and use only whitelisted ones. /// /// The origin for this call must be the `UpdateOrigin`. #[pallet::call_index(0)] @@ -228,21 +228,21 @@ pub mod pallet { Ok(()) } - /// Add a new account `who` to the list of `Invulnerables` collators. + /// Add a new account `who` to the list of `WhitelistedValidators`. /// /// The origin for this call must be the `UpdateOrigin`. #[pallet::call_index(1)] - #[pallet::weight(T::WeightInfo::add_invulnerable( - T::MaxInvulnerables::get().saturating_sub(1), + #[pallet::weight(T::WeightInfo::add_whitelisted( + T::MaxWhitelistedValidators::get().saturating_sub(1), ))] - pub fn add_invulnerable( + pub fn add_whitelisted( origin: OriginFor, who: T::AccountId, ) -> DispatchResultWithPostInfo { T::UpdateOrigin::ensure_origin(origin)?; // don't let one unprepared collator ruin things for everyone. - let maybe_collator_id = T::ValidatorIdOf::convert(who.clone()); - //.filter(T::ValidatorRegistration::is_registered); + let maybe_collator_id = T::ValidatorIdOf::convert(who.clone()) + .filter(T::ValidatorRegistration::is_registered); let collator_id = maybe_collator_id.ok_or(Error::::NoKeysRegistered)?; @@ -256,25 +256,24 @@ pub mod pallet { Ok(()) })?; - Self::deposit_event(Event::InvulnerableAdded { account_id: who }); + Self::deposit_event(Event::WhitelistedValidatorAdded { account_id: who }); - let weight_used = ::WeightInfo::add_invulnerable( + let weight_used = ::WeightInfo::add_whitelisted( WhitelistedValidators::::decode_len() .unwrap_or_default() .try_into() - .unwrap_or(T::MaxInvulnerables::get().saturating_sub(1)), + .unwrap_or(T::MaxWhitelistedValidators::get().saturating_sub(1)), ); Ok(Some(weight_used).into()) } - /// Remove an account `who` from the list of `Invulnerables` collators. `Invulnerables` must - /// be sorted. + /// Remove an account `who` from the list of `WhitelistedValidators` collators. /// /// The origin for this call must be the `UpdateOrigin`. #[pallet::call_index(2)] - #[pallet::weight(T::WeightInfo::remove_invulnerable(T::MaxInvulnerables::get()))] - pub fn remove_invulnerable(origin: OriginFor, who: T::AccountId) -> DispatchResult { + #[pallet::weight(T::WeightInfo::remove_whitelisted(T::MaxWhitelistedValidators::get()))] + pub fn remove_whitelisted(origin: OriginFor, who: T::AccountId) -> DispatchResult { T::UpdateOrigin::ensure_origin(origin)?; let collator_id = T::ValidatorIdOf::convert(who.clone()) @@ -289,7 +288,7 @@ pub mod pallet { Ok(()) })?; - Self::deposit_event(Event::InvulnerableRemoved { account_id: who }); + Self::deposit_event(Event::WhitelistedValidatorRemoved { account_id: who }); Ok(()) } } @@ -309,7 +308,10 @@ pub mod pallet { // Increase era >::mutate(|q| { if q.is_none() { - *q = Default::default(); + *q = Some(ActiveEraInfo { + index: 0, + start: None, + }); } let q = q.as_mut().unwrap(); @@ -319,8 +321,7 @@ pub mod pallet { }); } - // TODO: for testing, remove - pub fn invulnerables() -> Vec { + pub fn whitelisted_validators() -> Vec { >::get().into() } } @@ -384,8 +385,9 @@ where } } else { Currency::resolve(&rewarded, amount).map_err(|_| TokenError::NotExpendable)?; - total_weight += - Runtime::WeightInfo::reward_invulnerable(Runtime::MaxInvulnerables::get()) + total_weight += Runtime::WeightInfo::reward_validator( + Runtime::MaxWhitelistedValidators::get() + Runtime::MaxExternalValidators::get(), + ) } Ok(Some(total_weight).into()) } @@ -403,6 +405,11 @@ impl pallet_session::SessionManager for Pallet { validators.extend(ExternalValidators::::get()) } + frame_system::Pallet::::register_extra_weight_unchecked( + T::WeightInfo::new_session(validators.len() as u32), + DispatchClass::Mandatory, + ); + Some(validators) } diff --git a/pallets/external-validators/src/mock.rs b/pallets/external-validators/src/mock.rs index fa1097ee2..adbbb7c9f 100644 --- a/pallets/external-validators/src/mock.rs +++ b/pallets/external-validators/src/mock.rs @@ -124,10 +124,11 @@ impl ValidatorRegistration for IsRegistered { impl Config for Test { type RuntimeEvent = RuntimeEvent; type UpdateOrigin = EnsureSignedBy; - type MaxInvulnerables = ConstU32<20>; + type MaxWhitelistedValidators = ConstU32<20>; + type MaxExternalValidators = ConstU32<20>; type ValidatorId = ::AccountId; type ValidatorIdOf = IdentityCollator; - //type ValidatorRegistration = IsRegistered; + type ValidatorRegistration = IsRegistered; type UnixTime = Timestamp; type WeightInfo = (); #[cfg(feature = "runtime-benchmarks")] @@ -188,7 +189,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::::default() .build_storage() .unwrap(); - let invulnerables = vec![1, 2]; + let whitelisted_validators = vec![1, 2]; let balances = vec![(1, 100), (2, 100), (3, 100), (4, 100), (5, 100)]; let keys = balances @@ -210,9 +211,11 @@ pub fn new_test_ext() -> sp_io::TestExternalities { pallet_balances::GenesisConfig:: { balances } .assimilate_storage(&mut t) .unwrap(); - pallet_external_validators::GenesisConfig:: { invulnerables } - .assimilate_storage(&mut t) - .unwrap(); + pallet_external_validators::GenesisConfig:: { + whitelisted_validators, + } + .assimilate_storage(&mut t) + .unwrap(); session.assimilate_storage(&mut t).unwrap(); t.into() diff --git a/pallets/external-validators/src/tests.rs b/pallets/external-validators/src/tests.rs index a43d8c922..1b45076dd 100644 --- a/pallets/external-validators/src/tests.rs +++ b/pallets/external-validators/src/tests.rs @@ -13,6 +13,7 @@ // You should have received a copy of the GNU General Public License // along with Tanssi. If not, see +use pallet_session::SessionManager; use { crate::{ mock::{ @@ -28,74 +29,75 @@ use { #[test] fn basic_setup_works() { new_test_ext().execute_with(|| { - // genesis should sort input - assert_eq!(ExternalValidators::invulnerables(), vec![1, 2]); + assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); }); } #[test] -fn add_invulnerable_works() { +fn add_whitelisted_works() { new_test_ext().execute_with(|| { initialize_to_block(1); - assert_eq!(ExternalValidators::invulnerables(), vec![1, 2]); + assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); let new = 3; // function runs - assert_ok!(ExternalValidators::add_invulnerable( + assert_ok!(ExternalValidators::add_whitelisted( RuntimeOrigin::signed(RootAccount::get()), new )); System::assert_last_event(RuntimeEvent::ExternalValidators( - crate::Event::InvulnerableAdded { account_id: new }, + crate::Event::WhitelistedValidatorAdded { account_id: new }, )); // same element cannot be added more than once assert_noop!( - ExternalValidators::add_invulnerable(RuntimeOrigin::signed(RootAccount::get()), new), + ExternalValidators::add_whitelisted(RuntimeOrigin::signed(RootAccount::get()), new), Error::::AlreadyInvulnerable ); // new element is now part of the invulnerables list - assert!(ExternalValidators::invulnerables().to_vec().contains(&new)); + assert!(ExternalValidators::whitelisted_validators() + .to_vec() + .contains(&new)); // cannot add with non-root assert_noop!( - ExternalValidators::add_invulnerable(RuntimeOrigin::signed(1), new), + ExternalValidators::add_whitelisted(RuntimeOrigin::signed(1), new), BadOrigin ); }); } #[test] -fn add_invulnerable_does_not_work_if_not_registered() { +fn add_whitelisted_does_not_work_if_not_registered() { new_test_ext().execute_with(|| { initialize_to_block(1); - assert_eq!(ExternalValidators::invulnerables(), vec![1, 2]); + assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); let new = 42; assert_noop!( - ExternalValidators::add_invulnerable(RuntimeOrigin::signed(RootAccount::get()), new), + ExternalValidators::add_whitelisted(RuntimeOrigin::signed(RootAccount::get()), new), Error::::NoKeysRegistered ); }); } #[test] -fn invulnerable_limit_works() { +fn validator_limit_works() { new_test_ext().execute_with(|| { - assert_eq!(ExternalValidators::invulnerables(), vec![1, 2]); + assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); // MaxExternalValidators: u32 = 20 for ii in 3..=21 { if ii < 21 { - assert_ok!(ExternalValidators::add_invulnerable( + assert_ok!(ExternalValidators::add_whitelisted( RuntimeOrigin::signed(RootAccount::get()), ii )); } else { assert_noop!( - ExternalValidators::add_invulnerable( + ExternalValidators::add_whitelisted( RuntimeOrigin::signed(RootAccount::get()), ii ), @@ -104,47 +106,78 @@ fn invulnerable_limit_works() { } } let expected: Vec = (1..=20).collect(); - assert_eq!(ExternalValidators::invulnerables(), expected); + assert_eq!(ExternalValidators::whitelisted_validators(), expected); }); } #[test] -fn remove_invulnerable_works() { +fn remove_whitelisted_works() { new_test_ext().execute_with(|| { initialize_to_block(1); - assert_eq!(ExternalValidators::invulnerables(), vec![1, 2]); + assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); - assert_ok!(ExternalValidators::add_invulnerable( + assert_ok!(ExternalValidators::add_whitelisted( RuntimeOrigin::signed(RootAccount::get()), 4 )); - assert_ok!(ExternalValidators::add_invulnerable( + assert_ok!(ExternalValidators::add_whitelisted( RuntimeOrigin::signed(RootAccount::get()), 3 )); - assert_eq!(ExternalValidators::invulnerables(), vec![1, 2, 4, 3]); + assert_eq!( + ExternalValidators::whitelisted_validators(), + vec![1, 2, 4, 3] + ); - assert_ok!(ExternalValidators::remove_invulnerable( + assert_ok!(ExternalValidators::remove_whitelisted( RuntimeOrigin::signed(RootAccount::get()), 2 )); System::assert_last_event(RuntimeEvent::ExternalValidators( - crate::Event::InvulnerableRemoved { account_id: 2 }, + crate::Event::WhitelistedValidatorRemoved { account_id: 2 }, )); - assert_eq!(ExternalValidators::invulnerables(), vec![1, 4, 3]); + assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 4, 3]); // cannot remove invulnerable not in the list assert_noop!( - ExternalValidators::remove_invulnerable(RuntimeOrigin::signed(RootAccount::get()), 2), + ExternalValidators::remove_whitelisted(RuntimeOrigin::signed(RootAccount::get()), 2), Error::::NotInvulnerable ); // cannot remove without privilege assert_noop!( - ExternalValidators::remove_invulnerable(RuntimeOrigin::signed(1), 3), + ExternalValidators::remove_whitelisted(RuntimeOrigin::signed(1), 3), BadOrigin ); }); } + +#[test] +fn whitelisted_and_external_order() { + new_test_ext().execute_with(|| { + initialize_to_block(1); + assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); + assert_ok!(ExternalValidators::set_external_validators(vec![50, 51])); + + let validators = ExternalValidators::new_session(2); + assert_eq!(validators, Some(vec![1, 2, 50, 51])); + }); +} + +#[test] +fn can_skip_external_validators() { + new_test_ext().execute_with(|| { + initialize_to_block(1); + assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); + assert_ok!(ExternalValidators::set_external_validators(vec![50, 51])); + assert_ok!(ExternalValidators::skip_external_validators( + RuntimeOrigin::signed(RootAccount::get()), + true + )); + + let validators = ExternalValidators::new_session(2); + assert_eq!(validators, Some(vec![1, 2])); + }); +} diff --git a/pallets/external-validators/src/weights.rs b/pallets/external-validators/src/weights.rs index bb47be798..3543f42d4 100644 --- a/pallets/external-validators/src/weights.rs +++ b/pallets/external-validators/src/weights.rs @@ -54,10 +54,10 @@ use sp_std::marker::PhantomData; /// Weight functions needed for pallet_invulnerables. pub trait WeightInfo { fn skip_external_validators() -> Weight; - fn add_invulnerable(_b: u32) -> Weight; - fn remove_invulnerable(_b: u32) -> Weight; + fn add_whitelisted(_b: u32) -> Weight; + fn remove_whitelisted(_b: u32) -> Weight; fn new_session(_b: u32) -> Weight; - fn reward_invulnerable(_b: u32) -> Weight; + fn reward_validator(_b: u32) -> Weight; } /// Weights for pallet_invulnerables using the Substrate node and recommended hardware. @@ -83,7 +83,7 @@ impl WeightInfo for SubstrateWeight { /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 99]`. - fn add_invulnerable(b: u32, ) -> Weight { + fn add_whitelisted(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `549 + b * (36 ±0)` // Estimated: `4687 + b * (37 ±0)` @@ -98,7 +98,7 @@ impl WeightInfo for SubstrateWeight { /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 100]`. - fn remove_invulnerable(b: u32, ) -> Weight { + fn remove_whitelisted(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `70 + b * (32 ±0)` // Estimated: `4687` @@ -130,7 +130,7 @@ impl WeightInfo for SubstrateWeight { /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 100]`. - fn reward_invulnerable(b: u32, ) -> Weight { + fn reward_validator(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `218 + b * (33 ±0)` // Estimated: `4687` @@ -163,7 +163,7 @@ impl WeightInfo for () { /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 99]`. - fn add_invulnerable(b: u32, ) -> Weight { + fn add_whitelisted(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `549 + b * (36 ±0)` // Estimated: `4687 + b * (37 ±0)` @@ -178,7 +178,7 @@ impl WeightInfo for () { /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 100]`. - fn remove_invulnerable(b: u32, ) -> Weight { + fn remove_whitelisted(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `70 + b * (32 ±0)` // Estimated: `4687` @@ -210,7 +210,7 @@ impl WeightInfo for () { /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 100]`. - fn reward_invulnerable(b: u32, ) -> Weight { + fn reward_validator(b: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `218 + b * (33 ±0)` // Estimated: `4687` diff --git a/pallets/invulnerables/src/lib.rs b/pallets/invulnerables/src/lib.rs index f6dddd382..8798a029a 100644 --- a/pallets/invulnerables/src/lib.rs +++ b/pallets/invulnerables/src/lib.rs @@ -110,7 +110,7 @@ pub mod pallet { #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); - /// The invulnerable, permissioned collators. This list must be sorted. + /// The invulnerable, permissioned collators. #[pallet::storage] pub type Invulnerables = StorageValue<_, BoundedVec, ValueQuery>; @@ -144,15 +144,10 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { - /// New Invulnerables were set. - NewInvulnerables { invulnerables: Vec }, /// A new Invulnerable was added. InvulnerableAdded { account_id: T::AccountId }, /// An Invulnerable was removed. InvulnerableRemoved { account_id: T::AccountId }, - /// An account was unable to be added to the Invulnerables because they did not have keys - /// registered. Other Invulnerables may have been set. - InvalidInvulnerableSkipped { account_id: T::AccountId }, } #[pallet::error] @@ -211,8 +206,7 @@ pub mod pallet { Ok(Some(weight_used).into()) } - /// Remove an account `who` from the list of `Invulnerables` collators. `Invulnerables` must - /// be sorted. + /// Remove an account `who` from the list of `Invulnerables` collators. /// /// The origin for this call must be the `UpdateOrigin`. #[pallet::call_index(2)] diff --git a/pallets/invulnerables/src/tests.rs b/pallets/invulnerables/src/tests.rs index 928aff0bb..88d4aba4f 100644 --- a/pallets/invulnerables/src/tests.rs +++ b/pallets/invulnerables/src/tests.rs @@ -28,7 +28,6 @@ use { #[test] fn basic_setup_works() { new_test_ext().execute_with(|| { - // genesis should sort input assert_eq!(Invulnerables::invulnerables(), vec![1, 2]); }); } diff --git a/solo-chains/runtime/dancelight/src/genesis_config_presets.rs b/solo-chains/runtime/dancelight/src/genesis_config_presets.rs index ec41a3001..96ef1d047 100644 --- a/solo-chains/runtime/dancelight/src/genesis_config_presets.rs +++ b/solo-chains/runtime/dancelight/src/genesis_config_presets.rs @@ -402,7 +402,7 @@ fn dancelight_testnet_genesis( ..Default::default() }, "externalValidators": crate::ExternalValidatorsConfig { - invulnerables: initial_authorities + whitelisted_validators: initial_authorities .iter() .map(|x| { x.stash.clone() diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index a9863a4be..af3f2b4ae 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -1194,10 +1194,11 @@ parameter_types! { impl pallet_external_validators::Config for Runtime { type RuntimeEvent = RuntimeEvent; type UpdateOrigin = EnsureRoot; - type MaxInvulnerables = MaxInvulnerables; + type MaxWhitelistedValidators = MaxInvulnerables; + type MaxExternalValidators = MaxInvulnerables; type ValidatorId = AccountId; type ValidatorIdOf = ValidatorIdOf; - //type ValidatorRegistration = (); + type ValidatorRegistration = Session; type UnixTime = Timestamp; type WeightInfo = (); #[cfg(feature = "runtime-benchmarks")] @@ -1586,8 +1587,6 @@ construct_runtime! { ParasSudoWrapper: paras_sudo_wrapper = 250, - // Validator Manager pallet. - //ValidatorManager: validator_manager = 252, ExternalValidators: pallet_external_validators = 253, // Root testing pallet. From 86cb5cd45e32dce378399a799ccfa736c4b71e82 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 17 Oct 2024 12:05:02 +0200 Subject: [PATCH 03/82] Fix tests --- solo-chains/runtime/dancelight/src/tests/common/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/solo-chains/runtime/dancelight/src/tests/common/mod.rs b/solo-chains/runtime/dancelight/src/tests/common/mod.rs index 85562f84d..97d9de879 100644 --- a/solo-chains/runtime/dancelight/src/tests/common/mod.rs +++ b/solo-chains/runtime/dancelight/src/tests/common/mod.rs @@ -629,6 +629,16 @@ impl ExtBuilder { .assimilate_storage(&mut t) .unwrap(); + pallet_external_validators::GenesisConfig:: { + whitelisted_validators: self + .validators + .iter() + .map(|(account, _)| account.clone()) + .collect(), + } + .assimilate_storage(&mut t) + .unwrap(); + pallet_sudo::GenesisConfig:: { key: self.sudo } .assimilate_storage(&mut t) .unwrap(); From 57f29498adf7cd59e5c4db38405fe7aa4ec29508 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 17 Oct 2024 13:04:38 +0200 Subject: [PATCH 04/82] Fix benchmarks --- pallets/external-validators/Cargo.toml | 10 +- .../external-validators/src/benchmarking.rs | 73 ++++--- pallets/external-validators/src/weights.rs | 186 ++++++++---------- runtime/common/Cargo.toml | 5 + solo-chains/runtime/dancelight/Cargo.toml | 6 +- solo-chains/runtime/dancelight/src/lib.rs | 3 +- .../runtime/dancelight/src/weights/mod.rs | 1 + .../src/weights/pallet_external_validators.rs | 124 ++++++++++++ 8 files changed, 266 insertions(+), 142 deletions(-) create mode 100644 solo-chains/runtime/dancelight/src/weights/pallet_external_validators.rs diff --git a/pallets/external-validators/Cargo.toml b/pallets/external-validators/Cargo.toml index d28ee62f0..56c18866b 100644 --- a/pallets/external-validators/Cargo.toml +++ b/pallets/external-validators/Cargo.toml @@ -28,12 +28,12 @@ tp-traits = { workspace = true } frame-benchmarking = { workspace = true } pallet-balances = { workspace = true, optional = true } -pallet-session = { workspace = true, features = ["historical"] } +pallet-session = { workspace = true, features = [ "historical" ] } [dev-dependencies] +pallet-timestamp = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } -pallet-timestamp = { workspace = true } [features] default = [ "std" ] @@ -44,6 +44,7 @@ std = [ "log/std", "pallet-balances/std", "pallet-session/std", + "pallet-timestamp/std", "parity-scale-codec/std", "rand?/std", "scale-info/std", @@ -53,18 +54,17 @@ std = [ "sp-staking/std", "sp-std/std", "tp-traits/std", - "pallet-timestamp/std" ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", "rand", "sp-runtime/runtime-benchmarks", "sp-staking/runtime-benchmarks", "tp-traits/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks" ] try-runtime = [ @@ -72,6 +72,6 @@ try-runtime = [ "frame-system/try-runtime", "pallet-balances?/try-runtime", "pallet-session/try-runtime", + "pallet-timestamp/try-runtime", "sp-runtime/try-runtime", - "pallet-timestamp/try-runtime" ] diff --git a/pallets/external-validators/src/benchmarking.rs b/pallets/external-validators/src/benchmarking.rs index 6b0a078c4..e5f675b50 100644 --- a/pallets/external-validators/src/benchmarking.rs +++ b/pallets/external-validators/src/benchmarking.rs @@ -60,7 +60,7 @@ fn keys(c: u32) -> ::Keys { use rand::{RngCore, SeedableRng}; let keys = { - let mut keys = [0u8; 128]; + let mut keys = [0u8; 256]; if c > 0 { let mut rng = rand::rngs::StdRng::seed_from_u64(u64::from(c)); @@ -75,9 +75,13 @@ fn keys(c: u32) -> ::Keys { fn invulnerable( c: u32, -) -> (T::AccountId, T::CollatorId, ::Keys) { +) -> ( + T::AccountId, + ::ValidatorId, + ::Keys, +) { let funded_user = create_funded_user::("candidate", c, 100); - let collator_id = T::CollatorIdOf::convert(funded_user.clone()) + let collator_id = ::ValidatorIdOf::convert(funded_user.clone()) .expect("Converstion of account id of collator id failed."); (funded_user, collator_id, keys::(c)) } @@ -86,7 +90,7 @@ fn invulnerables< T: Config + frame_system::Config + pallet_session::Config + pallet_balances::Config, >( count: u32, -) -> Vec<(T::AccountId, T::CollatorId)> { +) -> Vec<(T::AccountId, ::ValidatorId)> { let invulnerables = (0..count).map(|c| invulnerable::(c)).collect::>(); for (who, _collator_id, keys) in invulnerables.clone() { @@ -116,22 +120,32 @@ mod benchmarks { use super::*; #[benchmark] - fn add_invulnerable( - b: Linear<1, { T::MaxInvulnerables::get() - 1 }>, + fn skip_external_validators() -> Result<(), BenchmarkError> { + let origin = + T::UpdateOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; + + #[extrinsic_call] + _(origin as T::RuntimeOrigin, true); + + Ok(()) + } + + #[benchmark] + fn add_whitelisted( + b: Linear<1, { T::MaxWhitelistedValidators::get() - 1 }>, ) -> Result<(), BenchmarkError> { let origin = T::UpdateOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; // now we need to fill up invulnerables - let mut invulnerables = invulnerables::(b); - invulnerables.sort(); + let invulnerables = invulnerables::(b); - let (_account_ids, collator_ids): (Vec, Vec) = + let (_account_ids, collator_ids): (Vec, Vec<::ValidatorId>) = invulnerables.into_iter().unzip(); - let invulnerables: frame_support::BoundedVec<_, T::MaxInvulnerables> = + let invulnerables: frame_support::BoundedVec<_, T::MaxWhitelistedValidators> = frame_support::BoundedVec::try_from(collator_ids).unwrap(); - >::put(invulnerables); + >::put(invulnerables); let (new_invulnerable, _collator_id, keys) = invulnerable::(b + 1); >::set_keys( @@ -154,20 +168,19 @@ mod benchmarks { } #[benchmark] - fn remove_invulnerable( - b: Linear<{ 1 }, { T::MaxInvulnerables::get() }>, + fn remove_whitelisted( + b: Linear<{ 1 }, { T::MaxWhitelistedValidators::get() }>, ) -> Result<(), BenchmarkError> { let origin = T::UpdateOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; - let mut invulnerables = invulnerables::(b); - invulnerables.sort(); + let invulnerables = invulnerables::(b); - let (account_ids, collator_ids): (Vec, Vec) = + let (account_ids, collator_ids): (Vec, Vec<::ValidatorId>) = invulnerables.into_iter().unzip(); - let invulnerables: frame_support::BoundedVec<_, T::MaxInvulnerables> = + let invulnerables: frame_support::BoundedVec<_, T::MaxWhitelistedValidators> = frame_support::BoundedVec::try_from(collator_ids).unwrap(); - >::put(invulnerables); + >::put(invulnerables); let to_remove = account_ids.last().unwrap().clone(); @@ -185,19 +198,20 @@ mod benchmarks { // worst case for new session. #[benchmark] - fn new_session(r: Linear<1, { T::MaxInvulnerables::get() }>) -> Result<(), BenchmarkError> { + fn new_session( + r: Linear<1, { T::MaxWhitelistedValidators::get() }>, + ) -> Result<(), BenchmarkError> { // start fresh - Invulnerables::::kill(); + WhitelistedValidators::::kill(); let origin = T::UpdateOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; frame_system::Pallet::::set_block_number(0u32.into()); // now we need to fill up invulnerables - let mut invulnerables = invulnerables::(r); - invulnerables.sort(); + let invulnerables = invulnerables::(r); - let (account_ids, _collator_ids): (Vec, Vec) = + let (account_ids, _collator_ids): (Vec, Vec<::ValidatorId>) = invulnerables.into_iter().unzip(); for account in account_ids { @@ -214,18 +228,17 @@ mod benchmarks { } #[benchmark] - fn reward_invulnerable( - b: Linear<{ 1 }, { T::MaxInvulnerables::get() }>, + fn reward_validator( + b: Linear<{ 1 }, { T::MaxWhitelistedValidators::get() }>, ) -> Result<(), BenchmarkError> where { - let mut invulnerables = invulnerables::(b); - invulnerables.sort(); + let invulnerables = invulnerables::(b); - let (account_ids, collator_ids): (Vec, Vec) = + let (account_ids, collator_ids): (Vec, Vec<::ValidatorId>) = invulnerables.into_iter().unzip(); - let invulnerables: frame_support::BoundedVec<_, T::MaxInvulnerables> = + let invulnerables: frame_support::BoundedVec<_, T::MaxWhitelistedValidators> = frame_support::BoundedVec::try_from(collator_ids).unwrap(); - >::put(invulnerables); + >::put(invulnerables); let to_reward = account_ids.first().unwrap().clone(); // Create new supply for rewards let new_supply = currency_issue::(1000u32.into()); diff --git a/pallets/external-validators/src/weights.rs b/pallets/external-validators/src/weights.rs index 3543f42d4..2884deb2e 100644 --- a/pallets/external-validators/src/weights.rs +++ b/pallets/external-validators/src/weights.rs @@ -15,34 +15,34 @@ // along with Tanssi. If not, see -//! Autogenerated weights for pallet_invulnerables +//! Autogenerated weights for pallet_external_validators //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-04-09, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-10-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `girazoki-XPS-15-9530`, CPU: `13th Gen Intel(R) Core(TM) i9-13900H` -//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 +//! HOSTNAME: `tomasz-XPS-15-9520`, CPU: `12th Gen Intel(R) Core(TM) i7-12700H` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dancelight-dev"), DB CACHE: 1024 // Executed Command: -// ./target/release/tanssi-node +// target/release/tanssi-relay // benchmark // pallet // --execution=wasm // --wasm-execution=compiled // --pallet -// pallet_invulnerables +// pallet_external_validators // --extrinsic // * -// --chain=dev +// --chain=dancelight-dev // --steps // 50 // --repeat // 20 -// --template=./benchmarking/frame-weight-template.hbs +// --template=benchmarking/frame-weight-pallet-template.hbs // --json-file // raw.json // --output -// tmp/pallet_invulnerables.rs +// tmp/dancelight_weights/pallet_external_validators.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -51,93 +51,82 @@ use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use sp_std::marker::PhantomData; -/// Weight functions needed for pallet_invulnerables. +/// Weight functions needed for pallet_external_validators. pub trait WeightInfo { fn skip_external_validators() -> Weight; - fn add_whitelisted(_b: u32) -> Weight; - fn remove_whitelisted(_b: u32) -> Weight; - fn new_session(_b: u32) -> Weight; - fn reward_validator(_b: u32) -> Weight; + fn add_whitelisted(b: u32, ) -> Weight; + fn remove_whitelisted(b: u32, ) -> Weight; + fn new_session(r: u32, ) -> Weight; + fn reward_validator(b: u32, ) -> Weight; } -/// Weights for pallet_invulnerables using the Substrate node and recommended hardware. +/// Weights for pallet_external_validators using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: `Session::NextKeys` (r:1 w:0) - /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) - /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) - /// The range of component `b` is `[1, 99]`. + /// Storage: `ExternalValidators::SkipExternalValidators` (r:0 w:1) + /// Proof: `ExternalValidators::SkipExternalValidators` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn skip_external_validators() -> Weight { // Proof Size summary in bytes: - // Measured: `549 + b * (36 ±0)` - // Estimated: `4687 + b * (37 ±0)` - // Minimum execution time: 14_073_000 picoseconds. - Weight::from_parts(17_124_910, 4687) - // Standard Error: 1_519 - .saturating_add(T::DbWeight::get().reads(2_u64)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_335_000 picoseconds. + Weight::from_parts(1_397_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `Session::NextKeys` (r:1 w:0) /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) - /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::WhitelistedValidators` (r:1 w:1) + /// Proof: `ExternalValidators::WhitelistedValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 99]`. fn add_whitelisted(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `549 + b * (36 ±0)` + // Measured: `845 + b * (36 ±0)` // Estimated: `4687 + b * (37 ±0)` - // Minimum execution time: 14_073_000 picoseconds. - Weight::from_parts(17_124_910, 4687) - // Standard Error: 1_519 - .saturating_add(Weight::from_parts(76_594, 0).saturating_mul(b.into())) + // Minimum execution time: 12_884_000 picoseconds. + Weight::from_parts(17_232_514, 4687) + // Standard Error: 1_384 + .saturating_add(Weight::from_parts(59_789, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) } - /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) - /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::WhitelistedValidators` (r:1 w:1) + /// Proof: `ExternalValidators::WhitelistedValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 100]`. fn remove_whitelisted(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `70 + b * (32 ±0)` + // Measured: `137 + b * (32 ±0)` // Estimated: `4687` - // Minimum execution time: 8_623_000 picoseconds. - Weight::from_parts(10_574_224, 4687) - // Standard Error: 992 - .saturating_add(Weight::from_parts(52_490, 0).saturating_mul(b.into())) + // Minimum execution time: 7_033_000 picoseconds. + Weight::from_parts(8_548_429, 4687) + // Standard Error: 2_738 + .saturating_add(Weight::from_parts(55_083, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: `Invulnerables::Invulnerables` (r:1 w:0) - /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) - /// Storage: `System::BlockWeight` (r:1 w:1) - /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 100]`. fn new_session(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `70 + r * (32 ±0)` - // Estimated: `4687` - // Minimum execution time: 7_295_000 picoseconds. - Weight::from_parts(7_742_784, 4687) - // Standard Error: 4_715 - .saturating_add(Weight::from_parts(105_985, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 135_000 picoseconds. + Weight::from_parts(205_521, 0) + // Standard Error: 28 + .saturating_add(Weight::from_parts(643, 0).saturating_mul(r.into())) } - /// Storage: `Invulnerables::Invulnerables` (r:1 w:0) - /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::WhitelistedValidators` (r:1 w:0) + /// Proof: `ExternalValidators::WhitelistedValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 100]`. fn reward_validator(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `218 + b * (33 ±0)` + // Measured: `241 + b * (32 ±0)` // Estimated: `4687` - // Minimum execution time: 17_514_000 picoseconds. - Weight::from_parts(19_797_082, 4687) - // Standard Error: 1_701 - .saturating_add(Weight::from_parts(69_693, 0).saturating_mul(b.into())) + // Minimum execution time: 14_660_000 picoseconds. + Weight::from_parts(15_549_221, 4687) + // Standard Error: 1_994 + .saturating_add(Weight::from_parts(98_363, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } @@ -145,79 +134,70 @@ impl WeightInfo for SubstrateWeight { // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: `Session::NextKeys` (r:1 w:0) - /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) - /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) - /// The range of component `b` is `[1, 99]`. + /// Storage: `ExternalValidators::SkipExternalValidators` (r:0 w:1) + /// Proof: `ExternalValidators::SkipExternalValidators` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) fn skip_external_validators() -> Weight { // Proof Size summary in bytes: - // Measured: `549 + b * (36 ±0)` - // Estimated: `4687 + b * (37 ±0)` - // Minimum execution time: 14_073_000 picoseconds. - Weight::from_parts(17_124_910, 4687) - // Standard Error: 1_519 + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_335_000 picoseconds. + Weight::from_parts(1_397_000, 0) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `Session::NextKeys` (r:1 w:0) /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) - /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::WhitelistedValidators` (r:1 w:1) + /// Proof: `ExternalValidators::WhitelistedValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 99]`. fn add_whitelisted(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `549 + b * (36 ±0)` + // Measured: `845 + b * (36 ±0)` // Estimated: `4687 + b * (37 ±0)` - // Minimum execution time: 14_073_000 picoseconds. - Weight::from_parts(17_124_910, 4687) - // Standard Error: 1_519 - .saturating_add(Weight::from_parts(76_594, 0).saturating_mul(b.into())) + // Minimum execution time: 12_884_000 picoseconds. + Weight::from_parts(17_232_514, 4687) + // Standard Error: 1_384 + .saturating_add(Weight::from_parts(59_789, 0).saturating_mul(b.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) } - /// Storage: `Invulnerables::Invulnerables` (r:1 w:1) - /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::WhitelistedValidators` (r:1 w:1) + /// Proof: `ExternalValidators::WhitelistedValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 100]`. fn remove_whitelisted(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `70 + b * (32 ±0)` + // Measured: `137 + b * (32 ±0)` // Estimated: `4687` - // Minimum execution time: 8_623_000 picoseconds. - Weight::from_parts(10_574_224, 4687) - // Standard Error: 992 - .saturating_add(Weight::from_parts(52_490, 0).saturating_mul(b.into())) + // Minimum execution time: 7_033_000 picoseconds. + Weight::from_parts(8_548_429, 4687) + // Standard Error: 2_738 + .saturating_add(Weight::from_parts(55_083, 0).saturating_mul(b.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: `Invulnerables::Invulnerables` (r:1 w:0) - /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) - /// Storage: `System::BlockWeight` (r:1 w:1) - /// Proof: `System::BlockWeight` (`max_values`: Some(1), `max_size`: Some(48), added: 543, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 100]`. fn new_session(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `70 + r * (32 ±0)` - // Estimated: `4687` - // Minimum execution time: 7_295_000 picoseconds. - Weight::from_parts(7_742_784, 4687) - // Standard Error: 4_715 - .saturating_add(Weight::from_parts(105_985, 0).saturating_mul(r.into())) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 135_000 picoseconds. + Weight::from_parts(205_521, 0) + // Standard Error: 28 + .saturating_add(Weight::from_parts(643, 0).saturating_mul(r.into())) } - /// Storage: `Invulnerables::Invulnerables` (r:1 w:0) - /// Proof: `Invulnerables::Invulnerables` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::WhitelistedValidators` (r:1 w:0) + /// Proof: `ExternalValidators::WhitelistedValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `b` is `[1, 100]`. fn reward_validator(b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `218 + b * (33 ±0)` + // Measured: `241 + b * (32 ±0)` // Estimated: `4687` - // Minimum execution time: 17_514_000 picoseconds. - Weight::from_parts(19_797_082, 4687) - // Standard Error: 1_701 - .saturating_add(Weight::from_parts(69_693, 0).saturating_mul(b.into())) + // Minimum execution time: 14_660_000 picoseconds. + Weight::from_parts(15_549_221, 4687) + // Standard Error: 1_994 + .saturating_add(Weight::from_parts(98_363, 0).saturating_mul(b.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index ab14415b9..f9167ab38 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -68,12 +68,14 @@ std = [ "pallet-balances/std", "pallet-configuration/std", "pallet-data-preservers/std", + "pallet-external-validators/std", "pallet-foreign-asset-creator/std", "pallet-invulnerables/std", "pallet-migrations/std", "pallet-pooled-staking/std", "pallet-registrar/std", "pallet-services-payment/std", + "pallet-session/std", "pallet-treasury/std", "pallet-xcm/std", "parity-scale-codec/std", @@ -92,6 +94,7 @@ runtime-benchmarks = [ "pallet-balances/runtime-benchmarks", "pallet-configuration/runtime-benchmarks", "pallet-data-preservers/runtime-benchmarks", + "pallet-external-validators/runtime-benchmarks", "pallet-foreign-asset-creator/runtime-benchmarks", "pallet-invulnerables/runtime-benchmarks", "pallet-migrations/runtime-benchmarks", @@ -111,12 +114,14 @@ try-runtime = [ "pallet-balances/try-runtime", "pallet-configuration/try-runtime", "pallet-data-preservers/try-runtime", + "pallet-external-validators/try-runtime", "pallet-foreign-asset-creator/try-runtime", "pallet-invulnerables/try-runtime", "pallet-migrations/try-runtime", "pallet-pooled-staking/try-runtime", "pallet-registrar/try-runtime", "pallet-services-payment/try-runtime", + "pallet-session/try-runtime", "pallet-treasury/try-runtime", "pallet-xcm/try-runtime", "sp-runtime/try-runtime", diff --git a/solo-chains/runtime/dancelight/Cargo.toml b/solo-chains/runtime/dancelight/Cargo.toml index b29e92e17..208422748 100644 --- a/solo-chains/runtime/dancelight/Cargo.toml +++ b/solo-chains/runtime/dancelight/Cargo.toml @@ -198,6 +198,7 @@ std = [ "pallet-data-preservers/std", "pallet-democracy/std", "pallet-elections-phragmen/std", + "pallet-external-validators/std", "pallet-grandpa/std", "pallet-identity/std", "pallet-inflation-rewards/std", @@ -269,7 +270,6 @@ std = [ "xcm-executor/std", "xcm-runtime-apis/std", "xcm/std", - "pallet-external-validators/std" ] no_std = [] runtime-benchmarks = [ @@ -293,6 +293,7 @@ runtime-benchmarks = [ "pallet-data-preservers/runtime-benchmarks", "pallet-democracy/runtime-benchmarks", "pallet-elections-phragmen/runtime-benchmarks", + "pallet-external-validators/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", "pallet-identity/runtime-benchmarks", "pallet-inflation-rewards/runtime-benchmarks", @@ -332,7 +333,6 @@ runtime-benchmarks = [ "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", "xcm-runtime-apis/runtime-benchmarks", - "pallet-external-validators/runtime-benchmarks" ] try-runtime = [ "cumulus-pallet-parachain-system/try-runtime", @@ -359,6 +359,7 @@ try-runtime = [ "pallet-data-preservers/try-runtime", "pallet-democracy/try-runtime", "pallet-elections-phragmen/try-runtime", + "pallet-external-validators/try-runtime", "pallet-grandpa/try-runtime", "pallet-identity/try-runtime", "pallet-inflation-rewards/try-runtime", @@ -394,7 +395,6 @@ try-runtime = [ "runtime-parachains/try-runtime", "sp-runtime/try-runtime", "tanssi-runtime-common/try-runtime", - "pallet-external-validators/try-runtime" ] # Set timing constants (e.g. session period) to faster versions to speed up testing. diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index bcfe2ed47..e6d45303b 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -1200,7 +1200,7 @@ impl pallet_external_validators::Config for Runtime { type ValidatorIdOf = ValidatorIdOf; type ValidatorRegistration = Session; type UnixTime = Timestamp; - type WeightInfo = (); + type WeightInfo = weights::pallet_external_validators::SubstrateWeight; #[cfg(feature = "runtime-benchmarks")] type Currency = Balances; } @@ -1906,6 +1906,7 @@ mod benches { // Tanssi [pallet_author_noting, AuthorNoting] [pallet_registrar, ContainerRegistrar] + [pallet_external_validators, ExternalValidators] // XCM [pallet_xcm, PalletXcmExtrinsicsBenchmark::] [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] diff --git a/solo-chains/runtime/dancelight/src/weights/mod.rs b/solo-chains/runtime/dancelight/src/weights/mod.rs index 99e117472..88dea7fd5 100644 --- a/solo-chains/runtime/dancelight/src/weights/mod.rs +++ b/solo-chains/runtime/dancelight/src/weights/mod.rs @@ -19,6 +19,7 @@ pub mod pallet_asset_rate; pub mod pallet_author_noting; pub mod pallet_balances; pub mod pallet_conviction_voting; +pub mod pallet_external_validators; pub mod pallet_identity; pub mod pallet_message_queue; pub mod pallet_multisig; diff --git a/solo-chains/runtime/dancelight/src/weights/pallet_external_validators.rs b/solo-chains/runtime/dancelight/src/weights/pallet_external_validators.rs new file mode 100644 index 000000000..970d70636 --- /dev/null +++ b/solo-chains/runtime/dancelight/src/weights/pallet_external_validators.rs @@ -0,0 +1,124 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + + +//! Autogenerated weights for pallet_external_validators +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-10-17, STEPS: `50`, REPEAT: `20`, 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: Some("dancelight-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/tanssi-relay +// benchmark +// pallet +// --execution=wasm +// --wasm-execution=compiled +// --pallet +// pallet_external_validators +// --extrinsic +// * +// --chain=dancelight-dev +// --steps +// 50 +// --repeat +// 20 +// --template=benchmarking/frame-weight-runtime-template.hbs +// --json-file +// raw.json +// --output +// tmp/dancelight_weights/pallet_external_validators.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +/// Weights for pallet_external_validators using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl pallet_external_validators::WeightInfo for SubstrateWeight { + /// Storage: `ExternalValidators::SkipExternalValidators` (r:0 w:1) + /// Proof: `ExternalValidators::SkipExternalValidators` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + fn skip_external_validators() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_246_000 picoseconds. + Weight::from_parts(1_300_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `Session::NextKeys` (r:1 w:0) + /// Proof: `Session::NextKeys` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `ExternalValidators::WhitelistedValidators` (r:1 w:1) + /// Proof: `ExternalValidators::WhitelistedValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 99]`. + fn add_whitelisted(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `845 + b * (36 ±0)` + // Estimated: `4687 + b * (37 ±0)` + // Minimum execution time: 10_930_000 picoseconds. + Weight::from_parts(15_514_156, 4687) + // Standard Error: 1_382 + .saturating_add(Weight::from_parts(77_251, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) + } + /// Storage: `ExternalValidators::WhitelistedValidators` (r:1 w:1) + /// Proof: `ExternalValidators::WhitelistedValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 100]`. + fn remove_whitelisted(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `137 + b * (32 ±0)` + // Estimated: `4687` + // Minimum execution time: 7_019_000 picoseconds. + Weight::from_parts(8_537_725, 4687) + // Standard Error: 632 + .saturating_add(Weight::from_parts(37_499, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// The range of component `r` is `[1, 100]`. + fn new_session(r: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 146_000 picoseconds. + Weight::from_parts(211_572, 0) + // Standard Error: 24 + .saturating_add(Weight::from_parts(471, 0).saturating_mul(r.into())) + } + /// Storage: `ExternalValidators::WhitelistedValidators` (r:1 w:0) + /// Proof: `ExternalValidators::WhitelistedValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// Storage: `System::Account` (r:1 w:1) + /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) + /// The range of component `b` is `[1, 100]`. + fn reward_validator(b: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `241 + b * (32 ±0)` + // Estimated: `4687` + // Minimum execution time: 14_652_000 picoseconds. + Weight::from_parts(16_718_544, 4687) + // Standard Error: 1_682 + .saturating_add(Weight::from_parts(57_033, 0).saturating_mul(b.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } +} \ No newline at end of file From 81381cd4cbb2ca27c00c0d2e7d9bf4de1fb6ce16 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 17 Oct 2024 13:13:29 +0200 Subject: [PATCH 05/82] typescript-api --- .../dancebox/interfaces/augment-api-events.ts | 11 - .../dancebox/interfaces/augment-api-query.ts | 2 +- .../src/dancebox/interfaces/augment-api-tx.ts | 2 +- .../src/dancebox/interfaces/lookup.ts | 236 +++++++++--------- .../src/dancebox/interfaces/types-lookup.ts | 224 ++++++++--------- .../interfaces/augment-api-consts.ts | 8 + .../interfaces/augment-api-errors.ts | 14 ++ .../interfaces/augment-api-events.ts | 27 +- .../interfaces/augment-api-query.ts | 29 ++- .../dancelight/interfaces/augment-api-tx.ts | 55 ++-- .../src/dancelight/interfaces/lookup.ts | 110 ++++---- .../src/dancelight/interfaces/registry.ts | 12 +- .../src/dancelight/interfaces/types-lookup.ts | 133 +++++----- .../flashbox/interfaces/augment-api-events.ts | 13 +- .../flashbox/interfaces/augment-api-query.ts | 2 +- .../src/flashbox/interfaces/augment-api-tx.ts | 2 +- .../src/flashbox/interfaces/lookup.ts | 98 ++++---- .../src/flashbox/interfaces/types-lookup.ts | 102 ++++---- 18 files changed, 549 insertions(+), 531 deletions(-) diff --git a/typescript-api/src/dancebox/interfaces/augment-api-events.ts b/typescript-api/src/dancebox/interfaces/augment-api-events.ts index d46a5c2cb..ccdfeb8d4 100644 --- a/typescript-api/src/dancebox/interfaces/augment-api-events.ts +++ b/typescript-api/src/dancebox/interfaces/augment-api-events.ts @@ -439,21 +439,10 @@ declare module "@polkadot/api-base/types/events" { [key: string]: AugmentedEvent; }; invulnerables: { - /** - * An account was unable to be added to the Invulnerables because they did not have keys registered. Other - * Invulnerables may have been set. - */ - InvalidInvulnerableSkipped: AugmentedEvent; /** A new Invulnerable was added. */ InvulnerableAdded: AugmentedEvent; /** An Invulnerable was removed. */ InvulnerableRemoved: AugmentedEvent; - /** New Invulnerables were set. */ - NewInvulnerables: AugmentedEvent< - ApiType, - [invulnerables: Vec], - { invulnerables: Vec } - >; /** 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 0e0514b72..be35c4363 100644 --- a/typescript-api/src/dancebox/interfaces/augment-api-query.ts +++ b/typescript-api/src/dancebox/interfaces/augment-api-query.ts @@ -501,7 +501,7 @@ declare module "@polkadot/api-base/types/storage" { [key: string]: QueryableStorageEntry; }; invulnerables: { - /** The invulnerable, permissioned collators. This list must be sorted. */ + /** The invulnerable, permissioned collators. */ invulnerables: AugmentedQuery Observable>, []> & QueryableStorageEntry; /** Generic query */ diff --git a/typescript-api/src/dancebox/interfaces/augment-api-tx.ts b/typescript-api/src/dancebox/interfaces/augment-api-tx.ts index a6e3baa9b..e9656ee16 100644 --- a/typescript-api/src/dancebox/interfaces/augment-api-tx.ts +++ b/typescript-api/src/dancebox/interfaces/augment-api-tx.ts @@ -1858,7 +1858,7 @@ declare module "@polkadot/api-base/types/submittable" { [AccountId32] >; /** - * Remove an account `who` from the list of `Invulnerables` collators. `Invulnerables` must be sorted. + * Remove an account `who` from the list of `Invulnerables` collators. * * The origin for this call must be the `UpdateOrigin`. */ diff --git a/typescript-api/src/dancebox/interfaces/lookup.ts b/typescript-api/src/dancebox/interfaces/lookup.ts index c2aa456a1..0ae784d75 100644 --- a/typescript-api/src/dancebox/interfaces/lookup.ts +++ b/typescript-api/src/dancebox/interfaces/lookup.ts @@ -693,21 +693,15 @@ export default { /** Lookup68: pallet_invulnerables::pallet::Event */ PalletInvulnerablesEvent: { _enum: { - NewInvulnerables: { - invulnerables: "Vec", - }, InvulnerableAdded: { accountId: "AccountId32", }, InvulnerableRemoved: { accountId: "AccountId32", }, - InvalidInvulnerableSkipped: { - accountId: "AccountId32", - }, }, }, - /** Lookup70: pallet_session::pallet::Event */ + /** Lookup69: pallet_session::pallet::Event */ PalletSessionEvent: { _enum: { NewSession: { @@ -715,7 +709,7 @@ export default { }, }, }, - /** Lookup71: pallet_pooled_staking::pallet::Event */ + /** Lookup70: pallet_pooled_staking::pallet::Event */ PalletPooledStakingEvent: { _enum: { UpdatedCandidatePosition: { @@ -810,11 +804,11 @@ export default { }, }, }, - /** Lookup73: pallet_pooled_staking::pallet::TargetPool */ + /** Lookup72: pallet_pooled_staking::pallet::TargetPool */ PalletPooledStakingTargetPool: { _enum: ["AutoCompounding", "ManualRewards"], }, - /** Lookup74: pallet_inflation_rewards::pallet::Event */ + /** Lookup73: pallet_inflation_rewards::pallet::Event */ PalletInflationRewardsEvent: { _enum: { RewardedOrchestrator: { @@ -828,7 +822,7 @@ export default { }, }, }, - /** Lookup75: pallet_treasury::pallet::Event */ + /** Lookup74: pallet_treasury::pallet::Event */ PalletTreasuryEvent: { _enum: { Spending: { @@ -881,7 +875,7 @@ export default { }, }, }, - /** Lookup76: cumulus_pallet_xcmp_queue::pallet::Event */ + /** Lookup75: cumulus_pallet_xcmp_queue::pallet::Event */ CumulusPalletXcmpQueueEvent: { _enum: { XcmpMessageSent: { @@ -889,7 +883,7 @@ export default { }, }, }, - /** Lookup77: cumulus_pallet_xcm::pallet::Event */ + /** Lookup76: cumulus_pallet_xcm::pallet::Event */ CumulusPalletXcmEvent: { _enum: { InvalidFormat: "[u8;32]", @@ -897,7 +891,7 @@ export default { ExecutedDownward: "([u8;32],StagingXcmV4TraitsOutcome)", }, }, - /** Lookup78: staging_xcm::v4::traits::Outcome */ + /** Lookup77: staging_xcm::v4::traits::Outcome */ StagingXcmV4TraitsOutcome: { _enum: { Complete: { @@ -912,7 +906,7 @@ export default { }, }, }, - /** Lookup79: xcm::v3::traits::Error */ + /** Lookup78: xcm::v3::traits::Error */ XcmV3TraitsError: { _enum: { Overflow: "Null", @@ -957,7 +951,7 @@ export default { ExceedsStackLimit: "Null", }, }, - /** Lookup80: pallet_xcm::pallet::Event */ + /** Lookup79: pallet_xcm::pallet::Event */ PalletXcmEvent: { _enum: { Attempted: { @@ -1080,26 +1074,26 @@ export default { }, }, }, - /** Lookup81: staging_xcm::v4::location::Location */ + /** Lookup80: staging_xcm::v4::location::Location */ StagingXcmV4Location: { parents: "u8", interior: "StagingXcmV4Junctions", }, - /** Lookup82: staging_xcm::v4::junctions::Junctions */ + /** Lookup81: staging_xcm::v4::junctions::Junctions */ StagingXcmV4Junctions: { _enum: { Here: "Null", - X1: "[Lookup84;1]", - X2: "[Lookup84;2]", - X3: "[Lookup84;3]", - X4: "[Lookup84;4]", - X5: "[Lookup84;5]", - X6: "[Lookup84;6]", - X7: "[Lookup84;7]", - X8: "[Lookup84;8]", + X1: "[Lookup83;1]", + X2: "[Lookup83;2]", + X3: "[Lookup83;3]", + X4: "[Lookup83;4]", + X5: "[Lookup83;5]", + X6: "[Lookup83;6]", + X7: "[Lookup83;7]", + X8: "[Lookup83;8]", }, }, - /** Lookup84: staging_xcm::v4::junction::Junction */ + /** Lookup83: staging_xcm::v4::junction::Junction */ StagingXcmV4Junction: { _enum: { Parachain: "Compact", @@ -1129,7 +1123,7 @@ export default { GlobalConsensus: "StagingXcmV4JunctionNetworkId", }, }, - /** Lookup87: staging_xcm::v4::junction::NetworkId */ + /** Lookup86: staging_xcm::v4::junction::NetworkId */ StagingXcmV4JunctionNetworkId: { _enum: { ByGenesis: "[u8;32]", @@ -1150,7 +1144,7 @@ export default { PolkadotBulletin: "Null", }, }, - /** Lookup90: xcm::v3::junction::BodyId */ + /** Lookup89: xcm::v3::junction::BodyId */ XcmV3JunctionBodyId: { _enum: { Unit: "Null", @@ -1165,7 +1159,7 @@ export default { Treasury: "Null", }, }, - /** Lookup91: xcm::v3::junction::BodyPart */ + /** Lookup90: xcm::v3::junction::BodyPart */ XcmV3JunctionBodyPart: { _enum: { Voice: "Null", @@ -1186,9 +1180,9 @@ export default { }, }, }, - /** Lookup99: staging_xcm::v4::Xcm */ + /** Lookup98: staging_xcm::v4::Xcm */ StagingXcmV4Xcm: "Vec", - /** Lookup101: staging_xcm::v4::Instruction */ + /** Lookup100: staging_xcm::v4::Instruction */ StagingXcmV4Instruction: { _enum: { WithdrawAsset: "StagingXcmV4AssetAssets", @@ -1328,23 +1322,23 @@ export default { }, }, }, - /** Lookup102: staging_xcm::v4::asset::Assets */ + /** Lookup101: staging_xcm::v4::asset::Assets */ StagingXcmV4AssetAssets: "Vec", - /** Lookup104: staging_xcm::v4::asset::Asset */ + /** Lookup103: staging_xcm::v4::asset::Asset */ StagingXcmV4Asset: { id: "StagingXcmV4AssetAssetId", fun: "StagingXcmV4AssetFungibility", }, - /** Lookup105: staging_xcm::v4::asset::AssetId */ + /** Lookup104: staging_xcm::v4::asset::AssetId */ StagingXcmV4AssetAssetId: "StagingXcmV4Location", - /** Lookup106: staging_xcm::v4::asset::Fungibility */ + /** Lookup105: staging_xcm::v4::asset::Fungibility */ StagingXcmV4AssetFungibility: { _enum: { Fungible: "Compact", NonFungible: "StagingXcmV4AssetAssetInstance", }, }, - /** Lookup107: staging_xcm::v4::asset::AssetInstance */ + /** Lookup106: staging_xcm::v4::asset::AssetInstance */ StagingXcmV4AssetAssetInstance: { _enum: { Undefined: "Null", @@ -1355,7 +1349,7 @@ export default { Array32: "[u8;32]", }, }, - /** Lookup110: staging_xcm::v4::Response */ + /** Lookup109: staging_xcm::v4::Response */ StagingXcmV4Response: { _enum: { Null: "Null", @@ -1366,7 +1360,7 @@ export default { DispatchResult: "XcmV3MaybeErrorCode", }, }, - /** Lookup114: staging_xcm::v4::PalletInfo */ + /** Lookup113: staging_xcm::v4::PalletInfo */ StagingXcmV4PalletInfo: { index: "Compact", name: "Bytes", @@ -1375,7 +1369,7 @@ export default { minor: "Compact", patch: "Compact", }, - /** Lookup117: xcm::v3::MaybeErrorCode */ + /** Lookup116: xcm::v3::MaybeErrorCode */ XcmV3MaybeErrorCode: { _enum: { Success: "Null", @@ -1383,28 +1377,28 @@ export default { TruncatedError: "Bytes", }, }, - /** Lookup120: xcm::v3::OriginKind */ + /** Lookup119: xcm::v3::OriginKind */ XcmV3OriginKind: { _enum: ["Native", "SovereignAccount", "Superuser", "Xcm"], }, - /** Lookup121: xcm::double_encoded::DoubleEncoded */ + /** Lookup120: xcm::double_encoded::DoubleEncoded */ XcmDoubleEncoded: { encoded: "Bytes", }, - /** Lookup122: staging_xcm::v4::QueryResponseInfo */ + /** Lookup121: staging_xcm::v4::QueryResponseInfo */ StagingXcmV4QueryResponseInfo: { destination: "StagingXcmV4Location", queryId: "Compact", maxWeight: "SpWeightsWeightV2Weight", }, - /** Lookup123: staging_xcm::v4::asset::AssetFilter */ + /** Lookup122: staging_xcm::v4::asset::AssetFilter */ StagingXcmV4AssetAssetFilter: { _enum: { Definite: "StagingXcmV4AssetAssets", Wild: "StagingXcmV4AssetWildAsset", }, }, - /** Lookup124: staging_xcm::v4::asset::WildAsset */ + /** Lookup123: staging_xcm::v4::asset::WildAsset */ StagingXcmV4AssetWildAsset: { _enum: { All: "Null", @@ -1420,18 +1414,18 @@ export default { }, }, }, - /** Lookup125: staging_xcm::v4::asset::WildFungibility */ + /** Lookup124: staging_xcm::v4::asset::WildFungibility */ StagingXcmV4AssetWildFungibility: { _enum: ["Fungible", "NonFungible"], }, - /** Lookup126: xcm::v3::WeightLimit */ + /** Lookup125: xcm::v3::WeightLimit */ XcmV3WeightLimit: { _enum: { Unlimited: "Null", Limited: "SpWeightsWeightV2Weight", }, }, - /** Lookup127: xcm::VersionedAssets */ + /** Lookup126: xcm::VersionedAssets */ XcmVersionedAssets: { _enum: { __Unused0: "Null", @@ -1441,26 +1435,26 @@ export default { V4: "StagingXcmV4AssetAssets", }, }, - /** Lookup128: xcm::v2::multiasset::MultiAssets */ + /** Lookup127: xcm::v2::multiasset::MultiAssets */ XcmV2MultiassetMultiAssets: "Vec", - /** Lookup130: xcm::v2::multiasset::MultiAsset */ + /** Lookup129: xcm::v2::multiasset::MultiAsset */ XcmV2MultiAsset: { id: "XcmV2MultiassetAssetId", fun: "XcmV2MultiassetFungibility", }, - /** Lookup131: xcm::v2::multiasset::AssetId */ + /** Lookup130: xcm::v2::multiasset::AssetId */ XcmV2MultiassetAssetId: { _enum: { Concrete: "XcmV2MultiLocation", Abstract: "Bytes", }, }, - /** Lookup132: xcm::v2::multilocation::MultiLocation */ + /** Lookup131: xcm::v2::multilocation::MultiLocation */ XcmV2MultiLocation: { parents: "u8", interior: "XcmV2MultilocationJunctions", }, - /** Lookup133: xcm::v2::multilocation::Junctions */ + /** Lookup132: xcm::v2::multilocation::Junctions */ XcmV2MultilocationJunctions: { _enum: { Here: "Null", @@ -1474,7 +1468,7 @@ export default { X8: "(XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction)", }, }, - /** Lookup134: xcm::v2::junction::Junction */ + /** Lookup133: xcm::v2::junction::Junction */ XcmV2Junction: { _enum: { Parachain: "Compact", @@ -1500,7 +1494,7 @@ export default { }, }, }, - /** Lookup135: xcm::v2::NetworkId */ + /** Lookup134: xcm::v2::NetworkId */ XcmV2NetworkId: { _enum: { Any: "Null", @@ -1509,7 +1503,7 @@ export default { Kusama: "Null", }, }, - /** Lookup137: xcm::v2::BodyId */ + /** Lookup136: xcm::v2::BodyId */ XcmV2BodyId: { _enum: { Unit: "Null", @@ -1524,7 +1518,7 @@ export default { Treasury: "Null", }, }, - /** Lookup138: xcm::v2::BodyPart */ + /** Lookup137: xcm::v2::BodyPart */ XcmV2BodyPart: { _enum: { Voice: "Null", @@ -1545,14 +1539,14 @@ export default { }, }, }, - /** Lookup139: xcm::v2::multiasset::Fungibility */ + /** Lookup138: xcm::v2::multiasset::Fungibility */ XcmV2MultiassetFungibility: { _enum: { Fungible: "Compact", NonFungible: "XcmV2MultiassetAssetInstance", }, }, - /** Lookup140: xcm::v2::multiasset::AssetInstance */ + /** Lookup139: xcm::v2::multiasset::AssetInstance */ XcmV2MultiassetAssetInstance: { _enum: { Undefined: "Null", @@ -1564,26 +1558,26 @@ export default { Blob: "Bytes", }, }, - /** Lookup141: xcm::v3::multiasset::MultiAssets */ + /** Lookup140: xcm::v3::multiasset::MultiAssets */ XcmV3MultiassetMultiAssets: "Vec", - /** Lookup143: xcm::v3::multiasset::MultiAsset */ + /** Lookup142: xcm::v3::multiasset::MultiAsset */ XcmV3MultiAsset: { id: "XcmV3MultiassetAssetId", fun: "XcmV3MultiassetFungibility", }, - /** Lookup144: xcm::v3::multiasset::AssetId */ + /** Lookup143: xcm::v3::multiasset::AssetId */ XcmV3MultiassetAssetId: { _enum: { Concrete: "StagingXcmV3MultiLocation", Abstract: "[u8;32]", }, }, - /** Lookup145: staging_xcm::v3::multilocation::MultiLocation */ + /** Lookup144: staging_xcm::v3::multilocation::MultiLocation */ StagingXcmV3MultiLocation: { parents: "u8", interior: "XcmV3Junctions", }, - /** Lookup146: xcm::v3::junctions::Junctions */ + /** Lookup145: xcm::v3::junctions::Junctions */ XcmV3Junctions: { _enum: { Here: "Null", @@ -1597,7 +1591,7 @@ export default { X8: "(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)", }, }, - /** Lookup147: xcm::v3::junction::Junction */ + /** Lookup146: xcm::v3::junction::Junction */ XcmV3Junction: { _enum: { Parachain: "Compact", @@ -1627,7 +1621,7 @@ export default { GlobalConsensus: "XcmV3JunctionNetworkId", }, }, - /** Lookup149: xcm::v3::junction::NetworkId */ + /** Lookup148: xcm::v3::junction::NetworkId */ XcmV3JunctionNetworkId: { _enum: { ByGenesis: "[u8;32]", @@ -1648,14 +1642,14 @@ export default { PolkadotBulletin: "Null", }, }, - /** Lookup150: xcm::v3::multiasset::Fungibility */ + /** Lookup149: xcm::v3::multiasset::Fungibility */ XcmV3MultiassetFungibility: { _enum: { Fungible: "Compact", NonFungible: "XcmV3MultiassetAssetInstance", }, }, - /** Lookup151: xcm::v3::multiasset::AssetInstance */ + /** Lookup150: xcm::v3::multiasset::AssetInstance */ XcmV3MultiassetAssetInstance: { _enum: { Undefined: "Null", @@ -1666,7 +1660,7 @@ export default { Array32: "[u8;32]", }, }, - /** Lookup152: xcm::VersionedLocation */ + /** Lookup151: xcm::VersionedLocation */ XcmVersionedLocation: { _enum: { __Unused0: "Null", @@ -1676,7 +1670,7 @@ export default { V4: "StagingXcmV4Location", }, }, - /** Lookup153: pallet_assets::pallet::Event */ + /** Lookup152: pallet_assets::pallet::Event */ PalletAssetsEvent: { _enum: { Created: { @@ -1800,7 +1794,7 @@ export default { }, }, }, - /** Lookup154: pallet_foreign_asset_creator::pallet::Event */ + /** Lookup153: pallet_foreign_asset_creator::pallet::Event */ PalletForeignAssetCreatorEvent: { _enum: { ForeignAssetCreated: { @@ -1821,7 +1815,7 @@ export default { }, }, }, - /** Lookup155: pallet_asset_rate::pallet::Event */ + /** Lookup154: pallet_asset_rate::pallet::Event */ PalletAssetRateEvent: { _enum: { AssetRateCreated: { @@ -1841,7 +1835,7 @@ export default { }, }, }, - /** Lookup157: pallet_message_queue::pallet::Event */ + /** Lookup156: pallet_message_queue::pallet::Event */ PalletMessageQueueEvent: { _enum: { ProcessingFailed: { @@ -1867,7 +1861,7 @@ export default { }, }, }, - /** Lookup158: cumulus_primitives_core::AggregateMessageOrigin */ + /** Lookup157: cumulus_primitives_core::AggregateMessageOrigin */ CumulusPrimitivesCoreAggregateMessageOrigin: { _enum: { Here: "Null", @@ -1875,7 +1869,7 @@ export default { Sibling: "u32", }, }, - /** Lookup159: frame_support::traits::messages::ProcessMessageError */ + /** Lookup158: frame_support::traits::messages::ProcessMessageError */ FrameSupportMessagesProcessMessageError: { _enum: { BadFormat: "Null", @@ -1886,7 +1880,7 @@ export default { StackLimitReached: "Null", }, }, - /** Lookup160: pallet_xcm_core_buyer::pallet::Event */ + /** Lookup159: pallet_xcm_core_buyer::pallet::Event */ PalletXcmCoreBuyerEvent: { _enum: { BuyCoreXcmSent: { @@ -1905,11 +1899,11 @@ export default { }, }, }, - /** Lookup162: pallet_root_testing::pallet::Event */ + /** Lookup161: pallet_root_testing::pallet::Event */ PalletRootTestingEvent: { _enum: ["DefensiveTestCall"], }, - /** Lookup163: frame_system::Phase */ + /** Lookup162: frame_system::Phase */ FrameSystemPhase: { _enum: { ApplyExtrinsic: "u32", @@ -1917,17 +1911,17 @@ export default { Initialization: "Null", }, }, - /** Lookup167: frame_system::LastRuntimeUpgradeInfo */ + /** Lookup166: frame_system::LastRuntimeUpgradeInfo */ FrameSystemLastRuntimeUpgradeInfo: { specVersion: "Compact", specName: "Text", }, - /** Lookup169: frame_system::CodeUpgradeAuthorization */ + /** Lookup168: frame_system::CodeUpgradeAuthorization */ FrameSystemCodeUpgradeAuthorization: { codeHash: "H256", checkVersion: "bool", }, - /** Lookup170: frame_system::pallet::Call */ + /** Lookup169: frame_system::pallet::Call */ FrameSystemCall: { _enum: { remark: { @@ -1970,41 +1964,41 @@ export default { }, }, }, - /** Lookup174: frame_system::limits::BlockWeights */ + /** Lookup173: frame_system::limits::BlockWeights */ FrameSystemLimitsBlockWeights: { baseBlock: "SpWeightsWeightV2Weight", maxBlock: "SpWeightsWeightV2Weight", perClass: "FrameSupportDispatchPerDispatchClassWeightsPerClass", }, - /** Lookup175: frame_support::dispatch::PerDispatchClass */ + /** Lookup174: frame_support::dispatch::PerDispatchClass */ FrameSupportDispatchPerDispatchClassWeightsPerClass: { normal: "FrameSystemLimitsWeightsPerClass", operational: "FrameSystemLimitsWeightsPerClass", mandatory: "FrameSystemLimitsWeightsPerClass", }, - /** Lookup176: frame_system::limits::WeightsPerClass */ + /** Lookup175: frame_system::limits::WeightsPerClass */ FrameSystemLimitsWeightsPerClass: { baseExtrinsic: "SpWeightsWeightV2Weight", maxExtrinsic: "Option", maxTotal: "Option", reserved: "Option", }, - /** Lookup178: frame_system::limits::BlockLength */ + /** Lookup177: frame_system::limits::BlockLength */ FrameSystemLimitsBlockLength: { max: "FrameSupportDispatchPerDispatchClassU32", }, - /** Lookup179: frame_support::dispatch::PerDispatchClass */ + /** Lookup178: frame_support::dispatch::PerDispatchClass */ FrameSupportDispatchPerDispatchClassU32: { normal: "u32", operational: "u32", mandatory: "u32", }, - /** Lookup180: sp_weights::RuntimeDbWeight */ + /** Lookup179: sp_weights::RuntimeDbWeight */ SpWeightsRuntimeDbWeight: { read: "u64", write: "u64", }, - /** Lookup181: sp_version::RuntimeVersion */ + /** Lookup180: sp_version::RuntimeVersion */ SpVersionRuntimeVersion: { specName: "Text", implName: "Text", @@ -2015,7 +2009,7 @@ export default { transactionVersion: "u32", stateVersion: "u8", }, - /** Lookup185: frame_system::pallet::Error */ + /** Lookup184: frame_system::pallet::Error */ FrameSystemError: { _enum: [ "InvalidSpecName", @@ -2029,49 +2023,49 @@ export default { "Unauthorized", ], }, - /** Lookup187: cumulus_pallet_parachain_system::unincluded_segment::Ancestor */ + /** Lookup186: cumulus_pallet_parachain_system::unincluded_segment::Ancestor */ CumulusPalletParachainSystemUnincludedSegmentAncestor: { usedBandwidth: "CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth", paraHeadHash: "Option", consumedGoAheadSignal: "Option", }, - /** Lookup188: cumulus_pallet_parachain_system::unincluded_segment::UsedBandwidth */ + /** Lookup187: cumulus_pallet_parachain_system::unincluded_segment::UsedBandwidth */ CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth: { umpMsgCount: "u32", umpTotalBytes: "u32", hrmpOutgoing: "BTreeMap", }, - /** Lookup190: cumulus_pallet_parachain_system::unincluded_segment::HrmpChannelUpdate */ + /** Lookup189: cumulus_pallet_parachain_system::unincluded_segment::HrmpChannelUpdate */ CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate: { msgCount: "u32", totalBytes: "u32", }, - /** Lookup195: polkadot_primitives::v7::UpgradeGoAhead */ + /** Lookup194: polkadot_primitives::v7::UpgradeGoAhead */ PolkadotPrimitivesV7UpgradeGoAhead: { _enum: ["Abort", "GoAhead"], }, - /** Lookup196: cumulus_pallet_parachain_system::unincluded_segment::SegmentTracker */ + /** Lookup195: cumulus_pallet_parachain_system::unincluded_segment::SegmentTracker */ CumulusPalletParachainSystemUnincludedSegmentSegmentTracker: { usedBandwidth: "CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth", hrmpWatermark: "Option", consumedGoAheadSignal: "Option", }, - /** Lookup197: polkadot_primitives::v7::PersistedValidationData */ + /** Lookup196: polkadot_primitives::v7::PersistedValidationData */ PolkadotPrimitivesV7PersistedValidationData: { parentHead: "Bytes", relayParentNumber: "u32", relayParentStorageRoot: "H256", maxPovSize: "u32", }, - /** Lookup200: polkadot_primitives::v7::UpgradeRestriction */ + /** Lookup199: polkadot_primitives::v7::UpgradeRestriction */ PolkadotPrimitivesV7UpgradeRestriction: { _enum: ["Present"], }, - /** Lookup201: sp_trie::storage_proof::StorageProof */ + /** Lookup200: sp_trie::storage_proof::StorageProof */ SpTrieStorageProof: { trieNodes: "BTreeSet", }, - /** Lookup203: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot */ + /** Lookup202: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot */ CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot: { dmqMqcHead: "H256", relayDispatchQueueRemainingCapacity: @@ -2079,12 +2073,12 @@ export default { ingressChannels: "Vec<(u32,PolkadotPrimitivesV7AbridgedHrmpChannel)>", egressChannels: "Vec<(u32,PolkadotPrimitivesV7AbridgedHrmpChannel)>", }, - /** Lookup204: cumulus_pallet_parachain_system::relay_state_snapshot::RelayDispatchQueueRemainingCapacity */ + /** Lookup203: cumulus_pallet_parachain_system::relay_state_snapshot::RelayDispatchQueueRemainingCapacity */ CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity: { remainingCount: "u32", remainingSize: "u32", }, - /** Lookup207: polkadot_primitives::v7::AbridgedHrmpChannel */ + /** Lookup206: polkadot_primitives::v7::AbridgedHrmpChannel */ PolkadotPrimitivesV7AbridgedHrmpChannel: { maxCapacity: "u32", maxTotalSize: "u32", @@ -2093,7 +2087,7 @@ export default { totalSize: "u32", mqcHead: "Option", }, - /** Lookup208: polkadot_primitives::v7::AbridgedHostConfiguration */ + /** Lookup207: polkadot_primitives::v7::AbridgedHostConfiguration */ PolkadotPrimitivesV7AbridgedHostConfiguration: { maxCodeSize: "u32", maxHeadDataSize: "u32", @@ -2106,17 +2100,17 @@ export default { validationUpgradeDelay: "u32", asyncBackingParams: "PolkadotPrimitivesV7AsyncBackingAsyncBackingParams", }, - /** Lookup209: polkadot_primitives::v7::async_backing::AsyncBackingParams */ + /** Lookup208: polkadot_primitives::v7::async_backing::AsyncBackingParams */ PolkadotPrimitivesV7AsyncBackingAsyncBackingParams: { maxCandidateDepth: "u32", allowedAncestryLen: "u32", }, - /** Lookup215: polkadot_core_primitives::OutboundHrmpMessage */ + /** Lookup214: polkadot_core_primitives::OutboundHrmpMessage */ PolkadotCorePrimitivesOutboundHrmpMessage: { recipient: "u32", data: "Bytes", }, - /** Lookup216: cumulus_pallet_parachain_system::pallet::Call */ + /** Lookup215: cumulus_pallet_parachain_system::pallet::Call */ CumulusPalletParachainSystemCall: { _enum: { set_validation_data: { @@ -2134,24 +2128,24 @@ export default { }, }, }, - /** Lookup217: cumulus_primitives_parachain_inherent::ParachainInherentData */ + /** Lookup216: cumulus_primitives_parachain_inherent::ParachainInherentData */ CumulusPrimitivesParachainInherentParachainInherentData: { validationData: "PolkadotPrimitivesV7PersistedValidationData", relayChainState: "SpTrieStorageProof", downwardMessages: "Vec", horizontalMessages: "BTreeMap>", }, - /** Lookup219: polkadot_core_primitives::InboundDownwardMessage */ + /** Lookup218: polkadot_core_primitives::InboundDownwardMessage */ PolkadotCorePrimitivesInboundDownwardMessage: { sentAt: "u32", msg: "Bytes", }, - /** Lookup222: polkadot_core_primitives::InboundHrmpMessage */ + /** Lookup221: polkadot_core_primitives::InboundHrmpMessage */ PolkadotCorePrimitivesInboundHrmpMessage: { sentAt: "u32", data: "Bytes", }, - /** Lookup225: cumulus_pallet_parachain_system::pallet::Error */ + /** Lookup224: cumulus_pallet_parachain_system::pallet::Error */ CumulusPalletParachainSystemError: { _enum: [ "OverlappingUpgrades", @@ -2164,7 +2158,7 @@ export default { "Unauthorized", ], }, - /** Lookup226: pallet_timestamp::pallet::Call */ + /** Lookup225: pallet_timestamp::pallet::Call */ PalletTimestampCall: { _enum: { set: { @@ -2172,9 +2166,9 @@ export default { }, }, }, - /** Lookup227: staging_parachain_info::pallet::Call */ + /** Lookup226: staging_parachain_info::pallet::Call */ StagingParachainInfoCall: "Null", - /** Lookup228: pallet_sudo::pallet::Call */ + /** Lookup227: pallet_sudo::pallet::Call */ PalletSudoCall: { _enum: { sudo: { @@ -2197,7 +2191,7 @@ export default { remove_key: "Null", }, }, - /** Lookup230: pallet_utility::pallet::Call */ + /** Lookup229: pallet_utility::pallet::Call */ PalletUtilityCall: { _enum: { batch: { @@ -2223,7 +2217,7 @@ export default { }, }, }, - /** Lookup232: dancebox_runtime::OriginCaller */ + /** Lookup231: dancebox_runtime::OriginCaller */ DanceboxRuntimeOriginCaller: { _enum: { system: "FrameSupportDispatchRawOrigin", @@ -2282,7 +2276,7 @@ export default { PolkadotXcm: "PalletXcmOrigin", }, }, - /** Lookup233: frame_support::dispatch::RawOrigin */ + /** Lookup232: frame_support::dispatch::RawOrigin */ FrameSupportDispatchRawOrigin: { _enum: { Root: "Null", @@ -2290,23 +2284,23 @@ export default { None: "Null", }, }, - /** Lookup234: cumulus_pallet_xcm::pallet::Origin */ + /** Lookup233: cumulus_pallet_xcm::pallet::Origin */ CumulusPalletXcmOrigin: { _enum: { Relay: "Null", SiblingParachain: "u32", }, }, - /** Lookup235: pallet_xcm::pallet::Origin */ + /** Lookup234: pallet_xcm::pallet::Origin */ PalletXcmOrigin: { _enum: { Xcm: "StagingXcmV4Location", Response: "StagingXcmV4Location", }, }, - /** Lookup236: sp_core::Void */ + /** Lookup235: sp_core::Void */ SpCoreVoid: "Null", - /** Lookup237: pallet_proxy::pallet::Call */ + /** Lookup236: pallet_proxy::pallet::Call */ PalletProxyCall: { _enum: { proxy: { @@ -2357,11 +2351,11 @@ export default { }, }, }, - /** Lookup241: pallet_maintenance_mode::pallet::Call */ + /** Lookup240: pallet_maintenance_mode::pallet::Call */ PalletMaintenanceModeCall: { _enum: ["enter_maintenance_mode", "resume_normal_operation"], }, - /** Lookup242: pallet_tx_pause::pallet::Call */ + /** Lookup241: pallet_tx_pause::pallet::Call */ PalletTxPauseCall: { _enum: { pause: { @@ -2372,7 +2366,7 @@ export default { }, }, }, - /** Lookup243: pallet_balances::pallet::Call */ + /** Lookup242: pallet_balances::pallet::Call */ PalletBalancesCall: { _enum: { transfer_allow_death: { diff --git a/typescript-api/src/dancebox/interfaces/types-lookup.ts b/typescript-api/src/dancebox/interfaces/types-lookup.ts index 182a457ec..f6fd9cd9d 100644 --- a/typescript-api/src/dancebox/interfaces/types-lookup.ts +++ b/typescript-api/src/dancebox/interfaces/types-lookup.ts @@ -979,10 +979,6 @@ declare module "@polkadot/types/lookup" { /** @name PalletInvulnerablesEvent (68) */ interface PalletInvulnerablesEvent extends Enum { - readonly isNewInvulnerables: boolean; - readonly asNewInvulnerables: { - readonly invulnerables: Vec; - } & Struct; readonly isInvulnerableAdded: boolean; readonly asInvulnerableAdded: { readonly accountId: AccountId32; @@ -991,14 +987,10 @@ declare module "@polkadot/types/lookup" { readonly asInvulnerableRemoved: { readonly accountId: AccountId32; } & Struct; - readonly isInvalidInvulnerableSkipped: boolean; - readonly asInvalidInvulnerableSkipped: { - readonly accountId: AccountId32; - } & Struct; - readonly type: "NewInvulnerables" | "InvulnerableAdded" | "InvulnerableRemoved" | "InvalidInvulnerableSkipped"; + readonly type: "InvulnerableAdded" | "InvulnerableRemoved"; } - /** @name PalletSessionEvent (70) */ + /** @name PalletSessionEvent (69) */ interface PalletSessionEvent extends Enum { readonly isNewSession: boolean; readonly asNewSession: { @@ -1007,7 +999,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NewSession"; } - /** @name PalletPooledStakingEvent (71) */ + /** @name PalletPooledStakingEvent (70) */ interface PalletPooledStakingEvent extends Enum { readonly isUpdatedCandidatePosition: boolean; readonly asUpdatedCandidatePosition: { @@ -1132,14 +1124,14 @@ declare module "@polkadot/types/lookup" { | "SwappedPool"; } - /** @name PalletPooledStakingTargetPool (73) */ + /** @name PalletPooledStakingTargetPool (72) */ interface PalletPooledStakingTargetPool extends Enum { readonly isAutoCompounding: boolean; readonly isManualRewards: boolean; readonly type: "AutoCompounding" | "ManualRewards"; } - /** @name PalletInflationRewardsEvent (74) */ + /** @name PalletInflationRewardsEvent (73) */ interface PalletInflationRewardsEvent extends Enum { readonly isRewardedOrchestrator: boolean; readonly asRewardedOrchestrator: { @@ -1155,7 +1147,7 @@ declare module "@polkadot/types/lookup" { readonly type: "RewardedOrchestrator" | "RewardedContainer"; } - /** @name PalletTreasuryEvent (75) */ + /** @name PalletTreasuryEvent (74) */ interface PalletTreasuryEvent extends Enum { readonly isSpending: boolean; readonly asSpending: { @@ -1232,7 +1224,7 @@ declare module "@polkadot/types/lookup" { | "SpendProcessed"; } - /** @name CumulusPalletXcmpQueueEvent (76) */ + /** @name CumulusPalletXcmpQueueEvent (75) */ interface CumulusPalletXcmpQueueEvent extends Enum { readonly isXcmpMessageSent: boolean; readonly asXcmpMessageSent: { @@ -1241,7 +1233,7 @@ declare module "@polkadot/types/lookup" { readonly type: "XcmpMessageSent"; } - /** @name CumulusPalletXcmEvent (77) */ + /** @name CumulusPalletXcmEvent (76) */ interface CumulusPalletXcmEvent extends Enum { readonly isInvalidFormat: boolean; readonly asInvalidFormat: U8aFixed; @@ -1252,7 +1244,7 @@ declare module "@polkadot/types/lookup" { readonly type: "InvalidFormat" | "UnsupportedVersion" | "ExecutedDownward"; } - /** @name StagingXcmV4TraitsOutcome (78) */ + /** @name StagingXcmV4TraitsOutcome (77) */ interface StagingXcmV4TraitsOutcome extends Enum { readonly isComplete: boolean; readonly asComplete: { @@ -1270,7 +1262,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Complete" | "Incomplete" | "Error"; } - /** @name XcmV3TraitsError (79) */ + /** @name XcmV3TraitsError (78) */ interface XcmV3TraitsError extends Enum { readonly isOverflow: boolean; readonly isUnimplemented: boolean; @@ -1357,7 +1349,7 @@ declare module "@polkadot/types/lookup" { | "ExceedsStackLimit"; } - /** @name PalletXcmEvent (80) */ + /** @name PalletXcmEvent (79) */ interface PalletXcmEvent extends Enum { readonly isAttempted: boolean; readonly asAttempted: { @@ -1522,13 +1514,13 @@ declare module "@polkadot/types/lookup" { | "VersionMigrationFinished"; } - /** @name StagingXcmV4Location (81) */ + /** @name StagingXcmV4Location (80) */ interface StagingXcmV4Location extends Struct { readonly parents: u8; readonly interior: StagingXcmV4Junctions; } - /** @name StagingXcmV4Junctions (82) */ + /** @name StagingXcmV4Junctions (81) */ interface StagingXcmV4Junctions extends Enum { readonly isHere: boolean; readonly isX1: boolean; @@ -1550,7 +1542,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "X1" | "X2" | "X3" | "X4" | "X5" | "X6" | "X7" | "X8"; } - /** @name StagingXcmV4Junction (84) */ + /** @name StagingXcmV4Junction (83) */ interface StagingXcmV4Junction extends Enum { readonly isParachain: boolean; readonly asParachain: Compact; @@ -1599,7 +1591,7 @@ declare module "@polkadot/types/lookup" { | "GlobalConsensus"; } - /** @name StagingXcmV4JunctionNetworkId (87) */ + /** @name StagingXcmV4JunctionNetworkId (86) */ interface StagingXcmV4JunctionNetworkId extends Enum { readonly isByGenesis: boolean; readonly asByGenesis: U8aFixed; @@ -1634,7 +1626,7 @@ declare module "@polkadot/types/lookup" { | "PolkadotBulletin"; } - /** @name XcmV3JunctionBodyId (90) */ + /** @name XcmV3JunctionBodyId (89) */ interface XcmV3JunctionBodyId extends Enum { readonly isUnit: boolean; readonly isMoniker: boolean; @@ -1661,7 +1653,7 @@ declare module "@polkadot/types/lookup" { | "Treasury"; } - /** @name XcmV3JunctionBodyPart (91) */ + /** @name XcmV3JunctionBodyPart (90) */ interface XcmV3JunctionBodyPart extends Enum { readonly isVoice: boolean; readonly isMembers: boolean; @@ -1686,10 +1678,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Voice" | "Members" | "Fraction" | "AtLeastProportion" | "MoreThanProportion"; } - /** @name StagingXcmV4Xcm (99) */ + /** @name StagingXcmV4Xcm (98) */ interface StagingXcmV4Xcm extends Vec {} - /** @name StagingXcmV4Instruction (101) */ + /** @name StagingXcmV4Instruction (100) */ interface StagingXcmV4Instruction extends Enum { readonly isWithdrawAsset: boolean; readonly asWithdrawAsset: StagingXcmV4AssetAssets; @@ -1919,19 +1911,19 @@ declare module "@polkadot/types/lookup" { | "UnpaidExecution"; } - /** @name StagingXcmV4AssetAssets (102) */ + /** @name StagingXcmV4AssetAssets (101) */ interface StagingXcmV4AssetAssets extends Vec {} - /** @name StagingXcmV4Asset (104) */ + /** @name StagingXcmV4Asset (103) */ interface StagingXcmV4Asset extends Struct { readonly id: StagingXcmV4AssetAssetId; readonly fun: StagingXcmV4AssetFungibility; } - /** @name StagingXcmV4AssetAssetId (105) */ + /** @name StagingXcmV4AssetAssetId (104) */ interface StagingXcmV4AssetAssetId extends StagingXcmV4Location {} - /** @name StagingXcmV4AssetFungibility (106) */ + /** @name StagingXcmV4AssetFungibility (105) */ interface StagingXcmV4AssetFungibility extends Enum { readonly isFungible: boolean; readonly asFungible: Compact; @@ -1940,7 +1932,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Fungible" | "NonFungible"; } - /** @name StagingXcmV4AssetAssetInstance (107) */ + /** @name StagingXcmV4AssetAssetInstance (106) */ interface StagingXcmV4AssetAssetInstance extends Enum { readonly isUndefined: boolean; readonly isIndex: boolean; @@ -1956,7 +1948,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Undefined" | "Index" | "Array4" | "Array8" | "Array16" | "Array32"; } - /** @name StagingXcmV4Response (110) */ + /** @name StagingXcmV4Response (109) */ interface StagingXcmV4Response extends Enum { readonly isNull: boolean; readonly isAssets: boolean; @@ -1972,7 +1964,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Null" | "Assets" | "ExecutionResult" | "Version" | "PalletsInfo" | "DispatchResult"; } - /** @name StagingXcmV4PalletInfo (114) */ + /** @name StagingXcmV4PalletInfo (113) */ interface StagingXcmV4PalletInfo extends Struct { readonly index: Compact; readonly name: Bytes; @@ -1982,7 +1974,7 @@ declare module "@polkadot/types/lookup" { readonly patch: Compact; } - /** @name XcmV3MaybeErrorCode (117) */ + /** @name XcmV3MaybeErrorCode (116) */ interface XcmV3MaybeErrorCode extends Enum { readonly isSuccess: boolean; readonly isError: boolean; @@ -1992,7 +1984,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Success" | "Error" | "TruncatedError"; } - /** @name XcmV3OriginKind (120) */ + /** @name XcmV3OriginKind (119) */ interface XcmV3OriginKind extends Enum { readonly isNative: boolean; readonly isSovereignAccount: boolean; @@ -2001,19 +1993,19 @@ declare module "@polkadot/types/lookup" { readonly type: "Native" | "SovereignAccount" | "Superuser" | "Xcm"; } - /** @name XcmDoubleEncoded (121) */ + /** @name XcmDoubleEncoded (120) */ interface XcmDoubleEncoded extends Struct { readonly encoded: Bytes; } - /** @name StagingXcmV4QueryResponseInfo (122) */ + /** @name StagingXcmV4QueryResponseInfo (121) */ interface StagingXcmV4QueryResponseInfo extends Struct { readonly destination: StagingXcmV4Location; readonly queryId: Compact; readonly maxWeight: SpWeightsWeightV2Weight; } - /** @name StagingXcmV4AssetAssetFilter (123) */ + /** @name StagingXcmV4AssetAssetFilter (122) */ interface StagingXcmV4AssetAssetFilter extends Enum { readonly isDefinite: boolean; readonly asDefinite: StagingXcmV4AssetAssets; @@ -2022,7 +2014,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Definite" | "Wild"; } - /** @name StagingXcmV4AssetWildAsset (124) */ + /** @name StagingXcmV4AssetWildAsset (123) */ interface StagingXcmV4AssetWildAsset extends Enum { readonly isAll: boolean; readonly isAllOf: boolean; @@ -2041,14 +2033,14 @@ declare module "@polkadot/types/lookup" { readonly type: "All" | "AllOf" | "AllCounted" | "AllOfCounted"; } - /** @name StagingXcmV4AssetWildFungibility (125) */ + /** @name StagingXcmV4AssetWildFungibility (124) */ interface StagingXcmV4AssetWildFungibility extends Enum { readonly isFungible: boolean; readonly isNonFungible: boolean; readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV3WeightLimit (126) */ + /** @name XcmV3WeightLimit (125) */ interface XcmV3WeightLimit extends Enum { readonly isUnlimited: boolean; readonly isLimited: boolean; @@ -2056,7 +2048,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unlimited" | "Limited"; } - /** @name XcmVersionedAssets (127) */ + /** @name XcmVersionedAssets (126) */ interface XcmVersionedAssets extends Enum { readonly isV2: boolean; readonly asV2: XcmV2MultiassetMultiAssets; @@ -2067,16 +2059,16 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name XcmV2MultiassetMultiAssets (128) */ + /** @name XcmV2MultiassetMultiAssets (127) */ interface XcmV2MultiassetMultiAssets extends Vec {} - /** @name XcmV2MultiAsset (130) */ + /** @name XcmV2MultiAsset (129) */ interface XcmV2MultiAsset extends Struct { readonly id: XcmV2MultiassetAssetId; readonly fun: XcmV2MultiassetFungibility; } - /** @name XcmV2MultiassetAssetId (131) */ + /** @name XcmV2MultiassetAssetId (130) */ interface XcmV2MultiassetAssetId extends Enum { readonly isConcrete: boolean; readonly asConcrete: XcmV2MultiLocation; @@ -2085,13 +2077,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Concrete" | "Abstract"; } - /** @name XcmV2MultiLocation (132) */ + /** @name XcmV2MultiLocation (131) */ interface XcmV2MultiLocation extends Struct { readonly parents: u8; readonly interior: XcmV2MultilocationJunctions; } - /** @name XcmV2MultilocationJunctions (133) */ + /** @name XcmV2MultilocationJunctions (132) */ interface XcmV2MultilocationJunctions extends Enum { readonly isHere: boolean; readonly isX1: boolean; @@ -2128,7 +2120,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "X1" | "X2" | "X3" | "X4" | "X5" | "X6" | "X7" | "X8"; } - /** @name XcmV2Junction (134) */ + /** @name XcmV2Junction (133) */ interface XcmV2Junction extends Enum { readonly isParachain: boolean; readonly asParachain: Compact; @@ -2171,7 +2163,7 @@ declare module "@polkadot/types/lookup" { | "Plurality"; } - /** @name XcmV2NetworkId (135) */ + /** @name XcmV2NetworkId (134) */ interface XcmV2NetworkId extends Enum { readonly isAny: boolean; readonly isNamed: boolean; @@ -2181,7 +2173,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Any" | "Named" | "Polkadot" | "Kusama"; } - /** @name XcmV2BodyId (137) */ + /** @name XcmV2BodyId (136) */ interface XcmV2BodyId extends Enum { readonly isUnit: boolean; readonly isNamed: boolean; @@ -2208,7 +2200,7 @@ declare module "@polkadot/types/lookup" { | "Treasury"; } - /** @name XcmV2BodyPart (138) */ + /** @name XcmV2BodyPart (137) */ interface XcmV2BodyPart extends Enum { readonly isVoice: boolean; readonly isMembers: boolean; @@ -2233,7 +2225,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Voice" | "Members" | "Fraction" | "AtLeastProportion" | "MoreThanProportion"; } - /** @name XcmV2MultiassetFungibility (139) */ + /** @name XcmV2MultiassetFungibility (138) */ interface XcmV2MultiassetFungibility extends Enum { readonly isFungible: boolean; readonly asFungible: Compact; @@ -2242,7 +2234,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV2MultiassetAssetInstance (140) */ + /** @name XcmV2MultiassetAssetInstance (139) */ interface XcmV2MultiassetAssetInstance extends Enum { readonly isUndefined: boolean; readonly isIndex: boolean; @@ -2260,16 +2252,16 @@ declare module "@polkadot/types/lookup" { readonly type: "Undefined" | "Index" | "Array4" | "Array8" | "Array16" | "Array32" | "Blob"; } - /** @name XcmV3MultiassetMultiAssets (141) */ + /** @name XcmV3MultiassetMultiAssets (140) */ interface XcmV3MultiassetMultiAssets extends Vec {} - /** @name XcmV3MultiAsset (143) */ + /** @name XcmV3MultiAsset (142) */ interface XcmV3MultiAsset extends Struct { readonly id: XcmV3MultiassetAssetId; readonly fun: XcmV3MultiassetFungibility; } - /** @name XcmV3MultiassetAssetId (144) */ + /** @name XcmV3MultiassetAssetId (143) */ interface XcmV3MultiassetAssetId extends Enum { readonly isConcrete: boolean; readonly asConcrete: StagingXcmV3MultiLocation; @@ -2278,13 +2270,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Concrete" | "Abstract"; } - /** @name StagingXcmV3MultiLocation (145) */ + /** @name StagingXcmV3MultiLocation (144) */ interface StagingXcmV3MultiLocation extends Struct { readonly parents: u8; readonly interior: XcmV3Junctions; } - /** @name XcmV3Junctions (146) */ + /** @name XcmV3Junctions (145) */ interface XcmV3Junctions extends Enum { readonly isHere: boolean; readonly isX1: boolean; @@ -2321,7 +2313,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "X1" | "X2" | "X3" | "X4" | "X5" | "X6" | "X7" | "X8"; } - /** @name XcmV3Junction (147) */ + /** @name XcmV3Junction (146) */ interface XcmV3Junction extends Enum { readonly isParachain: boolean; readonly asParachain: Compact; @@ -2370,7 +2362,7 @@ declare module "@polkadot/types/lookup" { | "GlobalConsensus"; } - /** @name XcmV3JunctionNetworkId (149) */ + /** @name XcmV3JunctionNetworkId (148) */ interface XcmV3JunctionNetworkId extends Enum { readonly isByGenesis: boolean; readonly asByGenesis: U8aFixed; @@ -2405,7 +2397,7 @@ declare module "@polkadot/types/lookup" { | "PolkadotBulletin"; } - /** @name XcmV3MultiassetFungibility (150) */ + /** @name XcmV3MultiassetFungibility (149) */ interface XcmV3MultiassetFungibility extends Enum { readonly isFungible: boolean; readonly asFungible: Compact; @@ -2414,7 +2406,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV3MultiassetAssetInstance (151) */ + /** @name XcmV3MultiassetAssetInstance (150) */ interface XcmV3MultiassetAssetInstance extends Enum { readonly isUndefined: boolean; readonly isIndex: boolean; @@ -2430,7 +2422,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Undefined" | "Index" | "Array4" | "Array8" | "Array16" | "Array32"; } - /** @name XcmVersionedLocation (152) */ + /** @name XcmVersionedLocation (151) */ interface XcmVersionedLocation extends Enum { readonly isV2: boolean; readonly asV2: XcmV2MultiLocation; @@ -2441,7 +2433,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name PalletAssetsEvent (153) */ + /** @name PalletAssetsEvent (152) */ interface PalletAssetsEvent extends Enum { readonly isCreated: boolean; readonly asCreated: { @@ -2617,7 +2609,7 @@ declare module "@polkadot/types/lookup" { | "Withdrawn"; } - /** @name PalletForeignAssetCreatorEvent (154) */ + /** @name PalletForeignAssetCreatorEvent (153) */ interface PalletForeignAssetCreatorEvent extends Enum { readonly isForeignAssetCreated: boolean; readonly asForeignAssetCreated: { @@ -2646,7 +2638,7 @@ declare module "@polkadot/types/lookup" { | "ForeignAssetDestroyed"; } - /** @name PalletAssetRateEvent (155) */ + /** @name PalletAssetRateEvent (154) */ interface PalletAssetRateEvent extends Enum { readonly isAssetRateCreated: boolean; readonly asAssetRateCreated: { @@ -2666,7 +2658,7 @@ declare module "@polkadot/types/lookup" { readonly type: "AssetRateCreated" | "AssetRateRemoved" | "AssetRateUpdated"; } - /** @name PalletMessageQueueEvent (157) */ + /** @name PalletMessageQueueEvent (156) */ interface PalletMessageQueueEvent extends Enum { readonly isProcessingFailed: boolean; readonly asProcessingFailed: { @@ -2696,7 +2688,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ProcessingFailed" | "Processed" | "OverweightEnqueued" | "PageReaped"; } - /** @name CumulusPrimitivesCoreAggregateMessageOrigin (158) */ + /** @name CumulusPrimitivesCoreAggregateMessageOrigin (157) */ interface CumulusPrimitivesCoreAggregateMessageOrigin extends Enum { readonly isHere: boolean; readonly isParent: boolean; @@ -2705,7 +2697,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "Parent" | "Sibling"; } - /** @name FrameSupportMessagesProcessMessageError (159) */ + /** @name FrameSupportMessagesProcessMessageError (158) */ interface FrameSupportMessagesProcessMessageError extends Enum { readonly isBadFormat: boolean; readonly isCorrupt: boolean; @@ -2717,7 +2709,7 @@ declare module "@polkadot/types/lookup" { readonly type: "BadFormat" | "Corrupt" | "Unsupported" | "Overweight" | "Yield" | "StackLimitReached"; } - /** @name PalletXcmCoreBuyerEvent (160) */ + /** @name PalletXcmCoreBuyerEvent (159) */ interface PalletXcmCoreBuyerEvent extends Enum { readonly isBuyCoreXcmSent: boolean; readonly asBuyCoreXcmSent: { @@ -2744,13 +2736,13 @@ declare module "@polkadot/types/lookup" { | "CleanedUpExpiredInFlightOrderEntries"; } - /** @name PalletRootTestingEvent (162) */ + /** @name PalletRootTestingEvent (161) */ interface PalletRootTestingEvent extends Enum { readonly isDefensiveTestCall: boolean; readonly type: "DefensiveTestCall"; } - /** @name FrameSystemPhase (163) */ + /** @name FrameSystemPhase (162) */ interface FrameSystemPhase extends Enum { readonly isApplyExtrinsic: boolean; readonly asApplyExtrinsic: u32; @@ -2759,19 +2751,19 @@ declare module "@polkadot/types/lookup" { readonly type: "ApplyExtrinsic" | "Finalization" | "Initialization"; } - /** @name FrameSystemLastRuntimeUpgradeInfo (167) */ + /** @name FrameSystemLastRuntimeUpgradeInfo (166) */ interface FrameSystemLastRuntimeUpgradeInfo extends Struct { readonly specVersion: Compact; readonly specName: Text; } - /** @name FrameSystemCodeUpgradeAuthorization (169) */ + /** @name FrameSystemCodeUpgradeAuthorization (168) */ interface FrameSystemCodeUpgradeAuthorization extends Struct { readonly codeHash: H256; readonly checkVersion: bool; } - /** @name FrameSystemCall (170) */ + /** @name FrameSystemCall (169) */ interface FrameSystemCall extends Enum { readonly isRemark: boolean; readonly asRemark: { @@ -2832,21 +2824,21 @@ declare module "@polkadot/types/lookup" { | "ApplyAuthorizedUpgrade"; } - /** @name FrameSystemLimitsBlockWeights (174) */ + /** @name FrameSystemLimitsBlockWeights (173) */ interface FrameSystemLimitsBlockWeights extends Struct { readonly baseBlock: SpWeightsWeightV2Weight; readonly maxBlock: SpWeightsWeightV2Weight; readonly perClass: FrameSupportDispatchPerDispatchClassWeightsPerClass; } - /** @name FrameSupportDispatchPerDispatchClassWeightsPerClass (175) */ + /** @name FrameSupportDispatchPerDispatchClassWeightsPerClass (174) */ interface FrameSupportDispatchPerDispatchClassWeightsPerClass extends Struct { readonly normal: FrameSystemLimitsWeightsPerClass; readonly operational: FrameSystemLimitsWeightsPerClass; readonly mandatory: FrameSystemLimitsWeightsPerClass; } - /** @name FrameSystemLimitsWeightsPerClass (176) */ + /** @name FrameSystemLimitsWeightsPerClass (175) */ interface FrameSystemLimitsWeightsPerClass extends Struct { readonly baseExtrinsic: SpWeightsWeightV2Weight; readonly maxExtrinsic: Option; @@ -2854,25 +2846,25 @@ declare module "@polkadot/types/lookup" { readonly reserved: Option; } - /** @name FrameSystemLimitsBlockLength (178) */ + /** @name FrameSystemLimitsBlockLength (177) */ interface FrameSystemLimitsBlockLength extends Struct { readonly max: FrameSupportDispatchPerDispatchClassU32; } - /** @name FrameSupportDispatchPerDispatchClassU32 (179) */ + /** @name FrameSupportDispatchPerDispatchClassU32 (178) */ interface FrameSupportDispatchPerDispatchClassU32 extends Struct { readonly normal: u32; readonly operational: u32; readonly mandatory: u32; } - /** @name SpWeightsRuntimeDbWeight (180) */ + /** @name SpWeightsRuntimeDbWeight (179) */ interface SpWeightsRuntimeDbWeight extends Struct { readonly read: u64; readonly write: u64; } - /** @name SpVersionRuntimeVersion (181) */ + /** @name SpVersionRuntimeVersion (180) */ interface SpVersionRuntimeVersion extends Struct { readonly specName: Text; readonly implName: Text; @@ -2884,7 +2876,7 @@ declare module "@polkadot/types/lookup" { readonly stateVersion: u8; } - /** @name FrameSystemError (185) */ + /** @name FrameSystemError (184) */ interface FrameSystemError extends Enum { readonly isInvalidSpecName: boolean; readonly isSpecVersionNeedsToIncrease: boolean; @@ -2907,41 +2899,41 @@ declare module "@polkadot/types/lookup" { | "Unauthorized"; } - /** @name CumulusPalletParachainSystemUnincludedSegmentAncestor (187) */ + /** @name CumulusPalletParachainSystemUnincludedSegmentAncestor (186) */ interface CumulusPalletParachainSystemUnincludedSegmentAncestor extends Struct { readonly usedBandwidth: CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth; readonly paraHeadHash: Option; readonly consumedGoAheadSignal: Option; } - /** @name CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth (188) */ + /** @name CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth (187) */ interface CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth extends Struct { readonly umpMsgCount: u32; readonly umpTotalBytes: u32; readonly hrmpOutgoing: BTreeMap; } - /** @name CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate (190) */ + /** @name CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate (189) */ interface CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate extends Struct { readonly msgCount: u32; readonly totalBytes: u32; } - /** @name PolkadotPrimitivesV7UpgradeGoAhead (195) */ + /** @name PolkadotPrimitivesV7UpgradeGoAhead (194) */ interface PolkadotPrimitivesV7UpgradeGoAhead extends Enum { readonly isAbort: boolean; readonly isGoAhead: boolean; readonly type: "Abort" | "GoAhead"; } - /** @name CumulusPalletParachainSystemUnincludedSegmentSegmentTracker (196) */ + /** @name CumulusPalletParachainSystemUnincludedSegmentSegmentTracker (195) */ interface CumulusPalletParachainSystemUnincludedSegmentSegmentTracker extends Struct { readonly usedBandwidth: CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth; readonly hrmpWatermark: Option; readonly consumedGoAheadSignal: Option; } - /** @name PolkadotPrimitivesV7PersistedValidationData (197) */ + /** @name PolkadotPrimitivesV7PersistedValidationData (196) */ interface PolkadotPrimitivesV7PersistedValidationData extends Struct { readonly parentHead: Bytes; readonly relayParentNumber: u32; @@ -2949,18 +2941,18 @@ declare module "@polkadot/types/lookup" { readonly maxPovSize: u32; } - /** @name PolkadotPrimitivesV7UpgradeRestriction (200) */ + /** @name PolkadotPrimitivesV7UpgradeRestriction (199) */ interface PolkadotPrimitivesV7UpgradeRestriction extends Enum { readonly isPresent: boolean; readonly type: "Present"; } - /** @name SpTrieStorageProof (201) */ + /** @name SpTrieStorageProof (200) */ interface SpTrieStorageProof extends Struct { readonly trieNodes: BTreeSet; } - /** @name CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot (203) */ + /** @name CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot (202) */ interface CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot extends Struct { readonly dmqMqcHead: H256; readonly relayDispatchQueueRemainingCapacity: CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity; @@ -2968,13 +2960,13 @@ declare module "@polkadot/types/lookup" { readonly egressChannels: Vec>; } - /** @name CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity (204) */ + /** @name CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity (203) */ interface CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity extends Struct { readonly remainingCount: u32; readonly remainingSize: u32; } - /** @name PolkadotPrimitivesV7AbridgedHrmpChannel (207) */ + /** @name PolkadotPrimitivesV7AbridgedHrmpChannel (206) */ interface PolkadotPrimitivesV7AbridgedHrmpChannel extends Struct { readonly maxCapacity: u32; readonly maxTotalSize: u32; @@ -2984,7 +2976,7 @@ declare module "@polkadot/types/lookup" { readonly mqcHead: Option; } - /** @name PolkadotPrimitivesV7AbridgedHostConfiguration (208) */ + /** @name PolkadotPrimitivesV7AbridgedHostConfiguration (207) */ interface PolkadotPrimitivesV7AbridgedHostConfiguration extends Struct { readonly maxCodeSize: u32; readonly maxHeadDataSize: u32; @@ -2998,19 +2990,19 @@ declare module "@polkadot/types/lookup" { readonly asyncBackingParams: PolkadotPrimitivesV7AsyncBackingAsyncBackingParams; } - /** @name PolkadotPrimitivesV7AsyncBackingAsyncBackingParams (209) */ + /** @name PolkadotPrimitivesV7AsyncBackingAsyncBackingParams (208) */ interface PolkadotPrimitivesV7AsyncBackingAsyncBackingParams extends Struct { readonly maxCandidateDepth: u32; readonly allowedAncestryLen: u32; } - /** @name PolkadotCorePrimitivesOutboundHrmpMessage (215) */ + /** @name PolkadotCorePrimitivesOutboundHrmpMessage (214) */ interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct { readonly recipient: u32; readonly data: Bytes; } - /** @name CumulusPalletParachainSystemCall (216) */ + /** @name CumulusPalletParachainSystemCall (215) */ interface CumulusPalletParachainSystemCall extends Enum { readonly isSetValidationData: boolean; readonly asSetValidationData: { @@ -3032,7 +3024,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SetValidationData" | "SudoSendUpwardMessage" | "AuthorizeUpgrade" | "EnactAuthorizedUpgrade"; } - /** @name CumulusPrimitivesParachainInherentParachainInherentData (217) */ + /** @name CumulusPrimitivesParachainInherentParachainInherentData (216) */ interface CumulusPrimitivesParachainInherentParachainInherentData extends Struct { readonly validationData: PolkadotPrimitivesV7PersistedValidationData; readonly relayChainState: SpTrieStorageProof; @@ -3040,19 +3032,19 @@ declare module "@polkadot/types/lookup" { readonly horizontalMessages: BTreeMap>; } - /** @name PolkadotCorePrimitivesInboundDownwardMessage (219) */ + /** @name PolkadotCorePrimitivesInboundDownwardMessage (218) */ interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct { readonly sentAt: u32; readonly msg: Bytes; } - /** @name PolkadotCorePrimitivesInboundHrmpMessage (222) */ + /** @name PolkadotCorePrimitivesInboundHrmpMessage (221) */ interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct { readonly sentAt: u32; readonly data: Bytes; } - /** @name CumulusPalletParachainSystemError (225) */ + /** @name CumulusPalletParachainSystemError (224) */ interface CumulusPalletParachainSystemError extends Enum { readonly isOverlappingUpgrades: boolean; readonly isProhibitedByPolkadot: boolean; @@ -3073,7 +3065,7 @@ declare module "@polkadot/types/lookup" { | "Unauthorized"; } - /** @name PalletTimestampCall (226) */ + /** @name PalletTimestampCall (225) */ interface PalletTimestampCall extends Enum { readonly isSet: boolean; readonly asSet: { @@ -3082,10 +3074,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Set"; } - /** @name StagingParachainInfoCall (227) */ + /** @name StagingParachainInfoCall (226) */ type StagingParachainInfoCall = Null; - /** @name PalletSudoCall (228) */ + /** @name PalletSudoCall (227) */ interface PalletSudoCall extends Enum { readonly isSudo: boolean; readonly asSudo: { @@ -3109,7 +3101,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Sudo" | "SudoUncheckedWeight" | "SetKey" | "SudoAs" | "RemoveKey"; } - /** @name PalletUtilityCall (230) */ + /** @name PalletUtilityCall (229) */ interface PalletUtilityCall extends Enum { readonly isBatch: boolean; readonly asBatch: { @@ -3141,7 +3133,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Batch" | "AsDerivative" | "BatchAll" | "DispatchAs" | "ForceBatch" | "WithWeight"; } - /** @name DanceboxRuntimeOriginCaller (232) */ + /** @name DanceboxRuntimeOriginCaller (231) */ interface DanceboxRuntimeOriginCaller extends Enum { readonly isSystem: boolean; readonly asSystem: FrameSupportDispatchRawOrigin; @@ -3153,7 +3145,7 @@ declare module "@polkadot/types/lookup" { readonly type: "System" | "Void" | "CumulusXcm" | "PolkadotXcm"; } - /** @name FrameSupportDispatchRawOrigin (233) */ + /** @name FrameSupportDispatchRawOrigin (232) */ interface FrameSupportDispatchRawOrigin extends Enum { readonly isRoot: boolean; readonly isSigned: boolean; @@ -3162,7 +3154,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Root" | "Signed" | "None"; } - /** @name CumulusPalletXcmOrigin (234) */ + /** @name CumulusPalletXcmOrigin (233) */ interface CumulusPalletXcmOrigin extends Enum { readonly isRelay: boolean; readonly isSiblingParachain: boolean; @@ -3170,7 +3162,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Relay" | "SiblingParachain"; } - /** @name PalletXcmOrigin (235) */ + /** @name PalletXcmOrigin (234) */ interface PalletXcmOrigin extends Enum { readonly isXcm: boolean; readonly asXcm: StagingXcmV4Location; @@ -3179,10 +3171,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Xcm" | "Response"; } - /** @name SpCoreVoid (236) */ + /** @name SpCoreVoid (235) */ type SpCoreVoid = Null; - /** @name PalletProxyCall (237) */ + /** @name PalletProxyCall (236) */ interface PalletProxyCall extends Enum { readonly isProxy: boolean; readonly asProxy: { @@ -3252,14 +3244,14 @@ declare module "@polkadot/types/lookup" { | "ProxyAnnounced"; } - /** @name PalletMaintenanceModeCall (241) */ + /** @name PalletMaintenanceModeCall (240) */ interface PalletMaintenanceModeCall extends Enum { readonly isEnterMaintenanceMode: boolean; readonly isResumeNormalOperation: boolean; readonly type: "EnterMaintenanceMode" | "ResumeNormalOperation"; } - /** @name PalletTxPauseCall (242) */ + /** @name PalletTxPauseCall (241) */ interface PalletTxPauseCall extends Enum { readonly isPause: boolean; readonly asPause: { @@ -3272,7 +3264,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Pause" | "Unpause"; } - /** @name PalletBalancesCall (243) */ + /** @name PalletBalancesCall (242) */ interface PalletBalancesCall extends Enum { readonly isTransferAllowDeath: boolean; readonly asTransferAllowDeath: { diff --git a/typescript-api/src/dancelight/interfaces/augment-api-consts.ts b/typescript-api/src/dancelight/interfaces/augment-api-consts.ts index 4da72612c..8c14fae99 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-consts.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-consts.ts @@ -127,6 +127,14 @@ declare module "@polkadot/api-base/types/consts" { /** Generic const */ [key: string]: Codec; }; + externalValidators: { + /** Maximum number of external validators. */ + maxExternalValidators: u32 & AugmentedConst; + /** Maximum number of whitelisted validators. */ + maxWhitelistedValidators: u32 & AugmentedConst; + /** Generic const */ + [key: string]: Codec; + }; fellowshipReferenda: { /** * Quantization level for the referendum wakeup scheduler. A higher number will result in fewer storage diff --git a/typescript-api/src/dancelight/interfaces/augment-api-errors.ts b/typescript-api/src/dancelight/interfaces/augment-api-errors.ts index 1c5c4bcf5..9e8d2a854 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-errors.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-errors.ts @@ -191,6 +191,20 @@ declare module "@polkadot/api-base/types/errors" { /** Generic error */ [key: string]: AugmentedError; }; + externalValidators: { + /** Account is already an Invulnerable. */ + AlreadyInvulnerable: AugmentedError; + /** Account does not have keys registered */ + NoKeysRegistered: AugmentedError; + /** Account is not an Invulnerable. */ + NotInvulnerable: AugmentedError; + /** There are too many Invulnerables. */ + TooManyInvulnerables: AugmentedError; + /** Unable to derive collator id from account id */ + UnableToDeriveCollatorId: AugmentedError; + /** Generic error */ + [key: string]: AugmentedError; + }; fellowshipCollective: { /** Account is already a member. */ AlreadyMember: AugmentedError; diff --git a/typescript-api/src/dancelight/interfaces/augment-api-events.ts b/typescript-api/src/dancelight/interfaces/augment-api-events.ts index 14c2e043d..b7efc9a72 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-events.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-events.ts @@ -198,6 +198,14 @@ declare module "@polkadot/api-base/types/events" { /** Generic event */ [key: string]: AugmentedEvent; }; + externalValidators: { + /** A new Invulnerable was added. */ + WhitelistedValidatorAdded: AugmentedEvent; + /** An Invulnerable was removed. */ + WhitelistedValidatorRemoved: AugmentedEvent; + /** Generic event */ + [key: string]: AugmentedEvent; + }; fellowshipCollective: { /** A member `who` has been added. */ MemberAdded: AugmentedEvent; @@ -1057,21 +1065,10 @@ declare module "@polkadot/api-base/types/events" { [key: string]: AugmentedEvent; }; tanssiInvulnerables: { - /** - * An account was unable to be added to the Invulnerables because they did not have keys registered. Other - * Invulnerables may have been set. - */ - InvalidInvulnerableSkipped: AugmentedEvent; /** A new Invulnerable was added. */ InvulnerableAdded: AugmentedEvent; /** An Invulnerable was removed. */ InvulnerableRemoved: AugmentedEvent; - /** New Invulnerables were set. */ - NewInvulnerables: AugmentedEvent< - ApiType, - [invulnerables: Vec], - { invulnerables: Vec } - >; /** Generic event */ [key: string]: AugmentedEvent; }; @@ -1156,14 +1153,6 @@ declare module "@polkadot/api-base/types/events" { /** Generic event */ [key: string]: AugmentedEvent; }; - validatorManager: { - /** Validators were removed from the set. */ - ValidatorsDeregistered: AugmentedEvent]>; - /** New validators were added to the set. */ - ValidatorsRegistered: AugmentedEvent]>; - /** Generic event */ - [key: string]: AugmentedEvent; - }; whitelist: { CallWhitelisted: AugmentedEvent; WhitelistedCallDispatched: AugmentedEvent< diff --git a/typescript-api/src/dancelight/interfaces/augment-api-query.ts b/typescript-api/src/dancelight/interfaces/augment-api-query.ts index 8c2d993d8..55c3f36c7 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-query.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-query.ts @@ -47,6 +47,7 @@ import type { PalletConfigurationHostConfiguration, PalletConvictionVotingVoteVoting, PalletDataPreserversRegisteredProfile, + PalletExternalValidatorsActiveEraInfo, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityAuthorityProperties, @@ -607,6 +608,22 @@ declare module "@polkadot/api-base/types/storage" { /** Generic query */ [key: string]: QueryableStorageEntry; }; + externalValidators: { + /** The invulnerable, permissioned collators. This list must be sorted. */ + activeEra: AugmentedQuery Observable>, []> & + QueryableStorageEntry; + /** The invulnerable, permissioned collators. This list must be sorted. */ + externalValidators: AugmentedQuery Observable>, []> & + QueryableStorageEntry; + /** The invulnerable, permissioned collators. This list must be sorted. */ + skipExternalValidators: AugmentedQuery Observable, []> & + QueryableStorageEntry; + /** The invulnerable, permissioned collators. This list must be sorted. */ + whitelistedValidators: AugmentedQuery Observable>, []> & + QueryableStorageEntry; + /** Generic query */ + [key: string]: QueryableStorageEntry; + }; fellowshipCollective: { /** The index of each ranks's member into the group of members who have at least that rank. */ idToIndex: AugmentedQuery< @@ -2031,7 +2048,7 @@ declare module "@polkadot/api-base/types/storage" { [key: string]: QueryableStorageEntry; }; tanssiInvulnerables: { - /** The invulnerable, permissioned collators. This list must be sorted. */ + /** The invulnerable, permissioned collators. */ invulnerables: AugmentedQuery Observable>, []> & QueryableStorageEntry; /** Generic query */ @@ -2083,16 +2100,6 @@ declare module "@polkadot/api-base/types/storage" { /** Generic query */ [key: string]: QueryableStorageEntry; }; - validatorManager: { - /** Validators that should be added. */ - validatorsToAdd: AugmentedQuery Observable>, []> & - QueryableStorageEntry; - /** Validators that should be retired, because their Parachain was deregistered. */ - validatorsToRetire: AugmentedQuery Observable>, []> & - QueryableStorageEntry; - /** Generic query */ - [key: string]: QueryableStorageEntry; - }; whitelist: { whitelistedCall: AugmentedQuery< ApiType, diff --git a/typescript-api/src/dancelight/interfaces/augment-api-tx.ts b/typescript-api/src/dancelight/interfaces/augment-api-tx.ts index 5a2489c86..4bfb4c20a 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-tx.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-tx.ts @@ -1222,6 +1222,37 @@ declare module "@polkadot/api-base/types/submittable" { /** Generic tx */ [key: string]: SubmittableExtrinsicFunction; }; + externalValidators: { + /** + * Add a new account `who` to the list of `WhitelistedValidators`. + * + * The origin for this call must be the `UpdateOrigin`. + */ + addWhitelisted: AugmentedSubmittable< + (who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic, + [AccountId32] + >; + /** + * Remove an account `who` from the list of `WhitelistedValidators` collators. + * + * The origin for this call must be the `UpdateOrigin`. + */ + removeWhitelisted: AugmentedSubmittable< + (who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic, + [AccountId32] + >; + /** + * Allow to ignore external validators and use only whitelisted ones. + * + * The origin for this call must be the `UpdateOrigin`. + */ + skipExternalValidators: AugmentedSubmittable< + (skip: bool | boolean | Uint8Array) => SubmittableExtrinsic, + [bool] + >; + /** Generic tx */ + [key: string]: SubmittableExtrinsicFunction; + }; fellowshipCollective: { /** * Introduce a new member. @@ -3898,7 +3929,7 @@ declare module "@polkadot/api-base/types/submittable" { [AccountId32] >; /** - * Remove an account `who` from the list of `Invulnerables` collators. `Invulnerables` must be sorted. + * Remove an account `who` from the list of `Invulnerables` collators. * * The origin for this call must be the `UpdateOrigin`. */ @@ -4236,28 +4267,6 @@ declare module "@polkadot/api-base/types/submittable" { /** Generic tx */ [key: string]: SubmittableExtrinsicFunction; }; - validatorManager: { - /** - * Remove validators from the set. - * - * The removed validators will be deactivated from current session + 2. - */ - deregisterValidators: AugmentedSubmittable< - (validators: Vec | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic, - [Vec] - >; - /** - * Add new validators to the set. - * - * The new validators will be active from current session + 2. - */ - registerValidators: AugmentedSubmittable< - (validators: Vec | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic, - [Vec] - >; - /** Generic tx */ - [key: string]: SubmittableExtrinsicFunction; - }; whitelist: { dispatchWhitelistedCall: AugmentedSubmittable< ( diff --git a/typescript-api/src/dancelight/interfaces/lookup.ts b/typescript-api/src/dancelight/interfaces/lookup.ts index 4844c0eb2..ba7bd0a56 100644 --- a/typescript-api/src/dancelight/interfaces/lookup.ts +++ b/typescript-api/src/dancelight/interfaces/lookup.ts @@ -331,21 +331,15 @@ export default { /** Lookup46: pallet_invulnerables::pallet::Event */ PalletInvulnerablesEvent: { _enum: { - NewInvulnerables: { - invulnerables: "Vec", - }, InvulnerableAdded: { accountId: "AccountId32", }, InvulnerableRemoved: { accountId: "AccountId32", }, - InvalidInvulnerableSkipped: { - accountId: "AccountId32", - }, }, }, - /** Lookup48: pallet_collator_assignment::pallet::Event */ + /** Lookup47: pallet_collator_assignment::pallet::Event */ PalletCollatorAssignmentEvent: { _enum: { NewPendingAssignment: { @@ -355,7 +349,7 @@ export default { }, }, }, - /** Lookup49: pallet_author_noting::pallet::Event */ + /** Lookup48: pallet_author_noting::pallet::Event */ PalletAuthorNotingEvent: { _enum: { LatestAuthorChanged: { @@ -369,7 +363,7 @@ export default { }, }, }, - /** Lookup51: pallet_services_payment::pallet::Event */ + /** Lookup50: pallet_services_payment::pallet::Event */ PalletServicesPaymentEvent: { _enum: { CreditsPurchased: { @@ -408,7 +402,7 @@ export default { }, }, }, - /** Lookup54: pallet_data_preservers::pallet::Event */ + /** Lookup53: pallet_data_preservers::pallet::Event */ PalletDataPreserversEvent: { _enum: { BootNodesChanged: { @@ -438,7 +432,7 @@ export default { }, }, }, - /** Lookup55: pallet_session::pallet::Event */ + /** Lookup54: pallet_session::pallet::Event */ PalletSessionEvent: { _enum: { NewSession: { @@ -446,7 +440,7 @@ export default { }, }, }, - /** Lookup56: pallet_grandpa::pallet::Event */ + /** Lookup55: pallet_grandpa::pallet::Event */ PalletGrandpaEvent: { _enum: { NewAuthorities: { @@ -456,9 +450,9 @@ export default { Resumed: "Null", }, }, - /** Lookup59: sp_consensus_grandpa::app::Public */ + /** Lookup58: sp_consensus_grandpa::app::Public */ SpConsensusGrandpaAppPublic: "[u8;32]", - /** Lookup60: pallet_inflation_rewards::pallet::Event */ + /** Lookup59: pallet_inflation_rewards::pallet::Event */ PalletInflationRewardsEvent: { _enum: { RewardedOrchestrator: { @@ -472,7 +466,7 @@ export default { }, }, }, - /** Lookup61: pallet_treasury::pallet::Event */ + /** Lookup60: pallet_treasury::pallet::Event */ PalletTreasuryEvent: { _enum: { Spending: { @@ -525,14 +519,14 @@ export default { }, }, }, - /** Lookup63: pallet_conviction_voting::pallet::Event */ + /** Lookup62: pallet_conviction_voting::pallet::Event */ PalletConvictionVotingEvent: { _enum: { Delegated: "(AccountId32,AccountId32)", Undelegated: "AccountId32", }, }, - /** Lookup64: pallet_referenda::pallet::Event */ + /** Lookup63: pallet_referenda::pallet::Event */ PalletReferendaEvent: { _enum: { Submitted: { @@ -611,7 +605,7 @@ export default { }, }, /** - * Lookup66: frame_support::traits::preimages::Bounded */ FrameSupportPreimagesBounded: { @@ -632,7 +626,7 @@ export default { }, }, }, - /** Lookup68: frame_system::pallet::Call */ + /** Lookup67: frame_system::pallet::Call */ FrameSystemCall: { _enum: { remark: { @@ -675,7 +669,7 @@ export default { }, }, }, - /** Lookup72: pallet_babe::pallet::Call */ + /** Lookup71: pallet_babe::pallet::Call */ PalletBabeCall: { _enum: { report_equivocation: { @@ -692,7 +686,7 @@ export default { }, }, /** - * Lookup73: sp_consensus_slots::EquivocationProof, + * Lookup72: sp_consensus_slots::EquivocationProof, * sp_consensus_babe::app::Public> */ SpConsensusSlotsEquivocationProof: { @@ -701,7 +695,7 @@ export default { firstHeader: "SpRuntimeHeader", secondHeader: "SpRuntimeHeader", }, - /** Lookup74: sp_runtime::generic::header::Header */ + /** Lookup73: sp_runtime::generic::header::Header */ SpRuntimeHeader: { parentHash: "H256", number: "Compact", @@ -709,15 +703,15 @@ export default { extrinsicsRoot: "H256", digest: "SpRuntimeDigest", }, - /** Lookup76: sp_consensus_babe::app::Public */ + /** Lookup75: sp_consensus_babe::app::Public */ SpConsensusBabeAppPublic: "[u8;32]", - /** Lookup77: sp_session::MembershipProof */ + /** Lookup76: sp_session::MembershipProof */ SpSessionMembershipProof: { session: "u32", trieNodes: "Vec", validatorCount: "u32", }, - /** Lookup78: sp_consensus_babe::digests::NextConfigDescriptor */ + /** Lookup77: sp_consensus_babe::digests::NextConfigDescriptor */ SpConsensusBabeDigestsNextConfigDescriptor: { _enum: { __Unused0: "Null", @@ -727,11 +721,11 @@ export default { }, }, }, - /** Lookup80: sp_consensus_babe::AllowedSlots */ + /** Lookup79: sp_consensus_babe::AllowedSlots */ SpConsensusBabeAllowedSlots: { _enum: ["PrimarySlots", "PrimaryAndSecondaryPlainSlots", "PrimaryAndSecondaryVRFSlots"], }, - /** Lookup81: pallet_timestamp::pallet::Call */ + /** Lookup80: pallet_timestamp::pallet::Call */ PalletTimestampCall: { _enum: { set: { @@ -739,7 +733,7 @@ export default { }, }, }, - /** Lookup82: pallet_balances::pallet::Call */ + /** Lookup81: pallet_balances::pallet::Call */ PalletBalancesCall: { _enum: { transfer_allow_death: { @@ -3818,14 +3812,17 @@ export default { validationCode: "Bytes", paraKind: "bool", }, - /** Lookup413: dancelight_runtime::validator_manager::pallet::Call */ - DancelightRuntimeValidatorManagerPalletCall: { + /** Lookup413: pallet_external_validators::pallet::Call */ + PalletExternalValidatorsCall: { _enum: { - register_validators: { - validators: "Vec", + skip_external_validators: { + skip: "bool", + }, + add_whitelisted: { + who: "AccountId32", }, - deregister_validators: { - validators: "Vec", + remove_whitelisted: { + who: "AccountId32", }, }, }, @@ -4485,11 +4482,15 @@ export default { }, }, }, - /** Lookup454: dancelight_runtime::validator_manager::pallet::Event */ - DancelightRuntimeValidatorManagerPalletEvent: { + /** Lookup454: pallet_external_validators::pallet::Event */ + PalletExternalValidatorsEvent: { _enum: { - ValidatorsRegistered: "Vec", - ValidatorsDeregistered: "Vec", + WhitelistedValidatorAdded: { + accountId: "AccountId32", + }, + WhitelistedValidatorRemoved: { + accountId: "AccountId32", + }, }, }, /** Lookup455: pallet_root_testing::pallet::Event */ @@ -5889,24 +5890,39 @@ export default { "TooManyCores", ], }, - /** Lookup774: pallet_sudo::pallet::Error */ + /** Lookup774: pallet_external_validators::pallet::ActiveEraInfo */ + PalletExternalValidatorsActiveEraInfo: { + index: "u32", + start: "Option", + }, + /** Lookup776: pallet_external_validators::pallet::Error */ + PalletExternalValidatorsError: { + _enum: [ + "TooManyInvulnerables", + "AlreadyInvulnerable", + "NotInvulnerable", + "NoKeysRegistered", + "UnableToDeriveCollatorId", + ], + }, + /** Lookup777: pallet_sudo::pallet::Error */ PalletSudoError: { _enum: ["RequireSudo"], }, - /** Lookup777: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ + /** Lookup780: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ FrameSystemExtensionsCheckNonZeroSender: "Null", - /** Lookup778: frame_system::extensions::check_spec_version::CheckSpecVersion */ + /** Lookup781: frame_system::extensions::check_spec_version::CheckSpecVersion */ FrameSystemExtensionsCheckSpecVersion: "Null", - /** Lookup779: frame_system::extensions::check_tx_version::CheckTxVersion */ + /** Lookup782: frame_system::extensions::check_tx_version::CheckTxVersion */ FrameSystemExtensionsCheckTxVersion: "Null", - /** Lookup780: frame_system::extensions::check_genesis::CheckGenesis */ + /** Lookup783: frame_system::extensions::check_genesis::CheckGenesis */ FrameSystemExtensionsCheckGenesis: "Null", - /** Lookup783: frame_system::extensions::check_nonce::CheckNonce */ + /** Lookup786: frame_system::extensions::check_nonce::CheckNonce */ FrameSystemExtensionsCheckNonce: "Compact", - /** Lookup784: frame_system::extensions::check_weight::CheckWeight */ + /** Lookup787: frame_system::extensions::check_weight::CheckWeight */ FrameSystemExtensionsCheckWeight: "Null", - /** Lookup785: pallet_transaction_payment::ChargeTransactionPayment */ + /** Lookup788: pallet_transaction_payment::ChargeTransactionPayment */ PalletTransactionPaymentChargeTransactionPayment: "Compact", - /** Lookup786: dancelight_runtime::Runtime */ + /** Lookup789: dancelight_runtime::Runtime */ DancelightRuntimeRuntime: "Null", }; diff --git a/typescript-api/src/dancelight/interfaces/registry.ts b/typescript-api/src/dancelight/interfaces/registry.ts index a7a722d12..b3dade0f4 100644 --- a/typescript-api/src/dancelight/interfaces/registry.ts +++ b/typescript-api/src/dancelight/interfaces/registry.ts @@ -26,8 +26,6 @@ import type { DancelightRuntimeRuntimeParametersKey, DancelightRuntimeRuntimeParametersValue, DancelightRuntimeSessionKeys, - DancelightRuntimeValidatorManagerPalletCall, - DancelightRuntimeValidatorManagerPalletEvent, DpCollatorAssignmentAssignedCollatorsAccountId32, DpCollatorAssignmentAssignedCollatorsPublic, DpContainerChainGenesisDataContainerChainGenesisData, @@ -113,6 +111,10 @@ import type { PalletDataPreserversProfile, PalletDataPreserversProfileMode, PalletDataPreserversRegisteredProfile, + PalletExternalValidatorsActiveEraInfo, + PalletExternalValidatorsCall, + PalletExternalValidatorsError, + PalletExternalValidatorsEvent, PalletGrandpaCall, PalletGrandpaError, PalletGrandpaEvent, @@ -455,8 +457,6 @@ declare module "@polkadot/types/types/registry" { DancelightRuntimeRuntimeParametersKey: DancelightRuntimeRuntimeParametersKey; DancelightRuntimeRuntimeParametersValue: DancelightRuntimeRuntimeParametersValue; DancelightRuntimeSessionKeys: DancelightRuntimeSessionKeys; - DancelightRuntimeValidatorManagerPalletCall: DancelightRuntimeValidatorManagerPalletCall; - DancelightRuntimeValidatorManagerPalletEvent: DancelightRuntimeValidatorManagerPalletEvent; DpCollatorAssignmentAssignedCollatorsAccountId32: DpCollatorAssignmentAssignedCollatorsAccountId32; DpCollatorAssignmentAssignedCollatorsPublic: DpCollatorAssignmentAssignedCollatorsPublic; DpContainerChainGenesisDataContainerChainGenesisData: DpContainerChainGenesisDataContainerChainGenesisData; @@ -542,6 +542,10 @@ declare module "@polkadot/types/types/registry" { PalletDataPreserversProfile: PalletDataPreserversProfile; PalletDataPreserversProfileMode: PalletDataPreserversProfileMode; PalletDataPreserversRegisteredProfile: PalletDataPreserversRegisteredProfile; + PalletExternalValidatorsActiveEraInfo: PalletExternalValidatorsActiveEraInfo; + PalletExternalValidatorsCall: PalletExternalValidatorsCall; + PalletExternalValidatorsError: PalletExternalValidatorsError; + PalletExternalValidatorsEvent: PalletExternalValidatorsEvent; PalletGrandpaCall: PalletGrandpaCall; PalletGrandpaError: PalletGrandpaError; PalletGrandpaEvent: PalletGrandpaEvent; diff --git a/typescript-api/src/dancelight/interfaces/types-lookup.ts b/typescript-api/src/dancelight/interfaces/types-lookup.ts index 24c2f0d71..cc752a903 100644 --- a/typescript-api/src/dancelight/interfaces/types-lookup.ts +++ b/typescript-api/src/dancelight/interfaces/types-lookup.ts @@ -490,10 +490,6 @@ declare module "@polkadot/types/lookup" { /** @name PalletInvulnerablesEvent (46) */ interface PalletInvulnerablesEvent extends Enum { - readonly isNewInvulnerables: boolean; - readonly asNewInvulnerables: { - readonly invulnerables: Vec; - } & Struct; readonly isInvulnerableAdded: boolean; readonly asInvulnerableAdded: { readonly accountId: AccountId32; @@ -502,14 +498,10 @@ declare module "@polkadot/types/lookup" { readonly asInvulnerableRemoved: { readonly accountId: AccountId32; } & Struct; - readonly isInvalidInvulnerableSkipped: boolean; - readonly asInvalidInvulnerableSkipped: { - readonly accountId: AccountId32; - } & Struct; - readonly type: "NewInvulnerables" | "InvulnerableAdded" | "InvulnerableRemoved" | "InvalidInvulnerableSkipped"; + readonly type: "InvulnerableAdded" | "InvulnerableRemoved"; } - /** @name PalletCollatorAssignmentEvent (48) */ + /** @name PalletCollatorAssignmentEvent (47) */ interface PalletCollatorAssignmentEvent extends Enum { readonly isNewPendingAssignment: boolean; readonly asNewPendingAssignment: { @@ -520,7 +512,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NewPendingAssignment"; } - /** @name PalletAuthorNotingEvent (49) */ + /** @name PalletAuthorNotingEvent (48) */ interface PalletAuthorNotingEvent extends Enum { readonly isLatestAuthorChanged: boolean; readonly asLatestAuthorChanged: { @@ -536,7 +528,7 @@ declare module "@polkadot/types/lookup" { readonly type: "LatestAuthorChanged" | "RemovedAuthorData"; } - /** @name PalletServicesPaymentEvent (51) */ + /** @name PalletServicesPaymentEvent (50) */ interface PalletServicesPaymentEvent extends Enum { readonly isCreditsPurchased: boolean; readonly asCreditsPurchased: { @@ -591,7 +583,7 @@ declare module "@polkadot/types/lookup" { | "CollatorAssignmentCreditsSet"; } - /** @name PalletDataPreserversEvent (54) */ + /** @name PalletDataPreserversEvent (53) */ interface PalletDataPreserversEvent extends Enum { readonly isBootNodesChanged: boolean; readonly asBootNodesChanged: { @@ -633,7 +625,7 @@ declare module "@polkadot/types/lookup" { | "AssignmentStopped"; } - /** @name PalletSessionEvent (55) */ + /** @name PalletSessionEvent (54) */ interface PalletSessionEvent extends Enum { readonly isNewSession: boolean; readonly asNewSession: { @@ -642,7 +634,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NewSession"; } - /** @name PalletGrandpaEvent (56) */ + /** @name PalletGrandpaEvent (55) */ interface PalletGrandpaEvent extends Enum { readonly isNewAuthorities: boolean; readonly asNewAuthorities: { @@ -653,10 +645,10 @@ declare module "@polkadot/types/lookup" { readonly type: "NewAuthorities" | "Paused" | "Resumed"; } - /** @name SpConsensusGrandpaAppPublic (59) */ + /** @name SpConsensusGrandpaAppPublic (58) */ interface SpConsensusGrandpaAppPublic extends U8aFixed {} - /** @name PalletInflationRewardsEvent (60) */ + /** @name PalletInflationRewardsEvent (59) */ interface PalletInflationRewardsEvent extends Enum { readonly isRewardedOrchestrator: boolean; readonly asRewardedOrchestrator: { @@ -672,7 +664,7 @@ declare module "@polkadot/types/lookup" { readonly type: "RewardedOrchestrator" | "RewardedContainer"; } - /** @name PalletTreasuryEvent (61) */ + /** @name PalletTreasuryEvent (60) */ interface PalletTreasuryEvent extends Enum { readonly isSpending: boolean; readonly asSpending: { @@ -749,7 +741,7 @@ declare module "@polkadot/types/lookup" { | "SpendProcessed"; } - /** @name PalletConvictionVotingEvent (63) */ + /** @name PalletConvictionVotingEvent (62) */ interface PalletConvictionVotingEvent extends Enum { readonly isDelegated: boolean; readonly asDelegated: ITuple<[AccountId32, AccountId32]>; @@ -758,7 +750,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Delegated" | "Undelegated"; } - /** @name PalletReferendaEvent (64) */ + /** @name PalletReferendaEvent (63) */ interface PalletReferendaEvent extends Enum { readonly isSubmitted: boolean; readonly asSubmitted: { @@ -862,7 +854,7 @@ declare module "@polkadot/types/lookup" { | "MetadataCleared"; } - /** @name FrameSupportPreimagesBounded (66) */ + /** @name FrameSupportPreimagesBounded (65) */ interface FrameSupportPreimagesBounded extends Enum { readonly isLegacy: boolean; readonly asLegacy: { @@ -878,7 +870,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Legacy" | "Inline" | "Lookup"; } - /** @name FrameSystemCall (68) */ + /** @name FrameSystemCall (67) */ interface FrameSystemCall extends Enum { readonly isRemark: boolean; readonly asRemark: { @@ -939,7 +931,7 @@ declare module "@polkadot/types/lookup" { | "ApplyAuthorizedUpgrade"; } - /** @name PalletBabeCall (72) */ + /** @name PalletBabeCall (71) */ interface PalletBabeCall extends Enum { readonly isReportEquivocation: boolean; readonly asReportEquivocation: { @@ -958,7 +950,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ReportEquivocation" | "ReportEquivocationUnsigned" | "PlanConfigChange"; } - /** @name SpConsensusSlotsEquivocationProof (73) */ + /** @name SpConsensusSlotsEquivocationProof (72) */ interface SpConsensusSlotsEquivocationProof extends Struct { readonly offender: SpConsensusBabeAppPublic; readonly slot: u64; @@ -966,7 +958,7 @@ declare module "@polkadot/types/lookup" { readonly secondHeader: SpRuntimeHeader; } - /** @name SpRuntimeHeader (74) */ + /** @name SpRuntimeHeader (73) */ interface SpRuntimeHeader extends Struct { readonly parentHash: H256; readonly number: Compact; @@ -975,17 +967,17 @@ declare module "@polkadot/types/lookup" { readonly digest: SpRuntimeDigest; } - /** @name SpConsensusBabeAppPublic (76) */ + /** @name SpConsensusBabeAppPublic (75) */ interface SpConsensusBabeAppPublic extends U8aFixed {} - /** @name SpSessionMembershipProof (77) */ + /** @name SpSessionMembershipProof (76) */ interface SpSessionMembershipProof extends Struct { readonly session: u32; readonly trieNodes: Vec; readonly validatorCount: u32; } - /** @name SpConsensusBabeDigestsNextConfigDescriptor (78) */ + /** @name SpConsensusBabeDigestsNextConfigDescriptor (77) */ interface SpConsensusBabeDigestsNextConfigDescriptor extends Enum { readonly isV1: boolean; readonly asV1: { @@ -995,7 +987,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V1"; } - /** @name SpConsensusBabeAllowedSlots (80) */ + /** @name SpConsensusBabeAllowedSlots (79) */ interface SpConsensusBabeAllowedSlots extends Enum { readonly isPrimarySlots: boolean; readonly isPrimaryAndSecondaryPlainSlots: boolean; @@ -1003,7 +995,7 @@ declare module "@polkadot/types/lookup" { readonly type: "PrimarySlots" | "PrimaryAndSecondaryPlainSlots" | "PrimaryAndSecondaryVRFSlots"; } - /** @name PalletTimestampCall (81) */ + /** @name PalletTimestampCall (80) */ interface PalletTimestampCall extends Enum { readonly isSet: boolean; readonly asSet: { @@ -1012,7 +1004,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Set"; } - /** @name PalletBalancesCall (82) */ + /** @name PalletBalancesCall (81) */ interface PalletBalancesCall extends Enum { readonly isTransferAllowDeath: boolean; readonly asTransferAllowDeath: { @@ -4970,17 +4962,21 @@ declare module "@polkadot/types/lookup" { readonly paraKind: bool; } - /** @name DancelightRuntimeValidatorManagerPalletCall (413) */ - interface DancelightRuntimeValidatorManagerPalletCall extends Enum { - readonly isRegisterValidators: boolean; - readonly asRegisterValidators: { - readonly validators: Vec; + /** @name PalletExternalValidatorsCall (413) */ + interface PalletExternalValidatorsCall extends Enum { + readonly isSkipExternalValidators: boolean; + readonly asSkipExternalValidators: { + readonly skip: bool; } & Struct; - readonly isDeregisterValidators: boolean; - readonly asDeregisterValidators: { - readonly validators: Vec; + readonly isAddWhitelisted: boolean; + readonly asAddWhitelisted: { + readonly who: AccountId32; } & Struct; - readonly type: "RegisterValidators" | "DeregisterValidators"; + readonly isRemoveWhitelisted: boolean; + readonly asRemoveWhitelisted: { + readonly who: AccountId32; + } & Struct; + readonly type: "SkipExternalValidators" | "AddWhitelisted" | "RemoveWhitelisted"; } /** @name PalletRootTestingCall (414) */ @@ -5831,13 +5827,17 @@ declare module "@polkadot/types/lookup" { | "FailedToResumeIdleXcmExecution"; } - /** @name DancelightRuntimeValidatorManagerPalletEvent (454) */ - interface DancelightRuntimeValidatorManagerPalletEvent extends Enum { - readonly isValidatorsRegistered: boolean; - readonly asValidatorsRegistered: Vec; - readonly isValidatorsDeregistered: boolean; - readonly asValidatorsDeregistered: Vec; - readonly type: "ValidatorsRegistered" | "ValidatorsDeregistered"; + /** @name PalletExternalValidatorsEvent (454) */ + interface PalletExternalValidatorsEvent extends Enum { + readonly isWhitelistedValidatorAdded: boolean; + readonly asWhitelistedValidatorAdded: { + readonly accountId: AccountId32; + } & Struct; + readonly isWhitelistedValidatorRemoved: boolean; + readonly asWhitelistedValidatorRemoved: { + readonly accountId: AccountId32; + } & Struct; + readonly type: "WhitelistedValidatorAdded" | "WhitelistedValidatorRemoved"; } /** @name PalletRootTestingEvent (455) */ @@ -7610,33 +7610,54 @@ declare module "@polkadot/types/lookup" { | "TooManyCores"; } - /** @name PalletSudoError (774) */ + /** @name PalletExternalValidatorsActiveEraInfo (774) */ + interface PalletExternalValidatorsActiveEraInfo extends Struct { + readonly index: u32; + readonly start: Option; + } + + /** @name PalletExternalValidatorsError (776) */ + interface PalletExternalValidatorsError extends Enum { + readonly isTooManyInvulnerables: boolean; + readonly isAlreadyInvulnerable: boolean; + readonly isNotInvulnerable: boolean; + readonly isNoKeysRegistered: boolean; + readonly isUnableToDeriveCollatorId: boolean; + readonly type: + | "TooManyInvulnerables" + | "AlreadyInvulnerable" + | "NotInvulnerable" + | "NoKeysRegistered" + | "UnableToDeriveCollatorId"; + } + + /** @name PalletSudoError (777) */ interface PalletSudoError extends Enum { readonly isRequireSudo: boolean; readonly type: "RequireSudo"; } - /** @name FrameSystemExtensionsCheckNonZeroSender (777) */ + /** @name FrameSystemExtensionsCheckNonZeroSender (780) */ type FrameSystemExtensionsCheckNonZeroSender = Null; - /** @name FrameSystemExtensionsCheckSpecVersion (778) */ + /** @name FrameSystemExtensionsCheckSpecVersion (781) */ type FrameSystemExtensionsCheckSpecVersion = Null; - /** @name FrameSystemExtensionsCheckTxVersion (779) */ + /** @name FrameSystemExtensionsCheckTxVersion (782) */ type FrameSystemExtensionsCheckTxVersion = Null; - /** @name FrameSystemExtensionsCheckGenesis (780) */ + /** @name FrameSystemExtensionsCheckGenesis (783) */ type FrameSystemExtensionsCheckGenesis = Null; - /** @name FrameSystemExtensionsCheckNonce (783) */ + /** @name FrameSystemExtensionsCheckNonce (786) */ interface FrameSystemExtensionsCheckNonce extends Compact {} - /** @name FrameSystemExtensionsCheckWeight (784) */ + /** @name FrameSystemExtensionsCheckWeight (787) */ type FrameSystemExtensionsCheckWeight = Null; - /** @name PalletTransactionPaymentChargeTransactionPayment (785) */ + /** @name PalletTransactionPaymentChargeTransactionPayment (788) */ interface PalletTransactionPaymentChargeTransactionPayment extends Compact {} - /** @name DancelightRuntimeRuntime (786) */ + /** @name DancelightRuntimeRuntime (789) */ type DancelightRuntimeRuntime = Null; } // declare module diff --git a/typescript-api/src/flashbox/interfaces/augment-api-events.ts b/typescript-api/src/flashbox/interfaces/augment-api-events.ts index 4d57e2607..249655f77 100644 --- a/typescript-api/src/flashbox/interfaces/augment-api-events.ts +++ b/typescript-api/src/flashbox/interfaces/augment-api-events.ts @@ -6,7 +6,7 @@ import "@polkadot/api-base/types/events"; import type { ApiTypes, AugmentedEvent } from "@polkadot/api-base/types"; -import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64 } from "@polkadot/types-codec"; +import type { Bytes, Null, Option, Result, U8aFixed, bool, u128, u16, u32, u64 } from "@polkadot/types-codec"; import type { ITuple } from "@polkadot/types-codec/types"; import type { AccountId32, H256 } from "@polkadot/types/interfaces/runtime"; import type { @@ -255,21 +255,10 @@ declare module "@polkadot/api-base/types/events" { [key: string]: AugmentedEvent; }; invulnerables: { - /** - * An account was unable to be added to the Invulnerables because they did not have keys registered. Other - * Invulnerables may have been set. - */ - InvalidInvulnerableSkipped: AugmentedEvent; /** A new Invulnerable was added. */ InvulnerableAdded: AugmentedEvent; /** An Invulnerable was removed. */ InvulnerableRemoved: AugmentedEvent; - /** New Invulnerables were set. */ - NewInvulnerables: AugmentedEvent< - ApiType, - [invulnerables: Vec], - { invulnerables: Vec } - >; /** 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 d4923af5a..147f8285e 100644 --- a/typescript-api/src/flashbox/interfaces/augment-api-query.ts +++ b/typescript-api/src/flashbox/interfaces/augment-api-query.ts @@ -381,7 +381,7 @@ declare module "@polkadot/api-base/types/storage" { [key: string]: QueryableStorageEntry; }; invulnerables: { - /** The invulnerable, permissioned collators. This list must be sorted. */ + /** The invulnerable, permissioned collators. */ invulnerables: AugmentedQuery Observable>, []> & QueryableStorageEntry; /** Generic query */ diff --git a/typescript-api/src/flashbox/interfaces/augment-api-tx.ts b/typescript-api/src/flashbox/interfaces/augment-api-tx.ts index ca6f615fb..8c83d6166 100644 --- a/typescript-api/src/flashbox/interfaces/augment-api-tx.ts +++ b/typescript-api/src/flashbox/interfaces/augment-api-tx.ts @@ -866,7 +866,7 @@ declare module "@polkadot/api-base/types/submittable" { [AccountId32] >; /** - * Remove an account `who` from the list of `Invulnerables` collators. `Invulnerables` must be sorted. + * Remove an account `who` from the list of `Invulnerables` collators. * * The origin for this call must be the `UpdateOrigin`. */ diff --git a/typescript-api/src/flashbox/interfaces/lookup.ts b/typescript-api/src/flashbox/interfaces/lookup.ts index 582456c84..1dbaf3faa 100644 --- a/typescript-api/src/flashbox/interfaces/lookup.ts +++ b/typescript-api/src/flashbox/interfaces/lookup.ts @@ -683,21 +683,15 @@ export default { /** Lookup68: pallet_invulnerables::pallet::Event */ PalletInvulnerablesEvent: { _enum: { - NewInvulnerables: { - invulnerables: "Vec", - }, InvulnerableAdded: { accountId: "AccountId32", }, InvulnerableRemoved: { accountId: "AccountId32", }, - InvalidInvulnerableSkipped: { - accountId: "AccountId32", - }, }, }, - /** Lookup70: pallet_session::pallet::Event */ + /** Lookup69: pallet_session::pallet::Event */ PalletSessionEvent: { _enum: { NewSession: { @@ -705,7 +699,7 @@ export default { }, }, }, - /** Lookup71: pallet_inflation_rewards::pallet::Event */ + /** Lookup70: pallet_inflation_rewards::pallet::Event */ PalletInflationRewardsEvent: { _enum: { RewardedOrchestrator: { @@ -719,7 +713,7 @@ export default { }, }, }, - /** Lookup72: pallet_treasury::pallet::Event */ + /** Lookup71: pallet_treasury::pallet::Event */ PalletTreasuryEvent: { _enum: { Spending: { @@ -772,11 +766,11 @@ export default { }, }, }, - /** Lookup73: pallet_root_testing::pallet::Event */ + /** Lookup72: pallet_root_testing::pallet::Event */ PalletRootTestingEvent: { _enum: ["DefensiveTestCall"], }, - /** Lookup74: frame_system::Phase */ + /** Lookup73: frame_system::Phase */ FrameSystemPhase: { _enum: { ApplyExtrinsic: "u32", @@ -784,17 +778,17 @@ export default { Initialization: "Null", }, }, - /** Lookup78: frame_system::LastRuntimeUpgradeInfo */ + /** Lookup77: frame_system::LastRuntimeUpgradeInfo */ FrameSystemLastRuntimeUpgradeInfo: { specVersion: "Compact", specName: "Text", }, - /** Lookup81: frame_system::CodeUpgradeAuthorization */ + /** Lookup80: frame_system::CodeUpgradeAuthorization */ FrameSystemCodeUpgradeAuthorization: { codeHash: "H256", checkVersion: "bool", }, - /** Lookup82: frame_system::pallet::Call */ + /** Lookup81: frame_system::pallet::Call */ FrameSystemCall: { _enum: { remark: { @@ -837,41 +831,41 @@ export default { }, }, }, - /** Lookup86: frame_system::limits::BlockWeights */ + /** Lookup85: frame_system::limits::BlockWeights */ FrameSystemLimitsBlockWeights: { baseBlock: "SpWeightsWeightV2Weight", maxBlock: "SpWeightsWeightV2Weight", perClass: "FrameSupportDispatchPerDispatchClassWeightsPerClass", }, - /** Lookup87: frame_support::dispatch::PerDispatchClass */ + /** Lookup86: frame_support::dispatch::PerDispatchClass */ FrameSupportDispatchPerDispatchClassWeightsPerClass: { normal: "FrameSystemLimitsWeightsPerClass", operational: "FrameSystemLimitsWeightsPerClass", mandatory: "FrameSystemLimitsWeightsPerClass", }, - /** Lookup88: frame_system::limits::WeightsPerClass */ + /** Lookup87: frame_system::limits::WeightsPerClass */ FrameSystemLimitsWeightsPerClass: { baseExtrinsic: "SpWeightsWeightV2Weight", maxExtrinsic: "Option", maxTotal: "Option", reserved: "Option", }, - /** Lookup90: frame_system::limits::BlockLength */ + /** Lookup89: frame_system::limits::BlockLength */ FrameSystemLimitsBlockLength: { max: "FrameSupportDispatchPerDispatchClassU32", }, - /** Lookup91: frame_support::dispatch::PerDispatchClass */ + /** Lookup90: frame_support::dispatch::PerDispatchClass */ FrameSupportDispatchPerDispatchClassU32: { normal: "u32", operational: "u32", mandatory: "u32", }, - /** Lookup92: sp_weights::RuntimeDbWeight */ + /** Lookup91: sp_weights::RuntimeDbWeight */ SpWeightsRuntimeDbWeight: { read: "u64", write: "u64", }, - /** Lookup93: sp_version::RuntimeVersion */ + /** Lookup92: sp_version::RuntimeVersion */ SpVersionRuntimeVersion: { specName: "Text", implName: "Text", @@ -882,7 +876,7 @@ export default { transactionVersion: "u32", stateVersion: "u8", }, - /** Lookup98: frame_system::pallet::Error */ + /** Lookup97: frame_system::pallet::Error */ FrameSystemError: { _enum: [ "InvalidSpecName", @@ -896,49 +890,49 @@ export default { "Unauthorized", ], }, - /** Lookup100: cumulus_pallet_parachain_system::unincluded_segment::Ancestor */ + /** Lookup99: cumulus_pallet_parachain_system::unincluded_segment::Ancestor */ CumulusPalletParachainSystemUnincludedSegmentAncestor: { usedBandwidth: "CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth", paraHeadHash: "Option", consumedGoAheadSignal: "Option", }, - /** Lookup101: cumulus_pallet_parachain_system::unincluded_segment::UsedBandwidth */ + /** Lookup100: cumulus_pallet_parachain_system::unincluded_segment::UsedBandwidth */ CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth: { umpMsgCount: "u32", umpTotalBytes: "u32", hrmpOutgoing: "BTreeMap", }, - /** Lookup103: cumulus_pallet_parachain_system::unincluded_segment::HrmpChannelUpdate */ + /** Lookup102: cumulus_pallet_parachain_system::unincluded_segment::HrmpChannelUpdate */ CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate: { msgCount: "u32", totalBytes: "u32", }, - /** Lookup108: polkadot_primitives::v7::UpgradeGoAhead */ + /** Lookup107: polkadot_primitives::v7::UpgradeGoAhead */ PolkadotPrimitivesV7UpgradeGoAhead: { _enum: ["Abort", "GoAhead"], }, - /** Lookup109: cumulus_pallet_parachain_system::unincluded_segment::SegmentTracker */ + /** Lookup108: cumulus_pallet_parachain_system::unincluded_segment::SegmentTracker */ CumulusPalletParachainSystemUnincludedSegmentSegmentTracker: { usedBandwidth: "CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth", hrmpWatermark: "Option", consumedGoAheadSignal: "Option", }, - /** Lookup111: polkadot_primitives::v7::PersistedValidationData */ + /** Lookup110: polkadot_primitives::v7::PersistedValidationData */ PolkadotPrimitivesV7PersistedValidationData: { parentHead: "Bytes", relayParentNumber: "u32", relayParentStorageRoot: "H256", maxPovSize: "u32", }, - /** Lookup114: polkadot_primitives::v7::UpgradeRestriction */ + /** Lookup113: polkadot_primitives::v7::UpgradeRestriction */ PolkadotPrimitivesV7UpgradeRestriction: { _enum: ["Present"], }, - /** Lookup115: sp_trie::storage_proof::StorageProof */ + /** Lookup114: sp_trie::storage_proof::StorageProof */ SpTrieStorageProof: { trieNodes: "BTreeSet", }, - /** Lookup117: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot */ + /** Lookup116: cumulus_pallet_parachain_system::relay_state_snapshot::MessagingStateSnapshot */ CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot: { dmqMqcHead: "H256", relayDispatchQueueRemainingCapacity: @@ -946,12 +940,12 @@ export default { ingressChannels: "Vec<(u32,PolkadotPrimitivesV7AbridgedHrmpChannel)>", egressChannels: "Vec<(u32,PolkadotPrimitivesV7AbridgedHrmpChannel)>", }, - /** Lookup118: cumulus_pallet_parachain_system::relay_state_snapshot::RelayDispatchQueueRemainingCapacity */ + /** Lookup117: cumulus_pallet_parachain_system::relay_state_snapshot::RelayDispatchQueueRemainingCapacity */ CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity: { remainingCount: "u32", remainingSize: "u32", }, - /** Lookup121: polkadot_primitives::v7::AbridgedHrmpChannel */ + /** Lookup120: polkadot_primitives::v7::AbridgedHrmpChannel */ PolkadotPrimitivesV7AbridgedHrmpChannel: { maxCapacity: "u32", maxTotalSize: "u32", @@ -960,7 +954,7 @@ export default { totalSize: "u32", mqcHead: "Option", }, - /** Lookup122: polkadot_primitives::v7::AbridgedHostConfiguration */ + /** Lookup121: polkadot_primitives::v7::AbridgedHostConfiguration */ PolkadotPrimitivesV7AbridgedHostConfiguration: { maxCodeSize: "u32", maxHeadDataSize: "u32", @@ -973,17 +967,17 @@ export default { validationUpgradeDelay: "u32", asyncBackingParams: "PolkadotPrimitivesV7AsyncBackingAsyncBackingParams", }, - /** Lookup123: polkadot_primitives::v7::async_backing::AsyncBackingParams */ + /** Lookup122: polkadot_primitives::v7::async_backing::AsyncBackingParams */ PolkadotPrimitivesV7AsyncBackingAsyncBackingParams: { maxCandidateDepth: "u32", allowedAncestryLen: "u32", }, - /** Lookup129: polkadot_core_primitives::OutboundHrmpMessage */ + /** Lookup128: polkadot_core_primitives::OutboundHrmpMessage */ PolkadotCorePrimitivesOutboundHrmpMessage: { recipient: "u32", data: "Bytes", }, - /** Lookup131: cumulus_pallet_parachain_system::pallet::Call */ + /** Lookup130: cumulus_pallet_parachain_system::pallet::Call */ CumulusPalletParachainSystemCall: { _enum: { set_validation_data: { @@ -1001,24 +995,24 @@ export default { }, }, }, - /** Lookup132: cumulus_primitives_parachain_inherent::ParachainInherentData */ + /** Lookup131: cumulus_primitives_parachain_inherent::ParachainInherentData */ CumulusPrimitivesParachainInherentParachainInherentData: { validationData: "PolkadotPrimitivesV7PersistedValidationData", relayChainState: "SpTrieStorageProof", downwardMessages: "Vec", horizontalMessages: "BTreeMap>", }, - /** Lookup134: polkadot_core_primitives::InboundDownwardMessage */ + /** Lookup133: polkadot_core_primitives::InboundDownwardMessage */ PolkadotCorePrimitivesInboundDownwardMessage: { sentAt: "u32", msg: "Bytes", }, - /** Lookup137: polkadot_core_primitives::InboundHrmpMessage */ + /** Lookup136: polkadot_core_primitives::InboundHrmpMessage */ PolkadotCorePrimitivesInboundHrmpMessage: { sentAt: "u32", data: "Bytes", }, - /** Lookup140: cumulus_pallet_parachain_system::pallet::Error */ + /** Lookup139: cumulus_pallet_parachain_system::pallet::Error */ CumulusPalletParachainSystemError: { _enum: [ "OverlappingUpgrades", @@ -1031,7 +1025,7 @@ export default { "Unauthorized", ], }, - /** Lookup141: pallet_timestamp::pallet::Call */ + /** Lookup140: pallet_timestamp::pallet::Call */ PalletTimestampCall: { _enum: { set: { @@ -1039,9 +1033,9 @@ export default { }, }, }, - /** Lookup142: staging_parachain_info::pallet::Call */ + /** Lookup141: staging_parachain_info::pallet::Call */ StagingParachainInfoCall: "Null", - /** Lookup143: pallet_sudo::pallet::Call */ + /** Lookup142: pallet_sudo::pallet::Call */ PalletSudoCall: { _enum: { sudo: { @@ -1064,7 +1058,7 @@ export default { remove_key: "Null", }, }, - /** Lookup145: pallet_utility::pallet::Call */ + /** Lookup144: pallet_utility::pallet::Call */ PalletUtilityCall: { _enum: { batch: { @@ -1090,14 +1084,14 @@ export default { }, }, }, - /** Lookup147: flashbox_runtime::OriginCaller */ + /** Lookup146: flashbox_runtime::OriginCaller */ FlashboxRuntimeOriginCaller: { _enum: { system: "FrameSupportDispatchRawOrigin", Void: "SpCoreVoid", }, }, - /** Lookup148: frame_support::dispatch::RawOrigin */ + /** Lookup147: frame_support::dispatch::RawOrigin */ FrameSupportDispatchRawOrigin: { _enum: { Root: "Null", @@ -1105,9 +1099,9 @@ export default { None: "Null", }, }, - /** Lookup149: sp_core::Void */ + /** Lookup148: sp_core::Void */ SpCoreVoid: "Null", - /** Lookup150: pallet_proxy::pallet::Call */ + /** Lookup149: pallet_proxy::pallet::Call */ PalletProxyCall: { _enum: { proxy: { @@ -1158,11 +1152,11 @@ export default { }, }, }, - /** Lookup155: pallet_maintenance_mode::pallet::Call */ + /** Lookup154: pallet_maintenance_mode::pallet::Call */ PalletMaintenanceModeCall: { _enum: ["enter_maintenance_mode", "resume_normal_operation"], }, - /** Lookup156: pallet_tx_pause::pallet::Call */ + /** Lookup155: pallet_tx_pause::pallet::Call */ PalletTxPauseCall: { _enum: { pause: { @@ -1173,7 +1167,7 @@ export default { }, }, }, - /** Lookup157: pallet_balances::pallet::Call */ + /** Lookup156: pallet_balances::pallet::Call */ PalletBalancesCall: { _enum: { transfer_allow_death: { diff --git a/typescript-api/src/flashbox/interfaces/types-lookup.ts b/typescript-api/src/flashbox/interfaces/types-lookup.ts index 0cbb6e0e5..3d9b5f84e 100644 --- a/typescript-api/src/flashbox/interfaces/types-lookup.ts +++ b/typescript-api/src/flashbox/interfaces/types-lookup.ts @@ -977,10 +977,6 @@ declare module "@polkadot/types/lookup" { /** @name PalletInvulnerablesEvent (68) */ interface PalletInvulnerablesEvent extends Enum { - readonly isNewInvulnerables: boolean; - readonly asNewInvulnerables: { - readonly invulnerables: Vec; - } & Struct; readonly isInvulnerableAdded: boolean; readonly asInvulnerableAdded: { readonly accountId: AccountId32; @@ -989,14 +985,10 @@ declare module "@polkadot/types/lookup" { readonly asInvulnerableRemoved: { readonly accountId: AccountId32; } & Struct; - readonly isInvalidInvulnerableSkipped: boolean; - readonly asInvalidInvulnerableSkipped: { - readonly accountId: AccountId32; - } & Struct; - readonly type: "NewInvulnerables" | "InvulnerableAdded" | "InvulnerableRemoved" | "InvalidInvulnerableSkipped"; + readonly type: "InvulnerableAdded" | "InvulnerableRemoved"; } - /** @name PalletSessionEvent (70) */ + /** @name PalletSessionEvent (69) */ interface PalletSessionEvent extends Enum { readonly isNewSession: boolean; readonly asNewSession: { @@ -1005,7 +997,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NewSession"; } - /** @name PalletInflationRewardsEvent (71) */ + /** @name PalletInflationRewardsEvent (70) */ interface PalletInflationRewardsEvent extends Enum { readonly isRewardedOrchestrator: boolean; readonly asRewardedOrchestrator: { @@ -1021,7 +1013,7 @@ declare module "@polkadot/types/lookup" { readonly type: "RewardedOrchestrator" | "RewardedContainer"; } - /** @name PalletTreasuryEvent (72) */ + /** @name PalletTreasuryEvent (71) */ interface PalletTreasuryEvent extends Enum { readonly isSpending: boolean; readonly asSpending: { @@ -1098,13 +1090,13 @@ declare module "@polkadot/types/lookup" { | "SpendProcessed"; } - /** @name PalletRootTestingEvent (73) */ + /** @name PalletRootTestingEvent (72) */ interface PalletRootTestingEvent extends Enum { readonly isDefensiveTestCall: boolean; readonly type: "DefensiveTestCall"; } - /** @name FrameSystemPhase (74) */ + /** @name FrameSystemPhase (73) */ interface FrameSystemPhase extends Enum { readonly isApplyExtrinsic: boolean; readonly asApplyExtrinsic: u32; @@ -1113,19 +1105,19 @@ declare module "@polkadot/types/lookup" { readonly type: "ApplyExtrinsic" | "Finalization" | "Initialization"; } - /** @name FrameSystemLastRuntimeUpgradeInfo (78) */ + /** @name FrameSystemLastRuntimeUpgradeInfo (77) */ interface FrameSystemLastRuntimeUpgradeInfo extends Struct { readonly specVersion: Compact; readonly specName: Text; } - /** @name FrameSystemCodeUpgradeAuthorization (81) */ + /** @name FrameSystemCodeUpgradeAuthorization (80) */ interface FrameSystemCodeUpgradeAuthorization extends Struct { readonly codeHash: H256; readonly checkVersion: bool; } - /** @name FrameSystemCall (82) */ + /** @name FrameSystemCall (81) */ interface FrameSystemCall extends Enum { readonly isRemark: boolean; readonly asRemark: { @@ -1186,21 +1178,21 @@ declare module "@polkadot/types/lookup" { | "ApplyAuthorizedUpgrade"; } - /** @name FrameSystemLimitsBlockWeights (86) */ + /** @name FrameSystemLimitsBlockWeights (85) */ interface FrameSystemLimitsBlockWeights extends Struct { readonly baseBlock: SpWeightsWeightV2Weight; readonly maxBlock: SpWeightsWeightV2Weight; readonly perClass: FrameSupportDispatchPerDispatchClassWeightsPerClass; } - /** @name FrameSupportDispatchPerDispatchClassWeightsPerClass (87) */ + /** @name FrameSupportDispatchPerDispatchClassWeightsPerClass (86) */ interface FrameSupportDispatchPerDispatchClassWeightsPerClass extends Struct { readonly normal: FrameSystemLimitsWeightsPerClass; readonly operational: FrameSystemLimitsWeightsPerClass; readonly mandatory: FrameSystemLimitsWeightsPerClass; } - /** @name FrameSystemLimitsWeightsPerClass (88) */ + /** @name FrameSystemLimitsWeightsPerClass (87) */ interface FrameSystemLimitsWeightsPerClass extends Struct { readonly baseExtrinsic: SpWeightsWeightV2Weight; readonly maxExtrinsic: Option; @@ -1208,25 +1200,25 @@ declare module "@polkadot/types/lookup" { readonly reserved: Option; } - /** @name FrameSystemLimitsBlockLength (90) */ + /** @name FrameSystemLimitsBlockLength (89) */ interface FrameSystemLimitsBlockLength extends Struct { readonly max: FrameSupportDispatchPerDispatchClassU32; } - /** @name FrameSupportDispatchPerDispatchClassU32 (91) */ + /** @name FrameSupportDispatchPerDispatchClassU32 (90) */ interface FrameSupportDispatchPerDispatchClassU32 extends Struct { readonly normal: u32; readonly operational: u32; readonly mandatory: u32; } - /** @name SpWeightsRuntimeDbWeight (92) */ + /** @name SpWeightsRuntimeDbWeight (91) */ interface SpWeightsRuntimeDbWeight extends Struct { readonly read: u64; readonly write: u64; } - /** @name SpVersionRuntimeVersion (93) */ + /** @name SpVersionRuntimeVersion (92) */ interface SpVersionRuntimeVersion extends Struct { readonly specName: Text; readonly implName: Text; @@ -1238,7 +1230,7 @@ declare module "@polkadot/types/lookup" { readonly stateVersion: u8; } - /** @name FrameSystemError (98) */ + /** @name FrameSystemError (97) */ interface FrameSystemError extends Enum { readonly isInvalidSpecName: boolean; readonly isSpecVersionNeedsToIncrease: boolean; @@ -1261,41 +1253,41 @@ declare module "@polkadot/types/lookup" { | "Unauthorized"; } - /** @name CumulusPalletParachainSystemUnincludedSegmentAncestor (100) */ + /** @name CumulusPalletParachainSystemUnincludedSegmentAncestor (99) */ interface CumulusPalletParachainSystemUnincludedSegmentAncestor extends Struct { readonly usedBandwidth: CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth; readonly paraHeadHash: Option; readonly consumedGoAheadSignal: Option; } - /** @name CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth (101) */ + /** @name CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth (100) */ interface CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth extends Struct { readonly umpMsgCount: u32; readonly umpTotalBytes: u32; readonly hrmpOutgoing: BTreeMap; } - /** @name CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate (103) */ + /** @name CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate (102) */ interface CumulusPalletParachainSystemUnincludedSegmentHrmpChannelUpdate extends Struct { readonly msgCount: u32; readonly totalBytes: u32; } - /** @name PolkadotPrimitivesV7UpgradeGoAhead (108) */ + /** @name PolkadotPrimitivesV7UpgradeGoAhead (107) */ interface PolkadotPrimitivesV7UpgradeGoAhead extends Enum { readonly isAbort: boolean; readonly isGoAhead: boolean; readonly type: "Abort" | "GoAhead"; } - /** @name CumulusPalletParachainSystemUnincludedSegmentSegmentTracker (109) */ + /** @name CumulusPalletParachainSystemUnincludedSegmentSegmentTracker (108) */ interface CumulusPalletParachainSystemUnincludedSegmentSegmentTracker extends Struct { readonly usedBandwidth: CumulusPalletParachainSystemUnincludedSegmentUsedBandwidth; readonly hrmpWatermark: Option; readonly consumedGoAheadSignal: Option; } - /** @name PolkadotPrimitivesV7PersistedValidationData (111) */ + /** @name PolkadotPrimitivesV7PersistedValidationData (110) */ interface PolkadotPrimitivesV7PersistedValidationData extends Struct { readonly parentHead: Bytes; readonly relayParentNumber: u32; @@ -1303,18 +1295,18 @@ declare module "@polkadot/types/lookup" { readonly maxPovSize: u32; } - /** @name PolkadotPrimitivesV7UpgradeRestriction (114) */ + /** @name PolkadotPrimitivesV7UpgradeRestriction (113) */ interface PolkadotPrimitivesV7UpgradeRestriction extends Enum { readonly isPresent: boolean; readonly type: "Present"; } - /** @name SpTrieStorageProof (115) */ + /** @name SpTrieStorageProof (114) */ interface SpTrieStorageProof extends Struct { readonly trieNodes: BTreeSet; } - /** @name CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot (117) */ + /** @name CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot (116) */ interface CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot extends Struct { readonly dmqMqcHead: H256; readonly relayDispatchQueueRemainingCapacity: CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity; @@ -1322,13 +1314,13 @@ declare module "@polkadot/types/lookup" { readonly egressChannels: Vec>; } - /** @name CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity (118) */ + /** @name CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity (117) */ interface CumulusPalletParachainSystemRelayStateSnapshotRelayDispatchQueueRemainingCapacity extends Struct { readonly remainingCount: u32; readonly remainingSize: u32; } - /** @name PolkadotPrimitivesV7AbridgedHrmpChannel (121) */ + /** @name PolkadotPrimitivesV7AbridgedHrmpChannel (120) */ interface PolkadotPrimitivesV7AbridgedHrmpChannel extends Struct { readonly maxCapacity: u32; readonly maxTotalSize: u32; @@ -1338,7 +1330,7 @@ declare module "@polkadot/types/lookup" { readonly mqcHead: Option; } - /** @name PolkadotPrimitivesV7AbridgedHostConfiguration (122) */ + /** @name PolkadotPrimitivesV7AbridgedHostConfiguration (121) */ interface PolkadotPrimitivesV7AbridgedHostConfiguration extends Struct { readonly maxCodeSize: u32; readonly maxHeadDataSize: u32; @@ -1352,19 +1344,19 @@ declare module "@polkadot/types/lookup" { readonly asyncBackingParams: PolkadotPrimitivesV7AsyncBackingAsyncBackingParams; } - /** @name PolkadotPrimitivesV7AsyncBackingAsyncBackingParams (123) */ + /** @name PolkadotPrimitivesV7AsyncBackingAsyncBackingParams (122) */ interface PolkadotPrimitivesV7AsyncBackingAsyncBackingParams extends Struct { readonly maxCandidateDepth: u32; readonly allowedAncestryLen: u32; } - /** @name PolkadotCorePrimitivesOutboundHrmpMessage (129) */ + /** @name PolkadotCorePrimitivesOutboundHrmpMessage (128) */ interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct { readonly recipient: u32; readonly data: Bytes; } - /** @name CumulusPalletParachainSystemCall (131) */ + /** @name CumulusPalletParachainSystemCall (130) */ interface CumulusPalletParachainSystemCall extends Enum { readonly isSetValidationData: boolean; readonly asSetValidationData: { @@ -1386,7 +1378,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SetValidationData" | "SudoSendUpwardMessage" | "AuthorizeUpgrade" | "EnactAuthorizedUpgrade"; } - /** @name CumulusPrimitivesParachainInherentParachainInherentData (132) */ + /** @name CumulusPrimitivesParachainInherentParachainInherentData (131) */ interface CumulusPrimitivesParachainInherentParachainInherentData extends Struct { readonly validationData: PolkadotPrimitivesV7PersistedValidationData; readonly relayChainState: SpTrieStorageProof; @@ -1394,19 +1386,19 @@ declare module "@polkadot/types/lookup" { readonly horizontalMessages: BTreeMap>; } - /** @name PolkadotCorePrimitivesInboundDownwardMessage (134) */ + /** @name PolkadotCorePrimitivesInboundDownwardMessage (133) */ interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct { readonly sentAt: u32; readonly msg: Bytes; } - /** @name PolkadotCorePrimitivesInboundHrmpMessage (137) */ + /** @name PolkadotCorePrimitivesInboundHrmpMessage (136) */ interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct { readonly sentAt: u32; readonly data: Bytes; } - /** @name CumulusPalletParachainSystemError (140) */ + /** @name CumulusPalletParachainSystemError (139) */ interface CumulusPalletParachainSystemError extends Enum { readonly isOverlappingUpgrades: boolean; readonly isProhibitedByPolkadot: boolean; @@ -1427,7 +1419,7 @@ declare module "@polkadot/types/lookup" { | "Unauthorized"; } - /** @name PalletTimestampCall (141) */ + /** @name PalletTimestampCall (140) */ interface PalletTimestampCall extends Enum { readonly isSet: boolean; readonly asSet: { @@ -1436,10 +1428,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Set"; } - /** @name StagingParachainInfoCall (142) */ + /** @name StagingParachainInfoCall (141) */ type StagingParachainInfoCall = Null; - /** @name PalletSudoCall (143) */ + /** @name PalletSudoCall (142) */ interface PalletSudoCall extends Enum { readonly isSudo: boolean; readonly asSudo: { @@ -1463,7 +1455,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Sudo" | "SudoUncheckedWeight" | "SetKey" | "SudoAs" | "RemoveKey"; } - /** @name PalletUtilityCall (145) */ + /** @name PalletUtilityCall (144) */ interface PalletUtilityCall extends Enum { readonly isBatch: boolean; readonly asBatch: { @@ -1495,7 +1487,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Batch" | "AsDerivative" | "BatchAll" | "DispatchAs" | "ForceBatch" | "WithWeight"; } - /** @name FlashboxRuntimeOriginCaller (147) */ + /** @name FlashboxRuntimeOriginCaller (146) */ interface FlashboxRuntimeOriginCaller extends Enum { readonly isSystem: boolean; readonly asSystem: FrameSupportDispatchRawOrigin; @@ -1503,7 +1495,7 @@ declare module "@polkadot/types/lookup" { readonly type: "System" | "Void"; } - /** @name FrameSupportDispatchRawOrigin (148) */ + /** @name FrameSupportDispatchRawOrigin (147) */ interface FrameSupportDispatchRawOrigin extends Enum { readonly isRoot: boolean; readonly isSigned: boolean; @@ -1512,10 +1504,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Root" | "Signed" | "None"; } - /** @name SpCoreVoid (149) */ + /** @name SpCoreVoid (148) */ type SpCoreVoid = Null; - /** @name PalletProxyCall (150) */ + /** @name PalletProxyCall (149) */ interface PalletProxyCall extends Enum { readonly isProxy: boolean; readonly asProxy: { @@ -1585,14 +1577,14 @@ declare module "@polkadot/types/lookup" { | "ProxyAnnounced"; } - /** @name PalletMaintenanceModeCall (155) */ + /** @name PalletMaintenanceModeCall (154) */ interface PalletMaintenanceModeCall extends Enum { readonly isEnterMaintenanceMode: boolean; readonly isResumeNormalOperation: boolean; readonly type: "EnterMaintenanceMode" | "ResumeNormalOperation"; } - /** @name PalletTxPauseCall (156) */ + /** @name PalletTxPauseCall (155) */ interface PalletTxPauseCall extends Enum { readonly isPause: boolean; readonly asPause: { @@ -1605,7 +1597,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Pause" | "Unpause"; } - /** @name PalletBalancesCall (157) */ + /** @name PalletBalancesCall (156) */ interface PalletBalancesCall extends Enum { readonly isTransferAllowDeath: boolean; readonly asTransferAllowDeath: { From 777c053f36e4947452d39673af5e4cda827530f1 Mon Sep 17 00:00:00 2001 From: girazoki Date: Thu, 17 Oct 2024 17:37:57 +0200 Subject: [PATCH 06/82] first version stored --- Cargo.lock | 37 ++ pallets/external-validator-info/Cargo.toml | 106 ++++++ pallets/external-validator-info/src/lib.rs | 373 +++++++++++++++++++++ 3 files changed, 516 insertions(+) create mode 100644 pallets/external-validator-info/Cargo.toml create mode 100644 pallets/external-validator-info/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 0a1cdf691..eaac398b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9347,6 +9347,43 @@ dependencies = [ "xcm-primitives", ] +[[package]] +name = "pallet-external-validator-info" +version = "0.1.0" +dependencies = [ + "bounded-collections 0.1.9", + "cumulus-pallet-parachain-system", + "cumulus-primitives-core", + "dp-core", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex", + "hex-literal 0.3.4", + "log", + "nimbus-primitives", + "pallet-session", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-primitives", + "scale-info", + "serde", + "sp-consensus-aura", + "sp-core", + "sp-externalities", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-state-machine", + "sp-std", + "sp-trie", + "sp-version", + "test-relay-sproof-builder", + "tp-author-noting-inherent", + "tp-traits", +] + [[package]] name = "pallet-fast-unstake" version = "36.0.0" diff --git a/pallets/external-validator-info/Cargo.toml b/pallets/external-validator-info/Cargo.toml new file mode 100644 index 000000000..9ab595797 --- /dev/null +++ b/pallets/external-validator-info/Cargo.toml @@ -0,0 +1,106 @@ +[package] +name = "pallet-external-validator-info" +authors = { workspace = true } +description = "External validator info pallet" +edition = "2021" +license = "GPL-3.0-only" +version = "0.1.0" + +[package.metadata.docs.rs] +targets = [ "x86_64-unknown-linux-gnu" ] + +[lints] +workspace = true + +[dependencies] +frame-benchmarking = { workspace = true, optional = true } +frame-support = { workspace = true } +frame-system = { workspace = true } +hex = { workspace = true, optional = true, features = [ "alloc" ] } +log = { workspace = true } +parity-scale-codec = { workspace = true, features = [ "derive", "max-encoded-len" ] } +pallet-session = { workspace = true } + +scale-info = { workspace = true } +serde = { workspace = true, features = [ "derive" ] } +sp-consensus-aura = { workspace = true } +sp-core = { workspace = true } +sp-inherents = { workspace = true } +sp-runtime = { workspace = true } +sp-state-machine = { workspace = true } +sp-std = { workspace = true } +sp-trie = { workspace = true } +sp-staking = { workspace = true } +cumulus-pallet-parachain-system = { workspace = true } +cumulus-primitives-core = { workspace = true } +dp-core = { workspace = true } +nimbus-primitives = { workspace = true } +tp-author-noting-inherent = { workspace = true } +tp-traits = { workspace = true } + +[dev-dependencies] +bounded-collections = { workspace = true } +hex-literal = { workspace = true } +polkadot-parachain-primitives = { workspace = true } +polkadot-primitives = { workspace = true } +sp-externalities = { workspace = true } +sp-io = { workspace = true } +sp-state-machine = { workspace = true } +sp-version = { workspace = true } +test-relay-sproof-builder = { workspace = true } + +[features] +default = [ "std" ] +std = [ + "bounded-collections/std", + "cumulus-pallet-parachain-system/std", + "cumulus-primitives-core/std", + "cumulus-primitives-core/std", + "dp-core/std", + "frame-benchmarking/std", + "frame-support/std", + "frame-system/std", + "hex", + "hex?/std", + "log/std", + "nimbus-primitives/std", + "parity-scale-codec/std", + "polkadot-parachain-primitives/std", + "polkadot-primitives/std", + "scale-info/std", + "serde/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-externalities/std", + "sp-inherents/std", + "sp-io/std", + "sp-runtime/std", + "sp-state-machine/std", + "sp-std/std", + "sp-trie/std", + "sp-version/std", + "test-relay-sproof-builder/std", + "tp-author-noting-inherent/std", + "tp-traits/std", +] +runtime-benchmarks = [ + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", + "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "hex", + "nimbus-primitives/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "polkadot-primitives/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "tp-traits/runtime-benchmarks", +] +try-runtime = [ + "cumulus-pallet-parachain-system/try-runtime", + "frame-support/try-runtime", + "frame-system/try-runtime", + "nimbus-primitives/try-runtime", + "sp-runtime/try-runtime", +] diff --git a/pallets/external-validator-info/src/lib.rs b/pallets/external-validator-info/src/lib.rs new file mode 100644 index 000000000..66a6f0d7d --- /dev/null +++ b/pallets/external-validator-info/src/lib.rs @@ -0,0 +1,373 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + +//! # Author Noting Pallet +//! +//! This pallet notes the author of the different containerChains that have registered: +//! +//! The set of container chains is retrieved thanks to the GetContainerChains trait +//! For each containerChain, we inspect the Header stored in the relayChain as +//! a generic header. This is the first requirement for containerChains. +//! +//! The second requirement is that an Aura digest with the slot number for the containerChains +//! needs to exist +//! +//! Using those two requirements we can select who the author was based on the collators assigned +//! to that containerChain, by simply assigning the slot position. + +#![cfg_attr(not(feature = "std"), no_std)] + +use { + cumulus_pallet_parachain_system::RelaychainStateProvider, + cumulus_primitives_core::{ + relay_chain::{BlakeTwo256, BlockNumber, HeadData}, + ParaId, + }, + dp_core::well_known_keys::PARAS_HEADS_INDEX, + frame_support::{dispatch::PostDispatchInfo, pallet_prelude::*, Hashable}, + frame_system::pallet_prelude::*, + log::log, + nimbus_primitives::SlotBeacon, + parity_scale_codec::FullCodec, + parity_scale_codec::{Decode, Encode}, + sp_consensus_aura::{inherents::InherentType, Slot, AURA_ENGINE_ID}, + sp_inherents::{InherentIdentifier, IsFatalError}, + sp_runtime::traits::{CheckedAdd, Convert, Debug, One, Zero}, + sp_runtime::Perbill, + sp_runtime::{traits::Header, DigestItem, DispatchResult, RuntimeString}, + sp_staking::{ + offence::{OffenceDetails, OnOffenceHandler}, + EraIndex, Exposure, SessionIndex, + }, + tp_author_noting_inherent::INHERENT_IDENTIFIER, + tp_traits::{ + AuthorNotingHook, ContainerChainBlockInfo, GenericStateProof, GenericStorageReader, + GetContainerChainAuthor, GetCurrentContainerChains, LatestAuthorInfoFetcher, + NativeStorageReader, ReadEntryErr, + }, +}; + +pub use pallet::*; + +/// Information regarding the active era (era in used in session). +#[derive(Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +pub struct ActiveEraInfo { + /// Index of era. + pub index: EraIndex, + /// Moment of start expressed as millisecond from `$UNIX_EPOCH`. + /// + /// Start can be none if start hasn't been set for the era yet, + /// Start is set on the first on_finalize of the era to guarantee usage of `Time`. + pub start: Option, +} + +#[frame_support::pallet] +pub mod pallet { + use super::*; + + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + /// Removed author data + SlashReported { + validator: T::ValidatorId, + fraction: Perbill, + slash_era: EraIndex, + }, + } + + #[pallet::config] + pub trait Config: frame_system::Config { + /// The overarching event type. + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + + /// A stable ID for a validator. + type ValidatorId: Member + + Parameter + + MaybeSerializeDeserialize + + MaxEncodedLen + + TryFrom; + + /// A conversion from account ID to validator ID. + /// + /// Its cost must be at most one storage read. + type ValidatorIdOf: Convert>; + + /// Number of eras that slashes are deferred by, after computation. + /// + /// This should be less than the bonding duration. Set to 0 if slashes + /// should be applied immediately, without opportunity for intervention. + #[pallet::constant] + type SlashDeferDuration: Get; + + /// Number of eras that staked funds must remain bonded for. + #[pallet::constant] + type BondingDuration: Get; + + type SlashId: Default + + FullCodec + + TypeInfo + + Copy + + Clone + + Debug + + Eq + + CheckedAdd + + One + + Ord + + MaxEncodedLen; + } + + #[pallet::error] + pub enum Error { + /// The new value for a configuration parameter is invalid. + FailedReading, + FailedDecodingHeader, + AuraDigestFirstItem, + AsPreRuntimeError, + NonDecodableSlot, + AuthorNotFound, + NonAuraDigest, + } + + #[pallet::pallet] + pub struct Pallet(PhantomData); + + /// All slashing events on validators, mapped by era to the highest slash proportion + /// and slash value of the era. + #[pallet::storage] + pub(crate) type ValidatorSlashInEra = + StorageDoubleMap<_, Twox64Concat, EraIndex, Twox64Concat, T::AccountId, Perbill>; + + /// A mapping from still-bonded eras to the first session index of that era. + /// + /// Must contains information for eras for the range: + /// `[active_era - bounding_duration; active_era]` + #[pallet::storage] + #[pallet::unbounded] + pub(crate) type BondedEras = + StorageValue<_, Vec<(EraIndex, SessionIndex)>, ValueQuery>; + + #[pallet::storage] + pub type NextSlashId = StorageValue<_, T::SlashId, ValueQuery>; + + /// All unapplied slashes that are queued for later. + #[pallet::storage] + #[pallet::unbounded] + pub type Slashes = + StorageMap<_, Twox64Concat, EraIndex, Vec>, ValueQuery>; + + /// The session index at which the era start for the last [`Config::HistoryDepth`] eras. + /// + /// Note: This tracks the starting session (i.e. session index when era start being active) + /// for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`. + #[pallet::storage] + #[pallet::getter(fn eras_start_session_index)] + pub type ErasStartSessionIndex = StorageMap<_, Twox64Concat, EraIndex, SessionIndex>; + + /// Any validators that may never be slashed or forcibly kicked. It's a Vec since they're + /// easy to initialize and the performance hit is minimal (we expect no more than four + /// invulnerables) and restricted to testnets. + #[pallet::storage] + #[pallet::getter(fn invulnerables)] + #[pallet::unbounded] + pub type Invulnerables = StorageValue<_, Vec, ValueQuery>; + + /// The active era information, it holds index and start. + /// + /// The active era is the era being currently rewarded. Validator set of this era must be + /// equal to [`SessionInterface::validators`]. + #[pallet::storage] + #[pallet::getter(fn active_era)] + pub type ActiveEra = StorageValue<_, ActiveEraInfo>; +} + +/// This is intended to be used with `FilterHistoricalOffences`. +impl + OnOffenceHandler, Weight> + for Pallet +where + T: Config::AccountId>, + T: pallet_session::Config::AccountId>, + T: pallet_session::historical::Config, + T::SessionHandler: pallet_session::SessionHandler<::AccountId>, + T::SessionManager: pallet_session::SessionManager<::AccountId>, + ::ValidatorIdOf: Convert< + ::AccountId, + Option<::AccountId>, + >, +{ + fn on_offence( + offenders: &[OffenceDetails< + T::AccountId, + pallet_session::historical::IdentificationTuple, + >], + slash_fraction: &[Perbill], + slash_session: SessionIndex, + ) -> Weight { + let mut consumed_weight = Weight::from_parts(0, 0); + let mut add_db_reads_writes = |reads, writes| { + consumed_weight += T::DbWeight::get().reads_writes(reads, writes); + }; + + let active_era = { + let active_era = Self::active_era(); + add_db_reads_writes(1, 0); + if active_era.is_none() { + // This offence need not be re-submitted. + return consumed_weight; + } + active_era + .expect("value checked not to be `None`; qed") + .index + }; + let active_era_start_session_index = Self::eras_start_session_index(active_era) + .unwrap_or_else(|| { + frame_support::print("Error: start_session_index must be set for current_era"); + 0 + }); + add_db_reads_writes(1, 0); + + let window_start = active_era.saturating_sub(T::BondingDuration::get()); + + // Fast path for active-era report - most likely. + // `slash_session` cannot be in a future active era. It must be in `active_era` or before. + let slash_era = if slash_session >= active_era_start_session_index { + active_era + } else { + let eras = BondedEras::::get(); + add_db_reads_writes(1, 0); + + // Reverse because it's more likely to find reports from recent eras. + match eras.iter().rev().find(|&(_, sesh)| sesh <= &slash_session) { + Some((slash_era, _)) => *slash_era, + // Before bonding period. defensive - should be filtered out. + None => return consumed_weight, + } + }; + + add_db_reads_writes(1, 1); + + let slash_defer_duration = T::SlashDeferDuration::get(); + + let invulnerables = Self::invulnerables(); + add_db_reads_writes(1, 0); + + let mut next_slash_id = NextSlashId::::get(); + + for (details, slash_fraction) in offenders.iter().zip(slash_fraction) { + let (stash, _) = &details.offender; + + // Skip if the validator is invulnerable. + if invulnerables.contains(stash) { + continue; + } + + //TODO + let slash = compute_slash::( + slash_fraction.clone(), + next_slash_id, + slash_era, + stash.clone(), + ); + + Self::deposit_event(Event::::SlashReported { + validator: stash.clone(), + fraction: *slash_fraction, + slash_era, + }); + + if let Some(mut slash) = slash { + slash.reporters = details.reporters.clone(); + if slash_defer_duration == 0 { + } else { + // Defer to end of some `slash_defer_duration` from now. + log!( + log::Level::Debug, + "deferring slash of {:?}% happened in {:?} (reported in {:?}) to {:?}", + slash_fraction, + slash_era, + active_era, + slash_era + slash_defer_duration + 1, + ); + Slashes::::mutate( + slash_era + .saturating_add(slash_defer_duration) + .saturating_add(One::one()), + move |for_later| for_later.push(slash), + ); + + // Fix unwrap + next_slash_id = next_slash_id.checked_add(&One::one()).unwrap(); + add_db_reads_writes(1, 1); + } + } else { + add_db_reads_writes(4 /* fetch_spans */, 5 /* kick_out_if_recent */) + } + } + NextSlashId::::put(next_slash_id); + consumed_weight + } +} + +/// A pending slash record. The value of the slash has been computed but not applied yet, +/// rather deferred for several eras. +#[derive(Encode, Decode, RuntimeDebug, TypeInfo)] +pub struct Slash { + /// The stash ID of the offending validator. + validator: AccountId, + /// Reporters of the offence; bounty payout recipients. + reporters: Vec, + /// The amount of payout. + slash_id: SlashId, + percentage: Perbill, +} + +/// Computes a slash of a validator and nominators. It returns an unapplied +/// record to be applied at some later point. Slashing metadata is updated in storage, +/// since unapplied records are only rarely intended to be dropped. +/// +/// The pending slash record returned does not have initialized reporters. Those have +/// to be set at a higher level, if any. +pub(crate) fn compute_slash( + slash_fraction: Perbill, + slash_id: T::SlashId, + slash_era: EraIndex, + stash: T::AccountId, +) -> Option> { + let prior_slash_p = ValidatorSlashInEra::::get(&slash_era, &stash).unwrap_or(Zero::zero()); + + // compare slash proportions rather than slash values to avoid issues due to rounding + // error. + if slash_fraction.deconstruct() > prior_slash_p.deconstruct() { + ValidatorSlashInEra::::insert(&slash_era, &stash, &slash_fraction); + } else { + // we slash based on the max in era - this new event is not the max, + // so neither the validator or any nominators will need an update. + // + // this does lead to a divergence of our system from the paper, which + // pays out some reward even if the latest report is not max-in-era. + // we opt to avoid the nominator lookups and edits and leave more rewards + // for more drastic misbehavior. + return None; + } + + Some(Slash { + validator: stash.clone(), + percentage: slash_fraction, + slash_id, + reporters: Vec::new(), + }) +} From b7b4e51fa20ef27070e3cdb24b0a3d611a598fe6 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Fri, 18 Oct 2024 11:01:05 +0200 Subject: [PATCH 07/82] Add traits --- pallets/external-validators/src/lib.rs | 31 +++++++++++++------------- primitives/traits/src/lib.rs | 26 ++++++++++++++++++++- 2 files changed, 41 insertions(+), 16 deletions(-) diff --git a/pallets/external-validators/src/lib.rs b/pallets/external-validators/src/lib.rs index e534fe2f1..70ffc0b8d 100644 --- a/pallets/external-validators/src/lib.rs +++ b/pallets/external-validators/src/lib.rs @@ -33,6 +33,7 @@ use { sp_runtime::{traits::Convert, TokenError}, sp_staking::SessionIndex, sp_std::vec::Vec, + tp_traits::{ActiveEraInfo, EraIndexProvider, InvulnerablesProvider}, }; #[cfg(test)] @@ -145,21 +146,6 @@ pub mod pallet { #[pallet::storage] pub type ActiveEra = StorageValue<_, ActiveEraInfo>; - /// Information regarding the active era (era in used in session). - #[derive(Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] - pub struct ActiveEraInfo { - /// Index of era. - pub index: EraIndex, - /// Moment of start expressed as millisecond from `$UNIX_EPOCH`. - /// - /// Start can be none if start hasn't been set for the era yet, - /// Start is set on the first on_finalize of the era to guarantee usage of `Time`. - pub start: Option, - } - - /// Counter for the number of eras that have passed. - pub type EraIndex = u32; - #[pallet::genesis_config] #[derive(DefaultNoBound)] pub struct GenesisConfig { @@ -432,3 +418,18 @@ impl pallet_session::historical::SessionManager f >::end_session(end_index) } } + +impl EraIndexProvider for Pallet { + fn active_era() -> ActiveEraInfo { + >::get().unwrap_or(ActiveEraInfo { + index: 0, + start: None, + }) + } +} + +impl InvulnerablesProvider for Pallet { + fn invulnerables() -> Vec { + >::get().into() + } +} diff --git a/primitives/traits/src/lib.rs b/primitives/traits/src/lib.rs index f7bbd8f48..5f682a47b 100644 --- a/primitives/traits/src/lib.rs +++ b/primitives/traits/src/lib.rs @@ -37,12 +37,13 @@ use { pallet_prelude::{Decode, DispatchResultWithPostInfo, Encode, Get, MaxEncodedLen, Weight}, BoundedVec, }, + scale_info::TypeInfo, serde::{Deserialize, Serialize}, sp_core::H256, sp_runtime::{ app_crypto::sp_core, traits::{CheckedAdd, CheckedMul}, - ArithmeticError, DispatchResult, Perbill, + ArithmeticError, DispatchResult, Perbill, RuntimeDebug, }, sp_std::{collections::btree_set::BTreeSet, vec::Vec}, }; @@ -450,3 +451,26 @@ impl MaybeSelfChainBlockAuthor for () { None } } + +/// Information regarding the active era (era in used in session). +#[derive(Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] +pub struct ActiveEraInfo { + /// Index of era. + pub index: EraIndex, + /// Moment of start expressed as millisecond from `$UNIX_EPOCH`. + /// + /// Start can be none if start hasn't been set for the era yet, + /// Start is set on the first on_finalize of the era to guarantee usage of `Time`. + pub start: Option, +} + +/// Counter for the number of eras that have passed. +pub type EraIndex = u32; + +pub trait EraIndexProvider { + fn active_era() -> ActiveEraInfo; +} + +pub trait InvulnerablesProvider { + fn invulnerables() -> Vec; +} From 2cacc6fe7375eb803aa7a00179d56b39dadf4ebf Mon Sep 17 00:00:00 2001 From: girazoki Date: Mon, 21 Oct 2024 11:54:44 +0200 Subject: [PATCH 08/82] slowly add stuff --- Cargo.lock | 1 + pallets/external-validator-info/Cargo.toml | 2 + pallets/external-validator-info/src/lib.rs | 122 ++++++++++++++++----- 3 files changed, 100 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eaac398b6..a45a0b804 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9363,6 +9363,7 @@ dependencies = [ "log", "nimbus-primitives", "pallet-session", + "pallet-staking", "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", diff --git a/pallets/external-validator-info/Cargo.toml b/pallets/external-validator-info/Cargo.toml index 9ab595797..ea5ee2596 100644 --- a/pallets/external-validator-info/Cargo.toml +++ b/pallets/external-validator-info/Cargo.toml @@ -20,6 +20,7 @@ hex = { workspace = true, optional = true, features = [ "alloc" ] } log = { workspace = true } parity-scale-codec = { workspace = true, features = [ "derive", "max-encoded-len" ] } pallet-session = { workspace = true } +pallet-staking = { workspace = true } scale-info = { workspace = true } serde = { workspace = true, features = [ "derive" ] } @@ -64,6 +65,7 @@ std = [ "hex?/std", "log/std", "nimbus-primitives/std", + "pallet-staking/std", "parity-scale-codec/std", "polkadot-parachain-primitives/std", "polkadot-primitives/std", diff --git a/pallets/external-validator-info/src/lib.rs b/pallets/external-validator-info/src/lib.rs index 66a6f0d7d..e326d13fb 100644 --- a/pallets/external-validator-info/src/lib.rs +++ b/pallets/external-validator-info/src/lib.rs @@ -37,10 +37,13 @@ use { ParaId, }, dp_core::well_known_keys::PARAS_HEADS_INDEX, - frame_support::{dispatch::PostDispatchInfo, pallet_prelude::*, Hashable}, + frame_support::{ + dispatch::PostDispatchInfo, pallet_prelude::*, traits::DefensiveSaturating, Hashable, + }, frame_system::pallet_prelude::*, log::log, nimbus_primitives::SlotBeacon, + pallet_staking::SessionInterface, parity_scale_codec::FullCodec, parity_scale_codec::{Decode, Encode}, sp_consensus_aura::{inherents::InherentType, Slot, AURA_ENGINE_ID}, @@ -128,6 +131,9 @@ pub mod pallet { + One + Ord + MaxEncodedLen; + + /// Interface for interacting with a session pallet. + type SessionInterface: SessionInterface; } #[pallet::error] @@ -275,12 +281,12 @@ where continue; } - //TODO - let slash = compute_slash::( + let mut slash = compute_slash::( slash_fraction.clone(), next_slash_id, slash_era, stash.clone(), + slash_defer_duration, ); Self::deposit_event(Event::::SlashReported { @@ -291,28 +297,26 @@ where if let Some(mut slash) = slash { slash.reporters = details.reporters.clone(); - if slash_defer_duration == 0 { - } else { - // Defer to end of some `slash_defer_duration` from now. - log!( - log::Level::Debug, - "deferring slash of {:?}% happened in {:?} (reported in {:?}) to {:?}", - slash_fraction, - slash_era, - active_era, - slash_era + slash_defer_duration + 1, - ); - Slashes::::mutate( - slash_era - .saturating_add(slash_defer_duration) - .saturating_add(One::one()), - move |for_later| for_later.push(slash), - ); - - // Fix unwrap - next_slash_id = next_slash_id.checked_add(&One::one()).unwrap(); - add_db_reads_writes(1, 1); - } + + // Defer to end of some `slash_defer_duration` from now. + log!( + log::Level::Debug, + "deferring slash of {:?}% happened in {:?} (reported in {:?}) to {:?}", + slash_fraction, + slash_era, + active_era, + slash_era + slash_defer_duration + 1, + ); + Slashes::::mutate( + slash_era + .saturating_add(slash_defer_duration) + .saturating_add(One::one()), + move |for_later| for_later.push(slash), + ); + + // Fix unwrap + next_slash_id = next_slash_id.checked_add(&One::one()).unwrap(); + add_db_reads_writes(1, 1); } else { add_db_reads_writes(4 /* fetch_spans */, 5 /* kick_out_if_recent */) } @@ -322,6 +326,69 @@ where } } +impl Pallet { + /// Start a new era. It does: + /// * Increment `active_era.index`, + /// * reset `active_era.start`, + /// * update `BondedEras` and apply slashes. + fn start_era(start_session: SessionIndex) { + let active_era = ActiveEra::::mutate(|active_era| { + let new_index = active_era.as_ref().map(|info| info.index + 1).unwrap_or(0); + *active_era = Some(ActiveEraInfo { + index: new_index, + // Set new active era start in next `on_finalize`. To guarantee usage of `Time` + start: None, + }); + new_index + }); + + let bonding_duration = T::BondingDuration::get(); + + BondedEras::::mutate(|bonded| { + bonded.push((active_era, start_session)); + + if active_era > bonding_duration { + let first_kept = active_era.defensive_saturating_sub(bonding_duration); + + // Prune out everything that's from before the first-kept index. + let n_to_prune = bonded + .iter() + .take_while(|&&(era_idx, _)| era_idx < first_kept) + .count(); + + // Kill slashing metadata. + for (pruned_era, _) in bonded.drain(..n_to_prune) { + #[allow(deprecated)] + ValidatorSlashInEra::::remove_prefix(&pruned_era, None); + #[allow(deprecated)] + Slashes::::remove(&pruned_era); + } + + if let Some(&(_, first_session)) = bonded.first() { + T::SessionInterface::prune_historical_up_to(first_session); + } + } + }); + + Self::apply_unapplied_slashes(active_era); + } + + /// Apply previously-unapplied slashes on the beginning of a new era, after a delay. + fn apply_unapplied_slashes(active_era: EraIndex) { + let mut era_slashes = Slashes::::take(&active_era); + log!( + log::Level::Debug, + "found {} slashes scheduled to be confirmed in era {:?}", + era_slashes.len(), + active_era, + ); + for mut slash in &mut era_slashes { + slash.confirmed = true; + } + Slashes::::insert(active_era, &era_slashes); + } +} + /// A pending slash record. The value of the slash has been computed but not applied yet, /// rather deferred for several eras. #[derive(Encode, Decode, RuntimeDebug, TypeInfo)] @@ -333,6 +400,8 @@ pub struct Slash { /// The amount of payout. slash_id: SlashId, percentage: Perbill, + // Whether the slash is confirmed or still needs to go through deferred period + confirmed: bool, } /// Computes a slash of a validator and nominators. It returns an unapplied @@ -346,6 +415,7 @@ pub(crate) fn compute_slash( slash_id: T::SlashId, slash_era: EraIndex, stash: T::AccountId, + slash_defer_duration: EraIndex, ) -> Option> { let prior_slash_p = ValidatorSlashInEra::::get(&slash_era, &stash).unwrap_or(Zero::zero()); @@ -364,10 +434,12 @@ pub(crate) fn compute_slash( return None; } + let confirmed = slash_defer_duration.is_zero(); Some(Slash { validator: stash.clone(), percentage: slash_fraction, slash_id, reporters: Vec::new(), + confirmed, }) } From 06ac9457e96809c57941bc204ad79ad8b2d90a69 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 21 Oct 2024 13:41:31 +0200 Subject: [PATCH 09/82] Some PR comments --- pallets/external-validators/src/lib.rs | 82 +++++++----------------- pallets/external-validators/src/tests.rs | 14 ++++ primitives/traits/src/lib.rs | 4 +- 3 files changed, 38 insertions(+), 62 deletions(-) diff --git a/pallets/external-validators/src/lib.rs b/pallets/external-validators/src/lib.rs index 70ffc0b8d..8d24a0fad 100644 --- a/pallets/external-validators/src/lib.rs +++ b/pallets/external-validators/src/lib.rs @@ -26,14 +26,14 @@ #![cfg_attr(not(feature = "std"), no_std)] -use frame_support::dispatch::DispatchClass; pub use pallet::*; use { - core::marker::PhantomData, - sp_runtime::{traits::Convert, TokenError}, + frame_support::{dispatch::DispatchClass, pallet_prelude::Weight}, + sp_runtime::traits::Convert, + sp_runtime::traits::Get, sp_staking::SessionIndex, sp_std::vec::Vec, - tp_traits::{ActiveEraInfo, EraIndexProvider, InvulnerablesProvider}, + tp_traits::{ActiveEraInfo, EraIndexProvider, ValidatorProvider}, }; #[cfg(test)] @@ -128,21 +128,21 @@ pub mod pallet { #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); - /// The invulnerable, permissioned collators. This list must be sorted. + /// Fixed validators set by root/governance. Have priority over the external validators. #[pallet::storage] pub type WhitelistedValidators = StorageValue<_, BoundedVec, ValueQuery>; - /// The invulnerable, permissioned collators. This list must be sorted. + /// Validators set using storage proofs from another blockchain. Ignored if `SkipExternalValidators` is true. #[pallet::storage] pub type ExternalValidators = StorageValue<_, BoundedVec, ValueQuery>; - /// The invulnerable, permissioned collators. This list must be sorted. + /// Allow to disable external validators. #[pallet::storage] pub type SkipExternalValidators = StorageValue<_, bool, ValueQuery>; - /// The invulnerable, permissioned collators. This list must be sorted. + /// The active era information, it holds index and start. #[pallet::storage] pub type ActiveEra = StorageValue<_, ActiveEraInfo>; @@ -310,6 +310,16 @@ pub mod pallet { pub fn whitelisted_validators() -> Vec { >::get().into() } + + pub fn validators() -> Vec { + let mut validators: Vec<_> = WhitelistedValidators::::get().into(); + + if !SkipExternalValidators::::get() { + validators.extend(ExternalValidators::::get()) + } + + validators + } } #[pallet::hooks] @@ -335,61 +345,13 @@ pub mod pallet { } } -/// If the rewarded account is an Invulnerable, distribute the entire reward -/// amount to them. Otherwise use the `Fallback` distribution. -pub struct InvulnerableRewardDistribution( - PhantomData<(Runtime, Currency, Fallback)>, -); - -use {frame_support::pallet_prelude::Weight, sp_runtime::traits::Get}; - -type CreditOf = - frame_support::traits::fungible::Credit<::AccountId, Currency>; -pub type AccountIdOf = ::AccountId; - -impl - tp_traits::DistributeRewards, CreditOf> - for InvulnerableRewardDistribution -where - Runtime: frame_system::Config + Config, - Fallback: tp_traits::DistributeRewards, CreditOf>, - Currency: frame_support::traits::fungible::Balanced>, -{ - fn distribute_rewards( - rewarded: AccountIdOf, - amount: CreditOf, - ) -> frame_support::pallet_prelude::DispatchResultWithPostInfo { - let mut total_weight = Weight::zero(); - let collator_id = Runtime::ValidatorIdOf::convert(rewarded.clone()) - .ok_or(Error::::UnableToDeriveCollatorId)?; - // weight to read invulnerables - total_weight += Runtime::DbWeight::get().reads(1); - if !WhitelistedValidators::::get().contains(&collator_id) { - let post_info = Fallback::distribute_rewards(rewarded, amount)?; - if let Some(weight) = post_info.actual_weight { - total_weight += weight; - } - } else { - Currency::resolve(&rewarded, amount).map_err(|_| TokenError::NotExpendable)?; - total_weight += Runtime::WeightInfo::reward_validator( - Runtime::MaxWhitelistedValidators::get() + Runtime::MaxExternalValidators::get(), - ) - } - Ok(Some(total_weight).into()) - } -} - impl pallet_session::SessionManager for Pallet { fn new_session(new_index: SessionIndex) -> Option> { if new_index <= 1 { return None; } - let mut validators: Vec<_> = WhitelistedValidators::::get().into(); - - if !SkipExternalValidators::::get() { - validators.extend(ExternalValidators::::get()) - } + let validators: Vec<_> = Self::validators(); frame_system::Pallet::::register_extra_weight_unchecked( T::WeightInfo::new_session(validators.len() as u32), @@ -428,8 +390,8 @@ impl EraIndexProvider for Pallet { } } -impl InvulnerablesProvider for Pallet { - fn invulnerables() -> Vec { - >::get().into() +impl ValidatorProvider for Pallet { + fn validators() -> Vec { + Self::validators() } } diff --git a/pallets/external-validators/src/tests.rs b/pallets/external-validators/src/tests.rs index 1b45076dd..83ca20f0c 100644 --- a/pallets/external-validators/src/tests.rs +++ b/pallets/external-validators/src/tests.rs @@ -24,6 +24,7 @@ use { }, frame_support::{assert_noop, assert_ok}, sp_runtime::traits::BadOrigin, + tp_traits::ValidatorProvider, }; #[test] @@ -166,6 +167,19 @@ fn whitelisted_and_external_order() { }); } +#[test] +fn validator_provider_returns_all_validators() { + new_test_ext().execute_with(|| { + initialize_to_block(1); + assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); + assert_ok!(ExternalValidators::set_external_validators(vec![50, 51])); + + let validators_new_session = ExternalValidators::new_session(2); + let validators_provider = >::validators(); + assert_eq!(validators_new_session, Some(validators_provider)); + }); +} + #[test] fn can_skip_external_validators() { new_test_ext().execute_with(|| { diff --git a/primitives/traits/src/lib.rs b/primitives/traits/src/lib.rs index 5f682a47b..1385f609e 100644 --- a/primitives/traits/src/lib.rs +++ b/primitives/traits/src/lib.rs @@ -471,6 +471,6 @@ pub trait EraIndexProvider { fn active_era() -> ActiveEraInfo; } -pub trait InvulnerablesProvider { - fn invulnerables() -> Vec; +pub trait ValidatorProvider { + fn validators() -> Vec; } From 6edc6f4dd436a123f449656433bf60c8f16082f7 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 21 Oct 2024 18:18:13 +0200 Subject: [PATCH 10/82] Change era every n sessions --- pallets/external-validators/src/lib.rs | 145 +++++++++++++++++++++- pallets/external-validators/src/mock.rs | 5 + pallets/external-validators/src/tests.rs | 28 +++++ solo-chains/runtime/dancelight/src/lib.rs | 6 +- 4 files changed, 176 insertions(+), 8 deletions(-) diff --git a/pallets/external-validators/src/lib.rs b/pallets/external-validators/src/lib.rs index 8d24a0fad..395cfd6b7 100644 --- a/pallets/external-validators/src/lib.rs +++ b/pallets/external-validators/src/lib.rs @@ -23,14 +23,19 @@ //! - WhitelistedValidators: Fixed validators set by root/governance. Have priority over the external validators. //! - ExternalValidators: Validators set using storage proofs from another blockchain. Changing them triggers a //! new era. Can be disabled by setting `SkipExternalValidators` to true. +//! +//! Validators only change once per era. By default the era changes after a fixed number of sessions, but that can +//! be changed by root/governance to increase era on every session, or to never change. #![cfg_attr(not(feature = "std"), no_std)] pub use pallet::*; use { frame_support::{dispatch::DispatchClass, pallet_prelude::Weight}, - sp_runtime::traits::Convert, + parity_scale_codec::{Decode, Encode, MaxEncodedLen}, + scale_info::TypeInfo, sp_runtime::traits::Get, + sp_runtime::RuntimeDebug, sp_staking::SessionIndex, sp_std::vec::Vec, tp_traits::{ActiveEraInfo, EraIndexProvider, ValidatorProvider}, @@ -116,6 +121,10 @@ pub mod pallet { /// genesis is not used. type UnixTime: UnixTime; + /// Number of sessions per era. + #[pallet::constant] + type SessionsPerEra: Get; + /// The weight information of this pallet. type WeightInfo: WeightInfo; @@ -146,6 +155,14 @@ pub mod pallet { #[pallet::storage] pub type ActiveEra = StorageValue<_, ActiveEraInfo>; + /// Session index at the start of this era. Used to know when to start the next era. + #[pallet::storage] + pub type EraSessionStart = StorageValue<_, u32, ValueQuery>; + + /// Mode of era forcing. + #[pallet::storage] + pub type ForceEra = StorageValue<_, Forcing, ValueQuery>; + #[pallet::genesis_config] #[derive(DefaultNoBound)] pub struct GenesisConfig { @@ -183,6 +200,8 @@ pub mod pallet { WhitelistedValidatorAdded { account_id: T::AccountId }, /// An Invulnerable was removed. WhitelistedValidatorRemoved { account_id: T::AccountId }, + /// A new force era mode was set. + ForceEra { mode: Forcing }, } #[pallet::error] @@ -277,6 +296,69 @@ pub mod pallet { Self::deposit_event(Event::WhitelistedValidatorRemoved { account_id: who }); Ok(()) } + + /// Force there to be no new eras indefinitely. + /// + /// The dispatch origin must be Root. + /// + /// # Warning + /// + /// The election process starts multiple blocks before the end of the era. + /// Thus the election process may be ongoing when this is called. In this case the + /// election will continue until the next era is triggered. + /// + /// ## Complexity + /// - No arguments. + /// - Weight: O(1) + #[pallet::call_index(12)] + //#[pallet::weight(T::WeightInfo::force_no_eras())] + #[pallet::weight(0)] + pub fn force_no_eras(origin: OriginFor) -> DispatchResult { + T::UpdateOrigin::ensure_origin(origin)?; + Self::set_force_era(Forcing::ForceNone); + Ok(()) + } + + /// Force there to be a new era at the end of the next session. After this, it will be + /// reset to normal (non-forced) behaviour. + /// + /// The dispatch origin must be Root. + /// + /// # Warning + /// + /// The election process starts multiple blocks before the end of the era. + /// If this is called just before a new era is triggered, the election process may not + /// have enough blocks to get a result. + /// + /// ## Complexity + /// - No arguments. + /// - Weight: O(1) + #[pallet::call_index(13)] + //#[pallet::weight(T::WeightInfo::force_new_era())] + #[pallet::weight(0)] + pub fn force_new_era(origin: OriginFor) -> DispatchResult { + T::UpdateOrigin::ensure_origin(origin)?; + Self::set_force_era(Forcing::ForceNew); + Ok(()) + } + + /// Force there to be a new era at the end of sessions indefinitely. + /// + /// The dispatch origin must be Root. + /// + /// # Warning + /// + /// The election process starts multiple blocks before the end of the era. + /// If this is called just before a new era is triggered, the election process may not + /// have enough blocks to get a result. + #[pallet::call_index(16)] + //#[pallet::weight(T::WeightInfo::force_new_era_always())] + #[pallet::weight(0)] + pub fn force_new_era_always(origin: OriginFor) -> DispatchResult { + T::UpdateOrigin::ensure_origin(origin)?; + Self::set_force_era(Forcing::ForceAlways); + Ok(()) + } } impl Pallet { @@ -285,12 +367,10 @@ pub mod pallet { let validators = BoundedVec::truncate_from(validators); >::put(validators); - Self::increase_era(); - Ok(()) } - fn increase_era() { + pub(crate) fn increase_era(new_index: SessionIndex) { // Increase era >::mutate(|q| { if q.is_none() { @@ -305,12 +385,24 @@ pub mod pallet { // Set new active era start in next `on_finalize`. To guarantee usage of `Time` q.start = None; }); + >::put(new_index); + } + + /// Helper to set a new `ForceEra` mode. + pub(crate) fn set_force_era(mode: Forcing) { + log::info!("Setting force era mode {:?}.", mode); + ForceEra::::put(mode); + Self::deposit_event(Event::::ForceEra { mode }); } pub fn whitelisted_validators() -> Vec { >::get().into() } + pub fn current_era() -> Option { + >::get().map(|era_info| era_info.index) + } + pub fn validators() -> Vec { let mut validators: Vec<_> = WhitelistedValidators::::get().into(); @@ -351,6 +443,35 @@ impl pallet_session::SessionManager for Pallet { return None; } + let new_era = match >::get() { + Forcing::NotForcing => { + // If enough sessions have elapsed, start new era + let start_session = >::get(); + let current_session = new_index; + + if current_session.saturating_sub(start_session) >= T::SessionsPerEra::get() { + true + } else { + false + } + } + Forcing::ForceNew => { + // Only force once + >::put(Forcing::NotForcing); + + true + } + Forcing::ForceNone => false, + Forcing::ForceAlways => true, + }; + + if !new_era { + // If not starting a new era, keep the previous validators + return None; + } + + Self::increase_era(new_index); + let validators: Vec<_> = Self::validators(); frame_system::Pallet::::register_extra_weight_unchecked( @@ -395,3 +516,19 @@ impl ValidatorProvider for Pallet { Self::validators() } } + +/// Mode of era-forcing. +#[derive( + Copy, Clone, PartialEq, Eq, Default, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen, +)] +pub enum Forcing { + /// Not forcing anything - just let whatever happen. + #[default] + NotForcing, + /// Force a new era, then reset to `NotForcing` as soon as it is done. + ForceNew, + /// Avoid a new era indefinitely. + ForceNone, + /// Force a new era at the end of all sessions indefinitely. + ForceAlways, +} diff --git a/pallets/external-validators/src/mock.rs b/pallets/external-validators/src/mock.rs index adbbb7c9f..ad56b0a88 100644 --- a/pallets/external-validators/src/mock.rs +++ b/pallets/external-validators/src/mock.rs @@ -121,6 +121,10 @@ impl ValidatorRegistration for IsRegistered { } } +parameter_types! { + pub const SessionsPerEra: SessionIndex = 6; +} + impl Config for Test { type RuntimeEvent = RuntimeEvent; type UpdateOrigin = EnsureSignedBy; @@ -130,6 +134,7 @@ impl Config for Test { type ValidatorIdOf = IdentityCollator; type ValidatorRegistration = IsRegistered; type UnixTime = Timestamp; + type SessionsPerEra = SessionsPerEra; type WeightInfo = (); #[cfg(feature = "runtime-benchmarks")] type Currency = Balances; diff --git a/pallets/external-validators/src/tests.rs b/pallets/external-validators/src/tests.rs index 83ca20f0c..5d42ebf2f 100644 --- a/pallets/external-validators/src/tests.rs +++ b/pallets/external-validators/src/tests.rs @@ -167,6 +167,34 @@ fn whitelisted_and_external_order() { }); } +#[test] +fn new_session_returns_validators_every_era() { + new_test_ext().execute_with(|| { + initialize_to_block(1); + assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); + assert_ok!(ExternalValidators::set_external_validators(vec![50, 51])); + + // 1 era = 6 sessions + // Returns None until block 6, which is the start of era 1 + for session in 2..=5 { + let validators = ExternalValidators::new_session(session); + assert_eq!(validators, None, "{}", session); + } + + let validators = ExternalValidators::new_session(6); + assert_eq!(validators, Some(vec![1, 2, 50, 51])); + + // Returns None until block 12, which is the start of era 2 + for session in 7..=11 { + let validators = ExternalValidators::new_session(session); + assert_eq!(validators, None, "{}", session); + } + + let validators = ExternalValidators::new_session(12); + assert_eq!(validators, Some(vec![1, 2, 50, 51])); + }); +} + #[test] fn validator_provider_returns_all_validators() { new_test_ext().execute_with(|| { diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index 08602bff7..caf396330 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -487,7 +487,6 @@ impl pallet_session::historical::Config for Runtime { } parameter_types! { - pub const SessionsPerEra: SessionIndex = 6; pub const BondingDuration: sp_staking::EraIndex = 28; } @@ -1188,9 +1187,7 @@ impl pallet_beefy_mmr::Config for Runtime { impl paras_sudo_wrapper::Config for Runtime {} parameter_types! { - pub const PermanentSlotLeasePeriodLength: u32 = 365; - pub const TemporarySlotLeasePeriodLength: u32 = 5; - pub const MaxTemporarySlotPerLeasePeriod: u32 = 5; + pub const SessionsPerEra: SessionIndex = runtime_common::prod_or_fast!(6, 3); } impl pallet_external_validators::Config for Runtime { @@ -1202,6 +1199,7 @@ impl pallet_external_validators::Config for Runtime { type ValidatorIdOf = ValidatorIdOf; type ValidatorRegistration = Session; type UnixTime = Timestamp; + type SessionsPerEra = SessionsPerEra; type WeightInfo = weights::pallet_external_validators::SubstrateWeight; #[cfg(feature = "runtime-benchmarks")] type Currency = Balances; From a37ed40952b42648dd32208eeecb5bfd1b9b3204 Mon Sep 17 00:00:00 2001 From: girazoki Date: Mon, 21 Oct 2024 18:18:43 +0200 Subject: [PATCH 11/82] confirmed and unconfirmed, tests --- pallets/external-validator-info/src/lib.rs | 139 ++++++++++++----- pallets/external-validator-info/src/mock.rs | 102 +++++++++++++ pallets/external-validator-info/src/tests.rs | 151 +++++++++++++++++++ 3 files changed, 354 insertions(+), 38 deletions(-) create mode 100644 pallets/external-validator-info/src/mock.rs create mode 100644 pallets/external-validator-info/src/tests.rs diff --git a/pallets/external-validator-info/src/lib.rs b/pallets/external-validator-info/src/lib.rs index e326d13fb..62a182b15 100644 --- a/pallets/external-validator-info/src/lib.rs +++ b/pallets/external-validator-info/src/lib.rs @@ -31,40 +31,29 @@ #![cfg_attr(not(feature = "std"), no_std)] use { - cumulus_pallet_parachain_system::RelaychainStateProvider, - cumulus_primitives_core::{ - relay_chain::{BlakeTwo256, BlockNumber, HeadData}, - ParaId, - }, - dp_core::well_known_keys::PARAS_HEADS_INDEX, - frame_support::{ - dispatch::PostDispatchInfo, pallet_prelude::*, traits::DefensiveSaturating, Hashable, - }, + frame_support::{pallet_prelude::*, traits::DefensiveSaturating}, frame_system::pallet_prelude::*, log::log, - nimbus_primitives::SlotBeacon, pallet_staking::SessionInterface, parity_scale_codec::FullCodec, parity_scale_codec::{Decode, Encode}, - sp_consensus_aura::{inherents::InherentType, Slot, AURA_ENGINE_ID}, - sp_inherents::{InherentIdentifier, IsFatalError}, - sp_runtime::traits::{CheckedAdd, Convert, Debug, One, Zero}, + sp_runtime::traits::{Convert, Debug, One, Saturating, Zero}, + sp_runtime::DispatchResult, sp_runtime::Perbill, - sp_runtime::{traits::Header, DigestItem, DispatchResult, RuntimeString}, sp_staking::{ offence::{OffenceDetails, OnOffenceHandler}, - EraIndex, Exposure, SessionIndex, - }, - tp_author_noting_inherent::INHERENT_IDENTIFIER, - tp_traits::{ - AuthorNotingHook, ContainerChainBlockInfo, GenericStateProof, GenericStorageReader, - GetContainerChainAuthor, GetCurrentContainerChains, LatestAuthorInfoFetcher, - NativeStorageReader, ReadEntryErr, + EraIndex, SessionIndex, }, }; pub use pallet::*; +#[cfg(test)] +mod mock; + +#[cfg(test)] +mod tests; + /// Information regarding the active era (era in used in session). #[derive(Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] pub struct ActiveEraInfo { @@ -127,7 +116,7 @@ pub mod pallet { + Clone + Debug + Eq - + CheckedAdd + + Saturating + One + Ord + MaxEncodedLen; @@ -138,14 +127,13 @@ pub mod pallet { #[pallet::error] pub enum Error { - /// The new value for a configuration parameter is invalid. - FailedReading, - FailedDecodingHeader, - AuraDigestFirstItem, - AsPreRuntimeError, - NonDecodableSlot, - AuthorNotFound, - NonAuraDigest, + EmptyTargets, + InvalidSlashIndex, + NotSortedAndUnique, + ProvidedFutureEra, + ProvidedNonSlashableEra, + ActiveEraNotSet, + DeferPeriodIsOver, } #[pallet::pallet] @@ -198,6 +186,78 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn active_era)] pub type ActiveEra = StorageValue<_, ActiveEraInfo>; + + #[pallet::call] + impl Pallet { + #[pallet::call_index(0)] + #[pallet::weight(0)] + pub fn cancel_deferred_slash( + origin: OriginFor, + era: EraIndex, + slash_indices: Vec, + ) -> DispatchResult { + ensure_root(origin)?; + + let active_era = Self::active_era().ok_or(Error::::ActiveEraNotSet)?.index; + ensure!( + era >= active_era.saturating_sub(T::SlashDeferDuration::get()), + Error::::DeferPeriodIsOver + ); + + ensure!(!slash_indices.is_empty(), Error::::EmptyTargets); + ensure!( + is_sorted_and_unique(&slash_indices), + Error::::NotSortedAndUnique + ); + + let mut era_slashes = Slashes::::get(&era); + let last_item = slash_indices[slash_indices.len() - 1]; + ensure!( + (last_item as usize) < era_slashes.len(), + Error::::InvalidSlashIndex + ); + + for (removed, index) in slash_indices.into_iter().enumerate() { + let index = (index as usize) - removed; + era_slashes.remove(index); + } + + Slashes::::insert(&era, &era_slashes); + Ok(()) + } + + #[pallet::call_index(1)] + #[pallet::weight(0)] + pub fn force_inject_slash( + origin: OriginFor, + era: EraIndex, + validator: T::AccountId, + percentage: Perbill, + ) -> DispatchResult { + ensure_root(origin)?; + let active_era = Self::active_era().ok_or(Error::::ActiveEraNotSet)?.index; + ensure!(era < active_era, Error::::ProvidedFutureEra); + + let window_start = active_era.saturating_sub(T::BondingDuration::get()); + ensure!(era >= window_start, Error::::ProvidedNonSlashableEra); + + let next_slash_id = NextSlashId::::get(); + + let slash = Slash:: { + slash_id: next_slash_id, + reporters: vec![], + confirmed: false, + + validator, + percentage, + }; + let mut era_slashes = Slashes::::get(&era); + era_slashes.push(slash); + Slashes::::insert(&era, &era_slashes); + NextSlashId::::put(next_slash_id.saturating_add(One::one())); + Ok(()) + } + } } /// This is intended to be used with `FilterHistoricalOffences`. @@ -246,8 +306,6 @@ where }); add_db_reads_writes(1, 0); - let window_start = active_era.saturating_sub(T::BondingDuration::get()); - // Fast path for active-era report - most likely. // `slash_session` cannot be in a future active era. It must be in `active_era` or before. let slash_era = if slash_session >= active_era_start_session_index { @@ -281,7 +339,7 @@ where continue; } - let mut slash = compute_slash::( + let slash = compute_slash::( slash_fraction.clone(), next_slash_id, slash_era, @@ -315,7 +373,7 @@ where ); // Fix unwrap - next_slash_id = next_slash_id.checked_add(&One::one()).unwrap(); + next_slash_id = next_slash_id.saturating_add(One::one()); add_db_reads_writes(1, 1); } else { add_db_reads_writes(4 /* fetch_spans */, 5 /* kick_out_if_recent */) @@ -370,11 +428,11 @@ impl Pallet { } }); - Self::apply_unapplied_slashes(active_era); + Self::confirm_unconfirmed_slashes(active_era); } /// Apply previously-unapplied slashes on the beginning of a new era, after a delay. - fn apply_unapplied_slashes(active_era: EraIndex) { + fn confirm_unconfirmed_slashes(active_era: EraIndex) { let mut era_slashes = Slashes::::take(&active_era); log!( log::Level::Debug, @@ -382,7 +440,7 @@ impl Pallet { era_slashes.len(), active_era, ); - for mut slash in &mut era_slashes { + for slash in &mut era_slashes { slash.confirmed = true; } Slashes::::insert(active_era, &era_slashes); @@ -391,7 +449,7 @@ impl Pallet { /// A pending slash record. The value of the slash has been computed but not applied yet, /// rather deferred for several eras. -#[derive(Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Encode, Decode, RuntimeDebug, TypeInfo, Clone, PartialEq)] pub struct Slash { /// The stash ID of the offending validator. validator: AccountId, @@ -443,3 +501,8 @@ pub(crate) fn compute_slash( confirmed, }) } + +/// Check that list is sorted and has no duplicates. +fn is_sorted_and_unique(list: &[u32]) -> bool { + list.windows(2).all(|w| w[0] < w[1]) +} diff --git a/pallets/external-validator-info/src/mock.rs b/pallets/external-validator-info/src/mock.rs new file mode 100644 index 000000000..651498aee --- /dev/null +++ b/pallets/external-validator-info/src/mock.rs @@ -0,0 +1,102 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + +use { + crate as external_validator_info, + frame_support::{ + parameter_types, + traits::{ConstU16, ConstU64}, + }, + frame_system as system, + sp_core::H256, + sp_runtime::{ + traits::{BlakeTwo256, IdentityLookup}, + BuildStorage, + }, +}; + +type Block = frame_system::mocking::MockBlock; + +// Configure a mock runtime to test the pallet. +frame_support::construct_runtime!( + pub enum Test + { + System: frame_system, + ExternalValidatorInfo: external_validator_info, + } +); + +impl system::Config for Test { + type BaseCallFilter = frame_support::traits::Everything; + type BlockWeights = (); + type BlockLength = (); + type DbWeight = (); + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type Nonce = u64; + type Block = Block; + type Hash = H256; + type Hashing = BlakeTwo256; + type AccountId = u64; + type Lookup = IdentityLookup; + type RuntimeEvent = RuntimeEvent; + type BlockHashCount = ConstU64<250>; + type Version = (); + type PalletInfo = PalletInfo; + type AccountData = (); + type OnNewAccount = (); + type OnKilledAccount = (); + type SystemWeightInfo = (); + type SS58Prefix = ConstU16<42>; + type OnSetCode = (); + type MaxConsumers = frame_support::traits::ConstU32<16>; + type RuntimeTask = (); + type SingleBlockMigrations = (); + type MultiBlockMigrator = (); + type PreInherents = (); + type PostInherents = (); + type PostTransactions = (); +} + +parameter_types! { + pub const DeferPeriod: u32 = 2u32; + pub const BondingDuration: u32 = 5u32; +} + +impl external_validator_info::Config for Test { + type RuntimeEvent = RuntimeEvent; + type ValidatorId = ::AccountId; + type ValidatorIdOf = IdentityValidator; + type SlashDeferDuration = DeferPeriod; + type BondingDuration = BondingDuration; + type SlashId = u32; + type SessionInterface = (); +} + +// Build genesis storage according to the mock runtime. +pub fn new_test_ext() -> sp_io::TestExternalities { + system::GenesisConfig::::default() + .build_storage() + .unwrap() + .into() +} + +pub struct IdentityValidator; +impl sp_runtime::traits::Convert> for IdentityValidator { + fn convert(a: u64) -> Option { + Some(a) + } +} diff --git a/pallets/external-validator-info/src/tests.rs b/pallets/external-validator-info/src/tests.rs new file mode 100644 index 000000000..a43522cda --- /dev/null +++ b/pallets/external-validator-info/src/tests.rs @@ -0,0 +1,151 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + +use { + super::*, + crate::mock::{new_test_ext, ExternalValidatorInfo, RuntimeOrigin, Test}, + frame_support::{assert_noop, assert_ok}, +}; + +#[test] +fn cannot_inject_offence_if_era_info_is_not_there() { + new_test_ext().execute_with(|| { + assert_noop!( + ExternalValidatorInfo::force_inject_slash( + RuntimeOrigin::root(), + 1, + 1u64, + Perbill::from_percent(75) + ), + Error::::ActiveEraNotSet + ); + }); +} + +#[test] +fn root_can_inject_manual_offence() { + new_test_ext().execute_with(|| { + ActiveEra::::put(ActiveEraInfo { + index: 1, + start: Some(0u64), + }); + assert_ok!(ExternalValidatorInfo::force_inject_slash( + RuntimeOrigin::root(), + 0, + 1u64, + Perbill::from_percent(75) + )); + assert_eq!( + Slashes::::get(0), + vec![Slash { + validator: 1, + percentage: Perbill::from_percent(75), + confirmed: false, + reporters: vec![], + slash_id: 0 + }] + ); + assert_eq!(NextSlashId::::get(), 1); + }); +} + +#[test] +fn cannot_inject_future_era_offence() { + new_test_ext().execute_with(|| { + ActiveEra::::put(ActiveEraInfo { + index: 0, + start: Some(0u64), + }); + assert_noop!( + ExternalValidatorInfo::force_inject_slash( + RuntimeOrigin::root(), + 1, + 1u64, + Perbill::from_percent(75) + ), + Error::::ProvidedFutureEra + ); + }); +} + +#[test] +fn cannot_inject_era_offence_too_far_in_the_past() { + new_test_ext().execute_with(|| { + ActiveEra::::put(ActiveEraInfo { + index: 10, + start: Some(0u64), + }); + //Bonding period is 5, we cannot inject slash for era 4 + assert_noop!( + ExternalValidatorInfo::force_inject_slash( + RuntimeOrigin::root(), + 1, + 4u64, + Perbill::from_percent(75) + ), + Error::::ProvidedNonSlashableEra + ); + }); +} + +#[test] +fn root_can_cance_deferred_slash() { + new_test_ext().execute_with(|| { + ActiveEra::::put(ActiveEraInfo { + index: 1, + start: Some(0u64), + }); + assert_ok!(ExternalValidatorInfo::force_inject_slash( + RuntimeOrigin::root(), + 0, + 1u64, + Perbill::from_percent(75) + )); + assert_ok!(ExternalValidatorInfo::cancel_deferred_slash( + RuntimeOrigin::root(), + 0, + vec![0] + )); + + assert_eq!(Slashes::::get(0), vec![]); + }); +} + +#[test] +fn root_cannot_cancel_deferred_slash_if_outside_deferring_period() { + new_test_ext().execute_with(|| { + ActiveEra::::put(ActiveEraInfo { + index: 1, + start: Some(0u64), + }); + assert_ok!(ExternalValidatorInfo::force_inject_slash( + RuntimeOrigin::root(), + 0, + 1u64, + Perbill::from_percent(75) + )); + + ActiveEra::::put(ActiveEraInfo { + index: 4, + start: Some(0u64), + }); + + assert_noop!( + ExternalValidatorInfo::cancel_deferred_slash(RuntimeOrigin::root(), 0, vec![0]), + Error::::DeferPeriodIsOver + ); + }); +} From c50e037560bceb6f6e96c6ac0a78d72820dd7484 Mon Sep 17 00:00:00 2001 From: girazoki Date: Tue, 22 Oct 2024 11:37:02 +0200 Subject: [PATCH 12/82] rename pallet --- Cargo.lock | 2 +- .../Cargo.toml | 4 +- .../src/lib.rs | 1 + .../src/mock.rs | 90 ++++++++++++++++++- .../src/tests.rs | 72 +++++++++++++-- 5 files changed, 154 insertions(+), 15 deletions(-) rename pallets/{external-validator-info => external-validator-slashes}/Cargo.toml (97%) rename pallets/{external-validator-info => external-validator-slashes}/src/lib.rs (99%) rename pallets/{external-validator-info => external-validator-slashes}/src/mock.rs (53%) rename pallets/{external-validator-info => external-validator-slashes}/src/tests.rs (64%) diff --git a/Cargo.lock b/Cargo.lock index a45a0b804..f932d08e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9348,7 +9348,7 @@ dependencies = [ ] [[package]] -name = "pallet-external-validator-info" +name = "pallet-external-validator-slashes" version = "0.1.0" dependencies = [ "bounded-collections 0.1.9", diff --git a/pallets/external-validator-info/Cargo.toml b/pallets/external-validator-slashes/Cargo.toml similarity index 97% rename from pallets/external-validator-info/Cargo.toml rename to pallets/external-validator-slashes/Cargo.toml index ea5ee2596..795ea375c 100644 --- a/pallets/external-validator-info/Cargo.toml +++ b/pallets/external-validator-slashes/Cargo.toml @@ -1,7 +1,7 @@ [package] -name = "pallet-external-validator-info" +name = "pallet-external-validator-slashes" authors = { workspace = true } -description = "External validator info pallet" +description = "External validator info slashes" edition = "2021" license = "GPL-3.0-only" version = "0.1.0" diff --git a/pallets/external-validator-info/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs similarity index 99% rename from pallets/external-validator-info/src/lib.rs rename to pallets/external-validator-slashes/src/lib.rs index 62a182b15..9ac0a10c0 100644 --- a/pallets/external-validator-info/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -414,6 +414,7 @@ impl Pallet { .take_while(|&&(era_idx, _)| era_idx < first_kept) .count(); + // Kill slashing metadata. for (pruned_era, _) in bonded.drain(..n_to_prune) { #[allow(deprecated)] diff --git a/pallets/external-validator-info/src/mock.rs b/pallets/external-validator-slashes/src/mock.rs similarity index 53% rename from pallets/external-validator-info/src/mock.rs rename to pallets/external-validator-slashes/src/mock.rs index 651498aee..76fd779c5 100644 --- a/pallets/external-validator-info/src/mock.rs +++ b/pallets/external-validator-slashes/src/mock.rs @@ -23,9 +23,10 @@ use { frame_system as system, sp_core::H256, sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, - BuildStorage, + traits::{BlakeTwo256, ConvertInto, IdentityLookup}, + BuildStorage, testing::UintAuthorityId }, + sp_staking::SessionIndex, }; type Block = frame_system::mocking::MockBlock; @@ -35,7 +36,9 @@ frame_support::construct_runtime!( pub enum Test { System: frame_system, - ExternalValidatorInfo: external_validator_info, + Session: pallet_session, + Historical: pallet_session::historical, + ExternalValidatorSlashes: external_validator_info, } ); @@ -71,6 +74,76 @@ impl system::Config for Test { type PostTransactions = (); } +parameter_types! { + pub static Validators: Option> = Some(vec![ + 1, + 2, + 3, + ]); +} + +pub struct TestSessionManager; +impl pallet_session::SessionManager for TestSessionManager { + fn new_session(_new_index: SessionIndex) -> Option> { + Validators::mutate(|l| l.take()) + } + fn end_session(_: SessionIndex) {} + fn start_session(_: SessionIndex) {} +} + +impl pallet_session::historical::SessionManager for TestSessionManager { + fn new_session(_new_index: SessionIndex) -> Option> { + Validators::mutate(|l| { + l.take().map(|validators| validators.iter().map(|v| (*v, ())).collect()) + }) + } + fn end_session(_: SessionIndex) {} + fn start_session(_: SessionIndex) {} +} + +parameter_types! { + pub const Period: u64 = 1; + pub const Offset: u64 = 0; +} + +impl pallet_session::Config for Test { + type SessionManager = pallet_session::historical::NoteHistoricalRoot; + type Keys = SessionKeys; + type ShouldEndSession = pallet_session::PeriodicSessions; + type SessionHandler = TestSessionHandler; + type RuntimeEvent = RuntimeEvent; + type ValidatorId = ::AccountId; + type ValidatorIdOf = ConvertInto; + type NextSessionRotation = pallet_session::PeriodicSessions; + type WeightInfo = (); +} + + +sp_runtime::impl_opaque_keys! { + pub struct SessionKeys { + pub foo: sp_runtime::testing::UintAuthorityId, + } +} + +use sp_runtime::RuntimeAppPublic; +type AccountId = u64; +pub struct TestSessionHandler; +impl pallet_session::SessionHandler for TestSessionHandler { + const KEY_TYPE_IDS: &'static [sp_runtime::KeyTypeId] = &[UintAuthorityId::ID]; + + fn on_genesis_session(_validators: &[(AccountId, Ks)]) {} + + fn on_new_session( + _: bool, + _: &[(AccountId, Ks)], + _: &[(AccountId, Ks)], + ) { + } + + fn on_disabled(_: u32) {} +} + + parameter_types! { pub const DeferPeriod: u32 = 2u32; pub const BondingDuration: u32 = 5u32; @@ -86,6 +159,17 @@ impl external_validator_info::Config for Test { type SessionInterface = (); } +pub struct FullIdentificationOf; +impl sp_runtime::traits::Convert> for FullIdentificationOf { + fn convert(_: AccountId) -> Option<()> { + Some(Default::default()) + } +} + +impl pallet_session::historical::Config for Test { + type FullIdentification = (); + type FullIdentificationOf = FullIdentificationOf; +} // Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { system::GenesisConfig::::default() diff --git a/pallets/external-validator-info/src/tests.rs b/pallets/external-validator-slashes/src/tests.rs similarity index 64% rename from pallets/external-validator-info/src/tests.rs rename to pallets/external-validator-slashes/src/tests.rs index a43522cda..8d64f0623 100644 --- a/pallets/external-validator-info/src/tests.rs +++ b/pallets/external-validator-slashes/src/tests.rs @@ -16,7 +16,7 @@ use { super::*, - crate::mock::{new_test_ext, ExternalValidatorInfo, RuntimeOrigin, Test}, + crate::mock::{new_test_ext, ExternalValidatorSlashes, RuntimeOrigin, Test}, frame_support::{assert_noop, assert_ok}, }; @@ -24,7 +24,7 @@ use { fn cannot_inject_offence_if_era_info_is_not_there() { new_test_ext().execute_with(|| { assert_noop!( - ExternalValidatorInfo::force_inject_slash( + ExternalValidatorSlashes::force_inject_slash( RuntimeOrigin::root(), 1, 1u64, @@ -42,7 +42,7 @@ fn root_can_inject_manual_offence() { index: 1, start: Some(0u64), }); - assert_ok!(ExternalValidatorInfo::force_inject_slash( + assert_ok!(ExternalValidatorSlashes::force_inject_slash( RuntimeOrigin::root(), 0, 1u64, @@ -70,7 +70,7 @@ fn cannot_inject_future_era_offence() { start: Some(0u64), }); assert_noop!( - ExternalValidatorInfo::force_inject_slash( + ExternalValidatorSlashes::force_inject_slash( RuntimeOrigin::root(), 1, 1u64, @@ -90,7 +90,7 @@ fn cannot_inject_era_offence_too_far_in_the_past() { }); //Bonding period is 5, we cannot inject slash for era 4 assert_noop!( - ExternalValidatorInfo::force_inject_slash( + ExternalValidatorSlashes::force_inject_slash( RuntimeOrigin::root(), 1, 4u64, @@ -108,13 +108,13 @@ fn root_can_cance_deferred_slash() { index: 1, start: Some(0u64), }); - assert_ok!(ExternalValidatorInfo::force_inject_slash( + assert_ok!(ExternalValidatorSlashes::force_inject_slash( RuntimeOrigin::root(), 0, 1u64, Perbill::from_percent(75) )); - assert_ok!(ExternalValidatorInfo::cancel_deferred_slash( + assert_ok!(ExternalValidatorSlashes::cancel_deferred_slash( RuntimeOrigin::root(), 0, vec![0] @@ -131,7 +131,7 @@ fn root_cannot_cancel_deferred_slash_if_outside_deferring_period() { index: 1, start: Some(0u64), }); - assert_ok!(ExternalValidatorInfo::force_inject_slash( + assert_ok!(ExternalValidatorSlashes::force_inject_slash( RuntimeOrigin::root(), 0, 1u64, @@ -144,8 +144,62 @@ fn root_cannot_cancel_deferred_slash_if_outside_deferring_period() { }); assert_noop!( - ExternalValidatorInfo::cancel_deferred_slash(RuntimeOrigin::root(), 0, vec![0]), + ExternalValidatorSlashes::cancel_deferred_slash(RuntimeOrigin::root(), 0, vec![0]), Error::::DeferPeriodIsOver ); }); } + +#[test] +fn test_after_bonding_period_we_can_remove_slashes() { + new_test_ext().execute_with(|| { + Pallet::::start_era(0); + Pallet::::start_era(1); + + // we are storing a tuple (era index, start_session_block) + assert_eq!(BondedEras::::get(), [(0,0), (1,1)]); + assert_ok!(ExternalValidatorSlashes::force_inject_slash( + RuntimeOrigin::root(), + 0, + 1u64, + Perbill::from_percent(75) + )); + + assert_eq!( + Slashes::::get(0), + vec![Slash { + validator: 1, + percentage: Perbill::from_percent(75), + confirmed: false, + reporters: vec![], + slash_id: 0 + }] + ); + + ActiveEra::::put(ActiveEraInfo { + index: 5, + start: Some(0u64), + }); + + // whenever we start the 6th era, we can remove everything from era 0 + Pallet::::start_era(6); + + assert_eq!( + Slashes::::get(0), + vec![] + ); + }); +} + +#[test] +fn test_on_offence_injects_offences() { + new_test_ext().execute_with(|| { + Pallet::::start_era(0); + Pallet::::start_era(1); + Pallet::::on_offence( + &[OffenceDetails { offender: (11, ()), reporters: vec![] }], + &[Perbill::from_percent(75)], + 0 + ); + }); +} From 71ae9d18f6ef75b2b4a69f661ec77ecb672dbf0e Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 22 Oct 2024 11:48:12 +0200 Subject: [PATCH 13/82] WIP integration test and hooks --- pallets/external-validators/src/lib.rs | 10 ++- pallets/external-validators/src/mock.rs | 2 + primitives/traits/src/lib.rs | 12 ++++ solo-chains/runtime/dancelight/src/lib.rs | 2 + .../src/tests/external_validators_tests.rs | 70 +++++++++++++++++++ .../runtime/dancelight/src/tests/mod.rs | 1 + 6 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs diff --git a/pallets/external-validators/src/lib.rs b/pallets/external-validators/src/lib.rs index 395cfd6b7..91927dc11 100644 --- a/pallets/external-validators/src/lib.rs +++ b/pallets/external-validators/src/lib.rs @@ -38,7 +38,7 @@ use { sp_runtime::RuntimeDebug, sp_staking::SessionIndex, sp_std::vec::Vec, - tp_traits::{ActiveEraInfo, EraIndexProvider, ValidatorProvider}, + tp_traits::{ActiveEraInfo, EraIndex, EraIndexProvider, ValidatorProvider}, }; #[cfg(test)] @@ -125,6 +125,9 @@ pub mod pallet { #[pallet::constant] type SessionsPerEra: Get; + type OnEraStart: OnEraStart; + type OnEraEnd: OnEraEnd; + /// The weight information of this pallet. type WeightInfo: WeightInfo; @@ -200,6 +203,8 @@ pub mod pallet { WhitelistedValidatorAdded { account_id: T::AccountId }, /// An Invulnerable was removed. WhitelistedValidatorRemoved { account_id: T::AccountId }, + /// A new era has started. + NewEra { era: EraIndex }, /// A new force era mode was set. ForceEra { mode: Forcing }, } @@ -382,6 +387,9 @@ pub mod pallet { let q = q.as_mut().unwrap(); q.index += 1; + + Self::deposit_event(Event::NewEra { era: q.index }); + // Set new active era start in next `on_finalize`. To guarantee usage of `Time` q.start = None; }); diff --git a/pallets/external-validators/src/mock.rs b/pallets/external-validators/src/mock.rs index ad56b0a88..4f427d0c4 100644 --- a/pallets/external-validators/src/mock.rs +++ b/pallets/external-validators/src/mock.rs @@ -135,6 +135,8 @@ impl Config for Test { type ValidatorRegistration = IsRegistered; type UnixTime = Timestamp; type SessionsPerEra = SessionsPerEra; + type OnEraStart = (); + type OnEraEnd = (); type WeightInfo = (); #[cfg(feature = "runtime-benchmarks")] type Currency = Balances; diff --git a/primitives/traits/src/lib.rs b/primitives/traits/src/lib.rs index 1385f609e..fb4e33060 100644 --- a/primitives/traits/src/lib.rs +++ b/primitives/traits/src/lib.rs @@ -474,3 +474,15 @@ pub trait EraIndexProvider { pub trait ValidatorProvider { fn validators() -> Vec; } + +pub trait OnEraStart { + fn on_era_start() {} +} + +impl OnEraStart for () {} + +pub trait OnEraEnd { + fn on_era_end() {} +} + +impl OnEraEnd for () {} diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index caf396330..ff4177aa2 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -1200,6 +1200,8 @@ impl pallet_external_validators::Config for Runtime { type ValidatorRegistration = Session; type UnixTime = Timestamp; type SessionsPerEra = SessionsPerEra; + type OnEraStart = (); + type OnEraEnd = (); type WeightInfo = weights::pallet_external_validators::SubstrateWeight; #[cfg(feature = "runtime-benchmarks")] type Currency = Balances; diff --git a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs new file mode 100644 index 000000000..bc8f39d6d --- /dev/null +++ b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs @@ -0,0 +1,70 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + +#![cfg(test)] + +use crate::ExternalValidators; +use frame_support::traits::fungible::Mutate; +use {crate::tests::common::*, frame_support::assert_ok, sp_std::vec}; + +#[test] +fn validators_only_change_once_per_era() { + 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), + ]) + .build() + .execute_with(|| { + run_to_block(2); + + // session 5 validators: ALICE, BOB + // session 6 validators: ALICE, BOB, 0x0f + // session 7 validators: ALICE, BOB, 0x0f + // session 12 validators: ALICE, BOB, 0x15 + + for session in 1u32..=13 { + let mock_validator = AccountId::from([10u8 + session as u8; 32]); + let mock_keys = get_authority_keys_from_seed(&mock_validator.to_string(), None); + + assert_ok!(Balances::mint_into(&mock_validator, 10_000 * UNIT)); + assert_ok!(Session::set_keys( + origin_of(mock_validator.clone()), + crate::SessionKeys { + babe: mock_keys.babe.clone(), + grandpa: mock_keys.grandpa.clone(), + para_validator: mock_keys.para_validator.clone(), + para_assignment: mock_keys.para_assignment.clone(), + authority_discovery: mock_keys.authority_discovery.clone(), + beefy: mock_keys.beefy.clone(), + nimbus: mock_keys.nimbus.clone(), + }, + vec![] + )); + + ExternalValidators::set_external_validators(vec![mock_validator]).unwrap(); + + run_to_session(session); + let validators = Session::validators(); + println!("session {} validators: {:?}", session, validators); + } + + todo!(); + }); +} diff --git a/solo-chains/runtime/dancelight/src/tests/mod.rs b/solo-chains/runtime/dancelight/src/tests/mod.rs index 48445c337..4f7bb4545 100644 --- a/solo-chains/runtime/dancelight/src/tests/mod.rs +++ b/solo-chains/runtime/dancelight/src/tests/mod.rs @@ -25,6 +25,7 @@ mod collator_assignment_tests; mod common; mod core_scheduling_tests; mod ethereum_client; +mod external_validators_tests; mod inflation_rewards; mod integration_test; mod relay_configuration; From 018c31b639ee45062f39ff7d85fc34601daaad13 Mon Sep 17 00:00:00 2001 From: girazoki Date: Tue, 22 Oct 2024 13:08:49 +0200 Subject: [PATCH 14/82] good tests for once --- pallets/external-validator-slashes/src/lib.rs | 4 +- .../external-validator-slashes/src/mock.rs | 96 +++++++++---------- .../external-validator-slashes/src/tests.rs | 51 ++++++++-- 3 files changed, 96 insertions(+), 55 deletions(-) diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index 9ac0a10c0..691b6c507 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -365,6 +365,7 @@ where active_era, slash_era + slash_defer_duration + 1, ); + Slashes::::mutate( slash_era .saturating_add(slash_defer_duration) @@ -414,7 +415,6 @@ impl Pallet { .take_while(|&&(era_idx, _)| era_idx < first_kept) .count(); - // Kill slashing metadata. for (pruned_era, _) in bonded.drain(..n_to_prune) { #[allow(deprecated)] @@ -429,6 +429,8 @@ impl Pallet { } }); + ErasStartSessionIndex::::insert(&active_era, &start_session); + Self::confirm_unconfirmed_slashes(active_era); } diff --git a/pallets/external-validator-slashes/src/mock.rs b/pallets/external-validator-slashes/src/mock.rs index 76fd779c5..89226023d 100644 --- a/pallets/external-validator-slashes/src/mock.rs +++ b/pallets/external-validator-slashes/src/mock.rs @@ -23,8 +23,9 @@ use { frame_system as system, sp_core::H256, sp_runtime::{ + testing::UintAuthorityId, traits::{BlakeTwo256, ConvertInto, IdentityLookup}, - BuildStorage, testing::UintAuthorityId + BuildStorage, }, sp_staking::SessionIndex, }; @@ -75,75 +76,74 @@ impl system::Config for Test { } parameter_types! { - pub static Validators: Option> = Some(vec![ - 1, - 2, - 3, - ]); + pub static Validators: Option> = Some(vec![ + 1, + 2, + 3, + ]); } pub struct TestSessionManager; impl pallet_session::SessionManager for TestSessionManager { - fn new_session(_new_index: SessionIndex) -> Option> { - Validators::mutate(|l| l.take()) - } - fn end_session(_: SessionIndex) {} - fn start_session(_: SessionIndex) {} + fn new_session(_new_index: SessionIndex) -> Option> { + Validators::mutate(|l| l.take()) + } + fn end_session(_: SessionIndex) {} + fn start_session(_: SessionIndex) {} } impl pallet_session::historical::SessionManager for TestSessionManager { - fn new_session(_new_index: SessionIndex) -> Option> { - Validators::mutate(|l| { - l.take().map(|validators| validators.iter().map(|v| (*v, ())).collect()) - }) - } - fn end_session(_: SessionIndex) {} - fn start_session(_: SessionIndex) {} + fn new_session(_new_index: SessionIndex) -> Option> { + Validators::mutate(|l| { + l.take() + .map(|validators| validators.iter().map(|v| (*v, ())).collect()) + }) + } + fn end_session(_: SessionIndex) {} + fn start_session(_: SessionIndex) {} } parameter_types! { - pub const Period: u64 = 1; - pub const Offset: u64 = 0; + pub const Period: u64 = 1; + pub const Offset: u64 = 0; } impl pallet_session::Config for Test { - type SessionManager = pallet_session::historical::NoteHistoricalRoot; - type Keys = SessionKeys; - type ShouldEndSession = pallet_session::PeriodicSessions; - type SessionHandler = TestSessionHandler; - type RuntimeEvent = RuntimeEvent; - type ValidatorId = ::AccountId; - type ValidatorIdOf = ConvertInto; - type NextSessionRotation = pallet_session::PeriodicSessions; - type WeightInfo = (); + type SessionManager = pallet_session::historical::NoteHistoricalRoot; + type Keys = SessionKeys; + type ShouldEndSession = pallet_session::PeriodicSessions; + type SessionHandler = TestSessionHandler; + type RuntimeEvent = RuntimeEvent; + type ValidatorId = ::AccountId; + type ValidatorIdOf = ConvertInto; + type NextSessionRotation = pallet_session::PeriodicSessions; + type WeightInfo = (); } - sp_runtime::impl_opaque_keys! { - pub struct SessionKeys { - pub foo: sp_runtime::testing::UintAuthorityId, - } + pub struct SessionKeys { + pub foo: sp_runtime::testing::UintAuthorityId, + } } use sp_runtime::RuntimeAppPublic; type AccountId = u64; pub struct TestSessionHandler; impl pallet_session::SessionHandler for TestSessionHandler { - const KEY_TYPE_IDS: &'static [sp_runtime::KeyTypeId] = &[UintAuthorityId::ID]; + const KEY_TYPE_IDS: &'static [sp_runtime::KeyTypeId] = &[UintAuthorityId::ID]; - fn on_genesis_session(_validators: &[(AccountId, Ks)]) {} + fn on_genesis_session(_validators: &[(AccountId, Ks)]) {} - fn on_new_session( - _: bool, - _: &[(AccountId, Ks)], - _: &[(AccountId, Ks)], - ) { - } + fn on_new_session( + _: bool, + _: &[(AccountId, Ks)], + _: &[(AccountId, Ks)], + ) { + } - fn on_disabled(_: u32) {} + fn on_disabled(_: u32) {} } - parameter_types! { pub const DeferPeriod: u32 = 2u32; pub const BondingDuration: u32 = 5u32; @@ -161,14 +161,14 @@ impl external_validator_info::Config for Test { pub struct FullIdentificationOf; impl sp_runtime::traits::Convert> for FullIdentificationOf { - fn convert(_: AccountId) -> Option<()> { - Some(Default::default()) - } + fn convert(_: AccountId) -> Option<()> { + Some(Default::default()) + } } impl pallet_session::historical::Config for Test { - type FullIdentification = (); - type FullIdentificationOf = FullIdentificationOf; + type FullIdentification = (); + type FullIdentificationOf = FullIdentificationOf; } // Build genesis storage according to the mock runtime. pub fn new_test_ext() -> sp_io::TestExternalities { diff --git a/pallets/external-validator-slashes/src/tests.rs b/pallets/external-validator-slashes/src/tests.rs index 8d64f0623..2069ddc61 100644 --- a/pallets/external-validator-slashes/src/tests.rs +++ b/pallets/external-validator-slashes/src/tests.rs @@ -157,7 +157,7 @@ fn test_after_bonding_period_we_can_remove_slashes() { Pallet::::start_era(1); // we are storing a tuple (era index, start_session_block) - assert_eq!(BondedEras::::get(), [(0,0), (1,1)]); + assert_eq!(BondedEras::::get(), [(0, 0), (1, 1)]); assert_ok!(ExternalValidatorSlashes::force_inject_slash( RuntimeOrigin::root(), 0, @@ -184,22 +184,61 @@ fn test_after_bonding_period_we_can_remove_slashes() { // whenever we start the 6th era, we can remove everything from era 0 Pallet::::start_era(6); + assert_eq!(Slashes::::get(0), vec![]); + }); +} + +#[test] +fn test_on_offence_injects_offences() { + new_test_ext().execute_with(|| { + Pallet::::start_era(0); + Pallet::::start_era(1); + Pallet::::on_offence( + &[OffenceDetails { + offender: (1, ()), + reporters: vec![], + }], + &[Perbill::from_percent(75)], + 0, + ); + // current era (1) + defer period + 1 + let slash_era = 0 + .saturating_add(crate::mock::DeferPeriod::get()) + .saturating_add(One::one()); + assert_eq!( - Slashes::::get(0), - vec![] + Slashes::::get(slash_era), + vec![Slash { + validator: 1, + percentage: Perbill::from_percent(75), + confirmed: false, + reporters: vec![], + slash_id: 0 + }] ); }); } #[test] -fn test_on_offence_injects_offences() { +fn test_on_offence_does_not_work_for_invulnerables() { new_test_ext().execute_with(|| { Pallet::::start_era(0); Pallet::::start_era(1); + // account 1 invulnerable + Invulnerables::::put(vec![1]); Pallet::::on_offence( - &[OffenceDetails { offender: (11, ()), reporters: vec![] }], + &[OffenceDetails { + offender: (1, ()), + reporters: vec![], + }], &[Perbill::from_percent(75)], - 0 + 0, ); + // current era (1) + defer period + 1 + let slash_era = 1 + .saturating_add(crate::mock::DeferPeriod::get()) + .saturating_add(One::one()); + + assert_eq!(Slashes::::get(slash_era), vec![]); }); } From 61c3fc962507f3da661d40f998028f05604572f2 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 22 Oct 2024 13:10:37 +0200 Subject: [PATCH 15/82] Benchmark new extrinsics --- .../external-validators/src/benchmarking.rs | 76 ++++---- pallets/external-validators/src/lib.rs | 52 ++++-- pallets/external-validators/src/tests.rs | 6 +- pallets/external-validators/src/weights.rs | 170 ++++++++++++------ .../src/weights/pallet_external_validators.rs | 84 ++++++--- 5 files changed, 252 insertions(+), 136 deletions(-) diff --git a/pallets/external-validators/src/benchmarking.rs b/pallets/external-validators/src/benchmarking.rs index e5f675b50..de5096cb4 100644 --- a/pallets/external-validators/src/benchmarking.rs +++ b/pallets/external-validators/src/benchmarking.rs @@ -28,7 +28,7 @@ use { }, frame_system::{EventRecord, RawOrigin}, pallet_session::{self as session, SessionManager}, - sp_runtime::traits::AtLeast32BitUnsigned, + sp_runtime::traits::{AtLeast32BitUnsigned, Convert}, sp_std::prelude::*, tp_traits::DistributeRewards, }; @@ -103,19 +103,8 @@ fn invulnerables< .collect() } -pub type BalanceOf = - <::Currency as frame_support::traits::fungible::Inspect< - ::AccountId, - >>::Balance; - -pub(crate) fn currency_issue( - amount: BalanceOf, -) -> crate::CreditOf { - <::Currency as Balanced>::issue(amount) -} - #[allow(clippy::multiple_bound_locations)] -#[benchmarks(where T: session::Config + pallet_balances::Config, BalanceOf: AtLeast32BitUnsigned)] +#[benchmarks(where T: session::Config + pallet_balances::Config)] mod benchmarks { use super::*; @@ -196,6 +185,39 @@ mod benchmarks { Ok(()) } + #[benchmark] + fn force_no_eras() -> Result<(), BenchmarkError> { + let origin = + T::UpdateOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; + + #[extrinsic_call] + _(origin as T::RuntimeOrigin); + + Ok(()) + } + + #[benchmark] + fn force_new_era() -> Result<(), BenchmarkError> { + let origin = + T::UpdateOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; + + #[extrinsic_call] + _(origin as T::RuntimeOrigin); + + Ok(()) + } + + #[benchmark] + fn force_new_era_always() -> Result<(), BenchmarkError> { + let origin = + T::UpdateOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; + + #[extrinsic_call] + _(origin as T::RuntimeOrigin); + + Ok(()) + } + // worst case for new session. #[benchmark] fn new_session( @@ -219,38 +241,16 @@ mod benchmarks { .expect("add invulnerable failed"); } - #[block] - { - as SessionManager<_>>::new_session(0); - } - - Ok(()) - } + let new_era_session = T::SessionsPerEra::get(); - #[benchmark] - fn reward_validator( - b: Linear<{ 1 }, { T::MaxWhitelistedValidators::get() }>, - ) -> Result<(), BenchmarkError> where { - let invulnerables = invulnerables::(b); - - let (account_ids, collator_ids): (Vec, Vec<::ValidatorId>) = - invulnerables.into_iter().unzip(); - - let invulnerables: frame_support::BoundedVec<_, T::MaxWhitelistedValidators> = - frame_support::BoundedVec::try_from(collator_ids).unwrap(); - >::put(invulnerables); - let to_reward = account_ids.first().unwrap().clone(); - // Create new supply for rewards - let new_supply = currency_issue::(1000u32.into()); #[block] { - let _ = InvulnerableRewardDistribution::::distribute_rewards( - to_reward, new_supply, - ); + as SessionManager<_>>::new_session(new_era_session); } Ok(()) } + impl_benchmark_test_suite!( InvulnerablesPallet, crate::mock::new_test_ext(), diff --git a/pallets/external-validators/src/lib.rs b/pallets/external-validators/src/lib.rs index 91927dc11..8ebde9583 100644 --- a/pallets/external-validators/src/lib.rs +++ b/pallets/external-validators/src/lib.rs @@ -38,7 +38,9 @@ use { sp_runtime::RuntimeDebug, sp_staking::SessionIndex, sp_std::vec::Vec, - tp_traits::{ActiveEraInfo, EraIndex, EraIndexProvider, ValidatorProvider}, + tp_traits::{ + ActiveEraInfo, EraIndex, EraIndexProvider, OnEraEnd, OnEraStart, ValidatorProvider, + }, }; #[cfg(test)] @@ -315,9 +317,8 @@ pub mod pallet { /// ## Complexity /// - No arguments. /// - Weight: O(1) - #[pallet::call_index(12)] - //#[pallet::weight(T::WeightInfo::force_no_eras())] - #[pallet::weight(0)] + #[pallet::call_index(3)] + #[pallet::weight(T::WeightInfo::force_no_eras())] pub fn force_no_eras(origin: OriginFor) -> DispatchResult { T::UpdateOrigin::ensure_origin(origin)?; Self::set_force_era(Forcing::ForceNone); @@ -338,9 +339,8 @@ pub mod pallet { /// ## Complexity /// - No arguments. /// - Weight: O(1) - #[pallet::call_index(13)] - //#[pallet::weight(T::WeightInfo::force_new_era())] - #[pallet::weight(0)] + #[pallet::call_index(4)] + #[pallet::weight(T::WeightInfo::force_new_era())] pub fn force_new_era(origin: OriginFor) -> DispatchResult { T::UpdateOrigin::ensure_origin(origin)?; Self::set_force_era(Forcing::ForceNew); @@ -356,9 +356,8 @@ pub mod pallet { /// The election process starts multiple blocks before the end of the era. /// If this is called just before a new era is triggered, the election process may not /// have enough blocks to get a result. - #[pallet::call_index(16)] - //#[pallet::weight(T::WeightInfo::force_new_era_always())] - #[pallet::weight(0)] + #[pallet::call_index(5)] + #[pallet::weight(T::WeightInfo::force_new_era_always())] pub fn force_new_era_always(origin: OriginFor) -> DispatchResult { T::UpdateOrigin::ensure_origin(origin)?; Self::set_force_era(Forcing::ForceAlways); @@ -480,6 +479,8 @@ impl pallet_session::SessionManager for Pallet { Self::increase_era(new_index); + T::OnEraStart::on_era_start(); + let validators: Vec<_> = Self::validators(); frame_system::Pallet::::register_extra_weight_unchecked( @@ -490,7 +491,36 @@ impl pallet_session::SessionManager for Pallet { Some(validators) } - fn end_session(_: SessionIndex) {} + fn end_session(index: SessionIndex) { + let new_index = index.saturating_add(1); + + if new_index <= 1 { + return; + } + + let new_era = match >::get() { + Forcing::NotForcing => { + // If enough sessions have elapsed, start new era + let start_session = >::get(); + let current_session = new_index; + + if current_session.saturating_sub(start_session) >= T::SessionsPerEra::get() { + true + } else { + false + } + } + Forcing::ForceNew => true, + Forcing::ForceNone => false, + Forcing::ForceAlways => true, + }; + + if !new_era { + return; + } + + T::OnEraEnd::on_era_end(); + } fn start_session(_start_index: SessionIndex) {} } diff --git a/pallets/external-validators/src/tests.rs b/pallets/external-validators/src/tests.rs index 5d42ebf2f..da7366a1e 100644 --- a/pallets/external-validators/src/tests.rs +++ b/pallets/external-validators/src/tests.rs @@ -162,7 +162,7 @@ fn whitelisted_and_external_order() { assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); assert_ok!(ExternalValidators::set_external_validators(vec![50, 51])); - let validators = ExternalValidators::new_session(2); + let validators = ExternalValidators::new_session(6); assert_eq!(validators, Some(vec![1, 2, 50, 51])); }); } @@ -202,7 +202,7 @@ fn validator_provider_returns_all_validators() { assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); assert_ok!(ExternalValidators::set_external_validators(vec![50, 51])); - let validators_new_session = ExternalValidators::new_session(2); + let validators_new_session = ExternalValidators::new_session(6); let validators_provider = >::validators(); assert_eq!(validators_new_session, Some(validators_provider)); }); @@ -219,7 +219,7 @@ fn can_skip_external_validators() { true )); - let validators = ExternalValidators::new_session(2); + let validators = ExternalValidators::new_session(6); assert_eq!(validators, Some(vec![1, 2])); }); } diff --git a/pallets/external-validators/src/weights.rs b/pallets/external-validators/src/weights.rs index 2884deb2e..ed64c9dd4 100644 --- a/pallets/external-validators/src/weights.rs +++ b/pallets/external-validators/src/weights.rs @@ -18,7 +18,7 @@ //! Autogenerated weights for pallet_external_validators //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 -//! DATE: 2024-10-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-22, STEPS: `50`, REPEAT: `20`, 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: Some("dancelight-dev"), DB CACHE: 1024 @@ -56,8 +56,10 @@ pub trait WeightInfo { fn skip_external_validators() -> Weight; fn add_whitelisted(b: u32, ) -> Weight; fn remove_whitelisted(b: u32, ) -> Weight; + fn force_no_eras() -> Weight; + fn force_new_era() -> Weight; + fn force_new_era_always() -> Weight; fn new_session(r: u32, ) -> Weight; - fn reward_validator(b: u32, ) -> Weight; } /// Weights for pallet_external_validators using the Substrate node and recommended hardware. @@ -69,8 +71,8 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_335_000 picoseconds. - Weight::from_parts(1_397_000, 0) + // Minimum execution time: 1_391_000 picoseconds. + Weight::from_parts(1_484_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `Session::NextKeys` (r:1 w:0) @@ -82,10 +84,10 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `845 + b * (36 ±0)` // Estimated: `4687 + b * (37 ±0)` - // Minimum execution time: 12_884_000 picoseconds. - Weight::from_parts(17_232_514, 4687) - // Standard Error: 1_384 - .saturating_add(Weight::from_parts(59_789, 0).saturating_mul(b.into())) + // Minimum execution time: 12_829_000 picoseconds. + Weight::from_parts(17_541_907, 4687) + // Standard Error: 1_560 + .saturating_add(Weight::from_parts(62_143, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) @@ -97,38 +99,66 @@ impl WeightInfo for SubstrateWeight { // Proof Size summary in bytes: // Measured: `137 + b * (32 ±0)` // Estimated: `4687` - // Minimum execution time: 7_033_000 picoseconds. - Weight::from_parts(8_548_429, 4687) - // Standard Error: 2_738 - .saturating_add(Weight::from_parts(55_083, 0).saturating_mul(b.into())) + // Minimum execution time: 7_269_000 picoseconds. + Weight::from_parts(9_100_286, 4687) + // Standard Error: 626 + .saturating_add(Weight::from_parts(35_303, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// The range of component `r` is `[1, 100]`. - fn new_session(r: u32, ) -> Weight { + /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) + /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + fn force_no_eras() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_578_000 picoseconds. + Weight::from_parts(4_924_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) + /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + fn force_new_era() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 135_000 picoseconds. - Weight::from_parts(205_521, 0) - // Standard Error: 28 - .saturating_add(Weight::from_parts(643, 0).saturating_mul(r.into())) + // Minimum execution time: 4_727_000 picoseconds. + Weight::from_parts(4_990_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) } + /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) + /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + fn force_new_era_always() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_648_000 picoseconds. + Weight::from_parts(4_863_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `ExternalValidators::ForceEra` (r:1 w:0) + /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::EraSessionStart` (r:1 w:1) + /// Proof: `ExternalValidators::EraSessionStart` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::ActiveEra` (r:1 w:1) + /// Proof: `ExternalValidators::ActiveEra` (`max_values`: Some(1), `max_size`: Some(13), added: 508, mode: `MaxEncodedLen`) /// Storage: `ExternalValidators::WhitelistedValidators` (r:1 w:0) /// Proof: `ExternalValidators::WhitelistedValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `b` is `[1, 100]`. - fn reward_validator(b: u32, ) -> Weight { + /// Storage: `ExternalValidators::SkipExternalValidators` (r:1 w:0) + /// Proof: `ExternalValidators::SkipExternalValidators` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::ExternalValidators` (r:1 w:0) + /// Proof: `ExternalValidators::ExternalValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 100]`. + fn new_session(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `241 + b * (32 ±0)` + // Measured: `137 + r * (32 ±0)` // Estimated: `4687` - // Minimum execution time: 14_660_000 picoseconds. - Weight::from_parts(15_549_221, 4687) - // Standard Error: 1_994 - .saturating_add(Weight::from_parts(98_363, 0).saturating_mul(b.into())) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + // Minimum execution time: 8_587_000 picoseconds. + Weight::from_parts(10_453_582, 4687) + // Standard Error: 555 + .saturating_add(Weight::from_parts(27_159, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } } @@ -140,8 +170,8 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_335_000 picoseconds. - Weight::from_parts(1_397_000, 0) + // Minimum execution time: 1_391_000 picoseconds. + Weight::from_parts(1_484_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } /// Storage: `Session::NextKeys` (r:1 w:0) @@ -153,10 +183,10 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `845 + b * (36 ±0)` // Estimated: `4687 + b * (37 ±0)` - // Minimum execution time: 12_884_000 picoseconds. - Weight::from_parts(17_232_514, 4687) - // Standard Error: 1_384 - .saturating_add(Weight::from_parts(59_789, 0).saturating_mul(b.into())) + // Minimum execution time: 12_829_000 picoseconds. + Weight::from_parts(17_541_907, 4687) + // Standard Error: 1_560 + .saturating_add(Weight::from_parts(62_143, 0).saturating_mul(b.into())) .saturating_add(RocksDbWeight::get().reads(2_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) @@ -168,37 +198,65 @@ impl WeightInfo for () { // Proof Size summary in bytes: // Measured: `137 + b * (32 ±0)` // Estimated: `4687` - // Minimum execution time: 7_033_000 picoseconds. - Weight::from_parts(8_548_429, 4687) - // Standard Error: 2_738 - .saturating_add(Weight::from_parts(55_083, 0).saturating_mul(b.into())) + // Minimum execution time: 7_269_000 picoseconds. + Weight::from_parts(9_100_286, 4687) + // Standard Error: 626 + .saturating_add(Weight::from_parts(35_303, 0).saturating_mul(b.into())) .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// The range of component `r` is `[1, 100]`. - fn new_session(r: u32, ) -> Weight { + /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) + /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + fn force_no_eras() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_578_000 picoseconds. + Weight::from_parts(4_924_000, 0) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) + /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + fn force_new_era() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 135_000 picoseconds. - Weight::from_parts(205_521, 0) - // Standard Error: 28 - .saturating_add(Weight::from_parts(643, 0).saturating_mul(r.into())) + // Minimum execution time: 4_727_000 picoseconds. + Weight::from_parts(4_990_000, 0) + .saturating_add(RocksDbWeight::get().writes(1_u64)) } + /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) + /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + fn force_new_era_always() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_648_000 picoseconds. + Weight::from_parts(4_863_000, 0) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `ExternalValidators::ForceEra` (r:1 w:0) + /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::EraSessionStart` (r:1 w:1) + /// Proof: `ExternalValidators::EraSessionStart` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::ActiveEra` (r:1 w:1) + /// Proof: `ExternalValidators::ActiveEra` (`max_values`: Some(1), `max_size`: Some(13), added: 508, mode: `MaxEncodedLen`) /// Storage: `ExternalValidators::WhitelistedValidators` (r:1 w:0) /// Proof: `ExternalValidators::WhitelistedValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `b` is `[1, 100]`. - fn reward_validator(b: u32, ) -> Weight { + /// Storage: `ExternalValidators::SkipExternalValidators` (r:1 w:0) + /// Proof: `ExternalValidators::SkipExternalValidators` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::ExternalValidators` (r:1 w:0) + /// Proof: `ExternalValidators::ExternalValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 100]`. + fn new_session(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `241 + b * (32 ±0)` + // Measured: `137 + r * (32 ±0)` // Estimated: `4687` - // Minimum execution time: 14_660_000 picoseconds. - Weight::from_parts(15_549_221, 4687) - // Standard Error: 1_994 - .saturating_add(Weight::from_parts(98_363, 0).saturating_mul(b.into())) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) + // Minimum execution time: 8_587_000 picoseconds. + Weight::from_parts(10_453_582, 4687) + // Standard Error: 555 + .saturating_add(Weight::from_parts(27_159, 0).saturating_mul(r.into())) + .saturating_add(RocksDbWeight::get().reads(6_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) } } diff --git a/solo-chains/runtime/dancelight/src/weights/pallet_external_validators.rs b/solo-chains/runtime/dancelight/src/weights/pallet_external_validators.rs index 970d70636..99001dac2 100644 --- a/solo-chains/runtime/dancelight/src/weights/pallet_external_validators.rs +++ b/solo-chains/runtime/dancelight/src/weights/pallet_external_validators.rs @@ -18,7 +18,7 @@ //! Autogenerated weights for pallet_external_validators //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 -//! DATE: 2024-10-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2024-10-22, STEPS: `50`, REPEAT: `20`, 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: Some("dancelight-dev"), DB CACHE: 1024 @@ -60,8 +60,8 @@ impl pallet_external_validators::WeightInfo for Substra // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_246_000 picoseconds. - Weight::from_parts(1_300_000, 0) + // Minimum execution time: 1_248_000 picoseconds. + Weight::from_parts(1_324_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } /// Storage: `Session::NextKeys` (r:1 w:0) @@ -73,10 +73,10 @@ impl pallet_external_validators::WeightInfo for Substra // Proof Size summary in bytes: // Measured: `845 + b * (36 ±0)` // Estimated: `4687 + b * (37 ±0)` - // Minimum execution time: 10_930_000 picoseconds. - Weight::from_parts(15_514_156, 4687) - // Standard Error: 1_382 - .saturating_add(Weight::from_parts(77_251, 0).saturating_mul(b.into())) + // Minimum execution time: 12_017_000 picoseconds. + Weight::from_parts(16_811_430, 4687) + // Standard Error: 1_421 + .saturating_add(Weight::from_parts(63_946, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(2_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) .saturating_add(Weight::from_parts(0, 37).saturating_mul(b.into())) @@ -88,37 +88,65 @@ impl pallet_external_validators::WeightInfo for Substra // Proof Size summary in bytes: // Measured: `137 + b * (32 ±0)` // Estimated: `4687` - // Minimum execution time: 7_019_000 picoseconds. - Weight::from_parts(8_537_725, 4687) - // Standard Error: 632 - .saturating_add(Weight::from_parts(37_499, 0).saturating_mul(b.into())) + // Minimum execution time: 6_567_000 picoseconds. + Weight::from_parts(8_563_085, 4687) + // Standard Error: 582 + .saturating_add(Weight::from_parts(36_793, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// The range of component `r` is `[1, 100]`. - fn new_session(r: u32, ) -> Weight { + /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) + /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + fn force_no_eras() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_426_000 picoseconds. + Weight::from_parts(4_781_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) + /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + fn force_new_era() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 146_000 picoseconds. - Weight::from_parts(211_572, 0) - // Standard Error: 24 - .saturating_add(Weight::from_parts(471, 0).saturating_mul(r.into())) + // Minimum execution time: 4_475_000 picoseconds. + Weight::from_parts(4_785_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) } + /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) + /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + fn force_new_era_always() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_407_000 picoseconds. + Weight::from_parts(4_680_000, 0) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `ExternalValidators::ForceEra` (r:1 w:0) + /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::EraSessionStart` (r:1 w:1) + /// Proof: `ExternalValidators::EraSessionStart` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::ActiveEra` (r:1 w:1) + /// Proof: `ExternalValidators::ActiveEra` (`max_values`: Some(1), `max_size`: Some(13), added: 508, mode: `MaxEncodedLen`) /// Storage: `ExternalValidators::WhitelistedValidators` (r:1 w:0) /// Proof: `ExternalValidators::WhitelistedValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// The range of component `b` is `[1, 100]`. - fn reward_validator(b: u32, ) -> Weight { + /// Storage: `ExternalValidators::SkipExternalValidators` (r:1 w:0) + /// Proof: `ExternalValidators::SkipExternalValidators` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidators::ExternalValidators` (r:1 w:0) + /// Proof: `ExternalValidators::ExternalValidators` (`max_values`: Some(1), `max_size`: Some(3202), added: 3697, mode: `MaxEncodedLen`) + /// The range of component `r` is `[1, 100]`. + fn new_session(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `241 + b * (32 ±0)` + // Measured: `137 + r * (32 ±0)` // Estimated: `4687` - // Minimum execution time: 14_652_000 picoseconds. - Weight::from_parts(16_718_544, 4687) - // Standard Error: 1_682 - .saturating_add(Weight::from_parts(57_033, 0).saturating_mul(b.into())) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + // Minimum execution time: 8_153_000 picoseconds. + Weight::from_parts(10_186_440, 4687) + // Standard Error: 563 + .saturating_add(Weight::from_parts(25_107, 0).saturating_mul(r.into())) + .saturating_add(T::DbWeight::get().reads(6_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) } } \ No newline at end of file From 08965a8c072fa5e59a83c532486ace78b70dd616 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 22 Oct 2024 13:13:56 +0200 Subject: [PATCH 16/82] Migrate queued keys instead of current validators --- runtime/common/src/migrations.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/runtime/common/src/migrations.rs b/runtime/common/src/migrations.rs index 8031c7f22..56dccc2b7 100644 --- a/runtime/common/src/migrations.rs +++ b/runtime/common/src/migrations.rs @@ -913,8 +913,13 @@ where use frame_support::pallet_prelude::*; // Set initial WhitelistedValidators to current validators from pallet session - let session_validators = pallet_session::Validators::::get(); - let session_validators = BoundedVec::truncate_from(session_validators); + let session_keys = pallet_session::QueuedKeys::::get(); + let session_validators = BoundedVec::truncate_from( + session_keys + .into_iter() + .map(|(validator, _keys)| validator) + .collect(), + ); pallet_external_validators::WhitelistedValidators::::put(session_validators); // Kill storage of ValidatorManager pallet From bc612734e619e73bb42bdbd1c136827deb6ffcad Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 22 Oct 2024 13:22:42 +0200 Subject: [PATCH 17/82] typescript-api --- .../interfaces/augment-api-consts.ts | 2 + .../interfaces/augment-api-events.ts | 9 + .../interfaces/augment-api-query.ts | 14 +- .../dancelight/interfaces/augment-api-tx.ts | 44 +++ .../src/dancelight/interfaces/lookup.ts | 341 +++++++++-------- .../src/dancelight/interfaces/registry.ts | 2 + .../src/dancelight/interfaces/types-lookup.ts | 356 ++++++++++-------- 7 files changed, 435 insertions(+), 333 deletions(-) diff --git a/typescript-api/src/dancelight/interfaces/augment-api-consts.ts b/typescript-api/src/dancelight/interfaces/augment-api-consts.ts index 7b3ebe698..a9b07cbaa 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-consts.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-consts.ts @@ -138,6 +138,8 @@ declare module "@polkadot/api-base/types/consts" { maxExternalValidators: u32 & AugmentedConst; /** Maximum number of whitelisted validators. */ maxWhitelistedValidators: u32 & AugmentedConst; + /** Number of sessions per era. */ + sessionsPerEra: u32 & AugmentedConst; /** Generic const */ [key: string]: Codec; }; diff --git a/typescript-api/src/dancelight/interfaces/augment-api-events.ts b/typescript-api/src/dancelight/interfaces/augment-api-events.ts index b4295683e..129b2eab1 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-events.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-events.ts @@ -19,6 +19,7 @@ import type { FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, PalletConvictionVotingTally, + PalletExternalValidatorsForcing, PalletMultisigTimepoint, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, @@ -212,6 +213,14 @@ declare module "@polkadot/api-base/types/events" { [key: string]: AugmentedEvent; }; externalValidators: { + /** A new force era mode was set. */ + ForceEra: AugmentedEvent< + ApiType, + [mode: PalletExternalValidatorsForcing], + { mode: PalletExternalValidatorsForcing } + >; + /** A new era has started. */ + NewEra: AugmentedEvent; /** A new Invulnerable was added. */ WhitelistedValidatorAdded: AugmentedEvent; /** An Invulnerable was removed. */ diff --git a/typescript-api/src/dancelight/interfaces/augment-api-query.ts b/typescript-api/src/dancelight/interfaces/augment-api-query.ts index 27edbf756..6d4dcddef 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-query.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-query.ts @@ -47,6 +47,7 @@ import type { PalletConfigurationHostConfiguration, PalletConvictionVotingVoteVoting, PalletDataPreserversRegisteredProfile, + PalletExternalValidatorsForcing, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityAuthorityProperties, @@ -661,16 +662,21 @@ declare module "@polkadot/api-base/types/storage" { [key: string]: QueryableStorageEntry; }; externalValidators: { - /** The invulnerable, permissioned collators. This list must be sorted. */ + /** The active era information, it holds index and start. */ activeEra: AugmentedQuery Observable>, []> & QueryableStorageEntry; - /** The invulnerable, permissioned collators. This list must be sorted. */ + /** Session index at the start of this era. Used to know when to start the next era. */ + eraSessionStart: AugmentedQuery Observable, []> & QueryableStorageEntry; + /** Validators set using storage proofs from another blockchain. Ignored if `SkipExternalValidators` is true. */ externalValidators: AugmentedQuery Observable>, []> & QueryableStorageEntry; - /** The invulnerable, permissioned collators. This list must be sorted. */ + /** Mode of era forcing. */ + forceEra: AugmentedQuery Observable, []> & + QueryableStorageEntry; + /** Allow to disable external validators. */ skipExternalValidators: AugmentedQuery Observable, []> & QueryableStorageEntry; - /** The invulnerable, permissioned collators. This list must be sorted. */ + /** Fixed validators set by root/governance. Have priority over the external validators. */ whitelistedValidators: AugmentedQuery Observable>, []> & QueryableStorageEntry; /** Generic query */ diff --git a/typescript-api/src/dancelight/interfaces/augment-api-tx.ts b/typescript-api/src/dancelight/interfaces/augment-api-tx.ts index 962ace008..ba5866b99 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-tx.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-tx.ts @@ -1284,6 +1284,50 @@ declare module "@polkadot/api-base/types/submittable" { (who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic, [AccountId32] >; + /** + * Force there to be a new era at the end of the next session. After this, it will be reset to normal (non-forced) + * behaviour. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. If this is called just before a new era + * is triggered, the election process may not have enough blocks to get a result. + * + * ## Complexity + * + * - No arguments. + * - Weight: O(1) + */ + forceNewEra: AugmentedSubmittable<() => SubmittableExtrinsic, []>; + /** + * Force there to be a new era at the end of sessions indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. If this is called just before a new era + * is triggered, the election process may not have enough blocks to get a result. + */ + forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic, []>; + /** + * Force there to be no new eras indefinitely. + * + * The dispatch origin must be Root. + * + * # Warning + * + * The election process starts multiple blocks before the end of the era. Thus the election process may be ongoing + * when this is called. In this case the election will continue until the next era is triggered. + * + * ## Complexity + * + * - No arguments. + * - Weight: O(1) + */ + forceNoEras: AugmentedSubmittable<() => SubmittableExtrinsic, []>; /** * Remove an account `who` from the list of `WhitelistedValidators` collators. * diff --git a/typescript-api/src/dancelight/interfaces/lookup.ts b/typescript-api/src/dancelight/interfaces/lookup.ts index c89a181b1..f02ca155d 100644 --- a/typescript-api/src/dancelight/interfaces/lookup.ts +++ b/typescript-api/src/dancelight/interfaces/lookup.ts @@ -3890,6 +3890,9 @@ export default { remove_whitelisted: { who: "AccountId32", }, + force_no_eras: "Null", + force_new_era: "Null", + force_new_era_always: "Null", }, }, /** Lookup428: pallet_root_testing::pallet::Call */ @@ -4572,13 +4575,23 @@ export default { WhitelistedValidatorRemoved: { accountId: "AccountId32", }, + NewEra: { + era: "u32", + }, + ForceEra: { + mode: "PalletExternalValidatorsForcing", + }, }, }, - /** Lookup470: pallet_root_testing::pallet::Event */ + /** Lookup470: pallet_external_validators::Forcing */ + PalletExternalValidatorsForcing: { + _enum: ["NotForcing", "ForceNew", "ForceNone", "ForceAlways"], + }, + /** Lookup471: pallet_root_testing::pallet::Event */ PalletRootTestingEvent: { _enum: ["DefensiveTestCall"], }, - /** Lookup471: pallet_sudo::pallet::Event */ + /** Lookup472: pallet_sudo::pallet::Event */ PalletSudoEvent: { _enum: { Sudid: { @@ -4597,7 +4610,7 @@ export default { }, }, }, - /** Lookup472: frame_system::Phase */ + /** Lookup473: frame_system::Phase */ FrameSystemPhase: { _enum: { ApplyExtrinsic: "u32", @@ -4605,51 +4618,51 @@ export default { Initialization: "Null", }, }, - /** Lookup474: frame_system::LastRuntimeUpgradeInfo */ + /** Lookup475: frame_system::LastRuntimeUpgradeInfo */ FrameSystemLastRuntimeUpgradeInfo: { specVersion: "Compact", specName: "Text", }, - /** Lookup476: frame_system::CodeUpgradeAuthorization */ + /** Lookup477: frame_system::CodeUpgradeAuthorization */ FrameSystemCodeUpgradeAuthorization: { codeHash: "H256", checkVersion: "bool", }, - /** Lookup477: frame_system::limits::BlockWeights */ + /** Lookup478: frame_system::limits::BlockWeights */ FrameSystemLimitsBlockWeights: { baseBlock: "SpWeightsWeightV2Weight", maxBlock: "SpWeightsWeightV2Weight", perClass: "FrameSupportDispatchPerDispatchClassWeightsPerClass", }, - /** Lookup478: frame_support::dispatch::PerDispatchClass */ + /** Lookup479: frame_support::dispatch::PerDispatchClass */ FrameSupportDispatchPerDispatchClassWeightsPerClass: { normal: "FrameSystemLimitsWeightsPerClass", operational: "FrameSystemLimitsWeightsPerClass", mandatory: "FrameSystemLimitsWeightsPerClass", }, - /** Lookup479: frame_system::limits::WeightsPerClass */ + /** Lookup480: frame_system::limits::WeightsPerClass */ FrameSystemLimitsWeightsPerClass: { baseExtrinsic: "SpWeightsWeightV2Weight", maxExtrinsic: "Option", maxTotal: "Option", reserved: "Option", }, - /** Lookup480: frame_system::limits::BlockLength */ + /** Lookup481: frame_system::limits::BlockLength */ FrameSystemLimitsBlockLength: { max: "FrameSupportDispatchPerDispatchClassU32", }, - /** Lookup481: frame_support::dispatch::PerDispatchClass */ + /** Lookup482: frame_support::dispatch::PerDispatchClass */ FrameSupportDispatchPerDispatchClassU32: { normal: "u32", operational: "u32", mandatory: "u32", }, - /** Lookup482: sp_weights::RuntimeDbWeight */ + /** Lookup483: sp_weights::RuntimeDbWeight */ SpWeightsRuntimeDbWeight: { read: "u64", write: "u64", }, - /** Lookup483: sp_version::RuntimeVersion */ + /** Lookup484: sp_version::RuntimeVersion */ SpVersionRuntimeVersion: { specName: "Text", implName: "Text", @@ -4660,7 +4673,7 @@ export default { transactionVersion: "u32", stateVersion: "u8", }, - /** Lookup487: frame_system::pallet::Error */ + /** Lookup488: frame_system::pallet::Error */ FrameSystemError: { _enum: [ "InvalidSpecName", @@ -4674,7 +4687,7 @@ export default { "Unauthorized", ], }, - /** Lookup494: sp_consensus_babe::digests::PreDigest */ + /** Lookup495: sp_consensus_babe::digests::PreDigest */ SpConsensusBabeDigestsPreDigest: { _enum: { __Unused0: "Null", @@ -4683,34 +4696,34 @@ export default { SecondaryVRF: "SpConsensusBabeDigestsSecondaryVRFPreDigest", }, }, - /** Lookup495: sp_consensus_babe::digests::PrimaryPreDigest */ + /** Lookup496: sp_consensus_babe::digests::PrimaryPreDigest */ SpConsensusBabeDigestsPrimaryPreDigest: { authorityIndex: "u32", slot: "u64", vrfSignature: "SpCoreSr25519VrfVrfSignature", }, - /** Lookup496: sp_core::sr25519::vrf::VrfSignature */ + /** Lookup497: sp_core::sr25519::vrf::VrfSignature */ SpCoreSr25519VrfVrfSignature: { preOutput: "[u8;32]", proof: "[u8;64]", }, - /** Lookup497: sp_consensus_babe::digests::SecondaryPlainPreDigest */ + /** Lookup498: sp_consensus_babe::digests::SecondaryPlainPreDigest */ SpConsensusBabeDigestsSecondaryPlainPreDigest: { authorityIndex: "u32", slot: "u64", }, - /** Lookup498: sp_consensus_babe::digests::SecondaryVRFPreDigest */ + /** Lookup499: sp_consensus_babe::digests::SecondaryVRFPreDigest */ SpConsensusBabeDigestsSecondaryVRFPreDigest: { authorityIndex: "u32", slot: "u64", vrfSignature: "SpCoreSr25519VrfVrfSignature", }, - /** Lookup499: sp_consensus_babe::BabeEpochConfiguration */ + /** Lookup500: sp_consensus_babe::BabeEpochConfiguration */ SpConsensusBabeBabeEpochConfiguration: { c: "(u64,u64)", allowedSlots: "SpConsensusBabeAllowedSlots", }, - /** Lookup503: pallet_babe::pallet::Error */ + /** Lookup504: pallet_babe::pallet::Error */ PalletBabeError: { _enum: [ "InvalidEquivocationProof", @@ -4719,22 +4732,22 @@ export default { "InvalidConfiguration", ], }, - /** Lookup505: pallet_balances::types::BalanceLock */ + /** Lookup506: pallet_balances::types::BalanceLock */ PalletBalancesBalanceLock: { id: "[u8;8]", amount: "u128", reasons: "PalletBalancesReasons", }, - /** Lookup506: pallet_balances::types::Reasons */ + /** Lookup507: pallet_balances::types::Reasons */ PalletBalancesReasons: { _enum: ["Fee", "Misc", "All"], }, - /** Lookup509: pallet_balances::types::ReserveData */ + /** Lookup510: pallet_balances::types::ReserveData */ PalletBalancesReserveData: { id: "[u8;8]", amount: "u128", }, - /** Lookup513: dancelight_runtime::RuntimeHoldReason */ + /** Lookup514: dancelight_runtime::RuntimeHoldReason */ DancelightRuntimeRuntimeHoldReason: { _enum: { __Unused0: "Null", @@ -4825,24 +4838,24 @@ export default { Preimage: "PalletPreimageHoldReason", }, }, - /** Lookup514: pallet_registrar::pallet::HoldReason */ + /** Lookup515: pallet_registrar::pallet::HoldReason */ PalletRegistrarHoldReason: { _enum: ["RegistrarDeposit"], }, - /** Lookup515: pallet_data_preservers::pallet::HoldReason */ + /** Lookup516: pallet_data_preservers::pallet::HoldReason */ PalletDataPreserversHoldReason: { _enum: ["ProfileDeposit"], }, - /** Lookup516: pallet_preimage::pallet::HoldReason */ + /** Lookup517: pallet_preimage::pallet::HoldReason */ PalletPreimageHoldReason: { _enum: ["Preimage"], }, - /** Lookup519: frame_support::traits::tokens::misc::IdAmount */ + /** Lookup520: frame_support::traits::tokens::misc::IdAmount */ FrameSupportTokensMiscIdAmount: { id: "Null", amount: "u128", }, - /** Lookup521: pallet_balances::pallet::Error */ + /** Lookup522: pallet_balances::pallet::Error */ PalletBalancesError: { _enum: [ "VestingBalance", @@ -4859,21 +4872,21 @@ export default { "DeltaZero", ], }, - /** Lookup522: pallet_transaction_payment::Releases */ + /** Lookup523: pallet_transaction_payment::Releases */ PalletTransactionPaymentReleases: { _enum: ["V1Ancient", "V2"], }, - /** Lookup523: sp_staking::offence::OffenceDetails */ + /** Lookup524: sp_staking::offence::OffenceDetails */ SpStakingOffenceOffenceDetails: { offender: "(AccountId32,Null)", reporters: "Vec", }, - /** Lookup535: pallet_registrar::pallet::DepositInfo */ + /** Lookup536: pallet_registrar::pallet::DepositInfo */ PalletRegistrarDepositInfo: { creator: "AccountId32", deposit: "u128", }, - /** Lookup536: pallet_registrar::pallet::Error */ + /** Lookup537: pallet_registrar::pallet::Error */ PalletRegistrarError: { _enum: [ "ParaIdAlreadyRegistered", @@ -4895,7 +4908,7 @@ export default { "WasmCodeNecessary", ], }, - /** Lookup537: pallet_configuration::HostConfiguration */ + /** Lookup538: pallet_configuration::HostConfiguration */ PalletConfigurationHostConfiguration: { maxCollators: "u32", minOrchestratorCollators: "u32", @@ -4907,11 +4920,11 @@ export default { targetContainerChainFullness: "Perbill", maxParachainCoresPercentage: "Option", }, - /** Lookup540: pallet_configuration::pallet::Error */ + /** Lookup541: pallet_configuration::pallet::Error */ PalletConfigurationError: { _enum: ["InvalidNewValue"], }, - /** Lookup542: pallet_invulnerables::pallet::Error */ + /** Lookup543: pallet_invulnerables::pallet::Error */ PalletInvulnerablesError: { _enum: [ "TooManyInvulnerables", @@ -4921,23 +4934,23 @@ export default { "UnableToDeriveCollatorId", ], }, - /** Lookup543: dp_collator_assignment::AssignedCollators */ + /** Lookup544: dp_collator_assignment::AssignedCollators */ DpCollatorAssignmentAssignedCollatorsAccountId32: { orchestratorChain: "Vec", containerChains: "BTreeMap>", }, - /** Lookup548: dp_collator_assignment::AssignedCollators */ + /** Lookup549: dp_collator_assignment::AssignedCollators */ DpCollatorAssignmentAssignedCollatorsPublic: { orchestratorChain: "Vec", containerChains: "BTreeMap>", }, - /** Lookup556: tp_traits::ContainerChainBlockInfo */ + /** Lookup557: tp_traits::ContainerChainBlockInfo */ TpTraitsContainerChainBlockInfo: { blockNumber: "u32", author: "AccountId32", latestSlotNumber: "u64", }, - /** Lookup557: pallet_author_noting::pallet::Error */ + /** Lookup558: pallet_author_noting::pallet::Error */ PalletAuthorNotingError: { _enum: [ "FailedReading", @@ -4949,18 +4962,18 @@ export default { "NonAuraDigest", ], }, - /** Lookup558: pallet_services_payment::pallet::Error */ + /** Lookup559: pallet_services_payment::pallet::Error */ PalletServicesPaymentError: { _enum: ["InsufficientFundsToPurchaseCredits", "InsufficientCredits", "CreditPriceTooExpensive"], }, - /** Lookup559: pallet_data_preservers::types::RegisteredProfile */ + /** Lookup560: pallet_data_preservers::types::RegisteredProfile */ PalletDataPreserversRegisteredProfile: { account: "AccountId32", deposit: "u128", profile: "PalletDataPreserversProfile", assignment: "Option<(u32,DancelightRuntimePreserversAssignmentPaymentWitness)>", }, - /** Lookup565: pallet_data_preservers::pallet::Error */ + /** Lookup566: pallet_data_preservers::pallet::Error */ PalletDataPreserversError: { _enum: [ "NoBootNodes", @@ -4975,13 +4988,13 @@ export default { "CantDeleteAssignedProfile", ], }, - /** Lookup570: sp_core::crypto::KeyTypeId */ + /** Lookup571: sp_core::crypto::KeyTypeId */ SpCoreCryptoKeyTypeId: "[u8;4]", - /** Lookup571: pallet_session::pallet::Error */ + /** Lookup572: pallet_session::pallet::Error */ PalletSessionError: { _enum: ["InvalidProof", "NoAssociatedValidatorId", "DuplicatedKey", "NoKeys", "NoAccount"], }, - /** Lookup572: pallet_grandpa::StoredState */ + /** Lookup573: pallet_grandpa::StoredState */ PalletGrandpaStoredState: { _enum: { Live: "Null", @@ -4996,14 +5009,14 @@ export default { }, }, }, - /** Lookup573: pallet_grandpa::StoredPendingChange */ + /** Lookup574: pallet_grandpa::StoredPendingChange */ PalletGrandpaStoredPendingChange: { scheduledAt: "u32", delay: "u32", nextAuthorities: "Vec<(SpConsensusGrandpaAppPublic,u64)>", forced: "Option", }, - /** Lookup575: pallet_grandpa::pallet::Error */ + /** Lookup576: pallet_grandpa::pallet::Error */ PalletGrandpaError: { _enum: [ "PauseFailed", @@ -5015,12 +5028,12 @@ export default { "DuplicateOffenceReport", ], }, - /** Lookup578: pallet_inflation_rewards::pallet::ChainsToRewardValue */ + /** Lookup579: pallet_inflation_rewards::pallet::ChainsToRewardValue */ PalletInflationRewardsChainsToRewardValue: { paraIds: "Vec", rewardsPerChain: "u128", }, - /** Lookup579: pallet_treasury::Proposal */ + /** Lookup580: pallet_treasury::Proposal */ PalletTreasuryProposal: { proposer: "AccountId32", value: "u128", @@ -5028,7 +5041,7 @@ export default { bond: "u128", }, /** - * Lookup581: pallet_treasury::SpendStatus */ PalletTreasurySpendStatus: { @@ -5039,7 +5052,7 @@ export default { expireAt: "u32", status: "PalletTreasuryPaymentState", }, - /** Lookup582: pallet_treasury::PaymentState */ + /** Lookup583: pallet_treasury::PaymentState */ PalletTreasuryPaymentState: { _enum: { Pending: "Null", @@ -5049,9 +5062,9 @@ export default { Failed: "Null", }, }, - /** Lookup584: frame_support::PalletId */ + /** Lookup585: frame_support::PalletId */ FrameSupportPalletId: "[u8;8]", - /** Lookup585: pallet_treasury::pallet::Error */ + /** Lookup586: pallet_treasury::pallet::Error */ PalletTreasuryError: { _enum: [ "InvalidIndex", @@ -5068,7 +5081,7 @@ export default { ], }, /** - * Lookup587: pallet_conviction_voting::vote::Voting */ PalletConvictionVotingVoteVoting: { @@ -5077,20 +5090,20 @@ export default { Delegating: "PalletConvictionVotingVoteDelegating", }, }, - /** Lookup588: pallet_conviction_voting::vote::Casting */ + /** Lookup589: pallet_conviction_voting::vote::Casting */ PalletConvictionVotingVoteCasting: { votes: "Vec<(u32,PalletConvictionVotingVoteAccountVote)>", delegations: "PalletConvictionVotingDelegations", prior: "PalletConvictionVotingVotePriorLock", }, - /** Lookup592: pallet_conviction_voting::types::Delegations */ + /** Lookup593: pallet_conviction_voting::types::Delegations */ PalletConvictionVotingDelegations: { votes: "u128", capital: "u128", }, - /** Lookup593: pallet_conviction_voting::vote::PriorLock */ + /** Lookup594: pallet_conviction_voting::vote::PriorLock */ PalletConvictionVotingVotePriorLock: "(u32,u128)", - /** Lookup594: pallet_conviction_voting::vote::Delegating */ + /** Lookup595: pallet_conviction_voting::vote::Delegating */ PalletConvictionVotingVoteDelegating: { balance: "u128", target: "AccountId32", @@ -5098,7 +5111,7 @@ export default { delegations: "PalletConvictionVotingDelegations", prior: "PalletConvictionVotingVotePriorLock", }, - /** Lookup598: pallet_conviction_voting::pallet::Error */ + /** Lookup599: pallet_conviction_voting::pallet::Error */ PalletConvictionVotingError: { _enum: [ "NotOngoing", @@ -5116,7 +5129,7 @@ export default { ], }, /** - * Lookup599: pallet_referenda::types::ReferendumInfo, * Balance, pallet_conviction_voting::types::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5131,7 +5144,7 @@ export default { }, }, /** - * Lookup600: pallet_referenda::types::ReferendumStatus, * Balance, pallet_conviction_voting::types::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5148,17 +5161,17 @@ export default { inQueue: "bool", alarm: "Option<(u32,(u32,u32))>", }, - /** Lookup601: pallet_referenda::types::Deposit */ + /** Lookup602: pallet_referenda::types::Deposit */ PalletReferendaDeposit: { who: "AccountId32", amount: "u128", }, - /** Lookup604: pallet_referenda::types::DecidingStatus */ + /** Lookup605: pallet_referenda::types::DecidingStatus */ PalletReferendaDecidingStatus: { since: "u32", confirming: "Option", }, - /** Lookup612: pallet_referenda::types::TrackInfo */ + /** Lookup613: pallet_referenda::types::TrackInfo */ PalletReferendaTrackInfo: { name: "Text", maxDeciding: "u32", @@ -5170,7 +5183,7 @@ export default { minApproval: "PalletReferendaCurve", minSupport: "PalletReferendaCurve", }, - /** Lookup613: pallet_referenda::types::Curve */ + /** Lookup614: pallet_referenda::types::Curve */ PalletReferendaCurve: { _enum: { LinearDecreasing: { @@ -5191,7 +5204,7 @@ export default { }, }, }, - /** Lookup616: pallet_referenda::pallet::Error */ + /** Lookup617: pallet_referenda::pallet::Error */ PalletReferendaError: { _enum: [ "NotOngoing", @@ -5210,11 +5223,11 @@ export default { "PreimageStoredWithDifferentLength", ], }, - /** Lookup617: pallet_ranked_collective::MemberRecord */ + /** Lookup618: pallet_ranked_collective::MemberRecord */ PalletRankedCollectiveMemberRecord: { rank: "u16", }, - /** Lookup622: pallet_ranked_collective::pallet::Error */ + /** Lookup623: pallet_ranked_collective::pallet::Error */ PalletRankedCollectiveError: { _enum: [ "AlreadyMember", @@ -5231,7 +5244,7 @@ export default { ], }, /** - * Lookup623: pallet_referenda::types::ReferendumInfo, * Balance, pallet_ranked_collective::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5246,7 +5259,7 @@ export default { }, }, /** - * Lookup624: pallet_referenda::types::ReferendumStatus, * Balance, pallet_ranked_collective::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5263,7 +5276,7 @@ export default { inQueue: "bool", alarm: "Option<(u32,(u32,u32))>", }, - /** Lookup627: pallet_whitelist::pallet::Error */ + /** Lookup628: pallet_whitelist::pallet::Error */ PalletWhitelistError: { _enum: [ "UnavailablePreImage", @@ -5273,7 +5286,7 @@ export default { "CallAlreadyWhitelisted", ], }, - /** Lookup628: polkadot_runtime_parachains::configuration::HostConfiguration */ + /** Lookup629: polkadot_runtime_parachains::configuration::HostConfiguration */ PolkadotRuntimeParachainsConfigurationHostConfiguration: { maxCodeSize: "u32", maxHeadDataSize: "u32", @@ -5311,16 +5324,16 @@ export default { approvalVotingParams: "PolkadotPrimitivesV7ApprovalVotingParams", schedulerParams: "PolkadotPrimitivesVstagingSchedulerParams", }, - /** Lookup631: polkadot_runtime_parachains::configuration::pallet::Error */ + /** Lookup632: polkadot_runtime_parachains::configuration::pallet::Error */ PolkadotRuntimeParachainsConfigurationPalletError: { _enum: ["InvalidNewValue"], }, - /** Lookup634: polkadot_runtime_parachains::shared::AllowedRelayParentsTracker */ + /** Lookup635: polkadot_runtime_parachains::shared::AllowedRelayParentsTracker */ PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker: { buffer: "Vec<(H256,H256)>", latestNumber: "u32", }, - /** Lookup638: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability */ + /** Lookup639: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability */ PolkadotRuntimeParachainsInclusionCandidatePendingAvailability: { _alias: { hash_: "hash", @@ -5335,7 +5348,7 @@ export default { backedInNumber: "u32", backingGroup: "u32", }, - /** Lookup639: polkadot_runtime_parachains::inclusion::pallet::Error */ + /** Lookup640: polkadot_runtime_parachains::inclusion::pallet::Error */ PolkadotRuntimeParachainsInclusionPalletError: { _enum: [ "ValidatorIndexOutOfBounds", @@ -5358,14 +5371,14 @@ export default { "ParaHeadMismatch", ], }, - /** Lookup640: polkadot_primitives::v7::ScrapedOnChainVotes */ + /** Lookup641: polkadot_primitives::v7::ScrapedOnChainVotes */ PolkadotPrimitivesV7ScrapedOnChainVotes: { session: "u32", backingValidatorsPerCandidate: "Vec<(PolkadotPrimitivesV7CandidateReceipt,Vec<(u32,PolkadotPrimitivesV7ValidityAttestation)>)>", disputes: "Vec", }, - /** Lookup645: polkadot_runtime_parachains::paras_inherent::pallet::Error */ + /** Lookup646: polkadot_runtime_parachains::paras_inherent::pallet::Error */ PolkadotRuntimeParachainsParasInherentPalletError: { _enum: [ "TooManyInclusionInherents", @@ -5375,20 +5388,20 @@ export default { "UnscheduledCandidate", ], }, - /** Lookup648: polkadot_runtime_parachains::scheduler::pallet::CoreOccupied */ + /** Lookup649: polkadot_runtime_parachains::scheduler::pallet::CoreOccupied */ PolkadotRuntimeParachainsSchedulerPalletCoreOccupied: { _enum: { Free: "Null", Paras: "PolkadotRuntimeParachainsSchedulerPalletParasEntry", }, }, - /** Lookup649: polkadot_runtime_parachains::scheduler::pallet::ParasEntry */ + /** Lookup650: polkadot_runtime_parachains::scheduler::pallet::ParasEntry */ PolkadotRuntimeParachainsSchedulerPalletParasEntry: { assignment: "PolkadotRuntimeParachainsSchedulerCommonAssignment", availabilityTimeouts: "u32", ttl: "u32", }, - /** Lookup650: polkadot_runtime_parachains::scheduler::common::Assignment */ + /** Lookup651: polkadot_runtime_parachains::scheduler::common::Assignment */ PolkadotRuntimeParachainsSchedulerCommonAssignment: { _enum: { Pool: { @@ -5398,7 +5411,7 @@ export default { Bulk: "u32", }, }, - /** Lookup655: polkadot_runtime_parachains::paras::PvfCheckActiveVoteState */ + /** Lookup656: polkadot_runtime_parachains::paras::PvfCheckActiveVoteState */ PolkadotRuntimeParachainsParasPvfCheckActiveVoteState: { votesAccept: "BitVec", votesReject: "BitVec", @@ -5406,7 +5419,7 @@ export default { createdAt: "u32", causes: "Vec", }, - /** Lookup657: polkadot_runtime_parachains::paras::PvfCheckCause */ + /** Lookup658: polkadot_runtime_parachains::paras::PvfCheckCause */ PolkadotRuntimeParachainsParasPvfCheckCause: { _enum: { Onboarding: "u32", @@ -5417,11 +5430,11 @@ export default { }, }, }, - /** Lookup658: polkadot_runtime_parachains::paras::UpgradeStrategy */ + /** Lookup659: polkadot_runtime_parachains::paras::UpgradeStrategy */ PolkadotRuntimeParachainsParasUpgradeStrategy: { _enum: ["SetGoAheadSignal", "ApplyAtExpectedBlock"], }, - /** Lookup660: polkadot_runtime_parachains::paras::ParaLifecycle */ + /** Lookup661: polkadot_runtime_parachains::paras::ParaLifecycle */ PolkadotRuntimeParachainsParasParaLifecycle: { _enum: [ "Onboarding", @@ -5433,25 +5446,25 @@ export default { "OffboardingParachain", ], }, - /** Lookup662: polkadot_runtime_parachains::paras::ParaPastCodeMeta */ + /** Lookup663: polkadot_runtime_parachains::paras::ParaPastCodeMeta */ PolkadotRuntimeParachainsParasParaPastCodeMeta: { upgradeTimes: "Vec", lastPruned: "Option", }, - /** Lookup664: polkadot_runtime_parachains::paras::ReplacementTimes */ + /** Lookup665: polkadot_runtime_parachains::paras::ReplacementTimes */ PolkadotRuntimeParachainsParasReplacementTimes: { expectedAt: "u32", activatedAt: "u32", }, - /** Lookup666: polkadot_primitives::v7::UpgradeGoAhead */ + /** Lookup667: polkadot_primitives::v7::UpgradeGoAhead */ PolkadotPrimitivesV7UpgradeGoAhead: { _enum: ["Abort", "GoAhead"], }, - /** Lookup667: polkadot_primitives::v7::UpgradeRestriction */ + /** Lookup668: polkadot_primitives::v7::UpgradeRestriction */ PolkadotPrimitivesV7UpgradeRestriction: { _enum: ["Present"], }, - /** Lookup668: polkadot_runtime_parachains::paras::pallet::Error */ + /** Lookup669: polkadot_runtime_parachains::paras::pallet::Error */ PolkadotRuntimeParachainsParasPalletError: { _enum: [ "NotRegistered", @@ -5469,18 +5482,18 @@ export default { "InvalidCode", ], }, - /** Lookup670: polkadot_runtime_parachains::initializer::BufferedSessionChange */ + /** Lookup671: polkadot_runtime_parachains::initializer::BufferedSessionChange */ PolkadotRuntimeParachainsInitializerBufferedSessionChange: { validators: "Vec", queued: "Vec", sessionIndex: "u32", }, - /** Lookup672: polkadot_core_primitives::InboundDownwardMessage */ + /** Lookup673: polkadot_core_primitives::InboundDownwardMessage */ PolkadotCorePrimitivesInboundDownwardMessage: { sentAt: "u32", msg: "Bytes", }, - /** Lookup673: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest */ + /** Lookup674: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest */ PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest: { confirmed: "bool", age: "u32", @@ -5489,7 +5502,7 @@ export default { maxCapacity: "u32", maxTotalSize: "u32", }, - /** Lookup675: polkadot_runtime_parachains::hrmp::HrmpChannel */ + /** Lookup676: polkadot_runtime_parachains::hrmp::HrmpChannel */ PolkadotRuntimeParachainsHrmpHrmpChannel: { maxCapacity: "u32", maxTotalSize: "u32", @@ -5500,12 +5513,12 @@ export default { senderDeposit: "u128", recipientDeposit: "u128", }, - /** Lookup677: polkadot_core_primitives::InboundHrmpMessage */ + /** Lookup678: polkadot_core_primitives::InboundHrmpMessage */ PolkadotCorePrimitivesInboundHrmpMessage: { sentAt: "u32", data: "Bytes", }, - /** Lookup680: polkadot_runtime_parachains::hrmp::pallet::Error */ + /** Lookup681: polkadot_runtime_parachains::hrmp::pallet::Error */ PolkadotRuntimeParachainsHrmpPalletError: { _enum: [ "OpenHrmpChannelToSelf", @@ -5530,7 +5543,7 @@ export default { "ChannelCreationNotAuthorized", ], }, - /** Lookup682: polkadot_primitives::v7::SessionInfo */ + /** Lookup683: polkadot_primitives::v7::SessionInfo */ PolkadotPrimitivesV7SessionInfo: { activeValidatorIndices: "Vec", randomSeed: "[u8;32]", @@ -5547,20 +5560,20 @@ export default { neededApprovals: "u32", }, /** - * Lookup683: polkadot_primitives::v7::IndexedVec */ PolkadotPrimitivesV7IndexedVecValidatorIndex: "Vec", - /** Lookup684: polkadot_primitives::v7::IndexedVec */ + /** Lookup685: polkadot_primitives::v7::IndexedVec */ PolkadotPrimitivesV7IndexedVecGroupIndex: "Vec>", - /** Lookup686: polkadot_primitives::v7::DisputeState */ + /** Lookup687: polkadot_primitives::v7::DisputeState */ PolkadotPrimitivesV7DisputeState: { validatorsFor: "BitVec", validatorsAgainst: "BitVec", start: "u32", concludedAt: "Option", }, - /** Lookup688: polkadot_runtime_parachains::disputes::pallet::Error */ + /** Lookup689: polkadot_runtime_parachains::disputes::pallet::Error */ PolkadotRuntimeParachainsDisputesPalletError: { _enum: [ "DuplicateDisputeStatementSets", @@ -5574,7 +5587,7 @@ export default { "UnconfirmedDispute", ], }, - /** Lookup689: polkadot_primitives::v7::slashing::PendingSlashes */ + /** Lookup690: polkadot_primitives::v7::slashing::PendingSlashes */ PolkadotPrimitivesV7SlashingPendingSlashes: { _alias: { keys_: "keys", @@ -5582,7 +5595,7 @@ export default { keys_: "BTreeMap", kind: "PolkadotPrimitivesV7SlashingSlashingOffenceKind", }, - /** Lookup693: polkadot_runtime_parachains::disputes::slashing::pallet::Error */ + /** Lookup694: polkadot_runtime_parachains::disputes::slashing::pallet::Error */ PolkadotRuntimeParachainsDisputesSlashingPalletError: { _enum: [ "InvalidKeyOwnershipProof", @@ -5593,7 +5606,7 @@ export default { "DuplicateSlashingReport", ], }, - /** Lookup694: pallet_message_queue::BookState */ + /** Lookup695: pallet_message_queue::BookState */ PalletMessageQueueBookState: { _alias: { size_: "size", @@ -5605,12 +5618,12 @@ export default { messageCount: "u64", size_: "u64", }, - /** Lookup696: pallet_message_queue::Neighbours */ + /** Lookup697: pallet_message_queue::Neighbours */ PalletMessageQueueNeighbours: { prev: "PolkadotRuntimeParachainsInclusionAggregateMessageOrigin", next: "PolkadotRuntimeParachainsInclusionAggregateMessageOrigin", }, - /** Lookup698: pallet_message_queue::Page */ + /** Lookup699: pallet_message_queue::Page */ PalletMessageQueuePage: { remaining: "u32", remainingSize: "u32", @@ -5619,7 +5632,7 @@ export default { last: "u32", heap: "Bytes", }, - /** Lookup700: pallet_message_queue::pallet::Error */ + /** Lookup701: pallet_message_queue::pallet::Error */ PalletMessageQueueError: { _enum: [ "NotReapable", @@ -5633,38 +5646,38 @@ export default { "RecursiveDisallowed", ], }, - /** Lookup701: polkadot_runtime_parachains::assigner_on_demand::types::CoreAffinityCount */ + /** Lookup702: polkadot_runtime_parachains::assigner_on_demand::types::CoreAffinityCount */ PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount: { coreIndex: "u32", count: "u32", }, - /** Lookup702: polkadot_runtime_parachains::assigner_on_demand::types::QueueStatusType */ + /** Lookup703: polkadot_runtime_parachains::assigner_on_demand::types::QueueStatusType */ PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType: { traffic: "u128", nextIndex: "u32", smallestIndex: "u32", freedIndices: "BinaryHeapReverseQueueIndex", }, - /** Lookup704: BinaryHeap */ + /** Lookup705: BinaryHeap */ BinaryHeapReverseQueueIndex: "Vec", - /** Lookup707: BinaryHeap */ + /** Lookup708: BinaryHeap */ BinaryHeapEnqueuedOrder: "Vec", - /** Lookup708: polkadot_runtime_parachains::assigner_on_demand::types::EnqueuedOrder */ + /** Lookup709: polkadot_runtime_parachains::assigner_on_demand::types::EnqueuedOrder */ PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder: { paraId: "u32", idx: "u32", }, - /** Lookup712: polkadot_runtime_parachains::assigner_on_demand::pallet::Error */ + /** Lookup713: polkadot_runtime_parachains::assigner_on_demand::pallet::Error */ PolkadotRuntimeParachainsAssignerOnDemandPalletError: { _enum: ["QueueFull", "SpotPriceHigherThanMaxAmount"], }, - /** Lookup713: polkadot_runtime_common::paras_registrar::ParaInfo */ + /** Lookup714: polkadot_runtime_common::paras_registrar::ParaInfo */ PolkadotRuntimeCommonParasRegistrarParaInfo: { manager: "AccountId32", deposit: "u128", locked: "Option", }, - /** Lookup715: polkadot_runtime_common::paras_registrar::pallet::Error */ + /** Lookup716: polkadot_runtime_common::paras_registrar::pallet::Error */ PolkadotRuntimeCommonParasRegistrarPalletError: { _enum: [ "NotRegistered", @@ -5683,12 +5696,12 @@ export default { "CannotSwap", ], }, - /** Lookup716: pallet_utility::pallet::Error */ + /** Lookup717: pallet_utility::pallet::Error */ PalletUtilityError: { _enum: ["TooManyCalls"], }, /** - * Lookup718: pallet_identity::types::Registration> */ PalletIdentityRegistration: { @@ -5696,18 +5709,18 @@ export default { deposit: "u128", info: "PalletIdentityLegacyIdentityInfo", }, - /** Lookup727: pallet_identity::types::RegistrarInfo */ + /** Lookup728: pallet_identity::types::RegistrarInfo */ PalletIdentityRegistrarInfo: { account: "AccountId32", fee: "u128", fields: "u64", }, - /** Lookup729: pallet_identity::types::AuthorityProperties> */ + /** Lookup730: pallet_identity::types::AuthorityProperties> */ PalletIdentityAuthorityProperties: { suffix: "Bytes", allocation: "u32", }, - /** Lookup732: pallet_identity::pallet::Error */ + /** Lookup733: pallet_identity::pallet::Error */ PalletIdentityError: { _enum: [ "TooManySubAccounts", @@ -5739,7 +5752,7 @@ export default { ], }, /** - * Lookup735: pallet_scheduler::Scheduled, * BlockNumber, dancelight_runtime::OriginCaller, sp_core::crypto::AccountId32> */ @@ -5750,29 +5763,29 @@ export default { maybePeriodic: "Option<(u32,u32)>", origin: "DancelightRuntimeOriginCaller", }, - /** Lookup737: pallet_scheduler::RetryConfig */ + /** Lookup738: pallet_scheduler::RetryConfig */ PalletSchedulerRetryConfig: { totalRetries: "u8", remaining: "u8", period: "u32", }, - /** Lookup738: pallet_scheduler::pallet::Error */ + /** Lookup739: pallet_scheduler::pallet::Error */ PalletSchedulerError: { _enum: ["FailedToSchedule", "NotFound", "TargetBlockNumberInPast", "RescheduleNoChange", "Named"], }, - /** Lookup741: pallet_proxy::ProxyDefinition */ + /** Lookup742: pallet_proxy::ProxyDefinition */ PalletProxyProxyDefinition: { delegate: "AccountId32", proxyType: "DancelightRuntimeProxyType", delay: "u32", }, - /** Lookup745: pallet_proxy::Announcement */ + /** Lookup746: pallet_proxy::Announcement */ PalletProxyAnnouncement: { real: "AccountId32", callHash: "H256", height: "u32", }, - /** Lookup747: pallet_proxy::pallet::Error */ + /** Lookup748: pallet_proxy::pallet::Error */ PalletProxyError: { _enum: [ "TooMany", @@ -5785,14 +5798,14 @@ export default { "NoSelfProxy", ], }, - /** Lookup749: pallet_multisig::Multisig */ + /** Lookup750: pallet_multisig::Multisig */ PalletMultisigMultisig: { when: "PalletMultisigTimepoint", deposit: "u128", depositor: "AccountId32", approvals: "Vec", }, - /** Lookup751: pallet_multisig::pallet::Error */ + /** Lookup752: pallet_multisig::pallet::Error */ PalletMultisigError: { _enum: [ "MinimumThreshold", @@ -5811,7 +5824,7 @@ export default { "AlreadyStored", ], }, - /** Lookup752: pallet_preimage::OldRequestStatus */ + /** Lookup753: pallet_preimage::OldRequestStatus */ PalletPreimageOldRequestStatus: { _enum: { Unrequested: { @@ -5826,7 +5839,7 @@ export default { }, }, /** - * Lookup755: pallet_preimage::RequestStatus> */ PalletPreimageRequestStatus: { @@ -5842,7 +5855,7 @@ export default { }, }, }, - /** Lookup760: pallet_preimage::pallet::Error */ + /** Lookup761: pallet_preimage::pallet::Error */ PalletPreimageError: { _enum: [ "TooBig", @@ -5856,11 +5869,11 @@ export default { "NoCost", ], }, - /** Lookup761: pallet_asset_rate::pallet::Error */ + /** Lookup762: pallet_asset_rate::pallet::Error */ PalletAssetRateError: { _enum: ["UnknownAssetKind", "AlreadyExists", "Overflow"], }, - /** Lookup762: pallet_xcm::pallet::QueryStatus */ + /** Lookup763: pallet_xcm::pallet::QueryStatus */ PalletXcmQueryStatus: { _enum: { Pending: { @@ -5879,7 +5892,7 @@ export default { }, }, }, - /** Lookup766: xcm::VersionedResponse */ + /** Lookup767: xcm::VersionedResponse */ XcmVersionedResponse: { _enum: { __Unused0: "Null", @@ -5889,7 +5902,7 @@ export default { V4: "StagingXcmV4Response", }, }, - /** Lookup772: pallet_xcm::pallet::VersionMigrationStage */ + /** Lookup773: pallet_xcm::pallet::VersionMigrationStage */ PalletXcmVersionMigrationStage: { _enum: { MigrateSupportedVersion: "Null", @@ -5898,14 +5911,14 @@ export default { MigrateAndNotifyOldTargets: "Null", }, }, - /** Lookup774: pallet_xcm::pallet::RemoteLockedFungibleRecord */ + /** Lookup775: pallet_xcm::pallet::RemoteLockedFungibleRecord */ PalletXcmRemoteLockedFungibleRecord: { amount: "u128", owner: "XcmVersionedLocation", locker: "XcmVersionedLocation", consumers: "Vec<(Null,u128)>", }, - /** Lookup781: pallet_xcm::pallet::Error */ + /** Lookup782: pallet_xcm::pallet::Error */ PalletXcmError: { _enum: [ "Unreachable", @@ -5935,11 +5948,11 @@ export default { "LocalExecutionIncomplete", ], }, - /** Lookup782: pallet_migrations::pallet::Error */ + /** Lookup783: pallet_migrations::pallet::Error */ PalletMigrationsError: { _enum: ["PreimageMissing", "WrongUpperBound", "PreimageIsTooBig", "PreimageAlreadyExists"], }, - /** Lookup786: pallet_beefy::pallet::Error */ + /** Lookup787: pallet_beefy::pallet::Error */ PalletBeefyError: { _enum: [ "InvalidKeyOwnershipProof", @@ -5951,43 +5964,43 @@ export default { "InvalidConfiguration", ], }, - /** Lookup787: sp_consensus_beefy::mmr::BeefyAuthoritySet */ + /** Lookup788: sp_consensus_beefy::mmr::BeefyAuthoritySet */ SpConsensusBeefyMmrBeefyAuthoritySet: { id: "u64", len: "u32", keysetCommitment: "H256", }, - /** Lookup788: snowbridge_beacon_primitives::types::CompactBeaconState */ + /** Lookup789: snowbridge_beacon_primitives::types::CompactBeaconState */ SnowbridgeBeaconPrimitivesCompactBeaconState: { slot: "Compact", blockRootsRoot: "H256", }, - /** Lookup789: snowbridge_beacon_primitives::types::SyncCommitteePrepared */ + /** Lookup790: snowbridge_beacon_primitives::types::SyncCommitteePrepared */ SnowbridgeBeaconPrimitivesSyncCommitteePrepared: { root: "H256", - pubkeys: "[Lookup791;512]", + pubkeys: "[Lookup792;512]", aggregatePubkey: "SnowbridgeMilagroBlsKeysPublicKey", }, - /** Lookup791: snowbridge_milagro_bls::keys::PublicKey */ + /** Lookup792: snowbridge_milagro_bls::keys::PublicKey */ SnowbridgeMilagroBlsKeysPublicKey: { point: "SnowbridgeAmclBls381Ecp", }, - /** Lookup792: snowbridge_amcl::bls381::ecp::ECP */ + /** Lookup793: snowbridge_amcl::bls381::ecp::ECP */ SnowbridgeAmclBls381Ecp: { x: "SnowbridgeAmclBls381Fp", y: "SnowbridgeAmclBls381Fp", z: "SnowbridgeAmclBls381Fp", }, - /** Lookup793: snowbridge_amcl::bls381::fp::FP */ + /** Lookup794: snowbridge_amcl::bls381::fp::FP */ SnowbridgeAmclBls381Fp: { x: "SnowbridgeAmclBls381Big", xes: "i32", }, - /** Lookup794: snowbridge_amcl::bls381::big::Big */ + /** Lookup795: snowbridge_amcl::bls381::big::Big */ SnowbridgeAmclBls381Big: { w: "[i32;14]", }, - /** Lookup797: snowbridge_beacon_primitives::types::ForkVersions */ + /** Lookup798: snowbridge_beacon_primitives::types::ForkVersions */ SnowbridgeBeaconPrimitivesForkVersions: { genesis: "SnowbridgeBeaconPrimitivesFork", altair: "SnowbridgeBeaconPrimitivesFork", @@ -5995,12 +6008,12 @@ export default { capella: "SnowbridgeBeaconPrimitivesFork", deneb: "SnowbridgeBeaconPrimitivesFork", }, - /** Lookup798: snowbridge_beacon_primitives::types::Fork */ + /** Lookup799: snowbridge_beacon_primitives::types::Fork */ SnowbridgeBeaconPrimitivesFork: { version: "[u8;4]", epoch: "u64", }, - /** Lookup799: snowbridge_pallet_ethereum_client::pallet::Error */ + /** Lookup800: snowbridge_pallet_ethereum_client::pallet::Error */ SnowbridgePalletEthereumClientError: { _enum: { SkippedSyncCommitteePeriod: "Null", @@ -6030,11 +6043,11 @@ export default { Halted: "Null", }, }, - /** Lookup800: snowbridge_beacon_primitives::bls::BlsError */ + /** Lookup801: snowbridge_beacon_primitives::bls::BlsError */ SnowbridgeBeaconPrimitivesBlsBlsError: { _enum: ["InvalidSignature", "InvalidPublicKey", "InvalidAggregatePublicKeys", "SignatureVerificationFailed"], }, - /** Lookup801: polkadot_runtime_common::paras_sudo_wrapper::pallet::Error */ + /** Lookup802: polkadot_runtime_common::paras_sudo_wrapper::pallet::Error */ PolkadotRuntimeCommonParasSudoWrapperPalletError: { _enum: [ "ParaDoesntExist", @@ -6048,12 +6061,12 @@ export default { "TooManyCores", ], }, - /** Lookup802: tp_traits::ActiveEraInfo */ + /** Lookup803: tp_traits::ActiveEraInfo */ TpTraitsActiveEraInfo: { index: "u32", start: "Option", }, - /** Lookup804: pallet_external_validators::pallet::Error */ + /** Lookup805: pallet_external_validators::pallet::Error */ PalletExternalValidatorsError: { _enum: [ "TooManyInvulnerables", @@ -6063,24 +6076,24 @@ export default { "UnableToDeriveCollatorId", ], }, - /** Lookup805: pallet_sudo::pallet::Error */ + /** Lookup806: pallet_sudo::pallet::Error */ PalletSudoError: { _enum: ["RequireSudo"], }, - /** Lookup808: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ + /** Lookup809: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ FrameSystemExtensionsCheckNonZeroSender: "Null", - /** Lookup809: frame_system::extensions::check_spec_version::CheckSpecVersion */ + /** Lookup810: frame_system::extensions::check_spec_version::CheckSpecVersion */ FrameSystemExtensionsCheckSpecVersion: "Null", - /** Lookup810: frame_system::extensions::check_tx_version::CheckTxVersion */ + /** Lookup811: frame_system::extensions::check_tx_version::CheckTxVersion */ FrameSystemExtensionsCheckTxVersion: "Null", - /** Lookup811: frame_system::extensions::check_genesis::CheckGenesis */ + /** Lookup812: frame_system::extensions::check_genesis::CheckGenesis */ FrameSystemExtensionsCheckGenesis: "Null", - /** Lookup814: frame_system::extensions::check_nonce::CheckNonce */ + /** Lookup815: frame_system::extensions::check_nonce::CheckNonce */ FrameSystemExtensionsCheckNonce: "Compact", - /** Lookup815: frame_system::extensions::check_weight::CheckWeight */ + /** Lookup816: frame_system::extensions::check_weight::CheckWeight */ FrameSystemExtensionsCheckWeight: "Null", - /** Lookup816: pallet_transaction_payment::ChargeTransactionPayment */ + /** Lookup817: pallet_transaction_payment::ChargeTransactionPayment */ PalletTransactionPaymentChargeTransactionPayment: "Compact", - /** Lookup817: dancelight_runtime::Runtime */ + /** Lookup818: dancelight_runtime::Runtime */ DancelightRuntimeRuntime: "Null", }; diff --git a/typescript-api/src/dancelight/interfaces/registry.ts b/typescript-api/src/dancelight/interfaces/registry.ts index 9266f6d0d..d299abfb1 100644 --- a/typescript-api/src/dancelight/interfaces/registry.ts +++ b/typescript-api/src/dancelight/interfaces/registry.ts @@ -114,6 +114,7 @@ import type { PalletExternalValidatorsCall, PalletExternalValidatorsError, PalletExternalValidatorsEvent, + PalletExternalValidatorsForcing, PalletGrandpaCall, PalletGrandpaError, PalletGrandpaEvent, @@ -566,6 +567,7 @@ declare module "@polkadot/types/types/registry" { PalletExternalValidatorsCall: PalletExternalValidatorsCall; PalletExternalValidatorsError: PalletExternalValidatorsError; PalletExternalValidatorsEvent: PalletExternalValidatorsEvent; + PalletExternalValidatorsForcing: PalletExternalValidatorsForcing; PalletGrandpaCall: PalletGrandpaCall; PalletGrandpaError: PalletGrandpaError; PalletGrandpaEvent: PalletGrandpaEvent; diff --git a/typescript-api/src/dancelight/interfaces/types-lookup.ts b/typescript-api/src/dancelight/interfaces/types-lookup.ts index 4dc104c4a..95479e0b1 100644 --- a/typescript-api/src/dancelight/interfaces/types-lookup.ts +++ b/typescript-api/src/dancelight/interfaces/types-lookup.ts @@ -5056,7 +5056,16 @@ declare module "@polkadot/types/lookup" { readonly asRemoveWhitelisted: { readonly who: AccountId32; } & Struct; - readonly type: "SkipExternalValidators" | "AddWhitelisted" | "RemoveWhitelisted"; + readonly isForceNoEras: boolean; + readonly isForceNewEra: boolean; + readonly isForceNewEraAlways: boolean; + readonly type: + | "SkipExternalValidators" + | "AddWhitelisted" + | "RemoveWhitelisted" + | "ForceNoEras" + | "ForceNewEra" + | "ForceNewEraAlways"; } /** @name PalletRootTestingCall (428) */ @@ -5935,16 +5944,33 @@ declare module "@polkadot/types/lookup" { readonly asWhitelistedValidatorRemoved: { readonly accountId: AccountId32; } & Struct; - readonly type: "WhitelistedValidatorAdded" | "WhitelistedValidatorRemoved"; + readonly isNewEra: boolean; + readonly asNewEra: { + readonly era: u32; + } & Struct; + readonly isForceEra: boolean; + readonly asForceEra: { + readonly mode: PalletExternalValidatorsForcing; + } & Struct; + readonly type: "WhitelistedValidatorAdded" | "WhitelistedValidatorRemoved" | "NewEra" | "ForceEra"; + } + + /** @name PalletExternalValidatorsForcing (470) */ + interface PalletExternalValidatorsForcing extends Enum { + readonly isNotForcing: boolean; + readonly isForceNew: boolean; + readonly isForceNone: boolean; + readonly isForceAlways: boolean; + readonly type: "NotForcing" | "ForceNew" | "ForceNone" | "ForceAlways"; } - /** @name PalletRootTestingEvent (470) */ + /** @name PalletRootTestingEvent (471) */ interface PalletRootTestingEvent extends Enum { readonly isDefensiveTestCall: boolean; readonly type: "DefensiveTestCall"; } - /** @name PalletSudoEvent (471) */ + /** @name PalletSudoEvent (472) */ interface PalletSudoEvent extends Enum { readonly isSudid: boolean; readonly asSudid: { @@ -5963,7 +5989,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Sudid" | "KeyChanged" | "KeyRemoved" | "SudoAsDone"; } - /** @name FrameSystemPhase (472) */ + /** @name FrameSystemPhase (473) */ interface FrameSystemPhase extends Enum { readonly isApplyExtrinsic: boolean; readonly asApplyExtrinsic: u32; @@ -5972,33 +5998,33 @@ declare module "@polkadot/types/lookup" { readonly type: "ApplyExtrinsic" | "Finalization" | "Initialization"; } - /** @name FrameSystemLastRuntimeUpgradeInfo (474) */ + /** @name FrameSystemLastRuntimeUpgradeInfo (475) */ interface FrameSystemLastRuntimeUpgradeInfo extends Struct { readonly specVersion: Compact; readonly specName: Text; } - /** @name FrameSystemCodeUpgradeAuthorization (476) */ + /** @name FrameSystemCodeUpgradeAuthorization (477) */ interface FrameSystemCodeUpgradeAuthorization extends Struct { readonly codeHash: H256; readonly checkVersion: bool; } - /** @name FrameSystemLimitsBlockWeights (477) */ + /** @name FrameSystemLimitsBlockWeights (478) */ interface FrameSystemLimitsBlockWeights extends Struct { readonly baseBlock: SpWeightsWeightV2Weight; readonly maxBlock: SpWeightsWeightV2Weight; readonly perClass: FrameSupportDispatchPerDispatchClassWeightsPerClass; } - /** @name FrameSupportDispatchPerDispatchClassWeightsPerClass (478) */ + /** @name FrameSupportDispatchPerDispatchClassWeightsPerClass (479) */ interface FrameSupportDispatchPerDispatchClassWeightsPerClass extends Struct { readonly normal: FrameSystemLimitsWeightsPerClass; readonly operational: FrameSystemLimitsWeightsPerClass; readonly mandatory: FrameSystemLimitsWeightsPerClass; } - /** @name FrameSystemLimitsWeightsPerClass (479) */ + /** @name FrameSystemLimitsWeightsPerClass (480) */ interface FrameSystemLimitsWeightsPerClass extends Struct { readonly baseExtrinsic: SpWeightsWeightV2Weight; readonly maxExtrinsic: Option; @@ -6006,25 +6032,25 @@ declare module "@polkadot/types/lookup" { readonly reserved: Option; } - /** @name FrameSystemLimitsBlockLength (480) */ + /** @name FrameSystemLimitsBlockLength (481) */ interface FrameSystemLimitsBlockLength extends Struct { readonly max: FrameSupportDispatchPerDispatchClassU32; } - /** @name FrameSupportDispatchPerDispatchClassU32 (481) */ + /** @name FrameSupportDispatchPerDispatchClassU32 (482) */ interface FrameSupportDispatchPerDispatchClassU32 extends Struct { readonly normal: u32; readonly operational: u32; readonly mandatory: u32; } - /** @name SpWeightsRuntimeDbWeight (482) */ + /** @name SpWeightsRuntimeDbWeight (483) */ interface SpWeightsRuntimeDbWeight extends Struct { readonly read: u64; readonly write: u64; } - /** @name SpVersionRuntimeVersion (483) */ + /** @name SpVersionRuntimeVersion (484) */ interface SpVersionRuntimeVersion extends Struct { readonly specName: Text; readonly implName: Text; @@ -6036,7 +6062,7 @@ declare module "@polkadot/types/lookup" { readonly stateVersion: u8; } - /** @name FrameSystemError (487) */ + /** @name FrameSystemError (488) */ interface FrameSystemError extends Enum { readonly isInvalidSpecName: boolean; readonly isSpecVersionNeedsToIncrease: boolean; @@ -6059,7 +6085,7 @@ declare module "@polkadot/types/lookup" { | "Unauthorized"; } - /** @name SpConsensusBabeDigestsPreDigest (494) */ + /** @name SpConsensusBabeDigestsPreDigest (495) */ interface SpConsensusBabeDigestsPreDigest extends Enum { readonly isPrimary: boolean; readonly asPrimary: SpConsensusBabeDigestsPrimaryPreDigest; @@ -6070,39 +6096,39 @@ declare module "@polkadot/types/lookup" { readonly type: "Primary" | "SecondaryPlain" | "SecondaryVRF"; } - /** @name SpConsensusBabeDigestsPrimaryPreDigest (495) */ + /** @name SpConsensusBabeDigestsPrimaryPreDigest (496) */ interface SpConsensusBabeDigestsPrimaryPreDigest extends Struct { readonly authorityIndex: u32; readonly slot: u64; readonly vrfSignature: SpCoreSr25519VrfVrfSignature; } - /** @name SpCoreSr25519VrfVrfSignature (496) */ + /** @name SpCoreSr25519VrfVrfSignature (497) */ interface SpCoreSr25519VrfVrfSignature extends Struct { readonly preOutput: U8aFixed; readonly proof: U8aFixed; } - /** @name SpConsensusBabeDigestsSecondaryPlainPreDigest (497) */ + /** @name SpConsensusBabeDigestsSecondaryPlainPreDigest (498) */ interface SpConsensusBabeDigestsSecondaryPlainPreDigest extends Struct { readonly authorityIndex: u32; readonly slot: u64; } - /** @name SpConsensusBabeDigestsSecondaryVRFPreDigest (498) */ + /** @name SpConsensusBabeDigestsSecondaryVRFPreDigest (499) */ interface SpConsensusBabeDigestsSecondaryVRFPreDigest extends Struct { readonly authorityIndex: u32; readonly slot: u64; readonly vrfSignature: SpCoreSr25519VrfVrfSignature; } - /** @name SpConsensusBabeBabeEpochConfiguration (499) */ + /** @name SpConsensusBabeBabeEpochConfiguration (500) */ interface SpConsensusBabeBabeEpochConfiguration extends Struct { readonly c: ITuple<[u64, u64]>; readonly allowedSlots: SpConsensusBabeAllowedSlots; } - /** @name PalletBabeError (503) */ + /** @name PalletBabeError (504) */ interface PalletBabeError extends Enum { readonly isInvalidEquivocationProof: boolean; readonly isInvalidKeyOwnershipProof: boolean; @@ -6115,14 +6141,14 @@ declare module "@polkadot/types/lookup" { | "InvalidConfiguration"; } - /** @name PalletBalancesBalanceLock (505) */ + /** @name PalletBalancesBalanceLock (506) */ interface PalletBalancesBalanceLock extends Struct { readonly id: U8aFixed; readonly amount: u128; readonly reasons: PalletBalancesReasons; } - /** @name PalletBalancesReasons (506) */ + /** @name PalletBalancesReasons (507) */ interface PalletBalancesReasons extends Enum { readonly isFee: boolean; readonly isMisc: boolean; @@ -6130,13 +6156,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Fee" | "Misc" | "All"; } - /** @name PalletBalancesReserveData (509) */ + /** @name PalletBalancesReserveData (510) */ interface PalletBalancesReserveData extends Struct { readonly id: U8aFixed; readonly amount: u128; } - /** @name DancelightRuntimeRuntimeHoldReason (513) */ + /** @name DancelightRuntimeRuntimeHoldReason (514) */ interface DancelightRuntimeRuntimeHoldReason extends Enum { readonly isContainerRegistrar: boolean; readonly asContainerRegistrar: PalletRegistrarHoldReason; @@ -6147,31 +6173,31 @@ declare module "@polkadot/types/lookup" { readonly type: "ContainerRegistrar" | "DataPreservers" | "Preimage"; } - /** @name PalletRegistrarHoldReason (514) */ + /** @name PalletRegistrarHoldReason (515) */ interface PalletRegistrarHoldReason extends Enum { readonly isRegistrarDeposit: boolean; readonly type: "RegistrarDeposit"; } - /** @name PalletDataPreserversHoldReason (515) */ + /** @name PalletDataPreserversHoldReason (516) */ interface PalletDataPreserversHoldReason extends Enum { readonly isProfileDeposit: boolean; readonly type: "ProfileDeposit"; } - /** @name PalletPreimageHoldReason (516) */ + /** @name PalletPreimageHoldReason (517) */ interface PalletPreimageHoldReason extends Enum { readonly isPreimage: boolean; readonly type: "Preimage"; } - /** @name FrameSupportTokensMiscIdAmount (519) */ + /** @name FrameSupportTokensMiscIdAmount (520) */ interface FrameSupportTokensMiscIdAmount extends Struct { readonly id: Null; readonly amount: u128; } - /** @name PalletBalancesError (521) */ + /** @name PalletBalancesError (522) */ interface PalletBalancesError extends Enum { readonly isVestingBalance: boolean; readonly isLiquidityRestrictions: boolean; @@ -6200,26 +6226,26 @@ declare module "@polkadot/types/lookup" { | "DeltaZero"; } - /** @name PalletTransactionPaymentReleases (522) */ + /** @name PalletTransactionPaymentReleases (523) */ interface PalletTransactionPaymentReleases extends Enum { readonly isV1Ancient: boolean; readonly isV2: boolean; readonly type: "V1Ancient" | "V2"; } - /** @name SpStakingOffenceOffenceDetails (523) */ + /** @name SpStakingOffenceOffenceDetails (524) */ interface SpStakingOffenceOffenceDetails extends Struct { readonly offender: ITuple<[AccountId32, Null]>; readonly reporters: Vec; } - /** @name PalletRegistrarDepositInfo (535) */ + /** @name PalletRegistrarDepositInfo (536) */ interface PalletRegistrarDepositInfo extends Struct { readonly creator: AccountId32; readonly deposit: u128; } - /** @name PalletRegistrarError (536) */ + /** @name PalletRegistrarError (537) */ interface PalletRegistrarError extends Enum { readonly isParaIdAlreadyRegistered: boolean; readonly isParaIdNotRegistered: boolean; @@ -6258,7 +6284,7 @@ declare module "@polkadot/types/lookup" { | "WasmCodeNecessary"; } - /** @name PalletConfigurationHostConfiguration (537) */ + /** @name PalletConfigurationHostConfiguration (538) */ interface PalletConfigurationHostConfiguration extends Struct { readonly maxCollators: u32; readonly minOrchestratorCollators: u32; @@ -6271,13 +6297,13 @@ declare module "@polkadot/types/lookup" { readonly maxParachainCoresPercentage: Option; } - /** @name PalletConfigurationError (540) */ + /** @name PalletConfigurationError (541) */ interface PalletConfigurationError extends Enum { readonly isInvalidNewValue: boolean; readonly type: "InvalidNewValue"; } - /** @name PalletInvulnerablesError (542) */ + /** @name PalletInvulnerablesError (543) */ interface PalletInvulnerablesError extends Enum { readonly isTooManyInvulnerables: boolean; readonly isAlreadyInvulnerable: boolean; @@ -6292,26 +6318,26 @@ declare module "@polkadot/types/lookup" { | "UnableToDeriveCollatorId"; } - /** @name DpCollatorAssignmentAssignedCollatorsAccountId32 (543) */ + /** @name DpCollatorAssignmentAssignedCollatorsAccountId32 (544) */ interface DpCollatorAssignmentAssignedCollatorsAccountId32 extends Struct { readonly orchestratorChain: Vec; readonly containerChains: BTreeMap>; } - /** @name DpCollatorAssignmentAssignedCollatorsPublic (548) */ + /** @name DpCollatorAssignmentAssignedCollatorsPublic (549) */ interface DpCollatorAssignmentAssignedCollatorsPublic extends Struct { readonly orchestratorChain: Vec; readonly containerChains: BTreeMap>; } - /** @name TpTraitsContainerChainBlockInfo (556) */ + /** @name TpTraitsContainerChainBlockInfo (557) */ interface TpTraitsContainerChainBlockInfo extends Struct { readonly blockNumber: u32; readonly author: AccountId32; readonly latestSlotNumber: u64; } - /** @name PalletAuthorNotingError (557) */ + /** @name PalletAuthorNotingError (558) */ interface PalletAuthorNotingError extends Enum { readonly isFailedReading: boolean; readonly isFailedDecodingHeader: boolean; @@ -6330,7 +6356,7 @@ declare module "@polkadot/types/lookup" { | "NonAuraDigest"; } - /** @name PalletServicesPaymentError (558) */ + /** @name PalletServicesPaymentError (559) */ interface PalletServicesPaymentError extends Enum { readonly isInsufficientFundsToPurchaseCredits: boolean; readonly isInsufficientCredits: boolean; @@ -6338,7 +6364,7 @@ declare module "@polkadot/types/lookup" { readonly type: "InsufficientFundsToPurchaseCredits" | "InsufficientCredits" | "CreditPriceTooExpensive"; } - /** @name PalletDataPreserversRegisteredProfile (559) */ + /** @name PalletDataPreserversRegisteredProfile (560) */ interface PalletDataPreserversRegisteredProfile extends Struct { readonly account: AccountId32; readonly deposit: u128; @@ -6346,7 +6372,7 @@ declare module "@polkadot/types/lookup" { readonly assignment: Option>; } - /** @name PalletDataPreserversError (565) */ + /** @name PalletDataPreserversError (566) */ interface PalletDataPreserversError extends Enum { readonly isNoBootNodes: boolean; readonly isUnknownProfileId: boolean; @@ -6371,10 +6397,10 @@ declare module "@polkadot/types/lookup" { | "CantDeleteAssignedProfile"; } - /** @name SpCoreCryptoKeyTypeId (570) */ + /** @name SpCoreCryptoKeyTypeId (571) */ interface SpCoreCryptoKeyTypeId extends U8aFixed {} - /** @name PalletSessionError (571) */ + /** @name PalletSessionError (572) */ interface PalletSessionError extends Enum { readonly isInvalidProof: boolean; readonly isNoAssociatedValidatorId: boolean; @@ -6384,7 +6410,7 @@ declare module "@polkadot/types/lookup" { readonly type: "InvalidProof" | "NoAssociatedValidatorId" | "DuplicatedKey" | "NoKeys" | "NoAccount"; } - /** @name PalletGrandpaStoredState (572) */ + /** @name PalletGrandpaStoredState (573) */ interface PalletGrandpaStoredState extends Enum { readonly isLive: boolean; readonly isPendingPause: boolean; @@ -6401,7 +6427,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Live" | "PendingPause" | "Paused" | "PendingResume"; } - /** @name PalletGrandpaStoredPendingChange (573) */ + /** @name PalletGrandpaStoredPendingChange (574) */ interface PalletGrandpaStoredPendingChange extends Struct { readonly scheduledAt: u32; readonly delay: u32; @@ -6409,7 +6435,7 @@ declare module "@polkadot/types/lookup" { readonly forced: Option; } - /** @name PalletGrandpaError (575) */ + /** @name PalletGrandpaError (576) */ interface PalletGrandpaError extends Enum { readonly isPauseFailed: boolean; readonly isResumeFailed: boolean; @@ -6428,13 +6454,13 @@ declare module "@polkadot/types/lookup" { | "DuplicateOffenceReport"; } - /** @name PalletInflationRewardsChainsToRewardValue (578) */ + /** @name PalletInflationRewardsChainsToRewardValue (579) */ interface PalletInflationRewardsChainsToRewardValue extends Struct { readonly paraIds: Vec; readonly rewardsPerChain: u128; } - /** @name PalletTreasuryProposal (579) */ + /** @name PalletTreasuryProposal (580) */ interface PalletTreasuryProposal extends Struct { readonly proposer: AccountId32; readonly value: u128; @@ -6442,7 +6468,7 @@ declare module "@polkadot/types/lookup" { readonly bond: u128; } - /** @name PalletTreasurySpendStatus (581) */ + /** @name PalletTreasurySpendStatus (582) */ interface PalletTreasurySpendStatus extends Struct { readonly assetKind: Null; readonly amount: u128; @@ -6452,7 +6478,7 @@ declare module "@polkadot/types/lookup" { readonly status: PalletTreasuryPaymentState; } - /** @name PalletTreasuryPaymentState (582) */ + /** @name PalletTreasuryPaymentState (583) */ interface PalletTreasuryPaymentState extends Enum { readonly isPending: boolean; readonly isAttempted: boolean; @@ -6463,10 +6489,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Pending" | "Attempted" | "Failed"; } - /** @name FrameSupportPalletId (584) */ + /** @name FrameSupportPalletId (585) */ interface FrameSupportPalletId extends U8aFixed {} - /** @name PalletTreasuryError (585) */ + /** @name PalletTreasuryError (586) */ interface PalletTreasuryError extends Enum { readonly isInvalidIndex: boolean; readonly isTooManyApprovals: boolean; @@ -6493,7 +6519,7 @@ declare module "@polkadot/types/lookup" { | "Inconclusive"; } - /** @name PalletConvictionVotingVoteVoting (587) */ + /** @name PalletConvictionVotingVoteVoting (588) */ interface PalletConvictionVotingVoteVoting extends Enum { readonly isCasting: boolean; readonly asCasting: PalletConvictionVotingVoteCasting; @@ -6502,23 +6528,23 @@ declare module "@polkadot/types/lookup" { readonly type: "Casting" | "Delegating"; } - /** @name PalletConvictionVotingVoteCasting (588) */ + /** @name PalletConvictionVotingVoteCasting (589) */ interface PalletConvictionVotingVoteCasting extends Struct { readonly votes: Vec>; readonly delegations: PalletConvictionVotingDelegations; readonly prior: PalletConvictionVotingVotePriorLock; } - /** @name PalletConvictionVotingDelegations (592) */ + /** @name PalletConvictionVotingDelegations (593) */ interface PalletConvictionVotingDelegations extends Struct { readonly votes: u128; readonly capital: u128; } - /** @name PalletConvictionVotingVotePriorLock (593) */ + /** @name PalletConvictionVotingVotePriorLock (594) */ interface PalletConvictionVotingVotePriorLock extends ITuple<[u32, u128]> {} - /** @name PalletConvictionVotingVoteDelegating (594) */ + /** @name PalletConvictionVotingVoteDelegating (595) */ interface PalletConvictionVotingVoteDelegating extends Struct { readonly balance: u128; readonly target: AccountId32; @@ -6527,7 +6553,7 @@ declare module "@polkadot/types/lookup" { readonly prior: PalletConvictionVotingVotePriorLock; } - /** @name PalletConvictionVotingError (598) */ + /** @name PalletConvictionVotingError (599) */ interface PalletConvictionVotingError extends Enum { readonly isNotOngoing: boolean; readonly isNotVoter: boolean; @@ -6556,7 +6582,7 @@ declare module "@polkadot/types/lookup" { | "BadClass"; } - /** @name PalletReferendaReferendumInfoConvictionVotingTally (599) */ + /** @name PalletReferendaReferendumInfoConvictionVotingTally (600) */ interface PalletReferendaReferendumInfoConvictionVotingTally extends Enum { readonly isOngoing: boolean; readonly asOngoing: PalletReferendaReferendumStatusConvictionVotingTally; @@ -6573,7 +6599,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Ongoing" | "Approved" | "Rejected" | "Cancelled" | "TimedOut" | "Killed"; } - /** @name PalletReferendaReferendumStatusConvictionVotingTally (600) */ + /** @name PalletReferendaReferendumStatusConvictionVotingTally (601) */ interface PalletReferendaReferendumStatusConvictionVotingTally extends Struct { readonly track: u16; readonly origin: DancelightRuntimeOriginCaller; @@ -6588,19 +6614,19 @@ declare module "@polkadot/types/lookup" { readonly alarm: Option]>>; } - /** @name PalletReferendaDeposit (601) */ + /** @name PalletReferendaDeposit (602) */ interface PalletReferendaDeposit extends Struct { readonly who: AccountId32; readonly amount: u128; } - /** @name PalletReferendaDecidingStatus (604) */ + /** @name PalletReferendaDecidingStatus (605) */ interface PalletReferendaDecidingStatus extends Struct { readonly since: u32; readonly confirming: Option; } - /** @name PalletReferendaTrackInfo (612) */ + /** @name PalletReferendaTrackInfo (613) */ interface PalletReferendaTrackInfo extends Struct { readonly name: Text; readonly maxDeciding: u32; @@ -6613,7 +6639,7 @@ declare module "@polkadot/types/lookup" { readonly minSupport: PalletReferendaCurve; } - /** @name PalletReferendaCurve (613) */ + /** @name PalletReferendaCurve (614) */ interface PalletReferendaCurve extends Enum { readonly isLinearDecreasing: boolean; readonly asLinearDecreasing: { @@ -6637,7 +6663,7 @@ declare module "@polkadot/types/lookup" { readonly type: "LinearDecreasing" | "SteppedDecreasing" | "Reciprocal"; } - /** @name PalletReferendaError (616) */ + /** @name PalletReferendaError (617) */ interface PalletReferendaError extends Enum { readonly isNotOngoing: boolean; readonly isHasDeposit: boolean; @@ -6670,12 +6696,12 @@ declare module "@polkadot/types/lookup" { | "PreimageStoredWithDifferentLength"; } - /** @name PalletRankedCollectiveMemberRecord (617) */ + /** @name PalletRankedCollectiveMemberRecord (618) */ interface PalletRankedCollectiveMemberRecord extends Struct { readonly rank: u16; } - /** @name PalletRankedCollectiveError (622) */ + /** @name PalletRankedCollectiveError (623) */ interface PalletRankedCollectiveError extends Enum { readonly isAlreadyMember: boolean; readonly isNotMember: boolean; @@ -6702,7 +6728,7 @@ declare module "@polkadot/types/lookup" { | "TooManyMembers"; } - /** @name PalletReferendaReferendumInfoRankedCollectiveTally (623) */ + /** @name PalletReferendaReferendumInfoRankedCollectiveTally (624) */ interface PalletReferendaReferendumInfoRankedCollectiveTally extends Enum { readonly isOngoing: boolean; readonly asOngoing: PalletReferendaReferendumStatusRankedCollectiveTally; @@ -6719,7 +6745,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Ongoing" | "Approved" | "Rejected" | "Cancelled" | "TimedOut" | "Killed"; } - /** @name PalletReferendaReferendumStatusRankedCollectiveTally (624) */ + /** @name PalletReferendaReferendumStatusRankedCollectiveTally (625) */ interface PalletReferendaReferendumStatusRankedCollectiveTally extends Struct { readonly track: u16; readonly origin: DancelightRuntimeOriginCaller; @@ -6734,7 +6760,7 @@ declare module "@polkadot/types/lookup" { readonly alarm: Option]>>; } - /** @name PalletWhitelistError (627) */ + /** @name PalletWhitelistError (628) */ interface PalletWhitelistError extends Enum { readonly isUnavailablePreImage: boolean; readonly isUndecodableCall: boolean; @@ -6749,7 +6775,7 @@ declare module "@polkadot/types/lookup" { | "CallAlreadyWhitelisted"; } - /** @name PolkadotRuntimeParachainsConfigurationHostConfiguration (628) */ + /** @name PolkadotRuntimeParachainsConfigurationHostConfiguration (629) */ interface PolkadotRuntimeParachainsConfigurationHostConfiguration extends Struct { readonly maxCodeSize: u32; readonly maxHeadDataSize: u32; @@ -6788,19 +6814,19 @@ declare module "@polkadot/types/lookup" { readonly schedulerParams: PolkadotPrimitivesVstagingSchedulerParams; } - /** @name PolkadotRuntimeParachainsConfigurationPalletError (631) */ + /** @name PolkadotRuntimeParachainsConfigurationPalletError (632) */ interface PolkadotRuntimeParachainsConfigurationPalletError extends Enum { readonly isInvalidNewValue: boolean; readonly type: "InvalidNewValue"; } - /** @name PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker (634) */ + /** @name PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker (635) */ interface PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker extends Struct { readonly buffer: Vec>; readonly latestNumber: u32; } - /** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (638) */ + /** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (639) */ interface PolkadotRuntimeParachainsInclusionCandidatePendingAvailability extends Struct { readonly core: u32; readonly hash_: H256; @@ -6813,7 +6839,7 @@ declare module "@polkadot/types/lookup" { readonly backingGroup: u32; } - /** @name PolkadotRuntimeParachainsInclusionPalletError (639) */ + /** @name PolkadotRuntimeParachainsInclusionPalletError (640) */ interface PolkadotRuntimeParachainsInclusionPalletError extends Enum { readonly isValidatorIndexOutOfBounds: boolean; readonly isUnscheduledCandidate: boolean; @@ -6854,7 +6880,7 @@ declare module "@polkadot/types/lookup" { | "ParaHeadMismatch"; } - /** @name PolkadotPrimitivesV7ScrapedOnChainVotes (640) */ + /** @name PolkadotPrimitivesV7ScrapedOnChainVotes (641) */ interface PolkadotPrimitivesV7ScrapedOnChainVotes extends Struct { readonly session: u32; readonly backingValidatorsPerCandidate: Vec< @@ -6863,7 +6889,7 @@ declare module "@polkadot/types/lookup" { readonly disputes: Vec; } - /** @name PolkadotRuntimeParachainsParasInherentPalletError (645) */ + /** @name PolkadotRuntimeParachainsParasInherentPalletError (646) */ interface PolkadotRuntimeParachainsParasInherentPalletError extends Enum { readonly isTooManyInclusionInherents: boolean; readonly isInvalidParentHeader: boolean; @@ -6878,7 +6904,7 @@ declare module "@polkadot/types/lookup" { | "UnscheduledCandidate"; } - /** @name PolkadotRuntimeParachainsSchedulerPalletCoreOccupied (648) */ + /** @name PolkadotRuntimeParachainsSchedulerPalletCoreOccupied (649) */ interface PolkadotRuntimeParachainsSchedulerPalletCoreOccupied extends Enum { readonly isFree: boolean; readonly isParas: boolean; @@ -6886,14 +6912,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Free" | "Paras"; } - /** @name PolkadotRuntimeParachainsSchedulerPalletParasEntry (649) */ + /** @name PolkadotRuntimeParachainsSchedulerPalletParasEntry (650) */ interface PolkadotRuntimeParachainsSchedulerPalletParasEntry extends Struct { readonly assignment: PolkadotRuntimeParachainsSchedulerCommonAssignment; readonly availabilityTimeouts: u32; readonly ttl: u32; } - /** @name PolkadotRuntimeParachainsSchedulerCommonAssignment (650) */ + /** @name PolkadotRuntimeParachainsSchedulerCommonAssignment (651) */ interface PolkadotRuntimeParachainsSchedulerCommonAssignment extends Enum { readonly isPool: boolean; readonly asPool: { @@ -6905,7 +6931,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Pool" | "Bulk"; } - /** @name PolkadotRuntimeParachainsParasPvfCheckActiveVoteState (655) */ + /** @name PolkadotRuntimeParachainsParasPvfCheckActiveVoteState (656) */ interface PolkadotRuntimeParachainsParasPvfCheckActiveVoteState extends Struct { readonly votesAccept: BitVec; readonly votesReject: BitVec; @@ -6914,7 +6940,7 @@ declare module "@polkadot/types/lookup" { readonly causes: Vec; } - /** @name PolkadotRuntimeParachainsParasPvfCheckCause (657) */ + /** @name PolkadotRuntimeParachainsParasPvfCheckCause (658) */ interface PolkadotRuntimeParachainsParasPvfCheckCause extends Enum { readonly isOnboarding: boolean; readonly asOnboarding: u32; @@ -6927,14 +6953,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Onboarding" | "Upgrade"; } - /** @name PolkadotRuntimeParachainsParasUpgradeStrategy (658) */ + /** @name PolkadotRuntimeParachainsParasUpgradeStrategy (659) */ interface PolkadotRuntimeParachainsParasUpgradeStrategy extends Enum { readonly isSetGoAheadSignal: boolean; readonly isApplyAtExpectedBlock: boolean; readonly type: "SetGoAheadSignal" | "ApplyAtExpectedBlock"; } - /** @name PolkadotRuntimeParachainsParasParaLifecycle (660) */ + /** @name PolkadotRuntimeParachainsParasParaLifecycle (661) */ interface PolkadotRuntimeParachainsParasParaLifecycle extends Enum { readonly isOnboarding: boolean; readonly isParathread: boolean; @@ -6953,32 +6979,32 @@ declare module "@polkadot/types/lookup" { | "OffboardingParachain"; } - /** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (662) */ + /** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (663) */ interface PolkadotRuntimeParachainsParasParaPastCodeMeta extends Struct { readonly upgradeTimes: Vec; readonly lastPruned: Option; } - /** @name PolkadotRuntimeParachainsParasReplacementTimes (664) */ + /** @name PolkadotRuntimeParachainsParasReplacementTimes (665) */ interface PolkadotRuntimeParachainsParasReplacementTimes extends Struct { readonly expectedAt: u32; readonly activatedAt: u32; } - /** @name PolkadotPrimitivesV7UpgradeGoAhead (666) */ + /** @name PolkadotPrimitivesV7UpgradeGoAhead (667) */ interface PolkadotPrimitivesV7UpgradeGoAhead extends Enum { readonly isAbort: boolean; readonly isGoAhead: boolean; readonly type: "Abort" | "GoAhead"; } - /** @name PolkadotPrimitivesV7UpgradeRestriction (667) */ + /** @name PolkadotPrimitivesV7UpgradeRestriction (668) */ interface PolkadotPrimitivesV7UpgradeRestriction extends Enum { readonly isPresent: boolean; readonly type: "Present"; } - /** @name PolkadotRuntimeParachainsParasPalletError (668) */ + /** @name PolkadotRuntimeParachainsParasPalletError (669) */ interface PolkadotRuntimeParachainsParasPalletError extends Enum { readonly isNotRegistered: boolean; readonly isCannotOnboard: boolean; @@ -7009,20 +7035,20 @@ declare module "@polkadot/types/lookup" { | "InvalidCode"; } - /** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (670) */ + /** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (671) */ interface PolkadotRuntimeParachainsInitializerBufferedSessionChange extends Struct { readonly validators: Vec; readonly queued: Vec; readonly sessionIndex: u32; } - /** @name PolkadotCorePrimitivesInboundDownwardMessage (672) */ + /** @name PolkadotCorePrimitivesInboundDownwardMessage (673) */ interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct { readonly sentAt: u32; readonly msg: Bytes; } - /** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (673) */ + /** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (674) */ interface PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest extends Struct { readonly confirmed: bool; readonly age: u32; @@ -7032,7 +7058,7 @@ declare module "@polkadot/types/lookup" { readonly maxTotalSize: u32; } - /** @name PolkadotRuntimeParachainsHrmpHrmpChannel (675) */ + /** @name PolkadotRuntimeParachainsHrmpHrmpChannel (676) */ interface PolkadotRuntimeParachainsHrmpHrmpChannel extends Struct { readonly maxCapacity: u32; readonly maxTotalSize: u32; @@ -7044,13 +7070,13 @@ declare module "@polkadot/types/lookup" { readonly recipientDeposit: u128; } - /** @name PolkadotCorePrimitivesInboundHrmpMessage (677) */ + /** @name PolkadotCorePrimitivesInboundHrmpMessage (678) */ interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct { readonly sentAt: u32; readonly data: Bytes; } - /** @name PolkadotRuntimeParachainsHrmpPalletError (680) */ + /** @name PolkadotRuntimeParachainsHrmpPalletError (681) */ interface PolkadotRuntimeParachainsHrmpPalletError extends Enum { readonly isOpenHrmpChannelToSelf: boolean; readonly isOpenHrmpChannelInvalidRecipient: boolean; @@ -7095,7 +7121,7 @@ declare module "@polkadot/types/lookup" { | "ChannelCreationNotAuthorized"; } - /** @name PolkadotPrimitivesV7SessionInfo (682) */ + /** @name PolkadotPrimitivesV7SessionInfo (683) */ interface PolkadotPrimitivesV7SessionInfo extends Struct { readonly activeValidatorIndices: Vec; readonly randomSeed: U8aFixed; @@ -7112,13 +7138,13 @@ declare module "@polkadot/types/lookup" { readonly neededApprovals: u32; } - /** @name PolkadotPrimitivesV7IndexedVecValidatorIndex (683) */ + /** @name PolkadotPrimitivesV7IndexedVecValidatorIndex (684) */ interface PolkadotPrimitivesV7IndexedVecValidatorIndex extends Vec {} - /** @name PolkadotPrimitivesV7IndexedVecGroupIndex (684) */ + /** @name PolkadotPrimitivesV7IndexedVecGroupIndex (685) */ interface PolkadotPrimitivesV7IndexedVecGroupIndex extends Vec> {} - /** @name PolkadotPrimitivesV7DisputeState (686) */ + /** @name PolkadotPrimitivesV7DisputeState (687) */ interface PolkadotPrimitivesV7DisputeState extends Struct { readonly validatorsFor: BitVec; readonly validatorsAgainst: BitVec; @@ -7126,7 +7152,7 @@ declare module "@polkadot/types/lookup" { readonly concludedAt: Option; } - /** @name PolkadotRuntimeParachainsDisputesPalletError (688) */ + /** @name PolkadotRuntimeParachainsDisputesPalletError (689) */ interface PolkadotRuntimeParachainsDisputesPalletError extends Enum { readonly isDuplicateDisputeStatementSets: boolean; readonly isAncientDisputeStatement: boolean; @@ -7149,13 +7175,13 @@ declare module "@polkadot/types/lookup" { | "UnconfirmedDispute"; } - /** @name PolkadotPrimitivesV7SlashingPendingSlashes (689) */ + /** @name PolkadotPrimitivesV7SlashingPendingSlashes (690) */ interface PolkadotPrimitivesV7SlashingPendingSlashes extends Struct { readonly keys_: BTreeMap; readonly kind: PolkadotPrimitivesV7SlashingSlashingOffenceKind; } - /** @name PolkadotRuntimeParachainsDisputesSlashingPalletError (693) */ + /** @name PolkadotRuntimeParachainsDisputesSlashingPalletError (694) */ interface PolkadotRuntimeParachainsDisputesSlashingPalletError extends Enum { readonly isInvalidKeyOwnershipProof: boolean; readonly isInvalidSessionIndex: boolean; @@ -7172,7 +7198,7 @@ declare module "@polkadot/types/lookup" { | "DuplicateSlashingReport"; } - /** @name PalletMessageQueueBookState (694) */ + /** @name PalletMessageQueueBookState (695) */ interface PalletMessageQueueBookState extends Struct { readonly begin: u32; readonly end: u32; @@ -7182,13 +7208,13 @@ declare module "@polkadot/types/lookup" { readonly size_: u64; } - /** @name PalletMessageQueueNeighbours (696) */ + /** @name PalletMessageQueueNeighbours (697) */ interface PalletMessageQueueNeighbours extends Struct { readonly prev: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin; readonly next: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin; } - /** @name PalletMessageQueuePage (698) */ + /** @name PalletMessageQueuePage (699) */ interface PalletMessageQueuePage extends Struct { readonly remaining: u32; readonly remainingSize: u32; @@ -7198,7 +7224,7 @@ declare module "@polkadot/types/lookup" { readonly heap: Bytes; } - /** @name PalletMessageQueueError (700) */ + /** @name PalletMessageQueueError (701) */ interface PalletMessageQueueError extends Enum { readonly isNotReapable: boolean; readonly isNoPage: boolean; @@ -7221,13 +7247,13 @@ declare module "@polkadot/types/lookup" { | "RecursiveDisallowed"; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount (701) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount (702) */ interface PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount extends Struct { readonly coreIndex: u32; readonly count: u32; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType (702) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType (703) */ interface PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType extends Struct { readonly traffic: u128; readonly nextIndex: u32; @@ -7235,33 +7261,33 @@ declare module "@polkadot/types/lookup" { readonly freedIndices: BinaryHeapReverseQueueIndex; } - /** @name BinaryHeapReverseQueueIndex (704) */ + /** @name BinaryHeapReverseQueueIndex (705) */ interface BinaryHeapReverseQueueIndex extends Vec {} - /** @name BinaryHeapEnqueuedOrder (707) */ + /** @name BinaryHeapEnqueuedOrder (708) */ interface BinaryHeapEnqueuedOrder extends Vec {} - /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder (708) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder (709) */ interface PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder extends Struct { readonly paraId: u32; readonly idx: u32; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletError (712) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletError (713) */ interface PolkadotRuntimeParachainsAssignerOnDemandPalletError extends Enum { readonly isQueueFull: boolean; readonly isSpotPriceHigherThanMaxAmount: boolean; readonly type: "QueueFull" | "SpotPriceHigherThanMaxAmount"; } - /** @name PolkadotRuntimeCommonParasRegistrarParaInfo (713) */ + /** @name PolkadotRuntimeCommonParasRegistrarParaInfo (714) */ interface PolkadotRuntimeCommonParasRegistrarParaInfo extends Struct { readonly manager: AccountId32; readonly deposit: u128; readonly locked: Option; } - /** @name PolkadotRuntimeCommonParasRegistrarPalletError (715) */ + /** @name PolkadotRuntimeCommonParasRegistrarPalletError (716) */ interface PolkadotRuntimeCommonParasRegistrarPalletError extends Enum { readonly isNotRegistered: boolean; readonly isAlreadyRegistered: boolean; @@ -7294,33 +7320,33 @@ declare module "@polkadot/types/lookup" { | "CannotSwap"; } - /** @name PalletUtilityError (716) */ + /** @name PalletUtilityError (717) */ interface PalletUtilityError extends Enum { readonly isTooManyCalls: boolean; readonly type: "TooManyCalls"; } - /** @name PalletIdentityRegistration (718) */ + /** @name PalletIdentityRegistration (719) */ interface PalletIdentityRegistration extends Struct { readonly judgements: Vec>; readonly deposit: u128; readonly info: PalletIdentityLegacyIdentityInfo; } - /** @name PalletIdentityRegistrarInfo (727) */ + /** @name PalletIdentityRegistrarInfo (728) */ interface PalletIdentityRegistrarInfo extends Struct { readonly account: AccountId32; readonly fee: u128; readonly fields: u64; } - /** @name PalletIdentityAuthorityProperties (729) */ + /** @name PalletIdentityAuthorityProperties (730) */ interface PalletIdentityAuthorityProperties extends Struct { readonly suffix: Bytes; readonly allocation: u32; } - /** @name PalletIdentityError (732) */ + /** @name PalletIdentityError (733) */ interface PalletIdentityError extends Enum { readonly isTooManySubAccounts: boolean; readonly isNotFound: boolean; @@ -7377,7 +7403,7 @@ declare module "@polkadot/types/lookup" { | "NotExpired"; } - /** @name PalletSchedulerScheduled (735) */ + /** @name PalletSchedulerScheduled (736) */ interface PalletSchedulerScheduled extends Struct { readonly maybeId: Option; readonly priority: u8; @@ -7386,14 +7412,14 @@ declare module "@polkadot/types/lookup" { readonly origin: DancelightRuntimeOriginCaller; } - /** @name PalletSchedulerRetryConfig (737) */ + /** @name PalletSchedulerRetryConfig (738) */ interface PalletSchedulerRetryConfig extends Struct { readonly totalRetries: u8; readonly remaining: u8; readonly period: u32; } - /** @name PalletSchedulerError (738) */ + /** @name PalletSchedulerError (739) */ interface PalletSchedulerError extends Enum { readonly isFailedToSchedule: boolean; readonly isNotFound: boolean; @@ -7403,21 +7429,21 @@ declare module "@polkadot/types/lookup" { readonly type: "FailedToSchedule" | "NotFound" | "TargetBlockNumberInPast" | "RescheduleNoChange" | "Named"; } - /** @name PalletProxyProxyDefinition (741) */ + /** @name PalletProxyProxyDefinition (742) */ interface PalletProxyProxyDefinition extends Struct { readonly delegate: AccountId32; readonly proxyType: DancelightRuntimeProxyType; readonly delay: u32; } - /** @name PalletProxyAnnouncement (745) */ + /** @name PalletProxyAnnouncement (746) */ interface PalletProxyAnnouncement extends Struct { readonly real: AccountId32; readonly callHash: H256; readonly height: u32; } - /** @name PalletProxyError (747) */ + /** @name PalletProxyError (748) */ interface PalletProxyError extends Enum { readonly isTooMany: boolean; readonly isNotFound: boolean; @@ -7438,7 +7464,7 @@ declare module "@polkadot/types/lookup" { | "NoSelfProxy"; } - /** @name PalletMultisigMultisig (749) */ + /** @name PalletMultisigMultisig (750) */ interface PalletMultisigMultisig extends Struct { readonly when: PalletMultisigTimepoint; readonly deposit: u128; @@ -7446,7 +7472,7 @@ declare module "@polkadot/types/lookup" { readonly approvals: Vec; } - /** @name PalletMultisigError (751) */ + /** @name PalletMultisigError (752) */ interface PalletMultisigError extends Enum { readonly isMinimumThreshold: boolean; readonly isAlreadyApproved: boolean; @@ -7479,7 +7505,7 @@ declare module "@polkadot/types/lookup" { | "AlreadyStored"; } - /** @name PalletPreimageOldRequestStatus (752) */ + /** @name PalletPreimageOldRequestStatus (753) */ interface PalletPreimageOldRequestStatus extends Enum { readonly isUnrequested: boolean; readonly asUnrequested: { @@ -7495,7 +7521,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unrequested" | "Requested"; } - /** @name PalletPreimageRequestStatus (755) */ + /** @name PalletPreimageRequestStatus (756) */ interface PalletPreimageRequestStatus extends Enum { readonly isUnrequested: boolean; readonly asUnrequested: { @@ -7511,7 +7537,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unrequested" | "Requested"; } - /** @name PalletPreimageError (760) */ + /** @name PalletPreimageError (761) */ interface PalletPreimageError extends Enum { readonly isTooBig: boolean; readonly isAlreadyNoted: boolean; @@ -7534,7 +7560,7 @@ declare module "@polkadot/types/lookup" { | "NoCost"; } - /** @name PalletAssetRateError (761) */ + /** @name PalletAssetRateError (762) */ interface PalletAssetRateError extends Enum { readonly isUnknownAssetKind: boolean; readonly isAlreadyExists: boolean; @@ -7542,7 +7568,7 @@ declare module "@polkadot/types/lookup" { readonly type: "UnknownAssetKind" | "AlreadyExists" | "Overflow"; } - /** @name PalletXcmQueryStatus (762) */ + /** @name PalletXcmQueryStatus (763) */ interface PalletXcmQueryStatus extends Enum { readonly isPending: boolean; readonly asPending: { @@ -7564,7 +7590,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Pending" | "VersionNotifier" | "Ready"; } - /** @name XcmVersionedResponse (766) */ + /** @name XcmVersionedResponse (767) */ interface XcmVersionedResponse extends Enum { readonly isV2: boolean; readonly asV2: XcmV2Response; @@ -7575,7 +7601,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name PalletXcmVersionMigrationStage (772) */ + /** @name PalletXcmVersionMigrationStage (773) */ interface PalletXcmVersionMigrationStage extends Enum { readonly isMigrateSupportedVersion: boolean; readonly isMigrateVersionNotifiers: boolean; @@ -7589,7 +7615,7 @@ declare module "@polkadot/types/lookup" { | "MigrateAndNotifyOldTargets"; } - /** @name PalletXcmRemoteLockedFungibleRecord (774) */ + /** @name PalletXcmRemoteLockedFungibleRecord (775) */ interface PalletXcmRemoteLockedFungibleRecord extends Struct { readonly amount: u128; readonly owner: XcmVersionedLocation; @@ -7597,7 +7623,7 @@ declare module "@polkadot/types/lookup" { readonly consumers: Vec>; } - /** @name PalletXcmError (781) */ + /** @name PalletXcmError (782) */ interface PalletXcmError extends Enum { readonly isUnreachable: boolean; readonly isSendFailure: boolean; @@ -7650,7 +7676,7 @@ declare module "@polkadot/types/lookup" { | "LocalExecutionIncomplete"; } - /** @name PalletMigrationsError (782) */ + /** @name PalletMigrationsError (783) */ interface PalletMigrationsError extends Enum { readonly isPreimageMissing: boolean; readonly isWrongUpperBound: boolean; @@ -7659,7 +7685,7 @@ declare module "@polkadot/types/lookup" { readonly type: "PreimageMissing" | "WrongUpperBound" | "PreimageIsTooBig" | "PreimageAlreadyExists"; } - /** @name PalletBeefyError (786) */ + /** @name PalletBeefyError (787) */ interface PalletBeefyError extends Enum { readonly isInvalidKeyOwnershipProof: boolean; readonly isInvalidDoubleVotingProof: boolean; @@ -7678,50 +7704,50 @@ declare module "@polkadot/types/lookup" { | "InvalidConfiguration"; } - /** @name SpConsensusBeefyMmrBeefyAuthoritySet (787) */ + /** @name SpConsensusBeefyMmrBeefyAuthoritySet (788) */ interface SpConsensusBeefyMmrBeefyAuthoritySet extends Struct { readonly id: u64; readonly len: u32; readonly keysetCommitment: H256; } - /** @name SnowbridgeBeaconPrimitivesCompactBeaconState (788) */ + /** @name SnowbridgeBeaconPrimitivesCompactBeaconState (789) */ interface SnowbridgeBeaconPrimitivesCompactBeaconState extends Struct { readonly slot: Compact; readonly blockRootsRoot: H256; } - /** @name SnowbridgeBeaconPrimitivesSyncCommitteePrepared (789) */ + /** @name SnowbridgeBeaconPrimitivesSyncCommitteePrepared (790) */ interface SnowbridgeBeaconPrimitivesSyncCommitteePrepared extends Struct { readonly root: H256; readonly pubkeys: Vec; readonly aggregatePubkey: SnowbridgeMilagroBlsKeysPublicKey; } - /** @name SnowbridgeMilagroBlsKeysPublicKey (791) */ + /** @name SnowbridgeMilagroBlsKeysPublicKey (792) */ interface SnowbridgeMilagroBlsKeysPublicKey extends Struct { readonly point: SnowbridgeAmclBls381Ecp; } - /** @name SnowbridgeAmclBls381Ecp (792) */ + /** @name SnowbridgeAmclBls381Ecp (793) */ interface SnowbridgeAmclBls381Ecp extends Struct { readonly x: SnowbridgeAmclBls381Fp; readonly y: SnowbridgeAmclBls381Fp; readonly z: SnowbridgeAmclBls381Fp; } - /** @name SnowbridgeAmclBls381Fp (793) */ + /** @name SnowbridgeAmclBls381Fp (794) */ interface SnowbridgeAmclBls381Fp extends Struct { readonly x: SnowbridgeAmclBls381Big; readonly xes: i32; } - /** @name SnowbridgeAmclBls381Big (794) */ + /** @name SnowbridgeAmclBls381Big (795) */ interface SnowbridgeAmclBls381Big extends Struct { readonly w: Vec; } - /** @name SnowbridgeBeaconPrimitivesForkVersions (797) */ + /** @name SnowbridgeBeaconPrimitivesForkVersions (798) */ interface SnowbridgeBeaconPrimitivesForkVersions extends Struct { readonly genesis: SnowbridgeBeaconPrimitivesFork; readonly altair: SnowbridgeBeaconPrimitivesFork; @@ -7730,13 +7756,13 @@ declare module "@polkadot/types/lookup" { readonly deneb: SnowbridgeBeaconPrimitivesFork; } - /** @name SnowbridgeBeaconPrimitivesFork (798) */ + /** @name SnowbridgeBeaconPrimitivesFork (799) */ interface SnowbridgeBeaconPrimitivesFork extends Struct { readonly version: U8aFixed; readonly epoch: u64; } - /** @name SnowbridgePalletEthereumClientError (799) */ + /** @name SnowbridgePalletEthereumClientError (800) */ interface SnowbridgePalletEthereumClientError extends Enum { readonly isSkippedSyncCommitteePeriod: boolean; readonly isSyncCommitteeUpdateRequired: boolean; @@ -7792,7 +7818,7 @@ declare module "@polkadot/types/lookup" { | "Halted"; } - /** @name SnowbridgeBeaconPrimitivesBlsBlsError (800) */ + /** @name SnowbridgeBeaconPrimitivesBlsBlsError (801) */ interface SnowbridgeBeaconPrimitivesBlsBlsError extends Enum { readonly isInvalidSignature: boolean; readonly isInvalidPublicKey: boolean; @@ -7805,7 +7831,7 @@ declare module "@polkadot/types/lookup" { | "SignatureVerificationFailed"; } - /** @name PolkadotRuntimeCommonParasSudoWrapperPalletError (801) */ + /** @name PolkadotRuntimeCommonParasSudoWrapperPalletError (802) */ interface PolkadotRuntimeCommonParasSudoWrapperPalletError extends Enum { readonly isParaDoesntExist: boolean; readonly isParaAlreadyExists: boolean; @@ -7828,13 +7854,13 @@ declare module "@polkadot/types/lookup" { | "TooManyCores"; } - /** @name TpTraitsActiveEraInfo (802) */ + /** @name TpTraitsActiveEraInfo (803) */ interface TpTraitsActiveEraInfo extends Struct { readonly index: u32; readonly start: Option; } - /** @name PalletExternalValidatorsError (804) */ + /** @name PalletExternalValidatorsError (805) */ interface PalletExternalValidatorsError extends Enum { readonly isTooManyInvulnerables: boolean; readonly isAlreadyInvulnerable: boolean; @@ -7849,33 +7875,33 @@ declare module "@polkadot/types/lookup" { | "UnableToDeriveCollatorId"; } - /** @name PalletSudoError (805) */ + /** @name PalletSudoError (806) */ interface PalletSudoError extends Enum { readonly isRequireSudo: boolean; readonly type: "RequireSudo"; } - /** @name FrameSystemExtensionsCheckNonZeroSender (808) */ + /** @name FrameSystemExtensionsCheckNonZeroSender (809) */ type FrameSystemExtensionsCheckNonZeroSender = Null; - /** @name FrameSystemExtensionsCheckSpecVersion (809) */ + /** @name FrameSystemExtensionsCheckSpecVersion (810) */ type FrameSystemExtensionsCheckSpecVersion = Null; - /** @name FrameSystemExtensionsCheckTxVersion (810) */ + /** @name FrameSystemExtensionsCheckTxVersion (811) */ type FrameSystemExtensionsCheckTxVersion = Null; - /** @name FrameSystemExtensionsCheckGenesis (811) */ + /** @name FrameSystemExtensionsCheckGenesis (812) */ type FrameSystemExtensionsCheckGenesis = Null; - /** @name FrameSystemExtensionsCheckNonce (814) */ + /** @name FrameSystemExtensionsCheckNonce (815) */ interface FrameSystemExtensionsCheckNonce extends Compact {} - /** @name FrameSystemExtensionsCheckWeight (815) */ + /** @name FrameSystemExtensionsCheckWeight (816) */ type FrameSystemExtensionsCheckWeight = Null; - /** @name PalletTransactionPaymentChargeTransactionPayment (816) */ + /** @name PalletTransactionPaymentChargeTransactionPayment (817) */ interface PalletTransactionPaymentChargeTransactionPayment extends Compact {} - /** @name DancelightRuntimeRuntime (817) */ + /** @name DancelightRuntimeRuntime (818) */ type DancelightRuntimeRuntime = Null; } // declare module From e2fe742d9c3c28c067dcc963f49cf0fbeed02768 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 22 Oct 2024 14:39:55 +0200 Subject: [PATCH 18/82] Add era index to hook --- pallets/external-validators/src/lib.rs | 28 ++++++++++++++++---------- primitives/traits/src/lib.rs | 4 ++-- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/pallets/external-validators/src/lib.rs b/pallets/external-validators/src/lib.rs index 8ebde9583..ac1b52b9f 100644 --- a/pallets/external-validators/src/lib.rs +++ b/pallets/external-validators/src/lib.rs @@ -374,9 +374,10 @@ pub mod pallet { Ok(()) } - pub(crate) fn increase_era(new_index: SessionIndex) { + /// Increase era. Returns new era index. + pub(crate) fn increase_era(new_session_index: SessionIndex) -> EraIndex { // Increase era - >::mutate(|q| { + let era_index = >::mutate(|q| { if q.is_none() { *q = Some(ActiveEraInfo { index: 0, @@ -387,12 +388,14 @@ pub mod pallet { let q = q.as_mut().unwrap(); q.index += 1; - Self::deposit_event(Event::NewEra { era: q.index }); - // Set new active era start in next `on_finalize`. To guarantee usage of `Time` q.start = None; + + q.index }); - >::put(new_index); + >::put(new_session_index); + + era_index } /// Helper to set a new `ForceEra` mode. @@ -445,8 +448,8 @@ pub mod pallet { } impl pallet_session::SessionManager for Pallet { - fn new_session(new_index: SessionIndex) -> Option> { - if new_index <= 1 { + fn new_session(session: SessionIndex) -> Option> { + if session <= 1 { return None; } @@ -454,7 +457,7 @@ impl pallet_session::SessionManager for Pallet { Forcing::NotForcing => { // If enough sessions have elapsed, start new era let start_session = >::get(); - let current_session = new_index; + let current_session = session; if current_session.saturating_sub(start_session) >= T::SessionsPerEra::get() { true @@ -477,9 +480,11 @@ impl pallet_session::SessionManager for Pallet { return None; } - Self::increase_era(new_index); + let new_era_index = Self::increase_era(session); + + Self::deposit_event(Event::NewEra { era: new_era_index }); - T::OnEraStart::on_era_start(); + T::OnEraStart::on_era_start(new_era_index, session); let validators: Vec<_> = Self::validators(); @@ -492,6 +497,7 @@ impl pallet_session::SessionManager for Pallet { } fn end_session(index: SessionIndex) { + // This function needs to predict whether new_session(index+1) will start a new era let new_index = index.saturating_add(1); if new_index <= 1 { @@ -519,7 +525,7 @@ impl pallet_session::SessionManager for Pallet { return; } - T::OnEraEnd::on_era_end(); + T::OnEraEnd::on_era_end(index); } fn start_session(_start_index: SessionIndex) {} diff --git a/primitives/traits/src/lib.rs b/primitives/traits/src/lib.rs index fb4e33060..e4f68aa8f 100644 --- a/primitives/traits/src/lib.rs +++ b/primitives/traits/src/lib.rs @@ -476,13 +476,13 @@ pub trait ValidatorProvider { } pub trait OnEraStart { - fn on_era_start() {} + fn on_era_start(_era_index: EraIndex, _session_start: u32) {} } impl OnEraStart for () {} pub trait OnEraEnd { - fn on_era_end() {} + fn on_era_end(_era_index: EraIndex) {} } impl OnEraEnd for () {} From 99791eccd75bab85347eae5706721ff819a10fed Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 22 Oct 2024 14:54:54 +0200 Subject: [PATCH 19/82] impl for tuples --- primitives/traits/src/lib.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/primitives/traits/src/lib.rs b/primitives/traits/src/lib.rs index e4f68aa8f..21af8b25d 100644 --- a/primitives/traits/src/lib.rs +++ b/primitives/traits/src/lib.rs @@ -479,10 +479,20 @@ pub trait OnEraStart { fn on_era_start(_era_index: EraIndex, _session_start: u32) {} } -impl OnEraStart for () {} +#[impl_trait_for_tuples::impl_for_tuples(5)] +impl OnEraStart for Tuple { + fn on_era_start(era_index: EraIndex, session_start: u32) { + for_tuples!( #( Tuple::on_era_start(era_index, session_start); )* ); + } +} pub trait OnEraEnd { fn on_era_end(_era_index: EraIndex) {} } -impl OnEraEnd for () {} +#[impl_trait_for_tuples::impl_for_tuples(5)] +impl OnEraEnd for Tuple { + fn on_era_end(era_index: EraIndex) { + for_tuples!( #( Tuple::on_era_end(era_index); )* ); + } +} From 7cde7931aa6c477d5aa3b4712923ca84f790e646 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 22 Oct 2024 15:03:01 +0200 Subject: [PATCH 20/82] Make tests pass --- .../src/tests/external_validators_tests.rs | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs index bc8f39d6d..fa6b60e53 100644 --- a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs +++ b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs @@ -16,6 +16,7 @@ #![cfg(test)] +use std::collections::HashMap; use crate::ExternalValidators; use frame_support::traits::fungible::Mutate; use {crate::tests::common::*, frame_support::assert_ok, sp_std::vec}; @@ -34,10 +35,7 @@ fn validators_only_change_once_per_era() { .execute_with(|| { run_to_block(2); - // session 5 validators: ALICE, BOB - // session 6 validators: ALICE, BOB, 0x0f - // session 7 validators: ALICE, BOB, 0x0f - // session 12 validators: ALICE, BOB, 0x15 + let mut session_validators = HashMap::new(); for session in 1u32..=13 { let mock_validator = AccountId::from([10u8 + session as u8; 32]); @@ -62,9 +60,19 @@ fn validators_only_change_once_per_era() { run_to_session(session); let validators = Session::validators(); - println!("session {} validators: {:?}", session, validators); + session_validators.insert(session, validators); } - todo!(); + // 1 era = 6 sessions + // session_range => validators + // [0, 5] => Alice, Bob + // [6, 11] => Alice, Bob, 0x0f + // [12, ..] => Alice, Bob, 0x15 + assert_eq!(session_validators[&5], vec![AccountId::from(ALICE), AccountId::from(BOB)]); + assert_eq!(session_validators[&6], vec![AccountId::from(ALICE), AccountId::from(BOB), AccountId::from([0x0f; 32])]); + // TODO: if compiling with fast-runtime, this line will fail because 1 era = 3 sessions, so instead of + // validator 0x0f you will see 0x12 + assert_eq!(session_validators[&11], vec![AccountId::from(ALICE), AccountId::from(BOB), AccountId::from([0x0f; 32])]); + assert_eq!(session_validators[&12], vec![AccountId::from(ALICE), AccountId::from(BOB), AccountId::from([0x15; 32])]); }); } From cd86a844cd17ad288e336be4c2040cc3547d855e Mon Sep 17 00:00:00 2001 From: girazoki Date: Tue, 22 Oct 2024 16:08:24 +0200 Subject: [PATCH 21/82] adapt --- pallets/external-validator-slashes/src/lib.rs | 65 +++++-------------- .../external-validator-slashes/src/tests.rs | 14 ++-- 2 files changed, 22 insertions(+), 57 deletions(-) diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index 691b6c507..8d766d94e 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -44,6 +44,7 @@ use { offence::{OffenceDetails, OnOffenceHandler}, EraIndex, SessionIndex, }, + tp_traits::{EraIndexProvider, OnEraEnd, OnEraStart}, }; pub use pallet::*; @@ -54,18 +55,6 @@ mod mock; #[cfg(test)] mod tests; -/// Information regarding the active era (era in used in session). -#[derive(Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] -pub struct ActiveEraInfo { - /// Index of era. - pub index: EraIndex, - /// Moment of start expressed as millisecond from `$UNIX_EPOCH`. - /// - /// Start can be none if start hasn't been set for the era yet, - /// Start is set on the first on_finalize of the era to guarantee usage of `Time`. - pub start: Option, -} - #[frame_support::pallet] pub mod pallet { use super::*; @@ -123,6 +112,8 @@ pub mod pallet { /// Interface for interacting with a session pallet. type SessionInterface: SessionInterface; + + type EraIndexProvider: EraIndexProvider; } #[pallet::error] @@ -179,14 +170,6 @@ pub mod pallet { #[pallet::unbounded] pub type Invulnerables = StorageValue<_, Vec, ValueQuery>; - /// The active era information, it holds index and start. - /// - /// The active era is the era being currently rewarded. Validator set of this era must be - /// equal to [`SessionInterface::validators`]. - #[pallet::storage] - #[pallet::getter(fn active_era)] - pub type ActiveEra = StorageValue<_, ActiveEraInfo>; - #[pallet::call] impl Pallet { #[pallet::call_index(0)] @@ -198,7 +181,7 @@ pub mod pallet { ) -> DispatchResult { ensure_root(origin)?; - let active_era = Self::active_era().ok_or(Error::::ActiveEraNotSet)?.index; + let active_era = T::EraIndexProvider::active_era().index; ensure!( era >= active_era.saturating_sub(T::SlashDeferDuration::get()), Error::::DeferPeriodIsOver @@ -235,7 +218,7 @@ pub mod pallet { percentage: Perbill, ) -> DispatchResult { ensure_root(origin)?; - let active_era = Self::active_era().ok_or(Error::::ActiveEraNotSet)?.index; + let active_era = T::EraIndexProvider::active_era().index; ensure!(era < active_era, Error::::ProvidedFutureEra); let window_start = active_era.saturating_sub(T::BondingDuration::get()); @@ -289,15 +272,9 @@ where }; let active_era = { - let active_era = Self::active_era(); + let active_era = T::EraIndexProvider::active_era().index; add_db_reads_writes(1, 0); - if active_era.is_none() { - // This offence need not be re-submitted. - return consumed_weight; - } active_era - .expect("value checked not to be `None`; qed") - .index }; let active_era_start_session_index = Self::eras_start_session_index(active_era) .unwrap_or_else(|| { @@ -385,29 +362,15 @@ where } } -impl Pallet { - /// Start a new era. It does: - /// * Increment `active_era.index`, - /// * reset `active_era.start`, - /// * update `BondedEras` and apply slashes. - fn start_era(start_session: SessionIndex) { - let active_era = ActiveEra::::mutate(|active_era| { - let new_index = active_era.as_ref().map(|info| info.index + 1).unwrap_or(0); - *active_era = Some(ActiveEraInfo { - index: new_index, - // Set new active era start in next `on_finalize`. To guarantee usage of `Time` - start: None, - }); - new_index - }); - +impl OnEraStart for Pallet { + fn on_era_start(era_index: EraIndex, session_start: SessionIndex) { let bonding_duration = T::BondingDuration::get(); BondedEras::::mutate(|bonded| { - bonded.push((active_era, start_session)); + bonded.push((era_index, session_start)); - if active_era > bonding_duration { - let first_kept = active_era.defensive_saturating_sub(bonding_duration); + if era_index > bonding_duration { + let first_kept = era_index.defensive_saturating_sub(bonding_duration); // Prune out everything that's from before the first-kept index. let n_to_prune = bonded @@ -429,11 +392,13 @@ impl Pallet { } }); - ErasStartSessionIndex::::insert(&active_era, &start_session); + ErasStartSessionIndex::::insert(&era_index, &session_start); - Self::confirm_unconfirmed_slashes(active_era); + Self::confirm_unconfirmed_slashes(era_index); } +} +impl Pallet { /// Apply previously-unapplied slashes on the beginning of a new era, after a delay. fn confirm_unconfirmed_slashes(active_era: EraIndex) { let mut era_slashes = Slashes::::take(&active_era); diff --git a/pallets/external-validator-slashes/src/tests.rs b/pallets/external-validator-slashes/src/tests.rs index 2069ddc61..65d1f9d31 100644 --- a/pallets/external-validator-slashes/src/tests.rs +++ b/pallets/external-validator-slashes/src/tests.rs @@ -153,8 +153,8 @@ fn root_cannot_cancel_deferred_slash_if_outside_deferring_period() { #[test] fn test_after_bonding_period_we_can_remove_slashes() { new_test_ext().execute_with(|| { - Pallet::::start_era(0); - Pallet::::start_era(1); + Pallet::::on_era_start(0, 0); + Pallet::::on_era_start(1, 1); // we are storing a tuple (era index, start_session_block) assert_eq!(BondedEras::::get(), [(0, 0), (1, 1)]); @@ -182,7 +182,7 @@ fn test_after_bonding_period_we_can_remove_slashes() { }); // whenever we start the 6th era, we can remove everything from era 0 - Pallet::::start_era(6); + Pallet::::on_era_start(6, 6); assert_eq!(Slashes::::get(0), vec![]); }); @@ -191,8 +191,8 @@ fn test_after_bonding_period_we_can_remove_slashes() { #[test] fn test_on_offence_injects_offences() { new_test_ext().execute_with(|| { - Pallet::::start_era(0); - Pallet::::start_era(1); + Pallet::::on_era_start(0, 0); + Pallet::::on_era_start(1, 1); Pallet::::on_offence( &[OffenceDetails { offender: (1, ()), @@ -222,8 +222,8 @@ fn test_on_offence_injects_offences() { #[test] fn test_on_offence_does_not_work_for_invulnerables() { new_test_ext().execute_with(|| { - Pallet::::start_era(0); - Pallet::::start_era(1); + Pallet::::on_era_start(0, 0); + Pallet::::on_era_start(1, 1); // account 1 invulnerable Invulnerables::::put(vec![1]); Pallet::::on_offence( From 011c349022457d76162d88cee5d2f393eef63e0c Mon Sep 17 00:00:00 2001 From: girazoki Date: Tue, 22 Oct 2024 17:04:18 +0200 Subject: [PATCH 22/82] continue progress --- pallets/external-validator-slashes/src/lib.rs | 2 +- .../external-validator-slashes/src/mock.rs | 24 +++++++ .../external-validator-slashes/src/tests.rs | 67 +++++-------------- 3 files changed, 43 insertions(+), 50 deletions(-) diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index 8d766d94e..079c2cac0 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -219,7 +219,7 @@ pub mod pallet { ) -> DispatchResult { ensure_root(origin)?; let active_era = T::EraIndexProvider::active_era().index; - ensure!(era < active_era, Error::::ProvidedFutureEra); + ensure!(era <= active_era, Error::::ProvidedFutureEra); let window_start = active_era.saturating_sub(T::BondingDuration::get()); ensure!(era >= window_start, Error::::ProvidedNonSlashableEra); diff --git a/pallets/external-validator-slashes/src/mock.rs b/pallets/external-validator-slashes/src/mock.rs index 89226023d..8709852b5 100644 --- a/pallets/external-validator-slashes/src/mock.rs +++ b/pallets/external-validator-slashes/src/mock.rs @@ -28,6 +28,8 @@ use { BuildStorage, }, sp_staking::SessionIndex, + sp_std::cell::RefCell, + tp_traits::{ActiveEraInfo, EraIndex, EraIndexProvider}, }; type Block = frame_system::mocking::MockBlock; @@ -108,6 +110,27 @@ parameter_types! { pub const Offset: u64 = 0; } +pub struct MockEraIndexProvider; + +thread_local! { + pub static ERA_INDEX: RefCell = const { RefCell::new(0) }; +} + +impl MockEraIndexProvider { + pub fn with_era(era_index: EraIndex) { + ERA_INDEX.with(|r| *r.borrow_mut() = era_index); + } +} + +impl EraIndexProvider for MockEraIndexProvider { + fn active_era() -> ActiveEraInfo { + ActiveEraInfo { + index: ERA_INDEX.with(|q| (*q.borrow()).clone()), + start: None, + } + } +} + impl pallet_session::Config for Test { type SessionManager = pallet_session::historical::NoteHistoricalRoot; type Keys = SessionKeys; @@ -157,6 +180,7 @@ impl external_validator_info::Config for Test { type BondingDuration = BondingDuration; type SlashId = u32; type SessionInterface = (); + type EraIndexProvider = MockEraIndexProvider; } pub struct FullIdentificationOf; diff --git a/pallets/external-validator-slashes/src/tests.rs b/pallets/external-validator-slashes/src/tests.rs index 65d1f9d31..75cc00cbe 100644 --- a/pallets/external-validator-slashes/src/tests.rs +++ b/pallets/external-validator-slashes/src/tests.rs @@ -20,28 +20,10 @@ use { frame_support::{assert_noop, assert_ok}, }; -#[test] -fn cannot_inject_offence_if_era_info_is_not_there() { - new_test_ext().execute_with(|| { - assert_noop!( - ExternalValidatorSlashes::force_inject_slash( - RuntimeOrigin::root(), - 1, - 1u64, - Perbill::from_percent(75) - ), - Error::::ActiveEraNotSet - ); - }); -} - #[test] fn root_can_inject_manual_offence() { new_test_ext().execute_with(|| { - ActiveEra::::put(ActiveEraInfo { - index: 1, - start: Some(0u64), - }); + start_era(0, 0); assert_ok!(ExternalValidatorSlashes::force_inject_slash( RuntimeOrigin::root(), 0, @@ -65,10 +47,7 @@ fn root_can_inject_manual_offence() { #[test] fn cannot_inject_future_era_offence() { new_test_ext().execute_with(|| { - ActiveEra::::put(ActiveEraInfo { - index: 0, - start: Some(0u64), - }); + start_era(0, 0); assert_noop!( ExternalValidatorSlashes::force_inject_slash( RuntimeOrigin::root(), @@ -84,10 +63,7 @@ fn cannot_inject_future_era_offence() { #[test] fn cannot_inject_era_offence_too_far_in_the_past() { new_test_ext().execute_with(|| { - ActiveEra::::put(ActiveEraInfo { - index: 10, - start: Some(0u64), - }); + start_era(10, 0); //Bonding period is 5, we cannot inject slash for era 4 assert_noop!( ExternalValidatorSlashes::force_inject_slash( @@ -104,10 +80,7 @@ fn cannot_inject_era_offence_too_far_in_the_past() { #[test] fn root_can_cance_deferred_slash() { new_test_ext().execute_with(|| { - ActiveEra::::put(ActiveEraInfo { - index: 1, - start: Some(0u64), - }); + start_era(1, 0); assert_ok!(ExternalValidatorSlashes::force_inject_slash( RuntimeOrigin::root(), 0, @@ -127,10 +100,7 @@ fn root_can_cance_deferred_slash() { #[test] fn root_cannot_cancel_deferred_slash_if_outside_deferring_period() { new_test_ext().execute_with(|| { - ActiveEra::::put(ActiveEraInfo { - index: 1, - start: Some(0u64), - }); + start_era(1, 0); assert_ok!(ExternalValidatorSlashes::force_inject_slash( RuntimeOrigin::root(), 0, @@ -138,10 +108,7 @@ fn root_cannot_cancel_deferred_slash_if_outside_deferring_period() { Perbill::from_percent(75) )); - ActiveEra::::put(ActiveEraInfo { - index: 4, - start: Some(0u64), - }); + start_era(4, 0); assert_noop!( ExternalValidatorSlashes::cancel_deferred_slash(RuntimeOrigin::root(), 0, vec![0]), @@ -153,8 +120,8 @@ fn root_cannot_cancel_deferred_slash_if_outside_deferring_period() { #[test] fn test_after_bonding_period_we_can_remove_slashes() { new_test_ext().execute_with(|| { - Pallet::::on_era_start(0, 0); - Pallet::::on_era_start(1, 1); + start_era(0, 0); + start_era(1, 1); // we are storing a tuple (era index, start_session_block) assert_eq!(BondedEras::::get(), [(0, 0), (1, 1)]); @@ -176,10 +143,7 @@ fn test_after_bonding_period_we_can_remove_slashes() { }] ); - ActiveEra::::put(ActiveEraInfo { - index: 5, - start: Some(0u64), - }); + start_era(5, 5); // whenever we start the 6th era, we can remove everything from era 0 Pallet::::on_era_start(6, 6); @@ -191,8 +155,8 @@ fn test_after_bonding_period_we_can_remove_slashes() { #[test] fn test_on_offence_injects_offences() { new_test_ext().execute_with(|| { - Pallet::::on_era_start(0, 0); - Pallet::::on_era_start(1, 1); + start_era(0, 0); + start_era(1, 1); Pallet::::on_offence( &[OffenceDetails { offender: (1, ()), @@ -222,8 +186,8 @@ fn test_on_offence_injects_offences() { #[test] fn test_on_offence_does_not_work_for_invulnerables() { new_test_ext().execute_with(|| { - Pallet::::on_era_start(0, 0); - Pallet::::on_era_start(1, 1); + start_era(0, 0); + start_era(1, 1); // account 1 invulnerable Invulnerables::::put(vec![1]); Pallet::::on_offence( @@ -242,3 +206,8 @@ fn test_on_offence_does_not_work_for_invulnerables() { assert_eq!(Slashes::::get(slash_era), vec![]); }); } + +fn start_era(era_index: EraIndex, session_index: SessionIndex) { + Pallet::::on_era_start(era_index, session_index); + crate::mock::MockEraIndexProvider::with_era(era_index); +} From f465490de5d4aa829ef71c0ca443595b2c504804 Mon Sep 17 00:00:00 2001 From: girazoki Date: Tue, 22 Oct 2024 17:12:03 +0200 Subject: [PATCH 23/82] remove comments --- pallets/external-validator-slashes/src/lib.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index 079c2cac0..553f71bc8 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -14,20 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Tanssi. If not, see -//! # Author Noting Pallet -//! -//! This pallet notes the author of the different containerChains that have registered: -//! -//! The set of container chains is retrieved thanks to the GetContainerChains trait -//! For each containerChain, we inspect the Header stored in the relayChain as -//! a generic header. This is the first requirement for containerChains. -//! -//! The second requirement is that an Aura digest with the slot number for the containerChains -//! needs to exist -//! -//! Using those two requirements we can select who the author was based on the collators assigned -//! to that containerChain, by simply assigning the slot position. - #![cfg_attr(not(feature = "std"), no_std)] use { From 09cfcecb97facde7562e67accd13ce21b27b9bae Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 23 Oct 2024 09:48:23 +0200 Subject: [PATCH 24/82] Add integration tests --- pallets/external-validators/src/lib.rs | 27 +- pallets/external-validators/src/tests.rs | 48 ++ solo-chains/runtime/dancelight/src/lib.rs | 11 +- .../src/tests/external_validators_tests.rs | 450 +++++++++++++++++- 4 files changed, 513 insertions(+), 23 deletions(-) diff --git a/pallets/external-validators/src/lib.rs b/pallets/external-validators/src/lib.rs index ac1b52b9f..22a0b736f 100644 --- a/pallets/external-validators/src/lib.rs +++ b/pallets/external-validators/src/lib.rs @@ -37,6 +37,7 @@ use { sp_runtime::traits::Get, sp_runtime::RuntimeDebug, sp_staking::SessionIndex, + sp_std::collections::btree_set::BTreeSet, sp_std::vec::Vec, tp_traits::{ ActiveEraInfo, EraIndex, EraIndexProvider, OnEraEnd, OnEraStart, ValidatorProvider, @@ -105,6 +106,7 @@ pub mod pallet { /// A stable ID for a validator. type ValidatorId: Member + Parameter + + Ord + MaybeSerializeDeserialize + MaxEncodedLen + TryFrom; @@ -409,10 +411,15 @@ pub mod pallet { >::get().into() } - pub fn current_era() -> Option { - >::get().map(|era_info| era_info.index) + pub fn current_era() -> u32 { + >::get() + .map(|era_info| era_info.index) + .unwrap_or(0) } + /// Returns validators for the next session. Whitelisted validators first, then external validators. + /// The returned list is deduplicated, but the order is respected. + /// If `SkipExternalValidators` is true, this function will ignore external validators. pub fn validators() -> Vec { let mut validators: Vec<_> = WhitelistedValidators::::get().into(); @@ -420,7 +427,7 @@ pub mod pallet { validators.extend(ExternalValidators::::get()) } - validators + remove_duplicates(validators) } } @@ -447,6 +454,20 @@ pub mod pallet { } } +/// Keeps only the first instance of each element in the input vec. Respects ordering of elements. +fn remove_duplicates(input: Vec) -> Vec { + let mut seen = BTreeSet::new(); + let mut result = Vec::with_capacity(input.len()); + + for item in input { + if seen.insert(item.clone()) { + result.push(item); + } + } + + result +} + impl pallet_session::SessionManager for Pallet { fn new_session(session: SessionIndex) -> Option> { if session <= 1 { diff --git a/pallets/external-validators/src/tests.rs b/pallets/external-validators/src/tests.rs index da7366a1e..5165f3dfb 100644 --- a/pallets/external-validators/src/tests.rs +++ b/pallets/external-validators/src/tests.rs @@ -223,3 +223,51 @@ fn can_skip_external_validators() { assert_eq!(validators, Some(vec![1, 2])); }); } + +#[test] +fn duplicate_validators_are_deduplicated() { + new_test_ext().execute_with(|| { + initialize_to_block(1); + assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); + assert_ok!(ExternalValidators::set_external_validators(vec![2])); + + let validators = ExternalValidators::new_session(6); + assert_eq!(validators, Some(vec![1, 2])); + }); +} + +#[test] +fn duplicate_validator_order_is_preserved() { + new_test_ext().execute_with(|| { + initialize_to_block(1); + // Whitelisted validators have priority, so their ordering should be respected + // Need to manually remove and add each whitelisted because there is no "set_whitelisted" + assert_ok!(ExternalValidators::remove_whitelisted( + RuntimeOrigin::signed(RootAccount::get()), + 1 + )); + assert_ok!(ExternalValidators::remove_whitelisted( + RuntimeOrigin::signed(RootAccount::get()), + 2 + )); + assert_ok!(ExternalValidators::add_whitelisted( + RuntimeOrigin::signed(RootAccount::get()), + 3 + )); + assert_ok!(ExternalValidators::add_whitelisted( + RuntimeOrigin::signed(RootAccount::get()), + 1 + )); + assert_ok!(ExternalValidators::add_whitelisted( + RuntimeOrigin::signed(RootAccount::get()), + 2 + )); + assert_eq!(ExternalValidators::whitelisted_validators(), vec![3, 1, 2]); + assert_ok!(ExternalValidators::set_external_validators(vec![ + 3, 2, 1, 4 + ])); + + let validators = ExternalValidators::new_session(6); + assert_eq!(validators, Some(vec![3, 1, 2, 4])); + }); +} diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index ff4177aa2..9dc2dca61 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -1193,8 +1193,8 @@ parameter_types! { impl pallet_external_validators::Config for Runtime { type RuntimeEvent = RuntimeEvent; type UpdateOrigin = EnsureRoot; - type MaxWhitelistedValidators = MaxInvulnerables; - type MaxExternalValidators = MaxInvulnerables; + type MaxWhitelistedValidators = MaxWhitelistedValidators; + type MaxExternalValidators = MaxExternalValidators; type ValidatorId = AccountId; type ValidatorIdOf = ValidatorIdOf; type ValidatorRegistration = Session; @@ -1231,6 +1231,8 @@ impl pallet_asset_rate::Config for Runtime { parameter_types! { pub const MaxInvulnerables: u32 = 100; + pub const MaxWhitelistedValidators: u32 = 100; + pub const MaxExternalValidators: u32 = 100; } impl pallet_invulnerables::Config for Runtime { @@ -1576,6 +1578,9 @@ construct_runtime! { // Pallet for sending XCM. XcmPallet: pallet_xcm = 90, + // Validator stuff + ExternalValidators: pallet_external_validators = 100, + // Migration stuff Migrations: pallet_migrations = 120, MultiBlockMigrations: pallet_multiblock_migrations = 121, @@ -1590,8 +1595,6 @@ construct_runtime! { ParasSudoWrapper: paras_sudo_wrapper = 250, - ExternalValidators: pallet_external_validators = 253, - // Root testing pallet. RootTesting: pallet_root_testing = 249, diff --git a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs index fa6b60e53..01335d8d9 100644 --- a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs +++ b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs @@ -16,10 +16,83 @@ #![cfg(test)] -use std::collections::HashMap; -use crate::ExternalValidators; -use frame_support::traits::fungible::Mutate; -use {crate::tests::common::*, frame_support::assert_ok, sp_std::vec}; +use { + crate::{ + tests::common::*, ExternalValidators, MaxExternalValidators, SessionKeys, SessionsPerEra, + }, + frame_support::{assert_ok, traits::fungible::Mutate}, + std::{collections::HashMap, ops::RangeInclusive}, +}; + +fn assert_validators_do_not_change( + validators: &HashMap>, + session_range: RangeInclusive, +) { + let first_validators = &validators[session_range.start()]; + for session in session_range { + let current_validators = &validators[&session]; + assert_eq!( + current_validators, first_validators, + "Validators have changed in session {}", + session + ); + } +} + +#[test] +fn whitelisted_validators_priority() { + 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), + ]) + .build() + .execute_with(|| { + run_to_block(2); + + // SessionsPerEra depends on fast-runtime feature, this test should pass regardless + let sessions_per_era = SessionsPerEra::get(); + + let mut external_validators = vec![]; + let max_validators = MaxExternalValidators::get(); + // Try to insert 105 mock validators (max is 100, so last 5 will not be in the pallet) + for i in 0..(max_validators + 5) { + let mock_validator = AccountId::from([0x10 + i as u8; 32]); + let mock_keys = get_authority_keys_from_seed(&mock_validator.to_string(), None); + + assert_ok!(Balances::mint_into(&mock_validator, 10_000 * UNIT)); + assert_ok!(Session::set_keys( + origin_of(mock_validator.clone()), + SessionKeys { + babe: mock_keys.babe.clone(), + grandpa: mock_keys.grandpa.clone(), + para_validator: mock_keys.para_validator.clone(), + para_assignment: mock_keys.para_assignment.clone(), + authority_discovery: mock_keys.authority_discovery.clone(), + beefy: mock_keys.beefy.clone(), + nimbus: mock_keys.nimbus.clone(), + }, + vec![] + )); + external_validators.push(mock_validator); + } + + ExternalValidators::set_external_validators(external_validators).unwrap(); + + run_to_session(sessions_per_era); + let validators = Session::validators(); + + // 2 whitelisted validators (Alice, Bob), and 100 external validators + assert_eq!(validators.len(), 2 + max_validators as usize); + assert_eq!( + &validators[..2], + &[AccountId::from(ALICE), AccountId::from(BOB)] + ); + }); +} #[test] fn validators_only_change_once_per_era() { @@ -35,16 +108,27 @@ fn validators_only_change_once_per_era() { .execute_with(|| { run_to_block(2); + // SessionsPerEra depends on fast-runtime feature, this test should pass regardless + let sessions_per_era = SessionsPerEra::get(); let mut session_validators = HashMap::new(); - for session in 1u32..=13 { - let mock_validator = AccountId::from([10u8 + session as u8; 32]); + for session in 1u32..=(sessions_per_era * 2 + 1) { + // For every session: + // * Create a new validator account, MockValidatorN, mint balance, and insert keys + // * Set this validator as the only "external validator" + // * Run to session start + // * Pallet session wants to know validators for the next session (session + 1), so: + // * If the next session is in the same era as the previous session: validators do not change + // * If the next session is in a new era: new validators will be set to [Alice, Bob, MockValidatorN] + // and stored as QueuedKeys in pallet session. + // So validators for session N will be [Alice, Bob, MockValidator(N-1)] + let mock_validator = AccountId::from([0x10 + session as u8; 32]); let mock_keys = get_authority_keys_from_seed(&mock_validator.to_string(), None); assert_ok!(Balances::mint_into(&mock_validator, 10_000 * UNIT)); assert_ok!(Session::set_keys( origin_of(mock_validator.clone()), - crate::SessionKeys { + SessionKeys { babe: mock_keys.babe.clone(), grandpa: mock_keys.grandpa.clone(), para_validator: mock_keys.para_validator.clone(), @@ -63,16 +147,350 @@ fn validators_only_change_once_per_era() { session_validators.insert(session, validators); } - // 1 era = 6 sessions + // Example with 1 era = 6 sessions // session_range => validators // [0, 5] => Alice, Bob - // [6, 11] => Alice, Bob, 0x0f - // [12, ..] => Alice, Bob, 0x15 - assert_eq!(session_validators[&5], vec![AccountId::from(ALICE), AccountId::from(BOB)]); - assert_eq!(session_validators[&6], vec![AccountId::from(ALICE), AccountId::from(BOB), AccountId::from([0x0f; 32])]); - // TODO: if compiling with fast-runtime, this line will fail because 1 era = 3 sessions, so instead of - // validator 0x0f you will see 0x12 - assert_eq!(session_validators[&11], vec![AccountId::from(ALICE), AccountId::from(BOB), AccountId::from([0x0f; 32])]); - assert_eq!(session_validators[&12], vec![AccountId::from(ALICE), AccountId::from(BOB), AccountId::from([0x15; 32])]); + // [6, 11] => Alice, Bob, 0x15 + // [12, ..] => Alice, Bob, 0x1b + assert_eq!( + session_validators[&1], + vec![AccountId::from(ALICE), AccountId::from(BOB)] + ); + assert_eq!( + session_validators[&sessions_per_era], + vec![ + AccountId::from(ALICE), + AccountId::from(BOB), + AccountId::from([0x15; 32]) + ] + ); + assert_eq!( + session_validators[&(sessions_per_era * 2)], + vec![ + AccountId::from(ALICE), + AccountId::from(BOB), + AccountId::from([0x1b; 32]) + ] + ); + // Also, validators cannot change inside an era + assert_validators_do_not_change(&session_validators, 1..=(sessions_per_era - 1)); + assert_validators_do_not_change( + &session_validators, + sessions_per_era..=(sessions_per_era * 2 - 1), + ); + assert_validators_do_not_change( + &session_validators, + (sessions_per_era * 2)..=(sessions_per_era * 2 + 1), + ); + }); +} + +#[test] +fn external_validators_can_be_disabled() { + 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), + ]) + .build() + .execute_with(|| { + run_to_block(2); + + // SessionsPerEra depends on fast-runtime feature, this test should pass regardless + let sessions_per_era = SessionsPerEra::get(); + + let mock_validator = AccountId::from([0x10; 32]); + let mock_keys = get_authority_keys_from_seed(&mock_validator.to_string(), None); + + assert_ok!(Balances::mint_into(&mock_validator, 10_000 * UNIT)); + assert_ok!(Session::set_keys( + origin_of(mock_validator.clone()), + SessionKeys { + babe: mock_keys.babe.clone(), + grandpa: mock_keys.grandpa.clone(), + para_validator: mock_keys.para_validator.clone(), + para_assignment: mock_keys.para_assignment.clone(), + authority_discovery: mock_keys.authority_discovery.clone(), + beefy: mock_keys.beefy.clone(), + nimbus: mock_keys.nimbus.clone(), + }, + vec![] + )); + + ExternalValidators::set_external_validators(vec![mock_validator.clone()]).unwrap(); + assert_ok!(ExternalValidators::skip_external_validators( + root_origin(), + true + )); + + run_to_session(sessions_per_era); + let validators = Session::validators(); + + // Only whitelisted validators get selected + assert_eq!( + validators, + vec![AccountId::from(ALICE), AccountId::from(BOB)] + ); + + // Enable external validators for next session + assert_ok!(ExternalValidators::skip_external_validators( + root_origin(), + false + )); + + run_to_session(2 * sessions_per_era); + let validators = Session::validators(); + assert_eq!( + validators, + vec![AccountId::from(ALICE), AccountId::from(BOB), mock_validator] + ); + }); +} + +#[test] +fn no_duplicate_validators() { + 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), + ]) + .build() + .execute_with(|| { + run_to_block(2); + + // SessionsPerEra depends on fast-runtime feature, this test should pass regardless + let sessions_per_era = SessionsPerEra::get(); + + // Alice is both a whitelisted validator and an external validator + ExternalValidators::set_external_validators(vec![AccountId::from(ALICE)]).unwrap(); + + run_to_session(sessions_per_era); + let validators = Session::validators(); + + // 2 whitelisted validators (Alice, Bob), Alice does not appear twice + assert_eq!( + validators, + vec![AccountId::from(ALICE), AccountId::from(BOB)] + ); }); } + +mod force_eras { + use super::*; + + #[test] + fn force_new_era() { + 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), + ]) + .build() + .execute_with(|| { + run_to_block(2); + + // SessionsPerEra depends on fast-runtime feature, this test should pass regardless + let sessions_per_era = SessionsPerEra::get(); + + let mock_validator = AccountId::from([0x10; 32]); + let mock_keys = get_authority_keys_from_seed(&mock_validator.to_string(), None); + + assert_ok!(Balances::mint_into(&mock_validator, 10_000 * UNIT)); + assert_ok!(Session::set_keys( + origin_of(mock_validator.clone()), + SessionKeys { + babe: mock_keys.babe.clone(), + grandpa: mock_keys.grandpa.clone(), + para_validator: mock_keys.para_validator.clone(), + para_assignment: mock_keys.para_assignment.clone(), + authority_discovery: mock_keys.authority_discovery.clone(), + beefy: mock_keys.beefy.clone(), + nimbus: mock_keys.nimbus.clone(), + }, + vec![] + )); + + ExternalValidators::set_external_validators(vec![mock_validator.clone()]).unwrap(); + assert_eq!(ExternalValidators::current_era(), 0); + assert_ok!(ExternalValidators::force_new_era(root_origin())); + // Still era 1, until next session + assert_eq!(ExternalValidators::current_era(), 0); + + run_to_session(1); + // Era changes in session 1, but validators will change in session 2 + assert_eq!(ExternalValidators::current_era(), 1); + let validators = Session::validators(); + assert_eq!( + validators, + vec![AccountId::from(ALICE), AccountId::from(BOB),] + ); + + run_to_session(2); + // Validators change now + assert_eq!(ExternalValidators::current_era(), 1); + let validators = Session::validators(); + assert_eq!( + validators, + vec![ + AccountId::from(ALICE), + AccountId::from(BOB), + mock_validator.clone() + ] + ); + + // Change external validators again + ExternalValidators::set_external_validators(vec![]).unwrap(); + run_to_session(1 + sessions_per_era - 1); + // Validators will not change until `sessions_per_era` sessions later + // With sessions_per_era=6, era will change in session 7, validators will change in + // session 8, this is session 6 + assert_eq!(ExternalValidators::current_era(), 1); + let validators = Session::validators(); + assert_eq!( + validators, + vec![ + AccountId::from(ALICE), + AccountId::from(BOB), + mock_validator.clone() + ] + ); + + run_to_session(1 + sessions_per_era); + // This is session 7, new era but not new validators + assert_eq!(ExternalValidators::current_era(), 2); + let validators = Session::validators(); + assert_eq!( + validators, + vec![AccountId::from(ALICE), AccountId::from(BOB), mock_validator] + ); + + run_to_session(1 + sessions_per_era + 1); + // This is session 8, validators will change now + assert_eq!(ExternalValidators::current_era(), 2); + let validators = Session::validators(); + assert_eq!( + validators, + vec![AccountId::from(ALICE), AccountId::from(BOB)] + ); + }); + } + + #[test] + fn force_no_eras() { + 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), + ]) + .build() + .execute_with(|| { + run_to_block(2); + + // SessionsPerEra depends on fast-runtime feature, this test should pass regardless + let sessions_per_era = SessionsPerEra::get(); + + let mock_validator = AccountId::from([0x10; 32]); + let mock_keys = get_authority_keys_from_seed(&mock_validator.to_string(), None); + + assert_ok!(Balances::mint_into(&mock_validator, 10_000 * UNIT)); + assert_ok!(Session::set_keys( + origin_of(mock_validator.clone()), + SessionKeys { + babe: mock_keys.babe.clone(), + grandpa: mock_keys.grandpa.clone(), + para_validator: mock_keys.para_validator.clone(), + para_assignment: mock_keys.para_assignment.clone(), + authority_discovery: mock_keys.authority_discovery.clone(), + beefy: mock_keys.beefy.clone(), + nimbus: mock_keys.nimbus.clone(), + }, + vec![] + )); + + ExternalValidators::set_external_validators(vec![mock_validator.clone()]).unwrap(); + // Validators will never change + assert_eq!(ExternalValidators::current_era(), 0); + assert_ok!(ExternalValidators::force_no_eras(root_origin())); + + run_to_session(sessions_per_era); + assert_eq!(ExternalValidators::current_era(), 0); + let validators = Session::validators(); + assert_eq!( + validators, + vec![AccountId::from(ALICE), AccountId::from(BOB)] + ); + }); + } + + #[test] + fn force_new_era_always() { + 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), + ]) + .build() + .execute_with(|| { + run_to_block(2); + + let mock_validator = AccountId::from([0x10; 32]); + let mock_keys = get_authority_keys_from_seed(&mock_validator.to_string(), None); + + assert_ok!(Balances::mint_into(&mock_validator, 10_000 * UNIT)); + assert_ok!(Session::set_keys( + origin_of(mock_validator.clone()), + SessionKeys { + babe: mock_keys.babe.clone(), + grandpa: mock_keys.grandpa.clone(), + para_validator: mock_keys.para_validator.clone(), + para_assignment: mock_keys.para_assignment.clone(), + authority_discovery: mock_keys.authority_discovery.clone(), + beefy: mock_keys.beefy.clone(), + nimbus: mock_keys.nimbus.clone(), + }, + vec![] + )); + + ExternalValidators::set_external_validators(vec![mock_validator.clone()]).unwrap(); + // Validators will change on every session + assert_eq!(ExternalValidators::current_era(), 0); + assert_ok!(ExternalValidators::force_new_era_always(root_origin())); + + run_to_session(2); + assert_eq!(ExternalValidators::current_era(), 2); + let validators = Session::validators(); + assert_eq!( + validators, + vec![ + AccountId::from(ALICE), + AccountId::from(BOB), + mock_validator.clone() + ] + ); + + ExternalValidators::set_external_validators(vec![]).unwrap(); + run_to_session(4); + assert_eq!(ExternalValidators::current_era(), 4); + let validators = Session::validators(); + assert_eq!( + validators, + vec![AccountId::from(ALICE), AccountId::from(BOB)] + ); + }); + } +} From d7289a027fe7df57fa409cc56d117bb73831aeb4 Mon Sep 17 00:00:00 2001 From: girazoki Date: Wed, 23 Oct 2024 09:52:36 +0200 Subject: [PATCH 25/82] fixes but pallet incorporated to runtime --- Cargo.lock | 1 + Cargo.toml | 1 + pallets/external-validator-slashes/src/lib.rs | 2 ++ .../external-validator-slashes/src/mock.rs | 6 ++-- solo-chains/runtime/dancelight/Cargo.toml | 2 ++ solo-chains/runtime/dancelight/src/lib.rs | 23 +++++++++++-- .../src/tests/external_validators_tests.rs | 34 ++++++++++++++++--- 7 files changed, 58 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f51fd280b..859c663fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3248,6 +3248,7 @@ dependencies = [ "pallet-data-preservers", "pallet-democracy", "pallet-elections-phragmen", + "pallet-external-validator-slashes", "pallet-external-validators", "pallet-grandpa", "pallet-identity", diff --git a/Cargo.toml b/Cargo.toml index a87e135a8..5cc37595b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,6 +61,7 @@ pallet-configuration = { path = "pallets/configuration", default-features = fals pallet-data-preservers = { path = "pallets/data-preservers", default-features = false } pallet-data-preservers-runtime-api = { path = "pallets/data-preservers/runtime-api", default-features = false } pallet-external-validators = { path = "pallets/external-validators", default-features = false } +pallet-external-validator-slashes = { path = "pallets/external-validator-slashes", default-features = false } pallet-inflation-rewards = { path = "pallets/inflation-rewards", default-features = false } pallet-initializer = { path = "pallets/initializer", default-features = false } pallet-invulnerables = { path = "pallets/invulnerables", default-features = false } diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index 553f71bc8..ba0bada24 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -30,6 +30,8 @@ use { offence::{OffenceDetails, OnOffenceHandler}, EraIndex, SessionIndex, }, + sp_std::vec, + sp_std::vec::Vec, tp_traits::{EraIndexProvider, OnEraEnd, OnEraStart}, }; diff --git a/pallets/external-validator-slashes/src/mock.rs b/pallets/external-validator-slashes/src/mock.rs index 8709852b5..6bcd2ea76 100644 --- a/pallets/external-validator-slashes/src/mock.rs +++ b/pallets/external-validator-slashes/src/mock.rs @@ -15,7 +15,7 @@ // along with Tanssi. If not, see use { - crate as external_validator_info, + crate as external_validator_slashes, frame_support::{ parameter_types, traits::{ConstU16, ConstU64}, @@ -41,7 +41,7 @@ frame_support::construct_runtime!( System: frame_system, Session: pallet_session, Historical: pallet_session::historical, - ExternalValidatorSlashes: external_validator_info, + ExternalValidatorSlashes: external_validator_slashes, } ); @@ -172,7 +172,7 @@ parameter_types! { pub const BondingDuration: u32 = 5u32; } -impl external_validator_info::Config for Test { +impl external_validator_slashes::Config for Test { type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; type ValidatorIdOf = IdentityValidator; diff --git a/solo-chains/runtime/dancelight/Cargo.toml b/solo-chains/runtime/dancelight/Cargo.toml index d6c561d67..bcda3e7c3 100644 --- a/solo-chains/runtime/dancelight/Cargo.toml +++ b/solo-chains/runtime/dancelight/Cargo.toml @@ -70,6 +70,7 @@ pallet-conviction-voting = { workspace = true } pallet-democracy = { workspace = true } pallet-elections-phragmen = { workspace = true } pallet-external-validators = { workspace = true } +pallet-external-validator-slashes = { workspace = true } pallet-grandpa = { workspace = true } pallet-identity = { workspace = true } pallet-initializer = { workspace = true } @@ -206,6 +207,7 @@ std = [ "pallet-democracy/std", "pallet-elections-phragmen/std", "pallet-external-validators/std", + "pallet-external-validator-slashes/std", "pallet-grandpa/std", "pallet-identity/std", "pallet-inflation-rewards/std", diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index ff4177aa2..0876fae6f 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -87,7 +87,7 @@ use { prelude::*, }, tp_traits::{ - apply, derive_storage_traits, GetHostConfiguration, GetSessionContainerChains, + apply, derive_storage_traits, EraIndex, GetHostConfiguration, GetSessionContainerChains, RegistrarHandler, RemoveParaIdsWithNoCredits, Slot, SlotFrequency, }, }; @@ -1188,6 +1188,8 @@ impl paras_sudo_wrapper::Config for Runtime {} parameter_types! { pub const SessionsPerEra: SessionIndex = runtime_common::prod_or_fast!(6, 3); + pub const SlashDeferDuration: EraIndex = 2; + pub const BondDuration: EraIndex = 10; } impl pallet_external_validators::Config for Runtime { @@ -1200,13 +1202,24 @@ impl pallet_external_validators::Config for Runtime { type ValidatorRegistration = Session; type UnixTime = Timestamp; type SessionsPerEra = SessionsPerEra; - type OnEraStart = (); + type OnEraStart = ExternalValidatorSlashes; type OnEraEnd = (); type WeightInfo = weights::pallet_external_validators::SubstrateWeight; #[cfg(feature = "runtime-benchmarks")] type Currency = Balances; } +impl pallet_external_validator_slashes::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type ValidatorId = AccountId; + type ValidatorIdOf = ValidatorIdOf; + type SlashDeferDuration = SlashDeferDuration; + type BondingDuration = BondingDuration; + type SlashId = u32; + type SessionInterface = (); + type EraIndexProvider = ExternalValidators; +} + impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; @@ -1576,6 +1589,11 @@ construct_runtime! { // Pallet for sending XCM. XcmPallet: pallet_xcm = 90, + // External Ethereum + ExternalValidators: pallet_external_validators = 100, + ExternalValidatorSlashes: pallet_external_validator_slashes = 101, + + // Migration stuff Migrations: pallet_migrations = 120, MultiBlockMigrations: pallet_multiblock_migrations = 121, @@ -1590,7 +1608,6 @@ construct_runtime! { ParasSudoWrapper: paras_sudo_wrapper = 250, - ExternalValidators: pallet_external_validators = 253, // Root testing pallet. RootTesting: pallet_root_testing = 249, diff --git a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs index fa6b60e53..0626c4ca3 100644 --- a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs +++ b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs @@ -16,9 +16,9 @@ #![cfg(test)] -use std::collections::HashMap; use crate::ExternalValidators; use frame_support::traits::fungible::Mutate; +use std::collections::HashMap; use {crate::tests::common::*, frame_support::assert_ok, sp_std::vec}; #[test] @@ -68,11 +68,35 @@ fn validators_only_change_once_per_era() { // [0, 5] => Alice, Bob // [6, 11] => Alice, Bob, 0x0f // [12, ..] => Alice, Bob, 0x15 - assert_eq!(session_validators[&5], vec![AccountId::from(ALICE), AccountId::from(BOB)]); - assert_eq!(session_validators[&6], vec![AccountId::from(ALICE), AccountId::from(BOB), AccountId::from([0x0f; 32])]); + assert_eq!( + session_validators[&5], + vec![AccountId::from(ALICE), AccountId::from(BOB)] + ); + assert_eq!( + session_validators[&6], + vec![ + AccountId::from(ALICE), + AccountId::from(BOB), + AccountId::from([0x0f; 32]) + ] + ); // TODO: if compiling with fast-runtime, this line will fail because 1 era = 3 sessions, so instead of // validator 0x0f you will see 0x12 - assert_eq!(session_validators[&11], vec![AccountId::from(ALICE), AccountId::from(BOB), AccountId::from([0x0f; 32])]); - assert_eq!(session_validators[&12], vec![AccountId::from(ALICE), AccountId::from(BOB), AccountId::from([0x15; 32])]); + assert_eq!( + session_validators[&11], + vec![ + AccountId::from(ALICE), + AccountId::from(BOB), + AccountId::from([0x0f; 32]) + ] + ); + assert_eq!( + session_validators[&12], + vec![ + AccountId::from(ALICE), + AccountId::from(BOB), + AccountId::from([0x15; 32]) + ] + ); }); } From e1985a35638d8e88ac52c6defd14916760de8c60 Mon Sep 17 00:00:00 2001 From: girazoki Date: Wed, 23 Oct 2024 10:11:45 +0200 Subject: [PATCH 26/82] added sessionINterface --- solo-chains/runtime/dancelight/src/lib.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index 0876fae6f..6c5e67c08 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -1186,6 +1186,22 @@ impl pallet_beefy_mmr::Config for Runtime { impl paras_sudo_wrapper::Config for Runtime {} +use pallet_staking::SessionInterface; +pub struct DancelightSessionInterface; +impl SessionInterface for DancelightSessionInterface { + fn disable_validator(validator_index: u32) -> bool { + Session::disable_index(validator_index) + } + + fn validators() -> Vec { + Session::validators() + } + + fn prune_historical_up_to(up_to: SessionIndex) { + Historical::prune_up_to(up_to); + } +} + parameter_types! { pub const SessionsPerEra: SessionIndex = runtime_common::prod_or_fast!(6, 3); pub const SlashDeferDuration: EraIndex = 2; @@ -1216,7 +1232,7 @@ impl pallet_external_validator_slashes::Config for Runtime { type SlashDeferDuration = SlashDeferDuration; type BondingDuration = BondingDuration; type SlashId = u32; - type SessionInterface = (); + type SessionInterface = DancelightSessionInterface; type EraIndexProvider = ExternalValidators; } From 0d53f5bd0b1625fbf9829f4c2f2b350811c32dab Mon Sep 17 00:00:00 2001 From: girazoki Date: Wed, 23 Oct 2024 11:15:32 +0200 Subject: [PATCH 27/82] add offence handler --- solo-chains/runtime/dancelight/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index 6c5e67c08..0df6af696 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -565,7 +565,7 @@ impl pallet_treasury::Config for Runtime { impl pallet_offences::Config for Runtime { type RuntimeEvent = RuntimeEvent; type IdentificationTuple = pallet_session::historical::IdentificationTuple; - type OnOffenceHandler = (); + type OnOffenceHandler = ExternalValidatorSlashes; } impl pallet_authority_discovery::Config for Runtime { From c6cf701a70c25d4b06304808258220391a87dbc6 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 23 Oct 2024 16:20:42 +0200 Subject: [PATCH 28/82] current era and active era --- pallets/external-validators/src/lib.rs | 175 +++++++++--------- primitives/traits/src/lib.rs | 4 + .../src/tests/external_validators_tests.rs | 95 +++++++++- 3 files changed, 189 insertions(+), 85 deletions(-) diff --git a/pallets/external-validators/src/lib.rs b/pallets/external-validators/src/lib.rs index 22a0b736f..48d8a2aa0 100644 --- a/pallets/external-validators/src/lib.rs +++ b/pallets/external-validators/src/lib.rs @@ -40,7 +40,8 @@ use { sp_std::collections::btree_set::BTreeSet, sp_std::vec::Vec, tp_traits::{ - ActiveEraInfo, EraIndex, EraIndexProvider, OnEraEnd, OnEraStart, ValidatorProvider, + ActiveEraInfo, EraIndex, EraIndexProvider, InvulnerablesProvider, OnEraEnd, OnEraStart, + ValidatorProvider, }, }; @@ -158,13 +159,17 @@ pub mod pallet { #[pallet::storage] pub type SkipExternalValidators = StorageValue<_, bool, ValueQuery>; + /// The current era information, it is either ActiveEra or ActiveEra + 1 if the new era validators have been queued. + #[pallet::storage] + pub type CurrentEra = StorageValue<_, EraIndex>; + /// The active era information, it holds index and start. #[pallet::storage] pub type ActiveEra = StorageValue<_, ActiveEraInfo>; - /// Session index at the start of this era. Used to know when to start the next era. + /// Session index at the start of the *active* era. Used to know when to start the next era. #[pallet::storage] - pub type EraSessionStart = StorageValue<_, u32, ValueQuery>; + pub type ActiveEraSessionStart = StorageValue<_, u32, ValueQuery>; /// Mode of era forcing. #[pallet::storage] @@ -376,30 +381,6 @@ pub mod pallet { Ok(()) } - /// Increase era. Returns new era index. - pub(crate) fn increase_era(new_session_index: SessionIndex) -> EraIndex { - // Increase era - let era_index = >::mutate(|q| { - if q.is_none() { - *q = Some(ActiveEraInfo { - index: 0, - start: None, - }); - } - - let q = q.as_mut().unwrap(); - q.index += 1; - - // Set new active era start in next `on_finalize`. To guarantee usage of `Time` - q.start = None; - - q.index - }); - >::put(new_session_index); - - era_index - } - /// Helper to set a new `ForceEra` mode. pub(crate) fn set_force_era(mode: Forcing) { log::info!("Setting force era mode {:?}.", mode); @@ -411,12 +392,20 @@ pub mod pallet { >::get().into() } - pub fn current_era() -> u32 { + pub fn active_era() -> EraIndex { >::get() .map(|era_info| era_info.index) .unwrap_or(0) } + pub fn current_era() -> EraIndex { + >::get().unwrap_or(0) + } + + pub fn active_era_session_start() -> u32 { + >::get() + } + /// Returns validators for the next session. Whitelisted validators first, then external validators. /// The returned list is deduplicated, but the order is respected. /// If `SkipExternalValidators` is true, this function will ignore external validators. @@ -429,6 +418,29 @@ pub mod pallet { remove_duplicates(validators) } + + /// Returns true if the provided session index should start a new era. + pub(crate) fn should_start_new_era(session: u32) -> bool { + if session <= 1 { + return false; + } + + match >::get() { + Forcing::NotForcing => { + // If enough sessions have elapsed, start new era + let start_session = >::get(); + + if session.saturating_sub(start_session) >= T::SessionsPerEra::get() { + true + } else { + false + } + } + Forcing::ForceNew => true, + Forcing::ForceNone => false, + Forcing::ForceAlways => true, + } + } } #[pallet::hooks] @@ -470,43 +482,21 @@ fn remove_duplicates(input: Vec) -> Vec { impl pallet_session::SessionManager for Pallet { fn new_session(session: SessionIndex) -> Option> { - if session <= 1 { + if !Self::should_start_new_era(session) { + // Return None to keep previous validators return None; } - let new_era = match >::get() { - Forcing::NotForcing => { - // If enough sessions have elapsed, start new era - let start_session = >::get(); - let current_session = session; - - if current_session.saturating_sub(start_session) >= T::SessionsPerEra::get() { - true - } else { - false - } - } - Forcing::ForceNew => { - // Only force once - >::put(Forcing::NotForcing); - - true + // Increment current era + >::mutate(|era| { + if era.is_none() { + *era = Some(0); } - Forcing::ForceNone => false, - Forcing::ForceAlways => true, - }; - - if !new_era { - // If not starting a new era, keep the previous validators - return None; - } - - let new_era_index = Self::increase_era(session); - - Self::deposit_event(Event::NewEra { era: new_era_index }); - - T::OnEraStart::on_era_start(new_era_index, session); + let era = era.as_mut().unwrap(); + *era += 1; + }); + // Return new validators let validators: Vec<_> = Self::validators(); frame_system::Pallet::::register_extra_weight_unchecked( @@ -518,38 +508,51 @@ impl pallet_session::SessionManager for Pallet { } fn end_session(index: SessionIndex) { - // This function needs to predict whether new_session(index+1) will start a new era + // To know if this the end of an era, we need to check if the next session is the start of a new era let new_index = index.saturating_add(1); - - if new_index <= 1 { + if !Self::should_start_new_era(new_index) { return; } - let new_era = match >::get() { - Forcing::NotForcing => { - // If enough sessions have elapsed, start new era - let start_session = >::get(); - let current_session = new_index; - - if current_session.saturating_sub(start_session) >= T::SessionsPerEra::get() { - true - } else { - false - } - } - Forcing::ForceNew => true, - Forcing::ForceNone => false, - Forcing::ForceAlways => true, - }; + T::OnEraEnd::on_era_end(index); + } - if !new_era { + fn start_session(session_index: SessionIndex) { + if !Self::should_start_new_era(session_index) { return; } - T::OnEraEnd::on_era_end(index); - } + >::mutate(|era| { + // If this era has been forced, reset forcing flag to only force once + if let Forcing::ForceNew = era { + *era = Forcing::NotForcing; + } + }); + >::put(session_index); + + // ActiveEra = CurrentEra + // Increase era + let era_index = >::mutate(|q| { + if q.is_none() { + *q = Some(ActiveEraInfo { + index: 0, + start: None, + }); + } + + let q = q.as_mut().unwrap(); + q.index += 1; + + // Set new active era start in next `on_finalize`. To guarantee usage of `Time` + q.start = None; - fn start_session(_start_index: SessionIndex) {} + q.index + }); + + T::OnEraStart::on_era_start(era_index, session_index); + + Self::deposit_event(Event::NewEra { era: era_index }); + } } impl pallet_session::historical::SessionManager for Pallet { @@ -582,6 +585,12 @@ impl ValidatorProvider for Pallet { } } +impl InvulnerablesProvider for Pallet { + fn invulnerables() -> Vec { + Self::whitelisted_validators() + } +} + /// Mode of era-forcing. #[derive( Copy, Clone, PartialEq, Eq, Default, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen, diff --git a/primitives/traits/src/lib.rs b/primitives/traits/src/lib.rs index 21af8b25d..280271d7e 100644 --- a/primitives/traits/src/lib.rs +++ b/primitives/traits/src/lib.rs @@ -475,6 +475,10 @@ pub trait ValidatorProvider { fn validators() -> Vec; } +pub trait InvulnerablesProvider { + fn invulnerables() -> Vec; +} + pub trait OnEraStart { fn on_era_start(_era_index: EraIndex, _session_start: u32) {} } diff --git a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs index 01335d8d9..ba76f60ef 100644 --- a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs +++ b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs @@ -161,7 +161,7 @@ fn validators_only_change_once_per_era() { vec![ AccountId::from(ALICE), AccountId::from(BOB), - AccountId::from([0x15; 32]) + AccountId::from([0x10 + sessions_per_era as u8 - 1; 32]) ] ); assert_eq!( @@ -169,7 +169,7 @@ fn validators_only_change_once_per_era() { vec![ AccountId::from(ALICE), AccountId::from(BOB), - AccountId::from([0x1b; 32]) + AccountId::from([0x10 + sessions_per_era as u8 * 2 - 1; 32]) ] ); // Also, validators cannot change inside an era @@ -284,6 +284,95 @@ fn no_duplicate_validators() { mod force_eras { use super::*; + #[test] + fn default_era_changes() { + 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), + ]) + .build() + .execute_with(|| { + run_to_block(2); + + // SessionsPerEra depends on fast-runtime feature, this test should pass regardless + let sessions_per_era = SessionsPerEra::get(); + + if sessions_per_era != 6 { + log::error!("Ignoring test default_era_changes because it doesn't work with sessions_per_era={}. Compile without fast-runtime feature and try again.", sessions_per_era); + return; + } + + let mut data = vec![]; + let mut prev_validators = Session::validators(); + + for session in 1u32..=(sessions_per_era * 2 + 1) { + // For every session: + // * Create a new validator account, MockValidatorN, mint balance, and insert keys + // * Set this validator as the only "external validator" + // * Run to session start + // * Pallet session wants to know validators for the next session (session + 1), so: + // * If the next session is in the same era as the previous session: validators do not change + // * If the next session is in a new era: new validators will be set to [Alice, Bob, MockValidatorN] + // and stored as QueuedKeys in pallet session. + // So validators for session N will be [Alice, Bob, MockValidator(N-1)] + let mock_validator = AccountId::from([0x10 + session as u8; 32]); + let mock_keys = get_authority_keys_from_seed(&mock_validator.to_string(), None); + + assert_ok!(Balances::mint_into(&mock_validator, 10_000 * UNIT)); + assert_ok!(Session::set_keys( + origin_of(mock_validator.clone()), + SessionKeys { + babe: mock_keys.babe.clone(), + grandpa: mock_keys.grandpa.clone(), + para_validator: mock_keys.para_validator.clone(), + para_assignment: mock_keys.para_assignment.clone(), + authority_discovery: mock_keys.authority_discovery.clone(), + beefy: mock_keys.beefy.clone(), + nimbus: mock_keys.nimbus.clone(), + }, + vec![] + )); + + ExternalValidators::set_external_validators(vec![mock_validator]).unwrap(); + + run_to_session(session); + let validators = Session::validators(); + let validators_changed = validators != prev_validators; + prev_validators = validators; + data.push(( + session, + ExternalValidators::current_era(), + ExternalValidators::active_era(), + ExternalValidators::active_era_session_start(), + validators_changed, + )); + } + + // (session, current_era, active_era, active_era_session_start, new_validators) + let expected = vec![ + (1, 0, 0, 0, false), + (2, 0, 0, 0, false), + (3, 0, 0, 0, false), + (4, 0, 0, 0, false), + (5, 1, 0, 0, false), + (6, 1, 1, 6, true), + (7, 1, 1, 6, false), + (8, 1, 1, 6, false), + (9, 1, 1, 6, false), + (10, 1, 1, 6, false), + (11, 2, 1, 6, false), + (12, 2, 2, 12, true), + (13, 2, 2, 12, false), + ]; + + assert_eq!(data, expected); + }); + } + #[test] fn force_new_era() { ExtBuilder::default() @@ -367,6 +456,7 @@ mod force_eras { run_to_session(1 + sessions_per_era); // This is session 7, new era but not new validators assert_eq!(ExternalValidators::current_era(), 2); + assert_eq!(ExternalValidators::active_era(), 1); let validators = Session::validators(); assert_eq!( validators, @@ -376,6 +466,7 @@ mod force_eras { run_to_session(1 + sessions_per_era + 1); // This is session 8, validators will change now assert_eq!(ExternalValidators::current_era(), 2); + assert_eq!(ExternalValidators::active_era(), 2); let validators = Session::validators(); assert_eq!( validators, From a49f7499eb1e481b1ee89267a070cc3251707039 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 23 Oct 2024 16:27:47 +0200 Subject: [PATCH 29/82] typescript-api --- .../interfaces/augment-api-query.ts | 10 +- .../src/dancelight/interfaces/lookup.ts | 208 +++++++------- .../src/dancelight/interfaces/types-lookup.ts | 254 +++++++++--------- 3 files changed, 239 insertions(+), 233 deletions(-) diff --git a/typescript-api/src/dancelight/interfaces/augment-api-query.ts b/typescript-api/src/dancelight/interfaces/augment-api-query.ts index 6d4dcddef..7b31cc99b 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-query.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-query.ts @@ -665,8 +665,14 @@ declare module "@polkadot/api-base/types/storage" { /** The active era information, it holds index and start. */ activeEra: AugmentedQuery Observable>, []> & QueryableStorageEntry; - /** Session index at the start of this era. Used to know when to start the next era. */ - eraSessionStart: AugmentedQuery Observable, []> & QueryableStorageEntry; + /** Session index at the start of the _active_ era. Used to know when to start the next era. */ + activeEraSessionStart: AugmentedQuery Observable, []> & + QueryableStorageEntry; + /** + * The current era information, it is either ActiveEra or ActiveEra + 1 if the new era validators have been + * queued. + */ + currentEra: AugmentedQuery Observable>, []> & QueryableStorageEntry; /** Validators set using storage proofs from another blockchain. Ignored if `SkipExternalValidators` is true. */ externalValidators: AugmentedQuery Observable>, []> & QueryableStorageEntry; diff --git a/typescript-api/src/dancelight/interfaces/lookup.ts b/typescript-api/src/dancelight/interfaces/lookup.ts index f02ca155d..4431ccd35 100644 --- a/typescript-api/src/dancelight/interfaces/lookup.ts +++ b/typescript-api/src/dancelight/interfaces/lookup.ts @@ -3659,7 +3659,24 @@ export default { V4: "StagingXcmV4AssetAssetId", }, }, - /** Lookup389: pallet_migrations::pallet::Call */ + /** Lookup389: pallet_external_validators::pallet::Call */ + PalletExternalValidatorsCall: { + _enum: { + skip_external_validators: { + skip: "bool", + }, + add_whitelisted: { + who: "AccountId32", + }, + remove_whitelisted: { + who: "AccountId32", + }, + force_no_eras: "Null", + force_new_era: "Null", + force_new_era_always: "Null", + }, + }, + /** Lookup390: pallet_migrations::pallet::Call */ PalletMigrationsCall: { _enum: { force_set_cursor: { @@ -3676,20 +3693,20 @@ export default { }, }, }, - /** Lookup391: pallet_migrations::MigrationCursor, BlockNumber> */ + /** Lookup392: pallet_migrations::MigrationCursor, BlockNumber> */ PalletMigrationsMigrationCursor: { _enum: { Active: "PalletMigrationsActiveCursor", Stuck: "Null", }, }, - /** Lookup393: pallet_migrations::ActiveCursor, BlockNumber> */ + /** Lookup394: pallet_migrations::ActiveCursor, BlockNumber> */ PalletMigrationsActiveCursor: { index: "u32", innerCursor: "Option", startedAt: "u32", }, - /** Lookup395: pallet_migrations::HistoricCleanupSelector> */ + /** Lookup396: pallet_migrations::HistoricCleanupSelector> */ PalletMigrationsHistoricCleanupSelector: { _enum: { Specific: "Vec", @@ -3699,7 +3716,7 @@ export default { }, }, }, - /** Lookup398: pallet_beefy::pallet::Call */ + /** Lookup399: pallet_beefy::pallet::Call */ PalletBeefyCall: { _enum: { report_double_voting: { @@ -3732,17 +3749,17 @@ export default { }, }, /** - * Lookup399: sp_consensus_beefy::DoubleVotingProof */ SpConsensusBeefyDoubleVotingProof: { first: "SpConsensusBeefyVoteMessage", second: "SpConsensusBeefyVoteMessage", }, - /** Lookup400: sp_consensus_beefy::ecdsa_crypto::Signature */ + /** Lookup401: sp_consensus_beefy::ecdsa_crypto::Signature */ SpConsensusBeefyEcdsaCryptoSignature: "[u8;65]", /** - * Lookup401: sp_consensus_beefy::VoteMessage */ SpConsensusBeefyVoteMessage: { @@ -3750,16 +3767,16 @@ export default { id: "SpConsensusBeefyEcdsaCryptoPublic", signature: "SpConsensusBeefyEcdsaCryptoSignature", }, - /** Lookup402: sp_consensus_beefy::commitment::Commitment */ + /** Lookup403: sp_consensus_beefy::commitment::Commitment */ SpConsensusBeefyCommitment: { payload: "SpConsensusBeefyPayload", blockNumber: "u32", validatorSetId: "u64", }, - /** Lookup403: sp_consensus_beefy::payload::Payload */ + /** Lookup404: sp_consensus_beefy::payload::Payload */ SpConsensusBeefyPayload: "Vec<([u8;2],Bytes)>", /** - * Lookup406: sp_consensus_beefy::ForkVotingProof, + * Lookup407: sp_consensus_beefy::ForkVotingProof, * sp_consensus_beefy::ecdsa_crypto::Public, sp_mmr_primitives::AncestryProof> */ SpConsensusBeefyForkVotingProof: { @@ -3767,18 +3784,18 @@ export default { ancestryProof: "SpMmrPrimitivesAncestryProof", header: "SpRuntimeHeader", }, - /** Lookup407: sp_mmr_primitives::AncestryProof */ + /** Lookup408: sp_mmr_primitives::AncestryProof */ SpMmrPrimitivesAncestryProof: { prevPeaks: "Vec", prevLeafCount: "u64", leafCount: "u64", items: "Vec<(u64,H256)>", }, - /** Lookup410: sp_consensus_beefy::FutureBlockVotingProof */ + /** Lookup411: sp_consensus_beefy::FutureBlockVotingProof */ SpConsensusBeefyFutureBlockVotingProof: { vote: "SpConsensusBeefyVoteMessage", }, - /** Lookup411: snowbridge_pallet_ethereum_client::pallet::Call */ + /** Lookup412: snowbridge_pallet_ethereum_client::pallet::Call */ SnowbridgePalletEthereumClientCall: { _enum: { force_checkpoint: { @@ -3793,7 +3810,7 @@ export default { }, }, }, - /** Lookup412: snowbridge_beacon_primitives::updates::CheckpointUpdate */ + /** Lookup413: snowbridge_beacon_primitives::updates::CheckpointUpdate */ SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate: { header: "SnowbridgeBeaconPrimitivesBeaconHeader", currentSyncCommittee: "SnowbridgeBeaconPrimitivesSyncCommittee", @@ -3802,7 +3819,7 @@ export default { blockRootsRoot: "H256", blockRootsBranch: "Vec", }, - /** Lookup413: snowbridge_beacon_primitives::types::BeaconHeader */ + /** Lookup414: snowbridge_beacon_primitives::types::BeaconHeader */ SnowbridgeBeaconPrimitivesBeaconHeader: { slot: "u64", proposerIndex: "u64", @@ -3810,14 +3827,14 @@ export default { stateRoot: "H256", bodyRoot: "H256", }, - /** Lookup414: snowbridge_beacon_primitives::types::SyncCommittee */ + /** Lookup415: snowbridge_beacon_primitives::types::SyncCommittee */ SnowbridgeBeaconPrimitivesSyncCommittee: { pubkeys: "[[u8;48];512]", aggregatePubkey: "SnowbridgeBeaconPrimitivesPublicKey", }, - /** Lookup416: snowbridge_beacon_primitives::types::PublicKey */ + /** Lookup417: snowbridge_beacon_primitives::types::PublicKey */ SnowbridgeBeaconPrimitivesPublicKey: "[u8;48]", - /** Lookup418: snowbridge_beacon_primitives::updates::Update */ + /** Lookup419: snowbridge_beacon_primitives::updates::Update */ SnowbridgeBeaconPrimitivesUpdatesUpdate: { attestedHeader: "SnowbridgeBeaconPrimitivesBeaconHeader", syncAggregate: "SnowbridgeBeaconPrimitivesSyncAggregate", @@ -3828,23 +3845,23 @@ export default { blockRootsRoot: "H256", blockRootsBranch: "Vec", }, - /** Lookup419: snowbridge_beacon_primitives::types::SyncAggregate */ + /** Lookup420: snowbridge_beacon_primitives::types::SyncAggregate */ SnowbridgeBeaconPrimitivesSyncAggregate: { syncCommitteeBits: "[u8;64]", syncCommitteeSignature: "SnowbridgeBeaconPrimitivesSignature", }, - /** Lookup420: snowbridge_beacon_primitives::types::Signature */ + /** Lookup421: snowbridge_beacon_primitives::types::Signature */ SnowbridgeBeaconPrimitivesSignature: "[u8;96]", - /** Lookup423: snowbridge_beacon_primitives::updates::NextSyncCommitteeUpdate */ + /** Lookup424: snowbridge_beacon_primitives::updates::NextSyncCommitteeUpdate */ SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate: { nextSyncCommittee: "SnowbridgeBeaconPrimitivesSyncCommittee", nextSyncCommitteeBranch: "Vec", }, - /** Lookup424: snowbridge_core::operating_mode::BasicOperatingMode */ + /** Lookup425: snowbridge_core::operating_mode::BasicOperatingMode */ SnowbridgeCoreOperatingModeBasicOperatingMode: { _enum: ["Normal", "Halted"], }, - /** Lookup425: polkadot_runtime_common::paras_sudo_wrapper::pallet::Call */ + /** Lookup426: polkadot_runtime_common::paras_sudo_wrapper::pallet::Call */ PolkadotRuntimeCommonParasSudoWrapperPalletCall: { _enum: { sudo_schedule_para_initialize: { @@ -3872,29 +3889,12 @@ export default { }, }, }, - /** Lookup426: polkadot_runtime_parachains::paras::ParaGenesisArgs */ + /** Lookup427: polkadot_runtime_parachains::paras::ParaGenesisArgs */ PolkadotRuntimeParachainsParasParaGenesisArgs: { genesisHead: "Bytes", validationCode: "Bytes", paraKind: "bool", }, - /** Lookup427: pallet_external_validators::pallet::Call */ - PalletExternalValidatorsCall: { - _enum: { - skip_external_validators: { - skip: "bool", - }, - add_whitelisted: { - who: "AccountId32", - }, - remove_whitelisted: { - who: "AccountId32", - }, - force_no_eras: "Null", - force_new_era: "Null", - force_new_era_always: "Null", - }, - }, /** Lookup428: pallet_root_testing::pallet::Call */ PalletRootTestingCall: { _enum: { @@ -4529,7 +4529,28 @@ export default { }, }, }, - /** Lookup466: pallet_migrations::pallet::Event */ + /** Lookup466: pallet_external_validators::pallet::Event */ + PalletExternalValidatorsEvent: { + _enum: { + WhitelistedValidatorAdded: { + accountId: "AccountId32", + }, + WhitelistedValidatorRemoved: { + accountId: "AccountId32", + }, + NewEra: { + era: "u32", + }, + ForceEra: { + mode: "PalletExternalValidatorsForcing", + }, + }, + }, + /** Lookup467: pallet_external_validators::Forcing */ + PalletExternalValidatorsForcing: { + _enum: ["NotForcing", "ForceNew", "ForceNone", "ForceAlways"], + }, + /** Lookup468: pallet_migrations::pallet::Event */ PalletMigrationsEvent: { _enum: { RuntimeUpgradeStarted: "Null", @@ -4551,7 +4572,7 @@ export default { }, }, }, - /** Lookup468: snowbridge_pallet_ethereum_client::pallet::Event */ + /** Lookup470: snowbridge_pallet_ethereum_client::pallet::Event */ SnowbridgePalletEthereumClientEvent: { _enum: { BeaconHeaderImported: { @@ -4566,27 +4587,6 @@ export default { }, }, }, - /** Lookup469: pallet_external_validators::pallet::Event */ - PalletExternalValidatorsEvent: { - _enum: { - WhitelistedValidatorAdded: { - accountId: "AccountId32", - }, - WhitelistedValidatorRemoved: { - accountId: "AccountId32", - }, - NewEra: { - era: "u32", - }, - ForceEra: { - mode: "PalletExternalValidatorsForcing", - }, - }, - }, - /** Lookup470: pallet_external_validators::Forcing */ - PalletExternalValidatorsForcing: { - _enum: ["NotForcing", "ForceNew", "ForceNone", "ForceAlways"], - }, /** Lookup471: pallet_root_testing::pallet::Event */ PalletRootTestingEvent: { _enum: ["DefensiveTestCall"], @@ -5948,11 +5948,26 @@ export default { "LocalExecutionIncomplete", ], }, - /** Lookup783: pallet_migrations::pallet::Error */ + /** Lookup785: tp_traits::ActiveEraInfo */ + TpTraitsActiveEraInfo: { + index: "u32", + start: "Option", + }, + /** Lookup787: pallet_external_validators::pallet::Error */ + PalletExternalValidatorsError: { + _enum: [ + "TooManyInvulnerables", + "AlreadyInvulnerable", + "NotInvulnerable", + "NoKeysRegistered", + "UnableToDeriveCollatorId", + ], + }, + /** Lookup788: pallet_migrations::pallet::Error */ PalletMigrationsError: { _enum: ["PreimageMissing", "WrongUpperBound", "PreimageIsTooBig", "PreimageAlreadyExists"], }, - /** Lookup787: pallet_beefy::pallet::Error */ + /** Lookup792: pallet_beefy::pallet::Error */ PalletBeefyError: { _enum: [ "InvalidKeyOwnershipProof", @@ -5964,43 +5979,43 @@ export default { "InvalidConfiguration", ], }, - /** Lookup788: sp_consensus_beefy::mmr::BeefyAuthoritySet */ + /** Lookup793: sp_consensus_beefy::mmr::BeefyAuthoritySet */ SpConsensusBeefyMmrBeefyAuthoritySet: { id: "u64", len: "u32", keysetCommitment: "H256", }, - /** Lookup789: snowbridge_beacon_primitives::types::CompactBeaconState */ + /** Lookup794: snowbridge_beacon_primitives::types::CompactBeaconState */ SnowbridgeBeaconPrimitivesCompactBeaconState: { slot: "Compact", blockRootsRoot: "H256", }, - /** Lookup790: snowbridge_beacon_primitives::types::SyncCommitteePrepared */ + /** Lookup795: snowbridge_beacon_primitives::types::SyncCommitteePrepared */ SnowbridgeBeaconPrimitivesSyncCommitteePrepared: { root: "H256", - pubkeys: "[Lookup792;512]", + pubkeys: "[Lookup797;512]", aggregatePubkey: "SnowbridgeMilagroBlsKeysPublicKey", }, - /** Lookup792: snowbridge_milagro_bls::keys::PublicKey */ + /** Lookup797: snowbridge_milagro_bls::keys::PublicKey */ SnowbridgeMilagroBlsKeysPublicKey: { point: "SnowbridgeAmclBls381Ecp", }, - /** Lookup793: snowbridge_amcl::bls381::ecp::ECP */ + /** Lookup798: snowbridge_amcl::bls381::ecp::ECP */ SnowbridgeAmclBls381Ecp: { x: "SnowbridgeAmclBls381Fp", y: "SnowbridgeAmclBls381Fp", z: "SnowbridgeAmclBls381Fp", }, - /** Lookup794: snowbridge_amcl::bls381::fp::FP */ + /** Lookup799: snowbridge_amcl::bls381::fp::FP */ SnowbridgeAmclBls381Fp: { x: "SnowbridgeAmclBls381Big", xes: "i32", }, - /** Lookup795: snowbridge_amcl::bls381::big::Big */ + /** Lookup800: snowbridge_amcl::bls381::big::Big */ SnowbridgeAmclBls381Big: { w: "[i32;14]", }, - /** Lookup798: snowbridge_beacon_primitives::types::ForkVersions */ + /** Lookup803: snowbridge_beacon_primitives::types::ForkVersions */ SnowbridgeBeaconPrimitivesForkVersions: { genesis: "SnowbridgeBeaconPrimitivesFork", altair: "SnowbridgeBeaconPrimitivesFork", @@ -6008,12 +6023,12 @@ export default { capella: "SnowbridgeBeaconPrimitivesFork", deneb: "SnowbridgeBeaconPrimitivesFork", }, - /** Lookup799: snowbridge_beacon_primitives::types::Fork */ + /** Lookup804: snowbridge_beacon_primitives::types::Fork */ SnowbridgeBeaconPrimitivesFork: { version: "[u8;4]", epoch: "u64", }, - /** Lookup800: snowbridge_pallet_ethereum_client::pallet::Error */ + /** Lookup805: snowbridge_pallet_ethereum_client::pallet::Error */ SnowbridgePalletEthereumClientError: { _enum: { SkippedSyncCommitteePeriod: "Null", @@ -6043,11 +6058,11 @@ export default { Halted: "Null", }, }, - /** Lookup801: snowbridge_beacon_primitives::bls::BlsError */ + /** Lookup806: snowbridge_beacon_primitives::bls::BlsError */ SnowbridgeBeaconPrimitivesBlsBlsError: { _enum: ["InvalidSignature", "InvalidPublicKey", "InvalidAggregatePublicKeys", "SignatureVerificationFailed"], }, - /** Lookup802: polkadot_runtime_common::paras_sudo_wrapper::pallet::Error */ + /** Lookup807: polkadot_runtime_common::paras_sudo_wrapper::pallet::Error */ PolkadotRuntimeCommonParasSudoWrapperPalletError: { _enum: [ "ParaDoesntExist", @@ -6061,39 +6076,24 @@ export default { "TooManyCores", ], }, - /** Lookup803: tp_traits::ActiveEraInfo */ - TpTraitsActiveEraInfo: { - index: "u32", - start: "Option", - }, - /** Lookup805: pallet_external_validators::pallet::Error */ - PalletExternalValidatorsError: { - _enum: [ - "TooManyInvulnerables", - "AlreadyInvulnerable", - "NotInvulnerable", - "NoKeysRegistered", - "UnableToDeriveCollatorId", - ], - }, - /** Lookup806: pallet_sudo::pallet::Error */ + /** Lookup808: pallet_sudo::pallet::Error */ PalletSudoError: { _enum: ["RequireSudo"], }, - /** Lookup809: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ + /** Lookup811: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ FrameSystemExtensionsCheckNonZeroSender: "Null", - /** Lookup810: frame_system::extensions::check_spec_version::CheckSpecVersion */ + /** Lookup812: frame_system::extensions::check_spec_version::CheckSpecVersion */ FrameSystemExtensionsCheckSpecVersion: "Null", - /** Lookup811: frame_system::extensions::check_tx_version::CheckTxVersion */ + /** Lookup813: frame_system::extensions::check_tx_version::CheckTxVersion */ FrameSystemExtensionsCheckTxVersion: "Null", - /** Lookup812: frame_system::extensions::check_genesis::CheckGenesis */ + /** Lookup814: frame_system::extensions::check_genesis::CheckGenesis */ FrameSystemExtensionsCheckGenesis: "Null", - /** Lookup815: frame_system::extensions::check_nonce::CheckNonce */ + /** Lookup817: frame_system::extensions::check_nonce::CheckNonce */ FrameSystemExtensionsCheckNonce: "Compact", - /** Lookup816: frame_system::extensions::check_weight::CheckWeight */ + /** Lookup818: frame_system::extensions::check_weight::CheckWeight */ FrameSystemExtensionsCheckWeight: "Null", - /** Lookup817: pallet_transaction_payment::ChargeTransactionPayment */ + /** Lookup819: pallet_transaction_payment::ChargeTransactionPayment */ PalletTransactionPaymentChargeTransactionPayment: "Compact", - /** Lookup818: dancelight_runtime::Runtime */ + /** Lookup820: dancelight_runtime::Runtime */ DancelightRuntimeRuntime: "Null", }; diff --git a/typescript-api/src/dancelight/interfaces/types-lookup.ts b/typescript-api/src/dancelight/interfaces/types-lookup.ts index 95479e0b1..60b2773bd 100644 --- a/typescript-api/src/dancelight/interfaces/types-lookup.ts +++ b/typescript-api/src/dancelight/interfaces/types-lookup.ts @@ -4777,7 +4777,33 @@ declare module "@polkadot/types/lookup" { readonly type: "V3" | "V4"; } - /** @name PalletMigrationsCall (389) */ + /** @name PalletExternalValidatorsCall (389) */ + interface PalletExternalValidatorsCall extends Enum { + readonly isSkipExternalValidators: boolean; + readonly asSkipExternalValidators: { + readonly skip: bool; + } & Struct; + readonly isAddWhitelisted: boolean; + readonly asAddWhitelisted: { + readonly who: AccountId32; + } & Struct; + readonly isRemoveWhitelisted: boolean; + readonly asRemoveWhitelisted: { + readonly who: AccountId32; + } & Struct; + readonly isForceNoEras: boolean; + readonly isForceNewEra: boolean; + readonly isForceNewEraAlways: boolean; + readonly type: + | "SkipExternalValidators" + | "AddWhitelisted" + | "RemoveWhitelisted" + | "ForceNoEras" + | "ForceNewEra" + | "ForceNewEraAlways"; + } + + /** @name PalletMigrationsCall (390) */ interface PalletMigrationsCall extends Enum { readonly isForceSetCursor: boolean; readonly asForceSetCursor: { @@ -4797,7 +4823,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ForceSetCursor" | "ForceSetActiveCursor" | "ForceOnboardMbms" | "ClearHistoric"; } - /** @name PalletMigrationsMigrationCursor (391) */ + /** @name PalletMigrationsMigrationCursor (392) */ interface PalletMigrationsMigrationCursor extends Enum { readonly isActive: boolean; readonly asActive: PalletMigrationsActiveCursor; @@ -4805,14 +4831,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Active" | "Stuck"; } - /** @name PalletMigrationsActiveCursor (393) */ + /** @name PalletMigrationsActiveCursor (394) */ interface PalletMigrationsActiveCursor extends Struct { readonly index: u32; readonly innerCursor: Option; readonly startedAt: u32; } - /** @name PalletMigrationsHistoricCleanupSelector (395) */ + /** @name PalletMigrationsHistoricCleanupSelector (396) */ interface PalletMigrationsHistoricCleanupSelector extends Enum { readonly isSpecific: boolean; readonly asSpecific: Vec; @@ -4824,7 +4850,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Specific" | "Wildcard"; } - /** @name PalletBeefyCall (398) */ + /** @name PalletBeefyCall (399) */ interface PalletBeefyCall extends Enum { readonly isReportDoubleVoting: boolean; readonly asReportDoubleVoting: { @@ -4870,40 +4896,40 @@ declare module "@polkadot/types/lookup" { | "ReportFutureBlockVotingUnsigned"; } - /** @name SpConsensusBeefyDoubleVotingProof (399) */ + /** @name SpConsensusBeefyDoubleVotingProof (400) */ interface SpConsensusBeefyDoubleVotingProof extends Struct { readonly first: SpConsensusBeefyVoteMessage; readonly second: SpConsensusBeefyVoteMessage; } - /** @name SpConsensusBeefyEcdsaCryptoSignature (400) */ + /** @name SpConsensusBeefyEcdsaCryptoSignature (401) */ interface SpConsensusBeefyEcdsaCryptoSignature extends U8aFixed {} - /** @name SpConsensusBeefyVoteMessage (401) */ + /** @name SpConsensusBeefyVoteMessage (402) */ interface SpConsensusBeefyVoteMessage extends Struct { readonly commitment: SpConsensusBeefyCommitment; readonly id: SpConsensusBeefyEcdsaCryptoPublic; readonly signature: SpConsensusBeefyEcdsaCryptoSignature; } - /** @name SpConsensusBeefyCommitment (402) */ + /** @name SpConsensusBeefyCommitment (403) */ interface SpConsensusBeefyCommitment extends Struct { readonly payload: SpConsensusBeefyPayload; readonly blockNumber: u32; readonly validatorSetId: u64; } - /** @name SpConsensusBeefyPayload (403) */ + /** @name SpConsensusBeefyPayload (404) */ interface SpConsensusBeefyPayload extends Vec> {} - /** @name SpConsensusBeefyForkVotingProof (406) */ + /** @name SpConsensusBeefyForkVotingProof (407) */ interface SpConsensusBeefyForkVotingProof extends Struct { readonly vote: SpConsensusBeefyVoteMessage; readonly ancestryProof: SpMmrPrimitivesAncestryProof; readonly header: SpRuntimeHeader; } - /** @name SpMmrPrimitivesAncestryProof (407) */ + /** @name SpMmrPrimitivesAncestryProof (408) */ interface SpMmrPrimitivesAncestryProof extends Struct { readonly prevPeaks: Vec; readonly prevLeafCount: u64; @@ -4911,12 +4937,12 @@ declare module "@polkadot/types/lookup" { readonly items: Vec>; } - /** @name SpConsensusBeefyFutureBlockVotingProof (410) */ + /** @name SpConsensusBeefyFutureBlockVotingProof (411) */ interface SpConsensusBeefyFutureBlockVotingProof extends Struct { readonly vote: SpConsensusBeefyVoteMessage; } - /** @name SnowbridgePalletEthereumClientCall (411) */ + /** @name SnowbridgePalletEthereumClientCall (412) */ interface SnowbridgePalletEthereumClientCall extends Enum { readonly isForceCheckpoint: boolean; readonly asForceCheckpoint: { @@ -4933,7 +4959,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ForceCheckpoint" | "Submit" | "SetOperatingMode"; } - /** @name SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate (412) */ + /** @name SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate (413) */ interface SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate extends Struct { readonly header: SnowbridgeBeaconPrimitivesBeaconHeader; readonly currentSyncCommittee: SnowbridgeBeaconPrimitivesSyncCommittee; @@ -4943,7 +4969,7 @@ declare module "@polkadot/types/lookup" { readonly blockRootsBranch: Vec; } - /** @name SnowbridgeBeaconPrimitivesBeaconHeader (413) */ + /** @name SnowbridgeBeaconPrimitivesBeaconHeader (414) */ interface SnowbridgeBeaconPrimitivesBeaconHeader extends Struct { readonly slot: u64; readonly proposerIndex: u64; @@ -4952,16 +4978,16 @@ declare module "@polkadot/types/lookup" { readonly bodyRoot: H256; } - /** @name SnowbridgeBeaconPrimitivesSyncCommittee (414) */ + /** @name SnowbridgeBeaconPrimitivesSyncCommittee (415) */ interface SnowbridgeBeaconPrimitivesSyncCommittee extends Struct { readonly pubkeys: Vec; readonly aggregatePubkey: SnowbridgeBeaconPrimitivesPublicKey; } - /** @name SnowbridgeBeaconPrimitivesPublicKey (416) */ + /** @name SnowbridgeBeaconPrimitivesPublicKey (417) */ interface SnowbridgeBeaconPrimitivesPublicKey extends U8aFixed {} - /** @name SnowbridgeBeaconPrimitivesUpdatesUpdate (418) */ + /** @name SnowbridgeBeaconPrimitivesUpdatesUpdate (419) */ interface SnowbridgeBeaconPrimitivesUpdatesUpdate extends Struct { readonly attestedHeader: SnowbridgeBeaconPrimitivesBeaconHeader; readonly syncAggregate: SnowbridgeBeaconPrimitivesSyncAggregate; @@ -4973,29 +4999,29 @@ declare module "@polkadot/types/lookup" { readonly blockRootsBranch: Vec; } - /** @name SnowbridgeBeaconPrimitivesSyncAggregate (419) */ + /** @name SnowbridgeBeaconPrimitivesSyncAggregate (420) */ interface SnowbridgeBeaconPrimitivesSyncAggregate extends Struct { readonly syncCommitteeBits: U8aFixed; readonly syncCommitteeSignature: SnowbridgeBeaconPrimitivesSignature; } - /** @name SnowbridgeBeaconPrimitivesSignature (420) */ + /** @name SnowbridgeBeaconPrimitivesSignature (421) */ interface SnowbridgeBeaconPrimitivesSignature extends U8aFixed {} - /** @name SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate (423) */ + /** @name SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate (424) */ interface SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate extends Struct { readonly nextSyncCommittee: SnowbridgeBeaconPrimitivesSyncCommittee; readonly nextSyncCommitteeBranch: Vec; } - /** @name SnowbridgeCoreOperatingModeBasicOperatingMode (424) */ + /** @name SnowbridgeCoreOperatingModeBasicOperatingMode (425) */ interface SnowbridgeCoreOperatingModeBasicOperatingMode extends Enum { readonly isNormal: boolean; readonly isHalted: boolean; readonly type: "Normal" | "Halted"; } - /** @name PolkadotRuntimeCommonParasSudoWrapperPalletCall (425) */ + /** @name PolkadotRuntimeCommonParasSudoWrapperPalletCall (426) */ interface PolkadotRuntimeCommonParasSudoWrapperPalletCall extends Enum { readonly isSudoScheduleParaInitialize: boolean; readonly asSudoScheduleParaInitialize: { @@ -5035,39 +5061,13 @@ declare module "@polkadot/types/lookup" { | "SudoEstablishHrmpChannel"; } - /** @name PolkadotRuntimeParachainsParasParaGenesisArgs (426) */ + /** @name PolkadotRuntimeParachainsParasParaGenesisArgs (427) */ interface PolkadotRuntimeParachainsParasParaGenesisArgs extends Struct { readonly genesisHead: Bytes; readonly validationCode: Bytes; readonly paraKind: bool; } - /** @name PalletExternalValidatorsCall (427) */ - interface PalletExternalValidatorsCall extends Enum { - readonly isSkipExternalValidators: boolean; - readonly asSkipExternalValidators: { - readonly skip: bool; - } & Struct; - readonly isAddWhitelisted: boolean; - readonly asAddWhitelisted: { - readonly who: AccountId32; - } & Struct; - readonly isRemoveWhitelisted: boolean; - readonly asRemoveWhitelisted: { - readonly who: AccountId32; - } & Struct; - readonly isForceNoEras: boolean; - readonly isForceNewEra: boolean; - readonly isForceNewEraAlways: boolean; - readonly type: - | "SkipExternalValidators" - | "AddWhitelisted" - | "RemoveWhitelisted" - | "ForceNoEras" - | "ForceNewEra" - | "ForceNewEraAlways"; - } - /** @name PalletRootTestingCall (428) */ interface PalletRootTestingCall extends Enum { readonly isFillBlock: boolean; @@ -5883,7 +5883,37 @@ declare module "@polkadot/types/lookup" { readonly type: "Complete" | "Incomplete" | "Error"; } - /** @name PalletMigrationsEvent (466) */ + /** @name PalletExternalValidatorsEvent (466) */ + interface PalletExternalValidatorsEvent extends Enum { + readonly isWhitelistedValidatorAdded: boolean; + readonly asWhitelistedValidatorAdded: { + readonly accountId: AccountId32; + } & Struct; + readonly isWhitelistedValidatorRemoved: boolean; + readonly asWhitelistedValidatorRemoved: { + readonly accountId: AccountId32; + } & Struct; + readonly isNewEra: boolean; + readonly asNewEra: { + readonly era: u32; + } & Struct; + readonly isForceEra: boolean; + readonly asForceEra: { + readonly mode: PalletExternalValidatorsForcing; + } & Struct; + readonly type: "WhitelistedValidatorAdded" | "WhitelistedValidatorRemoved" | "NewEra" | "ForceEra"; + } + + /** @name PalletExternalValidatorsForcing (467) */ + interface PalletExternalValidatorsForcing extends Enum { + readonly isNotForcing: boolean; + readonly isForceNew: boolean; + readonly isForceNone: boolean; + readonly isForceAlways: boolean; + readonly type: "NotForcing" | "ForceNew" | "ForceNone" | "ForceAlways"; + } + + /** @name PalletMigrationsEvent (468) */ interface PalletMigrationsEvent extends Enum { readonly isRuntimeUpgradeStarted: boolean; readonly isRuntimeUpgradeCompleted: boolean; @@ -5916,7 +5946,7 @@ declare module "@polkadot/types/lookup" { | "FailedToResumeIdleXcmExecution"; } - /** @name SnowbridgePalletEthereumClientEvent (468) */ + /** @name SnowbridgePalletEthereumClientEvent (470) */ interface SnowbridgePalletEthereumClientEvent extends Enum { readonly isBeaconHeaderImported: boolean; readonly asBeaconHeaderImported: { @@ -5934,36 +5964,6 @@ declare module "@polkadot/types/lookup" { readonly type: "BeaconHeaderImported" | "SyncCommitteeUpdated" | "OperatingModeChanged"; } - /** @name PalletExternalValidatorsEvent (469) */ - interface PalletExternalValidatorsEvent extends Enum { - readonly isWhitelistedValidatorAdded: boolean; - readonly asWhitelistedValidatorAdded: { - readonly accountId: AccountId32; - } & Struct; - readonly isWhitelistedValidatorRemoved: boolean; - readonly asWhitelistedValidatorRemoved: { - readonly accountId: AccountId32; - } & Struct; - readonly isNewEra: boolean; - readonly asNewEra: { - readonly era: u32; - } & Struct; - readonly isForceEra: boolean; - readonly asForceEra: { - readonly mode: PalletExternalValidatorsForcing; - } & Struct; - readonly type: "WhitelistedValidatorAdded" | "WhitelistedValidatorRemoved" | "NewEra" | "ForceEra"; - } - - /** @name PalletExternalValidatorsForcing (470) */ - interface PalletExternalValidatorsForcing extends Enum { - readonly isNotForcing: boolean; - readonly isForceNew: boolean; - readonly isForceNone: boolean; - readonly isForceAlways: boolean; - readonly type: "NotForcing" | "ForceNew" | "ForceNone" | "ForceAlways"; - } - /** @name PalletRootTestingEvent (471) */ interface PalletRootTestingEvent extends Enum { readonly isDefensiveTestCall: boolean; @@ -7676,7 +7676,28 @@ declare module "@polkadot/types/lookup" { | "LocalExecutionIncomplete"; } - /** @name PalletMigrationsError (783) */ + /** @name TpTraitsActiveEraInfo (785) */ + interface TpTraitsActiveEraInfo extends Struct { + readonly index: u32; + readonly start: Option; + } + + /** @name PalletExternalValidatorsError (787) */ + interface PalletExternalValidatorsError extends Enum { + readonly isTooManyInvulnerables: boolean; + readonly isAlreadyInvulnerable: boolean; + readonly isNotInvulnerable: boolean; + readonly isNoKeysRegistered: boolean; + readonly isUnableToDeriveCollatorId: boolean; + readonly type: + | "TooManyInvulnerables" + | "AlreadyInvulnerable" + | "NotInvulnerable" + | "NoKeysRegistered" + | "UnableToDeriveCollatorId"; + } + + /** @name PalletMigrationsError (788) */ interface PalletMigrationsError extends Enum { readonly isPreimageMissing: boolean; readonly isWrongUpperBound: boolean; @@ -7685,7 +7706,7 @@ declare module "@polkadot/types/lookup" { readonly type: "PreimageMissing" | "WrongUpperBound" | "PreimageIsTooBig" | "PreimageAlreadyExists"; } - /** @name PalletBeefyError (787) */ + /** @name PalletBeefyError (792) */ interface PalletBeefyError extends Enum { readonly isInvalidKeyOwnershipProof: boolean; readonly isInvalidDoubleVotingProof: boolean; @@ -7704,50 +7725,50 @@ declare module "@polkadot/types/lookup" { | "InvalidConfiguration"; } - /** @name SpConsensusBeefyMmrBeefyAuthoritySet (788) */ + /** @name SpConsensusBeefyMmrBeefyAuthoritySet (793) */ interface SpConsensusBeefyMmrBeefyAuthoritySet extends Struct { readonly id: u64; readonly len: u32; readonly keysetCommitment: H256; } - /** @name SnowbridgeBeaconPrimitivesCompactBeaconState (789) */ + /** @name SnowbridgeBeaconPrimitivesCompactBeaconState (794) */ interface SnowbridgeBeaconPrimitivesCompactBeaconState extends Struct { readonly slot: Compact; readonly blockRootsRoot: H256; } - /** @name SnowbridgeBeaconPrimitivesSyncCommitteePrepared (790) */ + /** @name SnowbridgeBeaconPrimitivesSyncCommitteePrepared (795) */ interface SnowbridgeBeaconPrimitivesSyncCommitteePrepared extends Struct { readonly root: H256; readonly pubkeys: Vec; readonly aggregatePubkey: SnowbridgeMilagroBlsKeysPublicKey; } - /** @name SnowbridgeMilagroBlsKeysPublicKey (792) */ + /** @name SnowbridgeMilagroBlsKeysPublicKey (797) */ interface SnowbridgeMilagroBlsKeysPublicKey extends Struct { readonly point: SnowbridgeAmclBls381Ecp; } - /** @name SnowbridgeAmclBls381Ecp (793) */ + /** @name SnowbridgeAmclBls381Ecp (798) */ interface SnowbridgeAmclBls381Ecp extends Struct { readonly x: SnowbridgeAmclBls381Fp; readonly y: SnowbridgeAmclBls381Fp; readonly z: SnowbridgeAmclBls381Fp; } - /** @name SnowbridgeAmclBls381Fp (794) */ + /** @name SnowbridgeAmclBls381Fp (799) */ interface SnowbridgeAmclBls381Fp extends Struct { readonly x: SnowbridgeAmclBls381Big; readonly xes: i32; } - /** @name SnowbridgeAmclBls381Big (795) */ + /** @name SnowbridgeAmclBls381Big (800) */ interface SnowbridgeAmclBls381Big extends Struct { readonly w: Vec; } - /** @name SnowbridgeBeaconPrimitivesForkVersions (798) */ + /** @name SnowbridgeBeaconPrimitivesForkVersions (803) */ interface SnowbridgeBeaconPrimitivesForkVersions extends Struct { readonly genesis: SnowbridgeBeaconPrimitivesFork; readonly altair: SnowbridgeBeaconPrimitivesFork; @@ -7756,13 +7777,13 @@ declare module "@polkadot/types/lookup" { readonly deneb: SnowbridgeBeaconPrimitivesFork; } - /** @name SnowbridgeBeaconPrimitivesFork (799) */ + /** @name SnowbridgeBeaconPrimitivesFork (804) */ interface SnowbridgeBeaconPrimitivesFork extends Struct { readonly version: U8aFixed; readonly epoch: u64; } - /** @name SnowbridgePalletEthereumClientError (800) */ + /** @name SnowbridgePalletEthereumClientError (805) */ interface SnowbridgePalletEthereumClientError extends Enum { readonly isSkippedSyncCommitteePeriod: boolean; readonly isSyncCommitteeUpdateRequired: boolean; @@ -7818,7 +7839,7 @@ declare module "@polkadot/types/lookup" { | "Halted"; } - /** @name SnowbridgeBeaconPrimitivesBlsBlsError (801) */ + /** @name SnowbridgeBeaconPrimitivesBlsBlsError (806) */ interface SnowbridgeBeaconPrimitivesBlsBlsError extends Enum { readonly isInvalidSignature: boolean; readonly isInvalidPublicKey: boolean; @@ -7831,7 +7852,7 @@ declare module "@polkadot/types/lookup" { | "SignatureVerificationFailed"; } - /** @name PolkadotRuntimeCommonParasSudoWrapperPalletError (802) */ + /** @name PolkadotRuntimeCommonParasSudoWrapperPalletError (807) */ interface PolkadotRuntimeCommonParasSudoWrapperPalletError extends Enum { readonly isParaDoesntExist: boolean; readonly isParaAlreadyExists: boolean; @@ -7854,54 +7875,33 @@ declare module "@polkadot/types/lookup" { | "TooManyCores"; } - /** @name TpTraitsActiveEraInfo (803) */ - interface TpTraitsActiveEraInfo extends Struct { - readonly index: u32; - readonly start: Option; - } - - /** @name PalletExternalValidatorsError (805) */ - interface PalletExternalValidatorsError extends Enum { - readonly isTooManyInvulnerables: boolean; - readonly isAlreadyInvulnerable: boolean; - readonly isNotInvulnerable: boolean; - readonly isNoKeysRegistered: boolean; - readonly isUnableToDeriveCollatorId: boolean; - readonly type: - | "TooManyInvulnerables" - | "AlreadyInvulnerable" - | "NotInvulnerable" - | "NoKeysRegistered" - | "UnableToDeriveCollatorId"; - } - - /** @name PalletSudoError (806) */ + /** @name PalletSudoError (808) */ interface PalletSudoError extends Enum { readonly isRequireSudo: boolean; readonly type: "RequireSudo"; } - /** @name FrameSystemExtensionsCheckNonZeroSender (809) */ + /** @name FrameSystemExtensionsCheckNonZeroSender (811) */ type FrameSystemExtensionsCheckNonZeroSender = Null; - /** @name FrameSystemExtensionsCheckSpecVersion (810) */ + /** @name FrameSystemExtensionsCheckSpecVersion (812) */ type FrameSystemExtensionsCheckSpecVersion = Null; - /** @name FrameSystemExtensionsCheckTxVersion (811) */ + /** @name FrameSystemExtensionsCheckTxVersion (813) */ type FrameSystemExtensionsCheckTxVersion = Null; - /** @name FrameSystemExtensionsCheckGenesis (812) */ + /** @name FrameSystemExtensionsCheckGenesis (814) */ type FrameSystemExtensionsCheckGenesis = Null; - /** @name FrameSystemExtensionsCheckNonce (815) */ + /** @name FrameSystemExtensionsCheckNonce (817) */ interface FrameSystemExtensionsCheckNonce extends Compact {} - /** @name FrameSystemExtensionsCheckWeight (816) */ + /** @name FrameSystemExtensionsCheckWeight (818) */ type FrameSystemExtensionsCheckWeight = Null; - /** @name PalletTransactionPaymentChargeTransactionPayment (817) */ + /** @name PalletTransactionPaymentChargeTransactionPayment (819) */ interface PalletTransactionPaymentChargeTransactionPayment extends Compact {} - /** @name DancelightRuntimeRuntime (818) */ + /** @name DancelightRuntimeRuntime (820) */ type DancelightRuntimeRuntime = Null; } // declare module From b2bcfff3ad7c3ee905465a9182eae875aee3a4c4 Mon Sep 17 00:00:00 2001 From: girazoki Date: Thu, 24 Oct 2024 09:37:12 +0200 Subject: [PATCH 30/82] add invulnerables --- pallets/external-validator-slashes/src/lib.rs | 14 ++++---------- pallets/external-validator-slashes/src/mock.rs | 11 +++++++++-- pallets/external-validator-slashes/src/tests.rs | 6 +++--- solo-chains/runtime/dancelight/src/lib.rs | 1 + 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index 914b1b581..e4a9d6968 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -32,7 +32,7 @@ use { }, sp_std::vec, sp_std::vec::Vec, - tp_traits::{EraIndexProvider, OnEraEnd, OnEraStart}, + tp_traits::{EraIndexProvider, OnEraEnd, OnEraStart, InvulnerablesProvider}, }; pub use pallet::*; @@ -102,6 +102,8 @@ pub mod pallet { type SessionInterface: SessionInterface; type EraIndexProvider: EraIndexProvider; + + type InvulnerablesProvider: InvulnerablesProvider; } #[pallet::error] @@ -152,14 +154,6 @@ pub mod pallet { #[pallet::getter(fn eras_start_session_index)] pub type ErasStartSessionIndex = StorageMap<_, Twox64Concat, EraIndex, SessionIndex>; - /// Any validators that may never be slashed or forcibly kicked. It's a Vec since they're - /// easy to initialize and the performance hit is minimal (we expect no more than four - /// invulnerables) and restricted to testnets. - #[pallet::storage] - #[pallet::getter(fn invulnerables)] - #[pallet::unbounded] - pub type Invulnerables = StorageValue<_, Vec, ValueQuery>; - #[pallet::call] impl Pallet { #[pallet::call_index(0)] @@ -293,7 +287,7 @@ where let slash_defer_duration = T::SlashDeferDuration::get(); - let invulnerables = Self::invulnerables(); + let invulnerables = T::InvulnerablesProvider::invulnerables(); add_db_reads_writes(1, 0); let mut next_slash_id = NextSlashId::::get(); diff --git a/pallets/external-validator-slashes/src/mock.rs b/pallets/external-validator-slashes/src/mock.rs index 6bcd2ea76..0783d03e8 100644 --- a/pallets/external-validator-slashes/src/mock.rs +++ b/pallets/external-validator-slashes/src/mock.rs @@ -29,7 +29,7 @@ use { }, sp_staking::SessionIndex, sp_std::cell::RefCell, - tp_traits::{ActiveEraInfo, EraIndex, EraIndexProvider}, + tp_traits::{ActiveEraInfo, EraIndex, EraIndexProvider, InvulnerablesProvider}, }; type Block = frame_system::mocking::MockBlock; @@ -163,10 +163,16 @@ impl pallet_session::SessionHandler for TestSessionHandler { _: &[(AccountId, Ks)], ) { } - fn on_disabled(_: u32) {} } +pub struct MockInvulnerableProvider; +impl InvulnerablesProvider for MockInvulnerableProvider { + fn invulnerables() -> Vec { + vec![1, 2] + } +} + parameter_types! { pub const DeferPeriod: u32 = 2u32; pub const BondingDuration: u32 = 5u32; @@ -181,6 +187,7 @@ impl external_validator_slashes::Config for Test { type SlashId = u32; type SessionInterface = (); type EraIndexProvider = MockEraIndexProvider; + type InvulnerablesProvider = MockInvulnerableProvider; } pub struct FullIdentificationOf; diff --git a/pallets/external-validator-slashes/src/tests.rs b/pallets/external-validator-slashes/src/tests.rs index 75cc00cbe..28bff51a2 100644 --- a/pallets/external-validator-slashes/src/tests.rs +++ b/pallets/external-validator-slashes/src/tests.rs @@ -159,7 +159,8 @@ fn test_on_offence_injects_offences() { start_era(1, 1); Pallet::::on_offence( &[OffenceDetails { - offender: (1, ()), + // 1 and 2 are invulnerables + offender: (3, ()), reporters: vec![], }], &[Perbill::from_percent(75)], @@ -173,7 +174,7 @@ fn test_on_offence_injects_offences() { assert_eq!( Slashes::::get(slash_era), vec![Slash { - validator: 1, + validator: 3, percentage: Perbill::from_percent(75), confirmed: false, reporters: vec![], @@ -189,7 +190,6 @@ fn test_on_offence_does_not_work_for_invulnerables() { start_era(0, 0); start_era(1, 1); // account 1 invulnerable - Invulnerables::::put(vec![1]); Pallet::::on_offence( &[OffenceDetails { offender: (1, ()), diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index d51594789..bce50836a 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -1234,6 +1234,7 @@ impl pallet_external_validator_slashes::Config for Runtime { type SlashId = u32; type SessionInterface = DancelightSessionInterface; type EraIndexProvider = ExternalValidators; + type InvulnerablesProvider = ExternalValidators; } impl pallet_sudo::Config for Runtime { From 1187bc4c6f255697b2a8ed95ac85059f17c31e98 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 24 Oct 2024 10:26:15 +0200 Subject: [PATCH 31/82] Add one typescript test --- .../src/tests/external_validators_tests.rs | 150 +++++++++--------- test/configs/zombieDancelight.json | 8 +- .../test-external-validators.ts | 58 +++++++ 3 files changed, 140 insertions(+), 76 deletions(-) create mode 100644 test/suites/dev-tanssi-relay/external-validators/test-external-validators.ts diff --git a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs index ba76f60ef..00b7ed9eb 100644 --- a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs +++ b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs @@ -281,49 +281,46 @@ fn no_duplicate_validators() { }); } -mod force_eras { - use super::*; +#[test] +fn default_era_changes() { + 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), + ]) + .build() + .execute_with(|| { + run_to_block(2); - #[test] - fn default_era_changes() { - 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), - ]) - .build() - .execute_with(|| { - run_to_block(2); + // SessionsPerEra depends on fast-runtime feature, this test should pass regardless + let sessions_per_era = SessionsPerEra::get(); - // SessionsPerEra depends on fast-runtime feature, this test should pass regardless - let sessions_per_era = SessionsPerEra::get(); + if sessions_per_era != 6 { + log::error!("Ignoring test default_era_changes because it doesn't work with sessions_per_era={}. Compile without fast-runtime feature and try again.", sessions_per_era); + return; + } - if sessions_per_era != 6 { - log::error!("Ignoring test default_era_changes because it doesn't work with sessions_per_era={}. Compile without fast-runtime feature and try again.", sessions_per_era); - return; - } - - let mut data = vec![]; - let mut prev_validators = Session::validators(); - - for session in 1u32..=(sessions_per_era * 2 + 1) { - // For every session: - // * Create a new validator account, MockValidatorN, mint balance, and insert keys - // * Set this validator as the only "external validator" - // * Run to session start - // * Pallet session wants to know validators for the next session (session + 1), so: - // * If the next session is in the same era as the previous session: validators do not change - // * If the next session is in a new era: new validators will be set to [Alice, Bob, MockValidatorN] - // and stored as QueuedKeys in pallet session. - // So validators for session N will be [Alice, Bob, MockValidator(N-1)] - let mock_validator = AccountId::from([0x10 + session as u8; 32]); - let mock_keys = get_authority_keys_from_seed(&mock_validator.to_string(), None); - - assert_ok!(Balances::mint_into(&mock_validator, 10_000 * UNIT)); - assert_ok!(Session::set_keys( + let mut data = vec![]; + let mut prev_validators = Session::validators(); + + for session in 1u32..=(sessions_per_era * 2 + 1) { + // For every session: + // * Create a new validator account, MockValidatorN, mint balance, and insert keys + // * Set this validator as the only "external validator" + // * Run to session start + // * Pallet session wants to know validators for the next session (session + 1), so: + // * If the next session is in the same era as the previous session: validators do not change + // * If the next session is in a new era: new validators will be set to [Alice, Bob, MockValidatorN] + // and stored as QueuedKeys in pallet session. + // So validators for session N will be [Alice, Bob, MockValidator(N-1)] + let mock_validator = AccountId::from([0x10 + session as u8; 32]); + let mock_keys = get_authority_keys_from_seed(&mock_validator.to_string(), None); + + assert_ok!(Balances::mint_into(&mock_validator, 10_000 * UNIT)); + assert_ok!(Session::set_keys( origin_of(mock_validator.clone()), SessionKeys { babe: mock_keys.babe.clone(), @@ -337,41 +334,44 @@ mod force_eras { vec![] )); - ExternalValidators::set_external_validators(vec![mock_validator]).unwrap(); - - run_to_session(session); - let validators = Session::validators(); - let validators_changed = validators != prev_validators; - prev_validators = validators; - data.push(( - session, - ExternalValidators::current_era(), - ExternalValidators::active_era(), - ExternalValidators::active_era_session_start(), - validators_changed, - )); - } - - // (session, current_era, active_era, active_era_session_start, new_validators) - let expected = vec![ - (1, 0, 0, 0, false), - (2, 0, 0, 0, false), - (3, 0, 0, 0, false), - (4, 0, 0, 0, false), - (5, 1, 0, 0, false), - (6, 1, 1, 6, true), - (7, 1, 1, 6, false), - (8, 1, 1, 6, false), - (9, 1, 1, 6, false), - (10, 1, 1, 6, false), - (11, 2, 1, 6, false), - (12, 2, 2, 12, true), - (13, 2, 2, 12, false), - ]; - - assert_eq!(data, expected); - }); - } + ExternalValidators::set_external_validators(vec![mock_validator]).unwrap(); + + run_to_session(session); + let validators = Session::validators(); + let validators_changed = validators != prev_validators; + prev_validators = validators; + data.push(( + session, + ExternalValidators::current_era(), + ExternalValidators::active_era(), + ExternalValidators::active_era_session_start(), + validators_changed, + )); + } + + // (session, current_era, active_era, active_era_session_start, new_validators) + let expected = vec![ + (1, 0, 0, 0, false), + (2, 0, 0, 0, false), + (3, 0, 0, 0, false), + (4, 0, 0, 0, false), + (5, 1, 0, 0, false), + (6, 1, 1, 6, true), + (7, 1, 1, 6, false), + (8, 1, 1, 6, false), + (9, 1, 1, 6, false), + (10, 1, 1, 6, false), + (11, 2, 1, 6, false), + (12, 2, 2, 12, true), + (13, 2, 2, 12, false), + ]; + + assert_eq!(data, expected); + }); +} + +mod force_eras { + use super::*; #[test] fn force_new_era() { diff --git a/test/configs/zombieDancelight.json b/test/configs/zombieDancelight.json index 4ab301dad..b85e39ec6 100644 --- a/test/configs/zombieDancelight.json +++ b/test/configs/zombieDancelight.json @@ -6,7 +6,13 @@ "relaychain": { "chain_spec_path": "specs/tanssi-relay.json", "default_command": "../target/release/tanssi-relay", - "default_args": ["--no-hardware-benchmarks", "-lparachain=debug", "--database=paritydb", "--no-beefy", "--wasmtime-precompiled=wasm"], + "default_args": [ + "--no-hardware-benchmarks", + "-lparachain=debug", + "--database=paritydb", + "--no-beefy", + "--wasmtime-precompiled=wasm" + ], "genesis": { "runtimeGenesis": { "patch": { diff --git a/test/suites/dev-tanssi-relay/external-validators/test-external-validators.ts b/test/suites/dev-tanssi-relay/external-validators/test-external-validators.ts new file mode 100644 index 000000000..a4d9d5812 --- /dev/null +++ b/test/suites/dev-tanssi-relay/external-validators/test-external-validators.ts @@ -0,0 +1,58 @@ +import "@tanssi/api-augment"; +import { describeSuite, expect, beforeAll } from "@moonwall/cli"; +import { ApiPromise, Keyring } from "@polkadot/api"; +import { jumpToSession } from "util/block"; + +describeSuite({ + id: "DTR1501", + title: "External validators tests", + foundationMethods: "dev", + + testCases: ({ it, context }) => { + let polkadotJs: ApiPromise; + + beforeAll(async () => { + polkadotJs = context.polkadotJs(); + }); + + it({ + id: "E01", + title: "Collator should rotate", + test: async function () { + const keyring = new Keyring({ type: "sr25519" }); + const alice = keyring.addFromUri("//Alice", { name: "Alice default" }); + const aliceStash = keyring.addFromUri("//Alice//stash"); + const bob = keyring.addFromUri("//Bob", { name: "Bob default" }); + const sessionIndex = (await polkadotJs.query.session.currentIndex()).toNumber(); + const validators = (await polkadotJs.query.session.validators()).toJSON(); + + console.log(validators); + // TODO: initial validator is not alice? + // - Expected + // + Received + // + // Array [ + // - "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", + // + "5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY", + // ] + + expect(validators).to.deep.equal([aliceStash.address]); + + const tx = await polkadotJs.tx.sudo + .sudo(polkadotJs.tx.externalValidators.addWhitelisted(bob.address)) + .signAsync(alice); + await context.createBlock([tx]); + + await jumpToSession(context, 2); + + const validators2 = (await polkadotJs.query.session.validators()).toJSON(); + expect(validators2).to.deep.equal([aliceStash.address]); + + await jumpToSession(context, 3); + + const validators3 = (await polkadotJs.query.session.validators()).toJSON(); + expect(validators3).to.deep.equal([aliceStash.address, bob.address]); + }, + }); + }, +}); From af502be3183d9423209894ca74fb85a155a2a702 Mon Sep 17 00:00:00 2001 From: girazoki Date: Thu, 24 Oct 2024 11:56:24 +0200 Subject: [PATCH 32/82] a few more fixes --- pallets/external-validator-slashes/src/lib.rs | 5 +- solo-chains/runtime/dancelight/src/lib.rs | 1 - .../dancelight/src/tests/common/mod.rs | 21 +- .../runtime/dancelight/src/tests/slashes.rs | 431 ++++++++++++++++++ 4 files changed, 440 insertions(+), 18 deletions(-) create mode 100644 solo-chains/runtime/dancelight/src/tests/slashes.rs diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index e4a9d6968..caa6c6062 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -32,7 +32,7 @@ use { }, sp_std::vec, sp_std::vec::Vec, - tp_traits::{EraIndexProvider, OnEraEnd, OnEraStart, InvulnerablesProvider}, + tp_traits::{EraIndexProvider, InvulnerablesProvider, OnEraEnd, OnEraStart}, }; pub use pallet::*; @@ -132,8 +132,7 @@ pub mod pallet { /// `[active_era - bounding_duration; active_era]` #[pallet::storage] #[pallet::unbounded] - pub(crate) type BondedEras = - StorageValue<_, Vec<(EraIndex, SessionIndex)>, ValueQuery>; + pub type BondedEras = StorageValue<_, Vec<(EraIndex, SessionIndex)>, ValueQuery>; #[pallet::storage] #[pallet::getter(fn next_slash_id)] diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index bce50836a..7f36fa38f 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -1205,7 +1205,6 @@ impl SessionInterface for DancelightSessionInterface { parameter_types! { pub const SessionsPerEra: SessionIndex = runtime_common::prod_or_fast!(6, 3); pub const SlashDeferDuration: EraIndex = 2; - pub const BondDuration: EraIndex = 10; } impl pallet_external_validators::Config for Runtime { diff --git a/solo-chains/runtime/dancelight/src/tests/common/mod.rs b/solo-chains/runtime/dancelight/src/tests/common/mod.rs index 8ac24eea8..88361f9cf 100644 --- a/solo-chains/runtime/dancelight/src/tests/common/mod.rs +++ b/solo-chains/runtime/dancelight/src/tests/common/mod.rs @@ -1202,17 +1202,16 @@ pub fn generate_ethereum_pub_keys(n: u32) -> Vec { use babe_primitives::{AuthorityId as BabeAuthorityId, AuthorityPair as BabeAuthorityPair, Slot}; use grandpa_primitives::{ - AuthorityId as GrandpaAuthorityId, Equivocation, EquivocationProof, RoundNumber, SetId, + AuthorityPair as GrandpaAuthorityPair, Equivocation, EquivocationProof, RoundNumber, SetId, }; use keyring::{Ed25519Keyring, Sr25519Keyring}; use sp_core::H256; pub fn generate_grandpa_equivocation_proof( set_id: SetId, - vote1: (RoundNumber, H256, u64, &GrandpaAuthorityId), - vote2: (RoundNumber, H256, u64, &GrandpaAuthorityId), -) -> EquivocationProof { - let signed_prevote = |round, hash, number, authority_id: &GrandpaAuthorityId| { - let keyring = extract_grandpa_keyring(authority_id); + vote1: (RoundNumber, H256, u32, &GrandpaAuthorityPair), + vote2: (RoundNumber, H256, u32, &GrandpaAuthorityPair), +) -> EquivocationProof { + let signed_prevote = |round, hash, number, authority_pair: &GrandpaAuthorityPair| { let prevote = finality_grandpa::Prevote { target_hash: hash, target_number: number, @@ -1220,7 +1219,7 @@ pub fn generate_grandpa_equivocation_proof( let prevote_msg = finality_grandpa::Message::Prevote(prevote.clone()); let payload = grandpa_primitives::localized_payload(round, set_id, &prevote_msg); - let signed = keyring.sign(&payload).into(); + let signed = authority_pair.sign(&payload).into(); (prevote, signed) }; @@ -1231,19 +1230,13 @@ pub fn generate_grandpa_equivocation_proof( set_id, Equivocation::Prevote(finality_grandpa::Equivocation { round_number: vote1.0, - identity: vote1.3.clone().into(), + identity: vote1.3.public(), first: (prevote1, signed1), second: (prevote2, signed2), }), ) } -pub fn extract_grandpa_keyring(id: &GrandpaAuthorityId) -> Ed25519Keyring { - let mut raw_public = [0; 32]; - raw_public.copy_from_slice(id.as_ref()); - Ed25519Keyring::from_raw_public(raw_public).unwrap() -} - pub fn extract_babe_keyring(id: &BabeAuthorityId) -> Sr25519Keyring { let mut raw_public = [0; 32]; raw_public.copy_from_slice(id.as_ref()); diff --git a/solo-chains/runtime/dancelight/src/tests/slashes.rs b/solo-chains/runtime/dancelight/src/tests/slashes.rs new file mode 100644 index 000000000..c5e936125 --- /dev/null +++ b/solo-chains/runtime/dancelight/src/tests/slashes.rs @@ -0,0 +1,431 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + +use frame_support::traits::KeyOwnerProofSystem; +use sp_core::Pair; +use sp_runtime::Perbill; +use { + crate::tests::common::*, + crate::{ + ExternalValidatorSlashes, ExternalValidators, Grandpa, Historical, Offences, + SlashDeferDuration, + }, + frame_support::assert_ok, + sp_core::H256, + sp_std::vec, +}; + +#[test] +fn invulnerables_cannot_be_slashed() { + 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), + ]) + .build() + .execute_with(|| { + run_to_block(2); + let alice_babe = get_pair_from_seed::( + &AccountId::from(ALICE).to_string(), + ); + + let equivocation_proof = generate_babe_equivocation_proof(0, &alice_babe); + // create the key ownership proof + let key = (babe_primitives::KEY_TYPE, alice_babe.public()); + let key_owner_proof = Historical::prove(key).unwrap(); + + // report the equivocation + assert_ok!(Babe::report_equivocation_unsigned( + RuntimeOrigin::none(), + Box::new(equivocation_proof), + key_owner_proof, + )); + + let reports: Vec<_> = pallet_offences::Reports::::iter() + .map(|offence| offence) + .collect(); + assert_eq!(reports.len(), 1); + assert_eq!(ExternalValidators::current_era(), 0); + + let slashes = ExternalValidatorSlashes::slashes( + ExternalValidators::current_era() + SlashDeferDuration::get() + 1, + ); + assert_eq!(slashes.len(), 0); + }); +} + +#[test] +fn non_invulnerables_can_be_slashed_with_babe() { + 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), + ]) + .build() + .execute_with(|| { + run_to_block(2); + assert_ok!(ExternalValidators::remove_whitelisted( + RuntimeOrigin::root(), + AccountId::from(ALICE) + )); + let alice_babe = get_pair_from_seed::( + &AccountId::from(ALICE).to_string(), + ); + + let equivocation_proof = generate_babe_equivocation_proof(0, &alice_babe); + // create the key ownership proof + let key = (babe_primitives::KEY_TYPE, alice_babe.public()); + let key_owner_proof = Historical::prove(key).unwrap(); + + // report the equivocation + assert_ok!(Babe::report_equivocation_unsigned( + RuntimeOrigin::none(), + Box::new(equivocation_proof), + key_owner_proof, + )); + + let reports: Vec<_> = pallet_offences::Reports::::iter() + .map(|offence| offence) + .collect(); + assert_eq!(reports.len(), 1); + assert_eq!(ExternalValidators::current_era(), 0); + + let slashes = ExternalValidatorSlashes::slashes( + ExternalValidators::current_era() + SlashDeferDuration::get() + 1, + ); + assert_eq!(slashes.len(), 1); + assert_eq!(slashes[0].validator, AccountId::from(ALICE)); + //the formula is (3*offenders/num_validators)^2 + // since we have 1 offender, 2 validators, this makes it a maximum of 1 + assert_eq!(slashes[0].percentage, Perbill::from_percent(100)); + }); +} + +#[test] +fn non_invulnerables_can_be_slashed_with_grandpa() { + 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), + ]) + .build() + .execute_with(|| { + run_to_block(2); + assert_ok!(ExternalValidators::remove_whitelisted( + RuntimeOrigin::root(), + AccountId::from(ALICE) + )); + let alice_grandpa = get_pair_from_seed::( + &AccountId::from(ALICE).to_string(), + ); + + let set_id = Grandpa::current_set_id(); + + let equivocation_proof = generate_grandpa_equivocation_proof( + set_id, + (1, H256::random(), 1, &alice_grandpa), + (1, H256::random(), 1, &alice_grandpa), + ); + // create the key ownership proof + let key = (grandpa_primitives::KEY_TYPE, alice_grandpa.public()); + let key_owner_proof = Historical::prove(key).unwrap(); + + // report the equivocation + assert_ok!(Grandpa::report_equivocation_unsigned( + RuntimeOrigin::none(), + Box::new(equivocation_proof), + key_owner_proof, + )); + + let reports: Vec<_> = pallet_offences::Reports::::iter() + .map(|offence| offence) + .collect(); + assert_eq!(reports.len(), 1); + assert_eq!(ExternalValidators::current_era(), 0); + + let slashes = ExternalValidatorSlashes::slashes( + ExternalValidators::current_era() + SlashDeferDuration::get() + 1, + ); + assert_eq!(slashes.len(), 1); + assert_eq!(slashes[0].validator, AccountId::from(ALICE)); + //the formula is (3*offenders/num_validators)^2 + // since we have 1 offender, 2 validators, this makes it a maximum of 1 + assert_eq!(slashes[0].percentage, Perbill::from_percent(100)); + }); +} + +#[test] +fn test_slashing_percentage_applied_correctly() { + 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_validators(vec![ + (AccountId::from(ALICE), 210 * UNIT), + (AccountId::from(BOB), 100 * UNIT), + (AccountId::from(CHARLIE), 100 * UNIT), + (AccountId::from(DAVE), 100 * UNIT), + ]) + .build() + .execute_with(|| { + run_to_block(2); + assert_ok!(ExternalValidators::remove_whitelisted( + RuntimeOrigin::root(), + AccountId::from(ALICE) + )); + let alice_babe = get_pair_from_seed::( + &AccountId::from(ALICE).to_string(), + ); + + let equivocation_proof = generate_babe_equivocation_proof(0, &alice_babe); + // create the key ownership proof + let key = (babe_primitives::KEY_TYPE, alice_babe.public()); + let key_owner_proof = Historical::prove(key).unwrap(); + + // report the equivocation + assert_ok!(Babe::report_equivocation_unsigned( + RuntimeOrigin::none(), + Box::new(equivocation_proof), + key_owner_proof, + )); + + let reports: Vec<_> = pallet_offences::Reports::::iter() + .map(|offence| offence) + .collect(); + assert_eq!(reports.len(), 1); + assert_eq!(ExternalValidators::current_era(), 0); + + let slashes = ExternalValidatorSlashes::slashes( + ExternalValidators::current_era() + SlashDeferDuration::get() + 1, + ); + assert_eq!(slashes.len(), 1); + assert_eq!(slashes[0].validator, AccountId::from(ALICE)); + //the formula is (3*offenders/num_validators)^2 + // since we have 1 offender, 4 validators, this makes it a maximum of 0.75^2=0.5625 + assert_eq!(slashes[0].percentage, Perbill::from_parts(562500000)); + }); +} + +#[test] +fn test_slashes_are_not_additive_in_percentage() { + 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), + (AccountId::from(EVE), 100_000 * UNIT), + ]) + .with_validators(vec![ + (AccountId::from(ALICE), 210 * UNIT), + (AccountId::from(BOB), 100 * UNIT), + (AccountId::from(CHARLIE), 100 * UNIT), + (AccountId::from(DAVE), 100 * UNIT), + (AccountId::from(EVE), 100 * UNIT), + ]) + .build() + .execute_with(|| { + run_to_block(2); + assert_ok!(ExternalValidators::remove_whitelisted( + RuntimeOrigin::root(), + AccountId::from(ALICE) + )); + let alice_babe = get_pair_from_seed::( + &AccountId::from(ALICE).to_string(), + ); + + let alice_babe = get_pair_from_seed::( + &AccountId::from(ALICE).to_string(), + ); + + let babe_equivocation_proof = generate_babe_equivocation_proof(0, &alice_babe); + // create the key ownership proof + let babe_key = (babe_primitives::KEY_TYPE, alice_babe.public()); + let babe_key_owner_proof = Historical::prove(babe_key).unwrap(); + + // report the equivocation + assert_ok!(Babe::report_equivocation_unsigned( + RuntimeOrigin::none(), + Box::new(babe_equivocation_proof), + babe_key_owner_proof, + )); + + // report grandpa equivocation + let alice_grandpa = get_pair_from_seed::( + &AccountId::from(ALICE).to_string(), + ); + + let set_id = Grandpa::current_set_id(); + + let grandpa_equivocation_proof = generate_grandpa_equivocation_proof( + set_id, + (1, H256::random(), 1, &alice_grandpa), + (1, H256::random(), 1, &alice_grandpa), + ); + // create the key ownership proof + let grandpa_key = (grandpa_primitives::KEY_TYPE, alice_grandpa.public()); + let grandpa_key_owner_proof = Historical::prove(grandpa_key).unwrap(); + + // report the equivocation + assert_ok!(Grandpa::report_equivocation_unsigned( + RuntimeOrigin::none(), + Box::new(grandpa_equivocation_proof), + grandpa_key_owner_proof, + )); + + let reports: Vec<_> = pallet_offences::Reports::::iter() + .map(|offence| offence) + .collect(); + + // we have 2 reports + assert_eq!(reports.len(), 2); + assert_eq!(ExternalValidators::current_era(), 0); + + let slashes = ExternalValidatorSlashes::slashes( + ExternalValidators::current_era() + SlashDeferDuration::get() + 1, + ); + + // but a single slash + assert_eq!(slashes.len(), 1); + assert_eq!(slashes[0].validator, AccountId::from(ALICE)); + // the formula is (3*offenders/num_validators)^2 + // since we have 1 offender, 5 validators, this makes it 0.36 + // we injected 2 offences BUT THEY ARE NOT ADDITIVE + assert_eq!(slashes[0].percentage, Perbill::from_parts(360000000)); + }); +} +#[test] +fn test_slashes_are_cleaned_after_bonding_period() { + ExtBuilder::default() + .with_balances(vec![ + // Alice gets 10k extra tokens for her mapping deposit + (AccountId::from(ALICE), 210_000 * UNIT), + (AccountId::from(BOB), 100_000 * UNIT), + (AccountId::from(CHARLIE), 100_000 * UNIT), + (AccountId::from(DAVE), 100_000 * UNIT), + ]) + .build() + .execute_with(|| { + run_to_block(2); + assert_ok!(ExternalValidators::remove_whitelisted( + RuntimeOrigin::root(), + AccountId::from(ALICE) + )); + let alice_babe = get_pair_from_seed::( + &AccountId::from(ALICE).to_string(), + ); + + let equivocation_proof = generate_babe_equivocation_proof(0, &alice_babe); + // create the key ownership proof + let key = (babe_primitives::KEY_TYPE, alice_babe.public()); + let key_owner_proof = Historical::prove(key).unwrap(); + + // report the equivocation + assert_ok!(Babe::report_equivocation_unsigned( + RuntimeOrigin::none(), + Box::new(equivocation_proof), + key_owner_proof, + )); + + let reports: Vec<_> = pallet_offences::Reports::::iter() + .map(|offence| offence) + .collect(); + assert_eq!(reports.len(), 1); + assert_eq!(ExternalValidators::current_era(), 0); + + let slashes = ExternalValidatorSlashes::slashes( + ExternalValidators::current_era() + SlashDeferDuration::get() + 1, + ); + assert_eq!(slashes.len(), 1); + // The first session in which the era 3 will be pruned is 96 + // 3 sessions per era, 28 days bonding period + // (28+3+1)*3 + run_to_session(96); + + let slashes_after_bonding_period = ExternalValidatorSlashes::slashes(3); + assert_eq!(slashes_after_bonding_period.len(), 0); + }); +} + +#[test] +fn test_slashes_can_be_cleared_before_deferred_period_applies() { + 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), + ]) + .build() + .execute_with(|| { + run_to_block(2); + assert_ok!(ExternalValidators::remove_whitelisted( + RuntimeOrigin::root(), + AccountId::from(ALICE) + )); + let alice_babe = get_pair_from_seed::( + &AccountId::from(ALICE).to_string(), + ); + + let equivocation_proof = generate_babe_equivocation_proof(0, &alice_babe); + // create the key ownership proof + let key = (babe_primitives::KEY_TYPE, alice_babe.public()); + let key_owner_proof = Historical::prove(key).unwrap(); + + // report the equivocation + assert_ok!(Babe::report_equivocation_unsigned( + RuntimeOrigin::none(), + Box::new(equivocation_proof), + key_owner_proof, + )); + + let reports: Vec<_> = pallet_offences::Reports::::iter() + .map(|offence| offence) + .collect(); + assert_eq!(reports.len(), 1); + assert_eq!(ExternalValidators::current_era(), 0); + + let slashes = ExternalValidatorSlashes::slashes( + ExternalValidators::current_era() + SlashDeferDuration::get() + 1, + ); + assert_eq!(slashes.len(), 1); + assert_eq!(slashes[0].validator, AccountId::from(ALICE)); + + // Now let's clean it up + assert_ok!(ExternalValidatorSlashes::cancel_deferred_slash( + RuntimeOrigin::root(), + 3, + vec![0] + )); + let slashes_after_cancel = ExternalValidatorSlashes::slashes(3); + assert_eq!(slashes_after_cancel.len(), 0); + }); +} From 74fc8573ea829f2b01750d0ba30e53336ace6f59 Mon Sep 17 00:00:00 2001 From: girazoki Date: Thu, 24 Oct 2024 13:37:50 +0200 Subject: [PATCH 33/82] more tests --- .../runtime/dancelight/src/tests/slashes.rs | 60 ++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/solo-chains/runtime/dancelight/src/tests/slashes.rs b/solo-chains/runtime/dancelight/src/tests/slashes.rs index c5e936125..cf52dca3c 100644 --- a/solo-chains/runtime/dancelight/src/tests/slashes.rs +++ b/solo-chains/runtime/dancelight/src/tests/slashes.rs @@ -23,7 +23,7 @@ use { ExternalValidatorSlashes, ExternalValidators, Grandpa, Historical, Offences, SlashDeferDuration, }, - frame_support::assert_ok, + frame_support::{assert_noop, assert_ok}, sp_core::H256, sp_std::vec, }; @@ -429,3 +429,61 @@ fn test_slashes_can_be_cleared_before_deferred_period_applies() { assert_eq!(slashes_after_cancel.len(), 0); }); } + +#[test] +fn test_slashes_cannot_be_cancelled_after_defer_period() { + ExtBuilder::default() + .with_balances(vec![ + // Alice gets 10k extra tokens for her mapping deposit + (AccountId::from(ALICE), 210_000 * UNIT), + (AccountId::from(BOB), 100_000 * UNIT), + (AccountId::from(CHARLIE), 100_000 * UNIT), + (AccountId::from(DAVE), 100_000 * UNIT), + ]) + .build() + .execute_with(|| { + run_to_block(2); + assert_ok!(ExternalValidators::remove_whitelisted( + RuntimeOrigin::root(), + AccountId::from(ALICE) + )); + let alice_babe = get_pair_from_seed::( + &AccountId::from(ALICE).to_string(), + ); + + let equivocation_proof = generate_babe_equivocation_proof(0, &alice_babe); + // create the key ownership proof + let key = (babe_primitives::KEY_TYPE, alice_babe.public()); + let key_owner_proof = Historical::prove(key).unwrap(); + + // report the equivocation + assert_ok!(Babe::report_equivocation_unsigned( + RuntimeOrigin::none(), + Box::new(equivocation_proof), + key_owner_proof, + )); + + let reports: Vec<_> = pallet_offences::Reports::::iter() + .map(|offence| offence) + .collect(); + assert_eq!(reports.len(), 1); + assert_eq!(ExternalValidators::current_era(), 0); + + let slashes = ExternalValidatorSlashes::slashes( + ExternalValidators::current_era() + SlashDeferDuration::get() + 1, + ); + assert_eq!(slashes.len(), 1); + assert_eq!(slashes[0].validator, AccountId::from(ALICE)); + + // The first session in which the era 3 will be deferred is 18 + // 3 sessions per era + // (3+2+1)*3 + run_to_session(18); + + // Now let's clean it up + assert_noop!( + ExternalValidatorSlashes::cancel_deferred_slash(RuntimeOrigin::root(), 3, vec![0]), + pallet_external_validator_slashes::Error::::DeferPeriodIsOver + ); + }); +} From 9614ac8c057c0ac43e91826e893bcb1894f035cb Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 24 Oct 2024 13:48:18 +0200 Subject: [PATCH 34/82] console log --- .../external-validators/test-external-validators.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/test/suites/dev-tanssi-relay/external-validators/test-external-validators.ts b/test/suites/dev-tanssi-relay/external-validators/test-external-validators.ts index a4d9d5812..e4fd720cf 100644 --- a/test/suites/dev-tanssi-relay/external-validators/test-external-validators.ts +++ b/test/suites/dev-tanssi-relay/external-validators/test-external-validators.ts @@ -23,19 +23,8 @@ describeSuite({ const alice = keyring.addFromUri("//Alice", { name: "Alice default" }); const aliceStash = keyring.addFromUri("//Alice//stash"); const bob = keyring.addFromUri("//Bob", { name: "Bob default" }); - const sessionIndex = (await polkadotJs.query.session.currentIndex()).toNumber(); const validators = (await polkadotJs.query.session.validators()).toJSON(); - console.log(validators); - // TODO: initial validator is not alice? - // - Expected - // + Received - // - // Array [ - // - "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - // + "5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY", - // ] - expect(validators).to.deep.equal([aliceStash.address]); const tx = await polkadotJs.tx.sudo From ae3de1e0e33bf8a1efae7d3c77a6058e68e94e79 Mon Sep 17 00:00:00 2001 From: girazoki Date: Thu, 24 Oct 2024 14:49:11 +0200 Subject: [PATCH 35/82] benchmarks --- Cargo.lock | 10 -- pallets/external-validator-slashes/Cargo.toml | 41 +-------- .../src/benchmarking.rs | 91 +++++++++++++++++++ pallets/external-validator-slashes/src/lib.rs | 16 ++++ solo-chains/runtime/dancelight/Cargo.toml | 1 + solo-chains/runtime/dancelight/src/lib.rs | 2 + 6 files changed, 113 insertions(+), 48 deletions(-) create mode 100644 pallets/external-validator-slashes/src/benchmarking.rs diff --git a/Cargo.lock b/Cargo.lock index 03963e9aa..209923f61 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9369,16 +9369,11 @@ name = "pallet-external-validator-slashes" version = "0.1.0" dependencies = [ "bounded-collections 0.1.9", - "cumulus-pallet-parachain-system", - "cumulus-primitives-core", - "dp-core", "frame-benchmarking", "frame-support", "frame-system", - "hex", "hex-literal 0.3.4", "log", - "nimbus-primitives", "pallet-session", "pallet-staking", "parity-scale-codec", @@ -9386,19 +9381,14 @@ dependencies = [ "polkadot-primitives", "scale-info", "serde", - "sp-consensus-aura", "sp-core", "sp-externalities", - "sp-inherents", "sp-io", "sp-runtime", "sp-staking", "sp-state-machine", "sp-std", - "sp-trie", "sp-version", - "test-relay-sproof-builder", - "tp-author-noting-inherent", "tp-traits", ] diff --git a/pallets/external-validator-slashes/Cargo.toml b/pallets/external-validator-slashes/Cargo.toml index 795ea375c..c224d36db 100644 --- a/pallets/external-validator-slashes/Cargo.toml +++ b/pallets/external-validator-slashes/Cargo.toml @@ -16,7 +16,6 @@ workspace = true frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } -hex = { workspace = true, optional = true, features = [ "alloc" ] } log = { workspace = true } parity-scale-codec = { workspace = true, features = [ "derive", "max-encoded-len" ] } pallet-session = { workspace = true } @@ -24,19 +23,10 @@ pallet-staking = { workspace = true } scale-info = { workspace = true } serde = { workspace = true, features = [ "derive" ] } -sp-consensus-aura = { workspace = true } sp-core = { workspace = true } -sp-inherents = { workspace = true } sp-runtime = { workspace = true } -sp-state-machine = { workspace = true } sp-std = { workspace = true } -sp-trie = { workspace = true } sp-staking = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-primitives-core = { workspace = true } -dp-core = { workspace = true } -nimbus-primitives = { workspace = true } -tp-author-noting-inherent = { workspace = true } tp-traits = { workspace = true } [dev-dependencies] @@ -48,61 +38,36 @@ sp-externalities = { workspace = true } sp-io = { workspace = true } sp-state-machine = { workspace = true } sp-version = { workspace = true } -test-relay-sproof-builder = { workspace = true } [features] default = [ "std" ] std = [ "bounded-collections/std", - "cumulus-pallet-parachain-system/std", - "cumulus-primitives-core/std", - "cumulus-primitives-core/std", - "dp-core/std", "frame-benchmarking/std", "frame-support/std", "frame-system/std", - "hex", - "hex?/std", "log/std", - "nimbus-primitives/std", "pallet-staking/std", "parity-scale-codec/std", "polkadot-parachain-primitives/std", "polkadot-primitives/std", "scale-info/std", "serde/std", - "sp-consensus-aura/std", "sp-core/std", "sp-externalities/std", - "sp-inherents/std", "sp-io/std", "sp-runtime/std", "sp-state-machine/std", "sp-std/std", - "sp-trie/std", "sp-version/std", - "test-relay-sproof-builder/std", - "tp-author-noting-inherent/std", "tp-traits/std", ] runtime-benchmarks = [ - "cumulus-pallet-parachain-system/runtime-benchmarks", - "cumulus-primitives-core/runtime-benchmarks", - "frame-benchmarking", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "hex", - "nimbus-primitives/runtime-benchmarks", - "polkadot-parachain-primitives/runtime-benchmarks", - "polkadot-primitives/runtime-benchmarks", + "pallet-staking/runtime-benchmarks", "sp-runtime/runtime-benchmarks", + "sp-staking/runtime-benchmarks", "tp-traits/runtime-benchmarks", -] -try-runtime = [ - "cumulus-pallet-parachain-system/try-runtime", - "frame-support/try-runtime", - "frame-system/try-runtime", - "nimbus-primitives/try-runtime", - "sp-runtime/try-runtime", -] +] \ No newline at end of file diff --git a/pallets/external-validator-slashes/src/benchmarking.rs b/pallets/external-validator-slashes/src/benchmarking.rs new file mode 100644 index 000000000..917f30aab --- /dev/null +++ b/pallets/external-validator-slashes/src/benchmarking.rs @@ -0,0 +1,91 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + +//! Benchmarking setup for pallet-external-validator-slashes + +use super::*; + +#[allow(unused)] +use crate::Pallet as ExternalValidatorSlashes; +use { + frame_benchmarking::{account, v2::*, BenchmarkError}, + frame_support::{ + pallet_prelude::*, + traits::{tokens::fungible::Balanced, Currency, EnsureOrigin, Get}, + }, + frame_system::{EventRecord, RawOrigin}, + pallet_session::{self as session, SessionManager}, + sp_runtime::traits::{AtLeast32BitUnsigned, Convert, TrailingZeroInput}, + sp_std::prelude::*, +}; + +fn assert_last_event(generic_event: ::RuntimeEvent) { + let events = frame_system::Pallet::::events(); + let system_event: ::RuntimeEvent = generic_event.into(); + // compare to the last event record + let EventRecord { event, .. } = &events[events.len() - 1]; + assert_eq!(event, &system_event); +} + +const MAX_SLASHES: u32 = 1000; +const SEED: u32 = 0; + +#[allow(clippy::multiple_bound_locations)] +#[benchmarks(where T: session::Config)] +mod benchmarks { + use super::*; + + #[benchmark] + fn cancel_deferred_slash(s: Linear<1, MAX_SLASHES>) -> Result<(), BenchmarkError> { + let mut existing_slashes = Vec::new(); + let era = EraIndex::one(); + let dummy = || T::AccountId::decode(&mut TrailingZeroInput::zeroes()).unwrap(); + for _ in 0..MAX_SLASHES { + existing_slashes.push(Slash::::default_from(dummy())); + } + Slashes::::insert(era, &existing_slashes); + let slash_indices: Vec = (0..s).collect(); + + #[extrinsic_call] + _(RawOrigin::Root, era, slash_indices); + + assert_eq!(Slashes::::get(&era).len(), (MAX_SLASHES - s) as usize); + Ok(()) + } + + #[benchmark] + fn force_inject_slash(s: Linear<1, MAX_SLASHES>) -> Result<(), BenchmarkError> { + let mut existing_slashes = Vec::new(); + let era = T::EraIndexProvider::active_era().index; + let dummy = || T::AccountId::decode(&mut TrailingZeroInput::zeroes()).unwrap(); + for _ in 0..s - 1 { + existing_slashes.push(Slash::::default_from(dummy())); + } + Slashes::::insert(era, &existing_slashes); + + #[extrinsic_call] + _(RawOrigin::Root, era, dummy(), Perbill::from_percent(50)); + + assert_eq!(Slashes::::get(&era).len(), s as usize); + Ok(()) + } + + impl_benchmark_test_suite!( + ExternalValidatorSlashes, + crate::mock::new_test_ext(), + crate::mock::Test, + ); +} diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index caa6c6062..c3499959d 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -43,6 +43,9 @@ mod mock; #[cfg(test)] mod tests; +#[cfg(feature = "runtime-benchmarks")] +mod benchmarking; + #[frame_support::pallet] pub mod pallet { use super::*; @@ -413,6 +416,19 @@ pub struct Slash { pub confirmed: bool, } +impl Slash { + /// Initializes the default object using the given `validator`. + pub fn default_from(validator: AccountId) -> Self { + Self { + validator, + reporters: vec![], + slash_id: One::one(), + percentage: Perbill::from_percent(50), + confirmed: false, + } + } +} + /// Computes a slash of a validator and nominators. It returns an unapplied /// record to be applied at some later point. Slashing metadata is updated in storage, /// since unapplied records are only rarely intended to be dropped. diff --git a/solo-chains/runtime/dancelight/Cargo.toml b/solo-chains/runtime/dancelight/Cargo.toml index 59d4e6d3c..deec52f14 100644 --- a/solo-chains/runtime/dancelight/Cargo.toml +++ b/solo-chains/runtime/dancelight/Cargo.toml @@ -309,6 +309,7 @@ runtime-benchmarks = [ "pallet-democracy/runtime-benchmarks", "pallet-elections-phragmen/runtime-benchmarks", "pallet-external-validators/runtime-benchmarks", + "pallet-external-validator-slashes/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", "pallet-identity/runtime-benchmarks", "pallet-inflation-rewards/runtime-benchmarks", diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index 7f36fa38f..c61b052ca 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -1944,11 +1944,13 @@ mod benches { [pallet_author_noting, AuthorNoting] [pallet_registrar, ContainerRegistrar] [pallet_external_validators, ExternalValidators] + [pallet_external_validator_slashes, ExternalValidatorSlashes] // XCM [pallet_xcm, PalletXcmExtrinsicsBenchmark::] [pallet_xcm_benchmarks::fungible, pallet_xcm_benchmarks::fungible::Pallet::] [pallet_xcm_benchmarks::generic, pallet_xcm_benchmarks::generic::Pallet::] + // Bridges [snowbridge_pallet_ethereum_client, EthereumBeaconClient] ); From cd08e17f479e5502c520a03ac30b63e54b72e8c5 Mon Sep 17 00:00:00 2001 From: girazoki Date: Thu, 24 Oct 2024 15:40:25 +0200 Subject: [PATCH 36/82] benchmarks generated --- .../src/benchmarking.rs | 10 +- pallets/external-validator-slashes/src/lib.rs | 11 +- .../external-validator-slashes/src/weights.rs | 129 ++++++++++++++++++ solo-chains/runtime/dancelight/src/lib.rs | 1 + .../runtime/dancelight/src/weights/mod.rs | 1 + .../pallet_external_validator_slashes.rs | 88 ++++++++++++ 6 files changed, 229 insertions(+), 11 deletions(-) create mode 100644 pallets/external-validator-slashes/src/weights.rs create mode 100644 solo-chains/runtime/dancelight/src/weights/pallet_external_validator_slashes.rs diff --git a/pallets/external-validator-slashes/src/benchmarking.rs b/pallets/external-validator-slashes/src/benchmarking.rs index 917f30aab..d6e793bc4 100644 --- a/pallets/external-validator-slashes/src/benchmarking.rs +++ b/pallets/external-validator-slashes/src/benchmarking.rs @@ -67,19 +67,13 @@ mod benchmarks { } #[benchmark] - fn force_inject_slash(s: Linear<1, MAX_SLASHES>) -> Result<(), BenchmarkError> { - let mut existing_slashes = Vec::new(); + fn force_inject_slash() -> Result<(), BenchmarkError> { let era = T::EraIndexProvider::active_era().index; let dummy = || T::AccountId::decode(&mut TrailingZeroInput::zeroes()).unwrap(); - for _ in 0..s - 1 { - existing_slashes.push(Slash::::default_from(dummy())); - } - Slashes::::insert(era, &existing_slashes); - #[extrinsic_call] _(RawOrigin::Root, era, dummy(), Perbill::from_percent(50)); - assert_eq!(Slashes::::get(&era).len(), s as usize); + assert_eq!(Slashes::::get(&era).len(), 1 as usize); Ok(()) } diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index c3499959d..4956165c9 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -32,7 +32,7 @@ use { }, sp_std::vec, sp_std::vec::Vec, - tp_traits::{EraIndexProvider, InvulnerablesProvider, OnEraEnd, OnEraStart}, + tp_traits::{EraIndexProvider, InvulnerablesProvider, OnEraStart}, }; pub use pallet::*; @@ -45,10 +45,12 @@ mod tests; #[cfg(feature = "runtime-benchmarks")] mod benchmarking; +pub mod weights; #[frame_support::pallet] pub mod pallet { use super::*; + pub use crate::weights::WeightInfo; #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] @@ -107,6 +109,9 @@ pub mod pallet { type EraIndexProvider: EraIndexProvider; type InvulnerablesProvider: InvulnerablesProvider; + + /// The weight information of this pallet. + type WeightInfo: WeightInfo; } #[pallet::error] @@ -159,7 +164,7 @@ pub mod pallet { #[pallet::call] impl Pallet { #[pallet::call_index(0)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::cancel_deferred_slash(slash_indices.len() as u32))] pub fn cancel_deferred_slash( origin: OriginFor, era: EraIndex, @@ -196,7 +201,7 @@ pub mod pallet { } #[pallet::call_index(1)] - #[pallet::weight(0)] + #[pallet::weight(T::WeightInfo::force_inject_slash())] pub fn force_inject_slash( origin: OriginFor, era: EraIndex, diff --git a/pallets/external-validator-slashes/src/weights.rs b/pallets/external-validator-slashes/src/weights.rs new file mode 100644 index 000000000..295087614 --- /dev/null +++ b/pallets/external-validator-slashes/src/weights.rs @@ -0,0 +1,129 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + + +//! Autogenerated weights for pallet_external_validator_slashes +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-10-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `girazoki-XPS-15-9530`, CPU: `13th Gen Intel(R) Core(TM) i9-13900H` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/tanssi-relay +// benchmark +// pallet +// --execution=wasm +// --wasm-execution=compiled +// --pallet +// pallet_external_validator_slashes +// --extrinsic +// * +// --chain=dev +// --steps +// 50 +// --repeat +// 20 +// --template=./benchmarking/frame-weight-pallet-template.hbs +// --json-file +// raw.json +// --output +// tmp/pallet_external_validator_slashes.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +/// Weight functions needed for pallet_external_validator_slashes. +pub trait WeightInfo { + fn cancel_deferred_slash(s: u32, ) -> Weight; + fn force_inject_slash() -> Weight; +} + +/// Weights for pallet_external_validator_slashes using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl WeightInfo for SubstrateWeight { + /// Storage: `ExternalValidators::ActiveEra` (r:1 w:0) + /// Proof: `ExternalValidators::ActiveEra` (`max_values`: Some(1), `max_size`: Some(13), added: 508, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidatorSlashes::Slashes` (r:1 w:1) + /// Proof: `ExternalValidatorSlashes::Slashes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `s` is `[1, 1000]`. + fn cancel_deferred_slash(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `42194` + // Estimated: `45659` + // Minimum execution time: 69_654_000 picoseconds. + Weight::from_parts(430_467_141, 45659) + // Standard Error: 25_862 + .saturating_add(Weight::from_parts(2_233_402, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `ExternalValidators::ActiveEra` (r:1 w:0) + /// Proof: `ExternalValidators::ActiveEra` (`max_values`: Some(1), `max_size`: Some(13), added: 508, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidatorSlashes::NextSlashId` (r:1 w:1) + /// Proof: `ExternalValidatorSlashes::NextSlashId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidatorSlashes::Slashes` (r:1 w:1) + /// Proof: `ExternalValidatorSlashes::Slashes` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_inject_slash() -> Weight { + // Proof Size summary in bytes: + // Measured: `151` + // Estimated: `3616` + // Minimum execution time: 7_086_000 picoseconds. + Weight::from_parts(7_402_000, 3616) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } +} + +// For backwards compatibility and tests +impl WeightInfo for () { + /// Storage: `ExternalValidators::ActiveEra` (r:1 w:0) + /// Proof: `ExternalValidators::ActiveEra` (`max_values`: Some(1), `max_size`: Some(13), added: 508, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidatorSlashes::Slashes` (r:1 w:1) + /// Proof: `ExternalValidatorSlashes::Slashes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `s` is `[1, 1000]`. + fn cancel_deferred_slash(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `42194` + // Estimated: `45659` + // Minimum execution time: 69_654_000 picoseconds. + Weight::from_parts(430_467_141, 45659) + // Standard Error: 25_862 + .saturating_add(Weight::from_parts(2_233_402, 0).saturating_mul(s.into())) + .saturating_add(RocksDbWeight::get().reads(2_u64)) + .saturating_add(RocksDbWeight::get().writes(1_u64)) + } + /// Storage: `ExternalValidators::ActiveEra` (r:1 w:0) + /// Proof: `ExternalValidators::ActiveEra` (`max_values`: Some(1), `max_size`: Some(13), added: 508, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidatorSlashes::NextSlashId` (r:1 w:1) + /// Proof: `ExternalValidatorSlashes::NextSlashId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidatorSlashes::Slashes` (r:1 w:1) + /// Proof: `ExternalValidatorSlashes::Slashes` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_inject_slash() -> Weight { + // Proof Size summary in bytes: + // Measured: `151` + // Estimated: `3616` + // Minimum execution time: 7_086_000 picoseconds. + Weight::from_parts(7_402_000, 3616) + .saturating_add(RocksDbWeight::get().reads(3_u64)) + .saturating_add(RocksDbWeight::get().writes(2_u64)) + } +} diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index c61b052ca..3bf352fcd 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -1234,6 +1234,7 @@ impl pallet_external_validator_slashes::Config for Runtime { type SessionInterface = DancelightSessionInterface; type EraIndexProvider = ExternalValidators; type InvulnerablesProvider = ExternalValidators; + type WeightInfo = weights::pallet_external_validator_slashes::SubstrateWeight; } impl pallet_sudo::Config for Runtime { diff --git a/solo-chains/runtime/dancelight/src/weights/mod.rs b/solo-chains/runtime/dancelight/src/weights/mod.rs index 4717363c3..413463506 100644 --- a/solo-chains/runtime/dancelight/src/weights/mod.rs +++ b/solo-chains/runtime/dancelight/src/weights/mod.rs @@ -19,6 +19,7 @@ pub mod pallet_asset_rate; pub mod pallet_author_noting; pub mod pallet_balances; pub mod pallet_conviction_voting; +pub mod pallet_external_validator_slashes; pub mod pallet_external_validators; pub mod pallet_identity; pub mod pallet_message_queue; diff --git a/solo-chains/runtime/dancelight/src/weights/pallet_external_validator_slashes.rs b/solo-chains/runtime/dancelight/src/weights/pallet_external_validator_slashes.rs new file mode 100644 index 000000000..f4dcd30ff --- /dev/null +++ b/solo-chains/runtime/dancelight/src/weights/pallet_external_validator_slashes.rs @@ -0,0 +1,88 @@ +// Copyright (C) Moondance Labs Ltd. +// This file is part of Tanssi. + +// Tanssi is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Tanssi is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Tanssi. If not, see + + +//! Autogenerated weights for pallet_external_validator_slashes +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 42.0.0 +//! DATE: 2024-10-24, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `girazoki-XPS-15-9530`, CPU: `13th Gen Intel(R) Core(TM) i9-13900H` +//! EXECUTION: , WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/tanssi-relay +// benchmark +// pallet +// --execution=wasm +// --wasm-execution=compiled +// --pallet +// pallet_external_validator_slashes +// --extrinsic +// * +// --chain=dev +// --steps +// 50 +// --repeat +// 20 +// --template=./benchmarking/frame-weight-runtime-template.hbs +// --json-file +// raw.json +// --output +// tmp/pallet_external_validator_slashes.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; +use sp_std::marker::PhantomData; + +/// Weights for pallet_external_validator_slashes using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl pallet_external_validator_slashes::WeightInfo for SubstrateWeight { + /// Storage: `ExternalValidators::ActiveEra` (r:1 w:0) + /// Proof: `ExternalValidators::ActiveEra` (`max_values`: Some(1), `max_size`: Some(13), added: 508, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidatorSlashes::Slashes` (r:1 w:1) + /// Proof: `ExternalValidatorSlashes::Slashes` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `s` is `[1, 1000]`. + fn cancel_deferred_slash(s: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `42194` + // Estimated: `45659` + // Minimum execution time: 67_311_000 picoseconds. + Weight::from_parts(536_999_990, 45659) + // Standard Error: 37_157 + .saturating_add(Weight::from_parts(3_022_012, 0).saturating_mul(s.into())) + .saturating_add(T::DbWeight::get().reads(2_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + } + /// Storage: `ExternalValidators::ActiveEra` (r:1 w:0) + /// Proof: `ExternalValidators::ActiveEra` (`max_values`: Some(1), `max_size`: Some(13), added: 508, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidatorSlashes::NextSlashId` (r:1 w:1) + /// Proof: `ExternalValidatorSlashes::NextSlashId` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) + /// Storage: `ExternalValidatorSlashes::Slashes` (r:1 w:1) + /// Proof: `ExternalValidatorSlashes::Slashes` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn force_inject_slash() -> Weight { + // Proof Size summary in bytes: + // Measured: `151` + // Estimated: `3616` + // Minimum execution time: 7_398_000 picoseconds. + Weight::from_parts(7_725_000, 3616) + .saturating_add(T::DbWeight::get().reads(3_u64)) + .saturating_add(T::DbWeight::get().writes(2_u64)) + } +} \ No newline at end of file From 286cbff07a4c0320e530e902d642821ac39c81c7 Mon Sep 17 00:00:00 2001 From: girazoki Date: Fri, 25 Oct 2024 10:55:25 +0200 Subject: [PATCH 37/82] a little bit of cleanup --- Cargo.lock | 8 ------ pallets/external-validator-slashes/Cargo.toml | 28 ++++++------------- .../src/benchmarking.rs | 21 +++----------- .../external-validator-slashes/src/mock.rs | 1 + 4 files changed, 14 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 209923f61..41266ad8a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9368,27 +9368,19 @@ dependencies = [ name = "pallet-external-validator-slashes" version = "0.1.0" dependencies = [ - "bounded-collections 0.1.9", "frame-benchmarking", "frame-support", "frame-system", - "hex-literal 0.3.4", "log", "pallet-session", "pallet-staking", "parity-scale-codec", - "polkadot-parachain-primitives", - "polkadot-primitives", "scale-info", - "serde", "sp-core", - "sp-externalities", "sp-io", "sp-runtime", "sp-staking", - "sp-state-machine", "sp-std", - "sp-version", "tp-traits", ] diff --git a/pallets/external-validator-slashes/Cargo.toml b/pallets/external-validator-slashes/Cargo.toml index c224d36db..bb36605e7 100644 --- a/pallets/external-validator-slashes/Cargo.toml +++ b/pallets/external-validator-slashes/Cargo.toml @@ -20,46 +20,28 @@ log = { workspace = true } parity-scale-codec = { workspace = true, features = [ "derive", "max-encoded-len" ] } pallet-session = { workspace = true } pallet-staking = { workspace = true } - scale-info = { workspace = true } -serde = { workspace = true, features = [ "derive" ] } -sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } sp-staking = { workspace = true } tp-traits = { workspace = true } [dev-dependencies] -bounded-collections = { workspace = true } -hex-literal = { workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-primitives = { workspace = true } -sp-externalities = { workspace = true } +sp-core = { workspace = true } sp-io = { workspace = true } -sp-state-machine = { workspace = true } -sp-version = { workspace = true } [features] default = [ "std" ] std = [ - "bounded-collections/std", "frame-benchmarking/std", "frame-support/std", "frame-system/std", "log/std", "pallet-staking/std", "parity-scale-codec/std", - "polkadot-parachain-primitives/std", - "polkadot-primitives/std", - "scale-info/std", - "serde/std", "sp-core/std", - "sp-externalities/std", - "sp-io/std", "sp-runtime/std", - "sp-state-machine/std", "sp-std/std", - "sp-version/std", "tp-traits/std", ] runtime-benchmarks = [ @@ -67,7 +49,15 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-staking/runtime-benchmarks", + "scale-info/std", "sp-runtime/runtime-benchmarks", "sp-staking/runtime-benchmarks", "tp-traits/runtime-benchmarks", +] + +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "pallet-session/try-runtime", + "sp-runtime/try-runtime", ] \ No newline at end of file diff --git a/pallets/external-validator-slashes/src/benchmarking.rs b/pallets/external-validator-slashes/src/benchmarking.rs index d6e793bc4..7f7d13909 100644 --- a/pallets/external-validator-slashes/src/benchmarking.rs +++ b/pallets/external-validator-slashes/src/benchmarking.rs @@ -21,27 +21,14 @@ use super::*; #[allow(unused)] use crate::Pallet as ExternalValidatorSlashes; use { - frame_benchmarking::{account, v2::*, BenchmarkError}, - frame_support::{ - pallet_prelude::*, - traits::{tokens::fungible::Balanced, Currency, EnsureOrigin, Get}, - }, - frame_system::{EventRecord, RawOrigin}, - pallet_session::{self as session, SessionManager}, - sp_runtime::traits::{AtLeast32BitUnsigned, Convert, TrailingZeroInput}, + frame_benchmarking::{v2::*, BenchmarkError}, + frame_system::RawOrigin, + pallet_session::{self as session}, + sp_runtime::traits::TrailingZeroInput, sp_std::prelude::*, }; -fn assert_last_event(generic_event: ::RuntimeEvent) { - let events = frame_system::Pallet::::events(); - let system_event: ::RuntimeEvent = generic_event.into(); - // compare to the last event record - let EventRecord { event, .. } = &events[events.len() - 1]; - assert_eq!(event, &system_event); -} - const MAX_SLASHES: u32 = 1000; -const SEED: u32 = 0; #[allow(clippy::multiple_bound_locations)] #[benchmarks(where T: session::Config)] diff --git a/pallets/external-validator-slashes/src/mock.rs b/pallets/external-validator-slashes/src/mock.rs index 0783d03e8..84c4387c1 100644 --- a/pallets/external-validator-slashes/src/mock.rs +++ b/pallets/external-validator-slashes/src/mock.rs @@ -188,6 +188,7 @@ impl external_validator_slashes::Config for Test { type SessionInterface = (); type EraIndexProvider = MockEraIndexProvider; type InvulnerablesProvider = MockInvulnerableProvider; + type WeightInfo = (); } pub struct FullIdentificationOf; From f13e3c88a57203d90ad24f725256dbbecc02e243 Mon Sep 17 00:00:00 2001 From: girazoki Date: Fri, 25 Oct 2024 11:06:02 +0200 Subject: [PATCH 38/82] a bit more cleanup --- pallets/external-validator-slashes/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index 4956165c9..d4ea87e55 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -355,6 +355,10 @@ where impl OnEraStart for Pallet { fn on_era_start(era_index: EraIndex, session_start: SessionIndex) { + // This should be small, as slashes are limited by the num of validators + // let's put 1000 as a conservative measure + const REMOVE_LIMIT: u32 = 1000; + let bonding_duration = T::BondingDuration::get(); BondedEras::::mutate(|bonded| { @@ -371,10 +375,9 @@ impl OnEraStart for Pallet { // Kill slashing metadata. for (pruned_era, _) in bonded.drain(..n_to_prune) { - #[allow(deprecated)] - ValidatorSlashInEra::::remove_prefix(&pruned_era, None); - #[allow(deprecated)] + let _ = ValidatorSlashInEra::::clear_prefix(&pruned_era, REMOVE_LIMIT, None); Slashes::::remove(&pruned_era); + ErasStartSessionIndex::::remove(&pruned_era); } if let Some(&(_, first_session)) = bonded.first() { From d39fd2752327e0fd9dffb88c570a19f5576de16a Mon Sep 17 00:00:00 2001 From: girazoki Date: Fri, 25 Oct 2024 12:02:05 +0200 Subject: [PATCH 39/82] zepter --- solo-chains/runtime/dancelight/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/solo-chains/runtime/dancelight/Cargo.toml b/solo-chains/runtime/dancelight/Cargo.toml index deec52f14..5d2222a95 100644 --- a/solo-chains/runtime/dancelight/Cargo.toml +++ b/solo-chains/runtime/dancelight/Cargo.toml @@ -413,6 +413,7 @@ try-runtime = [ "snowbridge-pallet-ethereum-client/try-runtime", "sp-runtime/try-runtime", "tanssi-runtime-common/try-runtime", + "pallet-external-validator-slashes/try-runtime" ] # Set timing constants (e.g. session period) to faster versions to speed up testing. From 1548075eb174afc2077350b1198c4660e3617732 Mon Sep 17 00:00:00 2001 From: girazoki Date: Fri, 25 Oct 2024 12:02:26 +0200 Subject: [PATCH 40/82] toml-maid --- Cargo.toml | 2 +- pallets/external-validator-slashes/Cargo.toml | 11 ++++++++--- solo-chains/runtime/dancelight/Cargo.toml | 10 +++++----- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a3c1eafab..bb6af78ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,8 +60,8 @@ pallet-collator-assignment-runtime-api = { path = "pallets/collator-assignment/r pallet-configuration = { path = "pallets/configuration", default-features = false } pallet-data-preservers = { path = "pallets/data-preservers", default-features = false } pallet-data-preservers-runtime-api = { path = "pallets/data-preservers/runtime-api", default-features = false } -pallet-external-validators = { path = "pallets/external-validators", default-features = false } pallet-external-validator-slashes = { path = "pallets/external-validator-slashes", default-features = false } +pallet-external-validators = { path = "pallets/external-validators", default-features = false } pallet-inflation-rewards = { path = "pallets/inflation-rewards", default-features = false } pallet-initializer = { path = "pallets/initializer", default-features = false } pallet-invulnerables = { path = "pallets/invulnerables", default-features = false } diff --git a/pallets/external-validator-slashes/Cargo.toml b/pallets/external-validator-slashes/Cargo.toml index bb36605e7..32a3cd6e2 100644 --- a/pallets/external-validator-slashes/Cargo.toml +++ b/pallets/external-validator-slashes/Cargo.toml @@ -17,13 +17,13 @@ frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } log = { workspace = true } -parity-scale-codec = { workspace = true, features = [ "derive", "max-encoded-len" ] } pallet-session = { workspace = true } pallet-staking = { workspace = true } +parity-scale-codec = { workspace = true, features = [ "derive", "max-encoded-len" ] } scale-info = { workspace = true } sp-runtime = { workspace = true } -sp-std = { workspace = true } sp-staking = { workspace = true } +sp-std = { workspace = true } tp-traits = { workspace = true } [dev-dependencies] @@ -37,10 +37,14 @@ std = [ "frame-support/std", "frame-system/std", "log/std", + "pallet-session/std", "pallet-staking/std", "parity-scale-codec/std", + "scale-info/std", "sp-core/std", + "sp-io/std", "sp-runtime/std", + "sp-staking/std", "sp-std/std", "tp-traits/std", ] @@ -59,5 +63,6 @@ try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "pallet-session/try-runtime", + "pallet-staking/try-runtime", "sp-runtime/try-runtime", -] \ No newline at end of file +] diff --git a/solo-chains/runtime/dancelight/Cargo.toml b/solo-chains/runtime/dancelight/Cargo.toml index 5d2222a95..5a6b47355 100644 --- a/solo-chains/runtime/dancelight/Cargo.toml +++ b/solo-chains/runtime/dancelight/Cargo.toml @@ -69,8 +69,8 @@ pallet-collective = { workspace = true } pallet-conviction-voting = { workspace = true } pallet-democracy = { workspace = true } pallet-elections-phragmen = { workspace = true } -pallet-external-validators = { workspace = true } pallet-external-validator-slashes = { workspace = true } +pallet-external-validators = { workspace = true } pallet-grandpa = { workspace = true } pallet-identity = { workspace = true } pallet-initializer = { workspace = true } @@ -145,7 +145,7 @@ snowbridge-beacon-primitives = { workspace = true } snowbridge-pallet-ethereum-client = { workspace = true } [dev-dependencies] -finality-grandpa = { features = ["derive-codec"], workspace = true, default-features = true } +finality-grandpa = { workspace = true, default-features = true, features = [ "derive-codec" ] } keyring = { workspace = true } milagro-bls = { workspace = true, features = [ "std" ] } rand = { workspace = true, features = [ "std", "std_rng" ] } @@ -207,8 +207,8 @@ std = [ "pallet-data-preservers/std", "pallet-democracy/std", "pallet-elections-phragmen/std", - "pallet-external-validators/std", "pallet-external-validator-slashes/std", + "pallet-external-validators/std", "pallet-grandpa/std", "pallet-identity/std", "pallet-inflation-rewards/std", @@ -308,8 +308,8 @@ runtime-benchmarks = [ "pallet-data-preservers/runtime-benchmarks", "pallet-democracy/runtime-benchmarks", "pallet-elections-phragmen/runtime-benchmarks", - "pallet-external-validators/runtime-benchmarks", "pallet-external-validator-slashes/runtime-benchmarks", + "pallet-external-validators/runtime-benchmarks", "pallet-grandpa/runtime-benchmarks", "pallet-identity/runtime-benchmarks", "pallet-inflation-rewards/runtime-benchmarks", @@ -376,6 +376,7 @@ try-runtime = [ "pallet-data-preservers/try-runtime", "pallet-democracy/try-runtime", "pallet-elections-phragmen/try-runtime", + "pallet-external-validator-slashes/try-runtime", "pallet-external-validators/try-runtime", "pallet-grandpa/try-runtime", "pallet-identity/try-runtime", @@ -413,7 +414,6 @@ try-runtime = [ "snowbridge-pallet-ethereum-client/try-runtime", "sp-runtime/try-runtime", "tanssi-runtime-common/try-runtime", - "pallet-external-validator-slashes/try-runtime" ] # Set timing constants (e.g. session period) to faster versions to speed up testing. From 0b257a5962698c61879edf801971b354140cb234 Mon Sep 17 00:00:00 2001 From: girazoki Date: Fri, 25 Oct 2024 15:50:56 +0200 Subject: [PATCH 41/82] refactor tests --- .../dancelight/src/tests/common/mod.rs | 11 +- .../runtime/dancelight/src/tests/slashes.rs | 196 +++++------------- 2 files changed, 49 insertions(+), 158 deletions(-) diff --git a/solo-chains/runtime/dancelight/src/tests/common/mod.rs b/solo-chains/runtime/dancelight/src/tests/common/mod.rs index 88361f9cf..e03a93908 100644 --- a/solo-chains/runtime/dancelight/src/tests/common/mod.rs +++ b/solo-chains/runtime/dancelight/src/tests/common/mod.rs @@ -1200,11 +1200,10 @@ pub fn generate_ethereum_pub_keys(n: u32) -> Vec { keys } -use babe_primitives::{AuthorityId as BabeAuthorityId, AuthorityPair as BabeAuthorityPair, Slot}; +use babe_primitives::{AuthorityPair as BabeAuthorityPair}; use grandpa_primitives::{ AuthorityPair as GrandpaAuthorityPair, Equivocation, EquivocationProof, RoundNumber, SetId, }; -use keyring::{Ed25519Keyring, Sr25519Keyring}; use sp_core::H256; pub fn generate_grandpa_equivocation_proof( set_id: SetId, @@ -1237,15 +1236,8 @@ pub fn generate_grandpa_equivocation_proof( ) } -pub fn extract_babe_keyring(id: &BabeAuthorityId) -> Sr25519Keyring { - let mut raw_public = [0; 32]; - raw_public.copy_from_slice(id.as_ref()); - Sr25519Keyring::from_raw_public(raw_public).unwrap() -} - /// Creates an equivocation at the current block, by generating two headers. pub fn generate_babe_equivocation_proof( - offender_authority_index: u32, offender_authority_pair: &BabeAuthorityPair, ) -> babe_primitives::EquivocationProof { use babe_primitives::digests::CompatibleDigestItem; @@ -1259,7 +1251,6 @@ pub fn generate_babe_equivocation_proof( let slot_proof = babe_predigest.expect("babe should be presesnt").slot(); let make_headers = || { - let parent_hash = System::parent_hash(); ( HeaderFor::::new( 0, diff --git a/solo-chains/runtime/dancelight/src/tests/slashes.rs b/solo-chains/runtime/dancelight/src/tests/slashes.rs index cf52dca3c..5f18801a8 100644 --- a/solo-chains/runtime/dancelight/src/tests/slashes.rs +++ b/solo-chains/runtime/dancelight/src/tests/slashes.rs @@ -20,8 +20,7 @@ use sp_runtime::Perbill; use { crate::tests::common::*, crate::{ - ExternalValidatorSlashes, ExternalValidators, Grandpa, Historical, Offences, - SlashDeferDuration, + ExternalValidatorSlashes, ExternalValidators, Grandpa, Historical, SlashDeferDuration, }, frame_support::{assert_noop, assert_ok}, sp_core::H256, @@ -41,22 +40,7 @@ fn invulnerables_cannot_be_slashed() { .build() .execute_with(|| { run_to_block(2); - let alice_babe = get_pair_from_seed::( - &AccountId::from(ALICE).to_string(), - ); - - let equivocation_proof = generate_babe_equivocation_proof(0, &alice_babe); - // create the key ownership proof - let key = (babe_primitives::KEY_TYPE, alice_babe.public()); - let key_owner_proof = Historical::prove(key).unwrap(); - - // report the equivocation - assert_ok!(Babe::report_equivocation_unsigned( - RuntimeOrigin::none(), - Box::new(equivocation_proof), - key_owner_proof, - )); - + inject_babe_slash(&AccountId::from(ALICE).to_string()); let reports: Vec<_> = pallet_offences::Reports::::iter() .map(|offence| offence) .collect(); @@ -87,21 +71,8 @@ fn non_invulnerables_can_be_slashed_with_babe() { RuntimeOrigin::root(), AccountId::from(ALICE) )); - let alice_babe = get_pair_from_seed::( - &AccountId::from(ALICE).to_string(), - ); - - let equivocation_proof = generate_babe_equivocation_proof(0, &alice_babe); - // create the key ownership proof - let key = (babe_primitives::KEY_TYPE, alice_babe.public()); - let key_owner_proof = Historical::prove(key).unwrap(); - // report the equivocation - assert_ok!(Babe::report_equivocation_unsigned( - RuntimeOrigin::none(), - Box::new(equivocation_proof), - key_owner_proof, - )); + inject_babe_slash(&AccountId::from(ALICE).to_string()); let reports: Vec<_> = pallet_offences::Reports::::iter() .map(|offence| offence) @@ -137,27 +108,8 @@ fn non_invulnerables_can_be_slashed_with_grandpa() { RuntimeOrigin::root(), AccountId::from(ALICE) )); - let alice_grandpa = get_pair_from_seed::( - &AccountId::from(ALICE).to_string(), - ); - - let set_id = Grandpa::current_set_id(); - let equivocation_proof = generate_grandpa_equivocation_proof( - set_id, - (1, H256::random(), 1, &alice_grandpa), - (1, H256::random(), 1, &alice_grandpa), - ); - // create the key ownership proof - let key = (grandpa_primitives::KEY_TYPE, alice_grandpa.public()); - let key_owner_proof = Historical::prove(key).unwrap(); - - // report the equivocation - assert_ok!(Grandpa::report_equivocation_unsigned( - RuntimeOrigin::none(), - Box::new(equivocation_proof), - key_owner_proof, - )); + inject_grandpa_slash(&AccountId::from(ALICE).to_string()); let reports: Vec<_> = pallet_offences::Reports::::iter() .map(|offence| offence) @@ -199,21 +151,8 @@ fn test_slashing_percentage_applied_correctly() { RuntimeOrigin::root(), AccountId::from(ALICE) )); - let alice_babe = get_pair_from_seed::( - &AccountId::from(ALICE).to_string(), - ); - let equivocation_proof = generate_babe_equivocation_proof(0, &alice_babe); - // create the key ownership proof - let key = (babe_primitives::KEY_TYPE, alice_babe.public()); - let key_owner_proof = Historical::prove(key).unwrap(); - - // report the equivocation - assert_ok!(Babe::report_equivocation_unsigned( - RuntimeOrigin::none(), - Box::new(equivocation_proof), - key_owner_proof, - )); + inject_babe_slash(&AccountId::from(ALICE).to_string()); let reports: Vec<_> = pallet_offences::Reports::::iter() .map(|offence| offence) @@ -257,48 +196,10 @@ fn test_slashes_are_not_additive_in_percentage() { RuntimeOrigin::root(), AccountId::from(ALICE) )); - let alice_babe = get_pair_from_seed::( - &AccountId::from(ALICE).to_string(), - ); - - let alice_babe = get_pair_from_seed::( - &AccountId::from(ALICE).to_string(), - ); - - let babe_equivocation_proof = generate_babe_equivocation_proof(0, &alice_babe); - // create the key ownership proof - let babe_key = (babe_primitives::KEY_TYPE, alice_babe.public()); - let babe_key_owner_proof = Historical::prove(babe_key).unwrap(); - - // report the equivocation - assert_ok!(Babe::report_equivocation_unsigned( - RuntimeOrigin::none(), - Box::new(babe_equivocation_proof), - babe_key_owner_proof, - )); - - // report grandpa equivocation - let alice_grandpa = get_pair_from_seed::( - &AccountId::from(ALICE).to_string(), - ); - let set_id = Grandpa::current_set_id(); + inject_babe_slash(&AccountId::from(ALICE).to_string()); - let grandpa_equivocation_proof = generate_grandpa_equivocation_proof( - set_id, - (1, H256::random(), 1, &alice_grandpa), - (1, H256::random(), 1, &alice_grandpa), - ); - // create the key ownership proof - let grandpa_key = (grandpa_primitives::KEY_TYPE, alice_grandpa.public()); - let grandpa_key_owner_proof = Historical::prove(grandpa_key).unwrap(); - - // report the equivocation - assert_ok!(Grandpa::report_equivocation_unsigned( - RuntimeOrigin::none(), - Box::new(grandpa_equivocation_proof), - grandpa_key_owner_proof, - )); + inject_grandpa_slash(&AccountId::from(ALICE).to_string()); let reports: Vec<_> = pallet_offences::Reports::::iter() .map(|offence| offence) @@ -338,21 +239,8 @@ fn test_slashes_are_cleaned_after_bonding_period() { RuntimeOrigin::root(), AccountId::from(ALICE) )); - let alice_babe = get_pair_from_seed::( - &AccountId::from(ALICE).to_string(), - ); - - let equivocation_proof = generate_babe_equivocation_proof(0, &alice_babe); - // create the key ownership proof - let key = (babe_primitives::KEY_TYPE, alice_babe.public()); - let key_owner_proof = Historical::prove(key).unwrap(); - // report the equivocation - assert_ok!(Babe::report_equivocation_unsigned( - RuntimeOrigin::none(), - Box::new(equivocation_proof), - key_owner_proof, - )); + inject_babe_slash(&AccountId::from(ALICE).to_string()); let reports: Vec<_> = pallet_offences::Reports::::iter() .map(|offence| offence) @@ -391,21 +279,8 @@ fn test_slashes_can_be_cleared_before_deferred_period_applies() { RuntimeOrigin::root(), AccountId::from(ALICE) )); - let alice_babe = get_pair_from_seed::( - &AccountId::from(ALICE).to_string(), - ); - - let equivocation_proof = generate_babe_equivocation_proof(0, &alice_babe); - // create the key ownership proof - let key = (babe_primitives::KEY_TYPE, alice_babe.public()); - let key_owner_proof = Historical::prove(key).unwrap(); - // report the equivocation - assert_ok!(Babe::report_equivocation_unsigned( - RuntimeOrigin::none(), - Box::new(equivocation_proof), - key_owner_proof, - )); + inject_babe_slash(&AccountId::from(ALICE).to_string()); let reports: Vec<_> = pallet_offences::Reports::::iter() .map(|offence| offence) @@ -447,21 +322,8 @@ fn test_slashes_cannot_be_cancelled_after_defer_period() { RuntimeOrigin::root(), AccountId::from(ALICE) )); - let alice_babe = get_pair_from_seed::( - &AccountId::from(ALICE).to_string(), - ); - let equivocation_proof = generate_babe_equivocation_proof(0, &alice_babe); - // create the key ownership proof - let key = (babe_primitives::KEY_TYPE, alice_babe.public()); - let key_owner_proof = Historical::prove(key).unwrap(); - - // report the equivocation - assert_ok!(Babe::report_equivocation_unsigned( - RuntimeOrigin::none(), - Box::new(equivocation_proof), - key_owner_proof, - )); + inject_babe_slash(&AccountId::from(ALICE).to_string()); let reports: Vec<_> = pallet_offences::Reports::::iter() .map(|offence| offence) @@ -487,3 +349,41 @@ fn test_slashes_cannot_be_cancelled_after_defer_period() { ); }); } + +fn inject_babe_slash(seed: &str) { + let babe_key = get_pair_from_seed::(seed); + let equivocation_proof = generate_babe_equivocation_proof(&babe_key); + + // create the key ownership proof + let key = (babe_primitives::KEY_TYPE, babe_key.public()); + let key_owner_proof = Historical::prove(key).unwrap(); + + // report the equivocation + assert_ok!(Babe::report_equivocation_unsigned( + RuntimeOrigin::none(), + Box::new(equivocation_proof), + key_owner_proof, + )); +} + +fn inject_grandpa_slash(seed: &str) { + let grandpa_key = get_pair_from_seed::(seed); + + let set_id = Grandpa::current_set_id(); + + let equivocation_proof = generate_grandpa_equivocation_proof( + set_id, + (1, H256::random(), 1, &grandpa_key), + (1, H256::random(), 1, &grandpa_key), + ); + // create the key ownership proof + let key = (grandpa_primitives::KEY_TYPE, grandpa_key.public()); + let key_owner_proof = Historical::prove(key).unwrap(); + + // report the equivocation + assert_ok!(Grandpa::report_equivocation_unsigned( + RuntimeOrigin::none(), + Box::new(equivocation_proof), + key_owner_proof, + )); +} From 6591098037c6f942cbeb80b02301e395b9b52276 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Fri, 25 Oct 2024 17:14:39 +0200 Subject: [PATCH 42/82] run_to_block not working --- pallets/external-validators/src/mock.rs | 14 ++++++++------ pallets/external-validators/src/tests.rs | 9 +++++---- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/pallets/external-validators/src/mock.rs b/pallets/external-validators/src/mock.rs index de83ae432..61cb29d78 100644 --- a/pallets/external-validators/src/mock.rs +++ b/pallets/external-validators/src/mock.rs @@ -176,7 +176,7 @@ impl pallet_session::SessionHandler for TestSessionHandler { parameter_types! { pub const Offset: u64 = 0; - pub const Period: u64 = 10; + pub const Period: u64 = 5; } impl pallet_session::Config for Test { @@ -239,13 +239,15 @@ pub fn run_to_session(n: u32) { pub fn run_to_block(n: u64) { let old_block_number = System::block_number(); - for x in (old_block_number + 1)..=n { - AllPalletsWithSystem::on_finalize(x); + for x in old_block_number..n { + ExternalValidators::on_finalize(System::block_number()); + Session::on_finalize(System::block_number()); System::reset_events(); - System::set_block_number(x); + System::set_block_number(x + 1); Timestamp::set_timestamp(System::block_number() * BLOCK_TIME + INIT_TIMESTAMP); - AllPalletsWithSystem::on_initialize(x); + ExternalValidators::on_initialize(System::block_number()); + Session::on_initialize(System::block_number()); } -} \ No newline at end of file +} diff --git a/pallets/external-validators/src/tests.rs b/pallets/external-validators/src/tests.rs index c815b6559..442a7088f 100644 --- a/pallets/external-validators/src/tests.rs +++ b/pallets/external-validators/src/tests.rs @@ -17,8 +17,8 @@ use pallet_session::SessionManager; use { crate::{ mock::{ - run_to_block, new_test_ext, ExternalValidators, RootAccount, RuntimeEvent, - RuntimeOrigin, System, Test, + new_test_ext, run_to_block, run_to_session, ExternalValidators, RootAccount, + RuntimeEvent, RuntimeOrigin, Session, System, Test, }, Error, }, @@ -162,8 +162,9 @@ fn whitelisted_and_external_order() { assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); assert_ok!(ExternalValidators::set_external_validators(vec![50, 51])); - let validators = ExternalValidators::new_session(6); - assert_eq!(validators, Some(vec![1, 2, 50, 51])); + run_to_session(6); + let validators = Session::validators(); + assert_eq!(validators, vec![1, 2, 50, 51]); }); } From 28c8365a8ec8acb29c111334b3aa42f97d740f3d Mon Sep 17 00:00:00 2001 From: girazoki Date: Fri, 25 Oct 2024 17:57:52 +0200 Subject: [PATCH 43/82] a few fixes2 --- .../src/benchmarking.rs | 33 ++++++++++++++++--- pallets/external-validator-slashes/src/lib.rs | 15 +++++++-- .../external-validator-slashes/src/tests.rs | 18 +++++----- .../dancelight/src/tests/common/mod.rs | 2 +- .../runtime/dancelight/src/tests/slashes.rs | 28 ++++++++++++---- 5 files changed, 73 insertions(+), 23 deletions(-) diff --git a/pallets/external-validator-slashes/src/benchmarking.rs b/pallets/external-validator-slashes/src/benchmarking.rs index 7f7d13909..146984185 100644 --- a/pallets/external-validator-slashes/src/benchmarking.rs +++ b/pallets/external-validator-slashes/src/benchmarking.rs @@ -38,18 +38,34 @@ mod benchmarks { #[benchmark] fn cancel_deferred_slash(s: Linear<1, MAX_SLASHES>) -> Result<(), BenchmarkError> { let mut existing_slashes = Vec::new(); - let era = EraIndex::one(); + let era = T::EraIndexProvider::active_era().index; let dummy = || T::AccountId::decode(&mut TrailingZeroInput::zeroes()).unwrap(); for _ in 0..MAX_SLASHES { existing_slashes.push(Slash::::default_from(dummy())); } - Slashes::::insert(era, &existing_slashes); + Slashes::::insert( + era.saturating_add(T::SlashDeferDuration::get()) + .saturating_add(One::one()), + &existing_slashes, + ); let slash_indices: Vec = (0..s).collect(); #[extrinsic_call] - _(RawOrigin::Root, era, slash_indices); + _( + RawOrigin::Root, + era.saturating_add(T::SlashDeferDuration::get()) + .saturating_add(One::one()), + slash_indices, + ); - assert_eq!(Slashes::::get(&era).len(), (MAX_SLASHES - s) as usize); + assert_eq!( + Slashes::::get( + &era.saturating_add(T::SlashDeferDuration::get()) + .saturating_add(One::one()) + ) + .len(), + (MAX_SLASHES - s) as usize + ); Ok(()) } @@ -60,7 +76,14 @@ mod benchmarks { #[extrinsic_call] _(RawOrigin::Root, era, dummy(), Perbill::from_percent(50)); - assert_eq!(Slashes::::get(&era).len(), 1 as usize); + assert_eq!( + Slashes::::get( + &era.saturating_add(T::SlashDeferDuration::get()) + .saturating_add(One::one()) + ) + .len(), + 1 as usize + ); Ok(()) } diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index d4ea87e55..987853438 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -173,8 +173,11 @@ pub mod pallet { ensure_root(origin)?; let active_era = T::EraIndexProvider::active_era().index; + ensure!( - era >= active_era.saturating_sub(T::SlashDeferDuration::get()), + era <= active_era + .saturating_add(T::SlashDeferDuration::get().saturating_add(One::one())) + && era > active_era, Error::::DeferPeriodIsOver ); @@ -185,6 +188,7 @@ pub mod pallet { ); let mut era_slashes = Slashes::::get(&era); + let last_item = slash_indices[slash_indices.len() - 1]; ensure!( (last_item as usize) < era_slashes.len(), @@ -210,8 +214,11 @@ pub mod pallet { ) -> DispatchResult { ensure_root(origin)?; let active_era = T::EraIndexProvider::active_era().index; + ensure!(era <= active_era, Error::::ProvidedFutureEra); + let slash_defer_duration = T::SlashDeferDuration::get(); + let window_start = active_era.saturating_sub(T::BondingDuration::get()); ensure!(era >= window_start, Error::::ProvidedNonSlashableEra); @@ -227,7 +234,11 @@ pub mod pallet { }; let mut era_slashes = Slashes::::get(&era); era_slashes.push(slash); - Slashes::::insert(&era, &era_slashes); + Slashes::::insert( + &era.saturating_add(slash_defer_duration) + .saturating_add(One::one()), + &era_slashes, + ); NextSlashId::::put(next_slash_id.saturating_add(One::one())); Ok(()) } diff --git a/pallets/external-validator-slashes/src/tests.rs b/pallets/external-validator-slashes/src/tests.rs index 28bff51a2..ef512daee 100644 --- a/pallets/external-validator-slashes/src/tests.rs +++ b/pallets/external-validator-slashes/src/tests.rs @@ -31,7 +31,7 @@ fn root_can_inject_manual_offence() { Perbill::from_percent(75) )); assert_eq!( - Slashes::::get(0), + Slashes::::get(3), vec![Slash { validator: 1, percentage: Perbill::from_percent(75), @@ -89,11 +89,11 @@ fn root_can_cance_deferred_slash() { )); assert_ok!(ExternalValidatorSlashes::cancel_deferred_slash( RuntimeOrigin::root(), - 0, + 3, vec![0] )); - assert_eq!(Slashes::::get(0), vec![]); + assert_eq!(Slashes::::get(3), vec![]); }); } @@ -133,7 +133,7 @@ fn test_after_bonding_period_we_can_remove_slashes() { )); assert_eq!( - Slashes::::get(0), + Slashes::::get(3), vec![Slash { validator: 1, percentage: Perbill::from_percent(75), @@ -143,12 +143,14 @@ fn test_after_bonding_period_we_can_remove_slashes() { }] ); - start_era(5, 5); + Pallet::::on_era_start(3, 3); + + start_era(8, 8); - // whenever we start the 6th era, we can remove everything from era 0 - Pallet::::on_era_start(6, 6); + // whenever we start the 6th era, we can remove everything from era 3 + Pallet::::on_era_start(9, 9); - assert_eq!(Slashes::::get(0), vec![]); + assert_eq!(Slashes::::get(3), vec![]); }); } diff --git a/solo-chains/runtime/dancelight/src/tests/common/mod.rs b/solo-chains/runtime/dancelight/src/tests/common/mod.rs index e03a93908..90be538af 100644 --- a/solo-chains/runtime/dancelight/src/tests/common/mod.rs +++ b/solo-chains/runtime/dancelight/src/tests/common/mod.rs @@ -1200,7 +1200,7 @@ pub fn generate_ethereum_pub_keys(n: u32) -> Vec { keys } -use babe_primitives::{AuthorityPair as BabeAuthorityPair}; +use babe_primitives::AuthorityPair as BabeAuthorityPair; use grandpa_primitives::{ AuthorityPair as GrandpaAuthorityPair, Equivocation, EquivocationProof, RoundNumber, SetId, }; diff --git a/solo-chains/runtime/dancelight/src/tests/slashes.rs b/solo-chains/runtime/dancelight/src/tests/slashes.rs index 5f18801a8..1fd4fff67 100644 --- a/solo-chains/runtime/dancelight/src/tests/slashes.rs +++ b/solo-chains/runtime/dancelight/src/tests/slashes.rs @@ -20,7 +20,8 @@ use sp_runtime::Perbill; use { crate::tests::common::*, crate::{ - ExternalValidatorSlashes, ExternalValidators, Grandpa, Historical, SlashDeferDuration, + BondingDuration, ExternalValidatorSlashes, ExternalValidators, Grandpa, Historical, + SessionsPerEra, SlashDeferDuration, }, frame_support::{assert_noop, assert_ok}, sp_core::H256, @@ -252,10 +253,17 @@ fn test_slashes_are_cleaned_after_bonding_period() { ExternalValidators::current_era() + SlashDeferDuration::get() + 1, ); assert_eq!(slashes.len(), 1); - // The first session in which the era 3 will be pruned is 96 - // 3 sessions per era, 28 days bonding period - // (28+3+1)*3 - run_to_session(96); + // The first session in which the era 3 will be pruned is + // (28+3+1)*sessionsPerEra + let fist_session_era_3_pruned = (ExternalValidators::current_era() + + SlashDeferDuration::get() + + 1 + + BondingDuration::get() + + 1) + * SessionsPerEra::get(); + + println!("first session era 3 pruned {:?}", fist_session_era_3_pruned); + run_to_session(fist_session_era_3_pruned); let slashes_after_bonding_period = ExternalValidatorSlashes::slashes(3); assert_eq!(slashes_after_bonding_period.len(), 0); @@ -339,9 +347,15 @@ fn test_slashes_cannot_be_cancelled_after_defer_period() { // The first session in which the era 3 will be deferred is 18 // 3 sessions per era - // (3+2+1)*3 - run_to_session(18); + // (externalValidators::current_era() + SlashDeferDuration::get() + 1)*SessionsPerEra + // formula is: + let first_deferred_session = + (ExternalValidators::current_era() + SlashDeferDuration::get() + 1) + * SessionsPerEra::get(); + run_to_session(first_deferred_session); + + assert_eq!(ExternalValidators::current_era(), 3); // Now let's clean it up assert_noop!( ExternalValidatorSlashes::cancel_deferred_slash(RuntimeOrigin::root(), 3, vec![0]), From 3375e5d254cba298e9c0ae1c7affe8cccddc084c Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 28 Oct 2024 09:54:28 +0100 Subject: [PATCH 44/82] Unit tests still not working --- pallets/external-validators/src/mock.rs | 7 +++++++ pallets/external-validators/src/tests.rs | 1 + 2 files changed, 8 insertions(+) diff --git a/pallets/external-validators/src/mock.rs b/pallets/external-validators/src/mock.rs index 61cb29d78..ad90588f1 100644 --- a/pallets/external-validators/src/mock.rs +++ b/pallets/external-validators/src/mock.rs @@ -240,6 +240,13 @@ pub fn run_to_block(n: u64) { let old_block_number = System::block_number(); for x in old_block_number..n { + if x == 0 { + // Initialize genesis block + // This should probably be in new_test_ext + ExternalValidators::on_initialize(System::block_number()); + Session::on_initialize(System::block_number()); + // TODO: maybe not needed, this doesn't fix any tests + } ExternalValidators::on_finalize(System::block_number()); Session::on_finalize(System::block_number()); diff --git a/pallets/external-validators/src/tests.rs b/pallets/external-validators/src/tests.rs index 442a7088f..9ea293d3f 100644 --- a/pallets/external-validators/src/tests.rs +++ b/pallets/external-validators/src/tests.rs @@ -163,6 +163,7 @@ fn whitelisted_and_external_order() { assert_ok!(ExternalValidators::set_external_validators(vec![50, 51])); run_to_session(6); + // TODO: this returns vec![1, 2], why let validators = Session::validators(); assert_eq!(validators, vec![1, 2, 50, 51]); }); From 40fdf84c41e2bd06807bb0e608ae9ce6673d95a4 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Mon, 28 Oct 2024 10:49:11 +0100 Subject: [PATCH 45/82] Fix unit tests --- pallets/external-validators/src/mock.rs | 34 ++++++++++------ pallets/external-validators/src/tests.rs | 50 ++++++------------------ 2 files changed, 35 insertions(+), 49 deletions(-) diff --git a/pallets/external-validators/src/mock.rs b/pallets/external-validators/src/mock.rs index ad90588f1..384f5fd6a 100644 --- a/pallets/external-validators/src/mock.rs +++ b/pallets/external-validators/src/mock.rs @@ -13,13 +13,14 @@ // You should have received a copy of the GNU General Public License // along with Tanssi. If not, see -use frame_support::traits::{ConstU64, OnFinalize, OnInitialize}; use { super::*, crate as pallet_external_validators, frame_support::{ - ord_parameter_types, parameter_types, - traits::{ConstU32, ValidatorRegistration}, + assert_ok, ord_parameter_types, parameter_types, + traits::{ + fungible::Mutate, ConstU32, ConstU64, OnFinalize, OnInitialize, ValidatorRegistration, + }, }, frame_system::{self as system, EnsureSignedBy}, pallet_balances::AccountData, @@ -225,7 +226,25 @@ pub fn new_test_ext() -> sp_io::TestExternalities { .unwrap(); session.assimilate_storage(&mut t).unwrap(); - t.into() + let mut ext: sp_io::TestExternalities = t.into(); + + // Initialize accounts and keys for external validators + ext.execute_with(|| { + initialize_validators(vec![50, 51]); + }); + + ext +} + +fn initialize_validators(validators: Vec) { + for x in validators { + assert_ok!(Balances::mint_into(&x, 10_000_000_000)); + assert_ok!(Session::set_keys( + RuntimeOrigin::signed(x), + MockSessionKeys::from(UintAuthorityId(x)), + vec![] + )); + } } pub const INIT_TIMESTAMP: u64 = 30_000; @@ -240,13 +259,6 @@ pub fn run_to_block(n: u64) { let old_block_number = System::block_number(); for x in old_block_number..n { - if x == 0 { - // Initialize genesis block - // This should probably be in new_test_ext - ExternalValidators::on_initialize(System::block_number()); - Session::on_initialize(System::block_number()); - // TODO: maybe not needed, this doesn't fix any tests - } ExternalValidators::on_finalize(System::block_number()); Session::on_finalize(System::block_number()); diff --git a/pallets/external-validators/src/tests.rs b/pallets/external-validators/src/tests.rs index 9ea293d3f..e3c449d32 100644 --- a/pallets/external-validators/src/tests.rs +++ b/pallets/external-validators/src/tests.rs @@ -13,7 +13,6 @@ // You should have received a copy of the GNU General Public License // along with Tanssi. If not, see -use pallet_session::SessionManager; use { crate::{ mock::{ @@ -163,40 +162,11 @@ fn whitelisted_and_external_order() { assert_ok!(ExternalValidators::set_external_validators(vec![50, 51])); run_to_session(6); - // TODO: this returns vec![1, 2], why let validators = Session::validators(); assert_eq!(validators, vec![1, 2, 50, 51]); }); } -#[test] -fn new_session_returns_validators_every_era() { - new_test_ext().execute_with(|| { - run_to_block(1); - assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); - assert_ok!(ExternalValidators::set_external_validators(vec![50, 51])); - - // 1 era = 6 sessions - // Returns None until block 6, which is the start of era 1 - for session in 2..=5 { - let validators = ExternalValidators::new_session(session); - assert_eq!(validators, None, "{}", session); - } - - let validators = ExternalValidators::new_session(6); - assert_eq!(validators, Some(vec![1, 2, 50, 51])); - - // Returns None until block 12, which is the start of era 2 - for session in 7..=11 { - let validators = ExternalValidators::new_session(session); - assert_eq!(validators, None, "{}", session); - } - - let validators = ExternalValidators::new_session(12); - assert_eq!(validators, Some(vec![1, 2, 50, 51])); - }); -} - #[test] fn validator_provider_returns_all_validators() { new_test_ext().execute_with(|| { @@ -204,9 +174,10 @@ fn validator_provider_returns_all_validators() { assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); assert_ok!(ExternalValidators::set_external_validators(vec![50, 51])); - let validators_new_session = ExternalValidators::new_session(6); + run_to_session(6); + let validators_new_session = Session::validators(); let validators_provider = >::validators(); - assert_eq!(validators_new_session, Some(validators_provider)); + assert_eq!(validators_new_session, validators_provider); }); } @@ -221,8 +192,9 @@ fn can_skip_external_validators() { true )); - let validators = ExternalValidators::new_session(6); - assert_eq!(validators, Some(vec![1, 2])); + run_to_session(6); + let validators = Session::validators(); + assert_eq!(validators, vec![1, 2]); }); } @@ -233,8 +205,9 @@ fn duplicate_validators_are_deduplicated() { assert_eq!(ExternalValidators::whitelisted_validators(), vec![1, 2]); assert_ok!(ExternalValidators::set_external_validators(vec![2])); - let validators = ExternalValidators::new_session(6); - assert_eq!(validators, Some(vec![1, 2])); + run_to_session(6); + let validators = Session::validators(); + assert_eq!(validators, vec![1, 2]); }); } @@ -269,7 +242,8 @@ fn duplicate_validator_order_is_preserved() { 3, 2, 1, 4 ])); - let validators = ExternalValidators::new_session(6); - assert_eq!(validators, Some(vec![3, 1, 2, 4])); + run_to_session(6); + let validators = Session::validators(); + assert_eq!(validators, vec![3, 1, 2, 4]); }); } From 86f16ecae2a255f897ac3f93e312a11f05014b20 Mon Sep 17 00:00:00 2001 From: girazoki Date: Mon, 28 Oct 2024 18:51:00 +0100 Subject: [PATCH 46/82] test babe slashes --- .../slashes/test_slashes_babe.ts | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts new file mode 100644 index 000000000..ede857c9c --- /dev/null +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts @@ -0,0 +1,130 @@ +import "@tanssi/api-augment"; +import { describeSuite, expect, beforeAll } from "@moonwall/cli"; +import { ApiPromise } from "@polkadot/api"; +import { KeyringPair } from "@moonwall/util"; +import { fetchCollatorAssignmentTip, jumpSessions } from "util/block"; +import { Keyring } from "@polkadot/keyring"; +import { Header, BabeEquivocationProof } from "@polkadot/types/interfaces"; +import { SpRuntimeHeader } from '@polkadot/types/lookup'; +import { extrinsics } from "@polkadot/types/interfaces/definitions"; +import { u8aToHex, hexToU8a, stringToHex, numberToHex, stringToU8a } from "@polkadot/util"; +import { blake2AsHex } from "@polkadot/util-crypto"; + +describeSuite({ + id: "DTR1301", + title: "Babe offences should trigger a slash", + foundationMethods: "dev", + testCases: ({ it, context }) => { + let polkadotJs: ApiPromise; + let alice: KeyringPair; + let aliceBabePair: KeyringPair; + beforeAll(async () => { + const keyringBabe = new Keyring({ type: "sr25519" }); + aliceBabePair = keyringBabe.addFromUri("//Alice"); + polkadotJs = context.polkadotJs(); + alice = context.keyring.alice; + }); + it({ + id: "E01", + title: "Babe offences trigger a slash+", + test: async function () { + // we crate one block so that we at least have one seal. + await context.createBlock(); + await context.createBlock(); + + let baseHeader = await polkadotJs.rpc.chain.getHeader(); + + console.log("baseHeader ", blake2AsHex(baseHeader.toU8a())) + const header1: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { + digest: baseHeader.digest, + extrinsicsRoot: baseHeader.extrinsicsRoot, + stateRoot: baseHeader.stateRoot, + parentHash: baseHeader.parentHash, + number: 1, + }); + + // we just change the block number + const header2: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { + digest: baseHeader.digest, + extrinsicsRoot: baseHeader.extrinsicsRoot, + stateRoot: baseHeader.stateRoot, + parentHash: baseHeader.parentHash, + number: 2, + }); + + console.log("haeder 1"); + console.log("header 1 bytes ", header1.toU8a()); + console.log("header 2 bytes ", header2.toU8a()); + + console.log(header1.hash.toHuman()) + console.log(blake2AsHex(header1.toU8a())) + console.log("haeder 2"); + console.log(blake2AsHex(header2.toU8a())) + + const sig1 = aliceBabePair.sign(header1.toU8a()); + const sig2 = aliceBabePair.sign(header2.toU8a()); + + const slot = await polkadotJs.query.babe.currentSlot(); + + console.log(aliceBabePair.addressRaw); + // let's inject the equivocation proof + + const validatorSetId = 1; + const keyOwnershipProof = await polkadotJs.call.babeApi.generateKeyOwnershipProof( + validatorSetId, + u8aToHex(aliceBabePair.publicKey) + ); + + // We don't care about the first 8 characters of the proof, as they + // correspond to SCALE encoded wrapping stuff we don't need. + const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; + + console.log("first") + const digestItemSeal1: SpRuntimeDigestDigestItem = polkadotJs.createType( + "SpRuntimeDigestDigestItem", + { Seal: [ + stringToHex('BABE'), + u8aToHex(sig1) + ] + } + ); + + console.log("second") + const digestItemSeal2: SpRuntimeDigestDigestItem = polkadotJs.createType( + "SpRuntimeDigestDigestItem", + { Seal: [ + stringToHex('BABE'), + u8aToHex(sig2) + ] + } + ); + + header1.digest.logs.push(digestItemSeal1); + header2.digest.logs.push(digestItemSeal2); + + const doubleVotingProof: BabeEquivocationProof = polkadotJs.createType( + "BabeEquivocationProof", + { + offender: aliceBabePair.publicKey, + slotNumber: slot, + firstHeader: header1, + secondHeader: header2 + } + ); + const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( + polkadotJs.tx.utility.dispatchAs( + { + system: { Signed: alice.address }, + } as any, + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProofHex)), { + refTime: 1n, + proofSize: 1n + }) + + const signedTx = await tx.signAsync(alice); + await context.createBlock(signedTx); + + }, + }); + }, +}); From 83d9e5d21eadba99176399b40891c1cd1b3f3686 Mon Sep 17 00:00:00 2001 From: girazoki Date: Tue, 29 Oct 2024 12:11:03 +0100 Subject: [PATCH 47/82] slashes tests ts --- ...hes_are_not_applicable_to_invulnerables.ts | 125 ++++++++++++++++++ .../slashes/test_slashes_babe.ts | 56 ++++---- 2 files changed, 154 insertions(+), 27 deletions(-) create mode 100644 test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts new file mode 100644 index 000000000..2bffb60a0 --- /dev/null +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts @@ -0,0 +1,125 @@ +import "@tanssi/api-augment"; +import { describeSuite, expect, beforeAll } from "@moonwall/cli"; +import { ApiPromise } from "@polkadot/api"; +import { KeyringPair } from "@moonwall/util"; +import { fetchCollatorAssignmentTip, jumpSessions } from "util/block"; +import { Keyring } from "@polkadot/keyring"; +import { Header, BabeEquivocationProof } from "@polkadot/types/interfaces"; +import { SpRuntimeHeader } from '@polkadot/types/lookup'; +import { extrinsics } from "@polkadot/types/interfaces/definitions"; +import { u8aToHex, hexToU8a, stringToHex, numberToHex, stringToU8a } from "@polkadot/util"; +import { blake2AsHex } from "@polkadot/util-crypto"; +import { jumpToSession } from "../../../util/block"; + +describeSuite({ + id: "DTR1302", + title: "Babe offences should trigger a slash", + foundationMethods: "dev", + testCases: ({ it, context }) => { + let polkadotJs: ApiPromise; + let alice: KeyringPair; + let aliceBabePair: KeyringPair; + let aliceStash: KeyringPair; + beforeAll(async () => { + const keyringBabe = new Keyring({ type: "sr25519" }); + aliceBabePair = keyringBabe.addFromUri("//Alice"); + polkadotJs = context.polkadotJs(); + alice = context.keyring.alice; + aliceStash = keyringBabe.addFromUri("//Alice//stash"); + }); + it({ + id: "E01", + title: "Babe offences trigger a slash+", + test: async function () { + // we crate one block so that we at least have one seal. + await jumpToSession(context, 1); + + let baseHeader = await polkadotJs.rpc.chain.getHeader(); + let baseHeader2 = await polkadotJs.rpc.chain.getHeader(); + + const header1: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { + digest: baseHeader.digest, + extrinsicsRoot: baseHeader.extrinsicsRoot, + stateRoot: baseHeader.stateRoot, + parentHash: baseHeader.parentHash, + number: 1, + }); + + // we just change the block number + const header2: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { + digest: baseHeader2.digest, + extrinsicsRoot: baseHeader2.extrinsicsRoot, + stateRoot: baseHeader2.stateRoot, + parentHash: baseHeader2.parentHash, + number: 2, + }); + + const sig1 = aliceBabePair.sign(blake2AsHex(header1.toU8a())); + const sig2 = aliceBabePair.sign(blake2AsHex(header2.toU8a())); + + const slot = await polkadotJs.query.babe.currentSlot(); + + // let's inject the equivocation proof + + const keyOwnershipProof = (await polkadotJs.call.babeApi.generateKeyOwnershipProof( + slot, + u8aToHex(aliceBabePair.publicKey) + )).unwrap(); + + // We don't care about the first 8 characters of the proof, as they + // correspond to SCALE encoded wrapping stuff we don't need. + //const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; + + const digestItemSeal1: SpRuntimeDigestDigestItem = polkadotJs.createType( + "SpRuntimeDigestDigestItem", + { Seal: [ + stringToHex('BABE'), + u8aToHex(sig1) + ] + } + ); + + const digestItemSeal2: SpRuntimeDigestDigestItem = polkadotJs.createType( + "SpRuntimeDigestDigestItem", + { Seal: [ + stringToHex('BABE'), + u8aToHex(sig2) + ] + } + ); + + header1.digest.logs.push(digestItemSeal1); + header2.digest.logs.push(digestItemSeal2); + + const doubleVotingProof: BabeEquivocationProof = polkadotJs.createType( + "BabeEquivocationProof", + { + offender: aliceBabePair.publicKey, + slotNumber: slot, + firstHeader: header1, + secondHeader: header2 + } + ); + const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( + polkadotJs.tx.utility.dispatchAs( + { + system: { Signed: alice.address }, + } as any, + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof)), { + refTime: 1n, + proofSize: 1n + }) + + const signedTx = await tx.signAsync(alice); + await context.createBlock(signedTx); + + // Slash item should be there + const DeferPeriod = 2; + + // Alice is an invulnerable, therefore she should not be slashed + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + expect(expectedSlashes.length).to.be.eq(0); + }, + }); + }, +}); diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts index ede857c9c..b96dc9f7c 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts @@ -9,6 +9,7 @@ import { SpRuntimeHeader } from '@polkadot/types/lookup'; import { extrinsics } from "@polkadot/types/interfaces/definitions"; import { u8aToHex, hexToU8a, stringToHex, numberToHex, stringToU8a } from "@polkadot/util"; import { blake2AsHex } from "@polkadot/util-crypto"; +import { jumpToSession } from "../../../util/block"; describeSuite({ id: "DTR1301", @@ -18,23 +19,30 @@ describeSuite({ let polkadotJs: ApiPromise; let alice: KeyringPair; let aliceBabePair: KeyringPair; + let aliceStash: KeyringPair; beforeAll(async () => { const keyringBabe = new Keyring({ type: "sr25519" }); aliceBabePair = keyringBabe.addFromUri("//Alice"); polkadotJs = context.polkadotJs(); alice = context.keyring.alice; + aliceStash = keyringBabe.addFromUri("//Alice//stash"); }); it({ id: "E01", title: "Babe offences trigger a slash+", test: async function () { // we crate one block so that we at least have one seal. - await context.createBlock(); - await context.createBlock(); + await jumpToSession(context, 1); + + // Remove alice from invulnerables (just for the slash) + const removeAliceFromInvulnerables = await polkadotJs.tx.sudo.sudo( + polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address) + ).signAsync(alice) + await context.createBlock([removeAliceFromInvulnerables]); let baseHeader = await polkadotJs.rpc.chain.getHeader(); + let baseHeader2 = await polkadotJs.rpc.chain.getHeader(); - console.log("baseHeader ", blake2AsHex(baseHeader.toU8a())) const header1: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { digest: baseHeader.digest, extrinsicsRoot: baseHeader.extrinsicsRoot, @@ -45,41 +53,29 @@ describeSuite({ // we just change the block number const header2: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { - digest: baseHeader.digest, - extrinsicsRoot: baseHeader.extrinsicsRoot, - stateRoot: baseHeader.stateRoot, - parentHash: baseHeader.parentHash, + digest: baseHeader2.digest, + extrinsicsRoot: baseHeader2.extrinsicsRoot, + stateRoot: baseHeader2.stateRoot, + parentHash: baseHeader2.parentHash, number: 2, }); - console.log("haeder 1"); - console.log("header 1 bytes ", header1.toU8a()); - console.log("header 2 bytes ", header2.toU8a()); - - console.log(header1.hash.toHuman()) - console.log(blake2AsHex(header1.toU8a())) - console.log("haeder 2"); - console.log(blake2AsHex(header2.toU8a())) - - const sig1 = aliceBabePair.sign(header1.toU8a()); - const sig2 = aliceBabePair.sign(header2.toU8a()); + const sig1 = aliceBabePair.sign(blake2AsHex(header1.toU8a())); + const sig2 = aliceBabePair.sign(blake2AsHex(header2.toU8a())); const slot = await polkadotJs.query.babe.currentSlot(); - console.log(aliceBabePair.addressRaw); // let's inject the equivocation proof - const validatorSetId = 1; - const keyOwnershipProof = await polkadotJs.call.babeApi.generateKeyOwnershipProof( - validatorSetId, + const keyOwnershipProof = (await polkadotJs.call.babeApi.generateKeyOwnershipProof( + slot, u8aToHex(aliceBabePair.publicKey) - ); + )).unwrap(); // We don't care about the first 8 characters of the proof, as they // correspond to SCALE encoded wrapping stuff we don't need. - const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; + //const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; - console.log("first") const digestItemSeal1: SpRuntimeDigestDigestItem = polkadotJs.createType( "SpRuntimeDigestDigestItem", { Seal: [ @@ -89,7 +85,6 @@ describeSuite({ } ); - console.log("second") const digestItemSeal2: SpRuntimeDigestDigestItem = polkadotJs.createType( "SpRuntimeDigestDigestItem", { Seal: [ @@ -116,7 +111,7 @@ describeSuite({ { system: { Signed: alice.address }, } as any, - polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProofHex)), { + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof)), { refTime: 1n, proofSize: 1n }) @@ -124,6 +119,13 @@ describeSuite({ const signedTx = await tx.signAsync(alice); await context.createBlock(signedTx); + // Slash item should be there + const DeferPeriod = 2; + + // scheduled slashes + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + expect(expectedSlashes.length).to.be.eq(1); + expect(u8aToHex(expectedSlashes[0].validator)).to.be.eq(u8aToHex(aliceStash.addressRaw)); }, }); }, From aaadb2ca99ea62d463913a484f044f9365af61a3 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 29 Oct 2024 13:11:02 +0100 Subject: [PATCH 48/82] Start era 0 in session 0 --- pallets/external-validators/src/lib.rs | 29 +++++++------------ solo-chains/runtime/dancelight/src/lib.rs | 6 ++-- .../dancelight/src/tests/common/mod.rs | 14 ++++----- .../src/tests/external_validators_tests.rs | 24 +++++++++++++++ 4 files changed, 44 insertions(+), 29 deletions(-) diff --git a/pallets/external-validators/src/lib.rs b/pallets/external-validators/src/lib.rs index 48d8a2aa0..9ec59cec6 100644 --- a/pallets/external-validators/src/lib.rs +++ b/pallets/external-validators/src/lib.rs @@ -421,8 +421,9 @@ pub mod pallet { /// Returns true if the provided session index should start a new era. pub(crate) fn should_start_new_era(session: u32) -> bool { - if session <= 1 { - return false; + if session == 0 { + // Start first era + return true; } match >::get() { @@ -489,11 +490,7 @@ impl pallet_session::SessionManager for Pallet { // Increment current era >::mutate(|era| { - if era.is_none() { - *era = Some(0); - } - let era = era.as_mut().unwrap(); - *era += 1; + *era = Some(era.map(|x| x + 1).unwrap_or(0)); }); // Return new validators @@ -533,20 +530,14 @@ impl pallet_session::SessionManager for Pallet { // ActiveEra = CurrentEra // Increase era let era_index = >::mutate(|q| { - if q.is_none() { - *q = Some(ActiveEraInfo { - index: 0, - start: None, - }); - } - - let q = q.as_mut().unwrap(); - q.index += 1; + let new_index = q.as_ref().map(|era| era.index + 1).unwrap_or(0); - // Set new active era start in next `on_finalize`. To guarantee usage of `Time` - q.start = None; + *q = Some(ActiveEraInfo { + index: new_index, + start: None, + }); - q.index + new_index }); T::OnEraStart::on_era_start(era_index, session_index); diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index 24509254a..ec6ec7eda 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -1521,6 +1521,9 @@ construct_runtime! { ServicesPayment: pallet_services_payment = 18, DataPreservers: pallet_data_preservers = 19, + // Validator stuff + ExternalValidators: pallet_external_validators = 20, + // Session management Session: pallet_session = 30, Grandpa: pallet_grandpa = 31, @@ -1584,9 +1587,6 @@ construct_runtime! { // Pallet for sending XCM. XcmPallet: pallet_xcm = 90, - // Validator stuff - ExternalValidators: pallet_external_validators = 100, - // Migration stuff Migrations: pallet_migrations = 120, MultiBlockMigrations: pallet_multiblock_migrations = 121, diff --git a/solo-chains/runtime/dancelight/src/tests/common/mod.rs b/solo-chains/runtime/dancelight/src/tests/common/mod.rs index 7e07301d8..dd4085e80 100644 --- a/solo-chains/runtime/dancelight/src/tests/common/mod.rs +++ b/solo-chains/runtime/dancelight/src/tests/common/mod.rs @@ -635,13 +635,6 @@ impl ExtBuilder { non_authority_keys.extend(collator_keys) } - pallet_session::GenesisConfig:: { - keys, - non_authority_keys, - } - .assimilate_storage(&mut t) - .unwrap(); - pallet_external_validators::GenesisConfig:: { whitelisted_validators: self .validators @@ -652,6 +645,13 @@ impl ExtBuilder { .assimilate_storage(&mut t) .unwrap(); + pallet_session::GenesisConfig:: { + keys, + non_authority_keys, + } + .assimilate_storage(&mut t) + .unwrap(); + pallet_sudo::GenesisConfig:: { key: self.sudo } .assimilate_storage(&mut t) .unwrap(); diff --git a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs index 00b7ed9eb..70ab9be5e 100644 --- a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs +++ b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs @@ -370,6 +370,28 @@ fn default_era_changes() { }); } +#[test] +fn babe_session_works() { + 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), + ]) + .build() + .execute_with(|| { + run_to_session(2); + + let session = Session::current_index(); + + // If pallet_external_validators returns empty validators, pallet_session will skip some + // sessions and the reported session will be 7 instead of 2 + assert_eq!(session, 2); + }); +} + mod force_eras { use super::*; @@ -413,8 +435,10 @@ mod force_eras { assert_ok!(ExternalValidators::force_new_era(root_origin())); // Still era 1, until next session assert_eq!(ExternalValidators::current_era(), 0); + assert_eq!(Session::current_index(), 0); run_to_session(1); + assert_eq!(Session::current_index(), 1); // Era changes in session 1, but validators will change in session 2 assert_eq!(ExternalValidators::current_era(), 1); let validators = Session::validators(); From b70b8fc806b91a2986d4fe464dd02225a79ea12a Mon Sep 17 00:00:00 2001 From: girazoki Date: Tue, 29 Oct 2024 13:35:52 +0100 Subject: [PATCH 49/82] more slashing tests --- ...lashes_are_confirmed_after_defer_period.ts | 154 ++++++++++++++++++ .../slashes/test_slashes_babe.ts | 2 +- .../slashes/test_slashes_can_be_cancelled.ts | 143 ++++++++++++++++ 3 files changed, 298 insertions(+), 1 deletion(-) create mode 100644 test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts create mode 100644 test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts new file mode 100644 index 000000000..43bc68982 --- /dev/null +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts @@ -0,0 +1,154 @@ +import "@tanssi/api-augment"; +import { describeSuite, expect, beforeAll } from "@moonwall/cli"; +import { ApiPromise } from "@polkadot/api"; +import { KeyringPair } from "@moonwall/util"; +import { fetchCollatorAssignmentTip, jumpSessions } from "util/block"; +import { Keyring } from "@polkadot/keyring"; +import { Header, BabeEquivocationProof } from "@polkadot/types/interfaces"; +import { SpRuntimeHeader } from '@polkadot/types/lookup'; +import { extrinsics } from "@polkadot/types/interfaces/definitions"; +import { u8aToHex, hexToU8a, stringToHex, numberToHex, stringToU8a } from "@polkadot/util"; +import { blake2AsHex } from "@polkadot/util-crypto"; +import { jumpToSession } from "../../../util/block"; + +describeSuite({ + id: "DTR1304", + title: "Babe offences should trigger a slash", + foundationMethods: "dev", + testCases: ({ it, context }) => { + let polkadotJs: ApiPromise; + let alice: KeyringPair; + let aliceBabePair: KeyringPair; + let aliceStash: KeyringPair; + beforeAll(async () => { + const keyringBabe = new Keyring({ type: "sr25519" }); + aliceBabePair = keyringBabe.addFromUri("//Alice"); + polkadotJs = context.polkadotJs(); + alice = context.keyring.alice; + aliceStash = keyringBabe.addFromUri("//Alice//stash"); + }); + it({ + id: "E01", + title: "Babe offences trigger a slash+", + test: async function () { + // we crate one block so that we at least have one seal. + await jumpToSession(context, 1); + + // Remove alice from invulnerables (just for the slash) + const removeAliceFromInvulnerables = await polkadotJs.tx.sudo.sudo( + polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address) + ).signAsync(alice) + await context.createBlock([removeAliceFromInvulnerables]); + + let baseHeader = await polkadotJs.rpc.chain.getHeader(); + let baseHeader2 = await polkadotJs.rpc.chain.getHeader(); + + const header1: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { + digest: baseHeader.digest, + extrinsicsRoot: baseHeader.extrinsicsRoot, + stateRoot: baseHeader.stateRoot, + parentHash: baseHeader.parentHash, + number: 1, + }); + + // we just change the block number + const header2: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { + digest: baseHeader2.digest, + extrinsicsRoot: baseHeader2.extrinsicsRoot, + stateRoot: baseHeader2.stateRoot, + parentHash: baseHeader2.parentHash, + number: 2, + }); + + const sig1 = aliceBabePair.sign(blake2AsHex(header1.toU8a())); + const sig2 = aliceBabePair.sign(blake2AsHex(header2.toU8a())); + + const slot = await polkadotJs.query.babe.currentSlot(); + + // let's inject the equivocation proof + + const keyOwnershipProof = (await polkadotJs.call.babeApi.generateKeyOwnershipProof( + slot, + u8aToHex(aliceBabePair.publicKey) + )).unwrap(); + + // We don't care about the first 8 characters of the proof, as they + // correspond to SCALE encoded wrapping stuff we don't need. + //const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; + + const digestItemSeal1: SpRuntimeDigestDigestItem = polkadotJs.createType( + "SpRuntimeDigestDigestItem", + { Seal: [ + stringToHex('BABE'), + u8aToHex(sig1) + ] + } + ); + + const digestItemSeal2: SpRuntimeDigestDigestItem = polkadotJs.createType( + "SpRuntimeDigestDigestItem", + { Seal: [ + stringToHex('BABE'), + u8aToHex(sig2) + ] + } + ); + + header1.digest.logs.push(digestItemSeal1); + header2.digest.logs.push(digestItemSeal2); + + const doubleVotingProof: BabeEquivocationProof = polkadotJs.createType( + "BabeEquivocationProof", + { + offender: aliceBabePair.publicKey, + slotNumber: slot, + firstHeader: header1, + secondHeader: header2 + } + ); + const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( + polkadotJs.tx.utility.dispatchAs( + { + system: { Signed: alice.address }, + } as any, + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof)), { + refTime: 1n, + proofSize: 1n + }) + + const signedTx = await tx.signAsync(alice); + await context.createBlock(signedTx); + + // Slash item should be there + const DeferPeriod = 2; + + // scheduled slashes + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + expect(expectedSlashes.length).to.be.eq(1); + expect(u8aToHex(expectedSlashes[0].validator)).to.be.eq(u8aToHex(aliceStash.addressRaw)); + + // Put alice back to invulnerables + const addAliceFromInvulnerables = await polkadotJs.tx.sudo.sudo( + polkadotJs.tx.externalValidators.addWhitelisted(aliceStash.address) + ).signAsync(alice) + await context.createBlock([addAliceFromInvulnerables]); + + let sessionsPerEra = await polkadotJs.consts.externalValidators.sessionsPerEra; + + let currentIndex = await polkadotJs.query.session.currentIndex(); + + let targetSession = currentIndex*sessionsPerEra*(DeferPeriod +1); + while((await polkadotJs.query.session.currentIndex()).toNumber() < targetSession) { + let currentIndex = await polkadotJs.query.session.currentIndex(); + await jumpToSession(context, currentIndex.toNumber()+1); + } + + // scheduled slashes + const expectedSlashesAfterDefer = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + expect(expectedSlashesAfterDefer.length).to.be.eq(1); + expect(expectedSlashesAfterDefer[0].confirmed.toHuman()6).to.be.true; + + }, + }); + }, +}); diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts index b96dc9f7c..8117baf48 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts @@ -29,7 +29,7 @@ describeSuite({ }); it({ id: "E01", - title: "Babe offences trigger a slash+", + title: "Babe offences do not trigger a slash against invulnerables", test: async function () { // we crate one block so that we at least have one seal. await jumpToSession(context, 1); diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts new file mode 100644 index 000000000..98637bec2 --- /dev/null +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts @@ -0,0 +1,143 @@ +import "@tanssi/api-augment"; +import { describeSuite, expect, beforeAll } from "@moonwall/cli"; +import { ApiPromise } from "@polkadot/api"; +import { KeyringPair } from "@moonwall/util"; +import { fetchCollatorAssignmentTip, jumpSessions } from "util/block"; +import { Keyring } from "@polkadot/keyring"; +import { Header, BabeEquivocationProof } from "@polkadot/types/interfaces"; +import { SpRuntimeHeader } from '@polkadot/types/lookup'; +import { extrinsics } from "@polkadot/types/interfaces/definitions"; +import { u8aToHex, hexToU8a, stringToHex, numberToHex, stringToU8a } from "@polkadot/util"; +import { blake2AsHex } from "@polkadot/util-crypto"; +import { jumpToSession } from "../../../util/block"; + +describeSuite({ + id: "DTR1303", + title: "Babe offences should trigger a slash", + foundationMethods: "dev", + testCases: ({ it, context }) => { + let polkadotJs: ApiPromise; + let alice: KeyringPair; + let aliceBabePair: KeyringPair; + let aliceStash: KeyringPair; + beforeAll(async () => { + const keyringBabe = new Keyring({ type: "sr25519" }); + aliceBabePair = keyringBabe.addFromUri("//Alice"); + polkadotJs = context.polkadotJs(); + alice = context.keyring.alice; + aliceStash = keyringBabe.addFromUri("//Alice//stash"); + }); + it({ + id: "E01", + title: "Babe offences trigger a slash+", + test: async function () { + // we crate one block so that we at least have one seal. + await jumpToSession(context, 1); + + // Remove alice from invulnerables (just for the slash) + const removeAliceFromInvulnerables = await polkadotJs.tx.sudo.sudo( + polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address) + ).signAsync(alice) + await context.createBlock([removeAliceFromInvulnerables]); + + let baseHeader = await polkadotJs.rpc.chain.getHeader(); + let baseHeader2 = await polkadotJs.rpc.chain.getHeader(); + + const header1: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { + digest: baseHeader.digest, + extrinsicsRoot: baseHeader.extrinsicsRoot, + stateRoot: baseHeader.stateRoot, + parentHash: baseHeader.parentHash, + number: 1, + }); + + // we just change the block number + const header2: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { + digest: baseHeader2.digest, + extrinsicsRoot: baseHeader2.extrinsicsRoot, + stateRoot: baseHeader2.stateRoot, + parentHash: baseHeader2.parentHash, + number: 2, + }); + + const sig1 = aliceBabePair.sign(blake2AsHex(header1.toU8a())); + const sig2 = aliceBabePair.sign(blake2AsHex(header2.toU8a())); + + const slot = await polkadotJs.query.babe.currentSlot(); + + // let's inject the equivocation proof + + const keyOwnershipProof = (await polkadotJs.call.babeApi.generateKeyOwnershipProof( + slot, + u8aToHex(aliceBabePair.publicKey) + )).unwrap(); + + // We don't care about the first 8 characters of the proof, as they + // correspond to SCALE encoded wrapping stuff we don't need. + //const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; + + const digestItemSeal1: SpRuntimeDigestDigestItem = polkadotJs.createType( + "SpRuntimeDigestDigestItem", + { Seal: [ + stringToHex('BABE'), + u8aToHex(sig1) + ] + } + ); + + const digestItemSeal2: SpRuntimeDigestDigestItem = polkadotJs.createType( + "SpRuntimeDigestDigestItem", + { Seal: [ + stringToHex('BABE'), + u8aToHex(sig2) + ] + } + ); + + header1.digest.logs.push(digestItemSeal1); + header2.digest.logs.push(digestItemSeal2); + + const doubleVotingProof: BabeEquivocationProof = polkadotJs.createType( + "BabeEquivocationProof", + { + offender: aliceBabePair.publicKey, + slotNumber: slot, + firstHeader: header1, + secondHeader: header2 + } + ); + const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( + polkadotJs.tx.utility.dispatchAs( + { + system: { Signed: alice.address }, + } as any, + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof)), { + refTime: 1n, + proofSize: 1n + }) + + const signedTx = await tx.signAsync(alice); + await context.createBlock(signedTx); + + // Slash item should be there + const DeferPeriod = 2; + + // scheduled slashes + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + expect(expectedSlashes.length).to.be.eq(1); + expect(u8aToHex(expectedSlashes[0].validator)).to.be.eq(u8aToHex(aliceStash.addressRaw)); + + // Remove alice from invulnerables (just for the slash) + const cancelSlash = await polkadotJs.tx.sudo.sudo( + polkadotJs.tx.externalValidatorSlashes.cancelDeferredSlash(DeferPeriod +1, [0]) + ).signAsync(alice) + await context.createBlock([cancelSlash]); + + // alashes have dissapeared + const expectedSlashesAfterCancel = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + expect(expectedSlashesAfterCancel.length).to.be.eq(0); + + }, + }); + }, +}); From 26b45eb052b2ffcb2a5a23201c5db93b382b7e20 Mon Sep 17 00:00:00 2001 From: girazoki Date: Tue, 29 Oct 2024 15:15:47 +0100 Subject: [PATCH 50/82] one more test --- ...lashes_are_removed_after_bonding_period.ts | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts new file mode 100644 index 000000000..e3c384389 --- /dev/null +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts @@ -0,0 +1,154 @@ +import "@tanssi/api-augment"; +import { describeSuite, expect, beforeAll } from "@moonwall/cli"; +import { ApiPromise } from "@polkadot/api"; +import { KeyringPair } from "@moonwall/util"; +import { fetchCollatorAssignmentTip, jumpSessions } from "util/block"; +import { Keyring } from "@polkadot/keyring"; +import { Header, BabeEquivocationProof } from "@polkadot/types/interfaces"; +import { SpRuntimeHeader } from '@polkadot/types/lookup'; +import { extrinsics } from "@polkadot/types/interfaces/definitions"; +import { u8aToHex, hexToU8a, stringToHex, numberToHex, stringToU8a } from "@polkadot/util"; +import { blake2AsHex } from "@polkadot/util-crypto"; +import { jumpToSession } from "../../../util/block"; + +describeSuite({ + id: "DTR1305", + title: "Babe offences should trigger a slash", + foundationMethods: "dev", + testCases: ({ it, context }) => { + let polkadotJs: ApiPromise; + let alice: KeyringPair; + let aliceBabePair: KeyringPair; + let aliceStash: KeyringPair; + beforeAll(async () => { + const keyringBabe = new Keyring({ type: "sr25519" }); + aliceBabePair = keyringBabe.addFromUri("//Alice"); + polkadotJs = context.polkadotJs(); + alice = context.keyring.alice; + aliceStash = keyringBabe.addFromUri("//Alice//stash"); + }); + it({ + id: "E01", + title: "Babe offences trigger a slash+", + test: async function () { + // we crate one block so that we at least have one seal. + await jumpToSession(context, 1); + + // Remove alice from invulnerables (just for the slash) + const removeAliceFromInvulnerables = await polkadotJs.tx.sudo.sudo( + polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address) + ).signAsync(alice) + await context.createBlock([removeAliceFromInvulnerables]); + + let baseHeader = await polkadotJs.rpc.chain.getHeader(); + let baseHeader2 = await polkadotJs.rpc.chain.getHeader(); + + const header1: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { + digest: baseHeader.digest, + extrinsicsRoot: baseHeader.extrinsicsRoot, + stateRoot: baseHeader.stateRoot, + parentHash: baseHeader.parentHash, + number: 1, + }); + + // we just change the block number + const header2: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { + digest: baseHeader2.digest, + extrinsicsRoot: baseHeader2.extrinsicsRoot, + stateRoot: baseHeader2.stateRoot, + parentHash: baseHeader2.parentHash, + number: 2, + }); + + const sig1 = aliceBabePair.sign(blake2AsHex(header1.toU8a())); + const sig2 = aliceBabePair.sign(blake2AsHex(header2.toU8a())); + + const slot = await polkadotJs.query.babe.currentSlot(); + + // let's inject the equivocation proof + + const keyOwnershipProof = (await polkadotJs.call.babeApi.generateKeyOwnershipProof( + slot, + u8aToHex(aliceBabePair.publicKey) + )).unwrap(); + + // We don't care about the first 8 characters of the proof, as they + // correspond to SCALE encoded wrapping stuff we don't need. + //const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; + + const digestItemSeal1: SpRuntimeDigestDigestItem = polkadotJs.createType( + "SpRuntimeDigestDigestItem", + { Seal: [ + stringToHex('BABE'), + u8aToHex(sig1) + ] + } + ); + + const digestItemSeal2: SpRuntimeDigestDigestItem = polkadotJs.createType( + "SpRuntimeDigestDigestItem", + { Seal: [ + stringToHex('BABE'), + u8aToHex(sig2) + ] + } + ); + + header1.digest.logs.push(digestItemSeal1); + header2.digest.logs.push(digestItemSeal2); + + const doubleVotingProof: BabeEquivocationProof = polkadotJs.createType( + "BabeEquivocationProof", + { + offender: aliceBabePair.publicKey, + slotNumber: slot, + firstHeader: header1, + secondHeader: header2 + } + ); + const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( + polkadotJs.tx.utility.dispatchAs( + { + system: { Signed: alice.address }, + } as any, + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof)), { + refTime: 1n, + proofSize: 1n + }) + + const signedTx = await tx.signAsync(alice); + await context.createBlock(signedTx); + + // Slash item should be there + const DeferPeriod = 2; + + // scheduled slashes + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + expect(expectedSlashes.length).to.be.eq(1); + expect(u8aToHex(expectedSlashes[0].validator)).to.be.eq(u8aToHex(aliceStash.addressRaw)); + + // Put alice back to invulnerables + const addAliceFromInvulnerables = await polkadotJs.tx.sudo.sudo( + polkadotJs.tx.externalValidators.addWhitelisted(aliceStash.address) + ).signAsync(alice) + await context.createBlock([addAliceFromInvulnerables]); + + let sessionsPerEra = await polkadotJs.consts.externalValidators.sessionsPerEra; + let bondingPeriod = await polkadotJs.consts.externalValidatorSlashes.bondingDuration; + + let currentIndex = await polkadotJs.query.session.currentIndex(); + console.log("bondingPeriod is ", bondingPeriod); + console.log("currentIndex is ", currentIndex); + console.log("sessionsPerEra is ", sessionsPerEra); + + let targetSession = currentIndex.toNumber() + sessionsPerEra*(DeferPeriod +1) + sessionsPerEra*bondingPeriod; + // TODO: check this + await jumpToSession(context, targetSession +10); + + // scheduled slashes + const expectedSlashesAfterDefer = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + expect(expectedSlashesAfterDefer.length).to.be.eq(0); + }, + }); + }, +}); From 12646cf5b0eff3fe6435dd4fa25febea52b891c1 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 29 Oct 2024 16:37:28 +0100 Subject: [PATCH 51/82] Rewrite pallet logic, copy it from pallet_staking --- pallets/external-validators/src/lib.rs | 262 ++++++++++++------ pallets/external-validators/src/mock.rs | 1 + solo-chains/runtime/dancelight/src/lib.rs | 1 + .../src/tests/external_validators_tests.rs | 46 +-- 4 files changed, 209 insertions(+), 101 deletions(-) diff --git a/pallets/external-validators/src/lib.rs b/pallets/external-validators/src/lib.rs index 9ec59cec6..6c88678c5 100644 --- a/pallets/external-validators/src/lib.rs +++ b/pallets/external-validators/src/lib.rs @@ -31,7 +31,8 @@ pub use pallet::*; use { - frame_support::{dispatch::DispatchClass, pallet_prelude::Weight}, + frame_support::pallet_prelude::Weight, + log::log, parity_scale_codec::{Decode, Encode, MaxEncodedLen}, scale_info::TypeInfo, sp_runtime::traits::Get, @@ -96,6 +97,20 @@ pub mod pallet { /// Origin that can dictate updating parameters of this pallet. type UpdateOrigin: EnsureOrigin; + /// Number of eras to keep in history. + /// + /// Following information is kept for eras in `[current_era - + /// HistoryDepth, current_era]`: `ErasStartSessionIndex` + /// + /// Must be more than the number of eras delayed by session. + /// I.e. active era must always be in history. I.e. `active_era > + /// current_era - history_depth` must be guaranteed. + /// + /// If migrating an existing pallet from storage value to config value, + /// this should be set to same value or greater as in storage. + #[pallet::constant] + type HistoryDepth: Get; + /// Maximum number of whitelisted validators. #[pallet::constant] type MaxWhitelistedValidators: Get; @@ -167,9 +182,12 @@ pub mod pallet { #[pallet::storage] pub type ActiveEra = StorageValue<_, ActiveEraInfo>; - /// Session index at the start of the *active* era. Used to know when to start the next era. + /// The session index at which the era start for the last [`Config::HistoryDepth`] eras. + /// + /// Note: This tracks the starting session (i.e. session index when era start being active) + /// for the eras in `[CurrentEra - HISTORY_DEPTH, CurrentEra]`. #[pallet::storage] - pub type ActiveEraSessionStart = StorageValue<_, u32, ValueQuery>; + pub type ErasStartSessionIndex = StorageMap<_, Twox64Concat, EraIndex, SessionIndex>; /// Mode of era forcing. #[pallet::storage] @@ -392,18 +410,16 @@ pub mod pallet { >::get().into() } - pub fn active_era() -> EraIndex { + pub fn active_era() -> Option { >::get() - .map(|era_info| era_info.index) - .unwrap_or(0) } - pub fn current_era() -> EraIndex { - >::get().unwrap_or(0) + pub fn current_era() -> Option { + >::get() } - pub fn active_era_session_start() -> u32 { - >::get() + pub fn eras_start_session_index(era: EraIndex) -> Option { + >::get(era) } /// Returns validators for the next session. Whitelisted validators first, then external validators. @@ -419,29 +435,149 @@ pub mod pallet { remove_duplicates(validators) } - /// Returns true if the provided session index should start a new era. - pub(crate) fn should_start_new_era(session: u32) -> bool { - if session == 0 { - // Start first era - return true; + /// Plan a new session potentially trigger a new era. + pub(crate) fn new_session(session_index: SessionIndex) -> Option> { + if let Some(current_era) = Self::current_era() { + // Initial era has been set. + let current_era_start_session_index = Self::eras_start_session_index(current_era) + .unwrap_or_else(|| { + frame_support::print( + "Error: start_session_index must be set for current_era", + ); + 0 + }); + + let era_length = session_index.saturating_sub(current_era_start_session_index); // Must never happen. + + match ForceEra::::get() { + // Will be set to `NotForcing` again if a new era has been triggered. + Forcing::ForceNew => (), + // Short circuit to `try_trigger_new_era`. + Forcing::ForceAlways => (), + // Only go to `try_trigger_new_era` if deadline reached. + Forcing::NotForcing if era_length >= T::SessionsPerEra::get() => (), + _ => { + // Either `Forcing::ForceNone`, + // or `Forcing::NotForcing if era_length >= T::SessionsPerEra::get()`. + return None; + } + } + + // New era. + let maybe_new_era_validators = Self::try_trigger_new_era(session_index); + if maybe_new_era_validators.is_some() + && matches!(ForceEra::::get(), Forcing::ForceNew) + { + Self::set_force_era(Forcing::NotForcing); + } + + maybe_new_era_validators + } else { + // Set initial era. + log!(log::Level::Debug, "Starting the first era."); + Self::try_trigger_new_era(session_index) } + } - match >::get() { - Forcing::NotForcing => { - // If enough sessions have elapsed, start new era - let start_session = >::get(); + /// Start a session potentially starting an era. + pub(crate) fn start_session(start_session: SessionIndex) { + let next_active_era = Self::active_era().map(|e| e.index + 1).unwrap_or(0); + // This is only `Some` when current era has already progressed to the next era, while the + // active era is one behind (i.e. in the *last session of the active era*, or *first session + // of the new current era*, depending on how you look at it). + if let Some(next_active_era_start_session_index) = + Self::eras_start_session_index(next_active_era) + { + if next_active_era_start_session_index == start_session { + Self::start_era(start_session); + } else if next_active_era_start_session_index < start_session { + // This arm should never happen, but better handle it than to stall the staking + // pallet. + frame_support::print("Warning: A session appears to have been skipped."); + Self::start_era(start_session); + } + } + } - if session.saturating_sub(start_session) >= T::SessionsPerEra::get() { - true - } else { - false + /// End a session potentially ending an era. + pub(crate) fn end_session(session_index: SessionIndex) { + if let Some(active_era) = Self::active_era() { + if let Some(next_active_era_start_session_index) = + Self::eras_start_session_index(active_era.index + 1) + { + if next_active_era_start_session_index == session_index + 1 { + Self::end_era(active_era, session_index); } } - Forcing::ForceNew => true, - Forcing::ForceNone => false, - Forcing::ForceAlways => true, } } + + /// Start a new era. It does: + /// * Increment `active_era.index`, + /// * reset `active_era.start`, + pub(crate) fn start_era(start_session: SessionIndex) { + let active_era = ActiveEra::::mutate(|active_era| { + let new_index = active_era.as_ref().map(|info| info.index + 1).unwrap_or(0); + *active_era = Some(ActiveEraInfo { + index: new_index, + // Set new active era start in next `on_finalize`. To guarantee usage of `Time` + start: None, + }); + new_index + }); + T::OnEraStart::on_era_start(active_era, start_session); + } + + /// Compute payout for era. + pub(crate) fn end_era(active_era: ActiveEraInfo, _session_index: SessionIndex) { + // Note: active_era_start can be None if end era is called during genesis config. + if let Some(_active_era_start) = active_era.start { + // TODO: EraPaid event here + } + T::OnEraEnd::on_era_end(active_era.index); + } + + /// Plan a new era. + /// + /// * Bump the current era storage (which holds the latest planned era). + /// * Store start session index for the new planned era. + /// * Clean old era information. + /// * Store staking information for the new planned era + /// + /// Returns the new validator set. + pub fn trigger_new_era(start_session_index: SessionIndex) -> Vec { + // Increment or set current era. + let new_planned_era = CurrentEra::::mutate(|s| { + *s = Some(s.map(|s| s + 1).unwrap_or(0)); + s.unwrap() + }); + ErasStartSessionIndex::::insert(&new_planned_era, &start_session_index); + + // Clean old era information. + if let Some(old_era) = new_planned_era.checked_sub(T::HistoryDepth::get() + 1) { + Self::clear_era_information(old_era); + } + + // Returns new validators + Self::validators() + } + + /// Potentially plan a new era. + /// + /// Get election result from `T::ElectionProvider`. + /// In case election result has more than [`MinimumValidatorCount`] validator trigger a new era. + /// + /// In case a new era is planned, the new validator set is returned. + pub(crate) fn try_trigger_new_era( + start_session_index: SessionIndex, + ) -> Option> { + Some(Self::trigger_new_era(start_session_index)) + } + + /// Clear all era information for given era. + pub(crate) fn clear_era_information(era_index: EraIndex) { + ErasStartSessionIndex::::remove(era_index); + } } #[pallet::hooks] @@ -482,67 +618,25 @@ fn remove_duplicates(input: Vec) -> Vec { } impl pallet_session::SessionManager for Pallet { - fn new_session(session: SessionIndex) -> Option> { - if !Self::should_start_new_era(session) { - // Return None to keep previous validators - return None; - } - - // Increment current era - >::mutate(|era| { - *era = Some(era.map(|x| x + 1).unwrap_or(0)); - }); - - // Return new validators - let validators: Vec<_> = Self::validators(); - - frame_system::Pallet::::register_extra_weight_unchecked( - T::WeightInfo::new_session(validators.len() as u32), - DispatchClass::Mandatory, + fn new_session(new_index: SessionIndex) -> Option> { + log!(log::Level::Trace, "planning new session {}", new_index); + Self::new_session(new_index) + } + fn new_session_genesis(new_index: SessionIndex) -> Option> { + log!( + log::Level::Trace, + "planning new session {} at genesis", + new_index ); - - Some(validators) + Self::new_session(new_index) } - - fn end_session(index: SessionIndex) { - // To know if this the end of an era, we need to check if the next session is the start of a new era - let new_index = index.saturating_add(1); - if !Self::should_start_new_era(new_index) { - return; - } - - T::OnEraEnd::on_era_end(index); + fn start_session(start_index: SessionIndex) { + log!(log::Level::Trace, "starting session {}", start_index); + Self::start_session(start_index) } - - fn start_session(session_index: SessionIndex) { - if !Self::should_start_new_era(session_index) { - return; - } - - >::mutate(|era| { - // If this era has been forced, reset forcing flag to only force once - if let Forcing::ForceNew = era { - *era = Forcing::NotForcing; - } - }); - >::put(session_index); - - // ActiveEra = CurrentEra - // Increase era - let era_index = >::mutate(|q| { - let new_index = q.as_ref().map(|era| era.index + 1).unwrap_or(0); - - *q = Some(ActiveEraInfo { - index: new_index, - start: None, - }); - - new_index - }); - - T::OnEraStart::on_era_start(era_index, session_index); - - Self::deposit_event(Event::NewEra { era: era_index }); + fn end_session(end_index: SessionIndex) { + log!(log::Level::Trace, "ending session {}", end_index); + Self::end_session(end_index) } } diff --git a/pallets/external-validators/src/mock.rs b/pallets/external-validators/src/mock.rs index 384f5fd6a..b62ea27d8 100644 --- a/pallets/external-validators/src/mock.rs +++ b/pallets/external-validators/src/mock.rs @@ -129,6 +129,7 @@ parameter_types! { impl Config for Test { type RuntimeEvent = RuntimeEvent; type UpdateOrigin = EnsureSignedBy; + type HistoryDepth = ConstU32<84>; type MaxWhitelistedValidators = ConstU32<20>; type MaxExternalValidators = ConstU32<20>; type ValidatorId = ::AccountId; diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index ec6ec7eda..fdc445a2b 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -1199,6 +1199,7 @@ parameter_types! { impl pallet_external_validators::Config for Runtime { type RuntimeEvent = RuntimeEvent; type UpdateOrigin = EnsureRoot; + type HistoryDepth = ConstU32<84>; type MaxWhitelistedValidators = MaxWhitelistedValidators; type MaxExternalValidators = MaxExternalValidators; type ValidatorId = AccountId; diff --git a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs index 70ab9be5e..1b8136a07 100644 --- a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs +++ b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs @@ -39,6 +39,18 @@ fn assert_validators_do_not_change( } } +fn active_era_session_start() -> u32 { + let active_era = pallet_external_validators::ActiveEra::::get() + .map(|x| x.index) + .unwrap_or(0); + + pallet_external_validators::ErasStartSessionIndex::::get(active_era).unwrap() +} + +fn active_era_index() -> u32 { + ExternalValidators::active_era().map(|x| x.index).unwrap() +} + #[test] fn whitelisted_validators_priority() { ExtBuilder::default() @@ -342,9 +354,9 @@ fn default_era_changes() { prev_validators = validators; data.push(( session, - ExternalValidators::current_era(), - ExternalValidators::active_era(), - ExternalValidators::active_era_session_start(), + ExternalValidators::current_era().unwrap(), + active_era_index(), + active_era_session_start(), validators_changed, )); } @@ -431,16 +443,16 @@ mod force_eras { )); ExternalValidators::set_external_validators(vec![mock_validator.clone()]).unwrap(); - assert_eq!(ExternalValidators::current_era(), 0); + assert_eq!(ExternalValidators::current_era(), Some(0)); assert_ok!(ExternalValidators::force_new_era(root_origin())); // Still era 1, until next session - assert_eq!(ExternalValidators::current_era(), 0); + assert_eq!(ExternalValidators::current_era(), Some(0)); assert_eq!(Session::current_index(), 0); run_to_session(1); assert_eq!(Session::current_index(), 1); // Era changes in session 1, but validators will change in session 2 - assert_eq!(ExternalValidators::current_era(), 1); + assert_eq!(ExternalValidators::current_era(), Some(1)); let validators = Session::validators(); assert_eq!( validators, @@ -449,7 +461,7 @@ mod force_eras { run_to_session(2); // Validators change now - assert_eq!(ExternalValidators::current_era(), 1); + assert_eq!(ExternalValidators::current_era(), Some(1)); let validators = Session::validators(); assert_eq!( validators, @@ -466,7 +478,7 @@ mod force_eras { // Validators will not change until `sessions_per_era` sessions later // With sessions_per_era=6, era will change in session 7, validators will change in // session 8, this is session 6 - assert_eq!(ExternalValidators::current_era(), 1); + assert_eq!(ExternalValidators::current_era(), Some(1)); let validators = Session::validators(); assert_eq!( validators, @@ -479,8 +491,8 @@ mod force_eras { run_to_session(1 + sessions_per_era); // This is session 7, new era but not new validators - assert_eq!(ExternalValidators::current_era(), 2); - assert_eq!(ExternalValidators::active_era(), 1); + assert_eq!(ExternalValidators::current_era(), Some(2)); + assert_eq!(active_era_index(), 1); let validators = Session::validators(); assert_eq!( validators, @@ -489,8 +501,8 @@ mod force_eras { run_to_session(1 + sessions_per_era + 1); // This is session 8, validators will change now - assert_eq!(ExternalValidators::current_era(), 2); - assert_eq!(ExternalValidators::active_era(), 2); + assert_eq!(ExternalValidators::current_era(), Some(2)); + assert_eq!(active_era_index(), 2); let validators = Session::validators(); assert_eq!( validators, @@ -536,11 +548,11 @@ mod force_eras { ExternalValidators::set_external_validators(vec![mock_validator.clone()]).unwrap(); // Validators will never change - assert_eq!(ExternalValidators::current_era(), 0); + assert_eq!(ExternalValidators::current_era(), Some(0)); assert_ok!(ExternalValidators::force_no_eras(root_origin())); run_to_session(sessions_per_era); - assert_eq!(ExternalValidators::current_era(), 0); + assert_eq!(ExternalValidators::current_era(), Some(0)); let validators = Session::validators(); assert_eq!( validators, @@ -583,11 +595,11 @@ mod force_eras { ExternalValidators::set_external_validators(vec![mock_validator.clone()]).unwrap(); // Validators will change on every session - assert_eq!(ExternalValidators::current_era(), 0); + assert_eq!(ExternalValidators::current_era(), Some(0)); assert_ok!(ExternalValidators::force_new_era_always(root_origin())); run_to_session(2); - assert_eq!(ExternalValidators::current_era(), 2); + assert_eq!(ExternalValidators::current_era(), Some(2)); let validators = Session::validators(); assert_eq!( validators, @@ -600,7 +612,7 @@ mod force_eras { ExternalValidators::set_external_validators(vec![]).unwrap(); run_to_session(4); - assert_eq!(ExternalValidators::current_era(), 4); + assert_eq!(ExternalValidators::current_era(), Some(4)); let validators = Session::validators(); assert_eq!( validators, From f7a57e593be414711a905af636fff5965b3880e0 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 29 Oct 2024 16:53:34 +0100 Subject: [PATCH 52/82] Test hook calls --- pallets/external-validators/src/mock.rs | 72 +++++++++++++++++++++++- pallets/external-validators/src/tests.rs | 24 +++++++- 2 files changed, 92 insertions(+), 4 deletions(-) diff --git a/pallets/external-validators/src/mock.rs b/pallets/external-validators/src/mock.rs index b62ea27d8..cafb80f75 100644 --- a/pallets/external-validators/src/mock.rs +++ b/pallets/external-validators/src/mock.rs @@ -43,6 +43,7 @@ frame_support::construct_runtime!( Session: pallet_session, Balances: pallet_balances, Timestamp: pallet_timestamp, + Mock: mock_data, } ); @@ -137,8 +138,8 @@ impl Config for Test { type ValidatorRegistration = IsRegistered; type UnixTime = Timestamp; type SessionsPerEra = SessionsPerEra; - type OnEraStart = (); - type OnEraEnd = (); + type OnEraStart = Mock; + type OnEraEnd = Mock; type WeightInfo = (); #[cfg(feature = "runtime-benchmarks")] type Currency = Balances; @@ -194,6 +195,73 @@ impl pallet_session::Config for Test { type WeightInfo = (); } +// Pallet to provide some mock data, used to test +#[frame_support::pallet] +pub mod mock_data { + use {crate::mock::Mocks, frame_support::pallet_prelude::*}; + + #[pallet::config] + pub trait Config: frame_system::Config {} + + #[pallet::call] + impl Pallet {} + + #[pallet::pallet] + #[pallet::without_storage_info] + pub struct Pallet(_); + + #[pallet::storage] + pub(super) type Mock = StorageValue<_, Mocks, ValueQuery>; + + impl Pallet { + pub fn mock() -> Mocks { + Mock::::get() + } + pub fn mutate(f: F) -> R + where + F: FnOnce(&mut Mocks) -> R, + { + Mock::::mutate(f) + } + } +} + +#[derive(Clone, Encode, Decode, PartialEq, sp_core::RuntimeDebug, scale_info::TypeInfo)] +pub enum HookCall { + OnEraStart { era: u32, session: u32 }, + OnEraEnd { era: u32 }, +} + +impl mock_data::Config for Test {} + +#[derive( + Clone, Default, Encode, Decode, PartialEq, sp_core::RuntimeDebug, scale_info::TypeInfo, +)] +pub struct Mocks { + pub called_hooks: Vec, +} + +// We use the mock_data pallet to test hooks: we store a list of all the calls, and then check that +// no eras are skipped. +impl OnEraStart for mock_data::Pallet { + fn on_era_start(era_index: EraIndex, session_start: u32) { + Mock::mutate(|m| { + m.called_hooks.push(HookCall::OnEraStart { + era: era_index, + session: session_start, + }); + }); + } +} + +impl OnEraEnd for mock_data::Pallet { + fn on_era_end(era_index: EraIndex) { + Mock::mutate(|m| { + m.called_hooks.push(HookCall::OnEraEnd { era: era_index }); + }); + } +} + pub fn new_test_ext() -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::::default() .build_storage() diff --git a/pallets/external-validators/src/tests.rs b/pallets/external-validators/src/tests.rs index e3c449d32..d1b8ab31d 100644 --- a/pallets/external-validators/src/tests.rs +++ b/pallets/external-validators/src/tests.rs @@ -16,8 +16,8 @@ use { crate::{ mock::{ - new_test_ext, run_to_block, run_to_session, ExternalValidators, RootAccount, - RuntimeEvent, RuntimeOrigin, Session, System, Test, + new_test_ext, run_to_block, run_to_session, ExternalValidators, HookCall, Mock, + RootAccount, RuntimeEvent, RuntimeOrigin, Session, System, Test, }, Error, }, @@ -247,3 +247,23 @@ fn duplicate_validator_order_is_preserved() { assert_eq!(validators, vec![3, 1, 2, 4]); }); } + +#[test] +fn era_hooks() { + new_test_ext().execute_with(|| { + run_to_session(14); + + let expected_calls = vec![ + HookCall::OnEraStart { era: 0, session: 0 }, + HookCall::OnEraEnd { era: 0 }, + HookCall::OnEraStart { era: 1, session: 6 }, + HookCall::OnEraEnd { era: 1 }, + HookCall::OnEraStart { + era: 2, + session: 12, + }, + ]; + + assert_eq!(Mock::mock().called_hooks, expected_calls); + }); +} From f50bc780a12aa1c09be9ef59e38c103c9d0cbfa5 Mon Sep 17 00:00:00 2001 From: girazoki Date: Tue, 29 Oct 2024 17:23:46 +0100 Subject: [PATCH 53/82] testing finished --- ...lashes_are_confirmed_after_defer_period.ts | 9 +- .../slashes/test_slashes_grandpa.ts | 129 ++++++++++++++++++ 2 files changed, 132 insertions(+), 6 deletions(-) create mode 100644 test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts index 43bc68982..c01221f93 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts @@ -138,16 +138,13 @@ describeSuite({ let currentIndex = await polkadotJs.query.session.currentIndex(); let targetSession = currentIndex*sessionsPerEra*(DeferPeriod +1); - while((await polkadotJs.query.session.currentIndex()).toNumber() < targetSession) { - let currentIndex = await polkadotJs.query.session.currentIndex(); - await jumpToSession(context, currentIndex.toNumber()+1); - } + + await jumpToSession(context, targetSession); // scheduled slashes const expectedSlashesAfterDefer = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); expect(expectedSlashesAfterDefer.length).to.be.eq(1); - expect(expectedSlashesAfterDefer[0].confirmed.toHuman()6).to.be.true; - + expect(expectedSlashesAfterDefer[0].confirmed.toHuman()).to.be.true; }, }); }, diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts new file mode 100644 index 000000000..7e8c4ec81 --- /dev/null +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts @@ -0,0 +1,129 @@ +import "@tanssi/api-augment"; +import { describeSuite, expect, beforeAll } from "@moonwall/cli"; +import { ApiPromise } from "@polkadot/api"; +import { KeyringPair } from "@moonwall/util"; +import { fetchCollatorAssignmentTip, jumpSessions } from "util/block"; +import { Keyring } from "@polkadot/keyring"; +import { Header, GrandpaEquivocationProof, GrandpaEquivocation, GrandpaEquivocationValue } from "@polkadot/types/interfaces"; +import { SpRuntimeHeader, FinalityGrandpaPrevote } from '@polkadot/types/lookup'; +import { extrinsics } from "@polkadot/types/interfaces/definitions"; +import { u8aToHex, hexToU8a, stringToHex, numberToHex, stringToU8a, identity } from "@polkadot/util"; +import { blake2AsHex } from "@polkadot/util-crypto"; +import { jumpToSession } from "../../../util/block"; + +describeSuite({ + id: "DTR1306", + title: "Grandpa offences should trigger a slash", + foundationMethods: "dev", + testCases: ({ it, context }) => { + let polkadotJs: ApiPromise; + let alice: KeyringPair; + let aliceGrandpaPair: KeyringPair; + let aliceStash: KeyringPair; + beforeAll(async () => { + const keyringGrandpa = new Keyring({ type: "ed25519" }); + const keyringSr25519 = new Keyring({ type: "sr25519" }); + aliceGrandpaPair = keyringGrandpa.addFromUri("//Alice"); + polkadotJs = context.polkadotJs(); + alice = context.keyring.alice; + aliceStash = keyringSr25519.addFromUri("//Alice//stash"); + }); + it({ + id: "E01", + title: "Grandpa offences do not trigger a slash against invulnerables", + test: async function () { + // we crate one block so that we at least have one seal. + await jumpToSession(context, 1); + + // Remove alice from invulnerables (just for the slash) + const removeAliceFromInvulnerables = await polkadotJs.tx.sudo.sudo( + polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address) + ).signAsync(alice) + await context.createBlock([removeAliceFromInvulnerables]); + + let prevote1: FinalityGrandpaPrevote = polkadotJs.createType("FinalityGrandpaPrevote", { + targetHash: "0x0000000000000000000000000000000000000000000000000000000000000000", + targetNumber: 1 + }); + + let prevote2: FinalityGrandpaPrevote = polkadotJs.createType("FinalityGrandpaPrevote", { + targetHash: "0x0000000000000000000000000000000000000000000000000000000000000000", + targetNumber: 2 + }); + + let roundNumber = polkadotJs.createType("u64", 1); + let setId = await polkadotJs.query.grandpa.currentSetId(); + + // I could not find the proper struct that holds all this into a singl message + // ergo I need to construct the signing payload myself + // the first 0 is because of this enum variant + // https://github.com/paritytech/finality-grandpa/blob/8c45a664c05657f0c71057158d3ba555ba7d20de/src/lib.rs#L228 + // then we have the prevote message + // then the round number + // then the set id + const toSign1 = new Uint8Array([ + ...hexToU8a("0x00"), + ...prevote1.toU8a(), + ...roundNumber.toU8a(), + ...setId.toU8a() + ]); + + const toSign2 = new Uint8Array([ + ...hexToU8a("0x00"), + ...prevote2.toU8a(), + ...roundNumber.toU8a(), + ...setId.toU8a() + ]); + const sig1 = aliceGrandpaPair.sign(toSign1); + const sig2 = aliceGrandpaPair.sign(toSign2); + + const equivocationValue: GrandpaEquivocationValue = polkadotJs.createType("GrandpaEquivocationValue", { + roundNumber, + identity: aliceGrandpaPair.address, + first: [prevote1, sig1], + second: [prevote2, sig2] + }); + + const equivocation: GrandpaEquivocation = polkadotJs.createType("GrandpaEquivocation", + { + 'Prevote': equivocationValue + }); + + const doubleVotingProof: GrandpaEquivocationProof = polkadotJs.createType( + "GrandpaEquivocationProof", + { + setId, + equivocation + } + ); + + const keyOwnershipProof = (await polkadotJs.call.grandpaApi.generateKeyOwnershipProof( + setId, + u8aToHex(aliceGrandpaPair.publicKey) + )).unwrap(); + + const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( + polkadotJs.tx.utility.dispatchAs( + { + system: { Signed: alice.address }, + } as any, + polkadotJs.tx.grandpa.reportEquivocation(doubleVotingProof, keyOwnershipProof)), { + refTime: 1n, + proofSize: 1n + }) + + const signedTx = await tx.signAsync(alice); + await context.createBlock(signedTx); + + // Slash item should be there + const DeferPeriod = 2; + + // scheduled slashes + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + expect(expectedSlashes.length).to.be.eq(1); + expect(u8aToHex(expectedSlashes[0].validator)).to.be.eq(u8aToHex(aliceStash.addressRaw)); + + }, + }); + }, +}); From 4f5ef3c4bfdacd976c389e63f9876bcba67dfed4 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 29 Oct 2024 17:40:28 +0100 Subject: [PATCH 54/82] typescript-api --- .../interfaces/augment-api-runtime.ts | 43 +- .../src/dancebox/interfaces/augment-types.ts | 136 +-- .../interfaces/augment-api-consts.ts | 12 + .../interfaces/augment-api-query.ts | 15 +- .../dancelight/interfaces/augment-types.ts | 136 +-- .../src/dancelight/interfaces/lookup.ts | 808 ++++++++--------- .../src/dancelight/interfaces/types-lookup.ts | 840 +++++++++--------- .../src/flashbox/interfaces/augment-types.ts | 136 +-- 8 files changed, 867 insertions(+), 1259 deletions(-) diff --git a/typescript-api/src/dancebox/interfaces/augment-api-runtime.ts b/typescript-api/src/dancebox/interfaces/augment-api-runtime.ts index c6543a26d..087e4590d 100644 --- a/typescript-api/src/dancebox/interfaces/augment-api-runtime.ts +++ b/typescript-api/src/dancebox/interfaces/augment-api-runtime.ts @@ -7,12 +7,11 @@ import "@polkadot/api-base/types/calls"; import type { ApiTypes, AugmentedCall, DecoratedCallBase } from "@polkadot/api-base/types"; import type { Bytes, Null, Option, Result, Vec, u128, u32 } from "@polkadot/types-codec"; -import type { AnyNumber, IMethod, ITuple } from "@polkadot/types-codec/types"; +import type { AnyNumber, ITuple } from "@polkadot/types-codec/types"; import type { CheckInherentsResult, InherentData } from "@polkadot/types/interfaces/blockbuilder"; import type { BlockHash } from "@polkadot/types/interfaces/chain"; import type { AuthorityId } from "@polkadot/types/interfaces/consensus"; import type { CollationInfo } from "@polkadot/types/interfaces/cumulus"; -import type { CallDryRunEffects, XcmDryRunApiError, XcmDryRunEffects } from "@polkadot/types/interfaces/dryRunApi"; import type { Extrinsic } from "@polkadot/types/interfaces/extrinsics"; import type { GenesisBuildErr } from "@polkadot/types/interfaces/genesisBuilder"; import type { OpaqueMetadata } from "@polkadot/types/interfaces/metadata"; @@ -25,8 +24,6 @@ import type { Header, Index, KeyTypeId, - OriginCaller, - RuntimeCall, SlotDuration, Weight, WeightV2, @@ -34,7 +31,6 @@ import type { import type { RuntimeVersion } from "@polkadot/types/interfaces/state"; import type { ApplyExtrinsicResult } from "@polkadot/types/interfaces/system"; import type { TransactionSource, TransactionValidity } from "@polkadot/types/interfaces/txqueue"; -import type { VersionedMultiLocation, VersionedXcm } from "@polkadot/types/interfaces/xcm"; import type { XcmPaymentApiError } from "@polkadot/types/interfaces/xcmPaymentApi"; import type { Error } from "@polkadot/types/interfaces/xcmRuntimeApi"; import type { XcmVersionedAssetId, XcmVersionedLocation, XcmVersionedXcm } from "@polkadot/types/lookup"; @@ -125,43 +121,6 @@ declare module "@polkadot/api-base/types/calls" { /** Generic call */ [key: string]: DecoratedCallBase; }; - /** 0x91b1c8b16328eb92/1 */ - dryRunApi: { - /** Dry run call */ - dryRunCall: AugmentedCall< - ApiType, - ( - origin: OriginCaller | { System: any } | string | Uint8Array, - call: RuntimeCall | IMethod | string | Uint8Array - ) => Observable> - >; - /** Dry run XCM program */ - dryRunXcm: AugmentedCall< - ApiType, - ( - originLocation: - | VersionedMultiLocation - | { V0: any } - | { V1: any } - | { V2: any } - | { V3: any } - | { V4: any } - | string - | Uint8Array, - xcm: - | VersionedXcm - | { V0: any } - | { V1: any } - | { V2: any } - | { V3: any } - | { V4: any } - | string - | Uint8Array - ) => Observable> - >; - /** Generic call */ - [key: string]: DecoratedCallBase; - }; /** 0xfbc577b9d747efd6/1 */ genesisBuilder: { /** Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage. */ diff --git a/typescript-api/src/dancebox/interfaces/augment-types.ts b/typescript-api/src/dancebox/interfaces/augment-types.ts index b47f3cdcb..8258442d0 100644 --- a/typescript-api/src/dancebox/interfaces/augment-types.ts +++ b/typescript-api/src/dancebox/interfaces/augment-types.ts @@ -311,13 +311,6 @@ import type { VotingDirectVote, } from "@polkadot/types/interfaces/democracy"; import type { BlockStats } from "@polkadot/types/interfaces/dev"; -import type { - CallDryRunEffects, - DispatchResultWithPostInfo, - PostDispatchInfo, - XcmDryRunApiError, - XcmDryRunEffects, -} from "@polkadot/types/interfaces/dryRunApi"; import type { ApprovalFlag, DefunctVoter, @@ -403,13 +396,10 @@ import type { ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, - ExtrinsicPayloadV5, ExtrinsicSignature, ExtrinsicSignatureV4, - ExtrinsicSignatureV5, ExtrinsicUnknown, ExtrinsicV4, - ExtrinsicV5, ImmortalEra, MortalEra, MultiSignature, @@ -1155,88 +1145,48 @@ import type { import type { Multisig, Timepoint } from "@polkadot/types/interfaces/utility"; import type { VestingInfo } from "@polkadot/types/interfaces/vesting"; import type { - AssetIdV2, - AssetIdV3, - AssetIdV4, AssetInstance, AssetInstanceV0, AssetInstanceV1, AssetInstanceV2, - AssetInstanceV3, - AssetInstanceV4, BodyId, - BodyIdV2, - BodyIdV3, BodyPart, - BodyPartV2, - BodyPartV3, DoubleEncodedCall, Fungibility, FungibilityV0, FungibilityV1, FungibilityV2, - FungibilityV3, - FungibilityV4, InboundStatus, InstructionV2, - InstructionV3, - InstructionV4, InteriorMultiLocation, - InteriorMultiLocationV2, - InteriorMultiLocationV3, Junction, JunctionV0, JunctionV1, JunctionV2, - JunctionV3, - JunctionV4, Junctions, JunctionsV1, JunctionsV2, - JunctionsV3, - JunctionsV4, - MaxPalletNameLen, - MaxPalletsInfo, - MaybeErrorCodeV3, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, - MultiAssetFilterV3, - MultiAssetFilterV4, MultiAssetV0, MultiAssetV1, MultiAssetV2, - MultiAssetV3, - MultiAssetV4, MultiAssets, MultiAssetsV1, MultiAssetsV2, - MultiAssetsV3, - MultiAssetsV4, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, - MultiLocationV3, - MultiLocationV4, NetworkId, - NetworkIdV2, - NetworkIdV3, - NetworkIdV4, OriginKindV0, OriginKindV1, OriginKindV2, - OriginKindV3, - OriginKindV4, OutboundStatus, Outcome, - OutcomeV4, - PalletInfoV3, - PalletInfoV4, QueryId, - QueryResponseInfoV3, - QueryResponseInfoV4, QueryStatus, QueueConfigData, Response, @@ -1244,49 +1194,36 @@ import type { ResponseV1, ResponseV2, ResponseV2Error, - ResponseV3, - ResponseV3Error, - ResponseV3Result, - ResponseV4, - UncheckedFungibilityV4, + ResponseV2Result, VersionMigrationStage, - VersionV3, - VersionV4, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, - WeightLimitV3, WildFungibility, WildFungibilityV0, WildFungibilityV1, WildFungibilityV2, - WildFungibilityV3, - WildFungibilityV4, WildMultiAsset, WildMultiAssetV1, WildMultiAssetV2, - WildMultiAssetV3, - WildMultiAssetV4, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, - XcmErrorV3, - XcmErrorV4, + XcmOrder, XcmOrderV0, XcmOrderV1, + XcmOrderV2, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, - XcmV3, - XcmV4, XcmVersion, XcmpMessageFormat, } from "@polkadot/types/interfaces/xcm"; @@ -1338,15 +1275,10 @@ declare module "@polkadot/types/types/registry" { AssetDestroyWitness: AssetDestroyWitness; AssetDetails: AssetDetails; AssetId: AssetId; - AssetIdV2: AssetIdV2; - AssetIdV3: AssetIdV3; - AssetIdV4: AssetIdV4; AssetInstance: AssetInstance; AssetInstanceV0: AssetInstanceV0; AssetInstanceV1: AssetInstanceV1; AssetInstanceV2: AssetInstanceV2; - AssetInstanceV3: AssetInstanceV3; - AssetInstanceV4: AssetInstanceV4; AssetMetadata: AssetMetadata; AssetOptions: AssetOptions; AssignmentId: AssignmentId; @@ -1419,11 +1351,7 @@ declare module "@polkadot/types/types/registry" { BlockV2: BlockV2; BlockWeights: BlockWeights; BodyId: BodyId; - BodyIdV2: BodyIdV2; - BodyIdV3: BodyIdV3; BodyPart: BodyPart; - BodyPartV2: BodyPartV2; - BodyPartV3: BodyPartV3; bool: bool; Bool: Bool; Bounty: Bounty; @@ -1439,7 +1367,6 @@ declare module "@polkadot/types/types/registry" { BufferedSessionChange: BufferedSessionChange; Bytes: Bytes; Call: Call; - CallDryRunEffects: CallDryRunEffects; CallHash: CallHash; CallHashOf: CallHashOf; CallIndex: CallIndex; @@ -1599,7 +1526,6 @@ declare module "@polkadot/types/types/registry" { DispatchResult: DispatchResult; DispatchResultOf: DispatchResultOf; DispatchResultTo198: DispatchResultTo198; - DispatchResultWithPostInfo: DispatchResultWithPostInfo; DisputeLocation: DisputeLocation; DisputeProof: DisputeProof; DisputeResult: DisputeResult; @@ -1719,15 +1645,12 @@ declare module "@polkadot/types/types/registry" { ExtrinsicPayload: ExtrinsicPayload; ExtrinsicPayloadUnknown: ExtrinsicPayloadUnknown; ExtrinsicPayloadV4: ExtrinsicPayloadV4; - ExtrinsicPayloadV5: ExtrinsicPayloadV5; ExtrinsicSignature: ExtrinsicSignature; ExtrinsicSignatureV4: ExtrinsicSignatureV4; - ExtrinsicSignatureV5: ExtrinsicSignatureV5; ExtrinsicStatus: ExtrinsicStatus; ExtrinsicsWeight: ExtrinsicsWeight; ExtrinsicUnknown: ExtrinsicUnknown; ExtrinsicV4: ExtrinsicV4; - ExtrinsicV5: ExtrinsicV5; f32: f32; F32: F32; f64: f64; @@ -1763,8 +1686,6 @@ declare module "@polkadot/types/types/registry" { FungibilityV0: FungibilityV0; FungibilityV1: FungibilityV1; FungibilityV2: FungibilityV2; - FungibilityV3: FungibilityV3; - FungibilityV4: FungibilityV4; FungiblesAccessError: FungiblesAccessError; Gas: Gas; GenesisBuildErr: GenesisBuildErr; @@ -1851,12 +1772,8 @@ declare module "@polkadot/types/types/registry" { InstantiateReturnValueOk: InstantiateReturnValueOk; InstantiateReturnValueTo267: InstantiateReturnValueTo267; InstructionV2: InstructionV2; - InstructionV3: InstructionV3; - InstructionV4: InstructionV4; InstructionWeights: InstructionWeights; InteriorMultiLocation: InteriorMultiLocation; - InteriorMultiLocationV2: InteriorMultiLocationV2; - InteriorMultiLocationV3: InteriorMultiLocationV3; InvalidDisputeStatementKind: InvalidDisputeStatementKind; InvalidTransaction: InvalidTransaction; isize: isize; @@ -1866,13 +1783,9 @@ declare module "@polkadot/types/types/registry" { Junctions: Junctions; JunctionsV1: JunctionsV1; JunctionsV2: JunctionsV2; - JunctionsV3: JunctionsV3; - JunctionsV4: JunctionsV4; JunctionV0: JunctionV0; JunctionV1: JunctionV1; JunctionV2: JunctionV2; - JunctionV3: JunctionV3; - JunctionV4: JunctionV4; Justification: Justification; JustificationNotification: JustificationNotification; Justifications: Justifications; @@ -1897,9 +1810,6 @@ declare module "@polkadot/types/types/registry" { LookupSource: LookupSource; LookupTarget: LookupTarget; LotteryConfig: LotteryConfig; - MaxPalletNameLen: MaxPalletNameLen; - MaxPalletsInfo: MaxPalletsInfo; - MaybeErrorCodeV3: MaybeErrorCodeV3; MaybeRandomness: MaybeRandomness; MaybeVrf: MaybeVrf; MemberCount: MemberCount; @@ -1956,33 +1866,22 @@ declare module "@polkadot/types/types/registry" { MultiAssetFilter: MultiAssetFilter; MultiAssetFilterV1: MultiAssetFilterV1; MultiAssetFilterV2: MultiAssetFilterV2; - MultiAssetFilterV3: MultiAssetFilterV3; - MultiAssetFilterV4: MultiAssetFilterV4; MultiAssets: MultiAssets; MultiAssetsV1: MultiAssetsV1; MultiAssetsV2: MultiAssetsV2; - MultiAssetsV3: MultiAssetsV3; - MultiAssetsV4: MultiAssetsV4; MultiAssetV0: MultiAssetV0; MultiAssetV1: MultiAssetV1; MultiAssetV2: MultiAssetV2; - MultiAssetV3: MultiAssetV3; - MultiAssetV4: MultiAssetV4; MultiDisputeStatementSet: MultiDisputeStatementSet; MultiLocation: MultiLocation; MultiLocationV0: MultiLocationV0; MultiLocationV1: MultiLocationV1; MultiLocationV2: MultiLocationV2; - MultiLocationV3: MultiLocationV3; - MultiLocationV4: MultiLocationV4; Multiplier: Multiplier; Multisig: Multisig; MultiSignature: MultiSignature; MultiSigner: MultiSigner; NetworkId: NetworkId; - NetworkIdV2: NetworkIdV2; - NetworkIdV3: NetworkIdV3; - NetworkIdV4: NetworkIdV4; NetworkState: NetworkState; NetworkStatePeerset: NetworkStatePeerset; NetworkStatePeersetInfo: NetworkStatePeersetInfo; @@ -2026,8 +1925,6 @@ declare module "@polkadot/types/types/registry" { OriginKindV0: OriginKindV0; OriginKindV1: OriginKindV1; OriginKindV2: OriginKindV2; - OriginKindV3: OriginKindV3; - OriginKindV4: OriginKindV4; OutboundHrmpChannelLimitations: OutboundHrmpChannelLimitations; OutboundHrmpMessage: OutboundHrmpMessage; OutboundLaneData: OutboundLaneData; @@ -2035,7 +1932,6 @@ declare module "@polkadot/types/types/registry" { OutboundPayload: OutboundPayload; OutboundStatus: OutboundStatus; Outcome: Outcome; - OutcomeV4: OutcomeV4; OuterEnums15: OuterEnums15; OverweightIndex: OverweightIndex; Owner: Owner; @@ -2050,8 +1946,6 @@ declare module "@polkadot/types/types/registry" { PalletEventMetadataLatest: PalletEventMetadataLatest; PalletEventMetadataV14: PalletEventMetadataV14; PalletId: PalletId; - PalletInfoV3: PalletInfoV3; - PalletInfoV4: PalletInfoV4; PalletMetadataLatest: PalletMetadataLatest; PalletMetadataV14: PalletMetadataV14; PalletMetadataV15: PalletMetadataV15; @@ -2104,7 +1998,6 @@ declare module "@polkadot/types/types/registry" { Points: Points; PortableType: PortableType; PortableTypeV14: PortableTypeV14; - PostDispatchInfo: PostDispatchInfo; Precommits: Precommits; PrefabWasmModule: PrefabWasmModule; PrefixedStorageKey: PrefixedStorageKey; @@ -2125,8 +2018,6 @@ declare module "@polkadot/types/types/registry" { PvfExecTimeoutKind: PvfExecTimeoutKind; PvfPrepTimeoutKind: PvfPrepTimeoutKind; QueryId: QueryId; - QueryResponseInfoV3: QueryResponseInfoV3; - QueryResponseInfoV4: QueryResponseInfoV4; QueryStatus: QueryStatus; QueueConfigData: QueueConfigData; QueuedParathread: QueuedParathread; @@ -2184,10 +2075,7 @@ declare module "@polkadot/types/types/registry" { ResponseV1: ResponseV1; ResponseV2: ResponseV2; ResponseV2Error: ResponseV2Error; - ResponseV3: ResponseV3; - ResponseV3Error: ResponseV3Error; - ResponseV3Result: ResponseV3Result; - ResponseV4: ResponseV4; + ResponseV2Result: ResponseV2Result; Retriable: Retriable; RewardDestination: RewardDestination; RewardPoint: RewardPoint; @@ -2424,7 +2312,6 @@ declare module "@polkadot/types/types/registry" { U8: U8; UnappliedSlash: UnappliedSlash; UnappliedSlashOther: UnappliedSlashOther; - UncheckedFungibilityV4: UncheckedFungibilityV4; UncleEntryItem: UncleEntryItem; UnknownTransaction: UnknownTransaction; UnlockChunk: UnlockChunk; @@ -2463,8 +2350,6 @@ declare module "@polkadot/types/types/registry" { VersionedResponse: VersionedResponse; VersionedXcm: VersionedXcm; VersionMigrationStage: VersionMigrationStage; - VersionV3: VersionV3; - VersionV4: VersionV4; VestingInfo: VestingInfo; VestingSchedule: VestingSchedule; Vote: Vote; @@ -2485,7 +2370,6 @@ declare module "@polkadot/types/types/registry" { VrfProof: VrfProof; Weight: Weight; WeightLimitV2: WeightLimitV2; - WeightLimitV3: WeightLimitV3; WeightMultiplier: WeightMultiplier; WeightPerClass: WeightPerClass; WeightToFeeCoefficient: WeightToFeeCoefficient; @@ -2496,13 +2380,9 @@ declare module "@polkadot/types/types/registry" { WildFungibilityV0: WildFungibilityV0; WildFungibilityV1: WildFungibilityV1; WildFungibilityV2: WildFungibilityV2; - WildFungibilityV3: WildFungibilityV3; - WildFungibilityV4: WildFungibilityV4; WildMultiAsset: WildMultiAsset; WildMultiAssetV1: WildMultiAssetV1; WildMultiAssetV2: WildMultiAssetV2; - WildMultiAssetV3: WildMultiAssetV3; - WildMultiAssetV4: WildMultiAssetV4; WinnersData: WinnersData; WinnersData10: WinnersData10; WinnersDataTuple: WinnersDataTuple; @@ -2513,16 +2393,14 @@ declare module "@polkadot/types/types/registry" { WithdrawReasons: WithdrawReasons; Xcm: Xcm; XcmAssetId: XcmAssetId; - XcmDryRunApiError: XcmDryRunApiError; - XcmDryRunEffects: XcmDryRunEffects; XcmError: XcmError; XcmErrorV0: XcmErrorV0; XcmErrorV1: XcmErrorV1; XcmErrorV2: XcmErrorV2; - XcmErrorV3: XcmErrorV3; - XcmErrorV4: XcmErrorV4; + XcmOrder: XcmOrder; XcmOrderV0: XcmOrderV0; XcmOrderV1: XcmOrderV1; + XcmOrderV2: XcmOrderV2; XcmOrigin: XcmOrigin; XcmOriginKind: XcmOriginKind; XcmPaymentApiError: XcmPaymentApiError; @@ -2530,8 +2408,6 @@ declare module "@polkadot/types/types/registry" { XcmV0: XcmV0; XcmV1: XcmV1; XcmV2: XcmV2; - XcmV3: XcmV3; - XcmV4: XcmV4; XcmVersion: XcmVersion; } // InterfaceTypes } // declare module diff --git a/typescript-api/src/dancelight/interfaces/augment-api-consts.ts b/typescript-api/src/dancelight/interfaces/augment-api-consts.ts index a9b07cbaa..dc0004bb4 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-consts.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-consts.ts @@ -134,6 +134,18 @@ declare module "@polkadot/api-base/types/consts" { [key: string]: Codec; }; externalValidators: { + /** + * Number of eras to keep in history. + * + * Following information is kept for eras in `[current_era - HistoryDepth, current_era]`: `ErasStartSessionIndex` + * + * Must be more than the number of eras delayed by session. I.e. active era must always be in history. I.e. + * `active_era > current_era - history_depth` must be guaranteed. + * + * If migrating an existing pallet from storage value to config value, this should be set to same value or greater + * as in storage. + */ + historyDepth: u32 & AugmentedConst; /** Maximum number of external validators. */ maxExternalValidators: u32 & AugmentedConst; /** Maximum number of whitelisted validators. */ diff --git a/typescript-api/src/dancelight/interfaces/augment-api-query.ts b/typescript-api/src/dancelight/interfaces/augment-api-query.ts index 7b31cc99b..cd54a9028 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-query.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-query.ts @@ -665,14 +665,23 @@ declare module "@polkadot/api-base/types/storage" { /** The active era information, it holds index and start. */ activeEra: AugmentedQuery Observable>, []> & QueryableStorageEntry; - /** Session index at the start of the _active_ era. Used to know when to start the next era. */ - activeEraSessionStart: AugmentedQuery Observable, []> & - QueryableStorageEntry; /** * The current era information, it is either ActiveEra or ActiveEra + 1 if the new era validators have been * queued. */ currentEra: AugmentedQuery Observable>, []> & QueryableStorageEntry; + /** + * The session index at which the era start for the last [`Config::HistoryDepth`] eras. + * + * Note: This tracks the starting session (i.e. session index when era start being active) for the eras in + * `[CurrentEra - HISTORY_DEPTH, CurrentEra]`. + */ + erasStartSessionIndex: AugmentedQuery< + ApiType, + (arg: u32 | AnyNumber | Uint8Array) => Observable>, + [u32] + > & + QueryableStorageEntry; /** Validators set using storage proofs from another blockchain. Ignored if `SkipExternalValidators` is true. */ externalValidators: AugmentedQuery Observable>, []> & QueryableStorageEntry; diff --git a/typescript-api/src/dancelight/interfaces/augment-types.ts b/typescript-api/src/dancelight/interfaces/augment-types.ts index b47f3cdcb..8258442d0 100644 --- a/typescript-api/src/dancelight/interfaces/augment-types.ts +++ b/typescript-api/src/dancelight/interfaces/augment-types.ts @@ -311,13 +311,6 @@ import type { VotingDirectVote, } from "@polkadot/types/interfaces/democracy"; import type { BlockStats } from "@polkadot/types/interfaces/dev"; -import type { - CallDryRunEffects, - DispatchResultWithPostInfo, - PostDispatchInfo, - XcmDryRunApiError, - XcmDryRunEffects, -} from "@polkadot/types/interfaces/dryRunApi"; import type { ApprovalFlag, DefunctVoter, @@ -403,13 +396,10 @@ import type { ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, - ExtrinsicPayloadV5, ExtrinsicSignature, ExtrinsicSignatureV4, - ExtrinsicSignatureV5, ExtrinsicUnknown, ExtrinsicV4, - ExtrinsicV5, ImmortalEra, MortalEra, MultiSignature, @@ -1155,88 +1145,48 @@ import type { import type { Multisig, Timepoint } from "@polkadot/types/interfaces/utility"; import type { VestingInfo } from "@polkadot/types/interfaces/vesting"; import type { - AssetIdV2, - AssetIdV3, - AssetIdV4, AssetInstance, AssetInstanceV0, AssetInstanceV1, AssetInstanceV2, - AssetInstanceV3, - AssetInstanceV4, BodyId, - BodyIdV2, - BodyIdV3, BodyPart, - BodyPartV2, - BodyPartV3, DoubleEncodedCall, Fungibility, FungibilityV0, FungibilityV1, FungibilityV2, - FungibilityV3, - FungibilityV4, InboundStatus, InstructionV2, - InstructionV3, - InstructionV4, InteriorMultiLocation, - InteriorMultiLocationV2, - InteriorMultiLocationV3, Junction, JunctionV0, JunctionV1, JunctionV2, - JunctionV3, - JunctionV4, Junctions, JunctionsV1, JunctionsV2, - JunctionsV3, - JunctionsV4, - MaxPalletNameLen, - MaxPalletsInfo, - MaybeErrorCodeV3, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, - MultiAssetFilterV3, - MultiAssetFilterV4, MultiAssetV0, MultiAssetV1, MultiAssetV2, - MultiAssetV3, - MultiAssetV4, MultiAssets, MultiAssetsV1, MultiAssetsV2, - MultiAssetsV3, - MultiAssetsV4, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, - MultiLocationV3, - MultiLocationV4, NetworkId, - NetworkIdV2, - NetworkIdV3, - NetworkIdV4, OriginKindV0, OriginKindV1, OriginKindV2, - OriginKindV3, - OriginKindV4, OutboundStatus, Outcome, - OutcomeV4, - PalletInfoV3, - PalletInfoV4, QueryId, - QueryResponseInfoV3, - QueryResponseInfoV4, QueryStatus, QueueConfigData, Response, @@ -1244,49 +1194,36 @@ import type { ResponseV1, ResponseV2, ResponseV2Error, - ResponseV3, - ResponseV3Error, - ResponseV3Result, - ResponseV4, - UncheckedFungibilityV4, + ResponseV2Result, VersionMigrationStage, - VersionV3, - VersionV4, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, - WeightLimitV3, WildFungibility, WildFungibilityV0, WildFungibilityV1, WildFungibilityV2, - WildFungibilityV3, - WildFungibilityV4, WildMultiAsset, WildMultiAssetV1, WildMultiAssetV2, - WildMultiAssetV3, - WildMultiAssetV4, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, - XcmErrorV3, - XcmErrorV4, + XcmOrder, XcmOrderV0, XcmOrderV1, + XcmOrderV2, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, - XcmV3, - XcmV4, XcmVersion, XcmpMessageFormat, } from "@polkadot/types/interfaces/xcm"; @@ -1338,15 +1275,10 @@ declare module "@polkadot/types/types/registry" { AssetDestroyWitness: AssetDestroyWitness; AssetDetails: AssetDetails; AssetId: AssetId; - AssetIdV2: AssetIdV2; - AssetIdV3: AssetIdV3; - AssetIdV4: AssetIdV4; AssetInstance: AssetInstance; AssetInstanceV0: AssetInstanceV0; AssetInstanceV1: AssetInstanceV1; AssetInstanceV2: AssetInstanceV2; - AssetInstanceV3: AssetInstanceV3; - AssetInstanceV4: AssetInstanceV4; AssetMetadata: AssetMetadata; AssetOptions: AssetOptions; AssignmentId: AssignmentId; @@ -1419,11 +1351,7 @@ declare module "@polkadot/types/types/registry" { BlockV2: BlockV2; BlockWeights: BlockWeights; BodyId: BodyId; - BodyIdV2: BodyIdV2; - BodyIdV3: BodyIdV3; BodyPart: BodyPart; - BodyPartV2: BodyPartV2; - BodyPartV3: BodyPartV3; bool: bool; Bool: Bool; Bounty: Bounty; @@ -1439,7 +1367,6 @@ declare module "@polkadot/types/types/registry" { BufferedSessionChange: BufferedSessionChange; Bytes: Bytes; Call: Call; - CallDryRunEffects: CallDryRunEffects; CallHash: CallHash; CallHashOf: CallHashOf; CallIndex: CallIndex; @@ -1599,7 +1526,6 @@ declare module "@polkadot/types/types/registry" { DispatchResult: DispatchResult; DispatchResultOf: DispatchResultOf; DispatchResultTo198: DispatchResultTo198; - DispatchResultWithPostInfo: DispatchResultWithPostInfo; DisputeLocation: DisputeLocation; DisputeProof: DisputeProof; DisputeResult: DisputeResult; @@ -1719,15 +1645,12 @@ declare module "@polkadot/types/types/registry" { ExtrinsicPayload: ExtrinsicPayload; ExtrinsicPayloadUnknown: ExtrinsicPayloadUnknown; ExtrinsicPayloadV4: ExtrinsicPayloadV4; - ExtrinsicPayloadV5: ExtrinsicPayloadV5; ExtrinsicSignature: ExtrinsicSignature; ExtrinsicSignatureV4: ExtrinsicSignatureV4; - ExtrinsicSignatureV5: ExtrinsicSignatureV5; ExtrinsicStatus: ExtrinsicStatus; ExtrinsicsWeight: ExtrinsicsWeight; ExtrinsicUnknown: ExtrinsicUnknown; ExtrinsicV4: ExtrinsicV4; - ExtrinsicV5: ExtrinsicV5; f32: f32; F32: F32; f64: f64; @@ -1763,8 +1686,6 @@ declare module "@polkadot/types/types/registry" { FungibilityV0: FungibilityV0; FungibilityV1: FungibilityV1; FungibilityV2: FungibilityV2; - FungibilityV3: FungibilityV3; - FungibilityV4: FungibilityV4; FungiblesAccessError: FungiblesAccessError; Gas: Gas; GenesisBuildErr: GenesisBuildErr; @@ -1851,12 +1772,8 @@ declare module "@polkadot/types/types/registry" { InstantiateReturnValueOk: InstantiateReturnValueOk; InstantiateReturnValueTo267: InstantiateReturnValueTo267; InstructionV2: InstructionV2; - InstructionV3: InstructionV3; - InstructionV4: InstructionV4; InstructionWeights: InstructionWeights; InteriorMultiLocation: InteriorMultiLocation; - InteriorMultiLocationV2: InteriorMultiLocationV2; - InteriorMultiLocationV3: InteriorMultiLocationV3; InvalidDisputeStatementKind: InvalidDisputeStatementKind; InvalidTransaction: InvalidTransaction; isize: isize; @@ -1866,13 +1783,9 @@ declare module "@polkadot/types/types/registry" { Junctions: Junctions; JunctionsV1: JunctionsV1; JunctionsV2: JunctionsV2; - JunctionsV3: JunctionsV3; - JunctionsV4: JunctionsV4; JunctionV0: JunctionV0; JunctionV1: JunctionV1; JunctionV2: JunctionV2; - JunctionV3: JunctionV3; - JunctionV4: JunctionV4; Justification: Justification; JustificationNotification: JustificationNotification; Justifications: Justifications; @@ -1897,9 +1810,6 @@ declare module "@polkadot/types/types/registry" { LookupSource: LookupSource; LookupTarget: LookupTarget; LotteryConfig: LotteryConfig; - MaxPalletNameLen: MaxPalletNameLen; - MaxPalletsInfo: MaxPalletsInfo; - MaybeErrorCodeV3: MaybeErrorCodeV3; MaybeRandomness: MaybeRandomness; MaybeVrf: MaybeVrf; MemberCount: MemberCount; @@ -1956,33 +1866,22 @@ declare module "@polkadot/types/types/registry" { MultiAssetFilter: MultiAssetFilter; MultiAssetFilterV1: MultiAssetFilterV1; MultiAssetFilterV2: MultiAssetFilterV2; - MultiAssetFilterV3: MultiAssetFilterV3; - MultiAssetFilterV4: MultiAssetFilterV4; MultiAssets: MultiAssets; MultiAssetsV1: MultiAssetsV1; MultiAssetsV2: MultiAssetsV2; - MultiAssetsV3: MultiAssetsV3; - MultiAssetsV4: MultiAssetsV4; MultiAssetV0: MultiAssetV0; MultiAssetV1: MultiAssetV1; MultiAssetV2: MultiAssetV2; - MultiAssetV3: MultiAssetV3; - MultiAssetV4: MultiAssetV4; MultiDisputeStatementSet: MultiDisputeStatementSet; MultiLocation: MultiLocation; MultiLocationV0: MultiLocationV0; MultiLocationV1: MultiLocationV1; MultiLocationV2: MultiLocationV2; - MultiLocationV3: MultiLocationV3; - MultiLocationV4: MultiLocationV4; Multiplier: Multiplier; Multisig: Multisig; MultiSignature: MultiSignature; MultiSigner: MultiSigner; NetworkId: NetworkId; - NetworkIdV2: NetworkIdV2; - NetworkIdV3: NetworkIdV3; - NetworkIdV4: NetworkIdV4; NetworkState: NetworkState; NetworkStatePeerset: NetworkStatePeerset; NetworkStatePeersetInfo: NetworkStatePeersetInfo; @@ -2026,8 +1925,6 @@ declare module "@polkadot/types/types/registry" { OriginKindV0: OriginKindV0; OriginKindV1: OriginKindV1; OriginKindV2: OriginKindV2; - OriginKindV3: OriginKindV3; - OriginKindV4: OriginKindV4; OutboundHrmpChannelLimitations: OutboundHrmpChannelLimitations; OutboundHrmpMessage: OutboundHrmpMessage; OutboundLaneData: OutboundLaneData; @@ -2035,7 +1932,6 @@ declare module "@polkadot/types/types/registry" { OutboundPayload: OutboundPayload; OutboundStatus: OutboundStatus; Outcome: Outcome; - OutcomeV4: OutcomeV4; OuterEnums15: OuterEnums15; OverweightIndex: OverweightIndex; Owner: Owner; @@ -2050,8 +1946,6 @@ declare module "@polkadot/types/types/registry" { PalletEventMetadataLatest: PalletEventMetadataLatest; PalletEventMetadataV14: PalletEventMetadataV14; PalletId: PalletId; - PalletInfoV3: PalletInfoV3; - PalletInfoV4: PalletInfoV4; PalletMetadataLatest: PalletMetadataLatest; PalletMetadataV14: PalletMetadataV14; PalletMetadataV15: PalletMetadataV15; @@ -2104,7 +1998,6 @@ declare module "@polkadot/types/types/registry" { Points: Points; PortableType: PortableType; PortableTypeV14: PortableTypeV14; - PostDispatchInfo: PostDispatchInfo; Precommits: Precommits; PrefabWasmModule: PrefabWasmModule; PrefixedStorageKey: PrefixedStorageKey; @@ -2125,8 +2018,6 @@ declare module "@polkadot/types/types/registry" { PvfExecTimeoutKind: PvfExecTimeoutKind; PvfPrepTimeoutKind: PvfPrepTimeoutKind; QueryId: QueryId; - QueryResponseInfoV3: QueryResponseInfoV3; - QueryResponseInfoV4: QueryResponseInfoV4; QueryStatus: QueryStatus; QueueConfigData: QueueConfigData; QueuedParathread: QueuedParathread; @@ -2184,10 +2075,7 @@ declare module "@polkadot/types/types/registry" { ResponseV1: ResponseV1; ResponseV2: ResponseV2; ResponseV2Error: ResponseV2Error; - ResponseV3: ResponseV3; - ResponseV3Error: ResponseV3Error; - ResponseV3Result: ResponseV3Result; - ResponseV4: ResponseV4; + ResponseV2Result: ResponseV2Result; Retriable: Retriable; RewardDestination: RewardDestination; RewardPoint: RewardPoint; @@ -2424,7 +2312,6 @@ declare module "@polkadot/types/types/registry" { U8: U8; UnappliedSlash: UnappliedSlash; UnappliedSlashOther: UnappliedSlashOther; - UncheckedFungibilityV4: UncheckedFungibilityV4; UncleEntryItem: UncleEntryItem; UnknownTransaction: UnknownTransaction; UnlockChunk: UnlockChunk; @@ -2463,8 +2350,6 @@ declare module "@polkadot/types/types/registry" { VersionedResponse: VersionedResponse; VersionedXcm: VersionedXcm; VersionMigrationStage: VersionMigrationStage; - VersionV3: VersionV3; - VersionV4: VersionV4; VestingInfo: VestingInfo; VestingSchedule: VestingSchedule; Vote: Vote; @@ -2485,7 +2370,6 @@ declare module "@polkadot/types/types/registry" { VrfProof: VrfProof; Weight: Weight; WeightLimitV2: WeightLimitV2; - WeightLimitV3: WeightLimitV3; WeightMultiplier: WeightMultiplier; WeightPerClass: WeightPerClass; WeightToFeeCoefficient: WeightToFeeCoefficient; @@ -2496,13 +2380,9 @@ declare module "@polkadot/types/types/registry" { WildFungibilityV0: WildFungibilityV0; WildFungibilityV1: WildFungibilityV1; WildFungibilityV2: WildFungibilityV2; - WildFungibilityV3: WildFungibilityV3; - WildFungibilityV4: WildFungibilityV4; WildMultiAsset: WildMultiAsset; WildMultiAssetV1: WildMultiAssetV1; WildMultiAssetV2: WildMultiAssetV2; - WildMultiAssetV3: WildMultiAssetV3; - WildMultiAssetV4: WildMultiAssetV4; WinnersData: WinnersData; WinnersData10: WinnersData10; WinnersDataTuple: WinnersDataTuple; @@ -2513,16 +2393,14 @@ declare module "@polkadot/types/types/registry" { WithdrawReasons: WithdrawReasons; Xcm: Xcm; XcmAssetId: XcmAssetId; - XcmDryRunApiError: XcmDryRunApiError; - XcmDryRunEffects: XcmDryRunEffects; XcmError: XcmError; XcmErrorV0: XcmErrorV0; XcmErrorV1: XcmErrorV1; XcmErrorV2: XcmErrorV2; - XcmErrorV3: XcmErrorV3; - XcmErrorV4: XcmErrorV4; + XcmOrder: XcmOrder; XcmOrderV0: XcmOrderV0; XcmOrderV1: XcmOrderV1; + XcmOrderV2: XcmOrderV2; XcmOrigin: XcmOrigin; XcmOriginKind: XcmOriginKind; XcmPaymentApiError: XcmPaymentApiError; @@ -2530,8 +2408,6 @@ declare module "@polkadot/types/types/registry" { XcmV0: XcmV0; XcmV1: XcmV1; XcmV2: XcmV2; - XcmV3: XcmV3; - XcmV4: XcmV4; XcmVersion: XcmVersion; } // InterfaceTypes } // declare module diff --git a/typescript-api/src/dancelight/interfaces/lookup.ts b/typescript-api/src/dancelight/interfaces/lookup.ts index 4431ccd35..b8a0173f2 100644 --- a/typescript-api/src/dancelight/interfaces/lookup.ts +++ b/typescript-api/src/dancelight/interfaces/lookup.ts @@ -432,7 +432,28 @@ export default { }, }, }, - /** Lookup54: pallet_session::pallet::Event */ + /** Lookup54: pallet_external_validators::pallet::Event */ + PalletExternalValidatorsEvent: { + _enum: { + WhitelistedValidatorAdded: { + accountId: "AccountId32", + }, + WhitelistedValidatorRemoved: { + accountId: "AccountId32", + }, + NewEra: { + era: "u32", + }, + ForceEra: { + mode: "PalletExternalValidatorsForcing", + }, + }, + }, + /** Lookup55: pallet_external_validators::Forcing */ + PalletExternalValidatorsForcing: { + _enum: ["NotForcing", "ForceNew", "ForceNone", "ForceAlways"], + }, + /** Lookup56: pallet_session::pallet::Event */ PalletSessionEvent: { _enum: { NewSession: { @@ -440,7 +461,7 @@ export default { }, }, }, - /** Lookup55: pallet_grandpa::pallet::Event */ + /** Lookup57: pallet_grandpa::pallet::Event */ PalletGrandpaEvent: { _enum: { NewAuthorities: { @@ -450,9 +471,9 @@ export default { Resumed: "Null", }, }, - /** Lookup58: sp_consensus_grandpa::app::Public */ + /** Lookup60: sp_consensus_grandpa::app::Public */ SpConsensusGrandpaAppPublic: "[u8;32]", - /** Lookup59: pallet_inflation_rewards::pallet::Event */ + /** Lookup61: pallet_inflation_rewards::pallet::Event */ PalletInflationRewardsEvent: { _enum: { RewardedOrchestrator: { @@ -466,7 +487,7 @@ export default { }, }, }, - /** Lookup60: pallet_treasury::pallet::Event */ + /** Lookup62: pallet_treasury::pallet::Event */ PalletTreasuryEvent: { _enum: { Spending: { @@ -519,14 +540,14 @@ export default { }, }, }, - /** Lookup62: pallet_conviction_voting::pallet::Event */ + /** Lookup64: pallet_conviction_voting::pallet::Event */ PalletConvictionVotingEvent: { _enum: { Delegated: "(AccountId32,AccountId32)", Undelegated: "AccountId32", }, }, - /** Lookup63: pallet_referenda::pallet::Event */ + /** Lookup65: pallet_referenda::pallet::Event */ PalletReferendaEvent: { _enum: { Submitted: { @@ -605,7 +626,7 @@ export default { }, }, /** - * Lookup65: frame_support::traits::preimages::Bounded */ FrameSupportPreimagesBounded: { @@ -626,7 +647,7 @@ export default { }, }, }, - /** Lookup67: frame_system::pallet::Call */ + /** Lookup69: frame_system::pallet::Call */ FrameSystemCall: { _enum: { remark: { @@ -669,7 +690,7 @@ export default { }, }, }, - /** Lookup71: pallet_babe::pallet::Call */ + /** Lookup73: pallet_babe::pallet::Call */ PalletBabeCall: { _enum: { report_equivocation: { @@ -686,7 +707,7 @@ export default { }, }, /** - * Lookup72: sp_consensus_slots::EquivocationProof, + * Lookup74: sp_consensus_slots::EquivocationProof, * sp_consensus_babe::app::Public> */ SpConsensusSlotsEquivocationProof: { @@ -695,7 +716,7 @@ export default { firstHeader: "SpRuntimeHeader", secondHeader: "SpRuntimeHeader", }, - /** Lookup73: sp_runtime::generic::header::Header */ + /** Lookup75: sp_runtime::generic::header::Header */ SpRuntimeHeader: { parentHash: "H256", number: "Compact", @@ -703,15 +724,15 @@ export default { extrinsicsRoot: "H256", digest: "SpRuntimeDigest", }, - /** Lookup75: sp_consensus_babe::app::Public */ + /** Lookup77: sp_consensus_babe::app::Public */ SpConsensusBabeAppPublic: "[u8;32]", - /** Lookup76: sp_session::MembershipProof */ + /** Lookup78: sp_session::MembershipProof */ SpSessionMembershipProof: { session: "u32", trieNodes: "Vec", validatorCount: "u32", }, - /** Lookup77: sp_consensus_babe::digests::NextConfigDescriptor */ + /** Lookup79: sp_consensus_babe::digests::NextConfigDescriptor */ SpConsensusBabeDigestsNextConfigDescriptor: { _enum: { __Unused0: "Null", @@ -721,11 +742,11 @@ export default { }, }, }, - /** Lookup79: sp_consensus_babe::AllowedSlots */ + /** Lookup81: sp_consensus_babe::AllowedSlots */ SpConsensusBabeAllowedSlots: { _enum: ["PrimarySlots", "PrimaryAndSecondaryPlainSlots", "PrimaryAndSecondaryVRFSlots"], }, - /** Lookup80: pallet_timestamp::pallet::Call */ + /** Lookup82: pallet_timestamp::pallet::Call */ PalletTimestampCall: { _enum: { set: { @@ -733,7 +754,7 @@ export default { }, }, }, - /** Lookup81: pallet_balances::pallet::Call */ + /** Lookup83: pallet_balances::pallet::Call */ PalletBalancesCall: { _enum: { transfer_allow_death: { @@ -776,11 +797,11 @@ export default { }, }, }, - /** Lookup87: pallet_balances::types::AdjustmentDirection */ + /** Lookup89: pallet_balances::types::AdjustmentDirection */ PalletBalancesAdjustmentDirection: { _enum: ["Increase", "Decrease"], }, - /** Lookup88: pallet_parameters::pallet::Call */ + /** Lookup90: pallet_parameters::pallet::Call */ PalletParametersCall: { _enum: { set_parameter: { @@ -788,20 +809,20 @@ export default { }, }, }, - /** Lookup89: dancelight_runtime::RuntimeParameters */ + /** Lookup91: dancelight_runtime::RuntimeParameters */ DancelightRuntimeRuntimeParameters: { _enum: { Preimage: "DancelightRuntimeDynamicParamsPreimageParameters", }, }, - /** Lookup90: dancelight_runtime::dynamic_params::preimage::Parameters */ + /** Lookup92: dancelight_runtime::dynamic_params::preimage::Parameters */ DancelightRuntimeDynamicParamsPreimageParameters: { _enum: { BaseDeposit: "(DancelightRuntimeDynamicParamsPreimageBaseDeposit,Option)", ByteDeposit: "(DancelightRuntimeDynamicParamsPreimageByteDeposit,Option)", }, }, - /** Lookup91: pallet_registrar::pallet::Call */ + /** Lookup93: pallet_registrar::pallet::Call */ PalletRegistrarCall: { _enum: { register: { @@ -852,7 +873,7 @@ export default { }, }, }, - /** Lookup92: dp_container_chain_genesis_data::ContainerChainGenesisData */ + /** Lookup94: dp_container_chain_genesis_data::ContainerChainGenesisData */ DpContainerChainGenesisDataContainerChainGenesisData: { storage: "Vec", name: "Bytes", @@ -861,36 +882,36 @@ export default { extensions: "Bytes", properties: "DpContainerChainGenesisDataProperties", }, - /** Lookup94: dp_container_chain_genesis_data::ContainerChainGenesisDataItem */ + /** Lookup96: dp_container_chain_genesis_data::ContainerChainGenesisDataItem */ DpContainerChainGenesisDataContainerChainGenesisDataItem: { key: "Bytes", value: "Bytes", }, - /** Lookup96: dp_container_chain_genesis_data::Properties */ + /** Lookup98: dp_container_chain_genesis_data::Properties */ DpContainerChainGenesisDataProperties: { tokenMetadata: "DpContainerChainGenesisDataTokenMetadata", isEthereum: "bool", }, - /** Lookup97: dp_container_chain_genesis_data::TokenMetadata */ + /** Lookup99: dp_container_chain_genesis_data::TokenMetadata */ DpContainerChainGenesisDataTokenMetadata: { tokenSymbol: "Bytes", ss58Format: "u32", tokenDecimals: "u32", }, - /** Lookup101: tp_traits::SlotFrequency */ + /** Lookup103: tp_traits::SlotFrequency */ TpTraitsSlotFrequency: { min: "u32", max: "u32", }, - /** Lookup103: tp_traits::ParathreadParams */ + /** Lookup105: tp_traits::ParathreadParams */ TpTraitsParathreadParams: { slotFrequency: "TpTraitsSlotFrequency", }, - /** Lookup104: sp_trie::storage_proof::StorageProof */ + /** Lookup106: sp_trie::storage_proof::StorageProof */ SpTrieStorageProof: { trieNodes: "BTreeSet", }, - /** Lookup106: sp_runtime::MultiSignature */ + /** Lookup108: sp_runtime::MultiSignature */ SpRuntimeMultiSignature: { _enum: { Ed25519: "[u8;64]", @@ -898,7 +919,7 @@ export default { Ecdsa: "[u8;65]", }, }, - /** Lookup109: pallet_configuration::pallet::Call */ + /** Lookup111: pallet_configuration::pallet::Call */ PalletConfigurationCall: { _enum: { set_max_collators: { @@ -998,7 +1019,7 @@ export default { }, }, }, - /** Lookup112: pallet_invulnerables::pallet::Call */ + /** Lookup114: pallet_invulnerables::pallet::Call */ PalletInvulnerablesCall: { _enum: { __Unused0: "Null", @@ -1010,11 +1031,11 @@ export default { }, }, }, - /** Lookup113: pallet_collator_assignment::pallet::Call */ + /** Lookup115: pallet_collator_assignment::pallet::Call */ PalletCollatorAssignmentCall: "Null", - /** Lookup114: pallet_authority_assignment::pallet::Call */ + /** Lookup116: pallet_authority_assignment::pallet::Call */ PalletAuthorityAssignmentCall: "Null", - /** Lookup115: pallet_author_noting::pallet::Call */ + /** Lookup117: pallet_author_noting::pallet::Call */ PalletAuthorNotingCall: { _enum: { set_latest_author_data: { @@ -1031,7 +1052,7 @@ export default { }, }, }, - /** Lookup116: pallet_services_payment::pallet::Call */ + /** Lookup118: pallet_services_payment::pallet::Call */ PalletServicesPaymentCall: { _enum: { purchase_credits: { @@ -1064,7 +1085,7 @@ export default { }, }, }, - /** Lookup117: pallet_data_preservers::pallet::Call */ + /** Lookup119: pallet_data_preservers::pallet::Call */ PalletDataPreserversCall: { _enum: { __Unused0: "Null", @@ -1105,14 +1126,14 @@ export default { }, }, }, - /** Lookup118: pallet_data_preservers::types::Profile */ + /** Lookup120: pallet_data_preservers::types::Profile */ PalletDataPreserversProfile: { url: "Bytes", paraIds: "PalletDataPreserversParaIdsFilter", mode: "PalletDataPreserversProfileMode", assignmentRequest: "DancelightRuntimePreserversAssignmentPaymentRequest", }, - /** Lookup120: pallet_data_preservers::types::ParaIdsFilter */ + /** Lookup122: pallet_data_preservers::types::ParaIdsFilter */ PalletDataPreserversParaIdsFilter: { _enum: { AnyParaId: "Null", @@ -1120,7 +1141,7 @@ export default { Blacklist: "BTreeSet", }, }, - /** Lookup124: pallet_data_preservers::types::ProfileMode */ + /** Lookup126: pallet_data_preservers::types::ProfileMode */ PalletDataPreserversProfileMode: { _enum: { Bootnode: "Null", @@ -1129,19 +1150,36 @@ export default { }, }, }, - /** Lookup125: dancelight_runtime::PreserversAssignmentPaymentRequest */ + /** Lookup127: dancelight_runtime::PreserversAssignmentPaymentRequest */ DancelightRuntimePreserversAssignmentPaymentRequest: { _enum: ["Free"], }, - /** Lookup126: dancelight_runtime::PreserversAssignmentPaymentExtra */ + /** Lookup128: dancelight_runtime::PreserversAssignmentPaymentExtra */ DancelightRuntimePreserversAssignmentPaymentExtra: { _enum: ["Free"], }, - /** Lookup127: dancelight_runtime::PreserversAssignmentPaymentWitness */ + /** Lookup129: dancelight_runtime::PreserversAssignmentPaymentWitness */ DancelightRuntimePreserversAssignmentPaymentWitness: { _enum: ["Free"], }, - /** Lookup128: pallet_session::pallet::Call */ + /** Lookup130: pallet_external_validators::pallet::Call */ + PalletExternalValidatorsCall: { + _enum: { + skip_external_validators: { + skip: "bool", + }, + add_whitelisted: { + who: "AccountId32", + }, + remove_whitelisted: { + who: "AccountId32", + }, + force_no_eras: "Null", + force_new_era: "Null", + force_new_era_always: "Null", + }, + }, + /** Lookup131: pallet_session::pallet::Call */ PalletSessionCall: { _enum: { set_keys: { @@ -1154,7 +1192,7 @@ export default { purge_keys: "Null", }, }, - /** Lookup129: dancelight_runtime::SessionKeys */ + /** Lookup132: dancelight_runtime::SessionKeys */ DancelightRuntimeSessionKeys: { grandpa: "SpConsensusGrandpaAppPublic", babe: "SpConsensusBabeAppPublic", @@ -1164,17 +1202,17 @@ export default { beefy: "SpConsensusBeefyEcdsaCryptoPublic", nimbus: "NimbusPrimitivesNimbusCryptoPublic", }, - /** Lookup130: polkadot_primitives::v7::validator_app::Public */ + /** Lookup133: polkadot_primitives::v7::validator_app::Public */ PolkadotPrimitivesV7ValidatorAppPublic: "[u8;32]", - /** Lookup131: polkadot_primitives::v7::assignment_app::Public */ + /** Lookup134: polkadot_primitives::v7::assignment_app::Public */ PolkadotPrimitivesV7AssignmentAppPublic: "[u8;32]", - /** Lookup132: sp_authority_discovery::app::Public */ + /** Lookup135: sp_authority_discovery::app::Public */ SpAuthorityDiscoveryAppPublic: "[u8;32]", - /** Lookup133: sp_consensus_beefy::ecdsa_crypto::Public */ + /** Lookup136: sp_consensus_beefy::ecdsa_crypto::Public */ SpConsensusBeefyEcdsaCryptoPublic: "[u8;33]", - /** Lookup135: nimbus_primitives::nimbus_crypto::Public */ + /** Lookup138: nimbus_primitives::nimbus_crypto::Public */ NimbusPrimitivesNimbusCryptoPublic: "[u8;32]", - /** Lookup136: pallet_grandpa::pallet::Call */ + /** Lookup139: pallet_grandpa::pallet::Call */ PalletGrandpaCall: { _enum: { report_equivocation: { @@ -1191,12 +1229,12 @@ export default { }, }, }, - /** Lookup137: sp_consensus_grandpa::EquivocationProof */ + /** Lookup140: sp_consensus_grandpa::EquivocationProof */ SpConsensusGrandpaEquivocationProof: { setId: "u64", equivocation: "SpConsensusGrandpaEquivocation", }, - /** Lookup138: sp_consensus_grandpa::Equivocation */ + /** Lookup141: sp_consensus_grandpa::Equivocation */ SpConsensusGrandpaEquivocation: { _enum: { Prevote: "FinalityGrandpaEquivocationPrevote", @@ -1204,7 +1242,7 @@ export default { }, }, /** - * Lookup139: finality_grandpa::Equivocation, sp_consensus_grandpa::app::Signature> */ FinalityGrandpaEquivocationPrevote: { @@ -1213,15 +1251,15 @@ export default { first: "(FinalityGrandpaPrevote,SpConsensusGrandpaAppSignature)", second: "(FinalityGrandpaPrevote,SpConsensusGrandpaAppSignature)", }, - /** Lookup140: finality_grandpa::Prevote */ + /** Lookup143: finality_grandpa::Prevote */ FinalityGrandpaPrevote: { targetHash: "H256", targetNumber: "u32", }, - /** Lookup141: sp_consensus_grandpa::app::Signature */ + /** Lookup144: sp_consensus_grandpa::app::Signature */ SpConsensusGrandpaAppSignature: "[u8;64]", /** - * Lookup143: finality_grandpa::Equivocation, sp_consensus_grandpa::app::Signature> */ FinalityGrandpaEquivocationPrecommit: { @@ -1230,12 +1268,12 @@ export default { first: "(FinalityGrandpaPrecommit,SpConsensusGrandpaAppSignature)", second: "(FinalityGrandpaPrecommit,SpConsensusGrandpaAppSignature)", }, - /** Lookup144: finality_grandpa::Precommit */ + /** Lookup147: finality_grandpa::Precommit */ FinalityGrandpaPrecommit: { targetHash: "H256", targetNumber: "u32", }, - /** Lookup146: pallet_treasury::pallet::Call */ + /** Lookup149: pallet_treasury::pallet::Call */ PalletTreasuryCall: { _enum: { __Unused0: "Null", @@ -1265,7 +1303,7 @@ export default { }, }, }, - /** Lookup148: pallet_conviction_voting::pallet::Call */ + /** Lookup151: pallet_conviction_voting::pallet::Call */ PalletConvictionVotingCall: { _enum: { vote: { @@ -1296,7 +1334,7 @@ export default { }, }, }, - /** Lookup149: pallet_conviction_voting::vote::AccountVote */ + /** Lookup152: pallet_conviction_voting::vote::AccountVote */ PalletConvictionVotingVoteAccountVote: { _enum: { Standard: { @@ -1314,11 +1352,11 @@ export default { }, }, }, - /** Lookup151: pallet_conviction_voting::conviction::Conviction */ + /** Lookup154: pallet_conviction_voting::conviction::Conviction */ PalletConvictionVotingConviction: { _enum: ["None", "Locked1x", "Locked2x", "Locked3x", "Locked4x", "Locked5x", "Locked6x"], }, - /** Lookup153: pallet_referenda::pallet::Call */ + /** Lookup156: pallet_referenda::pallet::Call */ PalletReferendaCall: { _enum: { submit: { @@ -1353,7 +1391,7 @@ export default { }, }, }, - /** Lookup154: dancelight_runtime::OriginCaller */ + /** Lookup157: dancelight_runtime::OriginCaller */ DancelightRuntimeOriginCaller: { _enum: { system: "FrameSupportDispatchRawOrigin", @@ -1449,7 +1487,7 @@ export default { XcmPallet: "PalletXcmOrigin", }, }, - /** Lookup155: frame_support::dispatch::RawOrigin */ + /** Lookup158: frame_support::dispatch::RawOrigin */ FrameSupportDispatchRawOrigin: { _enum: { Root: "Null", @@ -1457,7 +1495,7 @@ export default { None: "Null", }, }, - /** Lookup156: dancelight_runtime::governance::origins::pallet_custom_origins::Origin */ + /** Lookup159: dancelight_runtime::governance::origins::pallet_custom_origins::Origin */ DancelightRuntimeGovernanceOriginsPalletCustomOriginsOrigin: { _enum: [ "StakingAdmin", @@ -1489,39 +1527,39 @@ export default { "Fellowship9Dan", ], }, - /** Lookup157: polkadot_runtime_parachains::origin::pallet::Origin */ + /** Lookup160: polkadot_runtime_parachains::origin::pallet::Origin */ PolkadotRuntimeParachainsOriginPalletOrigin: { _enum: { Parachain: "u32", }, }, - /** Lookup158: pallet_xcm::pallet::Origin */ + /** Lookup161: pallet_xcm::pallet::Origin */ PalletXcmOrigin: { _enum: { Xcm: "StagingXcmV4Location", Response: "StagingXcmV4Location", }, }, - /** Lookup159: staging_xcm::v4::location::Location */ + /** Lookup162: staging_xcm::v4::location::Location */ StagingXcmV4Location: { parents: "u8", interior: "StagingXcmV4Junctions", }, - /** Lookup160: staging_xcm::v4::junctions::Junctions */ + /** Lookup163: staging_xcm::v4::junctions::Junctions */ StagingXcmV4Junctions: { _enum: { Here: "Null", - X1: "[Lookup162;1]", - X2: "[Lookup162;2]", - X3: "[Lookup162;3]", - X4: "[Lookup162;4]", - X5: "[Lookup162;5]", - X6: "[Lookup162;6]", - X7: "[Lookup162;7]", - X8: "[Lookup162;8]", + X1: "[Lookup165;1]", + X2: "[Lookup165;2]", + X3: "[Lookup165;3]", + X4: "[Lookup165;4]", + X5: "[Lookup165;5]", + X6: "[Lookup165;6]", + X7: "[Lookup165;7]", + X8: "[Lookup165;8]", }, }, - /** Lookup162: staging_xcm::v4::junction::Junction */ + /** Lookup165: staging_xcm::v4::junction::Junction */ StagingXcmV4Junction: { _enum: { Parachain: "Compact", @@ -1551,7 +1589,7 @@ export default { GlobalConsensus: "StagingXcmV4JunctionNetworkId", }, }, - /** Lookup164: staging_xcm::v4::junction::NetworkId */ + /** Lookup167: staging_xcm::v4::junction::NetworkId */ StagingXcmV4JunctionNetworkId: { _enum: { ByGenesis: "[u8;32]", @@ -1572,7 +1610,7 @@ export default { PolkadotBulletin: "Null", }, }, - /** Lookup165: xcm::v3::junction::BodyId */ + /** Lookup168: xcm::v3::junction::BodyId */ XcmV3JunctionBodyId: { _enum: { Unit: "Null", @@ -1587,7 +1625,7 @@ export default { Treasury: "Null", }, }, - /** Lookup166: xcm::v3::junction::BodyPart */ + /** Lookup169: xcm::v3::junction::BodyPart */ XcmV3JunctionBodyPart: { _enum: { Voice: "Null", @@ -1608,16 +1646,16 @@ export default { }, }, }, - /** Lookup174: sp_core::Void */ + /** Lookup177: sp_core::Void */ SpCoreVoid: "Null", - /** Lookup175: frame_support::traits::schedule::DispatchTime */ + /** Lookup178: frame_support::traits::schedule::DispatchTime */ FrameSupportScheduleDispatchTime: { _enum: { At: "u32", After: "u32", }, }, - /** Lookup177: pallet_ranked_collective::pallet::Call */ + /** Lookup180: pallet_ranked_collective::pallet::Call */ PalletRankedCollectiveCall: { _enum: { add_member: { @@ -1647,7 +1685,7 @@ export default { }, }, }, - /** Lookup179: pallet_whitelist::pallet::Call */ + /** Lookup182: pallet_whitelist::pallet::Call */ PalletWhitelistCall: { _enum: { whitelist_call: { @@ -1666,7 +1704,7 @@ export default { }, }, }, - /** Lookup180: polkadot_runtime_parachains::configuration::pallet::Call */ + /** Lookup183: polkadot_runtime_parachains::configuration::pallet::Call */ PolkadotRuntimeParachainsConfigurationPalletCall: { _enum: { set_validation_upgrade_cooldown: { @@ -1965,14 +2003,14 @@ export default { }, }, }, - /** Lookup181: polkadot_primitives::v7::async_backing::AsyncBackingParams */ + /** Lookup184: polkadot_primitives::v7::async_backing::AsyncBackingParams */ PolkadotPrimitivesV7AsyncBackingAsyncBackingParams: { maxCandidateDepth: "u32", allowedAncestryLen: "u32", }, - /** Lookup182: polkadot_primitives::v7::executor_params::ExecutorParams */ + /** Lookup185: polkadot_primitives::v7::executor_params::ExecutorParams */ PolkadotPrimitivesV7ExecutorParams: "Vec", - /** Lookup184: polkadot_primitives::v7::executor_params::ExecutorParam */ + /** Lookup187: polkadot_primitives::v7::executor_params::ExecutorParam */ PolkadotPrimitivesV7ExecutorParamsExecutorParam: { _enum: { __Unused0: "Null", @@ -1985,19 +2023,19 @@ export default { WasmExtBulkMemory: "Null", }, }, - /** Lookup185: polkadot_primitives::v7::PvfPrepKind */ + /** Lookup188: polkadot_primitives::v7::PvfPrepKind */ PolkadotPrimitivesV7PvfPrepKind: { _enum: ["Precheck", "Prepare"], }, - /** Lookup186: polkadot_primitives::v7::PvfExecKind */ + /** Lookup189: polkadot_primitives::v7::PvfExecKind */ PolkadotPrimitivesV7PvfExecKind: { _enum: ["Backing", "Approval"], }, - /** Lookup187: polkadot_primitives::v7::ApprovalVotingParams */ + /** Lookup190: polkadot_primitives::v7::ApprovalVotingParams */ PolkadotPrimitivesV7ApprovalVotingParams: { maxApprovalCoalesceCount: "u32", }, - /** Lookup188: polkadot_primitives::vstaging::SchedulerParams */ + /** Lookup191: polkadot_primitives::vstaging::SchedulerParams */ PolkadotPrimitivesVstagingSchedulerParams: { groupRotationFrequency: "u32", parasAvailabilityPeriod: "u32", @@ -2011,11 +2049,11 @@ export default { onDemandBaseFee: "u128", ttl: "u32", }, - /** Lookup189: polkadot_runtime_parachains::shared::pallet::Call */ + /** Lookup192: polkadot_runtime_parachains::shared::pallet::Call */ PolkadotRuntimeParachainsSharedPalletCall: "Null", - /** Lookup190: polkadot_runtime_parachains::inclusion::pallet::Call */ + /** Lookup193: polkadot_runtime_parachains::inclusion::pallet::Call */ PolkadotRuntimeParachainsInclusionPalletCall: "Null", - /** Lookup191: polkadot_runtime_parachains::paras_inherent::pallet::Call */ + /** Lookup194: polkadot_runtime_parachains::paras_inherent::pallet::Call */ PolkadotRuntimeParachainsParasInherentPalletCall: { _enum: { enter: { @@ -2023,7 +2061,7 @@ export default { }, }, }, - /** Lookup192: polkadot_primitives::v7::InherentData> */ + /** Lookup195: polkadot_primitives::v7::InherentData> */ PolkadotPrimitivesV7InherentData: { bitfields: "Vec", backedCandidates: "Vec", @@ -2031,7 +2069,7 @@ export default { parentHeader: "SpRuntimeHeader", }, /** - * Lookup194: polkadot_primitives::v7::signed::UncheckedSigned */ PolkadotPrimitivesV7SignedUncheckedSigned: { @@ -2039,22 +2077,22 @@ export default { validatorIndex: "u32", signature: "PolkadotPrimitivesV7ValidatorAppSignature", }, - /** Lookup197: bitvec::order::Lsb0 */ + /** Lookup200: bitvec::order::Lsb0 */ BitvecOrderLsb0: "Null", - /** Lookup199: polkadot_primitives::v7::validator_app::Signature */ + /** Lookup202: polkadot_primitives::v7::validator_app::Signature */ PolkadotPrimitivesV7ValidatorAppSignature: "[u8;64]", - /** Lookup201: polkadot_primitives::v7::BackedCandidate */ + /** Lookup204: polkadot_primitives::v7::BackedCandidate */ PolkadotPrimitivesV7BackedCandidate: { candidate: "PolkadotPrimitivesV7CommittedCandidateReceipt", validityVotes: "Vec", validatorIndices: "BitVec", }, - /** Lookup202: polkadot_primitives::v7::CommittedCandidateReceipt */ + /** Lookup205: polkadot_primitives::v7::CommittedCandidateReceipt */ PolkadotPrimitivesV7CommittedCandidateReceipt: { descriptor: "PolkadotPrimitivesV7CandidateDescriptor", commitments: "PolkadotPrimitivesV7CandidateCommitments", }, - /** Lookup203: polkadot_primitives::v7::CandidateDescriptor */ + /** Lookup206: polkadot_primitives::v7::CandidateDescriptor */ PolkadotPrimitivesV7CandidateDescriptor: { paraId: "u32", relayParent: "H256", @@ -2066,11 +2104,11 @@ export default { paraHead: "H256", validationCodeHash: "H256", }, - /** Lookup204: polkadot_primitives::v7::collator_app::Public */ + /** Lookup207: polkadot_primitives::v7::collator_app::Public */ PolkadotPrimitivesV7CollatorAppPublic: "[u8;32]", - /** Lookup205: polkadot_primitives::v7::collator_app::Signature */ + /** Lookup208: polkadot_primitives::v7::collator_app::Signature */ PolkadotPrimitivesV7CollatorAppSignature: "[u8;64]", - /** Lookup207: polkadot_primitives::v7::CandidateCommitments */ + /** Lookup210: polkadot_primitives::v7::CandidateCommitments */ PolkadotPrimitivesV7CandidateCommitments: { upwardMessages: "Vec", horizontalMessages: "Vec", @@ -2079,12 +2117,12 @@ export default { processedDownwardMessages: "u32", hrmpWatermark: "u32", }, - /** Lookup210: polkadot_core_primitives::OutboundHrmpMessage */ + /** Lookup213: polkadot_core_primitives::OutboundHrmpMessage */ PolkadotCorePrimitivesOutboundHrmpMessage: { recipient: "u32", data: "Bytes", }, - /** Lookup215: polkadot_primitives::v7::ValidityAttestation */ + /** Lookup218: polkadot_primitives::v7::ValidityAttestation */ PolkadotPrimitivesV7ValidityAttestation: { _enum: { __Unused0: "Null", @@ -2092,20 +2130,20 @@ export default { Explicit: "PolkadotPrimitivesV7ValidatorAppSignature", }, }, - /** Lookup217: polkadot_primitives::v7::DisputeStatementSet */ + /** Lookup220: polkadot_primitives::v7::DisputeStatementSet */ PolkadotPrimitivesV7DisputeStatementSet: { candidateHash: "H256", session: "u32", statements: "Vec<(PolkadotPrimitivesV7DisputeStatement,u32,PolkadotPrimitivesV7ValidatorAppSignature)>", }, - /** Lookup221: polkadot_primitives::v7::DisputeStatement */ + /** Lookup224: polkadot_primitives::v7::DisputeStatement */ PolkadotPrimitivesV7DisputeStatement: { _enum: { Valid: "PolkadotPrimitivesV7ValidDisputeStatementKind", Invalid: "PolkadotPrimitivesV7InvalidDisputeStatementKind", }, }, - /** Lookup222: polkadot_primitives::v7::ValidDisputeStatementKind */ + /** Lookup225: polkadot_primitives::v7::ValidDisputeStatementKind */ PolkadotPrimitivesV7ValidDisputeStatementKind: { _enum: { Explicit: "Null", @@ -2115,11 +2153,11 @@ export default { ApprovalCheckingMultipleCandidates: "Vec", }, }, - /** Lookup224: polkadot_primitives::v7::InvalidDisputeStatementKind */ + /** Lookup227: polkadot_primitives::v7::InvalidDisputeStatementKind */ PolkadotPrimitivesV7InvalidDisputeStatementKind: { _enum: ["Explicit"], }, - /** Lookup225: polkadot_runtime_parachains::paras::pallet::Call */ + /** Lookup228: polkadot_runtime_parachains::paras::pallet::Call */ PolkadotRuntimeParachainsParasPalletCall: { _enum: { force_set_current_code: { @@ -2158,14 +2196,14 @@ export default { }, }, }, - /** Lookup226: polkadot_primitives::v7::PvfCheckStatement */ + /** Lookup229: polkadot_primitives::v7::PvfCheckStatement */ PolkadotPrimitivesV7PvfCheckStatement: { accept: "bool", subject: "H256", sessionIndex: "u32", validatorIndex: "u32", }, - /** Lookup227: polkadot_runtime_parachains::initializer::pallet::Call */ + /** Lookup230: polkadot_runtime_parachains::initializer::pallet::Call */ PolkadotRuntimeParachainsInitializerPalletCall: { _enum: { force_approve: { @@ -2173,7 +2211,7 @@ export default { }, }, }, - /** Lookup228: polkadot_runtime_parachains::hrmp::pallet::Call */ + /** Lookup231: polkadot_runtime_parachains::hrmp::pallet::Call */ PolkadotRuntimeParachainsHrmpPalletCall: { _enum: { hrmp_init_open_channel: { @@ -2221,16 +2259,16 @@ export default { }, }, }, - /** Lookup229: polkadot_parachain_primitives::primitives::HrmpChannelId */ + /** Lookup232: polkadot_parachain_primitives::primitives::HrmpChannelId */ PolkadotParachainPrimitivesPrimitivesHrmpChannelId: { sender: "u32", recipient: "u32", }, - /** Lookup230: polkadot_runtime_parachains::disputes::pallet::Call */ + /** Lookup233: polkadot_runtime_parachains::disputes::pallet::Call */ PolkadotRuntimeParachainsDisputesPalletCall: { _enum: ["force_unfreeze"], }, - /** Lookup231: polkadot_runtime_parachains::disputes::slashing::pallet::Call */ + /** Lookup234: polkadot_runtime_parachains::disputes::slashing::pallet::Call */ PolkadotRuntimeParachainsDisputesSlashingPalletCall: { _enum: { report_dispute_lost_unsigned: { @@ -2239,23 +2277,23 @@ export default { }, }, }, - /** Lookup232: polkadot_primitives::v7::slashing::DisputeProof */ + /** Lookup235: polkadot_primitives::v7::slashing::DisputeProof */ PolkadotPrimitivesV7SlashingDisputeProof: { timeSlot: "PolkadotPrimitivesV7SlashingDisputesTimeSlot", kind: "PolkadotPrimitivesV7SlashingSlashingOffenceKind", validatorIndex: "u32", validatorId: "PolkadotPrimitivesV7ValidatorAppPublic", }, - /** Lookup233: polkadot_primitives::v7::slashing::DisputesTimeSlot */ + /** Lookup236: polkadot_primitives::v7::slashing::DisputesTimeSlot */ PolkadotPrimitivesV7SlashingDisputesTimeSlot: { sessionIndex: "u32", candidateHash: "H256", }, - /** Lookup234: polkadot_primitives::v7::slashing::SlashingOffenceKind */ + /** Lookup237: polkadot_primitives::v7::slashing::SlashingOffenceKind */ PolkadotPrimitivesV7SlashingSlashingOffenceKind: { _enum: ["ForInvalid", "AgainstValid"], }, - /** Lookup235: pallet_message_queue::pallet::Call */ + /** Lookup238: pallet_message_queue::pallet::Call */ PalletMessageQueueCall: { _enum: { reap_page: { @@ -2270,19 +2308,19 @@ export default { }, }, }, - /** Lookup236: polkadot_runtime_parachains::inclusion::AggregateMessageOrigin */ + /** Lookup239: polkadot_runtime_parachains::inclusion::AggregateMessageOrigin */ PolkadotRuntimeParachainsInclusionAggregateMessageOrigin: { _enum: { Ump: "PolkadotRuntimeParachainsInclusionUmpQueueId", }, }, - /** Lookup237: polkadot_runtime_parachains::inclusion::UmpQueueId */ + /** Lookup240: polkadot_runtime_parachains::inclusion::UmpQueueId */ PolkadotRuntimeParachainsInclusionUmpQueueId: { _enum: { Para: "u32", }, }, - /** Lookup238: polkadot_runtime_parachains::assigner_on_demand::pallet::Call */ + /** Lookup241: polkadot_runtime_parachains::assigner_on_demand::pallet::Call */ PolkadotRuntimeParachainsAssignerOnDemandPalletCall: { _enum: { place_order_allow_death: { @@ -2295,7 +2333,7 @@ export default { }, }, }, - /** Lookup239: polkadot_runtime_common::paras_registrar::pallet::Call */ + /** Lookup242: polkadot_runtime_common::paras_registrar::pallet::Call */ PolkadotRuntimeCommonParasRegistrarPalletCall: { _enum: { register: { @@ -2334,7 +2372,7 @@ export default { }, }, }, - /** Lookup240: pallet_utility::pallet::Call */ + /** Lookup243: pallet_utility::pallet::Call */ PalletUtilityCall: { _enum: { batch: { @@ -2360,7 +2398,7 @@ export default { }, }, }, - /** Lookup242: pallet_identity::pallet::Call */ + /** Lookup245: pallet_identity::pallet::Call */ PalletIdentityCall: { _enum: { add_registrar: { @@ -2443,7 +2481,7 @@ export default { }, }, }, - /** Lookup243: pallet_identity::legacy::IdentityInfo */ + /** Lookup246: pallet_identity::legacy::IdentityInfo */ PalletIdentityLegacyIdentityInfo: { additional: "Vec<(Data,Data)>", display: "Data", @@ -2455,7 +2493,7 @@ export default { image: "Data", twitter: "Data", }, - /** Lookup280: pallet_identity::types::Judgement */ + /** Lookup283: pallet_identity::types::Judgement */ PalletIdentityJudgement: { _enum: { Unknown: "Null", @@ -2467,7 +2505,7 @@ export default { Erroneous: "Null", }, }, - /** Lookup283: pallet_scheduler::pallet::Call */ + /** Lookup286: pallet_scheduler::pallet::Call */ PalletSchedulerCall: { _enum: { schedule: { @@ -2521,7 +2559,7 @@ export default { }, }, }, - /** Lookup286: pallet_proxy::pallet::Call */ + /** Lookup289: pallet_proxy::pallet::Call */ PalletProxyCall: { _enum: { proxy: { @@ -2572,11 +2610,11 @@ export default { }, }, }, - /** Lookup288: dancelight_runtime::ProxyType */ + /** Lookup291: dancelight_runtime::ProxyType */ DancelightRuntimeProxyType: { _enum: ["Any", "NonTransfer", "Governance", "IdentityJudgement", "CancelProxy", "Auction", "OnDemandOrdering"], }, - /** Lookup289: pallet_multisig::pallet::Call */ + /** Lookup292: pallet_multisig::pallet::Call */ PalletMultisigCall: { _enum: { as_multi_threshold_1: { @@ -2605,12 +2643,12 @@ export default { }, }, }, - /** Lookup291: pallet_multisig::Timepoint */ + /** Lookup294: pallet_multisig::Timepoint */ PalletMultisigTimepoint: { height: "u32", index: "u32", }, - /** Lookup292: pallet_preimage::pallet::Call */ + /** Lookup295: pallet_preimage::pallet::Call */ PalletPreimageCall: { _enum: { note_preimage: { @@ -2639,7 +2677,7 @@ export default { }, }, }, - /** Lookup294: pallet_asset_rate::pallet::Call */ + /** Lookup297: pallet_asset_rate::pallet::Call */ PalletAssetRateCall: { _enum: { create: { @@ -2655,7 +2693,7 @@ export default { }, }, }, - /** Lookup296: pallet_xcm::pallet::Call */ + /** Lookup299: pallet_xcm::pallet::Call */ PalletXcmCall: { _enum: { send: { @@ -2730,7 +2768,7 @@ export default { }, }, }, - /** Lookup297: xcm::VersionedLocation */ + /** Lookup300: xcm::VersionedLocation */ XcmVersionedLocation: { _enum: { __Unused0: "Null", @@ -2740,12 +2778,12 @@ export default { V4: "StagingXcmV4Location", }, }, - /** Lookup298: xcm::v2::multilocation::MultiLocation */ + /** Lookup301: xcm::v2::multilocation::MultiLocation */ XcmV2MultiLocation: { parents: "u8", interior: "XcmV2MultilocationJunctions", }, - /** Lookup299: xcm::v2::multilocation::Junctions */ + /** Lookup302: xcm::v2::multilocation::Junctions */ XcmV2MultilocationJunctions: { _enum: { Here: "Null", @@ -2759,7 +2797,7 @@ export default { X8: "(XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction)", }, }, - /** Lookup300: xcm::v2::junction::Junction */ + /** Lookup303: xcm::v2::junction::Junction */ XcmV2Junction: { _enum: { Parachain: "Compact", @@ -2785,7 +2823,7 @@ export default { }, }, }, - /** Lookup301: xcm::v2::NetworkId */ + /** Lookup304: xcm::v2::NetworkId */ XcmV2NetworkId: { _enum: { Any: "Null", @@ -2794,7 +2832,7 @@ export default { Kusama: "Null", }, }, - /** Lookup303: xcm::v2::BodyId */ + /** Lookup306: xcm::v2::BodyId */ XcmV2BodyId: { _enum: { Unit: "Null", @@ -2809,7 +2847,7 @@ export default { Treasury: "Null", }, }, - /** Lookup304: xcm::v2::BodyPart */ + /** Lookup307: xcm::v2::BodyPart */ XcmV2BodyPart: { _enum: { Voice: "Null", @@ -2830,12 +2868,12 @@ export default { }, }, }, - /** Lookup305: staging_xcm::v3::multilocation::MultiLocation */ + /** Lookup308: staging_xcm::v3::multilocation::MultiLocation */ StagingXcmV3MultiLocation: { parents: "u8", interior: "XcmV3Junctions", }, - /** Lookup306: xcm::v3::junctions::Junctions */ + /** Lookup309: xcm::v3::junctions::Junctions */ XcmV3Junctions: { _enum: { Here: "Null", @@ -2849,7 +2887,7 @@ export default { X8: "(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)", }, }, - /** Lookup307: xcm::v3::junction::Junction */ + /** Lookup310: xcm::v3::junction::Junction */ XcmV3Junction: { _enum: { Parachain: "Compact", @@ -2879,7 +2917,7 @@ export default { GlobalConsensus: "XcmV3JunctionNetworkId", }, }, - /** Lookup309: xcm::v3::junction::NetworkId */ + /** Lookup312: xcm::v3::junction::NetworkId */ XcmV3JunctionNetworkId: { _enum: { ByGenesis: "[u8;32]", @@ -2900,7 +2938,7 @@ export default { PolkadotBulletin: "Null", }, }, - /** Lookup310: xcm::VersionedXcm */ + /** Lookup313: xcm::VersionedXcm */ XcmVersionedXcm: { _enum: { __Unused0: "Null", @@ -2910,9 +2948,9 @@ export default { V4: "StagingXcmV4Xcm", }, }, - /** Lookup311: xcm::v2::Xcm */ + /** Lookup314: xcm::v2::Xcm */ XcmV2Xcm: "Vec", - /** Lookup313: xcm::v2::Instruction */ + /** Lookup316: xcm::v2::Instruction */ XcmV2Instruction: { _enum: { WithdrawAsset: "XcmV2MultiassetMultiAssets", @@ -3008,28 +3046,28 @@ export default { UnsubscribeVersion: "Null", }, }, - /** Lookup314: xcm::v2::multiasset::MultiAssets */ + /** Lookup317: xcm::v2::multiasset::MultiAssets */ XcmV2MultiassetMultiAssets: "Vec", - /** Lookup316: xcm::v2::multiasset::MultiAsset */ + /** Lookup319: xcm::v2::multiasset::MultiAsset */ XcmV2MultiAsset: { id: "XcmV2MultiassetAssetId", fun: "XcmV2MultiassetFungibility", }, - /** Lookup317: xcm::v2::multiasset::AssetId */ + /** Lookup320: xcm::v2::multiasset::AssetId */ XcmV2MultiassetAssetId: { _enum: { Concrete: "XcmV2MultiLocation", Abstract: "Bytes", }, }, - /** Lookup318: xcm::v2::multiasset::Fungibility */ + /** Lookup321: xcm::v2::multiasset::Fungibility */ XcmV2MultiassetFungibility: { _enum: { Fungible: "Compact", NonFungible: "XcmV2MultiassetAssetInstance", }, }, - /** Lookup319: xcm::v2::multiasset::AssetInstance */ + /** Lookup322: xcm::v2::multiasset::AssetInstance */ XcmV2MultiassetAssetInstance: { _enum: { Undefined: "Null", @@ -3041,7 +3079,7 @@ export default { Blob: "Bytes", }, }, - /** Lookup320: xcm::v2::Response */ + /** Lookup323: xcm::v2::Response */ XcmV2Response: { _enum: { Null: "Null", @@ -3050,7 +3088,7 @@ export default { Version: "u32", }, }, - /** Lookup323: xcm::v2::traits::Error */ + /** Lookup326: xcm::v2::traits::Error */ XcmV2TraitsError: { _enum: { Overflow: "Null", @@ -3081,22 +3119,22 @@ export default { WeightNotComputable: "Null", }, }, - /** Lookup324: xcm::v2::OriginKind */ + /** Lookup327: xcm::v2::OriginKind */ XcmV2OriginKind: { _enum: ["Native", "SovereignAccount", "Superuser", "Xcm"], }, - /** Lookup325: xcm::double_encoded::DoubleEncoded */ + /** Lookup328: xcm::double_encoded::DoubleEncoded */ XcmDoubleEncoded: { encoded: "Bytes", }, - /** Lookup326: xcm::v2::multiasset::MultiAssetFilter */ + /** Lookup329: xcm::v2::multiasset::MultiAssetFilter */ XcmV2MultiassetMultiAssetFilter: { _enum: { Definite: "XcmV2MultiassetMultiAssets", Wild: "XcmV2MultiassetWildMultiAsset", }, }, - /** Lookup327: xcm::v2::multiasset::WildMultiAsset */ + /** Lookup330: xcm::v2::multiasset::WildMultiAsset */ XcmV2MultiassetWildMultiAsset: { _enum: { All: "Null", @@ -3106,20 +3144,20 @@ export default { }, }, }, - /** Lookup328: xcm::v2::multiasset::WildFungibility */ + /** Lookup331: xcm::v2::multiasset::WildFungibility */ XcmV2MultiassetWildFungibility: { _enum: ["Fungible", "NonFungible"], }, - /** Lookup329: xcm::v2::WeightLimit */ + /** Lookup332: xcm::v2::WeightLimit */ XcmV2WeightLimit: { _enum: { Unlimited: "Null", Limited: "Compact", }, }, - /** Lookup330: xcm::v3::Xcm */ + /** Lookup333: xcm::v3::Xcm */ XcmV3Xcm: "Vec", - /** Lookup332: xcm::v3::Instruction */ + /** Lookup335: xcm::v3::Instruction */ XcmV3Instruction: { _enum: { WithdrawAsset: "XcmV3MultiassetMultiAssets", @@ -3259,28 +3297,28 @@ export default { }, }, }, - /** Lookup333: xcm::v3::multiasset::MultiAssets */ + /** Lookup336: xcm::v3::multiasset::MultiAssets */ XcmV3MultiassetMultiAssets: "Vec", - /** Lookup335: xcm::v3::multiasset::MultiAsset */ + /** Lookup338: xcm::v3::multiasset::MultiAsset */ XcmV3MultiAsset: { id: "XcmV3MultiassetAssetId", fun: "XcmV3MultiassetFungibility", }, - /** Lookup336: xcm::v3::multiasset::AssetId */ + /** Lookup339: xcm::v3::multiasset::AssetId */ XcmV3MultiassetAssetId: { _enum: { Concrete: "StagingXcmV3MultiLocation", Abstract: "[u8;32]", }, }, - /** Lookup337: xcm::v3::multiasset::Fungibility */ + /** Lookup340: xcm::v3::multiasset::Fungibility */ XcmV3MultiassetFungibility: { _enum: { Fungible: "Compact", NonFungible: "XcmV3MultiassetAssetInstance", }, }, - /** Lookup338: xcm::v3::multiasset::AssetInstance */ + /** Lookup341: xcm::v3::multiasset::AssetInstance */ XcmV3MultiassetAssetInstance: { _enum: { Undefined: "Null", @@ -3291,7 +3329,7 @@ export default { Array32: "[u8;32]", }, }, - /** Lookup339: xcm::v3::Response */ + /** Lookup342: xcm::v3::Response */ XcmV3Response: { _enum: { Null: "Null", @@ -3302,7 +3340,7 @@ export default { DispatchResult: "XcmV3MaybeErrorCode", }, }, - /** Lookup342: xcm::v3::traits::Error */ + /** Lookup345: xcm::v3::traits::Error */ XcmV3TraitsError: { _enum: { Overflow: "Null", @@ -3347,7 +3385,7 @@ export default { ExceedsStackLimit: "Null", }, }, - /** Lookup344: xcm::v3::PalletInfo */ + /** Lookup347: xcm::v3::PalletInfo */ XcmV3PalletInfo: { index: "Compact", name: "Bytes", @@ -3356,7 +3394,7 @@ export default { minor: "Compact", patch: "Compact", }, - /** Lookup347: xcm::v3::MaybeErrorCode */ + /** Lookup350: xcm::v3::MaybeErrorCode */ XcmV3MaybeErrorCode: { _enum: { Success: "Null", @@ -3364,24 +3402,24 @@ export default { TruncatedError: "Bytes", }, }, - /** Lookup350: xcm::v3::OriginKind */ + /** Lookup353: xcm::v3::OriginKind */ XcmV3OriginKind: { _enum: ["Native", "SovereignAccount", "Superuser", "Xcm"], }, - /** Lookup351: xcm::v3::QueryResponseInfo */ + /** Lookup354: xcm::v3::QueryResponseInfo */ XcmV3QueryResponseInfo: { destination: "StagingXcmV3MultiLocation", queryId: "Compact", maxWeight: "SpWeightsWeightV2Weight", }, - /** Lookup352: xcm::v3::multiasset::MultiAssetFilter */ + /** Lookup355: xcm::v3::multiasset::MultiAssetFilter */ XcmV3MultiassetMultiAssetFilter: { _enum: { Definite: "XcmV3MultiassetMultiAssets", Wild: "XcmV3MultiassetWildMultiAsset", }, }, - /** Lookup353: xcm::v3::multiasset::WildMultiAsset */ + /** Lookup356: xcm::v3::multiasset::WildMultiAsset */ XcmV3MultiassetWildMultiAsset: { _enum: { All: "Null", @@ -3397,20 +3435,20 @@ export default { }, }, }, - /** Lookup354: xcm::v3::multiasset::WildFungibility */ + /** Lookup357: xcm::v3::multiasset::WildFungibility */ XcmV3MultiassetWildFungibility: { _enum: ["Fungible", "NonFungible"], }, - /** Lookup355: xcm::v3::WeightLimit */ + /** Lookup358: xcm::v3::WeightLimit */ XcmV3WeightLimit: { _enum: { Unlimited: "Null", Limited: "SpWeightsWeightV2Weight", }, }, - /** Lookup356: staging_xcm::v4::Xcm */ + /** Lookup359: staging_xcm::v4::Xcm */ StagingXcmV4Xcm: "Vec", - /** Lookup358: staging_xcm::v4::Instruction */ + /** Lookup361: staging_xcm::v4::Instruction */ StagingXcmV4Instruction: { _enum: { WithdrawAsset: "StagingXcmV4AssetAssets", @@ -3550,23 +3588,23 @@ export default { }, }, }, - /** Lookup359: staging_xcm::v4::asset::Assets */ + /** Lookup362: staging_xcm::v4::asset::Assets */ StagingXcmV4AssetAssets: "Vec", - /** Lookup361: staging_xcm::v4::asset::Asset */ + /** Lookup364: staging_xcm::v4::asset::Asset */ StagingXcmV4Asset: { id: "StagingXcmV4AssetAssetId", fun: "StagingXcmV4AssetFungibility", }, - /** Lookup362: staging_xcm::v4::asset::AssetId */ + /** Lookup365: staging_xcm::v4::asset::AssetId */ StagingXcmV4AssetAssetId: "StagingXcmV4Location", - /** Lookup363: staging_xcm::v4::asset::Fungibility */ + /** Lookup366: staging_xcm::v4::asset::Fungibility */ StagingXcmV4AssetFungibility: { _enum: { Fungible: "Compact", NonFungible: "StagingXcmV4AssetAssetInstance", }, }, - /** Lookup364: staging_xcm::v4::asset::AssetInstance */ + /** Lookup367: staging_xcm::v4::asset::AssetInstance */ StagingXcmV4AssetAssetInstance: { _enum: { Undefined: "Null", @@ -3577,7 +3615,7 @@ export default { Array32: "[u8;32]", }, }, - /** Lookup365: staging_xcm::v4::Response */ + /** Lookup368: staging_xcm::v4::Response */ StagingXcmV4Response: { _enum: { Null: "Null", @@ -3588,7 +3626,7 @@ export default { DispatchResult: "XcmV3MaybeErrorCode", }, }, - /** Lookup367: staging_xcm::v4::PalletInfo */ + /** Lookup370: staging_xcm::v4::PalletInfo */ StagingXcmV4PalletInfo: { index: "Compact", name: "Bytes", @@ -3597,20 +3635,20 @@ export default { minor: "Compact", patch: "Compact", }, - /** Lookup371: staging_xcm::v4::QueryResponseInfo */ + /** Lookup374: staging_xcm::v4::QueryResponseInfo */ StagingXcmV4QueryResponseInfo: { destination: "StagingXcmV4Location", queryId: "Compact", maxWeight: "SpWeightsWeightV2Weight", }, - /** Lookup372: staging_xcm::v4::asset::AssetFilter */ + /** Lookup375: staging_xcm::v4::asset::AssetFilter */ StagingXcmV4AssetAssetFilter: { _enum: { Definite: "StagingXcmV4AssetAssets", Wild: "StagingXcmV4AssetWildAsset", }, }, - /** Lookup373: staging_xcm::v4::asset::WildAsset */ + /** Lookup376: staging_xcm::v4::asset::WildAsset */ StagingXcmV4AssetWildAsset: { _enum: { All: "Null", @@ -3626,11 +3664,11 @@ export default { }, }, }, - /** Lookup374: staging_xcm::v4::asset::WildFungibility */ + /** Lookup377: staging_xcm::v4::asset::WildFungibility */ StagingXcmV4AssetWildFungibility: { _enum: ["Fungible", "NonFungible"], }, - /** Lookup375: xcm::VersionedAssets */ + /** Lookup378: xcm::VersionedAssets */ XcmVersionedAssets: { _enum: { __Unused0: "Null", @@ -3640,7 +3678,7 @@ export default { V4: "StagingXcmV4AssetAssets", }, }, - /** Lookup387: staging_xcm_executor::traits::asset_transfer::TransferType */ + /** Lookup390: staging_xcm_executor::traits::asset_transfer::TransferType */ StagingXcmExecutorAssetTransferTransferType: { _enum: { Teleport: "Null", @@ -3649,7 +3687,7 @@ export default { RemoteReserve: "XcmVersionedLocation", }, }, - /** Lookup388: xcm::VersionedAssetId */ + /** Lookup391: xcm::VersionedAssetId */ XcmVersionedAssetId: { _enum: { __Unused0: "Null", @@ -3659,24 +3697,7 @@ export default { V4: "StagingXcmV4AssetAssetId", }, }, - /** Lookup389: pallet_external_validators::pallet::Call */ - PalletExternalValidatorsCall: { - _enum: { - skip_external_validators: { - skip: "bool", - }, - add_whitelisted: { - who: "AccountId32", - }, - remove_whitelisted: { - who: "AccountId32", - }, - force_no_eras: "Null", - force_new_era: "Null", - force_new_era_always: "Null", - }, - }, - /** Lookup390: pallet_migrations::pallet::Call */ + /** Lookup392: pallet_migrations::pallet::Call */ PalletMigrationsCall: { _enum: { force_set_cursor: { @@ -3693,20 +3714,20 @@ export default { }, }, }, - /** Lookup392: pallet_migrations::MigrationCursor, BlockNumber> */ + /** Lookup394: pallet_migrations::MigrationCursor, BlockNumber> */ PalletMigrationsMigrationCursor: { _enum: { Active: "PalletMigrationsActiveCursor", Stuck: "Null", }, }, - /** Lookup394: pallet_migrations::ActiveCursor, BlockNumber> */ + /** Lookup396: pallet_migrations::ActiveCursor, BlockNumber> */ PalletMigrationsActiveCursor: { index: "u32", innerCursor: "Option", startedAt: "u32", }, - /** Lookup396: pallet_migrations::HistoricCleanupSelector> */ + /** Lookup398: pallet_migrations::HistoricCleanupSelector> */ PalletMigrationsHistoricCleanupSelector: { _enum: { Specific: "Vec", @@ -3716,7 +3737,7 @@ export default { }, }, }, - /** Lookup399: pallet_beefy::pallet::Call */ + /** Lookup401: pallet_beefy::pallet::Call */ PalletBeefyCall: { _enum: { report_double_voting: { @@ -3749,17 +3770,17 @@ export default { }, }, /** - * Lookup400: sp_consensus_beefy::DoubleVotingProof */ SpConsensusBeefyDoubleVotingProof: { first: "SpConsensusBeefyVoteMessage", second: "SpConsensusBeefyVoteMessage", }, - /** Lookup401: sp_consensus_beefy::ecdsa_crypto::Signature */ + /** Lookup403: sp_consensus_beefy::ecdsa_crypto::Signature */ SpConsensusBeefyEcdsaCryptoSignature: "[u8;65]", /** - * Lookup402: sp_consensus_beefy::VoteMessage */ SpConsensusBeefyVoteMessage: { @@ -3767,16 +3788,16 @@ export default { id: "SpConsensusBeefyEcdsaCryptoPublic", signature: "SpConsensusBeefyEcdsaCryptoSignature", }, - /** Lookup403: sp_consensus_beefy::commitment::Commitment */ + /** Lookup405: sp_consensus_beefy::commitment::Commitment */ SpConsensusBeefyCommitment: { payload: "SpConsensusBeefyPayload", blockNumber: "u32", validatorSetId: "u64", }, - /** Lookup404: sp_consensus_beefy::payload::Payload */ + /** Lookup406: sp_consensus_beefy::payload::Payload */ SpConsensusBeefyPayload: "Vec<([u8;2],Bytes)>", /** - * Lookup407: sp_consensus_beefy::ForkVotingProof, + * Lookup409: sp_consensus_beefy::ForkVotingProof, * sp_consensus_beefy::ecdsa_crypto::Public, sp_mmr_primitives::AncestryProof> */ SpConsensusBeefyForkVotingProof: { @@ -3784,18 +3805,18 @@ export default { ancestryProof: "SpMmrPrimitivesAncestryProof", header: "SpRuntimeHeader", }, - /** Lookup408: sp_mmr_primitives::AncestryProof */ + /** Lookup410: sp_mmr_primitives::AncestryProof */ SpMmrPrimitivesAncestryProof: { prevPeaks: "Vec", prevLeafCount: "u64", leafCount: "u64", items: "Vec<(u64,H256)>", }, - /** Lookup411: sp_consensus_beefy::FutureBlockVotingProof */ + /** Lookup413: sp_consensus_beefy::FutureBlockVotingProof */ SpConsensusBeefyFutureBlockVotingProof: { vote: "SpConsensusBeefyVoteMessage", }, - /** Lookup412: snowbridge_pallet_ethereum_client::pallet::Call */ + /** Lookup414: snowbridge_pallet_ethereum_client::pallet::Call */ SnowbridgePalletEthereumClientCall: { _enum: { force_checkpoint: { @@ -3810,7 +3831,7 @@ export default { }, }, }, - /** Lookup413: snowbridge_beacon_primitives::updates::CheckpointUpdate */ + /** Lookup415: snowbridge_beacon_primitives::updates::CheckpointUpdate */ SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate: { header: "SnowbridgeBeaconPrimitivesBeaconHeader", currentSyncCommittee: "SnowbridgeBeaconPrimitivesSyncCommittee", @@ -3819,7 +3840,7 @@ export default { blockRootsRoot: "H256", blockRootsBranch: "Vec", }, - /** Lookup414: snowbridge_beacon_primitives::types::BeaconHeader */ + /** Lookup416: snowbridge_beacon_primitives::types::BeaconHeader */ SnowbridgeBeaconPrimitivesBeaconHeader: { slot: "u64", proposerIndex: "u64", @@ -3827,14 +3848,14 @@ export default { stateRoot: "H256", bodyRoot: "H256", }, - /** Lookup415: snowbridge_beacon_primitives::types::SyncCommittee */ + /** Lookup417: snowbridge_beacon_primitives::types::SyncCommittee */ SnowbridgeBeaconPrimitivesSyncCommittee: { pubkeys: "[[u8;48];512]", aggregatePubkey: "SnowbridgeBeaconPrimitivesPublicKey", }, - /** Lookup417: snowbridge_beacon_primitives::types::PublicKey */ + /** Lookup419: snowbridge_beacon_primitives::types::PublicKey */ SnowbridgeBeaconPrimitivesPublicKey: "[u8;48]", - /** Lookup419: snowbridge_beacon_primitives::updates::Update */ + /** Lookup421: snowbridge_beacon_primitives::updates::Update */ SnowbridgeBeaconPrimitivesUpdatesUpdate: { attestedHeader: "SnowbridgeBeaconPrimitivesBeaconHeader", syncAggregate: "SnowbridgeBeaconPrimitivesSyncAggregate", @@ -3845,23 +3866,23 @@ export default { blockRootsRoot: "H256", blockRootsBranch: "Vec", }, - /** Lookup420: snowbridge_beacon_primitives::types::SyncAggregate */ + /** Lookup422: snowbridge_beacon_primitives::types::SyncAggregate */ SnowbridgeBeaconPrimitivesSyncAggregate: { syncCommitteeBits: "[u8;64]", syncCommitteeSignature: "SnowbridgeBeaconPrimitivesSignature", }, - /** Lookup421: snowbridge_beacon_primitives::types::Signature */ + /** Lookup423: snowbridge_beacon_primitives::types::Signature */ SnowbridgeBeaconPrimitivesSignature: "[u8;96]", - /** Lookup424: snowbridge_beacon_primitives::updates::NextSyncCommitteeUpdate */ + /** Lookup426: snowbridge_beacon_primitives::updates::NextSyncCommitteeUpdate */ SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate: { nextSyncCommittee: "SnowbridgeBeaconPrimitivesSyncCommittee", nextSyncCommitteeBranch: "Vec", }, - /** Lookup425: snowbridge_core::operating_mode::BasicOperatingMode */ + /** Lookup427: snowbridge_core::operating_mode::BasicOperatingMode */ SnowbridgeCoreOperatingModeBasicOperatingMode: { _enum: ["Normal", "Halted"], }, - /** Lookup426: polkadot_runtime_common::paras_sudo_wrapper::pallet::Call */ + /** Lookup428: polkadot_runtime_common::paras_sudo_wrapper::pallet::Call */ PolkadotRuntimeCommonParasSudoWrapperPalletCall: { _enum: { sudo_schedule_para_initialize: { @@ -3889,13 +3910,13 @@ export default { }, }, }, - /** Lookup427: polkadot_runtime_parachains::paras::ParaGenesisArgs */ + /** Lookup429: polkadot_runtime_parachains::paras::ParaGenesisArgs */ PolkadotRuntimeParachainsParasParaGenesisArgs: { genesisHead: "Bytes", validationCode: "Bytes", paraKind: "bool", }, - /** Lookup428: pallet_root_testing::pallet::Call */ + /** Lookup430: pallet_root_testing::pallet::Call */ PalletRootTestingCall: { _enum: { fill_block: { @@ -3904,7 +3925,7 @@ export default { trigger_defensive: "Null", }, }, - /** Lookup429: pallet_sudo::pallet::Call */ + /** Lookup431: pallet_sudo::pallet::Call */ PalletSudoCall: { _enum: { sudo: { @@ -3927,15 +3948,15 @@ export default { remove_key: "Null", }, }, - /** Lookup430: sp_runtime::traits::BlakeTwo256 */ + /** Lookup432: sp_runtime::traits::BlakeTwo256 */ SpRuntimeBlakeTwo256: "Null", - /** Lookup432: pallet_conviction_voting::types::Tally */ + /** Lookup434: pallet_conviction_voting::types::Tally */ PalletConvictionVotingTally: { ayes: "u128", nays: "u128", support: "u128", }, - /** Lookup433: pallet_ranked_collective::pallet::Event */ + /** Lookup435: pallet_ranked_collective::pallet::Event */ PalletRankedCollectiveEvent: { _enum: { MemberAdded: { @@ -3961,20 +3982,20 @@ export default { }, }, }, - /** Lookup434: pallet_ranked_collective::VoteRecord */ + /** Lookup436: pallet_ranked_collective::VoteRecord */ PalletRankedCollectiveVoteRecord: { _enum: { Aye: "u32", Nay: "u32", }, }, - /** Lookup435: pallet_ranked_collective::Tally */ + /** Lookup437: pallet_ranked_collective::Tally */ PalletRankedCollectiveTally: { bareAyes: "u32", ayes: "u32", nays: "u32", }, - /** Lookup437: pallet_whitelist::pallet::Event */ + /** Lookup439: pallet_whitelist::pallet::Event */ PalletWhitelistEvent: { _enum: { CallWhitelisted: { @@ -3989,17 +4010,17 @@ export default { }, }, }, - /** Lookup439: frame_support::dispatch::PostDispatchInfo */ + /** Lookup441: frame_support::dispatch::PostDispatchInfo */ FrameSupportDispatchPostDispatchInfo: { actualWeight: "Option", paysFee: "FrameSupportDispatchPays", }, - /** Lookup441: sp_runtime::DispatchErrorWithPostInfo */ + /** Lookup443: sp_runtime::DispatchErrorWithPostInfo */ SpRuntimeDispatchErrorWithPostInfo: { postInfo: "FrameSupportDispatchPostDispatchInfo", error: "SpRuntimeDispatchError", }, - /** Lookup442: polkadot_runtime_parachains::inclusion::pallet::Event */ + /** Lookup444: polkadot_runtime_parachains::inclusion::pallet::Event */ PolkadotRuntimeParachainsInclusionPalletEvent: { _enum: { CandidateBacked: "(PolkadotPrimitivesV7CandidateReceipt,Bytes,u32,u32)", @@ -4011,12 +4032,12 @@ export default { }, }, }, - /** Lookup443: polkadot_primitives::v7::CandidateReceipt */ + /** Lookup445: polkadot_primitives::v7::CandidateReceipt */ PolkadotPrimitivesV7CandidateReceipt: { descriptor: "PolkadotPrimitivesV7CandidateDescriptor", commitmentsHash: "H256", }, - /** Lookup446: polkadot_runtime_parachains::paras::pallet::Event */ + /** Lookup448: polkadot_runtime_parachains::paras::pallet::Event */ PolkadotRuntimeParachainsParasPalletEvent: { _enum: { CurrentCodeUpdated: "u32", @@ -4029,7 +4050,7 @@ export default { PvfCheckRejected: "(H256,u32)", }, }, - /** Lookup447: polkadot_runtime_parachains::hrmp::pallet::Event */ + /** Lookup449: polkadot_runtime_parachains::hrmp::pallet::Event */ PolkadotRuntimeParachainsHrmpPalletEvent: { _enum: { OpenChannelRequested: { @@ -4068,7 +4089,7 @@ export default { }, }, }, - /** Lookup448: polkadot_runtime_parachains::disputes::pallet::Event */ + /** Lookup450: polkadot_runtime_parachains::disputes::pallet::Event */ PolkadotRuntimeParachainsDisputesPalletEvent: { _enum: { DisputeInitiated: "(H256,PolkadotRuntimeParachainsDisputesDisputeLocation)", @@ -4076,15 +4097,15 @@ export default { Revert: "u32", }, }, - /** Lookup449: polkadot_runtime_parachains::disputes::DisputeLocation */ + /** Lookup451: polkadot_runtime_parachains::disputes::DisputeLocation */ PolkadotRuntimeParachainsDisputesDisputeLocation: { _enum: ["Local", "Remote"], }, - /** Lookup450: polkadot_runtime_parachains::disputes::DisputeResult */ + /** Lookup452: polkadot_runtime_parachains::disputes::DisputeResult */ PolkadotRuntimeParachainsDisputesDisputeResult: { _enum: ["Valid", "Invalid"], }, - /** Lookup451: pallet_message_queue::pallet::Event */ + /** Lookup453: pallet_message_queue::pallet::Event */ PalletMessageQueueEvent: { _enum: { ProcessingFailed: { @@ -4110,7 +4131,7 @@ export default { }, }, }, - /** Lookup452: frame_support::traits::messages::ProcessMessageError */ + /** Lookup454: frame_support::traits::messages::ProcessMessageError */ FrameSupportMessagesProcessMessageError: { _enum: { BadFormat: "Null", @@ -4121,7 +4142,7 @@ export default { StackLimitReached: "Null", }, }, - /** Lookup453: polkadot_runtime_parachains::assigner_on_demand::pallet::Event */ + /** Lookup455: polkadot_runtime_parachains::assigner_on_demand::pallet::Event */ PolkadotRuntimeParachainsAssignerOnDemandPalletEvent: { _enum: { OnDemandOrderPlaced: { @@ -4134,7 +4155,7 @@ export default { }, }, }, - /** Lookup454: polkadot_runtime_common::paras_registrar::pallet::Event */ + /** Lookup456: polkadot_runtime_common::paras_registrar::pallet::Event */ PolkadotRuntimeCommonParasRegistrarPalletEvent: { _enum: { Registered: { @@ -4154,7 +4175,7 @@ export default { }, }, }, - /** Lookup455: pallet_utility::pallet::Event */ + /** Lookup457: pallet_utility::pallet::Event */ PalletUtilityEvent: { _enum: { BatchInterrupted: { @@ -4172,7 +4193,7 @@ export default { }, }, }, - /** Lookup457: pallet_identity::pallet::Event */ + /** Lookup459: pallet_identity::pallet::Event */ PalletIdentityEvent: { _enum: { IdentitySet: { @@ -4244,7 +4265,7 @@ export default { }, }, }, - /** Lookup458: pallet_scheduler::pallet::Event */ + /** Lookup460: pallet_scheduler::pallet::Event */ PalletSchedulerEvent: { _enum: { Scheduled: { @@ -4288,7 +4309,7 @@ export default { }, }, }, - /** Lookup460: pallet_proxy::pallet::Event */ + /** Lookup462: pallet_proxy::pallet::Event */ PalletProxyEvent: { _enum: { ProxyExecuted: { @@ -4319,7 +4340,7 @@ export default { }, }, }, - /** Lookup461: pallet_multisig::pallet::Event */ + /** Lookup463: pallet_multisig::pallet::Event */ PalletMultisigEvent: { _enum: { NewMultisig: { @@ -4348,7 +4369,7 @@ export default { }, }, }, - /** Lookup462: pallet_preimage::pallet::Event */ + /** Lookup464: pallet_preimage::pallet::Event */ PalletPreimageEvent: { _enum: { Noted: { @@ -4371,7 +4392,7 @@ export default { }, }, }, - /** Lookup463: pallet_asset_rate::pallet::Event */ + /** Lookup465: pallet_asset_rate::pallet::Event */ PalletAssetRateEvent: { _enum: { AssetRateCreated: { @@ -4391,7 +4412,7 @@ export default { }, }, }, - /** Lookup464: pallet_xcm::pallet::Event */ + /** Lookup466: pallet_xcm::pallet::Event */ PalletXcmEvent: { _enum: { Attempted: { @@ -4514,7 +4535,7 @@ export default { }, }, }, - /** Lookup465: staging_xcm::v4::traits::Outcome */ + /** Lookup467: staging_xcm::v4::traits::Outcome */ StagingXcmV4TraitsOutcome: { _enum: { Complete: { @@ -4529,27 +4550,6 @@ export default { }, }, }, - /** Lookup466: pallet_external_validators::pallet::Event */ - PalletExternalValidatorsEvent: { - _enum: { - WhitelistedValidatorAdded: { - accountId: "AccountId32", - }, - WhitelistedValidatorRemoved: { - accountId: "AccountId32", - }, - NewEra: { - era: "u32", - }, - ForceEra: { - mode: "PalletExternalValidatorsForcing", - }, - }, - }, - /** Lookup467: pallet_external_validators::Forcing */ - PalletExternalValidatorsForcing: { - _enum: ["NotForcing", "ForceNew", "ForceNone", "ForceAlways"], - }, /** Lookup468: pallet_migrations::pallet::Event */ PalletMigrationsEvent: { _enum: { @@ -4988,13 +4988,28 @@ export default { "CantDeleteAssignedProfile", ], }, - /** Lookup571: sp_core::crypto::KeyTypeId */ + /** Lookup569: tp_traits::ActiveEraInfo */ + TpTraitsActiveEraInfo: { + index: "u32", + start: "Option", + }, + /** Lookup571: pallet_external_validators::pallet::Error */ + PalletExternalValidatorsError: { + _enum: [ + "TooManyInvulnerables", + "AlreadyInvulnerable", + "NotInvulnerable", + "NoKeysRegistered", + "UnableToDeriveCollatorId", + ], + }, + /** Lookup576: sp_core::crypto::KeyTypeId */ SpCoreCryptoKeyTypeId: "[u8;4]", - /** Lookup572: pallet_session::pallet::Error */ + /** Lookup577: pallet_session::pallet::Error */ PalletSessionError: { _enum: ["InvalidProof", "NoAssociatedValidatorId", "DuplicatedKey", "NoKeys", "NoAccount"], }, - /** Lookup573: pallet_grandpa::StoredState */ + /** Lookup578: pallet_grandpa::StoredState */ PalletGrandpaStoredState: { _enum: { Live: "Null", @@ -5009,14 +5024,14 @@ export default { }, }, }, - /** Lookup574: pallet_grandpa::StoredPendingChange */ + /** Lookup579: pallet_grandpa::StoredPendingChange */ PalletGrandpaStoredPendingChange: { scheduledAt: "u32", delay: "u32", nextAuthorities: "Vec<(SpConsensusGrandpaAppPublic,u64)>", forced: "Option", }, - /** Lookup576: pallet_grandpa::pallet::Error */ + /** Lookup581: pallet_grandpa::pallet::Error */ PalletGrandpaError: { _enum: [ "PauseFailed", @@ -5028,12 +5043,12 @@ export default { "DuplicateOffenceReport", ], }, - /** Lookup579: pallet_inflation_rewards::pallet::ChainsToRewardValue */ + /** Lookup584: pallet_inflation_rewards::pallet::ChainsToRewardValue */ PalletInflationRewardsChainsToRewardValue: { paraIds: "Vec", rewardsPerChain: "u128", }, - /** Lookup580: pallet_treasury::Proposal */ + /** Lookup585: pallet_treasury::Proposal */ PalletTreasuryProposal: { proposer: "AccountId32", value: "u128", @@ -5041,7 +5056,7 @@ export default { bond: "u128", }, /** - * Lookup582: pallet_treasury::SpendStatus */ PalletTreasurySpendStatus: { @@ -5052,7 +5067,7 @@ export default { expireAt: "u32", status: "PalletTreasuryPaymentState", }, - /** Lookup583: pallet_treasury::PaymentState */ + /** Lookup588: pallet_treasury::PaymentState */ PalletTreasuryPaymentState: { _enum: { Pending: "Null", @@ -5062,9 +5077,9 @@ export default { Failed: "Null", }, }, - /** Lookup585: frame_support::PalletId */ + /** Lookup590: frame_support::PalletId */ FrameSupportPalletId: "[u8;8]", - /** Lookup586: pallet_treasury::pallet::Error */ + /** Lookup591: pallet_treasury::pallet::Error */ PalletTreasuryError: { _enum: [ "InvalidIndex", @@ -5081,7 +5096,7 @@ export default { ], }, /** - * Lookup588: pallet_conviction_voting::vote::Voting */ PalletConvictionVotingVoteVoting: { @@ -5090,20 +5105,20 @@ export default { Delegating: "PalletConvictionVotingVoteDelegating", }, }, - /** Lookup589: pallet_conviction_voting::vote::Casting */ + /** Lookup594: pallet_conviction_voting::vote::Casting */ PalletConvictionVotingVoteCasting: { votes: "Vec<(u32,PalletConvictionVotingVoteAccountVote)>", delegations: "PalletConvictionVotingDelegations", prior: "PalletConvictionVotingVotePriorLock", }, - /** Lookup593: pallet_conviction_voting::types::Delegations */ + /** Lookup598: pallet_conviction_voting::types::Delegations */ PalletConvictionVotingDelegations: { votes: "u128", capital: "u128", }, - /** Lookup594: pallet_conviction_voting::vote::PriorLock */ + /** Lookup599: pallet_conviction_voting::vote::PriorLock */ PalletConvictionVotingVotePriorLock: "(u32,u128)", - /** Lookup595: pallet_conviction_voting::vote::Delegating */ + /** Lookup600: pallet_conviction_voting::vote::Delegating */ PalletConvictionVotingVoteDelegating: { balance: "u128", target: "AccountId32", @@ -5111,7 +5126,7 @@ export default { delegations: "PalletConvictionVotingDelegations", prior: "PalletConvictionVotingVotePriorLock", }, - /** Lookup599: pallet_conviction_voting::pallet::Error */ + /** Lookup604: pallet_conviction_voting::pallet::Error */ PalletConvictionVotingError: { _enum: [ "NotOngoing", @@ -5129,7 +5144,7 @@ export default { ], }, /** - * Lookup600: pallet_referenda::types::ReferendumInfo, * Balance, pallet_conviction_voting::types::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5144,7 +5159,7 @@ export default { }, }, /** - * Lookup601: pallet_referenda::types::ReferendumStatus, * Balance, pallet_conviction_voting::types::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5161,17 +5176,17 @@ export default { inQueue: "bool", alarm: "Option<(u32,(u32,u32))>", }, - /** Lookup602: pallet_referenda::types::Deposit */ + /** Lookup607: pallet_referenda::types::Deposit */ PalletReferendaDeposit: { who: "AccountId32", amount: "u128", }, - /** Lookup605: pallet_referenda::types::DecidingStatus */ + /** Lookup610: pallet_referenda::types::DecidingStatus */ PalletReferendaDecidingStatus: { since: "u32", confirming: "Option", }, - /** Lookup613: pallet_referenda::types::TrackInfo */ + /** Lookup618: pallet_referenda::types::TrackInfo */ PalletReferendaTrackInfo: { name: "Text", maxDeciding: "u32", @@ -5183,7 +5198,7 @@ export default { minApproval: "PalletReferendaCurve", minSupport: "PalletReferendaCurve", }, - /** Lookup614: pallet_referenda::types::Curve */ + /** Lookup619: pallet_referenda::types::Curve */ PalletReferendaCurve: { _enum: { LinearDecreasing: { @@ -5204,7 +5219,7 @@ export default { }, }, }, - /** Lookup617: pallet_referenda::pallet::Error */ + /** Lookup622: pallet_referenda::pallet::Error */ PalletReferendaError: { _enum: [ "NotOngoing", @@ -5223,11 +5238,11 @@ export default { "PreimageStoredWithDifferentLength", ], }, - /** Lookup618: pallet_ranked_collective::MemberRecord */ + /** Lookup623: pallet_ranked_collective::MemberRecord */ PalletRankedCollectiveMemberRecord: { rank: "u16", }, - /** Lookup623: pallet_ranked_collective::pallet::Error */ + /** Lookup628: pallet_ranked_collective::pallet::Error */ PalletRankedCollectiveError: { _enum: [ "AlreadyMember", @@ -5244,7 +5259,7 @@ export default { ], }, /** - * Lookup624: pallet_referenda::types::ReferendumInfo, * Balance, pallet_ranked_collective::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5259,7 +5274,7 @@ export default { }, }, /** - * Lookup625: pallet_referenda::types::ReferendumStatus, * Balance, pallet_ranked_collective::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5276,7 +5291,7 @@ export default { inQueue: "bool", alarm: "Option<(u32,(u32,u32))>", }, - /** Lookup628: pallet_whitelist::pallet::Error */ + /** Lookup633: pallet_whitelist::pallet::Error */ PalletWhitelistError: { _enum: [ "UnavailablePreImage", @@ -5286,7 +5301,7 @@ export default { "CallAlreadyWhitelisted", ], }, - /** Lookup629: polkadot_runtime_parachains::configuration::HostConfiguration */ + /** Lookup634: polkadot_runtime_parachains::configuration::HostConfiguration */ PolkadotRuntimeParachainsConfigurationHostConfiguration: { maxCodeSize: "u32", maxHeadDataSize: "u32", @@ -5324,16 +5339,16 @@ export default { approvalVotingParams: "PolkadotPrimitivesV7ApprovalVotingParams", schedulerParams: "PolkadotPrimitivesVstagingSchedulerParams", }, - /** Lookup632: polkadot_runtime_parachains::configuration::pallet::Error */ + /** Lookup637: polkadot_runtime_parachains::configuration::pallet::Error */ PolkadotRuntimeParachainsConfigurationPalletError: { _enum: ["InvalidNewValue"], }, - /** Lookup635: polkadot_runtime_parachains::shared::AllowedRelayParentsTracker */ + /** Lookup640: polkadot_runtime_parachains::shared::AllowedRelayParentsTracker */ PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker: { buffer: "Vec<(H256,H256)>", latestNumber: "u32", }, - /** Lookup639: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability */ + /** Lookup644: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability */ PolkadotRuntimeParachainsInclusionCandidatePendingAvailability: { _alias: { hash_: "hash", @@ -5348,7 +5363,7 @@ export default { backedInNumber: "u32", backingGroup: "u32", }, - /** Lookup640: polkadot_runtime_parachains::inclusion::pallet::Error */ + /** Lookup645: polkadot_runtime_parachains::inclusion::pallet::Error */ PolkadotRuntimeParachainsInclusionPalletError: { _enum: [ "ValidatorIndexOutOfBounds", @@ -5371,14 +5386,14 @@ export default { "ParaHeadMismatch", ], }, - /** Lookup641: polkadot_primitives::v7::ScrapedOnChainVotes */ + /** Lookup646: polkadot_primitives::v7::ScrapedOnChainVotes */ PolkadotPrimitivesV7ScrapedOnChainVotes: { session: "u32", backingValidatorsPerCandidate: "Vec<(PolkadotPrimitivesV7CandidateReceipt,Vec<(u32,PolkadotPrimitivesV7ValidityAttestation)>)>", disputes: "Vec", }, - /** Lookup646: polkadot_runtime_parachains::paras_inherent::pallet::Error */ + /** Lookup651: polkadot_runtime_parachains::paras_inherent::pallet::Error */ PolkadotRuntimeParachainsParasInherentPalletError: { _enum: [ "TooManyInclusionInherents", @@ -5388,20 +5403,20 @@ export default { "UnscheduledCandidate", ], }, - /** Lookup649: polkadot_runtime_parachains::scheduler::pallet::CoreOccupied */ + /** Lookup654: polkadot_runtime_parachains::scheduler::pallet::CoreOccupied */ PolkadotRuntimeParachainsSchedulerPalletCoreOccupied: { _enum: { Free: "Null", Paras: "PolkadotRuntimeParachainsSchedulerPalletParasEntry", }, }, - /** Lookup650: polkadot_runtime_parachains::scheduler::pallet::ParasEntry */ + /** Lookup655: polkadot_runtime_parachains::scheduler::pallet::ParasEntry */ PolkadotRuntimeParachainsSchedulerPalletParasEntry: { assignment: "PolkadotRuntimeParachainsSchedulerCommonAssignment", availabilityTimeouts: "u32", ttl: "u32", }, - /** Lookup651: polkadot_runtime_parachains::scheduler::common::Assignment */ + /** Lookup656: polkadot_runtime_parachains::scheduler::common::Assignment */ PolkadotRuntimeParachainsSchedulerCommonAssignment: { _enum: { Pool: { @@ -5411,7 +5426,7 @@ export default { Bulk: "u32", }, }, - /** Lookup656: polkadot_runtime_parachains::paras::PvfCheckActiveVoteState */ + /** Lookup661: polkadot_runtime_parachains::paras::PvfCheckActiveVoteState */ PolkadotRuntimeParachainsParasPvfCheckActiveVoteState: { votesAccept: "BitVec", votesReject: "BitVec", @@ -5419,7 +5434,7 @@ export default { createdAt: "u32", causes: "Vec", }, - /** Lookup658: polkadot_runtime_parachains::paras::PvfCheckCause */ + /** Lookup663: polkadot_runtime_parachains::paras::PvfCheckCause */ PolkadotRuntimeParachainsParasPvfCheckCause: { _enum: { Onboarding: "u32", @@ -5430,11 +5445,11 @@ export default { }, }, }, - /** Lookup659: polkadot_runtime_parachains::paras::UpgradeStrategy */ + /** Lookup664: polkadot_runtime_parachains::paras::UpgradeStrategy */ PolkadotRuntimeParachainsParasUpgradeStrategy: { _enum: ["SetGoAheadSignal", "ApplyAtExpectedBlock"], }, - /** Lookup661: polkadot_runtime_parachains::paras::ParaLifecycle */ + /** Lookup666: polkadot_runtime_parachains::paras::ParaLifecycle */ PolkadotRuntimeParachainsParasParaLifecycle: { _enum: [ "Onboarding", @@ -5446,25 +5461,25 @@ export default { "OffboardingParachain", ], }, - /** Lookup663: polkadot_runtime_parachains::paras::ParaPastCodeMeta */ + /** Lookup668: polkadot_runtime_parachains::paras::ParaPastCodeMeta */ PolkadotRuntimeParachainsParasParaPastCodeMeta: { upgradeTimes: "Vec", lastPruned: "Option", }, - /** Lookup665: polkadot_runtime_parachains::paras::ReplacementTimes */ + /** Lookup670: polkadot_runtime_parachains::paras::ReplacementTimes */ PolkadotRuntimeParachainsParasReplacementTimes: { expectedAt: "u32", activatedAt: "u32", }, - /** Lookup667: polkadot_primitives::v7::UpgradeGoAhead */ + /** Lookup672: polkadot_primitives::v7::UpgradeGoAhead */ PolkadotPrimitivesV7UpgradeGoAhead: { _enum: ["Abort", "GoAhead"], }, - /** Lookup668: polkadot_primitives::v7::UpgradeRestriction */ + /** Lookup673: polkadot_primitives::v7::UpgradeRestriction */ PolkadotPrimitivesV7UpgradeRestriction: { _enum: ["Present"], }, - /** Lookup669: polkadot_runtime_parachains::paras::pallet::Error */ + /** Lookup674: polkadot_runtime_parachains::paras::pallet::Error */ PolkadotRuntimeParachainsParasPalletError: { _enum: [ "NotRegistered", @@ -5482,18 +5497,18 @@ export default { "InvalidCode", ], }, - /** Lookup671: polkadot_runtime_parachains::initializer::BufferedSessionChange */ + /** Lookup676: polkadot_runtime_parachains::initializer::BufferedSessionChange */ PolkadotRuntimeParachainsInitializerBufferedSessionChange: { validators: "Vec", queued: "Vec", sessionIndex: "u32", }, - /** Lookup673: polkadot_core_primitives::InboundDownwardMessage */ + /** Lookup678: polkadot_core_primitives::InboundDownwardMessage */ PolkadotCorePrimitivesInboundDownwardMessage: { sentAt: "u32", msg: "Bytes", }, - /** Lookup674: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest */ + /** Lookup679: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest */ PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest: { confirmed: "bool", age: "u32", @@ -5502,7 +5517,7 @@ export default { maxCapacity: "u32", maxTotalSize: "u32", }, - /** Lookup676: polkadot_runtime_parachains::hrmp::HrmpChannel */ + /** Lookup681: polkadot_runtime_parachains::hrmp::HrmpChannel */ PolkadotRuntimeParachainsHrmpHrmpChannel: { maxCapacity: "u32", maxTotalSize: "u32", @@ -5513,12 +5528,12 @@ export default { senderDeposit: "u128", recipientDeposit: "u128", }, - /** Lookup678: polkadot_core_primitives::InboundHrmpMessage */ + /** Lookup683: polkadot_core_primitives::InboundHrmpMessage */ PolkadotCorePrimitivesInboundHrmpMessage: { sentAt: "u32", data: "Bytes", }, - /** Lookup681: polkadot_runtime_parachains::hrmp::pallet::Error */ + /** Lookup686: polkadot_runtime_parachains::hrmp::pallet::Error */ PolkadotRuntimeParachainsHrmpPalletError: { _enum: [ "OpenHrmpChannelToSelf", @@ -5543,7 +5558,7 @@ export default { "ChannelCreationNotAuthorized", ], }, - /** Lookup683: polkadot_primitives::v7::SessionInfo */ + /** Lookup688: polkadot_primitives::v7::SessionInfo */ PolkadotPrimitivesV7SessionInfo: { activeValidatorIndices: "Vec", randomSeed: "[u8;32]", @@ -5560,20 +5575,20 @@ export default { neededApprovals: "u32", }, /** - * Lookup684: polkadot_primitives::v7::IndexedVec */ PolkadotPrimitivesV7IndexedVecValidatorIndex: "Vec", - /** Lookup685: polkadot_primitives::v7::IndexedVec */ + /** Lookup690: polkadot_primitives::v7::IndexedVec */ PolkadotPrimitivesV7IndexedVecGroupIndex: "Vec>", - /** Lookup687: polkadot_primitives::v7::DisputeState */ + /** Lookup692: polkadot_primitives::v7::DisputeState */ PolkadotPrimitivesV7DisputeState: { validatorsFor: "BitVec", validatorsAgainst: "BitVec", start: "u32", concludedAt: "Option", }, - /** Lookup689: polkadot_runtime_parachains::disputes::pallet::Error */ + /** Lookup694: polkadot_runtime_parachains::disputes::pallet::Error */ PolkadotRuntimeParachainsDisputesPalletError: { _enum: [ "DuplicateDisputeStatementSets", @@ -5587,7 +5602,7 @@ export default { "UnconfirmedDispute", ], }, - /** Lookup690: polkadot_primitives::v7::slashing::PendingSlashes */ + /** Lookup695: polkadot_primitives::v7::slashing::PendingSlashes */ PolkadotPrimitivesV7SlashingPendingSlashes: { _alias: { keys_: "keys", @@ -5595,7 +5610,7 @@ export default { keys_: "BTreeMap", kind: "PolkadotPrimitivesV7SlashingSlashingOffenceKind", }, - /** Lookup694: polkadot_runtime_parachains::disputes::slashing::pallet::Error */ + /** Lookup699: polkadot_runtime_parachains::disputes::slashing::pallet::Error */ PolkadotRuntimeParachainsDisputesSlashingPalletError: { _enum: [ "InvalidKeyOwnershipProof", @@ -5606,7 +5621,7 @@ export default { "DuplicateSlashingReport", ], }, - /** Lookup695: pallet_message_queue::BookState */ + /** Lookup700: pallet_message_queue::BookState */ PalletMessageQueueBookState: { _alias: { size_: "size", @@ -5618,12 +5633,12 @@ export default { messageCount: "u64", size_: "u64", }, - /** Lookup697: pallet_message_queue::Neighbours */ + /** Lookup702: pallet_message_queue::Neighbours */ PalletMessageQueueNeighbours: { prev: "PolkadotRuntimeParachainsInclusionAggregateMessageOrigin", next: "PolkadotRuntimeParachainsInclusionAggregateMessageOrigin", }, - /** Lookup699: pallet_message_queue::Page */ + /** Lookup704: pallet_message_queue::Page */ PalletMessageQueuePage: { remaining: "u32", remainingSize: "u32", @@ -5632,7 +5647,7 @@ export default { last: "u32", heap: "Bytes", }, - /** Lookup701: pallet_message_queue::pallet::Error */ + /** Lookup706: pallet_message_queue::pallet::Error */ PalletMessageQueueError: { _enum: [ "NotReapable", @@ -5646,38 +5661,38 @@ export default { "RecursiveDisallowed", ], }, - /** Lookup702: polkadot_runtime_parachains::assigner_on_demand::types::CoreAffinityCount */ + /** Lookup707: polkadot_runtime_parachains::assigner_on_demand::types::CoreAffinityCount */ PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount: { coreIndex: "u32", count: "u32", }, - /** Lookup703: polkadot_runtime_parachains::assigner_on_demand::types::QueueStatusType */ + /** Lookup708: polkadot_runtime_parachains::assigner_on_demand::types::QueueStatusType */ PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType: { traffic: "u128", nextIndex: "u32", smallestIndex: "u32", freedIndices: "BinaryHeapReverseQueueIndex", }, - /** Lookup705: BinaryHeap */ + /** Lookup710: BinaryHeap */ BinaryHeapReverseQueueIndex: "Vec", - /** Lookup708: BinaryHeap */ + /** Lookup713: BinaryHeap */ BinaryHeapEnqueuedOrder: "Vec", - /** Lookup709: polkadot_runtime_parachains::assigner_on_demand::types::EnqueuedOrder */ + /** Lookup714: polkadot_runtime_parachains::assigner_on_demand::types::EnqueuedOrder */ PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder: { paraId: "u32", idx: "u32", }, - /** Lookup713: polkadot_runtime_parachains::assigner_on_demand::pallet::Error */ + /** Lookup718: polkadot_runtime_parachains::assigner_on_demand::pallet::Error */ PolkadotRuntimeParachainsAssignerOnDemandPalletError: { _enum: ["QueueFull", "SpotPriceHigherThanMaxAmount"], }, - /** Lookup714: polkadot_runtime_common::paras_registrar::ParaInfo */ + /** Lookup719: polkadot_runtime_common::paras_registrar::ParaInfo */ PolkadotRuntimeCommonParasRegistrarParaInfo: { manager: "AccountId32", deposit: "u128", locked: "Option", }, - /** Lookup716: polkadot_runtime_common::paras_registrar::pallet::Error */ + /** Lookup721: polkadot_runtime_common::paras_registrar::pallet::Error */ PolkadotRuntimeCommonParasRegistrarPalletError: { _enum: [ "NotRegistered", @@ -5696,12 +5711,12 @@ export default { "CannotSwap", ], }, - /** Lookup717: pallet_utility::pallet::Error */ + /** Lookup722: pallet_utility::pallet::Error */ PalletUtilityError: { _enum: ["TooManyCalls"], }, /** - * Lookup719: pallet_identity::types::Registration> */ PalletIdentityRegistration: { @@ -5709,18 +5724,18 @@ export default { deposit: "u128", info: "PalletIdentityLegacyIdentityInfo", }, - /** Lookup728: pallet_identity::types::RegistrarInfo */ + /** Lookup733: pallet_identity::types::RegistrarInfo */ PalletIdentityRegistrarInfo: { account: "AccountId32", fee: "u128", fields: "u64", }, - /** Lookup730: pallet_identity::types::AuthorityProperties> */ + /** Lookup735: pallet_identity::types::AuthorityProperties> */ PalletIdentityAuthorityProperties: { suffix: "Bytes", allocation: "u32", }, - /** Lookup733: pallet_identity::pallet::Error */ + /** Lookup738: pallet_identity::pallet::Error */ PalletIdentityError: { _enum: [ "TooManySubAccounts", @@ -5752,7 +5767,7 @@ export default { ], }, /** - * Lookup736: pallet_scheduler::Scheduled, * BlockNumber, dancelight_runtime::OriginCaller, sp_core::crypto::AccountId32> */ @@ -5763,29 +5778,29 @@ export default { maybePeriodic: "Option<(u32,u32)>", origin: "DancelightRuntimeOriginCaller", }, - /** Lookup738: pallet_scheduler::RetryConfig */ + /** Lookup743: pallet_scheduler::RetryConfig */ PalletSchedulerRetryConfig: { totalRetries: "u8", remaining: "u8", period: "u32", }, - /** Lookup739: pallet_scheduler::pallet::Error */ + /** Lookup744: pallet_scheduler::pallet::Error */ PalletSchedulerError: { _enum: ["FailedToSchedule", "NotFound", "TargetBlockNumberInPast", "RescheduleNoChange", "Named"], }, - /** Lookup742: pallet_proxy::ProxyDefinition */ + /** Lookup747: pallet_proxy::ProxyDefinition */ PalletProxyProxyDefinition: { delegate: "AccountId32", proxyType: "DancelightRuntimeProxyType", delay: "u32", }, - /** Lookup746: pallet_proxy::Announcement */ + /** Lookup751: pallet_proxy::Announcement */ PalletProxyAnnouncement: { real: "AccountId32", callHash: "H256", height: "u32", }, - /** Lookup748: pallet_proxy::pallet::Error */ + /** Lookup753: pallet_proxy::pallet::Error */ PalletProxyError: { _enum: [ "TooMany", @@ -5798,14 +5813,14 @@ export default { "NoSelfProxy", ], }, - /** Lookup750: pallet_multisig::Multisig */ + /** Lookup755: pallet_multisig::Multisig */ PalletMultisigMultisig: { when: "PalletMultisigTimepoint", deposit: "u128", depositor: "AccountId32", approvals: "Vec", }, - /** Lookup752: pallet_multisig::pallet::Error */ + /** Lookup757: pallet_multisig::pallet::Error */ PalletMultisigError: { _enum: [ "MinimumThreshold", @@ -5824,7 +5839,7 @@ export default { "AlreadyStored", ], }, - /** Lookup753: pallet_preimage::OldRequestStatus */ + /** Lookup758: pallet_preimage::OldRequestStatus */ PalletPreimageOldRequestStatus: { _enum: { Unrequested: { @@ -5839,7 +5854,7 @@ export default { }, }, /** - * Lookup756: pallet_preimage::RequestStatus> */ PalletPreimageRequestStatus: { @@ -5855,7 +5870,7 @@ export default { }, }, }, - /** Lookup761: pallet_preimage::pallet::Error */ + /** Lookup766: pallet_preimage::pallet::Error */ PalletPreimageError: { _enum: [ "TooBig", @@ -5869,11 +5884,11 @@ export default { "NoCost", ], }, - /** Lookup762: pallet_asset_rate::pallet::Error */ + /** Lookup767: pallet_asset_rate::pallet::Error */ PalletAssetRateError: { _enum: ["UnknownAssetKind", "AlreadyExists", "Overflow"], }, - /** Lookup763: pallet_xcm::pallet::QueryStatus */ + /** Lookup768: pallet_xcm::pallet::QueryStatus */ PalletXcmQueryStatus: { _enum: { Pending: { @@ -5892,7 +5907,7 @@ export default { }, }, }, - /** Lookup767: xcm::VersionedResponse */ + /** Lookup772: xcm::VersionedResponse */ XcmVersionedResponse: { _enum: { __Unused0: "Null", @@ -5902,7 +5917,7 @@ export default { V4: "StagingXcmV4Response", }, }, - /** Lookup773: pallet_xcm::pallet::VersionMigrationStage */ + /** Lookup778: pallet_xcm::pallet::VersionMigrationStage */ PalletXcmVersionMigrationStage: { _enum: { MigrateSupportedVersion: "Null", @@ -5911,14 +5926,14 @@ export default { MigrateAndNotifyOldTargets: "Null", }, }, - /** Lookup775: pallet_xcm::pallet::RemoteLockedFungibleRecord */ + /** Lookup780: pallet_xcm::pallet::RemoteLockedFungibleRecord */ PalletXcmRemoteLockedFungibleRecord: { amount: "u128", owner: "XcmVersionedLocation", locker: "XcmVersionedLocation", consumers: "Vec<(Null,u128)>", }, - /** Lookup782: pallet_xcm::pallet::Error */ + /** Lookup787: pallet_xcm::pallet::Error */ PalletXcmError: { _enum: [ "Unreachable", @@ -5948,21 +5963,6 @@ export default { "LocalExecutionIncomplete", ], }, - /** Lookup785: tp_traits::ActiveEraInfo */ - TpTraitsActiveEraInfo: { - index: "u32", - start: "Option", - }, - /** Lookup787: pallet_external_validators::pallet::Error */ - PalletExternalValidatorsError: { - _enum: [ - "TooManyInvulnerables", - "AlreadyInvulnerable", - "NotInvulnerable", - "NoKeysRegistered", - "UnableToDeriveCollatorId", - ], - }, /** Lookup788: pallet_migrations::pallet::Error */ PalletMigrationsError: { _enum: ["PreimageMissing", "WrongUpperBound", "PreimageIsTooBig", "PreimageAlreadyExists"], diff --git a/typescript-api/src/dancelight/interfaces/types-lookup.ts b/typescript-api/src/dancelight/interfaces/types-lookup.ts index 60b2773bd..c106648b3 100644 --- a/typescript-api/src/dancelight/interfaces/types-lookup.ts +++ b/typescript-api/src/dancelight/interfaces/types-lookup.ts @@ -626,7 +626,37 @@ declare module "@polkadot/types/lookup" { | "AssignmentStopped"; } - /** @name PalletSessionEvent (54) */ + /** @name PalletExternalValidatorsEvent (54) */ + interface PalletExternalValidatorsEvent extends Enum { + readonly isWhitelistedValidatorAdded: boolean; + readonly asWhitelistedValidatorAdded: { + readonly accountId: AccountId32; + } & Struct; + readonly isWhitelistedValidatorRemoved: boolean; + readonly asWhitelistedValidatorRemoved: { + readonly accountId: AccountId32; + } & Struct; + readonly isNewEra: boolean; + readonly asNewEra: { + readonly era: u32; + } & Struct; + readonly isForceEra: boolean; + readonly asForceEra: { + readonly mode: PalletExternalValidatorsForcing; + } & Struct; + readonly type: "WhitelistedValidatorAdded" | "WhitelistedValidatorRemoved" | "NewEra" | "ForceEra"; + } + + /** @name PalletExternalValidatorsForcing (55) */ + interface PalletExternalValidatorsForcing extends Enum { + readonly isNotForcing: boolean; + readonly isForceNew: boolean; + readonly isForceNone: boolean; + readonly isForceAlways: boolean; + readonly type: "NotForcing" | "ForceNew" | "ForceNone" | "ForceAlways"; + } + + /** @name PalletSessionEvent (56) */ interface PalletSessionEvent extends Enum { readonly isNewSession: boolean; readonly asNewSession: { @@ -635,7 +665,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NewSession"; } - /** @name PalletGrandpaEvent (55) */ + /** @name PalletGrandpaEvent (57) */ interface PalletGrandpaEvent extends Enum { readonly isNewAuthorities: boolean; readonly asNewAuthorities: { @@ -646,10 +676,10 @@ declare module "@polkadot/types/lookup" { readonly type: "NewAuthorities" | "Paused" | "Resumed"; } - /** @name SpConsensusGrandpaAppPublic (58) */ + /** @name SpConsensusGrandpaAppPublic (60) */ interface SpConsensusGrandpaAppPublic extends U8aFixed {} - /** @name PalletInflationRewardsEvent (59) */ + /** @name PalletInflationRewardsEvent (61) */ interface PalletInflationRewardsEvent extends Enum { readonly isRewardedOrchestrator: boolean; readonly asRewardedOrchestrator: { @@ -665,7 +695,7 @@ declare module "@polkadot/types/lookup" { readonly type: "RewardedOrchestrator" | "RewardedContainer"; } - /** @name PalletTreasuryEvent (60) */ + /** @name PalletTreasuryEvent (62) */ interface PalletTreasuryEvent extends Enum { readonly isSpending: boolean; readonly asSpending: { @@ -742,7 +772,7 @@ declare module "@polkadot/types/lookup" { | "SpendProcessed"; } - /** @name PalletConvictionVotingEvent (62) */ + /** @name PalletConvictionVotingEvent (64) */ interface PalletConvictionVotingEvent extends Enum { readonly isDelegated: boolean; readonly asDelegated: ITuple<[AccountId32, AccountId32]>; @@ -751,7 +781,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Delegated" | "Undelegated"; } - /** @name PalletReferendaEvent (63) */ + /** @name PalletReferendaEvent (65) */ interface PalletReferendaEvent extends Enum { readonly isSubmitted: boolean; readonly asSubmitted: { @@ -855,7 +885,7 @@ declare module "@polkadot/types/lookup" { | "MetadataCleared"; } - /** @name FrameSupportPreimagesBounded (65) */ + /** @name FrameSupportPreimagesBounded (67) */ interface FrameSupportPreimagesBounded extends Enum { readonly isLegacy: boolean; readonly asLegacy: { @@ -871,7 +901,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Legacy" | "Inline" | "Lookup"; } - /** @name FrameSystemCall (67) */ + /** @name FrameSystemCall (69) */ interface FrameSystemCall extends Enum { readonly isRemark: boolean; readonly asRemark: { @@ -932,7 +962,7 @@ declare module "@polkadot/types/lookup" { | "ApplyAuthorizedUpgrade"; } - /** @name PalletBabeCall (71) */ + /** @name PalletBabeCall (73) */ interface PalletBabeCall extends Enum { readonly isReportEquivocation: boolean; readonly asReportEquivocation: { @@ -951,7 +981,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ReportEquivocation" | "ReportEquivocationUnsigned" | "PlanConfigChange"; } - /** @name SpConsensusSlotsEquivocationProof (72) */ + /** @name SpConsensusSlotsEquivocationProof (74) */ interface SpConsensusSlotsEquivocationProof extends Struct { readonly offender: SpConsensusBabeAppPublic; readonly slot: u64; @@ -959,7 +989,7 @@ declare module "@polkadot/types/lookup" { readonly secondHeader: SpRuntimeHeader; } - /** @name SpRuntimeHeader (73) */ + /** @name SpRuntimeHeader (75) */ interface SpRuntimeHeader extends Struct { readonly parentHash: H256; readonly number: Compact; @@ -968,17 +998,17 @@ declare module "@polkadot/types/lookup" { readonly digest: SpRuntimeDigest; } - /** @name SpConsensusBabeAppPublic (75) */ + /** @name SpConsensusBabeAppPublic (77) */ interface SpConsensusBabeAppPublic extends U8aFixed {} - /** @name SpSessionMembershipProof (76) */ + /** @name SpSessionMembershipProof (78) */ interface SpSessionMembershipProof extends Struct { readonly session: u32; readonly trieNodes: Vec; readonly validatorCount: u32; } - /** @name SpConsensusBabeDigestsNextConfigDescriptor (77) */ + /** @name SpConsensusBabeDigestsNextConfigDescriptor (79) */ interface SpConsensusBabeDigestsNextConfigDescriptor extends Enum { readonly isV1: boolean; readonly asV1: { @@ -988,7 +1018,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V1"; } - /** @name SpConsensusBabeAllowedSlots (79) */ + /** @name SpConsensusBabeAllowedSlots (81) */ interface SpConsensusBabeAllowedSlots extends Enum { readonly isPrimarySlots: boolean; readonly isPrimaryAndSecondaryPlainSlots: boolean; @@ -996,7 +1026,7 @@ declare module "@polkadot/types/lookup" { readonly type: "PrimarySlots" | "PrimaryAndSecondaryPlainSlots" | "PrimaryAndSecondaryVRFSlots"; } - /** @name PalletTimestampCall (80) */ + /** @name PalletTimestampCall (82) */ interface PalletTimestampCall extends Enum { readonly isSet: boolean; readonly asSet: { @@ -1005,7 +1035,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Set"; } - /** @name PalletBalancesCall (81) */ + /** @name PalletBalancesCall (83) */ interface PalletBalancesCall extends Enum { readonly isTransferAllowDeath: boolean; readonly asTransferAllowDeath: { @@ -1064,14 +1094,14 @@ declare module "@polkadot/types/lookup" { | "Burn"; } - /** @name PalletBalancesAdjustmentDirection (87) */ + /** @name PalletBalancesAdjustmentDirection (89) */ interface PalletBalancesAdjustmentDirection extends Enum { readonly isIncrease: boolean; readonly isDecrease: boolean; readonly type: "Increase" | "Decrease"; } - /** @name PalletParametersCall (88) */ + /** @name PalletParametersCall (90) */ interface PalletParametersCall extends Enum { readonly isSetParameter: boolean; readonly asSetParameter: { @@ -1080,14 +1110,14 @@ declare module "@polkadot/types/lookup" { readonly type: "SetParameter"; } - /** @name DancelightRuntimeRuntimeParameters (89) */ + /** @name DancelightRuntimeRuntimeParameters (91) */ interface DancelightRuntimeRuntimeParameters extends Enum { readonly isPreimage: boolean; readonly asPreimage: DancelightRuntimeDynamicParamsPreimageParameters; readonly type: "Preimage"; } - /** @name DancelightRuntimeDynamicParamsPreimageParameters (90) */ + /** @name DancelightRuntimeDynamicParamsPreimageParameters (92) */ interface DancelightRuntimeDynamicParamsPreimageParameters extends Enum { readonly isBaseDeposit: boolean; readonly asBaseDeposit: ITuple<[DancelightRuntimeDynamicParamsPreimageBaseDeposit, Option]>; @@ -1096,7 +1126,7 @@ declare module "@polkadot/types/lookup" { readonly type: "BaseDeposit" | "ByteDeposit"; } - /** @name PalletRegistrarCall (91) */ + /** @name PalletRegistrarCall (93) */ interface PalletRegistrarCall extends Enum { readonly isRegister: boolean; readonly asRegister: { @@ -1166,7 +1196,7 @@ declare module "@polkadot/types/lookup" { | "DeregisterWithRelayProof"; } - /** @name DpContainerChainGenesisDataContainerChainGenesisData (92) */ + /** @name DpContainerChainGenesisDataContainerChainGenesisData (94) */ interface DpContainerChainGenesisDataContainerChainGenesisData extends Struct { readonly storage: Vec; readonly name: Bytes; @@ -1176,42 +1206,42 @@ declare module "@polkadot/types/lookup" { readonly properties: DpContainerChainGenesisDataProperties; } - /** @name DpContainerChainGenesisDataContainerChainGenesisDataItem (94) */ + /** @name DpContainerChainGenesisDataContainerChainGenesisDataItem (96) */ interface DpContainerChainGenesisDataContainerChainGenesisDataItem extends Struct { readonly key: Bytes; readonly value: Bytes; } - /** @name DpContainerChainGenesisDataProperties (96) */ + /** @name DpContainerChainGenesisDataProperties (98) */ interface DpContainerChainGenesisDataProperties extends Struct { readonly tokenMetadata: DpContainerChainGenesisDataTokenMetadata; readonly isEthereum: bool; } - /** @name DpContainerChainGenesisDataTokenMetadata (97) */ + /** @name DpContainerChainGenesisDataTokenMetadata (99) */ interface DpContainerChainGenesisDataTokenMetadata extends Struct { readonly tokenSymbol: Bytes; readonly ss58Format: u32; readonly tokenDecimals: u32; } - /** @name TpTraitsSlotFrequency (101) */ + /** @name TpTraitsSlotFrequency (103) */ interface TpTraitsSlotFrequency extends Struct { readonly min: u32; readonly max: u32; } - /** @name TpTraitsParathreadParams (103) */ + /** @name TpTraitsParathreadParams (105) */ interface TpTraitsParathreadParams extends Struct { readonly slotFrequency: TpTraitsSlotFrequency; } - /** @name SpTrieStorageProof (104) */ + /** @name SpTrieStorageProof (106) */ interface SpTrieStorageProof extends Struct { readonly trieNodes: BTreeSet; } - /** @name SpRuntimeMultiSignature (106) */ + /** @name SpRuntimeMultiSignature (108) */ interface SpRuntimeMultiSignature extends Enum { readonly isEd25519: boolean; readonly asEd25519: U8aFixed; @@ -1222,7 +1252,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Ed25519" | "Sr25519" | "Ecdsa"; } - /** @name PalletConfigurationCall (109) */ + /** @name PalletConfigurationCall (111) */ interface PalletConfigurationCall extends Enum { readonly isSetMaxCollators: boolean; readonly asSetMaxCollators: { @@ -1277,7 +1307,7 @@ declare module "@polkadot/types/lookup" { | "SetBypassConsistencyCheck"; } - /** @name PalletInvulnerablesCall (112) */ + /** @name PalletInvulnerablesCall (114) */ interface PalletInvulnerablesCall extends Enum { readonly isAddInvulnerable: boolean; readonly asAddInvulnerable: { @@ -1290,13 +1320,13 @@ declare module "@polkadot/types/lookup" { readonly type: "AddInvulnerable" | "RemoveInvulnerable"; } - /** @name PalletCollatorAssignmentCall (113) */ + /** @name PalletCollatorAssignmentCall (115) */ type PalletCollatorAssignmentCall = Null; - /** @name PalletAuthorityAssignmentCall (114) */ + /** @name PalletAuthorityAssignmentCall (116) */ type PalletAuthorityAssignmentCall = Null; - /** @name PalletAuthorNotingCall (115) */ + /** @name PalletAuthorNotingCall (117) */ interface PalletAuthorNotingCall extends Enum { readonly isSetLatestAuthorData: boolean; readonly asSetLatestAuthorData: { @@ -1316,7 +1346,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SetLatestAuthorData" | "SetAuthor" | "KillAuthorData"; } - /** @name PalletServicesPaymentCall (116) */ + /** @name PalletServicesPaymentCall (118) */ interface PalletServicesPaymentCall extends Enum { readonly isPurchaseCredits: boolean; readonly asPurchaseCredits: { @@ -1363,7 +1393,7 @@ declare module "@polkadot/types/lookup" { | "SetMaxTip"; } - /** @name PalletDataPreserversCall (117) */ + /** @name PalletDataPreserversCall (119) */ interface PalletDataPreserversCall extends Enum { readonly isCreateProfile: boolean; readonly asCreateProfile: { @@ -1421,7 +1451,7 @@ declare module "@polkadot/types/lookup" { | "ForceStartAssignment"; } - /** @name PalletDataPreserversProfile (118) */ + /** @name PalletDataPreserversProfile (120) */ interface PalletDataPreserversProfile extends Struct { readonly url: Bytes; readonly paraIds: PalletDataPreserversParaIdsFilter; @@ -1429,7 +1459,7 @@ declare module "@polkadot/types/lookup" { readonly assignmentRequest: DancelightRuntimePreserversAssignmentPaymentRequest; } - /** @name PalletDataPreserversParaIdsFilter (120) */ + /** @name PalletDataPreserversParaIdsFilter (122) */ interface PalletDataPreserversParaIdsFilter extends Enum { readonly isAnyParaId: boolean; readonly isWhitelist: boolean; @@ -1439,7 +1469,7 @@ declare module "@polkadot/types/lookup" { readonly type: "AnyParaId" | "Whitelist" | "Blacklist"; } - /** @name PalletDataPreserversProfileMode (124) */ + /** @name PalletDataPreserversProfileMode (126) */ interface PalletDataPreserversProfileMode extends Enum { readonly isBootnode: boolean; readonly isRpc: boolean; @@ -1449,25 +1479,51 @@ declare module "@polkadot/types/lookup" { readonly type: "Bootnode" | "Rpc"; } - /** @name DancelightRuntimePreserversAssignmentPaymentRequest (125) */ + /** @name DancelightRuntimePreserversAssignmentPaymentRequest (127) */ interface DancelightRuntimePreserversAssignmentPaymentRequest extends Enum { readonly isFree: boolean; readonly type: "Free"; } - /** @name DancelightRuntimePreserversAssignmentPaymentExtra (126) */ + /** @name DancelightRuntimePreserversAssignmentPaymentExtra (128) */ interface DancelightRuntimePreserversAssignmentPaymentExtra extends Enum { readonly isFree: boolean; readonly type: "Free"; } - /** @name DancelightRuntimePreserversAssignmentPaymentWitness (127) */ + /** @name DancelightRuntimePreserversAssignmentPaymentWitness (129) */ interface DancelightRuntimePreserversAssignmentPaymentWitness extends Enum { readonly isFree: boolean; readonly type: "Free"; } - /** @name PalletSessionCall (128) */ + /** @name PalletExternalValidatorsCall (130) */ + interface PalletExternalValidatorsCall extends Enum { + readonly isSkipExternalValidators: boolean; + readonly asSkipExternalValidators: { + readonly skip: bool; + } & Struct; + readonly isAddWhitelisted: boolean; + readonly asAddWhitelisted: { + readonly who: AccountId32; + } & Struct; + readonly isRemoveWhitelisted: boolean; + readonly asRemoveWhitelisted: { + readonly who: AccountId32; + } & Struct; + readonly isForceNoEras: boolean; + readonly isForceNewEra: boolean; + readonly isForceNewEraAlways: boolean; + readonly type: + | "SkipExternalValidators" + | "AddWhitelisted" + | "RemoveWhitelisted" + | "ForceNoEras" + | "ForceNewEra" + | "ForceNewEraAlways"; + } + + /** @name PalletSessionCall (131) */ interface PalletSessionCall extends Enum { readonly isSetKeys: boolean; readonly asSetKeys: { @@ -1478,7 +1534,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SetKeys" | "PurgeKeys"; } - /** @name DancelightRuntimeSessionKeys (129) */ + /** @name DancelightRuntimeSessionKeys (132) */ interface DancelightRuntimeSessionKeys extends Struct { readonly grandpa: SpConsensusGrandpaAppPublic; readonly babe: SpConsensusBabeAppPublic; @@ -1489,22 +1545,22 @@ declare module "@polkadot/types/lookup" { readonly nimbus: NimbusPrimitivesNimbusCryptoPublic; } - /** @name PolkadotPrimitivesV7ValidatorAppPublic (130) */ + /** @name PolkadotPrimitivesV7ValidatorAppPublic (133) */ interface PolkadotPrimitivesV7ValidatorAppPublic extends U8aFixed {} - /** @name PolkadotPrimitivesV7AssignmentAppPublic (131) */ + /** @name PolkadotPrimitivesV7AssignmentAppPublic (134) */ interface PolkadotPrimitivesV7AssignmentAppPublic extends U8aFixed {} - /** @name SpAuthorityDiscoveryAppPublic (132) */ + /** @name SpAuthorityDiscoveryAppPublic (135) */ interface SpAuthorityDiscoveryAppPublic extends U8aFixed {} - /** @name SpConsensusBeefyEcdsaCryptoPublic (133) */ + /** @name SpConsensusBeefyEcdsaCryptoPublic (136) */ interface SpConsensusBeefyEcdsaCryptoPublic extends U8aFixed {} - /** @name NimbusPrimitivesNimbusCryptoPublic (135) */ + /** @name NimbusPrimitivesNimbusCryptoPublic (138) */ interface NimbusPrimitivesNimbusCryptoPublic extends U8aFixed {} - /** @name PalletGrandpaCall (136) */ + /** @name PalletGrandpaCall (139) */ interface PalletGrandpaCall extends Enum { readonly isReportEquivocation: boolean; readonly asReportEquivocation: { @@ -1524,13 +1580,13 @@ declare module "@polkadot/types/lookup" { readonly type: "ReportEquivocation" | "ReportEquivocationUnsigned" | "NoteStalled"; } - /** @name SpConsensusGrandpaEquivocationProof (137) */ + /** @name SpConsensusGrandpaEquivocationProof (140) */ interface SpConsensusGrandpaEquivocationProof extends Struct { readonly setId: u64; readonly equivocation: SpConsensusGrandpaEquivocation; } - /** @name SpConsensusGrandpaEquivocation (138) */ + /** @name SpConsensusGrandpaEquivocation (141) */ interface SpConsensusGrandpaEquivocation extends Enum { readonly isPrevote: boolean; readonly asPrevote: FinalityGrandpaEquivocationPrevote; @@ -1539,7 +1595,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Prevote" | "Precommit"; } - /** @name FinalityGrandpaEquivocationPrevote (139) */ + /** @name FinalityGrandpaEquivocationPrevote (142) */ interface FinalityGrandpaEquivocationPrevote extends Struct { readonly roundNumber: u64; readonly identity: SpConsensusGrandpaAppPublic; @@ -1547,16 +1603,16 @@ declare module "@polkadot/types/lookup" { readonly second: ITuple<[FinalityGrandpaPrevote, SpConsensusGrandpaAppSignature]>; } - /** @name FinalityGrandpaPrevote (140) */ + /** @name FinalityGrandpaPrevote (143) */ interface FinalityGrandpaPrevote extends Struct { readonly targetHash: H256; readonly targetNumber: u32; } - /** @name SpConsensusGrandpaAppSignature (141) */ + /** @name SpConsensusGrandpaAppSignature (144) */ interface SpConsensusGrandpaAppSignature extends U8aFixed {} - /** @name FinalityGrandpaEquivocationPrecommit (143) */ + /** @name FinalityGrandpaEquivocationPrecommit (146) */ interface FinalityGrandpaEquivocationPrecommit extends Struct { readonly roundNumber: u64; readonly identity: SpConsensusGrandpaAppPublic; @@ -1564,13 +1620,13 @@ declare module "@polkadot/types/lookup" { readonly second: ITuple<[FinalityGrandpaPrecommit, SpConsensusGrandpaAppSignature]>; } - /** @name FinalityGrandpaPrecommit (144) */ + /** @name FinalityGrandpaPrecommit (147) */ interface FinalityGrandpaPrecommit extends Struct { readonly targetHash: H256; readonly targetNumber: u32; } - /** @name PalletTreasuryCall (146) */ + /** @name PalletTreasuryCall (149) */ interface PalletTreasuryCall extends Enum { readonly isSpendLocal: boolean; readonly asSpendLocal: { @@ -1603,7 +1659,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SpendLocal" | "RemoveApproval" | "Spend" | "Payout" | "CheckStatus" | "VoidSpend"; } - /** @name PalletConvictionVotingCall (148) */ + /** @name PalletConvictionVotingCall (151) */ interface PalletConvictionVotingCall extends Enum { readonly isVote: boolean; readonly asVote: { @@ -1640,7 +1696,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Vote" | "Delegate" | "Undelegate" | "Unlock" | "RemoveVote" | "RemoveOtherVote"; } - /** @name PalletConvictionVotingVoteAccountVote (149) */ + /** @name PalletConvictionVotingVoteAccountVote (152) */ interface PalletConvictionVotingVoteAccountVote extends Enum { readonly isStandard: boolean; readonly asStandard: { @@ -1661,7 +1717,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Standard" | "Split" | "SplitAbstain"; } - /** @name PalletConvictionVotingConviction (151) */ + /** @name PalletConvictionVotingConviction (154) */ interface PalletConvictionVotingConviction extends Enum { readonly isNone: boolean; readonly isLocked1x: boolean; @@ -1673,7 +1729,7 @@ declare module "@polkadot/types/lookup" { readonly type: "None" | "Locked1x" | "Locked2x" | "Locked3x" | "Locked4x" | "Locked5x" | "Locked6x"; } - /** @name PalletReferendaCall (153) */ + /** @name PalletReferendaCall (156) */ interface PalletReferendaCall extends Enum { readonly isSubmit: boolean; readonly asSubmit: { @@ -1726,7 +1782,7 @@ declare module "@polkadot/types/lookup" { | "SetMetadata"; } - /** @name DancelightRuntimeOriginCaller (154) */ + /** @name DancelightRuntimeOriginCaller (157) */ interface DancelightRuntimeOriginCaller extends Enum { readonly isSystem: boolean; readonly asSystem: FrameSupportDispatchRawOrigin; @@ -1740,7 +1796,7 @@ declare module "@polkadot/types/lookup" { readonly type: "System" | "Void" | "Origins" | "ParachainsOrigin" | "XcmPallet"; } - /** @name FrameSupportDispatchRawOrigin (155) */ + /** @name FrameSupportDispatchRawOrigin (158) */ interface FrameSupportDispatchRawOrigin extends Enum { readonly isRoot: boolean; readonly isSigned: boolean; @@ -1749,7 +1805,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Root" | "Signed" | "None"; } - /** @name DancelightRuntimeGovernanceOriginsPalletCustomOriginsOrigin (156) */ + /** @name DancelightRuntimeGovernanceOriginsPalletCustomOriginsOrigin (159) */ interface DancelightRuntimeGovernanceOriginsPalletCustomOriginsOrigin extends Enum { readonly isStakingAdmin: boolean; readonly isTreasurer: boolean; @@ -1808,14 +1864,14 @@ declare module "@polkadot/types/lookup" { | "Fellowship9Dan"; } - /** @name PolkadotRuntimeParachainsOriginPalletOrigin (157) */ + /** @name PolkadotRuntimeParachainsOriginPalletOrigin (160) */ interface PolkadotRuntimeParachainsOriginPalletOrigin extends Enum { readonly isParachain: boolean; readonly asParachain: u32; readonly type: "Parachain"; } - /** @name PalletXcmOrigin (158) */ + /** @name PalletXcmOrigin (161) */ interface PalletXcmOrigin extends Enum { readonly isXcm: boolean; readonly asXcm: StagingXcmV4Location; @@ -1824,13 +1880,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Xcm" | "Response"; } - /** @name StagingXcmV4Location (159) */ + /** @name StagingXcmV4Location (162) */ interface StagingXcmV4Location extends Struct { readonly parents: u8; readonly interior: StagingXcmV4Junctions; } - /** @name StagingXcmV4Junctions (160) */ + /** @name StagingXcmV4Junctions (163) */ interface StagingXcmV4Junctions extends Enum { readonly isHere: boolean; readonly isX1: boolean; @@ -1852,7 +1908,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "X1" | "X2" | "X3" | "X4" | "X5" | "X6" | "X7" | "X8"; } - /** @name StagingXcmV4Junction (162) */ + /** @name StagingXcmV4Junction (165) */ interface StagingXcmV4Junction extends Enum { readonly isParachain: boolean; readonly asParachain: Compact; @@ -1901,7 +1957,7 @@ declare module "@polkadot/types/lookup" { | "GlobalConsensus"; } - /** @name StagingXcmV4JunctionNetworkId (164) */ + /** @name StagingXcmV4JunctionNetworkId (167) */ interface StagingXcmV4JunctionNetworkId extends Enum { readonly isByGenesis: boolean; readonly asByGenesis: U8aFixed; @@ -1936,7 +1992,7 @@ declare module "@polkadot/types/lookup" { | "PolkadotBulletin"; } - /** @name XcmV3JunctionBodyId (165) */ + /** @name XcmV3JunctionBodyId (168) */ interface XcmV3JunctionBodyId extends Enum { readonly isUnit: boolean; readonly isMoniker: boolean; @@ -1963,7 +2019,7 @@ declare module "@polkadot/types/lookup" { | "Treasury"; } - /** @name XcmV3JunctionBodyPart (166) */ + /** @name XcmV3JunctionBodyPart (169) */ interface XcmV3JunctionBodyPart extends Enum { readonly isVoice: boolean; readonly isMembers: boolean; @@ -1988,10 +2044,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Voice" | "Members" | "Fraction" | "AtLeastProportion" | "MoreThanProportion"; } - /** @name SpCoreVoid (174) */ + /** @name SpCoreVoid (177) */ type SpCoreVoid = Null; - /** @name FrameSupportScheduleDispatchTime (175) */ + /** @name FrameSupportScheduleDispatchTime (178) */ interface FrameSupportScheduleDispatchTime extends Enum { readonly isAt: boolean; readonly asAt: u32; @@ -2000,7 +2056,7 @@ declare module "@polkadot/types/lookup" { readonly type: "At" | "After"; } - /** @name PalletRankedCollectiveCall (177) */ + /** @name PalletRankedCollectiveCall (180) */ interface PalletRankedCollectiveCall extends Enum { readonly isAddMember: boolean; readonly asAddMember: { @@ -2044,7 +2100,7 @@ declare module "@polkadot/types/lookup" { | "ExchangeMember"; } - /** @name PalletWhitelistCall (179) */ + /** @name PalletWhitelistCall (182) */ interface PalletWhitelistCall extends Enum { readonly isWhitelistCall: boolean; readonly asWhitelistCall: { @@ -2071,7 +2127,7 @@ declare module "@polkadot/types/lookup" { | "DispatchWhitelistedCallWithPreimage"; } - /** @name PolkadotRuntimeParachainsConfigurationPalletCall (180) */ + /** @name PolkadotRuntimeParachainsConfigurationPalletCall (183) */ interface PolkadotRuntimeParachainsConfigurationPalletCall extends Enum { readonly isSetValidationUpgradeCooldown: boolean; readonly asSetValidationUpgradeCooldown: { @@ -2317,16 +2373,16 @@ declare module "@polkadot/types/lookup" { | "SetSchedulerParams"; } - /** @name PolkadotPrimitivesV7AsyncBackingAsyncBackingParams (181) */ + /** @name PolkadotPrimitivesV7AsyncBackingAsyncBackingParams (184) */ interface PolkadotPrimitivesV7AsyncBackingAsyncBackingParams extends Struct { readonly maxCandidateDepth: u32; readonly allowedAncestryLen: u32; } - /** @name PolkadotPrimitivesV7ExecutorParams (182) */ + /** @name PolkadotPrimitivesV7ExecutorParams (185) */ interface PolkadotPrimitivesV7ExecutorParams extends Vec {} - /** @name PolkadotPrimitivesV7ExecutorParamsExecutorParam (184) */ + /** @name PolkadotPrimitivesV7ExecutorParamsExecutorParam (187) */ interface PolkadotPrimitivesV7ExecutorParamsExecutorParam extends Enum { readonly isMaxMemoryPages: boolean; readonly asMaxMemoryPages: u32; @@ -2351,26 +2407,26 @@ declare module "@polkadot/types/lookup" { | "WasmExtBulkMemory"; } - /** @name PolkadotPrimitivesV7PvfPrepKind (185) */ + /** @name PolkadotPrimitivesV7PvfPrepKind (188) */ interface PolkadotPrimitivesV7PvfPrepKind extends Enum { readonly isPrecheck: boolean; readonly isPrepare: boolean; readonly type: "Precheck" | "Prepare"; } - /** @name PolkadotPrimitivesV7PvfExecKind (186) */ + /** @name PolkadotPrimitivesV7PvfExecKind (189) */ interface PolkadotPrimitivesV7PvfExecKind extends Enum { readonly isBacking: boolean; readonly isApproval: boolean; readonly type: "Backing" | "Approval"; } - /** @name PolkadotPrimitivesV7ApprovalVotingParams (187) */ + /** @name PolkadotPrimitivesV7ApprovalVotingParams (190) */ interface PolkadotPrimitivesV7ApprovalVotingParams extends Struct { readonly maxApprovalCoalesceCount: u32; } - /** @name PolkadotPrimitivesVstagingSchedulerParams (188) */ + /** @name PolkadotPrimitivesVstagingSchedulerParams (191) */ interface PolkadotPrimitivesVstagingSchedulerParams extends Struct { readonly groupRotationFrequency: u32; readonly parasAvailabilityPeriod: u32; @@ -2385,13 +2441,13 @@ declare module "@polkadot/types/lookup" { readonly ttl: u32; } - /** @name PolkadotRuntimeParachainsSharedPalletCall (189) */ + /** @name PolkadotRuntimeParachainsSharedPalletCall (192) */ type PolkadotRuntimeParachainsSharedPalletCall = Null; - /** @name PolkadotRuntimeParachainsInclusionPalletCall (190) */ + /** @name PolkadotRuntimeParachainsInclusionPalletCall (193) */ type PolkadotRuntimeParachainsInclusionPalletCall = Null; - /** @name PolkadotRuntimeParachainsParasInherentPalletCall (191) */ + /** @name PolkadotRuntimeParachainsParasInherentPalletCall (194) */ interface PolkadotRuntimeParachainsParasInherentPalletCall extends Enum { readonly isEnter: boolean; readonly asEnter: { @@ -2400,7 +2456,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Enter"; } - /** @name PolkadotPrimitivesV7InherentData (192) */ + /** @name PolkadotPrimitivesV7InherentData (195) */ interface PolkadotPrimitivesV7InherentData extends Struct { readonly bitfields: Vec; readonly backedCandidates: Vec; @@ -2408,33 +2464,33 @@ declare module "@polkadot/types/lookup" { readonly parentHeader: SpRuntimeHeader; } - /** @name PolkadotPrimitivesV7SignedUncheckedSigned (194) */ + /** @name PolkadotPrimitivesV7SignedUncheckedSigned (197) */ interface PolkadotPrimitivesV7SignedUncheckedSigned extends Struct { readonly payload: BitVec; readonly validatorIndex: u32; readonly signature: PolkadotPrimitivesV7ValidatorAppSignature; } - /** @name BitvecOrderLsb0 (197) */ + /** @name BitvecOrderLsb0 (200) */ type BitvecOrderLsb0 = Null; - /** @name PolkadotPrimitivesV7ValidatorAppSignature (199) */ + /** @name PolkadotPrimitivesV7ValidatorAppSignature (202) */ interface PolkadotPrimitivesV7ValidatorAppSignature extends U8aFixed {} - /** @name PolkadotPrimitivesV7BackedCandidate (201) */ + /** @name PolkadotPrimitivesV7BackedCandidate (204) */ interface PolkadotPrimitivesV7BackedCandidate extends Struct { readonly candidate: PolkadotPrimitivesV7CommittedCandidateReceipt; readonly validityVotes: Vec; readonly validatorIndices: BitVec; } - /** @name PolkadotPrimitivesV7CommittedCandidateReceipt (202) */ + /** @name PolkadotPrimitivesV7CommittedCandidateReceipt (205) */ interface PolkadotPrimitivesV7CommittedCandidateReceipt extends Struct { readonly descriptor: PolkadotPrimitivesV7CandidateDescriptor; readonly commitments: PolkadotPrimitivesV7CandidateCommitments; } - /** @name PolkadotPrimitivesV7CandidateDescriptor (203) */ + /** @name PolkadotPrimitivesV7CandidateDescriptor (206) */ interface PolkadotPrimitivesV7CandidateDescriptor extends Struct { readonly paraId: u32; readonly relayParent: H256; @@ -2447,13 +2503,13 @@ declare module "@polkadot/types/lookup" { readonly validationCodeHash: H256; } - /** @name PolkadotPrimitivesV7CollatorAppPublic (204) */ + /** @name PolkadotPrimitivesV7CollatorAppPublic (207) */ interface PolkadotPrimitivesV7CollatorAppPublic extends U8aFixed {} - /** @name PolkadotPrimitivesV7CollatorAppSignature (205) */ + /** @name PolkadotPrimitivesV7CollatorAppSignature (208) */ interface PolkadotPrimitivesV7CollatorAppSignature extends U8aFixed {} - /** @name PolkadotPrimitivesV7CandidateCommitments (207) */ + /** @name PolkadotPrimitivesV7CandidateCommitments (210) */ interface PolkadotPrimitivesV7CandidateCommitments extends Struct { readonly upwardMessages: Vec; readonly horizontalMessages: Vec; @@ -2463,13 +2519,13 @@ declare module "@polkadot/types/lookup" { readonly hrmpWatermark: u32; } - /** @name PolkadotCorePrimitivesOutboundHrmpMessage (210) */ + /** @name PolkadotCorePrimitivesOutboundHrmpMessage (213) */ interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct { readonly recipient: u32; readonly data: Bytes; } - /** @name PolkadotPrimitivesV7ValidityAttestation (215) */ + /** @name PolkadotPrimitivesV7ValidityAttestation (218) */ interface PolkadotPrimitivesV7ValidityAttestation extends Enum { readonly isImplicit: boolean; readonly asImplicit: PolkadotPrimitivesV7ValidatorAppSignature; @@ -2478,7 +2534,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Implicit" | "Explicit"; } - /** @name PolkadotPrimitivesV7DisputeStatementSet (217) */ + /** @name PolkadotPrimitivesV7DisputeStatementSet (220) */ interface PolkadotPrimitivesV7DisputeStatementSet extends Struct { readonly candidateHash: H256; readonly session: u32; @@ -2487,7 +2543,7 @@ declare module "@polkadot/types/lookup" { >; } - /** @name PolkadotPrimitivesV7DisputeStatement (221) */ + /** @name PolkadotPrimitivesV7DisputeStatement (224) */ interface PolkadotPrimitivesV7DisputeStatement extends Enum { readonly isValid: boolean; readonly asValid: PolkadotPrimitivesV7ValidDisputeStatementKind; @@ -2496,7 +2552,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Valid" | "Invalid"; } - /** @name PolkadotPrimitivesV7ValidDisputeStatementKind (222) */ + /** @name PolkadotPrimitivesV7ValidDisputeStatementKind (225) */ interface PolkadotPrimitivesV7ValidDisputeStatementKind extends Enum { readonly isExplicit: boolean; readonly isBackingSeconded: boolean; @@ -2514,13 +2570,13 @@ declare module "@polkadot/types/lookup" { | "ApprovalCheckingMultipleCandidates"; } - /** @name PolkadotPrimitivesV7InvalidDisputeStatementKind (224) */ + /** @name PolkadotPrimitivesV7InvalidDisputeStatementKind (227) */ interface PolkadotPrimitivesV7InvalidDisputeStatementKind extends Enum { readonly isExplicit: boolean; readonly type: "Explicit"; } - /** @name PolkadotRuntimeParachainsParasPalletCall (225) */ + /** @name PolkadotRuntimeParachainsParasPalletCall (228) */ interface PolkadotRuntimeParachainsParasPalletCall extends Enum { readonly isForceSetCurrentCode: boolean; readonly asForceSetCurrentCode: { @@ -2577,7 +2633,7 @@ declare module "@polkadot/types/lookup" { | "ForceSetMostRecentContext"; } - /** @name PolkadotPrimitivesV7PvfCheckStatement (226) */ + /** @name PolkadotPrimitivesV7PvfCheckStatement (229) */ interface PolkadotPrimitivesV7PvfCheckStatement extends Struct { readonly accept: bool; readonly subject: H256; @@ -2585,7 +2641,7 @@ declare module "@polkadot/types/lookup" { readonly validatorIndex: u32; } - /** @name PolkadotRuntimeParachainsInitializerPalletCall (227) */ + /** @name PolkadotRuntimeParachainsInitializerPalletCall (230) */ interface PolkadotRuntimeParachainsInitializerPalletCall extends Enum { readonly isForceApprove: boolean; readonly asForceApprove: { @@ -2594,7 +2650,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ForceApprove"; } - /** @name PolkadotRuntimeParachainsHrmpPalletCall (228) */ + /** @name PolkadotRuntimeParachainsHrmpPalletCall (231) */ interface PolkadotRuntimeParachainsHrmpPalletCall extends Enum { readonly isHrmpInitOpenChannel: boolean; readonly asHrmpInitOpenChannel: { @@ -2664,19 +2720,19 @@ declare module "@polkadot/types/lookup" { | "EstablishChannelWithSystem"; } - /** @name PolkadotParachainPrimitivesPrimitivesHrmpChannelId (229) */ + /** @name PolkadotParachainPrimitivesPrimitivesHrmpChannelId (232) */ interface PolkadotParachainPrimitivesPrimitivesHrmpChannelId extends Struct { readonly sender: u32; readonly recipient: u32; } - /** @name PolkadotRuntimeParachainsDisputesPalletCall (230) */ + /** @name PolkadotRuntimeParachainsDisputesPalletCall (233) */ interface PolkadotRuntimeParachainsDisputesPalletCall extends Enum { readonly isForceUnfreeze: boolean; readonly type: "ForceUnfreeze"; } - /** @name PolkadotRuntimeParachainsDisputesSlashingPalletCall (231) */ + /** @name PolkadotRuntimeParachainsDisputesSlashingPalletCall (234) */ interface PolkadotRuntimeParachainsDisputesSlashingPalletCall extends Enum { readonly isReportDisputeLostUnsigned: boolean; readonly asReportDisputeLostUnsigned: { @@ -2686,7 +2742,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ReportDisputeLostUnsigned"; } - /** @name PolkadotPrimitivesV7SlashingDisputeProof (232) */ + /** @name PolkadotPrimitivesV7SlashingDisputeProof (235) */ interface PolkadotPrimitivesV7SlashingDisputeProof extends Struct { readonly timeSlot: PolkadotPrimitivesV7SlashingDisputesTimeSlot; readonly kind: PolkadotPrimitivesV7SlashingSlashingOffenceKind; @@ -2694,20 +2750,20 @@ declare module "@polkadot/types/lookup" { readonly validatorId: PolkadotPrimitivesV7ValidatorAppPublic; } - /** @name PolkadotPrimitivesV7SlashingDisputesTimeSlot (233) */ + /** @name PolkadotPrimitivesV7SlashingDisputesTimeSlot (236) */ interface PolkadotPrimitivesV7SlashingDisputesTimeSlot extends Struct { readonly sessionIndex: u32; readonly candidateHash: H256; } - /** @name PolkadotPrimitivesV7SlashingSlashingOffenceKind (234) */ + /** @name PolkadotPrimitivesV7SlashingSlashingOffenceKind (237) */ interface PolkadotPrimitivesV7SlashingSlashingOffenceKind extends Enum { readonly isForInvalid: boolean; readonly isAgainstValid: boolean; readonly type: "ForInvalid" | "AgainstValid"; } - /** @name PalletMessageQueueCall (235) */ + /** @name PalletMessageQueueCall (238) */ interface PalletMessageQueueCall extends Enum { readonly isReapPage: boolean; readonly asReapPage: { @@ -2724,21 +2780,21 @@ declare module "@polkadot/types/lookup" { readonly type: "ReapPage" | "ExecuteOverweight"; } - /** @name PolkadotRuntimeParachainsInclusionAggregateMessageOrigin (236) */ + /** @name PolkadotRuntimeParachainsInclusionAggregateMessageOrigin (239) */ interface PolkadotRuntimeParachainsInclusionAggregateMessageOrigin extends Enum { readonly isUmp: boolean; readonly asUmp: PolkadotRuntimeParachainsInclusionUmpQueueId; readonly type: "Ump"; } - /** @name PolkadotRuntimeParachainsInclusionUmpQueueId (237) */ + /** @name PolkadotRuntimeParachainsInclusionUmpQueueId (240) */ interface PolkadotRuntimeParachainsInclusionUmpQueueId extends Enum { readonly isPara: boolean; readonly asPara: u32; readonly type: "Para"; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletCall (238) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletCall (241) */ interface PolkadotRuntimeParachainsAssignerOnDemandPalletCall extends Enum { readonly isPlaceOrderAllowDeath: boolean; readonly asPlaceOrderAllowDeath: { @@ -2753,7 +2809,7 @@ declare module "@polkadot/types/lookup" { readonly type: "PlaceOrderAllowDeath" | "PlaceOrderKeepAlive"; } - /** @name PolkadotRuntimeCommonParasRegistrarPalletCall (239) */ + /** @name PolkadotRuntimeCommonParasRegistrarPalletCall (242) */ interface PolkadotRuntimeCommonParasRegistrarPalletCall extends Enum { readonly isRegister: boolean; readonly asRegister: { @@ -2809,7 +2865,7 @@ declare module "@polkadot/types/lookup" { | "SetCurrentHead"; } - /** @name PalletUtilityCall (240) */ + /** @name PalletUtilityCall (243) */ interface PalletUtilityCall extends Enum { readonly isBatch: boolean; readonly asBatch: { @@ -2841,7 +2897,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Batch" | "AsDerivative" | "BatchAll" | "DispatchAs" | "ForceBatch" | "WithWeight"; } - /** @name PalletIdentityCall (242) */ + /** @name PalletIdentityCall (245) */ interface PalletIdentityCall extends Enum { readonly isAddRegistrar: boolean; readonly asAddRegistrar: { @@ -2963,7 +3019,7 @@ declare module "@polkadot/types/lookup" { | "RemoveDanglingUsername"; } - /** @name PalletIdentityLegacyIdentityInfo (243) */ + /** @name PalletIdentityLegacyIdentityInfo (246) */ interface PalletIdentityLegacyIdentityInfo extends Struct { readonly additional: Vec>; readonly display: Data; @@ -2976,7 +3032,7 @@ declare module "@polkadot/types/lookup" { readonly twitter: Data; } - /** @name PalletIdentityJudgement (280) */ + /** @name PalletIdentityJudgement (283) */ interface PalletIdentityJudgement extends Enum { readonly isUnknown: boolean; readonly isFeePaid: boolean; @@ -2989,7 +3045,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unknown" | "FeePaid" | "Reasonable" | "KnownGood" | "OutOfDate" | "LowQuality" | "Erroneous"; } - /** @name PalletSchedulerCall (283) */ + /** @name PalletSchedulerCall (286) */ interface PalletSchedulerCall extends Enum { readonly isSchedule: boolean; readonly asSchedule: { @@ -3063,7 +3119,7 @@ declare module "@polkadot/types/lookup" { | "CancelRetryNamed"; } - /** @name PalletProxyCall (286) */ + /** @name PalletProxyCall (289) */ interface PalletProxyCall extends Enum { readonly isProxy: boolean; readonly asProxy: { @@ -3133,7 +3189,7 @@ declare module "@polkadot/types/lookup" { | "ProxyAnnounced"; } - /** @name DancelightRuntimeProxyType (288) */ + /** @name DancelightRuntimeProxyType (291) */ interface DancelightRuntimeProxyType extends Enum { readonly isAny: boolean; readonly isNonTransfer: boolean; @@ -3152,7 +3208,7 @@ declare module "@polkadot/types/lookup" { | "OnDemandOrdering"; } - /** @name PalletMultisigCall (289) */ + /** @name PalletMultisigCall (292) */ interface PalletMultisigCall extends Enum { readonly isAsMultiThreshold1: boolean; readonly asAsMultiThreshold1: { @@ -3185,13 +3241,13 @@ declare module "@polkadot/types/lookup" { readonly type: "AsMultiThreshold1" | "AsMulti" | "ApproveAsMulti" | "CancelAsMulti"; } - /** @name PalletMultisigTimepoint (291) */ + /** @name PalletMultisigTimepoint (294) */ interface PalletMultisigTimepoint extends Struct { readonly height: u32; readonly index: u32; } - /** @name PalletPreimageCall (292) */ + /** @name PalletPreimageCall (295) */ interface PalletPreimageCall extends Enum { readonly isNotePreimage: boolean; readonly asNotePreimage: { @@ -3216,7 +3272,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NotePreimage" | "UnnotePreimage" | "RequestPreimage" | "UnrequestPreimage" | "EnsureUpdated"; } - /** @name PalletAssetRateCall (294) */ + /** @name PalletAssetRateCall (297) */ interface PalletAssetRateCall extends Enum { readonly isCreate: boolean; readonly asCreate: { @@ -3235,7 +3291,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Create" | "Update" | "Remove"; } - /** @name PalletXcmCall (296) */ + /** @name PalletXcmCall (299) */ interface PalletXcmCall extends Enum { readonly isSend: boolean; readonly asSend: { @@ -3338,7 +3394,7 @@ declare module "@polkadot/types/lookup" { | "TransferAssetsUsingTypeAndThen"; } - /** @name XcmVersionedLocation (297) */ + /** @name XcmVersionedLocation (300) */ interface XcmVersionedLocation extends Enum { readonly isV2: boolean; readonly asV2: XcmV2MultiLocation; @@ -3349,13 +3405,13 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name XcmV2MultiLocation (298) */ + /** @name XcmV2MultiLocation (301) */ interface XcmV2MultiLocation extends Struct { readonly parents: u8; readonly interior: XcmV2MultilocationJunctions; } - /** @name XcmV2MultilocationJunctions (299) */ + /** @name XcmV2MultilocationJunctions (302) */ interface XcmV2MultilocationJunctions extends Enum { readonly isHere: boolean; readonly isX1: boolean; @@ -3392,7 +3448,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "X1" | "X2" | "X3" | "X4" | "X5" | "X6" | "X7" | "X8"; } - /** @name XcmV2Junction (300) */ + /** @name XcmV2Junction (303) */ interface XcmV2Junction extends Enum { readonly isParachain: boolean; readonly asParachain: Compact; @@ -3435,7 +3491,7 @@ declare module "@polkadot/types/lookup" { | "Plurality"; } - /** @name XcmV2NetworkId (301) */ + /** @name XcmV2NetworkId (304) */ interface XcmV2NetworkId extends Enum { readonly isAny: boolean; readonly isNamed: boolean; @@ -3445,7 +3501,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Any" | "Named" | "Polkadot" | "Kusama"; } - /** @name XcmV2BodyId (303) */ + /** @name XcmV2BodyId (306) */ interface XcmV2BodyId extends Enum { readonly isUnit: boolean; readonly isNamed: boolean; @@ -3472,7 +3528,7 @@ declare module "@polkadot/types/lookup" { | "Treasury"; } - /** @name XcmV2BodyPart (304) */ + /** @name XcmV2BodyPart (307) */ interface XcmV2BodyPart extends Enum { readonly isVoice: boolean; readonly isMembers: boolean; @@ -3497,13 +3553,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Voice" | "Members" | "Fraction" | "AtLeastProportion" | "MoreThanProportion"; } - /** @name StagingXcmV3MultiLocation (305) */ + /** @name StagingXcmV3MultiLocation (308) */ interface StagingXcmV3MultiLocation extends Struct { readonly parents: u8; readonly interior: XcmV3Junctions; } - /** @name XcmV3Junctions (306) */ + /** @name XcmV3Junctions (309) */ interface XcmV3Junctions extends Enum { readonly isHere: boolean; readonly isX1: boolean; @@ -3540,7 +3596,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "X1" | "X2" | "X3" | "X4" | "X5" | "X6" | "X7" | "X8"; } - /** @name XcmV3Junction (307) */ + /** @name XcmV3Junction (310) */ interface XcmV3Junction extends Enum { readonly isParachain: boolean; readonly asParachain: Compact; @@ -3589,7 +3645,7 @@ declare module "@polkadot/types/lookup" { | "GlobalConsensus"; } - /** @name XcmV3JunctionNetworkId (309) */ + /** @name XcmV3JunctionNetworkId (312) */ interface XcmV3JunctionNetworkId extends Enum { readonly isByGenesis: boolean; readonly asByGenesis: U8aFixed; @@ -3624,7 +3680,7 @@ declare module "@polkadot/types/lookup" { | "PolkadotBulletin"; } - /** @name XcmVersionedXcm (310) */ + /** @name XcmVersionedXcm (313) */ interface XcmVersionedXcm extends Enum { readonly isV2: boolean; readonly asV2: XcmV2Xcm; @@ -3635,10 +3691,10 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name XcmV2Xcm (311) */ + /** @name XcmV2Xcm (314) */ interface XcmV2Xcm extends Vec {} - /** @name XcmV2Instruction (313) */ + /** @name XcmV2Instruction (316) */ interface XcmV2Instruction extends Enum { readonly isWithdrawAsset: boolean; readonly asWithdrawAsset: XcmV2MultiassetMultiAssets; @@ -3786,16 +3842,16 @@ declare module "@polkadot/types/lookup" { | "UnsubscribeVersion"; } - /** @name XcmV2MultiassetMultiAssets (314) */ + /** @name XcmV2MultiassetMultiAssets (317) */ interface XcmV2MultiassetMultiAssets extends Vec {} - /** @name XcmV2MultiAsset (316) */ + /** @name XcmV2MultiAsset (319) */ interface XcmV2MultiAsset extends Struct { readonly id: XcmV2MultiassetAssetId; readonly fun: XcmV2MultiassetFungibility; } - /** @name XcmV2MultiassetAssetId (317) */ + /** @name XcmV2MultiassetAssetId (320) */ interface XcmV2MultiassetAssetId extends Enum { readonly isConcrete: boolean; readonly asConcrete: XcmV2MultiLocation; @@ -3804,7 +3860,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Concrete" | "Abstract"; } - /** @name XcmV2MultiassetFungibility (318) */ + /** @name XcmV2MultiassetFungibility (321) */ interface XcmV2MultiassetFungibility extends Enum { readonly isFungible: boolean; readonly asFungible: Compact; @@ -3813,7 +3869,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV2MultiassetAssetInstance (319) */ + /** @name XcmV2MultiassetAssetInstance (322) */ interface XcmV2MultiassetAssetInstance extends Enum { readonly isUndefined: boolean; readonly isIndex: boolean; @@ -3831,7 +3887,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Undefined" | "Index" | "Array4" | "Array8" | "Array16" | "Array32" | "Blob"; } - /** @name XcmV2Response (320) */ + /** @name XcmV2Response (323) */ interface XcmV2Response extends Enum { readonly isNull: boolean; readonly isAssets: boolean; @@ -3843,7 +3899,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Null" | "Assets" | "ExecutionResult" | "Version"; } - /** @name XcmV2TraitsError (323) */ + /** @name XcmV2TraitsError (326) */ interface XcmV2TraitsError extends Enum { readonly isOverflow: boolean; readonly isUnimplemented: boolean; @@ -3902,7 +3958,7 @@ declare module "@polkadot/types/lookup" { | "WeightNotComputable"; } - /** @name XcmV2OriginKind (324) */ + /** @name XcmV2OriginKind (327) */ interface XcmV2OriginKind extends Enum { readonly isNative: boolean; readonly isSovereignAccount: boolean; @@ -3911,12 +3967,12 @@ declare module "@polkadot/types/lookup" { readonly type: "Native" | "SovereignAccount" | "Superuser" | "Xcm"; } - /** @name XcmDoubleEncoded (325) */ + /** @name XcmDoubleEncoded (328) */ interface XcmDoubleEncoded extends Struct { readonly encoded: Bytes; } - /** @name XcmV2MultiassetMultiAssetFilter (326) */ + /** @name XcmV2MultiassetMultiAssetFilter (329) */ interface XcmV2MultiassetMultiAssetFilter extends Enum { readonly isDefinite: boolean; readonly asDefinite: XcmV2MultiassetMultiAssets; @@ -3925,7 +3981,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Definite" | "Wild"; } - /** @name XcmV2MultiassetWildMultiAsset (327) */ + /** @name XcmV2MultiassetWildMultiAsset (330) */ interface XcmV2MultiassetWildMultiAsset extends Enum { readonly isAll: boolean; readonly isAllOf: boolean; @@ -3936,14 +3992,14 @@ declare module "@polkadot/types/lookup" { readonly type: "All" | "AllOf"; } - /** @name XcmV2MultiassetWildFungibility (328) */ + /** @name XcmV2MultiassetWildFungibility (331) */ interface XcmV2MultiassetWildFungibility extends Enum { readonly isFungible: boolean; readonly isNonFungible: boolean; readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV2WeightLimit (329) */ + /** @name XcmV2WeightLimit (332) */ interface XcmV2WeightLimit extends Enum { readonly isUnlimited: boolean; readonly isLimited: boolean; @@ -3951,10 +4007,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Unlimited" | "Limited"; } - /** @name XcmV3Xcm (330) */ + /** @name XcmV3Xcm (333) */ interface XcmV3Xcm extends Vec {} - /** @name XcmV3Instruction (332) */ + /** @name XcmV3Instruction (335) */ interface XcmV3Instruction extends Enum { readonly isWithdrawAsset: boolean; readonly asWithdrawAsset: XcmV3MultiassetMultiAssets; @@ -4184,16 +4240,16 @@ declare module "@polkadot/types/lookup" { | "UnpaidExecution"; } - /** @name XcmV3MultiassetMultiAssets (333) */ + /** @name XcmV3MultiassetMultiAssets (336) */ interface XcmV3MultiassetMultiAssets extends Vec {} - /** @name XcmV3MultiAsset (335) */ + /** @name XcmV3MultiAsset (338) */ interface XcmV3MultiAsset extends Struct { readonly id: XcmV3MultiassetAssetId; readonly fun: XcmV3MultiassetFungibility; } - /** @name XcmV3MultiassetAssetId (336) */ + /** @name XcmV3MultiassetAssetId (339) */ interface XcmV3MultiassetAssetId extends Enum { readonly isConcrete: boolean; readonly asConcrete: StagingXcmV3MultiLocation; @@ -4202,7 +4258,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Concrete" | "Abstract"; } - /** @name XcmV3MultiassetFungibility (337) */ + /** @name XcmV3MultiassetFungibility (340) */ interface XcmV3MultiassetFungibility extends Enum { readonly isFungible: boolean; readonly asFungible: Compact; @@ -4211,7 +4267,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV3MultiassetAssetInstance (338) */ + /** @name XcmV3MultiassetAssetInstance (341) */ interface XcmV3MultiassetAssetInstance extends Enum { readonly isUndefined: boolean; readonly isIndex: boolean; @@ -4227,7 +4283,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Undefined" | "Index" | "Array4" | "Array8" | "Array16" | "Array32"; } - /** @name XcmV3Response (339) */ + /** @name XcmV3Response (342) */ interface XcmV3Response extends Enum { readonly isNull: boolean; readonly isAssets: boolean; @@ -4243,7 +4299,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Null" | "Assets" | "ExecutionResult" | "Version" | "PalletsInfo" | "DispatchResult"; } - /** @name XcmV3TraitsError (342) */ + /** @name XcmV3TraitsError (345) */ interface XcmV3TraitsError extends Enum { readonly isOverflow: boolean; readonly isUnimplemented: boolean; @@ -4330,7 +4386,7 @@ declare module "@polkadot/types/lookup" { | "ExceedsStackLimit"; } - /** @name XcmV3PalletInfo (344) */ + /** @name XcmV3PalletInfo (347) */ interface XcmV3PalletInfo extends Struct { readonly index: Compact; readonly name: Bytes; @@ -4340,7 +4396,7 @@ declare module "@polkadot/types/lookup" { readonly patch: Compact; } - /** @name XcmV3MaybeErrorCode (347) */ + /** @name XcmV3MaybeErrorCode (350) */ interface XcmV3MaybeErrorCode extends Enum { readonly isSuccess: boolean; readonly isError: boolean; @@ -4350,7 +4406,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Success" | "Error" | "TruncatedError"; } - /** @name XcmV3OriginKind (350) */ + /** @name XcmV3OriginKind (353) */ interface XcmV3OriginKind extends Enum { readonly isNative: boolean; readonly isSovereignAccount: boolean; @@ -4359,14 +4415,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Native" | "SovereignAccount" | "Superuser" | "Xcm"; } - /** @name XcmV3QueryResponseInfo (351) */ + /** @name XcmV3QueryResponseInfo (354) */ interface XcmV3QueryResponseInfo extends Struct { readonly destination: StagingXcmV3MultiLocation; readonly queryId: Compact; readonly maxWeight: SpWeightsWeightV2Weight; } - /** @name XcmV3MultiassetMultiAssetFilter (352) */ + /** @name XcmV3MultiassetMultiAssetFilter (355) */ interface XcmV3MultiassetMultiAssetFilter extends Enum { readonly isDefinite: boolean; readonly asDefinite: XcmV3MultiassetMultiAssets; @@ -4375,7 +4431,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Definite" | "Wild"; } - /** @name XcmV3MultiassetWildMultiAsset (353) */ + /** @name XcmV3MultiassetWildMultiAsset (356) */ interface XcmV3MultiassetWildMultiAsset extends Enum { readonly isAll: boolean; readonly isAllOf: boolean; @@ -4394,14 +4450,14 @@ declare module "@polkadot/types/lookup" { readonly type: "All" | "AllOf" | "AllCounted" | "AllOfCounted"; } - /** @name XcmV3MultiassetWildFungibility (354) */ + /** @name XcmV3MultiassetWildFungibility (357) */ interface XcmV3MultiassetWildFungibility extends Enum { readonly isFungible: boolean; readonly isNonFungible: boolean; readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV3WeightLimit (355) */ + /** @name XcmV3WeightLimit (358) */ interface XcmV3WeightLimit extends Enum { readonly isUnlimited: boolean; readonly isLimited: boolean; @@ -4409,10 +4465,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Unlimited" | "Limited"; } - /** @name StagingXcmV4Xcm (356) */ + /** @name StagingXcmV4Xcm (359) */ interface StagingXcmV4Xcm extends Vec {} - /** @name StagingXcmV4Instruction (358) */ + /** @name StagingXcmV4Instruction (361) */ interface StagingXcmV4Instruction extends Enum { readonly isWithdrawAsset: boolean; readonly asWithdrawAsset: StagingXcmV4AssetAssets; @@ -4642,19 +4698,19 @@ declare module "@polkadot/types/lookup" { | "UnpaidExecution"; } - /** @name StagingXcmV4AssetAssets (359) */ + /** @name StagingXcmV4AssetAssets (362) */ interface StagingXcmV4AssetAssets extends Vec {} - /** @name StagingXcmV4Asset (361) */ + /** @name StagingXcmV4Asset (364) */ interface StagingXcmV4Asset extends Struct { readonly id: StagingXcmV4AssetAssetId; readonly fun: StagingXcmV4AssetFungibility; } - /** @name StagingXcmV4AssetAssetId (362) */ + /** @name StagingXcmV4AssetAssetId (365) */ interface StagingXcmV4AssetAssetId extends StagingXcmV4Location {} - /** @name StagingXcmV4AssetFungibility (363) */ + /** @name StagingXcmV4AssetFungibility (366) */ interface StagingXcmV4AssetFungibility extends Enum { readonly isFungible: boolean; readonly asFungible: Compact; @@ -4663,7 +4719,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Fungible" | "NonFungible"; } - /** @name StagingXcmV4AssetAssetInstance (364) */ + /** @name StagingXcmV4AssetAssetInstance (367) */ interface StagingXcmV4AssetAssetInstance extends Enum { readonly isUndefined: boolean; readonly isIndex: boolean; @@ -4679,7 +4735,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Undefined" | "Index" | "Array4" | "Array8" | "Array16" | "Array32"; } - /** @name StagingXcmV4Response (365) */ + /** @name StagingXcmV4Response (368) */ interface StagingXcmV4Response extends Enum { readonly isNull: boolean; readonly isAssets: boolean; @@ -4695,7 +4751,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Null" | "Assets" | "ExecutionResult" | "Version" | "PalletsInfo" | "DispatchResult"; } - /** @name StagingXcmV4PalletInfo (367) */ + /** @name StagingXcmV4PalletInfo (370) */ interface StagingXcmV4PalletInfo extends Struct { readonly index: Compact; readonly name: Bytes; @@ -4705,14 +4761,14 @@ declare module "@polkadot/types/lookup" { readonly patch: Compact; } - /** @name StagingXcmV4QueryResponseInfo (371) */ + /** @name StagingXcmV4QueryResponseInfo (374) */ interface StagingXcmV4QueryResponseInfo extends Struct { readonly destination: StagingXcmV4Location; readonly queryId: Compact; readonly maxWeight: SpWeightsWeightV2Weight; } - /** @name StagingXcmV4AssetAssetFilter (372) */ + /** @name StagingXcmV4AssetAssetFilter (375) */ interface StagingXcmV4AssetAssetFilter extends Enum { readonly isDefinite: boolean; readonly asDefinite: StagingXcmV4AssetAssets; @@ -4721,7 +4777,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Definite" | "Wild"; } - /** @name StagingXcmV4AssetWildAsset (373) */ + /** @name StagingXcmV4AssetWildAsset (376) */ interface StagingXcmV4AssetWildAsset extends Enum { readonly isAll: boolean; readonly isAllOf: boolean; @@ -4740,14 +4796,14 @@ declare module "@polkadot/types/lookup" { readonly type: "All" | "AllOf" | "AllCounted" | "AllOfCounted"; } - /** @name StagingXcmV4AssetWildFungibility (374) */ + /** @name StagingXcmV4AssetWildFungibility (377) */ interface StagingXcmV4AssetWildFungibility extends Enum { readonly isFungible: boolean; readonly isNonFungible: boolean; readonly type: "Fungible" | "NonFungible"; } - /** @name XcmVersionedAssets (375) */ + /** @name XcmVersionedAssets (378) */ interface XcmVersionedAssets extends Enum { readonly isV2: boolean; readonly asV2: XcmV2MultiassetMultiAssets; @@ -4758,7 +4814,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name StagingXcmExecutorAssetTransferTransferType (387) */ + /** @name StagingXcmExecutorAssetTransferTransferType (390) */ interface StagingXcmExecutorAssetTransferTransferType extends Enum { readonly isTeleport: boolean; readonly isLocalReserve: boolean; @@ -4768,7 +4824,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Teleport" | "LocalReserve" | "DestinationReserve" | "RemoteReserve"; } - /** @name XcmVersionedAssetId (388) */ + /** @name XcmVersionedAssetId (391) */ interface XcmVersionedAssetId extends Enum { readonly isV3: boolean; readonly asV3: XcmV3MultiassetAssetId; @@ -4777,33 +4833,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V3" | "V4"; } - /** @name PalletExternalValidatorsCall (389) */ - interface PalletExternalValidatorsCall extends Enum { - readonly isSkipExternalValidators: boolean; - readonly asSkipExternalValidators: { - readonly skip: bool; - } & Struct; - readonly isAddWhitelisted: boolean; - readonly asAddWhitelisted: { - readonly who: AccountId32; - } & Struct; - readonly isRemoveWhitelisted: boolean; - readonly asRemoveWhitelisted: { - readonly who: AccountId32; - } & Struct; - readonly isForceNoEras: boolean; - readonly isForceNewEra: boolean; - readonly isForceNewEraAlways: boolean; - readonly type: - | "SkipExternalValidators" - | "AddWhitelisted" - | "RemoveWhitelisted" - | "ForceNoEras" - | "ForceNewEra" - | "ForceNewEraAlways"; - } - - /** @name PalletMigrationsCall (390) */ + /** @name PalletMigrationsCall (392) */ interface PalletMigrationsCall extends Enum { readonly isForceSetCursor: boolean; readonly asForceSetCursor: { @@ -4823,7 +4853,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ForceSetCursor" | "ForceSetActiveCursor" | "ForceOnboardMbms" | "ClearHistoric"; } - /** @name PalletMigrationsMigrationCursor (392) */ + /** @name PalletMigrationsMigrationCursor (394) */ interface PalletMigrationsMigrationCursor extends Enum { readonly isActive: boolean; readonly asActive: PalletMigrationsActiveCursor; @@ -4831,14 +4861,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Active" | "Stuck"; } - /** @name PalletMigrationsActiveCursor (394) */ + /** @name PalletMigrationsActiveCursor (396) */ interface PalletMigrationsActiveCursor extends Struct { readonly index: u32; readonly innerCursor: Option; readonly startedAt: u32; } - /** @name PalletMigrationsHistoricCleanupSelector (396) */ + /** @name PalletMigrationsHistoricCleanupSelector (398) */ interface PalletMigrationsHistoricCleanupSelector extends Enum { readonly isSpecific: boolean; readonly asSpecific: Vec; @@ -4850,7 +4880,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Specific" | "Wildcard"; } - /** @name PalletBeefyCall (399) */ + /** @name PalletBeefyCall (401) */ interface PalletBeefyCall extends Enum { readonly isReportDoubleVoting: boolean; readonly asReportDoubleVoting: { @@ -4896,40 +4926,40 @@ declare module "@polkadot/types/lookup" { | "ReportFutureBlockVotingUnsigned"; } - /** @name SpConsensusBeefyDoubleVotingProof (400) */ + /** @name SpConsensusBeefyDoubleVotingProof (402) */ interface SpConsensusBeefyDoubleVotingProof extends Struct { readonly first: SpConsensusBeefyVoteMessage; readonly second: SpConsensusBeefyVoteMessage; } - /** @name SpConsensusBeefyEcdsaCryptoSignature (401) */ + /** @name SpConsensusBeefyEcdsaCryptoSignature (403) */ interface SpConsensusBeefyEcdsaCryptoSignature extends U8aFixed {} - /** @name SpConsensusBeefyVoteMessage (402) */ + /** @name SpConsensusBeefyVoteMessage (404) */ interface SpConsensusBeefyVoteMessage extends Struct { readonly commitment: SpConsensusBeefyCommitment; readonly id: SpConsensusBeefyEcdsaCryptoPublic; readonly signature: SpConsensusBeefyEcdsaCryptoSignature; } - /** @name SpConsensusBeefyCommitment (403) */ + /** @name SpConsensusBeefyCommitment (405) */ interface SpConsensusBeefyCommitment extends Struct { readonly payload: SpConsensusBeefyPayload; readonly blockNumber: u32; readonly validatorSetId: u64; } - /** @name SpConsensusBeefyPayload (404) */ + /** @name SpConsensusBeefyPayload (406) */ interface SpConsensusBeefyPayload extends Vec> {} - /** @name SpConsensusBeefyForkVotingProof (407) */ + /** @name SpConsensusBeefyForkVotingProof (409) */ interface SpConsensusBeefyForkVotingProof extends Struct { readonly vote: SpConsensusBeefyVoteMessage; readonly ancestryProof: SpMmrPrimitivesAncestryProof; readonly header: SpRuntimeHeader; } - /** @name SpMmrPrimitivesAncestryProof (408) */ + /** @name SpMmrPrimitivesAncestryProof (410) */ interface SpMmrPrimitivesAncestryProof extends Struct { readonly prevPeaks: Vec; readonly prevLeafCount: u64; @@ -4937,12 +4967,12 @@ declare module "@polkadot/types/lookup" { readonly items: Vec>; } - /** @name SpConsensusBeefyFutureBlockVotingProof (411) */ + /** @name SpConsensusBeefyFutureBlockVotingProof (413) */ interface SpConsensusBeefyFutureBlockVotingProof extends Struct { readonly vote: SpConsensusBeefyVoteMessage; } - /** @name SnowbridgePalletEthereumClientCall (412) */ + /** @name SnowbridgePalletEthereumClientCall (414) */ interface SnowbridgePalletEthereumClientCall extends Enum { readonly isForceCheckpoint: boolean; readonly asForceCheckpoint: { @@ -4959,7 +4989,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ForceCheckpoint" | "Submit" | "SetOperatingMode"; } - /** @name SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate (413) */ + /** @name SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate (415) */ interface SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate extends Struct { readonly header: SnowbridgeBeaconPrimitivesBeaconHeader; readonly currentSyncCommittee: SnowbridgeBeaconPrimitivesSyncCommittee; @@ -4969,7 +4999,7 @@ declare module "@polkadot/types/lookup" { readonly blockRootsBranch: Vec; } - /** @name SnowbridgeBeaconPrimitivesBeaconHeader (414) */ + /** @name SnowbridgeBeaconPrimitivesBeaconHeader (416) */ interface SnowbridgeBeaconPrimitivesBeaconHeader extends Struct { readonly slot: u64; readonly proposerIndex: u64; @@ -4978,16 +5008,16 @@ declare module "@polkadot/types/lookup" { readonly bodyRoot: H256; } - /** @name SnowbridgeBeaconPrimitivesSyncCommittee (415) */ + /** @name SnowbridgeBeaconPrimitivesSyncCommittee (417) */ interface SnowbridgeBeaconPrimitivesSyncCommittee extends Struct { readonly pubkeys: Vec; readonly aggregatePubkey: SnowbridgeBeaconPrimitivesPublicKey; } - /** @name SnowbridgeBeaconPrimitivesPublicKey (417) */ + /** @name SnowbridgeBeaconPrimitivesPublicKey (419) */ interface SnowbridgeBeaconPrimitivesPublicKey extends U8aFixed {} - /** @name SnowbridgeBeaconPrimitivesUpdatesUpdate (419) */ + /** @name SnowbridgeBeaconPrimitivesUpdatesUpdate (421) */ interface SnowbridgeBeaconPrimitivesUpdatesUpdate extends Struct { readonly attestedHeader: SnowbridgeBeaconPrimitivesBeaconHeader; readonly syncAggregate: SnowbridgeBeaconPrimitivesSyncAggregate; @@ -4999,29 +5029,29 @@ declare module "@polkadot/types/lookup" { readonly blockRootsBranch: Vec; } - /** @name SnowbridgeBeaconPrimitivesSyncAggregate (420) */ + /** @name SnowbridgeBeaconPrimitivesSyncAggregate (422) */ interface SnowbridgeBeaconPrimitivesSyncAggregate extends Struct { readonly syncCommitteeBits: U8aFixed; readonly syncCommitteeSignature: SnowbridgeBeaconPrimitivesSignature; } - /** @name SnowbridgeBeaconPrimitivesSignature (421) */ + /** @name SnowbridgeBeaconPrimitivesSignature (423) */ interface SnowbridgeBeaconPrimitivesSignature extends U8aFixed {} - /** @name SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate (424) */ + /** @name SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate (426) */ interface SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate extends Struct { readonly nextSyncCommittee: SnowbridgeBeaconPrimitivesSyncCommittee; readonly nextSyncCommitteeBranch: Vec; } - /** @name SnowbridgeCoreOperatingModeBasicOperatingMode (425) */ + /** @name SnowbridgeCoreOperatingModeBasicOperatingMode (427) */ interface SnowbridgeCoreOperatingModeBasicOperatingMode extends Enum { readonly isNormal: boolean; readonly isHalted: boolean; readonly type: "Normal" | "Halted"; } - /** @name PolkadotRuntimeCommonParasSudoWrapperPalletCall (426) */ + /** @name PolkadotRuntimeCommonParasSudoWrapperPalletCall (428) */ interface PolkadotRuntimeCommonParasSudoWrapperPalletCall extends Enum { readonly isSudoScheduleParaInitialize: boolean; readonly asSudoScheduleParaInitialize: { @@ -5061,14 +5091,14 @@ declare module "@polkadot/types/lookup" { | "SudoEstablishHrmpChannel"; } - /** @name PolkadotRuntimeParachainsParasParaGenesisArgs (427) */ + /** @name PolkadotRuntimeParachainsParasParaGenesisArgs (429) */ interface PolkadotRuntimeParachainsParasParaGenesisArgs extends Struct { readonly genesisHead: Bytes; readonly validationCode: Bytes; readonly paraKind: bool; } - /** @name PalletRootTestingCall (428) */ + /** @name PalletRootTestingCall (430) */ interface PalletRootTestingCall extends Enum { readonly isFillBlock: boolean; readonly asFillBlock: { @@ -5078,7 +5108,7 @@ declare module "@polkadot/types/lookup" { readonly type: "FillBlock" | "TriggerDefensive"; } - /** @name PalletSudoCall (429) */ + /** @name PalletSudoCall (431) */ interface PalletSudoCall extends Enum { readonly isSudo: boolean; readonly asSudo: { @@ -5102,17 +5132,17 @@ declare module "@polkadot/types/lookup" { readonly type: "Sudo" | "SudoUncheckedWeight" | "SetKey" | "SudoAs" | "RemoveKey"; } - /** @name SpRuntimeBlakeTwo256 (430) */ + /** @name SpRuntimeBlakeTwo256 (432) */ type SpRuntimeBlakeTwo256 = Null; - /** @name PalletConvictionVotingTally (432) */ + /** @name PalletConvictionVotingTally (434) */ interface PalletConvictionVotingTally extends Struct { readonly ayes: u128; readonly nays: u128; readonly support: u128; } - /** @name PalletRankedCollectiveEvent (433) */ + /** @name PalletRankedCollectiveEvent (435) */ interface PalletRankedCollectiveEvent extends Enum { readonly isMemberAdded: boolean; readonly asMemberAdded: { @@ -5143,7 +5173,7 @@ declare module "@polkadot/types/lookup" { readonly type: "MemberAdded" | "RankChanged" | "MemberRemoved" | "Voted" | "MemberExchanged"; } - /** @name PalletRankedCollectiveVoteRecord (434) */ + /** @name PalletRankedCollectiveVoteRecord (436) */ interface PalletRankedCollectiveVoteRecord extends Enum { readonly isAye: boolean; readonly asAye: u32; @@ -5152,14 +5182,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Aye" | "Nay"; } - /** @name PalletRankedCollectiveTally (435) */ + /** @name PalletRankedCollectiveTally (437) */ interface PalletRankedCollectiveTally extends Struct { readonly bareAyes: u32; readonly ayes: u32; readonly nays: u32; } - /** @name PalletWhitelistEvent (437) */ + /** @name PalletWhitelistEvent (439) */ interface PalletWhitelistEvent extends Enum { readonly isCallWhitelisted: boolean; readonly asCallWhitelisted: { @@ -5177,19 +5207,19 @@ declare module "@polkadot/types/lookup" { readonly type: "CallWhitelisted" | "WhitelistedCallRemoved" | "WhitelistedCallDispatched"; } - /** @name FrameSupportDispatchPostDispatchInfo (439) */ + /** @name FrameSupportDispatchPostDispatchInfo (441) */ interface FrameSupportDispatchPostDispatchInfo extends Struct { readonly actualWeight: Option; readonly paysFee: FrameSupportDispatchPays; } - /** @name SpRuntimeDispatchErrorWithPostInfo (441) */ + /** @name SpRuntimeDispatchErrorWithPostInfo (443) */ interface SpRuntimeDispatchErrorWithPostInfo extends Struct { readonly postInfo: FrameSupportDispatchPostDispatchInfo; readonly error: SpRuntimeDispatchError; } - /** @name PolkadotRuntimeParachainsInclusionPalletEvent (442) */ + /** @name PolkadotRuntimeParachainsInclusionPalletEvent (444) */ interface PolkadotRuntimeParachainsInclusionPalletEvent extends Enum { readonly isCandidateBacked: boolean; readonly asCandidateBacked: ITuple<[PolkadotPrimitivesV7CandidateReceipt, Bytes, u32, u32]>; @@ -5205,13 +5235,13 @@ declare module "@polkadot/types/lookup" { readonly type: "CandidateBacked" | "CandidateIncluded" | "CandidateTimedOut" | "UpwardMessagesReceived"; } - /** @name PolkadotPrimitivesV7CandidateReceipt (443) */ + /** @name PolkadotPrimitivesV7CandidateReceipt (445) */ interface PolkadotPrimitivesV7CandidateReceipt extends Struct { readonly descriptor: PolkadotPrimitivesV7CandidateDescriptor; readonly commitmentsHash: H256; } - /** @name PolkadotRuntimeParachainsParasPalletEvent (446) */ + /** @name PolkadotRuntimeParachainsParasPalletEvent (448) */ interface PolkadotRuntimeParachainsParasPalletEvent extends Enum { readonly isCurrentCodeUpdated: boolean; readonly asCurrentCodeUpdated: u32; @@ -5240,7 +5270,7 @@ declare module "@polkadot/types/lookup" { | "PvfCheckRejected"; } - /** @name PolkadotRuntimeParachainsHrmpPalletEvent (447) */ + /** @name PolkadotRuntimeParachainsHrmpPalletEvent (449) */ interface PolkadotRuntimeParachainsHrmpPalletEvent extends Enum { readonly isOpenChannelRequested: boolean; readonly asOpenChannelRequested: { @@ -5293,7 +5323,7 @@ declare module "@polkadot/types/lookup" { | "OpenChannelDepositsUpdated"; } - /** @name PolkadotRuntimeParachainsDisputesPalletEvent (448) */ + /** @name PolkadotRuntimeParachainsDisputesPalletEvent (450) */ interface PolkadotRuntimeParachainsDisputesPalletEvent extends Enum { readonly isDisputeInitiated: boolean; readonly asDisputeInitiated: ITuple<[H256, PolkadotRuntimeParachainsDisputesDisputeLocation]>; @@ -5304,21 +5334,21 @@ declare module "@polkadot/types/lookup" { readonly type: "DisputeInitiated" | "DisputeConcluded" | "Revert"; } - /** @name PolkadotRuntimeParachainsDisputesDisputeLocation (449) */ + /** @name PolkadotRuntimeParachainsDisputesDisputeLocation (451) */ interface PolkadotRuntimeParachainsDisputesDisputeLocation extends Enum { readonly isLocal: boolean; readonly isRemote: boolean; readonly type: "Local" | "Remote"; } - /** @name PolkadotRuntimeParachainsDisputesDisputeResult (450) */ + /** @name PolkadotRuntimeParachainsDisputesDisputeResult (452) */ interface PolkadotRuntimeParachainsDisputesDisputeResult extends Enum { readonly isValid: boolean; readonly isInvalid: boolean; readonly type: "Valid" | "Invalid"; } - /** @name PalletMessageQueueEvent (451) */ + /** @name PalletMessageQueueEvent (453) */ interface PalletMessageQueueEvent extends Enum { readonly isProcessingFailed: boolean; readonly asProcessingFailed: { @@ -5348,7 +5378,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ProcessingFailed" | "Processed" | "OverweightEnqueued" | "PageReaped"; } - /** @name FrameSupportMessagesProcessMessageError (452) */ + /** @name FrameSupportMessagesProcessMessageError (454) */ interface FrameSupportMessagesProcessMessageError extends Enum { readonly isBadFormat: boolean; readonly isCorrupt: boolean; @@ -5360,7 +5390,7 @@ declare module "@polkadot/types/lookup" { readonly type: "BadFormat" | "Corrupt" | "Unsupported" | "Overweight" | "Yield" | "StackLimitReached"; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletEvent (453) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletEvent (455) */ interface PolkadotRuntimeParachainsAssignerOnDemandPalletEvent extends Enum { readonly isOnDemandOrderPlaced: boolean; readonly asOnDemandOrderPlaced: { @@ -5375,7 +5405,7 @@ declare module "@polkadot/types/lookup" { readonly type: "OnDemandOrderPlaced" | "SpotPriceSet"; } - /** @name PolkadotRuntimeCommonParasRegistrarPalletEvent (454) */ + /** @name PolkadotRuntimeCommonParasRegistrarPalletEvent (456) */ interface PolkadotRuntimeCommonParasRegistrarPalletEvent extends Enum { readonly isRegistered: boolean; readonly asRegistered: { @@ -5399,7 +5429,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Registered" | "Deregistered" | "Reserved" | "Swapped"; } - /** @name PalletUtilityEvent (455) */ + /** @name PalletUtilityEvent (457) */ interface PalletUtilityEvent extends Enum { readonly isBatchInterrupted: boolean; readonly asBatchInterrupted: { @@ -5426,7 +5456,7 @@ declare module "@polkadot/types/lookup" { | "DispatchedAs"; } - /** @name PalletIdentityEvent (457) */ + /** @name PalletIdentityEvent (459) */ interface PalletIdentityEvent extends Enum { readonly isIdentitySet: boolean; readonly asIdentitySet: { @@ -5532,7 +5562,7 @@ declare module "@polkadot/types/lookup" { | "DanglingUsernameRemoved"; } - /** @name PalletSchedulerEvent (458) */ + /** @name PalletSchedulerEvent (460) */ interface PalletSchedulerEvent extends Enum { readonly isScheduled: boolean; readonly asScheduled: { @@ -5594,7 +5624,7 @@ declare module "@polkadot/types/lookup" { | "PermanentlyOverweight"; } - /** @name PalletProxyEvent (460) */ + /** @name PalletProxyEvent (462) */ interface PalletProxyEvent extends Enum { readonly isProxyExecuted: boolean; readonly asProxyExecuted: { @@ -5630,7 +5660,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ProxyExecuted" | "PureCreated" | "Announced" | "ProxyAdded" | "ProxyRemoved"; } - /** @name PalletMultisigEvent (461) */ + /** @name PalletMultisigEvent (463) */ interface PalletMultisigEvent extends Enum { readonly isNewMultisig: boolean; readonly asNewMultisig: { @@ -5663,7 +5693,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NewMultisig" | "MultisigApproval" | "MultisigExecuted" | "MultisigCancelled"; } - /** @name PalletPreimageEvent (462) */ + /** @name PalletPreimageEvent (464) */ interface PalletPreimageEvent extends Enum { readonly isNoted: boolean; readonly asNoted: { @@ -5680,7 +5710,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Noted" | "Requested" | "Cleared"; } - /** @name PalletAssetRateEvent (463) */ + /** @name PalletAssetRateEvent (465) */ interface PalletAssetRateEvent extends Enum { readonly isAssetRateCreated: boolean; readonly asAssetRateCreated: { @@ -5700,7 +5730,7 @@ declare module "@polkadot/types/lookup" { readonly type: "AssetRateCreated" | "AssetRateRemoved" | "AssetRateUpdated"; } - /** @name PalletXcmEvent (464) */ + /** @name PalletXcmEvent (466) */ interface PalletXcmEvent extends Enum { readonly isAttempted: boolean; readonly asAttempted: { @@ -5865,7 +5895,7 @@ declare module "@polkadot/types/lookup" { | "VersionMigrationFinished"; } - /** @name StagingXcmV4TraitsOutcome (465) */ + /** @name StagingXcmV4TraitsOutcome (467) */ interface StagingXcmV4TraitsOutcome extends Enum { readonly isComplete: boolean; readonly asComplete: { @@ -5883,36 +5913,6 @@ declare module "@polkadot/types/lookup" { readonly type: "Complete" | "Incomplete" | "Error"; } - /** @name PalletExternalValidatorsEvent (466) */ - interface PalletExternalValidatorsEvent extends Enum { - readonly isWhitelistedValidatorAdded: boolean; - readonly asWhitelistedValidatorAdded: { - readonly accountId: AccountId32; - } & Struct; - readonly isWhitelistedValidatorRemoved: boolean; - readonly asWhitelistedValidatorRemoved: { - readonly accountId: AccountId32; - } & Struct; - readonly isNewEra: boolean; - readonly asNewEra: { - readonly era: u32; - } & Struct; - readonly isForceEra: boolean; - readonly asForceEra: { - readonly mode: PalletExternalValidatorsForcing; - } & Struct; - readonly type: "WhitelistedValidatorAdded" | "WhitelistedValidatorRemoved" | "NewEra" | "ForceEra"; - } - - /** @name PalletExternalValidatorsForcing (467) */ - interface PalletExternalValidatorsForcing extends Enum { - readonly isNotForcing: boolean; - readonly isForceNew: boolean; - readonly isForceNone: boolean; - readonly isForceAlways: boolean; - readonly type: "NotForcing" | "ForceNew" | "ForceNone" | "ForceAlways"; - } - /** @name PalletMigrationsEvent (468) */ interface PalletMigrationsEvent extends Enum { readonly isRuntimeUpgradeStarted: boolean; @@ -6397,10 +6397,31 @@ declare module "@polkadot/types/lookup" { | "CantDeleteAssignedProfile"; } - /** @name SpCoreCryptoKeyTypeId (571) */ + /** @name TpTraitsActiveEraInfo (569) */ + interface TpTraitsActiveEraInfo extends Struct { + readonly index: u32; + readonly start: Option; + } + + /** @name PalletExternalValidatorsError (571) */ + interface PalletExternalValidatorsError extends Enum { + readonly isTooManyInvulnerables: boolean; + readonly isAlreadyInvulnerable: boolean; + readonly isNotInvulnerable: boolean; + readonly isNoKeysRegistered: boolean; + readonly isUnableToDeriveCollatorId: boolean; + readonly type: + | "TooManyInvulnerables" + | "AlreadyInvulnerable" + | "NotInvulnerable" + | "NoKeysRegistered" + | "UnableToDeriveCollatorId"; + } + + /** @name SpCoreCryptoKeyTypeId (576) */ interface SpCoreCryptoKeyTypeId extends U8aFixed {} - /** @name PalletSessionError (572) */ + /** @name PalletSessionError (577) */ interface PalletSessionError extends Enum { readonly isInvalidProof: boolean; readonly isNoAssociatedValidatorId: boolean; @@ -6410,7 +6431,7 @@ declare module "@polkadot/types/lookup" { readonly type: "InvalidProof" | "NoAssociatedValidatorId" | "DuplicatedKey" | "NoKeys" | "NoAccount"; } - /** @name PalletGrandpaStoredState (573) */ + /** @name PalletGrandpaStoredState (578) */ interface PalletGrandpaStoredState extends Enum { readonly isLive: boolean; readonly isPendingPause: boolean; @@ -6427,7 +6448,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Live" | "PendingPause" | "Paused" | "PendingResume"; } - /** @name PalletGrandpaStoredPendingChange (574) */ + /** @name PalletGrandpaStoredPendingChange (579) */ interface PalletGrandpaStoredPendingChange extends Struct { readonly scheduledAt: u32; readonly delay: u32; @@ -6435,7 +6456,7 @@ declare module "@polkadot/types/lookup" { readonly forced: Option; } - /** @name PalletGrandpaError (576) */ + /** @name PalletGrandpaError (581) */ interface PalletGrandpaError extends Enum { readonly isPauseFailed: boolean; readonly isResumeFailed: boolean; @@ -6454,13 +6475,13 @@ declare module "@polkadot/types/lookup" { | "DuplicateOffenceReport"; } - /** @name PalletInflationRewardsChainsToRewardValue (579) */ + /** @name PalletInflationRewardsChainsToRewardValue (584) */ interface PalletInflationRewardsChainsToRewardValue extends Struct { readonly paraIds: Vec; readonly rewardsPerChain: u128; } - /** @name PalletTreasuryProposal (580) */ + /** @name PalletTreasuryProposal (585) */ interface PalletTreasuryProposal extends Struct { readonly proposer: AccountId32; readonly value: u128; @@ -6468,7 +6489,7 @@ declare module "@polkadot/types/lookup" { readonly bond: u128; } - /** @name PalletTreasurySpendStatus (582) */ + /** @name PalletTreasurySpendStatus (587) */ interface PalletTreasurySpendStatus extends Struct { readonly assetKind: Null; readonly amount: u128; @@ -6478,7 +6499,7 @@ declare module "@polkadot/types/lookup" { readonly status: PalletTreasuryPaymentState; } - /** @name PalletTreasuryPaymentState (583) */ + /** @name PalletTreasuryPaymentState (588) */ interface PalletTreasuryPaymentState extends Enum { readonly isPending: boolean; readonly isAttempted: boolean; @@ -6489,10 +6510,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Pending" | "Attempted" | "Failed"; } - /** @name FrameSupportPalletId (585) */ + /** @name FrameSupportPalletId (590) */ interface FrameSupportPalletId extends U8aFixed {} - /** @name PalletTreasuryError (586) */ + /** @name PalletTreasuryError (591) */ interface PalletTreasuryError extends Enum { readonly isInvalidIndex: boolean; readonly isTooManyApprovals: boolean; @@ -6519,7 +6540,7 @@ declare module "@polkadot/types/lookup" { | "Inconclusive"; } - /** @name PalletConvictionVotingVoteVoting (588) */ + /** @name PalletConvictionVotingVoteVoting (593) */ interface PalletConvictionVotingVoteVoting extends Enum { readonly isCasting: boolean; readonly asCasting: PalletConvictionVotingVoteCasting; @@ -6528,23 +6549,23 @@ declare module "@polkadot/types/lookup" { readonly type: "Casting" | "Delegating"; } - /** @name PalletConvictionVotingVoteCasting (589) */ + /** @name PalletConvictionVotingVoteCasting (594) */ interface PalletConvictionVotingVoteCasting extends Struct { readonly votes: Vec>; readonly delegations: PalletConvictionVotingDelegations; readonly prior: PalletConvictionVotingVotePriorLock; } - /** @name PalletConvictionVotingDelegations (593) */ + /** @name PalletConvictionVotingDelegations (598) */ interface PalletConvictionVotingDelegations extends Struct { readonly votes: u128; readonly capital: u128; } - /** @name PalletConvictionVotingVotePriorLock (594) */ + /** @name PalletConvictionVotingVotePriorLock (599) */ interface PalletConvictionVotingVotePriorLock extends ITuple<[u32, u128]> {} - /** @name PalletConvictionVotingVoteDelegating (595) */ + /** @name PalletConvictionVotingVoteDelegating (600) */ interface PalletConvictionVotingVoteDelegating extends Struct { readonly balance: u128; readonly target: AccountId32; @@ -6553,7 +6574,7 @@ declare module "@polkadot/types/lookup" { readonly prior: PalletConvictionVotingVotePriorLock; } - /** @name PalletConvictionVotingError (599) */ + /** @name PalletConvictionVotingError (604) */ interface PalletConvictionVotingError extends Enum { readonly isNotOngoing: boolean; readonly isNotVoter: boolean; @@ -6582,7 +6603,7 @@ declare module "@polkadot/types/lookup" { | "BadClass"; } - /** @name PalletReferendaReferendumInfoConvictionVotingTally (600) */ + /** @name PalletReferendaReferendumInfoConvictionVotingTally (605) */ interface PalletReferendaReferendumInfoConvictionVotingTally extends Enum { readonly isOngoing: boolean; readonly asOngoing: PalletReferendaReferendumStatusConvictionVotingTally; @@ -6599,7 +6620,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Ongoing" | "Approved" | "Rejected" | "Cancelled" | "TimedOut" | "Killed"; } - /** @name PalletReferendaReferendumStatusConvictionVotingTally (601) */ + /** @name PalletReferendaReferendumStatusConvictionVotingTally (606) */ interface PalletReferendaReferendumStatusConvictionVotingTally extends Struct { readonly track: u16; readonly origin: DancelightRuntimeOriginCaller; @@ -6614,19 +6635,19 @@ declare module "@polkadot/types/lookup" { readonly alarm: Option]>>; } - /** @name PalletReferendaDeposit (602) */ + /** @name PalletReferendaDeposit (607) */ interface PalletReferendaDeposit extends Struct { readonly who: AccountId32; readonly amount: u128; } - /** @name PalletReferendaDecidingStatus (605) */ + /** @name PalletReferendaDecidingStatus (610) */ interface PalletReferendaDecidingStatus extends Struct { readonly since: u32; readonly confirming: Option; } - /** @name PalletReferendaTrackInfo (613) */ + /** @name PalletReferendaTrackInfo (618) */ interface PalletReferendaTrackInfo extends Struct { readonly name: Text; readonly maxDeciding: u32; @@ -6639,7 +6660,7 @@ declare module "@polkadot/types/lookup" { readonly minSupport: PalletReferendaCurve; } - /** @name PalletReferendaCurve (614) */ + /** @name PalletReferendaCurve (619) */ interface PalletReferendaCurve extends Enum { readonly isLinearDecreasing: boolean; readonly asLinearDecreasing: { @@ -6663,7 +6684,7 @@ declare module "@polkadot/types/lookup" { readonly type: "LinearDecreasing" | "SteppedDecreasing" | "Reciprocal"; } - /** @name PalletReferendaError (617) */ + /** @name PalletReferendaError (622) */ interface PalletReferendaError extends Enum { readonly isNotOngoing: boolean; readonly isHasDeposit: boolean; @@ -6696,12 +6717,12 @@ declare module "@polkadot/types/lookup" { | "PreimageStoredWithDifferentLength"; } - /** @name PalletRankedCollectiveMemberRecord (618) */ + /** @name PalletRankedCollectiveMemberRecord (623) */ interface PalletRankedCollectiveMemberRecord extends Struct { readonly rank: u16; } - /** @name PalletRankedCollectiveError (623) */ + /** @name PalletRankedCollectiveError (628) */ interface PalletRankedCollectiveError extends Enum { readonly isAlreadyMember: boolean; readonly isNotMember: boolean; @@ -6728,7 +6749,7 @@ declare module "@polkadot/types/lookup" { | "TooManyMembers"; } - /** @name PalletReferendaReferendumInfoRankedCollectiveTally (624) */ + /** @name PalletReferendaReferendumInfoRankedCollectiveTally (629) */ interface PalletReferendaReferendumInfoRankedCollectiveTally extends Enum { readonly isOngoing: boolean; readonly asOngoing: PalletReferendaReferendumStatusRankedCollectiveTally; @@ -6745,7 +6766,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Ongoing" | "Approved" | "Rejected" | "Cancelled" | "TimedOut" | "Killed"; } - /** @name PalletReferendaReferendumStatusRankedCollectiveTally (625) */ + /** @name PalletReferendaReferendumStatusRankedCollectiveTally (630) */ interface PalletReferendaReferendumStatusRankedCollectiveTally extends Struct { readonly track: u16; readonly origin: DancelightRuntimeOriginCaller; @@ -6760,7 +6781,7 @@ declare module "@polkadot/types/lookup" { readonly alarm: Option]>>; } - /** @name PalletWhitelistError (628) */ + /** @name PalletWhitelistError (633) */ interface PalletWhitelistError extends Enum { readonly isUnavailablePreImage: boolean; readonly isUndecodableCall: boolean; @@ -6775,7 +6796,7 @@ declare module "@polkadot/types/lookup" { | "CallAlreadyWhitelisted"; } - /** @name PolkadotRuntimeParachainsConfigurationHostConfiguration (629) */ + /** @name PolkadotRuntimeParachainsConfigurationHostConfiguration (634) */ interface PolkadotRuntimeParachainsConfigurationHostConfiguration extends Struct { readonly maxCodeSize: u32; readonly maxHeadDataSize: u32; @@ -6814,19 +6835,19 @@ declare module "@polkadot/types/lookup" { readonly schedulerParams: PolkadotPrimitivesVstagingSchedulerParams; } - /** @name PolkadotRuntimeParachainsConfigurationPalletError (632) */ + /** @name PolkadotRuntimeParachainsConfigurationPalletError (637) */ interface PolkadotRuntimeParachainsConfigurationPalletError extends Enum { readonly isInvalidNewValue: boolean; readonly type: "InvalidNewValue"; } - /** @name PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker (635) */ + /** @name PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker (640) */ interface PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker extends Struct { readonly buffer: Vec>; readonly latestNumber: u32; } - /** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (639) */ + /** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (644) */ interface PolkadotRuntimeParachainsInclusionCandidatePendingAvailability extends Struct { readonly core: u32; readonly hash_: H256; @@ -6839,7 +6860,7 @@ declare module "@polkadot/types/lookup" { readonly backingGroup: u32; } - /** @name PolkadotRuntimeParachainsInclusionPalletError (640) */ + /** @name PolkadotRuntimeParachainsInclusionPalletError (645) */ interface PolkadotRuntimeParachainsInclusionPalletError extends Enum { readonly isValidatorIndexOutOfBounds: boolean; readonly isUnscheduledCandidate: boolean; @@ -6880,7 +6901,7 @@ declare module "@polkadot/types/lookup" { | "ParaHeadMismatch"; } - /** @name PolkadotPrimitivesV7ScrapedOnChainVotes (641) */ + /** @name PolkadotPrimitivesV7ScrapedOnChainVotes (646) */ interface PolkadotPrimitivesV7ScrapedOnChainVotes extends Struct { readonly session: u32; readonly backingValidatorsPerCandidate: Vec< @@ -6889,7 +6910,7 @@ declare module "@polkadot/types/lookup" { readonly disputes: Vec; } - /** @name PolkadotRuntimeParachainsParasInherentPalletError (646) */ + /** @name PolkadotRuntimeParachainsParasInherentPalletError (651) */ interface PolkadotRuntimeParachainsParasInherentPalletError extends Enum { readonly isTooManyInclusionInherents: boolean; readonly isInvalidParentHeader: boolean; @@ -6904,7 +6925,7 @@ declare module "@polkadot/types/lookup" { | "UnscheduledCandidate"; } - /** @name PolkadotRuntimeParachainsSchedulerPalletCoreOccupied (649) */ + /** @name PolkadotRuntimeParachainsSchedulerPalletCoreOccupied (654) */ interface PolkadotRuntimeParachainsSchedulerPalletCoreOccupied extends Enum { readonly isFree: boolean; readonly isParas: boolean; @@ -6912,14 +6933,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Free" | "Paras"; } - /** @name PolkadotRuntimeParachainsSchedulerPalletParasEntry (650) */ + /** @name PolkadotRuntimeParachainsSchedulerPalletParasEntry (655) */ interface PolkadotRuntimeParachainsSchedulerPalletParasEntry extends Struct { readonly assignment: PolkadotRuntimeParachainsSchedulerCommonAssignment; readonly availabilityTimeouts: u32; readonly ttl: u32; } - /** @name PolkadotRuntimeParachainsSchedulerCommonAssignment (651) */ + /** @name PolkadotRuntimeParachainsSchedulerCommonAssignment (656) */ interface PolkadotRuntimeParachainsSchedulerCommonAssignment extends Enum { readonly isPool: boolean; readonly asPool: { @@ -6931,7 +6952,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Pool" | "Bulk"; } - /** @name PolkadotRuntimeParachainsParasPvfCheckActiveVoteState (656) */ + /** @name PolkadotRuntimeParachainsParasPvfCheckActiveVoteState (661) */ interface PolkadotRuntimeParachainsParasPvfCheckActiveVoteState extends Struct { readonly votesAccept: BitVec; readonly votesReject: BitVec; @@ -6940,7 +6961,7 @@ declare module "@polkadot/types/lookup" { readonly causes: Vec; } - /** @name PolkadotRuntimeParachainsParasPvfCheckCause (658) */ + /** @name PolkadotRuntimeParachainsParasPvfCheckCause (663) */ interface PolkadotRuntimeParachainsParasPvfCheckCause extends Enum { readonly isOnboarding: boolean; readonly asOnboarding: u32; @@ -6953,14 +6974,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Onboarding" | "Upgrade"; } - /** @name PolkadotRuntimeParachainsParasUpgradeStrategy (659) */ + /** @name PolkadotRuntimeParachainsParasUpgradeStrategy (664) */ interface PolkadotRuntimeParachainsParasUpgradeStrategy extends Enum { readonly isSetGoAheadSignal: boolean; readonly isApplyAtExpectedBlock: boolean; readonly type: "SetGoAheadSignal" | "ApplyAtExpectedBlock"; } - /** @name PolkadotRuntimeParachainsParasParaLifecycle (661) */ + /** @name PolkadotRuntimeParachainsParasParaLifecycle (666) */ interface PolkadotRuntimeParachainsParasParaLifecycle extends Enum { readonly isOnboarding: boolean; readonly isParathread: boolean; @@ -6979,32 +7000,32 @@ declare module "@polkadot/types/lookup" { | "OffboardingParachain"; } - /** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (663) */ + /** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (668) */ interface PolkadotRuntimeParachainsParasParaPastCodeMeta extends Struct { readonly upgradeTimes: Vec; readonly lastPruned: Option; } - /** @name PolkadotRuntimeParachainsParasReplacementTimes (665) */ + /** @name PolkadotRuntimeParachainsParasReplacementTimes (670) */ interface PolkadotRuntimeParachainsParasReplacementTimes extends Struct { readonly expectedAt: u32; readonly activatedAt: u32; } - /** @name PolkadotPrimitivesV7UpgradeGoAhead (667) */ + /** @name PolkadotPrimitivesV7UpgradeGoAhead (672) */ interface PolkadotPrimitivesV7UpgradeGoAhead extends Enum { readonly isAbort: boolean; readonly isGoAhead: boolean; readonly type: "Abort" | "GoAhead"; } - /** @name PolkadotPrimitivesV7UpgradeRestriction (668) */ + /** @name PolkadotPrimitivesV7UpgradeRestriction (673) */ interface PolkadotPrimitivesV7UpgradeRestriction extends Enum { readonly isPresent: boolean; readonly type: "Present"; } - /** @name PolkadotRuntimeParachainsParasPalletError (669) */ + /** @name PolkadotRuntimeParachainsParasPalletError (674) */ interface PolkadotRuntimeParachainsParasPalletError extends Enum { readonly isNotRegistered: boolean; readonly isCannotOnboard: boolean; @@ -7035,20 +7056,20 @@ declare module "@polkadot/types/lookup" { | "InvalidCode"; } - /** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (671) */ + /** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (676) */ interface PolkadotRuntimeParachainsInitializerBufferedSessionChange extends Struct { readonly validators: Vec; readonly queued: Vec; readonly sessionIndex: u32; } - /** @name PolkadotCorePrimitivesInboundDownwardMessage (673) */ + /** @name PolkadotCorePrimitivesInboundDownwardMessage (678) */ interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct { readonly sentAt: u32; readonly msg: Bytes; } - /** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (674) */ + /** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (679) */ interface PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest extends Struct { readonly confirmed: bool; readonly age: u32; @@ -7058,7 +7079,7 @@ declare module "@polkadot/types/lookup" { readonly maxTotalSize: u32; } - /** @name PolkadotRuntimeParachainsHrmpHrmpChannel (676) */ + /** @name PolkadotRuntimeParachainsHrmpHrmpChannel (681) */ interface PolkadotRuntimeParachainsHrmpHrmpChannel extends Struct { readonly maxCapacity: u32; readonly maxTotalSize: u32; @@ -7070,13 +7091,13 @@ declare module "@polkadot/types/lookup" { readonly recipientDeposit: u128; } - /** @name PolkadotCorePrimitivesInboundHrmpMessage (678) */ + /** @name PolkadotCorePrimitivesInboundHrmpMessage (683) */ interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct { readonly sentAt: u32; readonly data: Bytes; } - /** @name PolkadotRuntimeParachainsHrmpPalletError (681) */ + /** @name PolkadotRuntimeParachainsHrmpPalletError (686) */ interface PolkadotRuntimeParachainsHrmpPalletError extends Enum { readonly isOpenHrmpChannelToSelf: boolean; readonly isOpenHrmpChannelInvalidRecipient: boolean; @@ -7121,7 +7142,7 @@ declare module "@polkadot/types/lookup" { | "ChannelCreationNotAuthorized"; } - /** @name PolkadotPrimitivesV7SessionInfo (683) */ + /** @name PolkadotPrimitivesV7SessionInfo (688) */ interface PolkadotPrimitivesV7SessionInfo extends Struct { readonly activeValidatorIndices: Vec; readonly randomSeed: U8aFixed; @@ -7138,13 +7159,13 @@ declare module "@polkadot/types/lookup" { readonly neededApprovals: u32; } - /** @name PolkadotPrimitivesV7IndexedVecValidatorIndex (684) */ + /** @name PolkadotPrimitivesV7IndexedVecValidatorIndex (689) */ interface PolkadotPrimitivesV7IndexedVecValidatorIndex extends Vec {} - /** @name PolkadotPrimitivesV7IndexedVecGroupIndex (685) */ + /** @name PolkadotPrimitivesV7IndexedVecGroupIndex (690) */ interface PolkadotPrimitivesV7IndexedVecGroupIndex extends Vec> {} - /** @name PolkadotPrimitivesV7DisputeState (687) */ + /** @name PolkadotPrimitivesV7DisputeState (692) */ interface PolkadotPrimitivesV7DisputeState extends Struct { readonly validatorsFor: BitVec; readonly validatorsAgainst: BitVec; @@ -7152,7 +7173,7 @@ declare module "@polkadot/types/lookup" { readonly concludedAt: Option; } - /** @name PolkadotRuntimeParachainsDisputesPalletError (689) */ + /** @name PolkadotRuntimeParachainsDisputesPalletError (694) */ interface PolkadotRuntimeParachainsDisputesPalletError extends Enum { readonly isDuplicateDisputeStatementSets: boolean; readonly isAncientDisputeStatement: boolean; @@ -7175,13 +7196,13 @@ declare module "@polkadot/types/lookup" { | "UnconfirmedDispute"; } - /** @name PolkadotPrimitivesV7SlashingPendingSlashes (690) */ + /** @name PolkadotPrimitivesV7SlashingPendingSlashes (695) */ interface PolkadotPrimitivesV7SlashingPendingSlashes extends Struct { readonly keys_: BTreeMap; readonly kind: PolkadotPrimitivesV7SlashingSlashingOffenceKind; } - /** @name PolkadotRuntimeParachainsDisputesSlashingPalletError (694) */ + /** @name PolkadotRuntimeParachainsDisputesSlashingPalletError (699) */ interface PolkadotRuntimeParachainsDisputesSlashingPalletError extends Enum { readonly isInvalidKeyOwnershipProof: boolean; readonly isInvalidSessionIndex: boolean; @@ -7198,7 +7219,7 @@ declare module "@polkadot/types/lookup" { | "DuplicateSlashingReport"; } - /** @name PalletMessageQueueBookState (695) */ + /** @name PalletMessageQueueBookState (700) */ interface PalletMessageQueueBookState extends Struct { readonly begin: u32; readonly end: u32; @@ -7208,13 +7229,13 @@ declare module "@polkadot/types/lookup" { readonly size_: u64; } - /** @name PalletMessageQueueNeighbours (697) */ + /** @name PalletMessageQueueNeighbours (702) */ interface PalletMessageQueueNeighbours extends Struct { readonly prev: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin; readonly next: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin; } - /** @name PalletMessageQueuePage (699) */ + /** @name PalletMessageQueuePage (704) */ interface PalletMessageQueuePage extends Struct { readonly remaining: u32; readonly remainingSize: u32; @@ -7224,7 +7245,7 @@ declare module "@polkadot/types/lookup" { readonly heap: Bytes; } - /** @name PalletMessageQueueError (701) */ + /** @name PalletMessageQueueError (706) */ interface PalletMessageQueueError extends Enum { readonly isNotReapable: boolean; readonly isNoPage: boolean; @@ -7247,13 +7268,13 @@ declare module "@polkadot/types/lookup" { | "RecursiveDisallowed"; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount (702) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount (707) */ interface PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount extends Struct { readonly coreIndex: u32; readonly count: u32; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType (703) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType (708) */ interface PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType extends Struct { readonly traffic: u128; readonly nextIndex: u32; @@ -7261,33 +7282,33 @@ declare module "@polkadot/types/lookup" { readonly freedIndices: BinaryHeapReverseQueueIndex; } - /** @name BinaryHeapReverseQueueIndex (705) */ + /** @name BinaryHeapReverseQueueIndex (710) */ interface BinaryHeapReverseQueueIndex extends Vec {} - /** @name BinaryHeapEnqueuedOrder (708) */ + /** @name BinaryHeapEnqueuedOrder (713) */ interface BinaryHeapEnqueuedOrder extends Vec {} - /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder (709) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder (714) */ interface PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder extends Struct { readonly paraId: u32; readonly idx: u32; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletError (713) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletError (718) */ interface PolkadotRuntimeParachainsAssignerOnDemandPalletError extends Enum { readonly isQueueFull: boolean; readonly isSpotPriceHigherThanMaxAmount: boolean; readonly type: "QueueFull" | "SpotPriceHigherThanMaxAmount"; } - /** @name PolkadotRuntimeCommonParasRegistrarParaInfo (714) */ + /** @name PolkadotRuntimeCommonParasRegistrarParaInfo (719) */ interface PolkadotRuntimeCommonParasRegistrarParaInfo extends Struct { readonly manager: AccountId32; readonly deposit: u128; readonly locked: Option; } - /** @name PolkadotRuntimeCommonParasRegistrarPalletError (716) */ + /** @name PolkadotRuntimeCommonParasRegistrarPalletError (721) */ interface PolkadotRuntimeCommonParasRegistrarPalletError extends Enum { readonly isNotRegistered: boolean; readonly isAlreadyRegistered: boolean; @@ -7320,33 +7341,33 @@ declare module "@polkadot/types/lookup" { | "CannotSwap"; } - /** @name PalletUtilityError (717) */ + /** @name PalletUtilityError (722) */ interface PalletUtilityError extends Enum { readonly isTooManyCalls: boolean; readonly type: "TooManyCalls"; } - /** @name PalletIdentityRegistration (719) */ + /** @name PalletIdentityRegistration (724) */ interface PalletIdentityRegistration extends Struct { readonly judgements: Vec>; readonly deposit: u128; readonly info: PalletIdentityLegacyIdentityInfo; } - /** @name PalletIdentityRegistrarInfo (728) */ + /** @name PalletIdentityRegistrarInfo (733) */ interface PalletIdentityRegistrarInfo extends Struct { readonly account: AccountId32; readonly fee: u128; readonly fields: u64; } - /** @name PalletIdentityAuthorityProperties (730) */ + /** @name PalletIdentityAuthorityProperties (735) */ interface PalletIdentityAuthorityProperties extends Struct { readonly suffix: Bytes; readonly allocation: u32; } - /** @name PalletIdentityError (733) */ + /** @name PalletIdentityError (738) */ interface PalletIdentityError extends Enum { readonly isTooManySubAccounts: boolean; readonly isNotFound: boolean; @@ -7403,7 +7424,7 @@ declare module "@polkadot/types/lookup" { | "NotExpired"; } - /** @name PalletSchedulerScheduled (736) */ + /** @name PalletSchedulerScheduled (741) */ interface PalletSchedulerScheduled extends Struct { readonly maybeId: Option; readonly priority: u8; @@ -7412,14 +7433,14 @@ declare module "@polkadot/types/lookup" { readonly origin: DancelightRuntimeOriginCaller; } - /** @name PalletSchedulerRetryConfig (738) */ + /** @name PalletSchedulerRetryConfig (743) */ interface PalletSchedulerRetryConfig extends Struct { readonly totalRetries: u8; readonly remaining: u8; readonly period: u32; } - /** @name PalletSchedulerError (739) */ + /** @name PalletSchedulerError (744) */ interface PalletSchedulerError extends Enum { readonly isFailedToSchedule: boolean; readonly isNotFound: boolean; @@ -7429,21 +7450,21 @@ declare module "@polkadot/types/lookup" { readonly type: "FailedToSchedule" | "NotFound" | "TargetBlockNumberInPast" | "RescheduleNoChange" | "Named"; } - /** @name PalletProxyProxyDefinition (742) */ + /** @name PalletProxyProxyDefinition (747) */ interface PalletProxyProxyDefinition extends Struct { readonly delegate: AccountId32; readonly proxyType: DancelightRuntimeProxyType; readonly delay: u32; } - /** @name PalletProxyAnnouncement (746) */ + /** @name PalletProxyAnnouncement (751) */ interface PalletProxyAnnouncement extends Struct { readonly real: AccountId32; readonly callHash: H256; readonly height: u32; } - /** @name PalletProxyError (748) */ + /** @name PalletProxyError (753) */ interface PalletProxyError extends Enum { readonly isTooMany: boolean; readonly isNotFound: boolean; @@ -7464,7 +7485,7 @@ declare module "@polkadot/types/lookup" { | "NoSelfProxy"; } - /** @name PalletMultisigMultisig (750) */ + /** @name PalletMultisigMultisig (755) */ interface PalletMultisigMultisig extends Struct { readonly when: PalletMultisigTimepoint; readonly deposit: u128; @@ -7472,7 +7493,7 @@ declare module "@polkadot/types/lookup" { readonly approvals: Vec; } - /** @name PalletMultisigError (752) */ + /** @name PalletMultisigError (757) */ interface PalletMultisigError extends Enum { readonly isMinimumThreshold: boolean; readonly isAlreadyApproved: boolean; @@ -7505,7 +7526,7 @@ declare module "@polkadot/types/lookup" { | "AlreadyStored"; } - /** @name PalletPreimageOldRequestStatus (753) */ + /** @name PalletPreimageOldRequestStatus (758) */ interface PalletPreimageOldRequestStatus extends Enum { readonly isUnrequested: boolean; readonly asUnrequested: { @@ -7521,7 +7542,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unrequested" | "Requested"; } - /** @name PalletPreimageRequestStatus (756) */ + /** @name PalletPreimageRequestStatus (761) */ interface PalletPreimageRequestStatus extends Enum { readonly isUnrequested: boolean; readonly asUnrequested: { @@ -7537,7 +7558,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unrequested" | "Requested"; } - /** @name PalletPreimageError (761) */ + /** @name PalletPreimageError (766) */ interface PalletPreimageError extends Enum { readonly isTooBig: boolean; readonly isAlreadyNoted: boolean; @@ -7560,7 +7581,7 @@ declare module "@polkadot/types/lookup" { | "NoCost"; } - /** @name PalletAssetRateError (762) */ + /** @name PalletAssetRateError (767) */ interface PalletAssetRateError extends Enum { readonly isUnknownAssetKind: boolean; readonly isAlreadyExists: boolean; @@ -7568,7 +7589,7 @@ declare module "@polkadot/types/lookup" { readonly type: "UnknownAssetKind" | "AlreadyExists" | "Overflow"; } - /** @name PalletXcmQueryStatus (763) */ + /** @name PalletXcmQueryStatus (768) */ interface PalletXcmQueryStatus extends Enum { readonly isPending: boolean; readonly asPending: { @@ -7590,7 +7611,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Pending" | "VersionNotifier" | "Ready"; } - /** @name XcmVersionedResponse (767) */ + /** @name XcmVersionedResponse (772) */ interface XcmVersionedResponse extends Enum { readonly isV2: boolean; readonly asV2: XcmV2Response; @@ -7601,7 +7622,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name PalletXcmVersionMigrationStage (773) */ + /** @name PalletXcmVersionMigrationStage (778) */ interface PalletXcmVersionMigrationStage extends Enum { readonly isMigrateSupportedVersion: boolean; readonly isMigrateVersionNotifiers: boolean; @@ -7615,7 +7636,7 @@ declare module "@polkadot/types/lookup" { | "MigrateAndNotifyOldTargets"; } - /** @name PalletXcmRemoteLockedFungibleRecord (775) */ + /** @name PalletXcmRemoteLockedFungibleRecord (780) */ interface PalletXcmRemoteLockedFungibleRecord extends Struct { readonly amount: u128; readonly owner: XcmVersionedLocation; @@ -7623,7 +7644,7 @@ declare module "@polkadot/types/lookup" { readonly consumers: Vec>; } - /** @name PalletXcmError (782) */ + /** @name PalletXcmError (787) */ interface PalletXcmError extends Enum { readonly isUnreachable: boolean; readonly isSendFailure: boolean; @@ -7676,27 +7697,6 @@ declare module "@polkadot/types/lookup" { | "LocalExecutionIncomplete"; } - /** @name TpTraitsActiveEraInfo (785) */ - interface TpTraitsActiveEraInfo extends Struct { - readonly index: u32; - readonly start: Option; - } - - /** @name PalletExternalValidatorsError (787) */ - interface PalletExternalValidatorsError extends Enum { - readonly isTooManyInvulnerables: boolean; - readonly isAlreadyInvulnerable: boolean; - readonly isNotInvulnerable: boolean; - readonly isNoKeysRegistered: boolean; - readonly isUnableToDeriveCollatorId: boolean; - readonly type: - | "TooManyInvulnerables" - | "AlreadyInvulnerable" - | "NotInvulnerable" - | "NoKeysRegistered" - | "UnableToDeriveCollatorId"; - } - /** @name PalletMigrationsError (788) */ interface PalletMigrationsError extends Enum { readonly isPreimageMissing: boolean; diff --git a/typescript-api/src/flashbox/interfaces/augment-types.ts b/typescript-api/src/flashbox/interfaces/augment-types.ts index b47f3cdcb..8258442d0 100644 --- a/typescript-api/src/flashbox/interfaces/augment-types.ts +++ b/typescript-api/src/flashbox/interfaces/augment-types.ts @@ -311,13 +311,6 @@ import type { VotingDirectVote, } from "@polkadot/types/interfaces/democracy"; import type { BlockStats } from "@polkadot/types/interfaces/dev"; -import type { - CallDryRunEffects, - DispatchResultWithPostInfo, - PostDispatchInfo, - XcmDryRunApiError, - XcmDryRunEffects, -} from "@polkadot/types/interfaces/dryRunApi"; import type { ApprovalFlag, DefunctVoter, @@ -403,13 +396,10 @@ import type { ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, - ExtrinsicPayloadV5, ExtrinsicSignature, ExtrinsicSignatureV4, - ExtrinsicSignatureV5, ExtrinsicUnknown, ExtrinsicV4, - ExtrinsicV5, ImmortalEra, MortalEra, MultiSignature, @@ -1155,88 +1145,48 @@ import type { import type { Multisig, Timepoint } from "@polkadot/types/interfaces/utility"; import type { VestingInfo } from "@polkadot/types/interfaces/vesting"; import type { - AssetIdV2, - AssetIdV3, - AssetIdV4, AssetInstance, AssetInstanceV0, AssetInstanceV1, AssetInstanceV2, - AssetInstanceV3, - AssetInstanceV4, BodyId, - BodyIdV2, - BodyIdV3, BodyPart, - BodyPartV2, - BodyPartV3, DoubleEncodedCall, Fungibility, FungibilityV0, FungibilityV1, FungibilityV2, - FungibilityV3, - FungibilityV4, InboundStatus, InstructionV2, - InstructionV3, - InstructionV4, InteriorMultiLocation, - InteriorMultiLocationV2, - InteriorMultiLocationV3, Junction, JunctionV0, JunctionV1, JunctionV2, - JunctionV3, - JunctionV4, Junctions, JunctionsV1, JunctionsV2, - JunctionsV3, - JunctionsV4, - MaxPalletNameLen, - MaxPalletsInfo, - MaybeErrorCodeV3, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, - MultiAssetFilterV3, - MultiAssetFilterV4, MultiAssetV0, MultiAssetV1, MultiAssetV2, - MultiAssetV3, - MultiAssetV4, MultiAssets, MultiAssetsV1, MultiAssetsV2, - MultiAssetsV3, - MultiAssetsV4, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, - MultiLocationV3, - MultiLocationV4, NetworkId, - NetworkIdV2, - NetworkIdV3, - NetworkIdV4, OriginKindV0, OriginKindV1, OriginKindV2, - OriginKindV3, - OriginKindV4, OutboundStatus, Outcome, - OutcomeV4, - PalletInfoV3, - PalletInfoV4, QueryId, - QueryResponseInfoV3, - QueryResponseInfoV4, QueryStatus, QueueConfigData, Response, @@ -1244,49 +1194,36 @@ import type { ResponseV1, ResponseV2, ResponseV2Error, - ResponseV3, - ResponseV3Error, - ResponseV3Result, - ResponseV4, - UncheckedFungibilityV4, + ResponseV2Result, VersionMigrationStage, - VersionV3, - VersionV4, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, - WeightLimitV3, WildFungibility, WildFungibilityV0, WildFungibilityV1, WildFungibilityV2, - WildFungibilityV3, - WildFungibilityV4, WildMultiAsset, WildMultiAssetV1, WildMultiAssetV2, - WildMultiAssetV3, - WildMultiAssetV4, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, - XcmErrorV3, - XcmErrorV4, + XcmOrder, XcmOrderV0, XcmOrderV1, + XcmOrderV2, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, - XcmV3, - XcmV4, XcmVersion, XcmpMessageFormat, } from "@polkadot/types/interfaces/xcm"; @@ -1338,15 +1275,10 @@ declare module "@polkadot/types/types/registry" { AssetDestroyWitness: AssetDestroyWitness; AssetDetails: AssetDetails; AssetId: AssetId; - AssetIdV2: AssetIdV2; - AssetIdV3: AssetIdV3; - AssetIdV4: AssetIdV4; AssetInstance: AssetInstance; AssetInstanceV0: AssetInstanceV0; AssetInstanceV1: AssetInstanceV1; AssetInstanceV2: AssetInstanceV2; - AssetInstanceV3: AssetInstanceV3; - AssetInstanceV4: AssetInstanceV4; AssetMetadata: AssetMetadata; AssetOptions: AssetOptions; AssignmentId: AssignmentId; @@ -1419,11 +1351,7 @@ declare module "@polkadot/types/types/registry" { BlockV2: BlockV2; BlockWeights: BlockWeights; BodyId: BodyId; - BodyIdV2: BodyIdV2; - BodyIdV3: BodyIdV3; BodyPart: BodyPart; - BodyPartV2: BodyPartV2; - BodyPartV3: BodyPartV3; bool: bool; Bool: Bool; Bounty: Bounty; @@ -1439,7 +1367,6 @@ declare module "@polkadot/types/types/registry" { BufferedSessionChange: BufferedSessionChange; Bytes: Bytes; Call: Call; - CallDryRunEffects: CallDryRunEffects; CallHash: CallHash; CallHashOf: CallHashOf; CallIndex: CallIndex; @@ -1599,7 +1526,6 @@ declare module "@polkadot/types/types/registry" { DispatchResult: DispatchResult; DispatchResultOf: DispatchResultOf; DispatchResultTo198: DispatchResultTo198; - DispatchResultWithPostInfo: DispatchResultWithPostInfo; DisputeLocation: DisputeLocation; DisputeProof: DisputeProof; DisputeResult: DisputeResult; @@ -1719,15 +1645,12 @@ declare module "@polkadot/types/types/registry" { ExtrinsicPayload: ExtrinsicPayload; ExtrinsicPayloadUnknown: ExtrinsicPayloadUnknown; ExtrinsicPayloadV4: ExtrinsicPayloadV4; - ExtrinsicPayloadV5: ExtrinsicPayloadV5; ExtrinsicSignature: ExtrinsicSignature; ExtrinsicSignatureV4: ExtrinsicSignatureV4; - ExtrinsicSignatureV5: ExtrinsicSignatureV5; ExtrinsicStatus: ExtrinsicStatus; ExtrinsicsWeight: ExtrinsicsWeight; ExtrinsicUnknown: ExtrinsicUnknown; ExtrinsicV4: ExtrinsicV4; - ExtrinsicV5: ExtrinsicV5; f32: f32; F32: F32; f64: f64; @@ -1763,8 +1686,6 @@ declare module "@polkadot/types/types/registry" { FungibilityV0: FungibilityV0; FungibilityV1: FungibilityV1; FungibilityV2: FungibilityV2; - FungibilityV3: FungibilityV3; - FungibilityV4: FungibilityV4; FungiblesAccessError: FungiblesAccessError; Gas: Gas; GenesisBuildErr: GenesisBuildErr; @@ -1851,12 +1772,8 @@ declare module "@polkadot/types/types/registry" { InstantiateReturnValueOk: InstantiateReturnValueOk; InstantiateReturnValueTo267: InstantiateReturnValueTo267; InstructionV2: InstructionV2; - InstructionV3: InstructionV3; - InstructionV4: InstructionV4; InstructionWeights: InstructionWeights; InteriorMultiLocation: InteriorMultiLocation; - InteriorMultiLocationV2: InteriorMultiLocationV2; - InteriorMultiLocationV3: InteriorMultiLocationV3; InvalidDisputeStatementKind: InvalidDisputeStatementKind; InvalidTransaction: InvalidTransaction; isize: isize; @@ -1866,13 +1783,9 @@ declare module "@polkadot/types/types/registry" { Junctions: Junctions; JunctionsV1: JunctionsV1; JunctionsV2: JunctionsV2; - JunctionsV3: JunctionsV3; - JunctionsV4: JunctionsV4; JunctionV0: JunctionV0; JunctionV1: JunctionV1; JunctionV2: JunctionV2; - JunctionV3: JunctionV3; - JunctionV4: JunctionV4; Justification: Justification; JustificationNotification: JustificationNotification; Justifications: Justifications; @@ -1897,9 +1810,6 @@ declare module "@polkadot/types/types/registry" { LookupSource: LookupSource; LookupTarget: LookupTarget; LotteryConfig: LotteryConfig; - MaxPalletNameLen: MaxPalletNameLen; - MaxPalletsInfo: MaxPalletsInfo; - MaybeErrorCodeV3: MaybeErrorCodeV3; MaybeRandomness: MaybeRandomness; MaybeVrf: MaybeVrf; MemberCount: MemberCount; @@ -1956,33 +1866,22 @@ declare module "@polkadot/types/types/registry" { MultiAssetFilter: MultiAssetFilter; MultiAssetFilterV1: MultiAssetFilterV1; MultiAssetFilterV2: MultiAssetFilterV2; - MultiAssetFilterV3: MultiAssetFilterV3; - MultiAssetFilterV4: MultiAssetFilterV4; MultiAssets: MultiAssets; MultiAssetsV1: MultiAssetsV1; MultiAssetsV2: MultiAssetsV2; - MultiAssetsV3: MultiAssetsV3; - MultiAssetsV4: MultiAssetsV4; MultiAssetV0: MultiAssetV0; MultiAssetV1: MultiAssetV1; MultiAssetV2: MultiAssetV2; - MultiAssetV3: MultiAssetV3; - MultiAssetV4: MultiAssetV4; MultiDisputeStatementSet: MultiDisputeStatementSet; MultiLocation: MultiLocation; MultiLocationV0: MultiLocationV0; MultiLocationV1: MultiLocationV1; MultiLocationV2: MultiLocationV2; - MultiLocationV3: MultiLocationV3; - MultiLocationV4: MultiLocationV4; Multiplier: Multiplier; Multisig: Multisig; MultiSignature: MultiSignature; MultiSigner: MultiSigner; NetworkId: NetworkId; - NetworkIdV2: NetworkIdV2; - NetworkIdV3: NetworkIdV3; - NetworkIdV4: NetworkIdV4; NetworkState: NetworkState; NetworkStatePeerset: NetworkStatePeerset; NetworkStatePeersetInfo: NetworkStatePeersetInfo; @@ -2026,8 +1925,6 @@ declare module "@polkadot/types/types/registry" { OriginKindV0: OriginKindV0; OriginKindV1: OriginKindV1; OriginKindV2: OriginKindV2; - OriginKindV3: OriginKindV3; - OriginKindV4: OriginKindV4; OutboundHrmpChannelLimitations: OutboundHrmpChannelLimitations; OutboundHrmpMessage: OutboundHrmpMessage; OutboundLaneData: OutboundLaneData; @@ -2035,7 +1932,6 @@ declare module "@polkadot/types/types/registry" { OutboundPayload: OutboundPayload; OutboundStatus: OutboundStatus; Outcome: Outcome; - OutcomeV4: OutcomeV4; OuterEnums15: OuterEnums15; OverweightIndex: OverweightIndex; Owner: Owner; @@ -2050,8 +1946,6 @@ declare module "@polkadot/types/types/registry" { PalletEventMetadataLatest: PalletEventMetadataLatest; PalletEventMetadataV14: PalletEventMetadataV14; PalletId: PalletId; - PalletInfoV3: PalletInfoV3; - PalletInfoV4: PalletInfoV4; PalletMetadataLatest: PalletMetadataLatest; PalletMetadataV14: PalletMetadataV14; PalletMetadataV15: PalletMetadataV15; @@ -2104,7 +1998,6 @@ declare module "@polkadot/types/types/registry" { Points: Points; PortableType: PortableType; PortableTypeV14: PortableTypeV14; - PostDispatchInfo: PostDispatchInfo; Precommits: Precommits; PrefabWasmModule: PrefabWasmModule; PrefixedStorageKey: PrefixedStorageKey; @@ -2125,8 +2018,6 @@ declare module "@polkadot/types/types/registry" { PvfExecTimeoutKind: PvfExecTimeoutKind; PvfPrepTimeoutKind: PvfPrepTimeoutKind; QueryId: QueryId; - QueryResponseInfoV3: QueryResponseInfoV3; - QueryResponseInfoV4: QueryResponseInfoV4; QueryStatus: QueryStatus; QueueConfigData: QueueConfigData; QueuedParathread: QueuedParathread; @@ -2184,10 +2075,7 @@ declare module "@polkadot/types/types/registry" { ResponseV1: ResponseV1; ResponseV2: ResponseV2; ResponseV2Error: ResponseV2Error; - ResponseV3: ResponseV3; - ResponseV3Error: ResponseV3Error; - ResponseV3Result: ResponseV3Result; - ResponseV4: ResponseV4; + ResponseV2Result: ResponseV2Result; Retriable: Retriable; RewardDestination: RewardDestination; RewardPoint: RewardPoint; @@ -2424,7 +2312,6 @@ declare module "@polkadot/types/types/registry" { U8: U8; UnappliedSlash: UnappliedSlash; UnappliedSlashOther: UnappliedSlashOther; - UncheckedFungibilityV4: UncheckedFungibilityV4; UncleEntryItem: UncleEntryItem; UnknownTransaction: UnknownTransaction; UnlockChunk: UnlockChunk; @@ -2463,8 +2350,6 @@ declare module "@polkadot/types/types/registry" { VersionedResponse: VersionedResponse; VersionedXcm: VersionedXcm; VersionMigrationStage: VersionMigrationStage; - VersionV3: VersionV3; - VersionV4: VersionV4; VestingInfo: VestingInfo; VestingSchedule: VestingSchedule; Vote: Vote; @@ -2485,7 +2370,6 @@ declare module "@polkadot/types/types/registry" { VrfProof: VrfProof; Weight: Weight; WeightLimitV2: WeightLimitV2; - WeightLimitV3: WeightLimitV3; WeightMultiplier: WeightMultiplier; WeightPerClass: WeightPerClass; WeightToFeeCoefficient: WeightToFeeCoefficient; @@ -2496,13 +2380,9 @@ declare module "@polkadot/types/types/registry" { WildFungibilityV0: WildFungibilityV0; WildFungibilityV1: WildFungibilityV1; WildFungibilityV2: WildFungibilityV2; - WildFungibilityV3: WildFungibilityV3; - WildFungibilityV4: WildFungibilityV4; WildMultiAsset: WildMultiAsset; WildMultiAssetV1: WildMultiAssetV1; WildMultiAssetV2: WildMultiAssetV2; - WildMultiAssetV3: WildMultiAssetV3; - WildMultiAssetV4: WildMultiAssetV4; WinnersData: WinnersData; WinnersData10: WinnersData10; WinnersDataTuple: WinnersDataTuple; @@ -2513,16 +2393,14 @@ declare module "@polkadot/types/types/registry" { WithdrawReasons: WithdrawReasons; Xcm: Xcm; XcmAssetId: XcmAssetId; - XcmDryRunApiError: XcmDryRunApiError; - XcmDryRunEffects: XcmDryRunEffects; XcmError: XcmError; XcmErrorV0: XcmErrorV0; XcmErrorV1: XcmErrorV1; XcmErrorV2: XcmErrorV2; - XcmErrorV3: XcmErrorV3; - XcmErrorV4: XcmErrorV4; + XcmOrder: XcmOrder; XcmOrderV0: XcmOrderV0; XcmOrderV1: XcmOrderV1; + XcmOrderV2: XcmOrderV2; XcmOrigin: XcmOrigin; XcmOriginKind: XcmOriginKind; XcmPaymentApiError: XcmPaymentApiError; @@ -2530,8 +2408,6 @@ declare module "@polkadot/types/types/registry" { XcmV0: XcmV0; XcmV1: XcmV1; XcmV2: XcmV2; - XcmV3: XcmV3; - XcmV4: XcmV4; XcmVersion: XcmVersion; } // InterfaceTypes } // declare module From eae263f27db206a93413f189064389ec7a4d17c8 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Tue, 29 Oct 2024 17:42:03 +0100 Subject: [PATCH 55/82] Add era session start to trait --- pallets/external-validators/src/lib.rs | 4 ++++ primitives/traits/src/lib.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/pallets/external-validators/src/lib.rs b/pallets/external-validators/src/lib.rs index 6c88678c5..f47c48339 100644 --- a/pallets/external-validators/src/lib.rs +++ b/pallets/external-validators/src/lib.rs @@ -662,6 +662,10 @@ impl EraIndexProvider for Pallet { start: None, }) } + + fn era_to_session_start(era_index: EraIndex) -> Option { + >::get(era_index) + } } impl ValidatorProvider for Pallet { diff --git a/primitives/traits/src/lib.rs b/primitives/traits/src/lib.rs index 280271d7e..9894616de 100644 --- a/primitives/traits/src/lib.rs +++ b/primitives/traits/src/lib.rs @@ -469,6 +469,7 @@ pub type EraIndex = u32; pub trait EraIndexProvider { fn active_era() -> ActiveEraInfo; + fn era_to_session_start(era_index: EraIndex) -> Option; } pub trait ValidatorProvider { From b41acd5be4df0b68d468748851e1159d167db0ee Mon Sep 17 00:00:00 2001 From: girazoki Date: Wed, 30 Oct 2024 09:02:02 +0100 Subject: [PATCH 56/82] test cleanup --- ...lashes_are_confirmed_after_defer_period.ts | 124 +++++----------- ...hes_are_not_applicable_to_invulnerables.ts | 98 +++---------- ...lashes_are_removed_after_bonding_period.ts | 132 +++++------------- .../slashes/test_slashes_babe.ts | 100 +++---------- .../slashes/test_slashes_can_be_cancelled.ts | 113 ++++----------- .../slashes/test_slashes_grandpa.ts | 96 +++---------- test/util/slashes.ts | 118 ++++++++++++++++ 7 files changed, 283 insertions(+), 498 deletions(-) create mode 100644 test/util/slashes.ts diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts index c01221f93..6c216f394 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts @@ -2,18 +2,14 @@ import "@tanssi/api-augment"; import { describeSuite, expect, beforeAll } from "@moonwall/cli"; import { ApiPromise } from "@polkadot/api"; import { KeyringPair } from "@moonwall/util"; -import { fetchCollatorAssignmentTip, jumpSessions } from "util/block"; import { Keyring } from "@polkadot/keyring"; -import { Header, BabeEquivocationProof } from "@polkadot/types/interfaces"; -import { SpRuntimeHeader } from '@polkadot/types/lookup'; -import { extrinsics } from "@polkadot/types/interfaces/definitions"; -import { u8aToHex, hexToU8a, stringToHex, numberToHex, stringToU8a } from "@polkadot/util"; -import { blake2AsHex } from "@polkadot/util-crypto"; +import { u8aToHex } from "@polkadot/util"; import { jumpToSession } from "../../../util/block"; +import { generateBabeEquivocationProof } from "../../../util/slashes"; describeSuite({ id: "DTR1304", - title: "Babe offences should trigger a slash", + title: "Babe slashes defer period confirmation", foundationMethods: "dev", testCases: ({ it, context }) => { let polkadotJs: ApiPromise; @@ -29,92 +25,40 @@ describeSuite({ }); it({ id: "E01", - title: "Babe offences trigger a slash+", + title: "Babe offences should be confirmed after defer period", test: async function () { // we crate one block so that we at least have one seal. await jumpToSession(context, 1); // Remove alice from invulnerables (just for the slash) - const removeAliceFromInvulnerables = await polkadotJs.tx.sudo.sudo( - polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address) - ).signAsync(alice) + const removeAliceFromInvulnerables = await polkadotJs.tx.sudo + .sudo(polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address)) + .signAsync(alice); await context.createBlock([removeAliceFromInvulnerables]); - let baseHeader = await polkadotJs.rpc.chain.getHeader(); - let baseHeader2 = await polkadotJs.rpc.chain.getHeader(); - - const header1: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { - digest: baseHeader.digest, - extrinsicsRoot: baseHeader.extrinsicsRoot, - stateRoot: baseHeader.stateRoot, - parentHash: baseHeader.parentHash, - number: 1, - }); - - // we just change the block number - const header2: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { - digest: baseHeader2.digest, - extrinsicsRoot: baseHeader2.extrinsicsRoot, - stateRoot: baseHeader2.stateRoot, - parentHash: baseHeader2.parentHash, - number: 2, - }); - - const sig1 = aliceBabePair.sign(blake2AsHex(header1.toU8a())); - const sig2 = aliceBabePair.sign(blake2AsHex(header2.toU8a())); - - const slot = await polkadotJs.query.babe.currentSlot(); - // let's inject the equivocation proof + const doubleVotingProof = await generateBabeEquivocationProof(polkadotJs, aliceBabePair); - const keyOwnershipProof = (await polkadotJs.call.babeApi.generateKeyOwnershipProof( - slot, - u8aToHex(aliceBabePair.publicKey) - )).unwrap(); - - // We don't care about the first 8 characters of the proof, as they - // correspond to SCALE encoded wrapping stuff we don't need. - //const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; - - const digestItemSeal1: SpRuntimeDigestDigestItem = polkadotJs.createType( - "SpRuntimeDigestDigestItem", - { Seal: [ - stringToHex('BABE'), - u8aToHex(sig1) - ] - } - ); - - const digestItemSeal2: SpRuntimeDigestDigestItem = polkadotJs.createType( - "SpRuntimeDigestDigestItem", - { Seal: [ - stringToHex('BABE'), - u8aToHex(sig2) - ] - } - ); - - header1.digest.logs.push(digestItemSeal1); - header2.digest.logs.push(digestItemSeal2); + // generate key ownership proof + const keyOwnershipProof = ( + await polkadotJs.call.babeApi.generateKeyOwnershipProof( + doubleVotingProof.slotNumber, + u8aToHex(aliceBabePair.publicKey) + ) + ).unwrap(); - const doubleVotingProof: BabeEquivocationProof = polkadotJs.createType( - "BabeEquivocationProof", - { - offender: aliceBabePair.publicKey, - slotNumber: slot, - firstHeader: header1, - secondHeader: header2 - } - ); const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( polkadotJs.tx.utility.dispatchAs( { system: { Signed: alice.address }, } as any, - polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof)), { - refTime: 1n, - proofSize: 1n - }) + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof) + ), + { + refTime: 1n, + proofSize: 1n, + } + ); const signedTx = await tx.signAsync(alice); await context.createBlock(signedTx); @@ -123,26 +67,28 @@ describeSuite({ const DeferPeriod = 2; // scheduled slashes - const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); expect(expectedSlashes.length).to.be.eq(1); expect(u8aToHex(expectedSlashes[0].validator)).to.be.eq(u8aToHex(aliceStash.addressRaw)); - - // Put alice back to invulnerables - const addAliceFromInvulnerables = await polkadotJs.tx.sudo.sudo( - polkadotJs.tx.externalValidators.addWhitelisted(aliceStash.address) - ).signAsync(alice) + + // Put alice back to invulnerables + const addAliceFromInvulnerables = await polkadotJs.tx.sudo + .sudo(polkadotJs.tx.externalValidators.addWhitelisted(aliceStash.address)) + .signAsync(alice); await context.createBlock([addAliceFromInvulnerables]); - let sessionsPerEra = await polkadotJs.consts.externalValidators.sessionsPerEra; + const sessionsPerEra = await polkadotJs.consts.externalValidators.sessionsPerEra; - let currentIndex = await polkadotJs.query.session.currentIndex(); + const currentIndex = await polkadotJs.query.session.currentIndex(); - let targetSession = currentIndex*sessionsPerEra*(DeferPeriod +1); + const targetSession = currentIndex * sessionsPerEra * (DeferPeriod + 1); await jumpToSession(context, targetSession); - + // scheduled slashes - const expectedSlashesAfterDefer = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + const expectedSlashesAfterDefer = await polkadotJs.query.externalValidatorSlashes.slashes( + DeferPeriod + 1 + ); expect(expectedSlashesAfterDefer.length).to.be.eq(1); expect(expectedSlashesAfterDefer[0].confirmed.toHuman()).to.be.true; }, diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts index 2bffb60a0..88b99743c 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts @@ -2,113 +2,55 @@ import "@tanssi/api-augment"; import { describeSuite, expect, beforeAll } from "@moonwall/cli"; import { ApiPromise } from "@polkadot/api"; import { KeyringPair } from "@moonwall/util"; -import { fetchCollatorAssignmentTip, jumpSessions } from "util/block"; import { Keyring } from "@polkadot/keyring"; -import { Header, BabeEquivocationProof } from "@polkadot/types/interfaces"; -import { SpRuntimeHeader } from '@polkadot/types/lookup'; -import { extrinsics } from "@polkadot/types/interfaces/definitions"; -import { u8aToHex, hexToU8a, stringToHex, numberToHex, stringToU8a } from "@polkadot/util"; -import { blake2AsHex } from "@polkadot/util-crypto"; +import { u8aToHex } from "@polkadot/util"; import { jumpToSession } from "../../../util/block"; +import { generateBabeEquivocationProof } from "../../../util/slashes"; describeSuite({ id: "DTR1302", - title: "Babe offences should trigger a slash", + title: "Babe offences invulnerables", foundationMethods: "dev", testCases: ({ it, context }) => { let polkadotJs: ApiPromise; let alice: KeyringPair; let aliceBabePair: KeyringPair; - let aliceStash: KeyringPair; beforeAll(async () => { const keyringBabe = new Keyring({ type: "sr25519" }); aliceBabePair = keyringBabe.addFromUri("//Alice"); polkadotJs = context.polkadotJs(); alice = context.keyring.alice; - aliceStash = keyringBabe.addFromUri("//Alice//stash"); }); it({ id: "E01", - title: "Babe offences trigger a slash+", + title: "Babe offences do not trigger a slash to invulnerables", test: async function () { // we crate one block so that we at least have one seal. await jumpToSession(context, 1); - let baseHeader = await polkadotJs.rpc.chain.getHeader(); - let baseHeader2 = await polkadotJs.rpc.chain.getHeader(); - - const header1: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { - digest: baseHeader.digest, - extrinsicsRoot: baseHeader.extrinsicsRoot, - stateRoot: baseHeader.stateRoot, - parentHash: baseHeader.parentHash, - number: 1, - }); - - // we just change the block number - const header2: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { - digest: baseHeader2.digest, - extrinsicsRoot: baseHeader2.extrinsicsRoot, - stateRoot: baseHeader2.stateRoot, - parentHash: baseHeader2.parentHash, - number: 2, - }); - - const sig1 = aliceBabePair.sign(blake2AsHex(header1.toU8a())); - const sig2 = aliceBabePair.sign(blake2AsHex(header2.toU8a())); - - const slot = await polkadotJs.query.babe.currentSlot(); - // let's inject the equivocation proof + const doubleVotingProof = await generateBabeEquivocationProof(polkadotJs, aliceBabePair); - const keyOwnershipProof = (await polkadotJs.call.babeApi.generateKeyOwnershipProof( - slot, - u8aToHex(aliceBabePair.publicKey) - )).unwrap(); + // generate key ownership proof + const keyOwnershipProof = ( + await polkadotJs.call.babeApi.generateKeyOwnershipProof( + doubleVotingProof.slotNumber, + u8aToHex(aliceBabePair.publicKey) + ) + ).unwrap(); - // We don't care about the first 8 characters of the proof, as they - // correspond to SCALE encoded wrapping stuff we don't need. - //const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; - - const digestItemSeal1: SpRuntimeDigestDigestItem = polkadotJs.createType( - "SpRuntimeDigestDigestItem", - { Seal: [ - stringToHex('BABE'), - u8aToHex(sig1) - ] - } - ); - - const digestItemSeal2: SpRuntimeDigestDigestItem = polkadotJs.createType( - "SpRuntimeDigestDigestItem", - { Seal: [ - stringToHex('BABE'), - u8aToHex(sig2) - ] - } - ); - - header1.digest.logs.push(digestItemSeal1); - header2.digest.logs.push(digestItemSeal2); - - const doubleVotingProof: BabeEquivocationProof = polkadotJs.createType( - "BabeEquivocationProof", - { - offender: aliceBabePair.publicKey, - slotNumber: slot, - firstHeader: header1, - secondHeader: header2 - } - ); const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( polkadotJs.tx.utility.dispatchAs( { system: { Signed: alice.address }, } as any, - polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof)), { - refTime: 1n, - proofSize: 1n - }) + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof) + ), + { + refTime: 1n, + proofSize: 1n, + } + ); const signedTx = await tx.signAsync(alice); await context.createBlock(signedTx); @@ -117,7 +59,7 @@ describeSuite({ const DeferPeriod = 2; // Alice is an invulnerable, therefore she should not be slashed - const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); expect(expectedSlashes.length).to.be.eq(0); }, }); diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts index e3c384389..9ce814674 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts @@ -2,18 +2,14 @@ import "@tanssi/api-augment"; import { describeSuite, expect, beforeAll } from "@moonwall/cli"; import { ApiPromise } from "@polkadot/api"; import { KeyringPair } from "@moonwall/util"; -import { fetchCollatorAssignmentTip, jumpSessions } from "util/block"; import { Keyring } from "@polkadot/keyring"; -import { Header, BabeEquivocationProof } from "@polkadot/types/interfaces"; -import { SpRuntimeHeader } from '@polkadot/types/lookup'; -import { extrinsics } from "@polkadot/types/interfaces/definitions"; -import { u8aToHex, hexToU8a, stringToHex, numberToHex, stringToU8a } from "@polkadot/util"; -import { blake2AsHex } from "@polkadot/util-crypto"; +import { u8aToHex } from "@polkadot/util"; import { jumpToSession } from "../../../util/block"; +import { generateBabeEquivocationProof } from "../../../util/slashes"; describeSuite({ id: "DTR1305", - title: "Babe offences should trigger a slash", + title: "Babe offences bonding period", foundationMethods: "dev", testCases: ({ it, context }) => { let polkadotJs: ApiPromise; @@ -29,92 +25,40 @@ describeSuite({ }); it({ id: "E01", - title: "Babe offences trigger a slash+", + title: "Babe offences should be removed after bonding period", test: async function () { // we crate one block so that we at least have one seal. await jumpToSession(context, 1); // Remove alice from invulnerables (just for the slash) - const removeAliceFromInvulnerables = await polkadotJs.tx.sudo.sudo( - polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address) - ).signAsync(alice) + const removeAliceFromInvulnerables = await polkadotJs.tx.sudo + .sudo(polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address)) + .signAsync(alice); await context.createBlock([removeAliceFromInvulnerables]); - let baseHeader = await polkadotJs.rpc.chain.getHeader(); - let baseHeader2 = await polkadotJs.rpc.chain.getHeader(); - - const header1: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { - digest: baseHeader.digest, - extrinsicsRoot: baseHeader.extrinsicsRoot, - stateRoot: baseHeader.stateRoot, - parentHash: baseHeader.parentHash, - number: 1, - }); - - // we just change the block number - const header2: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { - digest: baseHeader2.digest, - extrinsicsRoot: baseHeader2.extrinsicsRoot, - stateRoot: baseHeader2.stateRoot, - parentHash: baseHeader2.parentHash, - number: 2, - }); - - const sig1 = aliceBabePair.sign(blake2AsHex(header1.toU8a())); - const sig2 = aliceBabePair.sign(blake2AsHex(header2.toU8a())); - - const slot = await polkadotJs.query.babe.currentSlot(); - // let's inject the equivocation proof + const doubleVotingProof = await generateBabeEquivocationProof(polkadotJs, aliceBabePair); - const keyOwnershipProof = (await polkadotJs.call.babeApi.generateKeyOwnershipProof( - slot, - u8aToHex(aliceBabePair.publicKey) - )).unwrap(); - - // We don't care about the first 8 characters of the proof, as they - // correspond to SCALE encoded wrapping stuff we don't need. - //const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; - - const digestItemSeal1: SpRuntimeDigestDigestItem = polkadotJs.createType( - "SpRuntimeDigestDigestItem", - { Seal: [ - stringToHex('BABE'), - u8aToHex(sig1) - ] - } - ); - - const digestItemSeal2: SpRuntimeDigestDigestItem = polkadotJs.createType( - "SpRuntimeDigestDigestItem", - { Seal: [ - stringToHex('BABE'), - u8aToHex(sig2) - ] - } - ); - - header1.digest.logs.push(digestItemSeal1); - header2.digest.logs.push(digestItemSeal2); + // generate key ownership proof + const keyOwnershipProof = ( + await polkadotJs.call.babeApi.generateKeyOwnershipProof( + doubleVotingProof.slotNumber, + u8aToHex(aliceBabePair.publicKey) + ) + ).unwrap(); - const doubleVotingProof: BabeEquivocationProof = polkadotJs.createType( - "BabeEquivocationProof", - { - offender: aliceBabePair.publicKey, - slotNumber: slot, - firstHeader: header1, - secondHeader: header2 - } - ); const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( polkadotJs.tx.utility.dispatchAs( { system: { Signed: alice.address }, } as any, - polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof)), { - refTime: 1n, - proofSize: 1n - }) + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof) + ), + { + refTime: 1n, + proofSize: 1n, + } + ); const signedTx = await tx.signAsync(alice); await context.createBlock(signedTx); @@ -123,30 +67,30 @@ describeSuite({ const DeferPeriod = 2; // scheduled slashes - const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); expect(expectedSlashes.length).to.be.eq(1); expect(u8aToHex(expectedSlashes[0].validator)).to.be.eq(u8aToHex(aliceStash.addressRaw)); - - // Put alice back to invulnerables - const addAliceFromInvulnerables = await polkadotJs.tx.sudo.sudo( - polkadotJs.tx.externalValidators.addWhitelisted(aliceStash.address) - ).signAsync(alice) + + // Put alice back to invulnerables + const addAliceFromInvulnerables = await polkadotJs.tx.sudo + .sudo(polkadotJs.tx.externalValidators.addWhitelisted(aliceStash.address)) + .signAsync(alice); await context.createBlock([addAliceFromInvulnerables]); - let sessionsPerEra = await polkadotJs.consts.externalValidators.sessionsPerEra; - let bondingPeriod = await polkadotJs.consts.externalValidatorSlashes.bondingDuration; + const sessionsPerEra = await polkadotJs.consts.externalValidators.sessionsPerEra; + const bondingPeriod = await polkadotJs.consts.externalValidatorSlashes.bondingDuration; - let currentIndex = await polkadotJs.query.session.currentIndex(); - console.log("bondingPeriod is ", bondingPeriod); - console.log("currentIndex is ", currentIndex); - console.log("sessionsPerEra is ", sessionsPerEra); + const currentIndex = await polkadotJs.query.session.currentIndex(); - let targetSession = currentIndex.toNumber() + sessionsPerEra*(DeferPeriod +1) + sessionsPerEra*bondingPeriod; + const targetSession = + currentIndex.toNumber() + sessionsPerEra * (DeferPeriod + 1) + sessionsPerEra * bondingPeriod; // TODO: check this - await jumpToSession(context, targetSession +10); - + await jumpToSession(context, targetSession + 10); + // scheduled slashes - const expectedSlashesAfterDefer = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + const expectedSlashesAfterDefer = await polkadotJs.query.externalValidatorSlashes.slashes( + DeferPeriod + 1 + ); expect(expectedSlashesAfterDefer.length).to.be.eq(0); }, }); diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts index 8117baf48..8b8c4c297 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts @@ -2,14 +2,10 @@ import "@tanssi/api-augment"; import { describeSuite, expect, beforeAll } from "@moonwall/cli"; import { ApiPromise } from "@polkadot/api"; import { KeyringPair } from "@moonwall/util"; -import { fetchCollatorAssignmentTip, jumpSessions } from "util/block"; import { Keyring } from "@polkadot/keyring"; -import { Header, BabeEquivocationProof } from "@polkadot/types/interfaces"; -import { SpRuntimeHeader } from '@polkadot/types/lookup'; -import { extrinsics } from "@polkadot/types/interfaces/definitions"; -import { u8aToHex, hexToU8a, stringToHex, numberToHex, stringToU8a } from "@polkadot/util"; -import { blake2AsHex } from "@polkadot/util-crypto"; +import { u8aToHex } from "@polkadot/util"; import { jumpToSession } from "../../../util/block"; +import { generateBabeEquivocationProof } from "../../../util/slashes"; describeSuite({ id: "DTR1301", @@ -29,92 +25,40 @@ describeSuite({ }); it({ id: "E01", - title: "Babe offences do not trigger a slash against invulnerables", + title: "Babe offences trigger a slash", test: async function () { // we crate one block so that we at least have one seal. await jumpToSession(context, 1); // Remove alice from invulnerables (just for the slash) - const removeAliceFromInvulnerables = await polkadotJs.tx.sudo.sudo( - polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address) - ).signAsync(alice) + const removeAliceFromInvulnerables = await polkadotJs.tx.sudo + .sudo(polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address)) + .signAsync(alice); await context.createBlock([removeAliceFromInvulnerables]); - let baseHeader = await polkadotJs.rpc.chain.getHeader(); - let baseHeader2 = await polkadotJs.rpc.chain.getHeader(); - - const header1: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { - digest: baseHeader.digest, - extrinsicsRoot: baseHeader.extrinsicsRoot, - stateRoot: baseHeader.stateRoot, - parentHash: baseHeader.parentHash, - number: 1, - }); - - // we just change the block number - const header2: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { - digest: baseHeader2.digest, - extrinsicsRoot: baseHeader2.extrinsicsRoot, - stateRoot: baseHeader2.stateRoot, - parentHash: baseHeader2.parentHash, - number: 2, - }); - - const sig1 = aliceBabePair.sign(blake2AsHex(header1.toU8a())); - const sig2 = aliceBabePair.sign(blake2AsHex(header2.toU8a())); - - const slot = await polkadotJs.query.babe.currentSlot(); - // let's inject the equivocation proof + const doubleVotingProof = await generateBabeEquivocationProof(polkadotJs, aliceBabePair); - const keyOwnershipProof = (await polkadotJs.call.babeApi.generateKeyOwnershipProof( - slot, - u8aToHex(aliceBabePair.publicKey) - )).unwrap(); + // generate key ownership proof + const keyOwnershipProof = ( + await polkadotJs.call.babeApi.generateKeyOwnershipProof( + doubleVotingProof.slotNumber, + u8aToHex(aliceBabePair.publicKey) + ) + ).unwrap(); - // We don't care about the first 8 characters of the proof, as they - // correspond to SCALE encoded wrapping stuff we don't need. - //const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; - - const digestItemSeal1: SpRuntimeDigestDigestItem = polkadotJs.createType( - "SpRuntimeDigestDigestItem", - { Seal: [ - stringToHex('BABE'), - u8aToHex(sig1) - ] - } - ); - - const digestItemSeal2: SpRuntimeDigestDigestItem = polkadotJs.createType( - "SpRuntimeDigestDigestItem", - { Seal: [ - stringToHex('BABE'), - u8aToHex(sig2) - ] - } - ); - - header1.digest.logs.push(digestItemSeal1); - header2.digest.logs.push(digestItemSeal2); - - const doubleVotingProof: BabeEquivocationProof = polkadotJs.createType( - "BabeEquivocationProof", - { - offender: aliceBabePair.publicKey, - slotNumber: slot, - firstHeader: header1, - secondHeader: header2 - } - ); const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( polkadotJs.tx.utility.dispatchAs( { system: { Signed: alice.address }, } as any, - polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof)), { - refTime: 1n, - proofSize: 1n - }) + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof) + ), + { + refTime: 1n, + proofSize: 1n, + } + ); const signedTx = await tx.signAsync(alice); await context.createBlock(signedTx); @@ -123,7 +67,7 @@ describeSuite({ const DeferPeriod = 2; // scheduled slashes - const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); expect(expectedSlashes.length).to.be.eq(1); expect(u8aToHex(expectedSlashes[0].validator)).to.be.eq(u8aToHex(aliceStash.addressRaw)); }, diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts index 98637bec2..e2a802254 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts @@ -2,18 +2,14 @@ import "@tanssi/api-augment"; import { describeSuite, expect, beforeAll } from "@moonwall/cli"; import { ApiPromise } from "@polkadot/api"; import { KeyringPair } from "@moonwall/util"; -import { fetchCollatorAssignmentTip, jumpSessions } from "util/block"; import { Keyring } from "@polkadot/keyring"; -import { Header, BabeEquivocationProof } from "@polkadot/types/interfaces"; -import { SpRuntimeHeader } from '@polkadot/types/lookup'; -import { extrinsics } from "@polkadot/types/interfaces/definitions"; -import { u8aToHex, hexToU8a, stringToHex, numberToHex, stringToU8a } from "@polkadot/util"; -import { blake2AsHex } from "@polkadot/util-crypto"; +import { u8aToHex } from "@polkadot/util"; import { jumpToSession } from "../../../util/block"; +import { generateBabeEquivocationProof } from "../../../util/slashes"; describeSuite({ id: "DTR1303", - title: "Babe offences should trigger a slash", + title: "Babe offences should be cancellable", foundationMethods: "dev", testCases: ({ it, context }) => { let polkadotJs: ApiPromise; @@ -29,92 +25,40 @@ describeSuite({ }); it({ id: "E01", - title: "Babe offences trigger a slash+", + title: "Babe offences are cancellable during the defer period", test: async function () { // we crate one block so that we at least have one seal. await jumpToSession(context, 1); // Remove alice from invulnerables (just for the slash) - const removeAliceFromInvulnerables = await polkadotJs.tx.sudo.sudo( - polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address) - ).signAsync(alice) + const removeAliceFromInvulnerables = await polkadotJs.tx.sudo + .sudo(polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address)) + .signAsync(alice); await context.createBlock([removeAliceFromInvulnerables]); - let baseHeader = await polkadotJs.rpc.chain.getHeader(); - let baseHeader2 = await polkadotJs.rpc.chain.getHeader(); - - const header1: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { - digest: baseHeader.digest, - extrinsicsRoot: baseHeader.extrinsicsRoot, - stateRoot: baseHeader.stateRoot, - parentHash: baseHeader.parentHash, - number: 1, - }); - - // we just change the block number - const header2: SpRuntimeHeader = polkadotJs.createType("SpRuntimeHeader", { - digest: baseHeader2.digest, - extrinsicsRoot: baseHeader2.extrinsicsRoot, - stateRoot: baseHeader2.stateRoot, - parentHash: baseHeader2.parentHash, - number: 2, - }); - - const sig1 = aliceBabePair.sign(blake2AsHex(header1.toU8a())); - const sig2 = aliceBabePair.sign(blake2AsHex(header2.toU8a())); - - const slot = await polkadotJs.query.babe.currentSlot(); - // let's inject the equivocation proof + const doubleVotingProof = await generateBabeEquivocationProof(polkadotJs, aliceBabePair); - const keyOwnershipProof = (await polkadotJs.call.babeApi.generateKeyOwnershipProof( - slot, - u8aToHex(aliceBabePair.publicKey) - )).unwrap(); - - // We don't care about the first 8 characters of the proof, as they - // correspond to SCALE encoded wrapping stuff we don't need. - //const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; + // generate key ownership proof + const keyOwnershipProof = ( + await polkadotJs.call.babeApi.generateKeyOwnershipProof( + doubleVotingProof.slotNumber, + u8aToHex(aliceBabePair.publicKey) + ) + ).unwrap(); - const digestItemSeal1: SpRuntimeDigestDigestItem = polkadotJs.createType( - "SpRuntimeDigestDigestItem", - { Seal: [ - stringToHex('BABE'), - u8aToHex(sig1) - ] - } - ); - - const digestItemSeal2: SpRuntimeDigestDigestItem = polkadotJs.createType( - "SpRuntimeDigestDigestItem", - { Seal: [ - stringToHex('BABE'), - u8aToHex(sig2) - ] - } - ); - - header1.digest.logs.push(digestItemSeal1); - header2.digest.logs.push(digestItemSeal2); - - const doubleVotingProof: BabeEquivocationProof = polkadotJs.createType( - "BabeEquivocationProof", - { - offender: aliceBabePair.publicKey, - slotNumber: slot, - firstHeader: header1, - secondHeader: header2 - } - ); const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( polkadotJs.tx.utility.dispatchAs( { system: { Signed: alice.address }, } as any, - polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof)), { - refTime: 1n, - proofSize: 1n - }) + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof) + ), + { + refTime: 1n, + proofSize: 1n, + } + ); const signedTx = await tx.signAsync(alice); await context.createBlock(signedTx); @@ -123,20 +67,21 @@ describeSuite({ const DeferPeriod = 2; // scheduled slashes - const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); expect(expectedSlashes.length).to.be.eq(1); expect(u8aToHex(expectedSlashes[0].validator)).to.be.eq(u8aToHex(aliceStash.addressRaw)); // Remove alice from invulnerables (just for the slash) - const cancelSlash = await polkadotJs.tx.sudo.sudo( - polkadotJs.tx.externalValidatorSlashes.cancelDeferredSlash(DeferPeriod +1, [0]) - ).signAsync(alice) + const cancelSlash = await polkadotJs.tx.sudo + .sudo(polkadotJs.tx.externalValidatorSlashes.cancelDeferredSlash(DeferPeriod + 1, [0])) + .signAsync(alice); await context.createBlock([cancelSlash]); // alashes have dissapeared - const expectedSlashesAfterCancel = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + const expectedSlashesAfterCancel = await polkadotJs.query.externalValidatorSlashes.slashes( + DeferPeriod + 1 + ); expect(expectedSlashesAfterCancel.length).to.be.eq(0); - }, }); }, diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts index 7e8c4ec81..6ec531e5b 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts @@ -2,14 +2,10 @@ import "@tanssi/api-augment"; import { describeSuite, expect, beforeAll } from "@moonwall/cli"; import { ApiPromise } from "@polkadot/api"; import { KeyringPair } from "@moonwall/util"; -import { fetchCollatorAssignmentTip, jumpSessions } from "util/block"; import { Keyring } from "@polkadot/keyring"; -import { Header, GrandpaEquivocationProof, GrandpaEquivocation, GrandpaEquivocationValue } from "@polkadot/types/interfaces"; -import { SpRuntimeHeader, FinalityGrandpaPrevote } from '@polkadot/types/lookup'; -import { extrinsics } from "@polkadot/types/interfaces/definitions"; -import { u8aToHex, hexToU8a, stringToHex, numberToHex, stringToU8a, identity } from "@polkadot/util"; -import { blake2AsHex } from "@polkadot/util-crypto"; +import { u8aToHex } from "@polkadot/util"; import { jumpToSession } from "../../../util/block"; +import { generateGrandpaEquivocationProof } from "../../../util/slashes"; describeSuite({ id: "DTR1306", @@ -30,87 +26,38 @@ describeSuite({ }); it({ id: "E01", - title: "Grandpa offences do not trigger a slash against invulnerables", + title: "Grandpa offences trigger a slashing event", test: async function () { // we crate one block so that we at least have one seal. await jumpToSession(context, 1); // Remove alice from invulnerables (just for the slash) - const removeAliceFromInvulnerables = await polkadotJs.tx.sudo.sudo( - polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address) - ).signAsync(alice) + const removeAliceFromInvulnerables = await polkadotJs.tx.sudo + .sudo(polkadotJs.tx.externalValidators.removeWhitelisted(aliceStash.address)) + .signAsync(alice); await context.createBlock([removeAliceFromInvulnerables]); - let prevote1: FinalityGrandpaPrevote = polkadotJs.createType("FinalityGrandpaPrevote", { - targetHash: "0x0000000000000000000000000000000000000000000000000000000000000000", - targetNumber: 1 - }); + const doubleVotingProof = await generateGrandpaEquivocationProof(polkadotJs, aliceGrandpaPair); - let prevote2: FinalityGrandpaPrevote = polkadotJs.createType("FinalityGrandpaPrevote", { - targetHash: "0x0000000000000000000000000000000000000000000000000000000000000000", - targetNumber: 2 - }); - - let roundNumber = polkadotJs.createType("u64", 1); - let setId = await polkadotJs.query.grandpa.currentSetId(); - - // I could not find the proper struct that holds all this into a singl message - // ergo I need to construct the signing payload myself - // the first 0 is because of this enum variant - // https://github.com/paritytech/finality-grandpa/blob/8c45a664c05657f0c71057158d3ba555ba7d20de/src/lib.rs#L228 - // then we have the prevote message - // then the round number - // then the set id - const toSign1 = new Uint8Array([ - ...hexToU8a("0x00"), - ...prevote1.toU8a(), - ...roundNumber.toU8a(), - ...setId.toU8a() - ]); - - const toSign2 = new Uint8Array([ - ...hexToU8a("0x00"), - ...prevote2.toU8a(), - ...roundNumber.toU8a(), - ...setId.toU8a() - ]); - const sig1 = aliceGrandpaPair.sign(toSign1); - const sig2 = aliceGrandpaPair.sign(toSign2); - - const equivocationValue: GrandpaEquivocationValue = polkadotJs.createType("GrandpaEquivocationValue", { - roundNumber, - identity: aliceGrandpaPair.address, - first: [prevote1, sig1], - second: [prevote2, sig2] - }); - - const equivocation: GrandpaEquivocation = polkadotJs.createType("GrandpaEquivocation", - { - 'Prevote': equivocationValue - }); - - const doubleVotingProof: GrandpaEquivocationProof = polkadotJs.createType( - "GrandpaEquivocationProof", - { - setId, - equivocation - } - ); - - const keyOwnershipProof = (await polkadotJs.call.grandpaApi.generateKeyOwnershipProof( - setId, - u8aToHex(aliceGrandpaPair.publicKey) - )).unwrap(); + const keyOwnershipProof = ( + await polkadotJs.call.grandpaApi.generateKeyOwnershipProof( + doubleVotingProof.setId, + u8aToHex(aliceGrandpaPair.publicKey) + ) + ).unwrap(); const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( polkadotJs.tx.utility.dispatchAs( { system: { Signed: alice.address }, } as any, - polkadotJs.tx.grandpa.reportEquivocation(doubleVotingProof, keyOwnershipProof)), { - refTime: 1n, - proofSize: 1n - }) + polkadotJs.tx.grandpa.reportEquivocation(doubleVotingProof, keyOwnershipProof) + ), + { + refTime: 1n, + proofSize: 1n, + } + ); const signedTx = await tx.signAsync(alice); await context.createBlock(signedTx); @@ -119,10 +66,9 @@ describeSuite({ const DeferPeriod = 2; // scheduled slashes - const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod +1); + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); expect(expectedSlashes.length).to.be.eq(1); expect(u8aToHex(expectedSlashes[0].validator)).to.be.eq(u8aToHex(aliceStash.addressRaw)); - }, }); }, diff --git a/test/util/slashes.ts b/test/util/slashes.ts new file mode 100644 index 000000000..483dbaf3f --- /dev/null +++ b/test/util/slashes.ts @@ -0,0 +1,118 @@ +import { ApiPromise } from "@polkadot/api"; +import { + BabeEquivocationProof, + GrandpaEquivocationProof, + GrandpaEquivocation, + GrandpaEquivocationValue, +} from "@polkadot/types/interfaces"; +import { SpRuntimeHeader, SpRuntimeDigestDigestItem, FinalityGrandpaPrevote } from "@polkadot/types/lookup"; +import { KeyringPair } from "@moonwall/util"; +import { blake2AsHex } from "@polkadot/util-crypto"; +import { u8aToHex, stringToHex, hexToU8a } from "@polkadot/util"; + +export async function generateBabeEquivocationProof( + api: ApiPromise, + pair: KeyringPair +): Promise { + const baseHeader = await api.rpc.chain.getHeader(); + const baseHeader2 = await api.rpc.chain.getHeader(); + + const header1: SpRuntimeHeader = api.createType("SpRuntimeHeader", { + digest: baseHeader.digest, + extrinsicsRoot: baseHeader.extrinsicsRoot, + stateRoot: baseHeader.stateRoot, + parentHash: baseHeader.parentHash, + number: 1, + }); + + // we just change the block number + const header2: SpRuntimeHeader = api.createType("SpRuntimeHeader", { + digest: baseHeader2.digest, + extrinsicsRoot: baseHeader2.extrinsicsRoot, + stateRoot: baseHeader2.stateRoot, + parentHash: baseHeader2.parentHash, + number: 2, + }); + + const sig1 = pair.sign(blake2AsHex(header1.toU8a())); + const sig2 = pair.sign(blake2AsHex(header2.toU8a())); + + const slot = await api.query.babe.currentSlot(); + + const digestItemSeal1: SpRuntimeDigestDigestItem = api.createType("SpRuntimeDigestDigestItem", { + Seal: [stringToHex("BABE"), u8aToHex(sig1)], + }); + + const digestItemSeal2: SpRuntimeDigestDigestItem = api.createType("SpRuntimeDigestDigestItem", { + Seal: [stringToHex("BABE"), u8aToHex(sig2)], + }); + + header1.digest.logs.push(digestItemSeal1); + header2.digest.logs.push(digestItemSeal2); + + const doubleVotingProof: BabeEquivocationProof = api.createType("BabeEquivocationProof", { + offender: pair.publicKey, + slotNumber: slot, + firstHeader: header1, + secondHeader: header2, + }); + return doubleVotingProof; +} + +export async function generateGrandpaEquivocationProof( + api: ApiPromise, + pair: KeyringPair +): Promise { + const prevote1: FinalityGrandpaPrevote = api.createType("FinalityGrandpaPrevote", { + targetHash: "0x0000000000000000000000000000000000000000000000000000000000000000", + targetNumber: 1, + }); + + const prevote2: FinalityGrandpaPrevote = api.createType("FinalityGrandpaPrevote", { + targetHash: "0x0000000000000000000000000000000000000000000000000000000000000000", + targetNumber: 2, + }); + + const roundNumber = api.createType("u64", 1); + const setId = await api.query.grandpa.currentSetId(); + + // I could not find the proper struct that holds all this into a singl message + // ergo I need to construct the signing payload myself + // the first 0 is because of this enum variant + // https://github.com/paritytech/finality-grandpa/blob/8c45a664c05657f0c71057158d3ba555ba7d20de/src/lib.rs#L228 + // then we have the prevote message + // then the round number + // then the set id + const toSign1 = new Uint8Array([ + ...hexToU8a("0x00"), + ...prevote1.toU8a(), + ...roundNumber.toU8a(), + ...setId.toU8a(), + ]); + + const toSign2 = new Uint8Array([ + ...hexToU8a("0x00"), + ...prevote2.toU8a(), + ...roundNumber.toU8a(), + ...setId.toU8a(), + ]); + const sig1 = pair.sign(toSign1); + const sig2 = pair.sign(toSign2); + + const equivocationValue: GrandpaEquivocationValue = api.createType("GrandpaEquivocationValue", { + roundNumber, + identity: pair.address, + first: [prevote1, sig1], + second: [prevote2, sig2], + }); + + const equivocation: GrandpaEquivocation = api.createType("GrandpaEquivocation", { + Prevote: equivocationValue, + }); + + const doubleVotingProof: GrandpaEquivocationProof = api.createType("GrandpaEquivocationProof", { + setId, + equivocation, + }); + return doubleVotingProof; +} From 8955fa38283f55d31419d35921dcb8f41c2401ad Mon Sep 17 00:00:00 2001 From: girazoki Date: Wed, 30 Oct 2024 09:17:31 +0100 Subject: [PATCH 57/82] fmt and typescript api --- test/moonwall.config.json | 5 +- .../interfaces/augment-api-consts.ts | 13 + .../interfaces/augment-api-errors.ts | 11 + .../interfaces/augment-api-events.ts | 12 +- .../interfaces/augment-api-query.ts | 30 + .../dancelight/interfaces/augment-api-tx.ts | 19 + .../src/dancelight/interfaces/lookup.ts | 890 +++++++++--------- .../src/dancelight/interfaces/registry.ts | 8 + .../src/dancelight/interfaces/types-lookup.ts | 883 +++++++++-------- 9 files changed, 1029 insertions(+), 842 deletions(-) diff --git a/test/moonwall.config.json b/test/moonwall.config.json index 1956d27ab..482eca9db 100644 --- a/test/moonwall.config.json +++ b/test/moonwall.config.json @@ -585,10 +585,7 @@ { "name": "zombie_dancelight_upgrade", "testFileDir": ["suites/rt-upgrade-relay-zombienet"], - "runScripts": [ - "download-latest-rt-binaries-starlight.sh", - "build-spec-dancelight-single.sh tmp" - ], + "runScripts": ["download-latest-rt-binaries-starlight.sh", "build-spec-dancelight-single.sh tmp"], "timeout": 900000, "foundation": { diff --git a/typescript-api/src/dancelight/interfaces/augment-api-consts.ts b/typescript-api/src/dancelight/interfaces/augment-api-consts.ts index dc0004bb4..411a2d61d 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-consts.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-consts.ts @@ -155,6 +155,19 @@ declare module "@polkadot/api-base/types/consts" { /** Generic const */ [key: string]: Codec; }; + externalValidatorSlashes: { + /** Number of eras that staked funds must remain bonded for. */ + bondingDuration: u32 & AugmentedConst; + /** + * Number of eras that slashes are deferred by, after computation. + * + * This should be less than the bonding duration. Set to 0 if slashes should be applied immediately, without + * opportunity for intervention. + */ + slashDeferDuration: u32 & AugmentedConst; + /** Generic const */ + [key: string]: Codec; + }; fellowshipReferenda: { /** * Quantization level for the referendum wakeup scheduler. A higher number will result in fewer storage diff --git a/typescript-api/src/dancelight/interfaces/augment-api-errors.ts b/typescript-api/src/dancelight/interfaces/augment-api-errors.ts index 33b6f83ed..36c202cfd 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-errors.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-errors.ts @@ -243,6 +243,17 @@ declare module "@polkadot/api-base/types/errors" { /** Generic error */ [key: string]: AugmentedError; }; + externalValidatorSlashes: { + ActiveEraNotSet: AugmentedError; + DeferPeriodIsOver: AugmentedError; + EmptyTargets: AugmentedError; + InvalidSlashIndex: AugmentedError; + NotSortedAndUnique: AugmentedError; + ProvidedFutureEra: AugmentedError; + ProvidedNonSlashableEra: AugmentedError; + /** Generic error */ + [key: string]: AugmentedError; + }; fellowshipCollective: { /** Account is already a member. */ AlreadyMember: AugmentedError; diff --git a/typescript-api/src/dancelight/interfaces/augment-api-events.ts b/typescript-api/src/dancelight/interfaces/augment-api-events.ts index 129b2eab1..6b5d573f0 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-events.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-events.ts @@ -8,7 +8,7 @@ import "@polkadot/api-base/types/events"; import type { ApiTypes, AugmentedEvent } from "@polkadot/api-base/types"; import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from "@polkadot/types-codec"; import type { ITuple } from "@polkadot/types-codec/types"; -import type { AccountId32, H256 } from "@polkadot/types/interfaces/runtime"; +import type { AccountId32, H256, Perbill } from "@polkadot/types/interfaces/runtime"; import type { DancelightRuntimeProxyType, DancelightRuntimeRuntimeParametersKey, @@ -228,6 +228,16 @@ declare module "@polkadot/api-base/types/events" { /** Generic event */ [key: string]: AugmentedEvent; }; + externalValidatorSlashes: { + /** Removed author data */ + SlashReported: AugmentedEvent< + ApiType, + [validator: AccountId32, fraction: Perbill, slashEra: u32], + { validator: AccountId32; fraction: Perbill; slashEra: u32 } + >; + /** Generic event */ + [key: string]: AugmentedEvent; + }; fellowshipCollective: { /** A member `who` has been added. */ MemberAdded: AugmentedEvent; diff --git a/typescript-api/src/dancelight/interfaces/augment-api-query.ts b/typescript-api/src/dancelight/interfaces/augment-api-query.ts index cd54a9028..795e66174 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-query.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-query.ts @@ -47,6 +47,7 @@ import type { PalletConfigurationHostConfiguration, PalletConvictionVotingVoteVoting, PalletDataPreserversRegisteredProfile, + PalletExternalValidatorSlashesSlash, PalletExternalValidatorsForcing, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, @@ -697,6 +698,35 @@ declare module "@polkadot/api-base/types/storage" { /** Generic query */ [key: string]: QueryableStorageEntry; }; + externalValidatorSlashes: { + /** + * A mapping from still-bonded eras to the first session index of that era. + * + * Must contains information for eras for the range: `[active_era - bounding_duration; active_era]` + */ + bondedEras: AugmentedQuery Observable>>, []> & + QueryableStorageEntry; + nextSlashId: AugmentedQuery Observable, []> & QueryableStorageEntry; + /** All unapplied slashes that are queued for later. */ + slashes: AugmentedQuery< + ApiType, + (arg: u32 | AnyNumber | Uint8Array) => Observable>, + [u32] + > & + QueryableStorageEntry; + /** All slashing events on validators, mapped by era to the highest slash proportion and slash value of the era. */ + validatorSlashInEra: AugmentedQuery< + ApiType, + ( + arg1: u32 | AnyNumber | Uint8Array, + arg2: AccountId32 | string | Uint8Array + ) => Observable>, + [u32, AccountId32] + > & + QueryableStorageEntry; + /** Generic query */ + [key: string]: QueryableStorageEntry; + }; fellowshipCollective: { /** The index of each ranks's member into the group of members who have at least that rank. */ idToIndex: AugmentedQuery< diff --git a/typescript-api/src/dancelight/interfaces/augment-api-tx.ts b/typescript-api/src/dancelight/interfaces/augment-api-tx.ts index ba5866b99..b4055f819 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-tx.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-tx.ts @@ -1349,6 +1349,25 @@ declare module "@polkadot/api-base/types/submittable" { /** Generic tx */ [key: string]: SubmittableExtrinsicFunction; }; + externalValidatorSlashes: { + cancelDeferredSlash: AugmentedSubmittable< + ( + era: u32 | AnyNumber | Uint8Array, + slashIndices: Vec | (u32 | AnyNumber | Uint8Array)[] + ) => SubmittableExtrinsic, + [u32, Vec] + >; + forceInjectSlash: AugmentedSubmittable< + ( + era: u32 | AnyNumber | Uint8Array, + validator: AccountId32 | string | Uint8Array, + percentage: Perbill | AnyNumber | Uint8Array + ) => SubmittableExtrinsic, + [u32, AccountId32, Perbill] + >; + /** Generic tx */ + [key: string]: SubmittableExtrinsicFunction; + }; fellowshipCollective: { /** * Introduce a new member. diff --git a/typescript-api/src/dancelight/interfaces/lookup.ts b/typescript-api/src/dancelight/interfaces/lookup.ts index b8a0173f2..ebaae77d5 100644 --- a/typescript-api/src/dancelight/interfaces/lookup.ts +++ b/typescript-api/src/dancelight/interfaces/lookup.ts @@ -453,7 +453,17 @@ export default { PalletExternalValidatorsForcing: { _enum: ["NotForcing", "ForceNew", "ForceNone", "ForceAlways"], }, - /** Lookup56: pallet_session::pallet::Event */ + /** Lookup56: pallet_external_validator_slashes::pallet::Event */ + PalletExternalValidatorSlashesEvent: { + _enum: { + SlashReported: { + validator: "AccountId32", + fraction: "Perbill", + slashEra: "u32", + }, + }, + }, + /** Lookup58: pallet_session::pallet::Event */ PalletSessionEvent: { _enum: { NewSession: { @@ -461,7 +471,7 @@ export default { }, }, }, - /** Lookup57: pallet_grandpa::pallet::Event */ + /** Lookup59: pallet_grandpa::pallet::Event */ PalletGrandpaEvent: { _enum: { NewAuthorities: { @@ -471,9 +481,9 @@ export default { Resumed: "Null", }, }, - /** Lookup60: sp_consensus_grandpa::app::Public */ + /** Lookup62: sp_consensus_grandpa::app::Public */ SpConsensusGrandpaAppPublic: "[u8;32]", - /** Lookup61: pallet_inflation_rewards::pallet::Event */ + /** Lookup63: pallet_inflation_rewards::pallet::Event */ PalletInflationRewardsEvent: { _enum: { RewardedOrchestrator: { @@ -487,7 +497,7 @@ export default { }, }, }, - /** Lookup62: pallet_treasury::pallet::Event */ + /** Lookup64: pallet_treasury::pallet::Event */ PalletTreasuryEvent: { _enum: { Spending: { @@ -540,14 +550,14 @@ export default { }, }, }, - /** Lookup64: pallet_conviction_voting::pallet::Event */ + /** Lookup66: pallet_conviction_voting::pallet::Event */ PalletConvictionVotingEvent: { _enum: { Delegated: "(AccountId32,AccountId32)", Undelegated: "AccountId32", }, }, - /** Lookup65: pallet_referenda::pallet::Event */ + /** Lookup67: pallet_referenda::pallet::Event */ PalletReferendaEvent: { _enum: { Submitted: { @@ -626,7 +636,7 @@ export default { }, }, /** - * Lookup67: frame_support::traits::preimages::Bounded */ FrameSupportPreimagesBounded: { @@ -647,7 +657,7 @@ export default { }, }, }, - /** Lookup69: frame_system::pallet::Call */ + /** Lookup71: frame_system::pallet::Call */ FrameSystemCall: { _enum: { remark: { @@ -690,7 +700,7 @@ export default { }, }, }, - /** Lookup73: pallet_babe::pallet::Call */ + /** Lookup75: pallet_babe::pallet::Call */ PalletBabeCall: { _enum: { report_equivocation: { @@ -707,7 +717,7 @@ export default { }, }, /** - * Lookup74: sp_consensus_slots::EquivocationProof, + * Lookup76: sp_consensus_slots::EquivocationProof, * sp_consensus_babe::app::Public> */ SpConsensusSlotsEquivocationProof: { @@ -716,7 +726,7 @@ export default { firstHeader: "SpRuntimeHeader", secondHeader: "SpRuntimeHeader", }, - /** Lookup75: sp_runtime::generic::header::Header */ + /** Lookup77: sp_runtime::generic::header::Header */ SpRuntimeHeader: { parentHash: "H256", number: "Compact", @@ -724,15 +734,15 @@ export default { extrinsicsRoot: "H256", digest: "SpRuntimeDigest", }, - /** Lookup77: sp_consensus_babe::app::Public */ + /** Lookup79: sp_consensus_babe::app::Public */ SpConsensusBabeAppPublic: "[u8;32]", - /** Lookup78: sp_session::MembershipProof */ + /** Lookup80: sp_session::MembershipProof */ SpSessionMembershipProof: { session: "u32", trieNodes: "Vec", validatorCount: "u32", }, - /** Lookup79: sp_consensus_babe::digests::NextConfigDescriptor */ + /** Lookup81: sp_consensus_babe::digests::NextConfigDescriptor */ SpConsensusBabeDigestsNextConfigDescriptor: { _enum: { __Unused0: "Null", @@ -742,11 +752,11 @@ export default { }, }, }, - /** Lookup81: sp_consensus_babe::AllowedSlots */ + /** Lookup83: sp_consensus_babe::AllowedSlots */ SpConsensusBabeAllowedSlots: { _enum: ["PrimarySlots", "PrimaryAndSecondaryPlainSlots", "PrimaryAndSecondaryVRFSlots"], }, - /** Lookup82: pallet_timestamp::pallet::Call */ + /** Lookup84: pallet_timestamp::pallet::Call */ PalletTimestampCall: { _enum: { set: { @@ -754,7 +764,7 @@ export default { }, }, }, - /** Lookup83: pallet_balances::pallet::Call */ + /** Lookup85: pallet_balances::pallet::Call */ PalletBalancesCall: { _enum: { transfer_allow_death: { @@ -797,11 +807,11 @@ export default { }, }, }, - /** Lookup89: pallet_balances::types::AdjustmentDirection */ + /** Lookup91: pallet_balances::types::AdjustmentDirection */ PalletBalancesAdjustmentDirection: { _enum: ["Increase", "Decrease"], }, - /** Lookup90: pallet_parameters::pallet::Call */ + /** Lookup92: pallet_parameters::pallet::Call */ PalletParametersCall: { _enum: { set_parameter: { @@ -809,20 +819,20 @@ export default { }, }, }, - /** Lookup91: dancelight_runtime::RuntimeParameters */ + /** Lookup93: dancelight_runtime::RuntimeParameters */ DancelightRuntimeRuntimeParameters: { _enum: { Preimage: "DancelightRuntimeDynamicParamsPreimageParameters", }, }, - /** Lookup92: dancelight_runtime::dynamic_params::preimage::Parameters */ + /** Lookup94: dancelight_runtime::dynamic_params::preimage::Parameters */ DancelightRuntimeDynamicParamsPreimageParameters: { _enum: { BaseDeposit: "(DancelightRuntimeDynamicParamsPreimageBaseDeposit,Option)", ByteDeposit: "(DancelightRuntimeDynamicParamsPreimageByteDeposit,Option)", }, }, - /** Lookup93: pallet_registrar::pallet::Call */ + /** Lookup95: pallet_registrar::pallet::Call */ PalletRegistrarCall: { _enum: { register: { @@ -873,7 +883,7 @@ export default { }, }, }, - /** Lookup94: dp_container_chain_genesis_data::ContainerChainGenesisData */ + /** Lookup96: dp_container_chain_genesis_data::ContainerChainGenesisData */ DpContainerChainGenesisDataContainerChainGenesisData: { storage: "Vec", name: "Bytes", @@ -882,36 +892,36 @@ export default { extensions: "Bytes", properties: "DpContainerChainGenesisDataProperties", }, - /** Lookup96: dp_container_chain_genesis_data::ContainerChainGenesisDataItem */ + /** Lookup98: dp_container_chain_genesis_data::ContainerChainGenesisDataItem */ DpContainerChainGenesisDataContainerChainGenesisDataItem: { key: "Bytes", value: "Bytes", }, - /** Lookup98: dp_container_chain_genesis_data::Properties */ + /** Lookup100: dp_container_chain_genesis_data::Properties */ DpContainerChainGenesisDataProperties: { tokenMetadata: "DpContainerChainGenesisDataTokenMetadata", isEthereum: "bool", }, - /** Lookup99: dp_container_chain_genesis_data::TokenMetadata */ + /** Lookup101: dp_container_chain_genesis_data::TokenMetadata */ DpContainerChainGenesisDataTokenMetadata: { tokenSymbol: "Bytes", ss58Format: "u32", tokenDecimals: "u32", }, - /** Lookup103: tp_traits::SlotFrequency */ + /** Lookup105: tp_traits::SlotFrequency */ TpTraitsSlotFrequency: { min: "u32", max: "u32", }, - /** Lookup105: tp_traits::ParathreadParams */ + /** Lookup107: tp_traits::ParathreadParams */ TpTraitsParathreadParams: { slotFrequency: "TpTraitsSlotFrequency", }, - /** Lookup106: sp_trie::storage_proof::StorageProof */ + /** Lookup108: sp_trie::storage_proof::StorageProof */ SpTrieStorageProof: { trieNodes: "BTreeSet", }, - /** Lookup108: sp_runtime::MultiSignature */ + /** Lookup110: sp_runtime::MultiSignature */ SpRuntimeMultiSignature: { _enum: { Ed25519: "[u8;64]", @@ -919,7 +929,7 @@ export default { Ecdsa: "[u8;65]", }, }, - /** Lookup111: pallet_configuration::pallet::Call */ + /** Lookup113: pallet_configuration::pallet::Call */ PalletConfigurationCall: { _enum: { set_max_collators: { @@ -1019,7 +1029,7 @@ export default { }, }, }, - /** Lookup114: pallet_invulnerables::pallet::Call */ + /** Lookup115: pallet_invulnerables::pallet::Call */ PalletInvulnerablesCall: { _enum: { __Unused0: "Null", @@ -1031,11 +1041,11 @@ export default { }, }, }, - /** Lookup115: pallet_collator_assignment::pallet::Call */ + /** Lookup116: pallet_collator_assignment::pallet::Call */ PalletCollatorAssignmentCall: "Null", - /** Lookup116: pallet_authority_assignment::pallet::Call */ + /** Lookup117: pallet_authority_assignment::pallet::Call */ PalletAuthorityAssignmentCall: "Null", - /** Lookup117: pallet_author_noting::pallet::Call */ + /** Lookup118: pallet_author_noting::pallet::Call */ PalletAuthorNotingCall: { _enum: { set_latest_author_data: { @@ -1052,7 +1062,7 @@ export default { }, }, }, - /** Lookup118: pallet_services_payment::pallet::Call */ + /** Lookup119: pallet_services_payment::pallet::Call */ PalletServicesPaymentCall: { _enum: { purchase_credits: { @@ -1085,7 +1095,7 @@ export default { }, }, }, - /** Lookup119: pallet_data_preservers::pallet::Call */ + /** Lookup120: pallet_data_preservers::pallet::Call */ PalletDataPreserversCall: { _enum: { __Unused0: "Null", @@ -1126,14 +1136,14 @@ export default { }, }, }, - /** Lookup120: pallet_data_preservers::types::Profile */ + /** Lookup121: pallet_data_preservers::types::Profile */ PalletDataPreserversProfile: { url: "Bytes", paraIds: "PalletDataPreserversParaIdsFilter", mode: "PalletDataPreserversProfileMode", assignmentRequest: "DancelightRuntimePreserversAssignmentPaymentRequest", }, - /** Lookup122: pallet_data_preservers::types::ParaIdsFilter */ + /** Lookup123: pallet_data_preservers::types::ParaIdsFilter */ PalletDataPreserversParaIdsFilter: { _enum: { AnyParaId: "Null", @@ -1141,7 +1151,7 @@ export default { Blacklist: "BTreeSet", }, }, - /** Lookup126: pallet_data_preservers::types::ProfileMode */ + /** Lookup127: pallet_data_preservers::types::ProfileMode */ PalletDataPreserversProfileMode: { _enum: { Bootnode: "Null", @@ -1150,19 +1160,19 @@ export default { }, }, }, - /** Lookup127: dancelight_runtime::PreserversAssignmentPaymentRequest */ + /** Lookup128: dancelight_runtime::PreserversAssignmentPaymentRequest */ DancelightRuntimePreserversAssignmentPaymentRequest: { _enum: ["Free"], }, - /** Lookup128: dancelight_runtime::PreserversAssignmentPaymentExtra */ + /** Lookup129: dancelight_runtime::PreserversAssignmentPaymentExtra */ DancelightRuntimePreserversAssignmentPaymentExtra: { _enum: ["Free"], }, - /** Lookup129: dancelight_runtime::PreserversAssignmentPaymentWitness */ + /** Lookup130: dancelight_runtime::PreserversAssignmentPaymentWitness */ DancelightRuntimePreserversAssignmentPaymentWitness: { _enum: ["Free"], }, - /** Lookup130: pallet_external_validators::pallet::Call */ + /** Lookup131: pallet_external_validators::pallet::Call */ PalletExternalValidatorsCall: { _enum: { skip_external_validators: { @@ -1179,7 +1189,21 @@ export default { force_new_era_always: "Null", }, }, - /** Lookup131: pallet_session::pallet::Call */ + /** Lookup132: pallet_external_validator_slashes::pallet::Call */ + PalletExternalValidatorSlashesCall: { + _enum: { + cancel_deferred_slash: { + era: "u32", + slashIndices: "Vec", + }, + force_inject_slash: { + era: "u32", + validator: "AccountId32", + percentage: "Perbill", + }, + }, + }, + /** Lookup134: pallet_session::pallet::Call */ PalletSessionCall: { _enum: { set_keys: { @@ -1192,7 +1216,7 @@ export default { purge_keys: "Null", }, }, - /** Lookup132: dancelight_runtime::SessionKeys */ + /** Lookup135: dancelight_runtime::SessionKeys */ DancelightRuntimeSessionKeys: { grandpa: "SpConsensusGrandpaAppPublic", babe: "SpConsensusBabeAppPublic", @@ -1202,17 +1226,17 @@ export default { beefy: "SpConsensusBeefyEcdsaCryptoPublic", nimbus: "NimbusPrimitivesNimbusCryptoPublic", }, - /** Lookup133: polkadot_primitives::v7::validator_app::Public */ + /** Lookup136: polkadot_primitives::v7::validator_app::Public */ PolkadotPrimitivesV7ValidatorAppPublic: "[u8;32]", - /** Lookup134: polkadot_primitives::v7::assignment_app::Public */ + /** Lookup137: polkadot_primitives::v7::assignment_app::Public */ PolkadotPrimitivesV7AssignmentAppPublic: "[u8;32]", - /** Lookup135: sp_authority_discovery::app::Public */ + /** Lookup138: sp_authority_discovery::app::Public */ SpAuthorityDiscoveryAppPublic: "[u8;32]", - /** Lookup136: sp_consensus_beefy::ecdsa_crypto::Public */ + /** Lookup139: sp_consensus_beefy::ecdsa_crypto::Public */ SpConsensusBeefyEcdsaCryptoPublic: "[u8;33]", - /** Lookup138: nimbus_primitives::nimbus_crypto::Public */ + /** Lookup141: nimbus_primitives::nimbus_crypto::Public */ NimbusPrimitivesNimbusCryptoPublic: "[u8;32]", - /** Lookup139: pallet_grandpa::pallet::Call */ + /** Lookup142: pallet_grandpa::pallet::Call */ PalletGrandpaCall: { _enum: { report_equivocation: { @@ -1229,12 +1253,12 @@ export default { }, }, }, - /** Lookup140: sp_consensus_grandpa::EquivocationProof */ + /** Lookup143: sp_consensus_grandpa::EquivocationProof */ SpConsensusGrandpaEquivocationProof: { setId: "u64", equivocation: "SpConsensusGrandpaEquivocation", }, - /** Lookup141: sp_consensus_grandpa::Equivocation */ + /** Lookup144: sp_consensus_grandpa::Equivocation */ SpConsensusGrandpaEquivocation: { _enum: { Prevote: "FinalityGrandpaEquivocationPrevote", @@ -1242,7 +1266,7 @@ export default { }, }, /** - * Lookup142: finality_grandpa::Equivocation, sp_consensus_grandpa::app::Signature> */ FinalityGrandpaEquivocationPrevote: { @@ -1251,15 +1275,15 @@ export default { first: "(FinalityGrandpaPrevote,SpConsensusGrandpaAppSignature)", second: "(FinalityGrandpaPrevote,SpConsensusGrandpaAppSignature)", }, - /** Lookup143: finality_grandpa::Prevote */ + /** Lookup146: finality_grandpa::Prevote */ FinalityGrandpaPrevote: { targetHash: "H256", targetNumber: "u32", }, - /** Lookup144: sp_consensus_grandpa::app::Signature */ + /** Lookup147: sp_consensus_grandpa::app::Signature */ SpConsensusGrandpaAppSignature: "[u8;64]", /** - * Lookup146: finality_grandpa::Equivocation, sp_consensus_grandpa::app::Signature> */ FinalityGrandpaEquivocationPrecommit: { @@ -1268,12 +1292,12 @@ export default { first: "(FinalityGrandpaPrecommit,SpConsensusGrandpaAppSignature)", second: "(FinalityGrandpaPrecommit,SpConsensusGrandpaAppSignature)", }, - /** Lookup147: finality_grandpa::Precommit */ + /** Lookup150: finality_grandpa::Precommit */ FinalityGrandpaPrecommit: { targetHash: "H256", targetNumber: "u32", }, - /** Lookup149: pallet_treasury::pallet::Call */ + /** Lookup152: pallet_treasury::pallet::Call */ PalletTreasuryCall: { _enum: { __Unused0: "Null", @@ -1303,7 +1327,7 @@ export default { }, }, }, - /** Lookup151: pallet_conviction_voting::pallet::Call */ + /** Lookup154: pallet_conviction_voting::pallet::Call */ PalletConvictionVotingCall: { _enum: { vote: { @@ -1334,7 +1358,7 @@ export default { }, }, }, - /** Lookup152: pallet_conviction_voting::vote::AccountVote */ + /** Lookup155: pallet_conviction_voting::vote::AccountVote */ PalletConvictionVotingVoteAccountVote: { _enum: { Standard: { @@ -1352,11 +1376,11 @@ export default { }, }, }, - /** Lookup154: pallet_conviction_voting::conviction::Conviction */ + /** Lookup157: pallet_conviction_voting::conviction::Conviction */ PalletConvictionVotingConviction: { _enum: ["None", "Locked1x", "Locked2x", "Locked3x", "Locked4x", "Locked5x", "Locked6x"], }, - /** Lookup156: pallet_referenda::pallet::Call */ + /** Lookup159: pallet_referenda::pallet::Call */ PalletReferendaCall: { _enum: { submit: { @@ -1391,7 +1415,7 @@ export default { }, }, }, - /** Lookup157: dancelight_runtime::OriginCaller */ + /** Lookup160: dancelight_runtime::OriginCaller */ DancelightRuntimeOriginCaller: { _enum: { system: "FrameSupportDispatchRawOrigin", @@ -1487,7 +1511,7 @@ export default { XcmPallet: "PalletXcmOrigin", }, }, - /** Lookup158: frame_support::dispatch::RawOrigin */ + /** Lookup161: frame_support::dispatch::RawOrigin */ FrameSupportDispatchRawOrigin: { _enum: { Root: "Null", @@ -1495,7 +1519,7 @@ export default { None: "Null", }, }, - /** Lookup159: dancelight_runtime::governance::origins::pallet_custom_origins::Origin */ + /** Lookup162: dancelight_runtime::governance::origins::pallet_custom_origins::Origin */ DancelightRuntimeGovernanceOriginsPalletCustomOriginsOrigin: { _enum: [ "StakingAdmin", @@ -1527,39 +1551,39 @@ export default { "Fellowship9Dan", ], }, - /** Lookup160: polkadot_runtime_parachains::origin::pallet::Origin */ + /** Lookup163: polkadot_runtime_parachains::origin::pallet::Origin */ PolkadotRuntimeParachainsOriginPalletOrigin: { _enum: { Parachain: "u32", }, }, - /** Lookup161: pallet_xcm::pallet::Origin */ + /** Lookup164: pallet_xcm::pallet::Origin */ PalletXcmOrigin: { _enum: { Xcm: "StagingXcmV4Location", Response: "StagingXcmV4Location", }, }, - /** Lookup162: staging_xcm::v4::location::Location */ + /** Lookup165: staging_xcm::v4::location::Location */ StagingXcmV4Location: { parents: "u8", interior: "StagingXcmV4Junctions", }, - /** Lookup163: staging_xcm::v4::junctions::Junctions */ + /** Lookup166: staging_xcm::v4::junctions::Junctions */ StagingXcmV4Junctions: { _enum: { Here: "Null", - X1: "[Lookup165;1]", - X2: "[Lookup165;2]", - X3: "[Lookup165;3]", - X4: "[Lookup165;4]", - X5: "[Lookup165;5]", - X6: "[Lookup165;6]", - X7: "[Lookup165;7]", - X8: "[Lookup165;8]", + X1: "[Lookup168;1]", + X2: "[Lookup168;2]", + X3: "[Lookup168;3]", + X4: "[Lookup168;4]", + X5: "[Lookup168;5]", + X6: "[Lookup168;6]", + X7: "[Lookup168;7]", + X8: "[Lookup168;8]", }, }, - /** Lookup165: staging_xcm::v4::junction::Junction */ + /** Lookup168: staging_xcm::v4::junction::Junction */ StagingXcmV4Junction: { _enum: { Parachain: "Compact", @@ -1589,7 +1613,7 @@ export default { GlobalConsensus: "StagingXcmV4JunctionNetworkId", }, }, - /** Lookup167: staging_xcm::v4::junction::NetworkId */ + /** Lookup170: staging_xcm::v4::junction::NetworkId */ StagingXcmV4JunctionNetworkId: { _enum: { ByGenesis: "[u8;32]", @@ -1610,7 +1634,7 @@ export default { PolkadotBulletin: "Null", }, }, - /** Lookup168: xcm::v3::junction::BodyId */ + /** Lookup171: xcm::v3::junction::BodyId */ XcmV3JunctionBodyId: { _enum: { Unit: "Null", @@ -1625,7 +1649,7 @@ export default { Treasury: "Null", }, }, - /** Lookup169: xcm::v3::junction::BodyPart */ + /** Lookup172: xcm::v3::junction::BodyPart */ XcmV3JunctionBodyPart: { _enum: { Voice: "Null", @@ -1646,16 +1670,16 @@ export default { }, }, }, - /** Lookup177: sp_core::Void */ + /** Lookup180: sp_core::Void */ SpCoreVoid: "Null", - /** Lookup178: frame_support::traits::schedule::DispatchTime */ + /** Lookup181: frame_support::traits::schedule::DispatchTime */ FrameSupportScheduleDispatchTime: { _enum: { At: "u32", After: "u32", }, }, - /** Lookup180: pallet_ranked_collective::pallet::Call */ + /** Lookup183: pallet_ranked_collective::pallet::Call */ PalletRankedCollectiveCall: { _enum: { add_member: { @@ -1685,7 +1709,7 @@ export default { }, }, }, - /** Lookup182: pallet_whitelist::pallet::Call */ + /** Lookup185: pallet_whitelist::pallet::Call */ PalletWhitelistCall: { _enum: { whitelist_call: { @@ -1704,7 +1728,7 @@ export default { }, }, }, - /** Lookup183: polkadot_runtime_parachains::configuration::pallet::Call */ + /** Lookup186: polkadot_runtime_parachains::configuration::pallet::Call */ PolkadotRuntimeParachainsConfigurationPalletCall: { _enum: { set_validation_upgrade_cooldown: { @@ -2003,14 +2027,14 @@ export default { }, }, }, - /** Lookup184: polkadot_primitives::v7::async_backing::AsyncBackingParams */ + /** Lookup187: polkadot_primitives::v7::async_backing::AsyncBackingParams */ PolkadotPrimitivesV7AsyncBackingAsyncBackingParams: { maxCandidateDepth: "u32", allowedAncestryLen: "u32", }, - /** Lookup185: polkadot_primitives::v7::executor_params::ExecutorParams */ + /** Lookup188: polkadot_primitives::v7::executor_params::ExecutorParams */ PolkadotPrimitivesV7ExecutorParams: "Vec", - /** Lookup187: polkadot_primitives::v7::executor_params::ExecutorParam */ + /** Lookup190: polkadot_primitives::v7::executor_params::ExecutorParam */ PolkadotPrimitivesV7ExecutorParamsExecutorParam: { _enum: { __Unused0: "Null", @@ -2023,19 +2047,19 @@ export default { WasmExtBulkMemory: "Null", }, }, - /** Lookup188: polkadot_primitives::v7::PvfPrepKind */ + /** Lookup191: polkadot_primitives::v7::PvfPrepKind */ PolkadotPrimitivesV7PvfPrepKind: { _enum: ["Precheck", "Prepare"], }, - /** Lookup189: polkadot_primitives::v7::PvfExecKind */ + /** Lookup192: polkadot_primitives::v7::PvfExecKind */ PolkadotPrimitivesV7PvfExecKind: { _enum: ["Backing", "Approval"], }, - /** Lookup190: polkadot_primitives::v7::ApprovalVotingParams */ + /** Lookup193: polkadot_primitives::v7::ApprovalVotingParams */ PolkadotPrimitivesV7ApprovalVotingParams: { maxApprovalCoalesceCount: "u32", }, - /** Lookup191: polkadot_primitives::vstaging::SchedulerParams */ + /** Lookup194: polkadot_primitives::vstaging::SchedulerParams */ PolkadotPrimitivesVstagingSchedulerParams: { groupRotationFrequency: "u32", parasAvailabilityPeriod: "u32", @@ -2049,11 +2073,11 @@ export default { onDemandBaseFee: "u128", ttl: "u32", }, - /** Lookup192: polkadot_runtime_parachains::shared::pallet::Call */ + /** Lookup195: polkadot_runtime_parachains::shared::pallet::Call */ PolkadotRuntimeParachainsSharedPalletCall: "Null", - /** Lookup193: polkadot_runtime_parachains::inclusion::pallet::Call */ + /** Lookup196: polkadot_runtime_parachains::inclusion::pallet::Call */ PolkadotRuntimeParachainsInclusionPalletCall: "Null", - /** Lookup194: polkadot_runtime_parachains::paras_inherent::pallet::Call */ + /** Lookup197: polkadot_runtime_parachains::paras_inherent::pallet::Call */ PolkadotRuntimeParachainsParasInherentPalletCall: { _enum: { enter: { @@ -2061,7 +2085,7 @@ export default { }, }, }, - /** Lookup195: polkadot_primitives::v7::InherentData> */ + /** Lookup198: polkadot_primitives::v7::InherentData> */ PolkadotPrimitivesV7InherentData: { bitfields: "Vec", backedCandidates: "Vec", @@ -2069,7 +2093,7 @@ export default { parentHeader: "SpRuntimeHeader", }, /** - * Lookup197: polkadot_primitives::v7::signed::UncheckedSigned */ PolkadotPrimitivesV7SignedUncheckedSigned: { @@ -2077,22 +2101,22 @@ export default { validatorIndex: "u32", signature: "PolkadotPrimitivesV7ValidatorAppSignature", }, - /** Lookup200: bitvec::order::Lsb0 */ + /** Lookup203: bitvec::order::Lsb0 */ BitvecOrderLsb0: "Null", - /** Lookup202: polkadot_primitives::v7::validator_app::Signature */ + /** Lookup205: polkadot_primitives::v7::validator_app::Signature */ PolkadotPrimitivesV7ValidatorAppSignature: "[u8;64]", - /** Lookup204: polkadot_primitives::v7::BackedCandidate */ + /** Lookup207: polkadot_primitives::v7::BackedCandidate */ PolkadotPrimitivesV7BackedCandidate: { candidate: "PolkadotPrimitivesV7CommittedCandidateReceipt", validityVotes: "Vec", validatorIndices: "BitVec", }, - /** Lookup205: polkadot_primitives::v7::CommittedCandidateReceipt */ + /** Lookup208: polkadot_primitives::v7::CommittedCandidateReceipt */ PolkadotPrimitivesV7CommittedCandidateReceipt: { descriptor: "PolkadotPrimitivesV7CandidateDescriptor", commitments: "PolkadotPrimitivesV7CandidateCommitments", }, - /** Lookup206: polkadot_primitives::v7::CandidateDescriptor */ + /** Lookup209: polkadot_primitives::v7::CandidateDescriptor */ PolkadotPrimitivesV7CandidateDescriptor: { paraId: "u32", relayParent: "H256", @@ -2104,11 +2128,11 @@ export default { paraHead: "H256", validationCodeHash: "H256", }, - /** Lookup207: polkadot_primitives::v7::collator_app::Public */ + /** Lookup210: polkadot_primitives::v7::collator_app::Public */ PolkadotPrimitivesV7CollatorAppPublic: "[u8;32]", - /** Lookup208: polkadot_primitives::v7::collator_app::Signature */ + /** Lookup211: polkadot_primitives::v7::collator_app::Signature */ PolkadotPrimitivesV7CollatorAppSignature: "[u8;64]", - /** Lookup210: polkadot_primitives::v7::CandidateCommitments */ + /** Lookup213: polkadot_primitives::v7::CandidateCommitments */ PolkadotPrimitivesV7CandidateCommitments: { upwardMessages: "Vec", horizontalMessages: "Vec", @@ -2117,12 +2141,12 @@ export default { processedDownwardMessages: "u32", hrmpWatermark: "u32", }, - /** Lookup213: polkadot_core_primitives::OutboundHrmpMessage */ + /** Lookup216: polkadot_core_primitives::OutboundHrmpMessage */ PolkadotCorePrimitivesOutboundHrmpMessage: { recipient: "u32", data: "Bytes", }, - /** Lookup218: polkadot_primitives::v7::ValidityAttestation */ + /** Lookup221: polkadot_primitives::v7::ValidityAttestation */ PolkadotPrimitivesV7ValidityAttestation: { _enum: { __Unused0: "Null", @@ -2130,20 +2154,20 @@ export default { Explicit: "PolkadotPrimitivesV7ValidatorAppSignature", }, }, - /** Lookup220: polkadot_primitives::v7::DisputeStatementSet */ + /** Lookup223: polkadot_primitives::v7::DisputeStatementSet */ PolkadotPrimitivesV7DisputeStatementSet: { candidateHash: "H256", session: "u32", statements: "Vec<(PolkadotPrimitivesV7DisputeStatement,u32,PolkadotPrimitivesV7ValidatorAppSignature)>", }, - /** Lookup224: polkadot_primitives::v7::DisputeStatement */ + /** Lookup227: polkadot_primitives::v7::DisputeStatement */ PolkadotPrimitivesV7DisputeStatement: { _enum: { Valid: "PolkadotPrimitivesV7ValidDisputeStatementKind", Invalid: "PolkadotPrimitivesV7InvalidDisputeStatementKind", }, }, - /** Lookup225: polkadot_primitives::v7::ValidDisputeStatementKind */ + /** Lookup228: polkadot_primitives::v7::ValidDisputeStatementKind */ PolkadotPrimitivesV7ValidDisputeStatementKind: { _enum: { Explicit: "Null", @@ -2153,11 +2177,11 @@ export default { ApprovalCheckingMultipleCandidates: "Vec", }, }, - /** Lookup227: polkadot_primitives::v7::InvalidDisputeStatementKind */ + /** Lookup230: polkadot_primitives::v7::InvalidDisputeStatementKind */ PolkadotPrimitivesV7InvalidDisputeStatementKind: { _enum: ["Explicit"], }, - /** Lookup228: polkadot_runtime_parachains::paras::pallet::Call */ + /** Lookup231: polkadot_runtime_parachains::paras::pallet::Call */ PolkadotRuntimeParachainsParasPalletCall: { _enum: { force_set_current_code: { @@ -2196,14 +2220,14 @@ export default { }, }, }, - /** Lookup229: polkadot_primitives::v7::PvfCheckStatement */ + /** Lookup232: polkadot_primitives::v7::PvfCheckStatement */ PolkadotPrimitivesV7PvfCheckStatement: { accept: "bool", subject: "H256", sessionIndex: "u32", validatorIndex: "u32", }, - /** Lookup230: polkadot_runtime_parachains::initializer::pallet::Call */ + /** Lookup233: polkadot_runtime_parachains::initializer::pallet::Call */ PolkadotRuntimeParachainsInitializerPalletCall: { _enum: { force_approve: { @@ -2211,7 +2235,7 @@ export default { }, }, }, - /** Lookup231: polkadot_runtime_parachains::hrmp::pallet::Call */ + /** Lookup234: polkadot_runtime_parachains::hrmp::pallet::Call */ PolkadotRuntimeParachainsHrmpPalletCall: { _enum: { hrmp_init_open_channel: { @@ -2259,16 +2283,16 @@ export default { }, }, }, - /** Lookup232: polkadot_parachain_primitives::primitives::HrmpChannelId */ + /** Lookup235: polkadot_parachain_primitives::primitives::HrmpChannelId */ PolkadotParachainPrimitivesPrimitivesHrmpChannelId: { sender: "u32", recipient: "u32", }, - /** Lookup233: polkadot_runtime_parachains::disputes::pallet::Call */ + /** Lookup236: polkadot_runtime_parachains::disputes::pallet::Call */ PolkadotRuntimeParachainsDisputesPalletCall: { _enum: ["force_unfreeze"], }, - /** Lookup234: polkadot_runtime_parachains::disputes::slashing::pallet::Call */ + /** Lookup237: polkadot_runtime_parachains::disputes::slashing::pallet::Call */ PolkadotRuntimeParachainsDisputesSlashingPalletCall: { _enum: { report_dispute_lost_unsigned: { @@ -2277,23 +2301,23 @@ export default { }, }, }, - /** Lookup235: polkadot_primitives::v7::slashing::DisputeProof */ + /** Lookup238: polkadot_primitives::v7::slashing::DisputeProof */ PolkadotPrimitivesV7SlashingDisputeProof: { timeSlot: "PolkadotPrimitivesV7SlashingDisputesTimeSlot", kind: "PolkadotPrimitivesV7SlashingSlashingOffenceKind", validatorIndex: "u32", validatorId: "PolkadotPrimitivesV7ValidatorAppPublic", }, - /** Lookup236: polkadot_primitives::v7::slashing::DisputesTimeSlot */ + /** Lookup239: polkadot_primitives::v7::slashing::DisputesTimeSlot */ PolkadotPrimitivesV7SlashingDisputesTimeSlot: { sessionIndex: "u32", candidateHash: "H256", }, - /** Lookup237: polkadot_primitives::v7::slashing::SlashingOffenceKind */ + /** Lookup240: polkadot_primitives::v7::slashing::SlashingOffenceKind */ PolkadotPrimitivesV7SlashingSlashingOffenceKind: { _enum: ["ForInvalid", "AgainstValid"], }, - /** Lookup238: pallet_message_queue::pallet::Call */ + /** Lookup241: pallet_message_queue::pallet::Call */ PalletMessageQueueCall: { _enum: { reap_page: { @@ -2308,19 +2332,19 @@ export default { }, }, }, - /** Lookup239: polkadot_runtime_parachains::inclusion::AggregateMessageOrigin */ + /** Lookup242: polkadot_runtime_parachains::inclusion::AggregateMessageOrigin */ PolkadotRuntimeParachainsInclusionAggregateMessageOrigin: { _enum: { Ump: "PolkadotRuntimeParachainsInclusionUmpQueueId", }, }, - /** Lookup240: polkadot_runtime_parachains::inclusion::UmpQueueId */ + /** Lookup243: polkadot_runtime_parachains::inclusion::UmpQueueId */ PolkadotRuntimeParachainsInclusionUmpQueueId: { _enum: { Para: "u32", }, }, - /** Lookup241: polkadot_runtime_parachains::assigner_on_demand::pallet::Call */ + /** Lookup244: polkadot_runtime_parachains::assigner_on_demand::pallet::Call */ PolkadotRuntimeParachainsAssignerOnDemandPalletCall: { _enum: { place_order_allow_death: { @@ -2333,7 +2357,7 @@ export default { }, }, }, - /** Lookup242: polkadot_runtime_common::paras_registrar::pallet::Call */ + /** Lookup245: polkadot_runtime_common::paras_registrar::pallet::Call */ PolkadotRuntimeCommonParasRegistrarPalletCall: { _enum: { register: { @@ -2372,7 +2396,7 @@ export default { }, }, }, - /** Lookup243: pallet_utility::pallet::Call */ + /** Lookup246: pallet_utility::pallet::Call */ PalletUtilityCall: { _enum: { batch: { @@ -2398,7 +2422,7 @@ export default { }, }, }, - /** Lookup245: pallet_identity::pallet::Call */ + /** Lookup248: pallet_identity::pallet::Call */ PalletIdentityCall: { _enum: { add_registrar: { @@ -2481,7 +2505,7 @@ export default { }, }, }, - /** Lookup246: pallet_identity::legacy::IdentityInfo */ + /** Lookup249: pallet_identity::legacy::IdentityInfo */ PalletIdentityLegacyIdentityInfo: { additional: "Vec<(Data,Data)>", display: "Data", @@ -2493,7 +2517,7 @@ export default { image: "Data", twitter: "Data", }, - /** Lookup283: pallet_identity::types::Judgement */ + /** Lookup286: pallet_identity::types::Judgement */ PalletIdentityJudgement: { _enum: { Unknown: "Null", @@ -2505,7 +2529,7 @@ export default { Erroneous: "Null", }, }, - /** Lookup286: pallet_scheduler::pallet::Call */ + /** Lookup289: pallet_scheduler::pallet::Call */ PalletSchedulerCall: { _enum: { schedule: { @@ -2559,7 +2583,7 @@ export default { }, }, }, - /** Lookup289: pallet_proxy::pallet::Call */ + /** Lookup292: pallet_proxy::pallet::Call */ PalletProxyCall: { _enum: { proxy: { @@ -2610,11 +2634,11 @@ export default { }, }, }, - /** Lookup291: dancelight_runtime::ProxyType */ + /** Lookup294: dancelight_runtime::ProxyType */ DancelightRuntimeProxyType: { _enum: ["Any", "NonTransfer", "Governance", "IdentityJudgement", "CancelProxy", "Auction", "OnDemandOrdering"], }, - /** Lookup292: pallet_multisig::pallet::Call */ + /** Lookup295: pallet_multisig::pallet::Call */ PalletMultisigCall: { _enum: { as_multi_threshold_1: { @@ -2643,12 +2667,12 @@ export default { }, }, }, - /** Lookup294: pallet_multisig::Timepoint */ + /** Lookup297: pallet_multisig::Timepoint */ PalletMultisigTimepoint: { height: "u32", index: "u32", }, - /** Lookup295: pallet_preimage::pallet::Call */ + /** Lookup298: pallet_preimage::pallet::Call */ PalletPreimageCall: { _enum: { note_preimage: { @@ -2677,7 +2701,7 @@ export default { }, }, }, - /** Lookup297: pallet_asset_rate::pallet::Call */ + /** Lookup300: pallet_asset_rate::pallet::Call */ PalletAssetRateCall: { _enum: { create: { @@ -2693,7 +2717,7 @@ export default { }, }, }, - /** Lookup299: pallet_xcm::pallet::Call */ + /** Lookup302: pallet_xcm::pallet::Call */ PalletXcmCall: { _enum: { send: { @@ -2768,7 +2792,7 @@ export default { }, }, }, - /** Lookup300: xcm::VersionedLocation */ + /** Lookup303: xcm::VersionedLocation */ XcmVersionedLocation: { _enum: { __Unused0: "Null", @@ -2778,12 +2802,12 @@ export default { V4: "StagingXcmV4Location", }, }, - /** Lookup301: xcm::v2::multilocation::MultiLocation */ + /** Lookup304: xcm::v2::multilocation::MultiLocation */ XcmV2MultiLocation: { parents: "u8", interior: "XcmV2MultilocationJunctions", }, - /** Lookup302: xcm::v2::multilocation::Junctions */ + /** Lookup305: xcm::v2::multilocation::Junctions */ XcmV2MultilocationJunctions: { _enum: { Here: "Null", @@ -2797,7 +2821,7 @@ export default { X8: "(XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction)", }, }, - /** Lookup303: xcm::v2::junction::Junction */ + /** Lookup306: xcm::v2::junction::Junction */ XcmV2Junction: { _enum: { Parachain: "Compact", @@ -2823,7 +2847,7 @@ export default { }, }, }, - /** Lookup304: xcm::v2::NetworkId */ + /** Lookup307: xcm::v2::NetworkId */ XcmV2NetworkId: { _enum: { Any: "Null", @@ -2832,7 +2856,7 @@ export default { Kusama: "Null", }, }, - /** Lookup306: xcm::v2::BodyId */ + /** Lookup309: xcm::v2::BodyId */ XcmV2BodyId: { _enum: { Unit: "Null", @@ -2847,7 +2871,7 @@ export default { Treasury: "Null", }, }, - /** Lookup307: xcm::v2::BodyPart */ + /** Lookup310: xcm::v2::BodyPart */ XcmV2BodyPart: { _enum: { Voice: "Null", @@ -2868,12 +2892,12 @@ export default { }, }, }, - /** Lookup308: staging_xcm::v3::multilocation::MultiLocation */ + /** Lookup311: staging_xcm::v3::multilocation::MultiLocation */ StagingXcmV3MultiLocation: { parents: "u8", interior: "XcmV3Junctions", }, - /** Lookup309: xcm::v3::junctions::Junctions */ + /** Lookup312: xcm::v3::junctions::Junctions */ XcmV3Junctions: { _enum: { Here: "Null", @@ -2887,7 +2911,7 @@ export default { X8: "(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)", }, }, - /** Lookup310: xcm::v3::junction::Junction */ + /** Lookup313: xcm::v3::junction::Junction */ XcmV3Junction: { _enum: { Parachain: "Compact", @@ -2917,7 +2941,7 @@ export default { GlobalConsensus: "XcmV3JunctionNetworkId", }, }, - /** Lookup312: xcm::v3::junction::NetworkId */ + /** Lookup315: xcm::v3::junction::NetworkId */ XcmV3JunctionNetworkId: { _enum: { ByGenesis: "[u8;32]", @@ -2938,7 +2962,7 @@ export default { PolkadotBulletin: "Null", }, }, - /** Lookup313: xcm::VersionedXcm */ + /** Lookup316: xcm::VersionedXcm */ XcmVersionedXcm: { _enum: { __Unused0: "Null", @@ -2948,9 +2972,9 @@ export default { V4: "StagingXcmV4Xcm", }, }, - /** Lookup314: xcm::v2::Xcm */ + /** Lookup317: xcm::v2::Xcm */ XcmV2Xcm: "Vec", - /** Lookup316: xcm::v2::Instruction */ + /** Lookup319: xcm::v2::Instruction */ XcmV2Instruction: { _enum: { WithdrawAsset: "XcmV2MultiassetMultiAssets", @@ -3046,28 +3070,28 @@ export default { UnsubscribeVersion: "Null", }, }, - /** Lookup317: xcm::v2::multiasset::MultiAssets */ + /** Lookup320: xcm::v2::multiasset::MultiAssets */ XcmV2MultiassetMultiAssets: "Vec", - /** Lookup319: xcm::v2::multiasset::MultiAsset */ + /** Lookup322: xcm::v2::multiasset::MultiAsset */ XcmV2MultiAsset: { id: "XcmV2MultiassetAssetId", fun: "XcmV2MultiassetFungibility", }, - /** Lookup320: xcm::v2::multiasset::AssetId */ + /** Lookup323: xcm::v2::multiasset::AssetId */ XcmV2MultiassetAssetId: { _enum: { Concrete: "XcmV2MultiLocation", Abstract: "Bytes", }, }, - /** Lookup321: xcm::v2::multiasset::Fungibility */ + /** Lookup324: xcm::v2::multiasset::Fungibility */ XcmV2MultiassetFungibility: { _enum: { Fungible: "Compact", NonFungible: "XcmV2MultiassetAssetInstance", }, }, - /** Lookup322: xcm::v2::multiasset::AssetInstance */ + /** Lookup325: xcm::v2::multiasset::AssetInstance */ XcmV2MultiassetAssetInstance: { _enum: { Undefined: "Null", @@ -3079,7 +3103,7 @@ export default { Blob: "Bytes", }, }, - /** Lookup323: xcm::v2::Response */ + /** Lookup326: xcm::v2::Response */ XcmV2Response: { _enum: { Null: "Null", @@ -3088,7 +3112,7 @@ export default { Version: "u32", }, }, - /** Lookup326: xcm::v2::traits::Error */ + /** Lookup329: xcm::v2::traits::Error */ XcmV2TraitsError: { _enum: { Overflow: "Null", @@ -3119,22 +3143,22 @@ export default { WeightNotComputable: "Null", }, }, - /** Lookup327: xcm::v2::OriginKind */ + /** Lookup330: xcm::v2::OriginKind */ XcmV2OriginKind: { _enum: ["Native", "SovereignAccount", "Superuser", "Xcm"], }, - /** Lookup328: xcm::double_encoded::DoubleEncoded */ + /** Lookup331: xcm::double_encoded::DoubleEncoded */ XcmDoubleEncoded: { encoded: "Bytes", }, - /** Lookup329: xcm::v2::multiasset::MultiAssetFilter */ + /** Lookup332: xcm::v2::multiasset::MultiAssetFilter */ XcmV2MultiassetMultiAssetFilter: { _enum: { Definite: "XcmV2MultiassetMultiAssets", Wild: "XcmV2MultiassetWildMultiAsset", }, }, - /** Lookup330: xcm::v2::multiasset::WildMultiAsset */ + /** Lookup333: xcm::v2::multiasset::WildMultiAsset */ XcmV2MultiassetWildMultiAsset: { _enum: { All: "Null", @@ -3144,20 +3168,20 @@ export default { }, }, }, - /** Lookup331: xcm::v2::multiasset::WildFungibility */ + /** Lookup334: xcm::v2::multiasset::WildFungibility */ XcmV2MultiassetWildFungibility: { _enum: ["Fungible", "NonFungible"], }, - /** Lookup332: xcm::v2::WeightLimit */ + /** Lookup335: xcm::v2::WeightLimit */ XcmV2WeightLimit: { _enum: { Unlimited: "Null", Limited: "Compact", }, }, - /** Lookup333: xcm::v3::Xcm */ + /** Lookup336: xcm::v3::Xcm */ XcmV3Xcm: "Vec", - /** Lookup335: xcm::v3::Instruction */ + /** Lookup338: xcm::v3::Instruction */ XcmV3Instruction: { _enum: { WithdrawAsset: "XcmV3MultiassetMultiAssets", @@ -3297,28 +3321,28 @@ export default { }, }, }, - /** Lookup336: xcm::v3::multiasset::MultiAssets */ + /** Lookup339: xcm::v3::multiasset::MultiAssets */ XcmV3MultiassetMultiAssets: "Vec", - /** Lookup338: xcm::v3::multiasset::MultiAsset */ + /** Lookup341: xcm::v3::multiasset::MultiAsset */ XcmV3MultiAsset: { id: "XcmV3MultiassetAssetId", fun: "XcmV3MultiassetFungibility", }, - /** Lookup339: xcm::v3::multiasset::AssetId */ + /** Lookup342: xcm::v3::multiasset::AssetId */ XcmV3MultiassetAssetId: { _enum: { Concrete: "StagingXcmV3MultiLocation", Abstract: "[u8;32]", }, }, - /** Lookup340: xcm::v3::multiasset::Fungibility */ + /** Lookup343: xcm::v3::multiasset::Fungibility */ XcmV3MultiassetFungibility: { _enum: { Fungible: "Compact", NonFungible: "XcmV3MultiassetAssetInstance", }, }, - /** Lookup341: xcm::v3::multiasset::AssetInstance */ + /** Lookup344: xcm::v3::multiasset::AssetInstance */ XcmV3MultiassetAssetInstance: { _enum: { Undefined: "Null", @@ -3329,7 +3353,7 @@ export default { Array32: "[u8;32]", }, }, - /** Lookup342: xcm::v3::Response */ + /** Lookup345: xcm::v3::Response */ XcmV3Response: { _enum: { Null: "Null", @@ -3340,7 +3364,7 @@ export default { DispatchResult: "XcmV3MaybeErrorCode", }, }, - /** Lookup345: xcm::v3::traits::Error */ + /** Lookup348: xcm::v3::traits::Error */ XcmV3TraitsError: { _enum: { Overflow: "Null", @@ -3385,7 +3409,7 @@ export default { ExceedsStackLimit: "Null", }, }, - /** Lookup347: xcm::v3::PalletInfo */ + /** Lookup350: xcm::v3::PalletInfo */ XcmV3PalletInfo: { index: "Compact", name: "Bytes", @@ -3394,7 +3418,7 @@ export default { minor: "Compact", patch: "Compact", }, - /** Lookup350: xcm::v3::MaybeErrorCode */ + /** Lookup353: xcm::v3::MaybeErrorCode */ XcmV3MaybeErrorCode: { _enum: { Success: "Null", @@ -3402,24 +3426,24 @@ export default { TruncatedError: "Bytes", }, }, - /** Lookup353: xcm::v3::OriginKind */ + /** Lookup356: xcm::v3::OriginKind */ XcmV3OriginKind: { _enum: ["Native", "SovereignAccount", "Superuser", "Xcm"], }, - /** Lookup354: xcm::v3::QueryResponseInfo */ + /** Lookup357: xcm::v3::QueryResponseInfo */ XcmV3QueryResponseInfo: { destination: "StagingXcmV3MultiLocation", queryId: "Compact", maxWeight: "SpWeightsWeightV2Weight", }, - /** Lookup355: xcm::v3::multiasset::MultiAssetFilter */ + /** Lookup358: xcm::v3::multiasset::MultiAssetFilter */ XcmV3MultiassetMultiAssetFilter: { _enum: { Definite: "XcmV3MultiassetMultiAssets", Wild: "XcmV3MultiassetWildMultiAsset", }, }, - /** Lookup356: xcm::v3::multiasset::WildMultiAsset */ + /** Lookup359: xcm::v3::multiasset::WildMultiAsset */ XcmV3MultiassetWildMultiAsset: { _enum: { All: "Null", @@ -3435,20 +3459,20 @@ export default { }, }, }, - /** Lookup357: xcm::v3::multiasset::WildFungibility */ + /** Lookup360: xcm::v3::multiasset::WildFungibility */ XcmV3MultiassetWildFungibility: { _enum: ["Fungible", "NonFungible"], }, - /** Lookup358: xcm::v3::WeightLimit */ + /** Lookup361: xcm::v3::WeightLimit */ XcmV3WeightLimit: { _enum: { Unlimited: "Null", Limited: "SpWeightsWeightV2Weight", }, }, - /** Lookup359: staging_xcm::v4::Xcm */ + /** Lookup362: staging_xcm::v4::Xcm */ StagingXcmV4Xcm: "Vec", - /** Lookup361: staging_xcm::v4::Instruction */ + /** Lookup364: staging_xcm::v4::Instruction */ StagingXcmV4Instruction: { _enum: { WithdrawAsset: "StagingXcmV4AssetAssets", @@ -3588,23 +3612,23 @@ export default { }, }, }, - /** Lookup362: staging_xcm::v4::asset::Assets */ + /** Lookup365: staging_xcm::v4::asset::Assets */ StagingXcmV4AssetAssets: "Vec", - /** Lookup364: staging_xcm::v4::asset::Asset */ + /** Lookup367: staging_xcm::v4::asset::Asset */ StagingXcmV4Asset: { id: "StagingXcmV4AssetAssetId", fun: "StagingXcmV4AssetFungibility", }, - /** Lookup365: staging_xcm::v4::asset::AssetId */ + /** Lookup368: staging_xcm::v4::asset::AssetId */ StagingXcmV4AssetAssetId: "StagingXcmV4Location", - /** Lookup366: staging_xcm::v4::asset::Fungibility */ + /** Lookup369: staging_xcm::v4::asset::Fungibility */ StagingXcmV4AssetFungibility: { _enum: { Fungible: "Compact", NonFungible: "StagingXcmV4AssetAssetInstance", }, }, - /** Lookup367: staging_xcm::v4::asset::AssetInstance */ + /** Lookup370: staging_xcm::v4::asset::AssetInstance */ StagingXcmV4AssetAssetInstance: { _enum: { Undefined: "Null", @@ -3615,7 +3639,7 @@ export default { Array32: "[u8;32]", }, }, - /** Lookup368: staging_xcm::v4::Response */ + /** Lookup371: staging_xcm::v4::Response */ StagingXcmV4Response: { _enum: { Null: "Null", @@ -3626,7 +3650,7 @@ export default { DispatchResult: "XcmV3MaybeErrorCode", }, }, - /** Lookup370: staging_xcm::v4::PalletInfo */ + /** Lookup373: staging_xcm::v4::PalletInfo */ StagingXcmV4PalletInfo: { index: "Compact", name: "Bytes", @@ -3635,20 +3659,20 @@ export default { minor: "Compact", patch: "Compact", }, - /** Lookup374: staging_xcm::v4::QueryResponseInfo */ + /** Lookup377: staging_xcm::v4::QueryResponseInfo */ StagingXcmV4QueryResponseInfo: { destination: "StagingXcmV4Location", queryId: "Compact", maxWeight: "SpWeightsWeightV2Weight", }, - /** Lookup375: staging_xcm::v4::asset::AssetFilter */ + /** Lookup378: staging_xcm::v4::asset::AssetFilter */ StagingXcmV4AssetAssetFilter: { _enum: { Definite: "StagingXcmV4AssetAssets", Wild: "StagingXcmV4AssetWildAsset", }, }, - /** Lookup376: staging_xcm::v4::asset::WildAsset */ + /** Lookup379: staging_xcm::v4::asset::WildAsset */ StagingXcmV4AssetWildAsset: { _enum: { All: "Null", @@ -3664,11 +3688,11 @@ export default { }, }, }, - /** Lookup377: staging_xcm::v4::asset::WildFungibility */ + /** Lookup380: staging_xcm::v4::asset::WildFungibility */ StagingXcmV4AssetWildFungibility: { _enum: ["Fungible", "NonFungible"], }, - /** Lookup378: xcm::VersionedAssets */ + /** Lookup381: xcm::VersionedAssets */ XcmVersionedAssets: { _enum: { __Unused0: "Null", @@ -3678,7 +3702,7 @@ export default { V4: "StagingXcmV4AssetAssets", }, }, - /** Lookup390: staging_xcm_executor::traits::asset_transfer::TransferType */ + /** Lookup393: staging_xcm_executor::traits::asset_transfer::TransferType */ StagingXcmExecutorAssetTransferTransferType: { _enum: { Teleport: "Null", @@ -3687,7 +3711,7 @@ export default { RemoteReserve: "XcmVersionedLocation", }, }, - /** Lookup391: xcm::VersionedAssetId */ + /** Lookup394: xcm::VersionedAssetId */ XcmVersionedAssetId: { _enum: { __Unused0: "Null", @@ -3697,7 +3721,7 @@ export default { V4: "StagingXcmV4AssetAssetId", }, }, - /** Lookup392: pallet_migrations::pallet::Call */ + /** Lookup395: pallet_migrations::pallet::Call */ PalletMigrationsCall: { _enum: { force_set_cursor: { @@ -3714,20 +3738,20 @@ export default { }, }, }, - /** Lookup394: pallet_migrations::MigrationCursor, BlockNumber> */ + /** Lookup397: pallet_migrations::MigrationCursor, BlockNumber> */ PalletMigrationsMigrationCursor: { _enum: { Active: "PalletMigrationsActiveCursor", Stuck: "Null", }, }, - /** Lookup396: pallet_migrations::ActiveCursor, BlockNumber> */ + /** Lookup399: pallet_migrations::ActiveCursor, BlockNumber> */ PalletMigrationsActiveCursor: { index: "u32", innerCursor: "Option", startedAt: "u32", }, - /** Lookup398: pallet_migrations::HistoricCleanupSelector> */ + /** Lookup401: pallet_migrations::HistoricCleanupSelector> */ PalletMigrationsHistoricCleanupSelector: { _enum: { Specific: "Vec", @@ -3737,7 +3761,7 @@ export default { }, }, }, - /** Lookup401: pallet_beefy::pallet::Call */ + /** Lookup404: pallet_beefy::pallet::Call */ PalletBeefyCall: { _enum: { report_double_voting: { @@ -3770,17 +3794,17 @@ export default { }, }, /** - * Lookup402: sp_consensus_beefy::DoubleVotingProof */ SpConsensusBeefyDoubleVotingProof: { first: "SpConsensusBeefyVoteMessage", second: "SpConsensusBeefyVoteMessage", }, - /** Lookup403: sp_consensus_beefy::ecdsa_crypto::Signature */ + /** Lookup406: sp_consensus_beefy::ecdsa_crypto::Signature */ SpConsensusBeefyEcdsaCryptoSignature: "[u8;65]", /** - * Lookup404: sp_consensus_beefy::VoteMessage */ SpConsensusBeefyVoteMessage: { @@ -3788,16 +3812,16 @@ export default { id: "SpConsensusBeefyEcdsaCryptoPublic", signature: "SpConsensusBeefyEcdsaCryptoSignature", }, - /** Lookup405: sp_consensus_beefy::commitment::Commitment */ + /** Lookup408: sp_consensus_beefy::commitment::Commitment */ SpConsensusBeefyCommitment: { payload: "SpConsensusBeefyPayload", blockNumber: "u32", validatorSetId: "u64", }, - /** Lookup406: sp_consensus_beefy::payload::Payload */ + /** Lookup409: sp_consensus_beefy::payload::Payload */ SpConsensusBeefyPayload: "Vec<([u8;2],Bytes)>", /** - * Lookup409: sp_consensus_beefy::ForkVotingProof, + * Lookup412: sp_consensus_beefy::ForkVotingProof, * sp_consensus_beefy::ecdsa_crypto::Public, sp_mmr_primitives::AncestryProof> */ SpConsensusBeefyForkVotingProof: { @@ -3805,18 +3829,18 @@ export default { ancestryProof: "SpMmrPrimitivesAncestryProof", header: "SpRuntimeHeader", }, - /** Lookup410: sp_mmr_primitives::AncestryProof */ + /** Lookup413: sp_mmr_primitives::AncestryProof */ SpMmrPrimitivesAncestryProof: { prevPeaks: "Vec", prevLeafCount: "u64", leafCount: "u64", items: "Vec<(u64,H256)>", }, - /** Lookup413: sp_consensus_beefy::FutureBlockVotingProof */ + /** Lookup416: sp_consensus_beefy::FutureBlockVotingProof */ SpConsensusBeefyFutureBlockVotingProof: { vote: "SpConsensusBeefyVoteMessage", }, - /** Lookup414: snowbridge_pallet_ethereum_client::pallet::Call */ + /** Lookup417: snowbridge_pallet_ethereum_client::pallet::Call */ SnowbridgePalletEthereumClientCall: { _enum: { force_checkpoint: { @@ -3831,7 +3855,7 @@ export default { }, }, }, - /** Lookup415: snowbridge_beacon_primitives::updates::CheckpointUpdate */ + /** Lookup418: snowbridge_beacon_primitives::updates::CheckpointUpdate */ SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate: { header: "SnowbridgeBeaconPrimitivesBeaconHeader", currentSyncCommittee: "SnowbridgeBeaconPrimitivesSyncCommittee", @@ -3840,7 +3864,7 @@ export default { blockRootsRoot: "H256", blockRootsBranch: "Vec", }, - /** Lookup416: snowbridge_beacon_primitives::types::BeaconHeader */ + /** Lookup419: snowbridge_beacon_primitives::types::BeaconHeader */ SnowbridgeBeaconPrimitivesBeaconHeader: { slot: "u64", proposerIndex: "u64", @@ -3848,14 +3872,14 @@ export default { stateRoot: "H256", bodyRoot: "H256", }, - /** Lookup417: snowbridge_beacon_primitives::types::SyncCommittee */ + /** Lookup420: snowbridge_beacon_primitives::types::SyncCommittee */ SnowbridgeBeaconPrimitivesSyncCommittee: { pubkeys: "[[u8;48];512]", aggregatePubkey: "SnowbridgeBeaconPrimitivesPublicKey", }, - /** Lookup419: snowbridge_beacon_primitives::types::PublicKey */ + /** Lookup422: snowbridge_beacon_primitives::types::PublicKey */ SnowbridgeBeaconPrimitivesPublicKey: "[u8;48]", - /** Lookup421: snowbridge_beacon_primitives::updates::Update */ + /** Lookup424: snowbridge_beacon_primitives::updates::Update */ SnowbridgeBeaconPrimitivesUpdatesUpdate: { attestedHeader: "SnowbridgeBeaconPrimitivesBeaconHeader", syncAggregate: "SnowbridgeBeaconPrimitivesSyncAggregate", @@ -3866,23 +3890,23 @@ export default { blockRootsRoot: "H256", blockRootsBranch: "Vec", }, - /** Lookup422: snowbridge_beacon_primitives::types::SyncAggregate */ + /** Lookup425: snowbridge_beacon_primitives::types::SyncAggregate */ SnowbridgeBeaconPrimitivesSyncAggregate: { syncCommitteeBits: "[u8;64]", syncCommitteeSignature: "SnowbridgeBeaconPrimitivesSignature", }, - /** Lookup423: snowbridge_beacon_primitives::types::Signature */ + /** Lookup426: snowbridge_beacon_primitives::types::Signature */ SnowbridgeBeaconPrimitivesSignature: "[u8;96]", - /** Lookup426: snowbridge_beacon_primitives::updates::NextSyncCommitteeUpdate */ + /** Lookup429: snowbridge_beacon_primitives::updates::NextSyncCommitteeUpdate */ SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate: { nextSyncCommittee: "SnowbridgeBeaconPrimitivesSyncCommittee", nextSyncCommitteeBranch: "Vec", }, - /** Lookup427: snowbridge_core::operating_mode::BasicOperatingMode */ + /** Lookup430: snowbridge_core::operating_mode::BasicOperatingMode */ SnowbridgeCoreOperatingModeBasicOperatingMode: { _enum: ["Normal", "Halted"], }, - /** Lookup428: polkadot_runtime_common::paras_sudo_wrapper::pallet::Call */ + /** Lookup431: polkadot_runtime_common::paras_sudo_wrapper::pallet::Call */ PolkadotRuntimeCommonParasSudoWrapperPalletCall: { _enum: { sudo_schedule_para_initialize: { @@ -3910,13 +3934,13 @@ export default { }, }, }, - /** Lookup429: polkadot_runtime_parachains::paras::ParaGenesisArgs */ + /** Lookup432: polkadot_runtime_parachains::paras::ParaGenesisArgs */ PolkadotRuntimeParachainsParasParaGenesisArgs: { genesisHead: "Bytes", validationCode: "Bytes", paraKind: "bool", }, - /** Lookup430: pallet_root_testing::pallet::Call */ + /** Lookup433: pallet_root_testing::pallet::Call */ PalletRootTestingCall: { _enum: { fill_block: { @@ -3925,7 +3949,7 @@ export default { trigger_defensive: "Null", }, }, - /** Lookup431: pallet_sudo::pallet::Call */ + /** Lookup434: pallet_sudo::pallet::Call */ PalletSudoCall: { _enum: { sudo: { @@ -3948,15 +3972,15 @@ export default { remove_key: "Null", }, }, - /** Lookup432: sp_runtime::traits::BlakeTwo256 */ + /** Lookup435: sp_runtime::traits::BlakeTwo256 */ SpRuntimeBlakeTwo256: "Null", - /** Lookup434: pallet_conviction_voting::types::Tally */ + /** Lookup437: pallet_conviction_voting::types::Tally */ PalletConvictionVotingTally: { ayes: "u128", nays: "u128", support: "u128", }, - /** Lookup435: pallet_ranked_collective::pallet::Event */ + /** Lookup438: pallet_ranked_collective::pallet::Event */ PalletRankedCollectiveEvent: { _enum: { MemberAdded: { @@ -3982,20 +4006,20 @@ export default { }, }, }, - /** Lookup436: pallet_ranked_collective::VoteRecord */ + /** Lookup439: pallet_ranked_collective::VoteRecord */ PalletRankedCollectiveVoteRecord: { _enum: { Aye: "u32", Nay: "u32", }, }, - /** Lookup437: pallet_ranked_collective::Tally */ + /** Lookup440: pallet_ranked_collective::Tally */ PalletRankedCollectiveTally: { bareAyes: "u32", ayes: "u32", nays: "u32", }, - /** Lookup439: pallet_whitelist::pallet::Event */ + /** Lookup442: pallet_whitelist::pallet::Event */ PalletWhitelistEvent: { _enum: { CallWhitelisted: { @@ -4010,17 +4034,17 @@ export default { }, }, }, - /** Lookup441: frame_support::dispatch::PostDispatchInfo */ + /** Lookup444: frame_support::dispatch::PostDispatchInfo */ FrameSupportDispatchPostDispatchInfo: { actualWeight: "Option", paysFee: "FrameSupportDispatchPays", }, - /** Lookup443: sp_runtime::DispatchErrorWithPostInfo */ + /** Lookup446: sp_runtime::DispatchErrorWithPostInfo */ SpRuntimeDispatchErrorWithPostInfo: { postInfo: "FrameSupportDispatchPostDispatchInfo", error: "SpRuntimeDispatchError", }, - /** Lookup444: polkadot_runtime_parachains::inclusion::pallet::Event */ + /** Lookup447: polkadot_runtime_parachains::inclusion::pallet::Event */ PolkadotRuntimeParachainsInclusionPalletEvent: { _enum: { CandidateBacked: "(PolkadotPrimitivesV7CandidateReceipt,Bytes,u32,u32)", @@ -4032,12 +4056,12 @@ export default { }, }, }, - /** Lookup445: polkadot_primitives::v7::CandidateReceipt */ + /** Lookup448: polkadot_primitives::v7::CandidateReceipt */ PolkadotPrimitivesV7CandidateReceipt: { descriptor: "PolkadotPrimitivesV7CandidateDescriptor", commitmentsHash: "H256", }, - /** Lookup448: polkadot_runtime_parachains::paras::pallet::Event */ + /** Lookup451: polkadot_runtime_parachains::paras::pallet::Event */ PolkadotRuntimeParachainsParasPalletEvent: { _enum: { CurrentCodeUpdated: "u32", @@ -4050,7 +4074,7 @@ export default { PvfCheckRejected: "(H256,u32)", }, }, - /** Lookup449: polkadot_runtime_parachains::hrmp::pallet::Event */ + /** Lookup452: polkadot_runtime_parachains::hrmp::pallet::Event */ PolkadotRuntimeParachainsHrmpPalletEvent: { _enum: { OpenChannelRequested: { @@ -4089,7 +4113,7 @@ export default { }, }, }, - /** Lookup450: polkadot_runtime_parachains::disputes::pallet::Event */ + /** Lookup453: polkadot_runtime_parachains::disputes::pallet::Event */ PolkadotRuntimeParachainsDisputesPalletEvent: { _enum: { DisputeInitiated: "(H256,PolkadotRuntimeParachainsDisputesDisputeLocation)", @@ -4097,15 +4121,15 @@ export default { Revert: "u32", }, }, - /** Lookup451: polkadot_runtime_parachains::disputes::DisputeLocation */ + /** Lookup454: polkadot_runtime_parachains::disputes::DisputeLocation */ PolkadotRuntimeParachainsDisputesDisputeLocation: { _enum: ["Local", "Remote"], }, - /** Lookup452: polkadot_runtime_parachains::disputes::DisputeResult */ + /** Lookup455: polkadot_runtime_parachains::disputes::DisputeResult */ PolkadotRuntimeParachainsDisputesDisputeResult: { _enum: ["Valid", "Invalid"], }, - /** Lookup453: pallet_message_queue::pallet::Event */ + /** Lookup456: pallet_message_queue::pallet::Event */ PalletMessageQueueEvent: { _enum: { ProcessingFailed: { @@ -4131,7 +4155,7 @@ export default { }, }, }, - /** Lookup454: frame_support::traits::messages::ProcessMessageError */ + /** Lookup457: frame_support::traits::messages::ProcessMessageError */ FrameSupportMessagesProcessMessageError: { _enum: { BadFormat: "Null", @@ -4142,7 +4166,7 @@ export default { StackLimitReached: "Null", }, }, - /** Lookup455: polkadot_runtime_parachains::assigner_on_demand::pallet::Event */ + /** Lookup458: polkadot_runtime_parachains::assigner_on_demand::pallet::Event */ PolkadotRuntimeParachainsAssignerOnDemandPalletEvent: { _enum: { OnDemandOrderPlaced: { @@ -4155,7 +4179,7 @@ export default { }, }, }, - /** Lookup456: polkadot_runtime_common::paras_registrar::pallet::Event */ + /** Lookup459: polkadot_runtime_common::paras_registrar::pallet::Event */ PolkadotRuntimeCommonParasRegistrarPalletEvent: { _enum: { Registered: { @@ -4175,7 +4199,7 @@ export default { }, }, }, - /** Lookup457: pallet_utility::pallet::Event */ + /** Lookup460: pallet_utility::pallet::Event */ PalletUtilityEvent: { _enum: { BatchInterrupted: { @@ -4193,7 +4217,7 @@ export default { }, }, }, - /** Lookup459: pallet_identity::pallet::Event */ + /** Lookup462: pallet_identity::pallet::Event */ PalletIdentityEvent: { _enum: { IdentitySet: { @@ -4265,7 +4289,7 @@ export default { }, }, }, - /** Lookup460: pallet_scheduler::pallet::Event */ + /** Lookup463: pallet_scheduler::pallet::Event */ PalletSchedulerEvent: { _enum: { Scheduled: { @@ -4309,7 +4333,7 @@ export default { }, }, }, - /** Lookup462: pallet_proxy::pallet::Event */ + /** Lookup465: pallet_proxy::pallet::Event */ PalletProxyEvent: { _enum: { ProxyExecuted: { @@ -4340,7 +4364,7 @@ export default { }, }, }, - /** Lookup463: pallet_multisig::pallet::Event */ + /** Lookup466: pallet_multisig::pallet::Event */ PalletMultisigEvent: { _enum: { NewMultisig: { @@ -4369,7 +4393,7 @@ export default { }, }, }, - /** Lookup464: pallet_preimage::pallet::Event */ + /** Lookup467: pallet_preimage::pallet::Event */ PalletPreimageEvent: { _enum: { Noted: { @@ -4392,7 +4416,7 @@ export default { }, }, }, - /** Lookup465: pallet_asset_rate::pallet::Event */ + /** Lookup468: pallet_asset_rate::pallet::Event */ PalletAssetRateEvent: { _enum: { AssetRateCreated: { @@ -4412,7 +4436,7 @@ export default { }, }, }, - /** Lookup466: pallet_xcm::pallet::Event */ + /** Lookup469: pallet_xcm::pallet::Event */ PalletXcmEvent: { _enum: { Attempted: { @@ -4535,7 +4559,7 @@ export default { }, }, }, - /** Lookup467: staging_xcm::v4::traits::Outcome */ + /** Lookup470: staging_xcm::v4::traits::Outcome */ StagingXcmV4TraitsOutcome: { _enum: { Complete: { @@ -4550,7 +4574,7 @@ export default { }, }, }, - /** Lookup468: pallet_migrations::pallet::Event */ + /** Lookup471: pallet_migrations::pallet::Event */ PalletMigrationsEvent: { _enum: { RuntimeUpgradeStarted: "Null", @@ -4572,7 +4596,7 @@ export default { }, }, }, - /** Lookup470: snowbridge_pallet_ethereum_client::pallet::Event */ + /** Lookup473: snowbridge_pallet_ethereum_client::pallet::Event */ SnowbridgePalletEthereumClientEvent: { _enum: { BeaconHeaderImported: { @@ -4587,11 +4611,11 @@ export default { }, }, }, - /** Lookup471: pallet_root_testing::pallet::Event */ + /** Lookup474: pallet_root_testing::pallet::Event */ PalletRootTestingEvent: { _enum: ["DefensiveTestCall"], }, - /** Lookup472: pallet_sudo::pallet::Event */ + /** Lookup475: pallet_sudo::pallet::Event */ PalletSudoEvent: { _enum: { Sudid: { @@ -4610,7 +4634,7 @@ export default { }, }, }, - /** Lookup473: frame_system::Phase */ + /** Lookup476: frame_system::Phase */ FrameSystemPhase: { _enum: { ApplyExtrinsic: "u32", @@ -4618,51 +4642,51 @@ export default { Initialization: "Null", }, }, - /** Lookup475: frame_system::LastRuntimeUpgradeInfo */ + /** Lookup478: frame_system::LastRuntimeUpgradeInfo */ FrameSystemLastRuntimeUpgradeInfo: { specVersion: "Compact", specName: "Text", }, - /** Lookup477: frame_system::CodeUpgradeAuthorization */ + /** Lookup480: frame_system::CodeUpgradeAuthorization */ FrameSystemCodeUpgradeAuthorization: { codeHash: "H256", checkVersion: "bool", }, - /** Lookup478: frame_system::limits::BlockWeights */ + /** Lookup481: frame_system::limits::BlockWeights */ FrameSystemLimitsBlockWeights: { baseBlock: "SpWeightsWeightV2Weight", maxBlock: "SpWeightsWeightV2Weight", perClass: "FrameSupportDispatchPerDispatchClassWeightsPerClass", }, - /** Lookup479: frame_support::dispatch::PerDispatchClass */ + /** Lookup482: frame_support::dispatch::PerDispatchClass */ FrameSupportDispatchPerDispatchClassWeightsPerClass: { normal: "FrameSystemLimitsWeightsPerClass", operational: "FrameSystemLimitsWeightsPerClass", mandatory: "FrameSystemLimitsWeightsPerClass", }, - /** Lookup480: frame_system::limits::WeightsPerClass */ + /** Lookup483: frame_system::limits::WeightsPerClass */ FrameSystemLimitsWeightsPerClass: { baseExtrinsic: "SpWeightsWeightV2Weight", maxExtrinsic: "Option", maxTotal: "Option", reserved: "Option", }, - /** Lookup481: frame_system::limits::BlockLength */ + /** Lookup484: frame_system::limits::BlockLength */ FrameSystemLimitsBlockLength: { max: "FrameSupportDispatchPerDispatchClassU32", }, - /** Lookup482: frame_support::dispatch::PerDispatchClass */ + /** Lookup485: frame_support::dispatch::PerDispatchClass */ FrameSupportDispatchPerDispatchClassU32: { normal: "u32", operational: "u32", mandatory: "u32", }, - /** Lookup483: sp_weights::RuntimeDbWeight */ + /** Lookup486: sp_weights::RuntimeDbWeight */ SpWeightsRuntimeDbWeight: { read: "u64", write: "u64", }, - /** Lookup484: sp_version::RuntimeVersion */ + /** Lookup487: sp_version::RuntimeVersion */ SpVersionRuntimeVersion: { specName: "Text", implName: "Text", @@ -4673,7 +4697,7 @@ export default { transactionVersion: "u32", stateVersion: "u8", }, - /** Lookup488: frame_system::pallet::Error */ + /** Lookup491: frame_system::pallet::Error */ FrameSystemError: { _enum: [ "InvalidSpecName", @@ -4687,7 +4711,7 @@ export default { "Unauthorized", ], }, - /** Lookup495: sp_consensus_babe::digests::PreDigest */ + /** Lookup498: sp_consensus_babe::digests::PreDigest */ SpConsensusBabeDigestsPreDigest: { _enum: { __Unused0: "Null", @@ -4696,34 +4720,34 @@ export default { SecondaryVRF: "SpConsensusBabeDigestsSecondaryVRFPreDigest", }, }, - /** Lookup496: sp_consensus_babe::digests::PrimaryPreDigest */ + /** Lookup499: sp_consensus_babe::digests::PrimaryPreDigest */ SpConsensusBabeDigestsPrimaryPreDigest: { authorityIndex: "u32", slot: "u64", vrfSignature: "SpCoreSr25519VrfVrfSignature", }, - /** Lookup497: sp_core::sr25519::vrf::VrfSignature */ + /** Lookup500: sp_core::sr25519::vrf::VrfSignature */ SpCoreSr25519VrfVrfSignature: { preOutput: "[u8;32]", proof: "[u8;64]", }, - /** Lookup498: sp_consensus_babe::digests::SecondaryPlainPreDigest */ + /** Lookup501: sp_consensus_babe::digests::SecondaryPlainPreDigest */ SpConsensusBabeDigestsSecondaryPlainPreDigest: { authorityIndex: "u32", slot: "u64", }, - /** Lookup499: sp_consensus_babe::digests::SecondaryVRFPreDigest */ + /** Lookup502: sp_consensus_babe::digests::SecondaryVRFPreDigest */ SpConsensusBabeDigestsSecondaryVRFPreDigest: { authorityIndex: "u32", slot: "u64", vrfSignature: "SpCoreSr25519VrfVrfSignature", }, - /** Lookup500: sp_consensus_babe::BabeEpochConfiguration */ + /** Lookup503: sp_consensus_babe::BabeEpochConfiguration */ SpConsensusBabeBabeEpochConfiguration: { c: "(u64,u64)", allowedSlots: "SpConsensusBabeAllowedSlots", }, - /** Lookup504: pallet_babe::pallet::Error */ + /** Lookup507: pallet_babe::pallet::Error */ PalletBabeError: { _enum: [ "InvalidEquivocationProof", @@ -4732,22 +4756,22 @@ export default { "InvalidConfiguration", ], }, - /** Lookup506: pallet_balances::types::BalanceLock */ + /** Lookup509: pallet_balances::types::BalanceLock */ PalletBalancesBalanceLock: { id: "[u8;8]", amount: "u128", reasons: "PalletBalancesReasons", }, - /** Lookup507: pallet_balances::types::Reasons */ + /** Lookup510: pallet_balances::types::Reasons */ PalletBalancesReasons: { _enum: ["Fee", "Misc", "All"], }, - /** Lookup510: pallet_balances::types::ReserveData */ + /** Lookup513: pallet_balances::types::ReserveData */ PalletBalancesReserveData: { id: "[u8;8]", amount: "u128", }, - /** Lookup514: dancelight_runtime::RuntimeHoldReason */ + /** Lookup517: dancelight_runtime::RuntimeHoldReason */ DancelightRuntimeRuntimeHoldReason: { _enum: { __Unused0: "Null", @@ -4838,24 +4862,24 @@ export default { Preimage: "PalletPreimageHoldReason", }, }, - /** Lookup515: pallet_registrar::pallet::HoldReason */ + /** Lookup518: pallet_registrar::pallet::HoldReason */ PalletRegistrarHoldReason: { _enum: ["RegistrarDeposit"], }, - /** Lookup516: pallet_data_preservers::pallet::HoldReason */ + /** Lookup519: pallet_data_preservers::pallet::HoldReason */ PalletDataPreserversHoldReason: { _enum: ["ProfileDeposit"], }, - /** Lookup517: pallet_preimage::pallet::HoldReason */ + /** Lookup520: pallet_preimage::pallet::HoldReason */ PalletPreimageHoldReason: { _enum: ["Preimage"], }, - /** Lookup520: frame_support::traits::tokens::misc::IdAmount */ + /** Lookup523: frame_support::traits::tokens::misc::IdAmount */ FrameSupportTokensMiscIdAmount: { id: "Null", amount: "u128", }, - /** Lookup522: pallet_balances::pallet::Error */ + /** Lookup525: pallet_balances::pallet::Error */ PalletBalancesError: { _enum: [ "VestingBalance", @@ -4872,21 +4896,21 @@ export default { "DeltaZero", ], }, - /** Lookup523: pallet_transaction_payment::Releases */ + /** Lookup526: pallet_transaction_payment::Releases */ PalletTransactionPaymentReleases: { _enum: ["V1Ancient", "V2"], }, - /** Lookup524: sp_staking::offence::OffenceDetails */ + /** Lookup527: sp_staking::offence::OffenceDetails */ SpStakingOffenceOffenceDetails: { offender: "(AccountId32,Null)", reporters: "Vec", }, - /** Lookup536: pallet_registrar::pallet::DepositInfo */ + /** Lookup539: pallet_registrar::pallet::DepositInfo */ PalletRegistrarDepositInfo: { creator: "AccountId32", deposit: "u128", }, - /** Lookup537: pallet_registrar::pallet::Error */ + /** Lookup540: pallet_registrar::pallet::Error */ PalletRegistrarError: { _enum: [ "ParaIdAlreadyRegistered", @@ -4908,7 +4932,7 @@ export default { "WasmCodeNecessary", ], }, - /** Lookup538: pallet_configuration::HostConfiguration */ + /** Lookup541: pallet_configuration::HostConfiguration */ PalletConfigurationHostConfiguration: { maxCollators: "u32", minOrchestratorCollators: "u32", @@ -4920,11 +4944,11 @@ export default { targetContainerChainFullness: "Perbill", maxParachainCoresPercentage: "Option", }, - /** Lookup541: pallet_configuration::pallet::Error */ + /** Lookup544: pallet_configuration::pallet::Error */ PalletConfigurationError: { _enum: ["InvalidNewValue"], }, - /** Lookup543: pallet_invulnerables::pallet::Error */ + /** Lookup546: pallet_invulnerables::pallet::Error */ PalletInvulnerablesError: { _enum: [ "TooManyInvulnerables", @@ -4934,23 +4958,23 @@ export default { "UnableToDeriveCollatorId", ], }, - /** Lookup544: dp_collator_assignment::AssignedCollators */ + /** Lookup547: dp_collator_assignment::AssignedCollators */ DpCollatorAssignmentAssignedCollatorsAccountId32: { orchestratorChain: "Vec", containerChains: "BTreeMap>", }, - /** Lookup549: dp_collator_assignment::AssignedCollators */ + /** Lookup552: dp_collator_assignment::AssignedCollators */ DpCollatorAssignmentAssignedCollatorsPublic: { orchestratorChain: "Vec", containerChains: "BTreeMap>", }, - /** Lookup557: tp_traits::ContainerChainBlockInfo */ + /** Lookup560: tp_traits::ContainerChainBlockInfo */ TpTraitsContainerChainBlockInfo: { blockNumber: "u32", author: "AccountId32", latestSlotNumber: "u64", }, - /** Lookup558: pallet_author_noting::pallet::Error */ + /** Lookup561: pallet_author_noting::pallet::Error */ PalletAuthorNotingError: { _enum: [ "FailedReading", @@ -4962,18 +4986,18 @@ export default { "NonAuraDigest", ], }, - /** Lookup559: pallet_services_payment::pallet::Error */ + /** Lookup562: pallet_services_payment::pallet::Error */ PalletServicesPaymentError: { _enum: ["InsufficientFundsToPurchaseCredits", "InsufficientCredits", "CreditPriceTooExpensive"], }, - /** Lookup560: pallet_data_preservers::types::RegisteredProfile */ + /** Lookup563: pallet_data_preservers::types::RegisteredProfile */ PalletDataPreserversRegisteredProfile: { account: "AccountId32", deposit: "u128", profile: "PalletDataPreserversProfile", assignment: "Option<(u32,DancelightRuntimePreserversAssignmentPaymentWitness)>", }, - /** Lookup566: pallet_data_preservers::pallet::Error */ + /** Lookup569: pallet_data_preservers::pallet::Error */ PalletDataPreserversError: { _enum: [ "NoBootNodes", @@ -4988,12 +5012,12 @@ export default { "CantDeleteAssignedProfile", ], }, - /** Lookup569: tp_traits::ActiveEraInfo */ + /** Lookup572: tp_traits::ActiveEraInfo */ TpTraitsActiveEraInfo: { index: "u32", start: "Option", }, - /** Lookup571: pallet_external_validators::pallet::Error */ + /** Lookup574: pallet_external_validators::pallet::Error */ PalletExternalValidatorsError: { _enum: [ "TooManyInvulnerables", @@ -5003,13 +5027,33 @@ export default { "UnableToDeriveCollatorId", ], }, - /** Lookup576: sp_core::crypto::KeyTypeId */ + /** Lookup577: pallet_external_validator_slashes::Slash */ + PalletExternalValidatorSlashesSlash: { + validator: "AccountId32", + reporters: "Vec", + slashId: "u32", + percentage: "Perbill", + confirmed: "bool", + }, + /** Lookup578: pallet_external_validator_slashes::pallet::Error */ + PalletExternalValidatorSlashesError: { + _enum: [ + "EmptyTargets", + "InvalidSlashIndex", + "NotSortedAndUnique", + "ProvidedFutureEra", + "ProvidedNonSlashableEra", + "ActiveEraNotSet", + "DeferPeriodIsOver", + ], + }, + /** Lookup582: sp_core::crypto::KeyTypeId */ SpCoreCryptoKeyTypeId: "[u8;4]", - /** Lookup577: pallet_session::pallet::Error */ + /** Lookup583: pallet_session::pallet::Error */ PalletSessionError: { _enum: ["InvalidProof", "NoAssociatedValidatorId", "DuplicatedKey", "NoKeys", "NoAccount"], }, - /** Lookup578: pallet_grandpa::StoredState */ + /** Lookup584: pallet_grandpa::StoredState */ PalletGrandpaStoredState: { _enum: { Live: "Null", @@ -5024,14 +5068,14 @@ export default { }, }, }, - /** Lookup579: pallet_grandpa::StoredPendingChange */ + /** Lookup585: pallet_grandpa::StoredPendingChange */ PalletGrandpaStoredPendingChange: { scheduledAt: "u32", delay: "u32", nextAuthorities: "Vec<(SpConsensusGrandpaAppPublic,u64)>", forced: "Option", }, - /** Lookup581: pallet_grandpa::pallet::Error */ + /** Lookup587: pallet_grandpa::pallet::Error */ PalletGrandpaError: { _enum: [ "PauseFailed", @@ -5043,12 +5087,12 @@ export default { "DuplicateOffenceReport", ], }, - /** Lookup584: pallet_inflation_rewards::pallet::ChainsToRewardValue */ + /** Lookup590: pallet_inflation_rewards::pallet::ChainsToRewardValue */ PalletInflationRewardsChainsToRewardValue: { paraIds: "Vec", rewardsPerChain: "u128", }, - /** Lookup585: pallet_treasury::Proposal */ + /** Lookup591: pallet_treasury::Proposal */ PalletTreasuryProposal: { proposer: "AccountId32", value: "u128", @@ -5056,7 +5100,7 @@ export default { bond: "u128", }, /** - * Lookup587: pallet_treasury::SpendStatus */ PalletTreasurySpendStatus: { @@ -5067,7 +5111,7 @@ export default { expireAt: "u32", status: "PalletTreasuryPaymentState", }, - /** Lookup588: pallet_treasury::PaymentState */ + /** Lookup594: pallet_treasury::PaymentState */ PalletTreasuryPaymentState: { _enum: { Pending: "Null", @@ -5077,9 +5121,9 @@ export default { Failed: "Null", }, }, - /** Lookup590: frame_support::PalletId */ + /** Lookup596: frame_support::PalletId */ FrameSupportPalletId: "[u8;8]", - /** Lookup591: pallet_treasury::pallet::Error */ + /** Lookup597: pallet_treasury::pallet::Error */ PalletTreasuryError: { _enum: [ "InvalidIndex", @@ -5096,7 +5140,7 @@ export default { ], }, /** - * Lookup593: pallet_conviction_voting::vote::Voting */ PalletConvictionVotingVoteVoting: { @@ -5105,20 +5149,20 @@ export default { Delegating: "PalletConvictionVotingVoteDelegating", }, }, - /** Lookup594: pallet_conviction_voting::vote::Casting */ + /** Lookup600: pallet_conviction_voting::vote::Casting */ PalletConvictionVotingVoteCasting: { votes: "Vec<(u32,PalletConvictionVotingVoteAccountVote)>", delegations: "PalletConvictionVotingDelegations", prior: "PalletConvictionVotingVotePriorLock", }, - /** Lookup598: pallet_conviction_voting::types::Delegations */ + /** Lookup604: pallet_conviction_voting::types::Delegations */ PalletConvictionVotingDelegations: { votes: "u128", capital: "u128", }, - /** Lookup599: pallet_conviction_voting::vote::PriorLock */ + /** Lookup605: pallet_conviction_voting::vote::PriorLock */ PalletConvictionVotingVotePriorLock: "(u32,u128)", - /** Lookup600: pallet_conviction_voting::vote::Delegating */ + /** Lookup606: pallet_conviction_voting::vote::Delegating */ PalletConvictionVotingVoteDelegating: { balance: "u128", target: "AccountId32", @@ -5126,7 +5170,7 @@ export default { delegations: "PalletConvictionVotingDelegations", prior: "PalletConvictionVotingVotePriorLock", }, - /** Lookup604: pallet_conviction_voting::pallet::Error */ + /** Lookup610: pallet_conviction_voting::pallet::Error */ PalletConvictionVotingError: { _enum: [ "NotOngoing", @@ -5144,7 +5188,7 @@ export default { ], }, /** - * Lookup605: pallet_referenda::types::ReferendumInfo, * Balance, pallet_conviction_voting::types::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5159,7 +5203,7 @@ export default { }, }, /** - * Lookup606: pallet_referenda::types::ReferendumStatus, * Balance, pallet_conviction_voting::types::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5176,17 +5220,17 @@ export default { inQueue: "bool", alarm: "Option<(u32,(u32,u32))>", }, - /** Lookup607: pallet_referenda::types::Deposit */ + /** Lookup613: pallet_referenda::types::Deposit */ PalletReferendaDeposit: { who: "AccountId32", amount: "u128", }, - /** Lookup610: pallet_referenda::types::DecidingStatus */ + /** Lookup616: pallet_referenda::types::DecidingStatus */ PalletReferendaDecidingStatus: { since: "u32", confirming: "Option", }, - /** Lookup618: pallet_referenda::types::TrackInfo */ + /** Lookup624: pallet_referenda::types::TrackInfo */ PalletReferendaTrackInfo: { name: "Text", maxDeciding: "u32", @@ -5198,7 +5242,7 @@ export default { minApproval: "PalletReferendaCurve", minSupport: "PalletReferendaCurve", }, - /** Lookup619: pallet_referenda::types::Curve */ + /** Lookup625: pallet_referenda::types::Curve */ PalletReferendaCurve: { _enum: { LinearDecreasing: { @@ -5219,7 +5263,7 @@ export default { }, }, }, - /** Lookup622: pallet_referenda::pallet::Error */ + /** Lookup628: pallet_referenda::pallet::Error */ PalletReferendaError: { _enum: [ "NotOngoing", @@ -5238,11 +5282,11 @@ export default { "PreimageStoredWithDifferentLength", ], }, - /** Lookup623: pallet_ranked_collective::MemberRecord */ + /** Lookup629: pallet_ranked_collective::MemberRecord */ PalletRankedCollectiveMemberRecord: { rank: "u16", }, - /** Lookup628: pallet_ranked_collective::pallet::Error */ + /** Lookup633: pallet_ranked_collective::pallet::Error */ PalletRankedCollectiveError: { _enum: [ "AlreadyMember", @@ -5259,7 +5303,7 @@ export default { ], }, /** - * Lookup629: pallet_referenda::types::ReferendumInfo, * Balance, pallet_ranked_collective::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5274,7 +5318,7 @@ export default { }, }, /** - * Lookup630: pallet_referenda::types::ReferendumStatus, * Balance, pallet_ranked_collective::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5291,7 +5335,7 @@ export default { inQueue: "bool", alarm: "Option<(u32,(u32,u32))>", }, - /** Lookup633: pallet_whitelist::pallet::Error */ + /** Lookup638: pallet_whitelist::pallet::Error */ PalletWhitelistError: { _enum: [ "UnavailablePreImage", @@ -5301,7 +5345,7 @@ export default { "CallAlreadyWhitelisted", ], }, - /** Lookup634: polkadot_runtime_parachains::configuration::HostConfiguration */ + /** Lookup639: polkadot_runtime_parachains::configuration::HostConfiguration */ PolkadotRuntimeParachainsConfigurationHostConfiguration: { maxCodeSize: "u32", maxHeadDataSize: "u32", @@ -5339,16 +5383,16 @@ export default { approvalVotingParams: "PolkadotPrimitivesV7ApprovalVotingParams", schedulerParams: "PolkadotPrimitivesVstagingSchedulerParams", }, - /** Lookup637: polkadot_runtime_parachains::configuration::pallet::Error */ + /** Lookup642: polkadot_runtime_parachains::configuration::pallet::Error */ PolkadotRuntimeParachainsConfigurationPalletError: { _enum: ["InvalidNewValue"], }, - /** Lookup640: polkadot_runtime_parachains::shared::AllowedRelayParentsTracker */ + /** Lookup645: polkadot_runtime_parachains::shared::AllowedRelayParentsTracker */ PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker: { buffer: "Vec<(H256,H256)>", latestNumber: "u32", }, - /** Lookup644: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability */ + /** Lookup649: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability */ PolkadotRuntimeParachainsInclusionCandidatePendingAvailability: { _alias: { hash_: "hash", @@ -5363,7 +5407,7 @@ export default { backedInNumber: "u32", backingGroup: "u32", }, - /** Lookup645: polkadot_runtime_parachains::inclusion::pallet::Error */ + /** Lookup650: polkadot_runtime_parachains::inclusion::pallet::Error */ PolkadotRuntimeParachainsInclusionPalletError: { _enum: [ "ValidatorIndexOutOfBounds", @@ -5386,14 +5430,14 @@ export default { "ParaHeadMismatch", ], }, - /** Lookup646: polkadot_primitives::v7::ScrapedOnChainVotes */ + /** Lookup651: polkadot_primitives::v7::ScrapedOnChainVotes */ PolkadotPrimitivesV7ScrapedOnChainVotes: { session: "u32", backingValidatorsPerCandidate: "Vec<(PolkadotPrimitivesV7CandidateReceipt,Vec<(u32,PolkadotPrimitivesV7ValidityAttestation)>)>", disputes: "Vec", }, - /** Lookup651: polkadot_runtime_parachains::paras_inherent::pallet::Error */ + /** Lookup656: polkadot_runtime_parachains::paras_inherent::pallet::Error */ PolkadotRuntimeParachainsParasInherentPalletError: { _enum: [ "TooManyInclusionInherents", @@ -5403,20 +5447,20 @@ export default { "UnscheduledCandidate", ], }, - /** Lookup654: polkadot_runtime_parachains::scheduler::pallet::CoreOccupied */ + /** Lookup659: polkadot_runtime_parachains::scheduler::pallet::CoreOccupied */ PolkadotRuntimeParachainsSchedulerPalletCoreOccupied: { _enum: { Free: "Null", Paras: "PolkadotRuntimeParachainsSchedulerPalletParasEntry", }, }, - /** Lookup655: polkadot_runtime_parachains::scheduler::pallet::ParasEntry */ + /** Lookup660: polkadot_runtime_parachains::scheduler::pallet::ParasEntry */ PolkadotRuntimeParachainsSchedulerPalletParasEntry: { assignment: "PolkadotRuntimeParachainsSchedulerCommonAssignment", availabilityTimeouts: "u32", ttl: "u32", }, - /** Lookup656: polkadot_runtime_parachains::scheduler::common::Assignment */ + /** Lookup661: polkadot_runtime_parachains::scheduler::common::Assignment */ PolkadotRuntimeParachainsSchedulerCommonAssignment: { _enum: { Pool: { @@ -5426,7 +5470,7 @@ export default { Bulk: "u32", }, }, - /** Lookup661: polkadot_runtime_parachains::paras::PvfCheckActiveVoteState */ + /** Lookup666: polkadot_runtime_parachains::paras::PvfCheckActiveVoteState */ PolkadotRuntimeParachainsParasPvfCheckActiveVoteState: { votesAccept: "BitVec", votesReject: "BitVec", @@ -5434,7 +5478,7 @@ export default { createdAt: "u32", causes: "Vec", }, - /** Lookup663: polkadot_runtime_parachains::paras::PvfCheckCause */ + /** Lookup668: polkadot_runtime_parachains::paras::PvfCheckCause */ PolkadotRuntimeParachainsParasPvfCheckCause: { _enum: { Onboarding: "u32", @@ -5445,11 +5489,11 @@ export default { }, }, }, - /** Lookup664: polkadot_runtime_parachains::paras::UpgradeStrategy */ + /** Lookup669: polkadot_runtime_parachains::paras::UpgradeStrategy */ PolkadotRuntimeParachainsParasUpgradeStrategy: { _enum: ["SetGoAheadSignal", "ApplyAtExpectedBlock"], }, - /** Lookup666: polkadot_runtime_parachains::paras::ParaLifecycle */ + /** Lookup671: polkadot_runtime_parachains::paras::ParaLifecycle */ PolkadotRuntimeParachainsParasParaLifecycle: { _enum: [ "Onboarding", @@ -5461,25 +5505,25 @@ export default { "OffboardingParachain", ], }, - /** Lookup668: polkadot_runtime_parachains::paras::ParaPastCodeMeta */ + /** Lookup673: polkadot_runtime_parachains::paras::ParaPastCodeMeta */ PolkadotRuntimeParachainsParasParaPastCodeMeta: { upgradeTimes: "Vec", lastPruned: "Option", }, - /** Lookup670: polkadot_runtime_parachains::paras::ReplacementTimes */ + /** Lookup675: polkadot_runtime_parachains::paras::ReplacementTimes */ PolkadotRuntimeParachainsParasReplacementTimes: { expectedAt: "u32", activatedAt: "u32", }, - /** Lookup672: polkadot_primitives::v7::UpgradeGoAhead */ + /** Lookup677: polkadot_primitives::v7::UpgradeGoAhead */ PolkadotPrimitivesV7UpgradeGoAhead: { _enum: ["Abort", "GoAhead"], }, - /** Lookup673: polkadot_primitives::v7::UpgradeRestriction */ + /** Lookup678: polkadot_primitives::v7::UpgradeRestriction */ PolkadotPrimitivesV7UpgradeRestriction: { _enum: ["Present"], }, - /** Lookup674: polkadot_runtime_parachains::paras::pallet::Error */ + /** Lookup679: polkadot_runtime_parachains::paras::pallet::Error */ PolkadotRuntimeParachainsParasPalletError: { _enum: [ "NotRegistered", @@ -5497,18 +5541,18 @@ export default { "InvalidCode", ], }, - /** Lookup676: polkadot_runtime_parachains::initializer::BufferedSessionChange */ + /** Lookup681: polkadot_runtime_parachains::initializer::BufferedSessionChange */ PolkadotRuntimeParachainsInitializerBufferedSessionChange: { validators: "Vec", queued: "Vec", sessionIndex: "u32", }, - /** Lookup678: polkadot_core_primitives::InboundDownwardMessage */ + /** Lookup683: polkadot_core_primitives::InboundDownwardMessage */ PolkadotCorePrimitivesInboundDownwardMessage: { sentAt: "u32", msg: "Bytes", }, - /** Lookup679: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest */ + /** Lookup684: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest */ PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest: { confirmed: "bool", age: "u32", @@ -5517,7 +5561,7 @@ export default { maxCapacity: "u32", maxTotalSize: "u32", }, - /** Lookup681: polkadot_runtime_parachains::hrmp::HrmpChannel */ + /** Lookup686: polkadot_runtime_parachains::hrmp::HrmpChannel */ PolkadotRuntimeParachainsHrmpHrmpChannel: { maxCapacity: "u32", maxTotalSize: "u32", @@ -5528,12 +5572,12 @@ export default { senderDeposit: "u128", recipientDeposit: "u128", }, - /** Lookup683: polkadot_core_primitives::InboundHrmpMessage */ + /** Lookup688: polkadot_core_primitives::InboundHrmpMessage */ PolkadotCorePrimitivesInboundHrmpMessage: { sentAt: "u32", data: "Bytes", }, - /** Lookup686: polkadot_runtime_parachains::hrmp::pallet::Error */ + /** Lookup691: polkadot_runtime_parachains::hrmp::pallet::Error */ PolkadotRuntimeParachainsHrmpPalletError: { _enum: [ "OpenHrmpChannelToSelf", @@ -5558,7 +5602,7 @@ export default { "ChannelCreationNotAuthorized", ], }, - /** Lookup688: polkadot_primitives::v7::SessionInfo */ + /** Lookup693: polkadot_primitives::v7::SessionInfo */ PolkadotPrimitivesV7SessionInfo: { activeValidatorIndices: "Vec", randomSeed: "[u8;32]", @@ -5575,20 +5619,20 @@ export default { neededApprovals: "u32", }, /** - * Lookup689: polkadot_primitives::v7::IndexedVec */ PolkadotPrimitivesV7IndexedVecValidatorIndex: "Vec", - /** Lookup690: polkadot_primitives::v7::IndexedVec */ + /** Lookup695: polkadot_primitives::v7::IndexedVec */ PolkadotPrimitivesV7IndexedVecGroupIndex: "Vec>", - /** Lookup692: polkadot_primitives::v7::DisputeState */ + /** Lookup697: polkadot_primitives::v7::DisputeState */ PolkadotPrimitivesV7DisputeState: { validatorsFor: "BitVec", validatorsAgainst: "BitVec", start: "u32", concludedAt: "Option", }, - /** Lookup694: polkadot_runtime_parachains::disputes::pallet::Error */ + /** Lookup699: polkadot_runtime_parachains::disputes::pallet::Error */ PolkadotRuntimeParachainsDisputesPalletError: { _enum: [ "DuplicateDisputeStatementSets", @@ -5602,7 +5646,7 @@ export default { "UnconfirmedDispute", ], }, - /** Lookup695: polkadot_primitives::v7::slashing::PendingSlashes */ + /** Lookup700: polkadot_primitives::v7::slashing::PendingSlashes */ PolkadotPrimitivesV7SlashingPendingSlashes: { _alias: { keys_: "keys", @@ -5610,7 +5654,7 @@ export default { keys_: "BTreeMap", kind: "PolkadotPrimitivesV7SlashingSlashingOffenceKind", }, - /** Lookup699: polkadot_runtime_parachains::disputes::slashing::pallet::Error */ + /** Lookup704: polkadot_runtime_parachains::disputes::slashing::pallet::Error */ PolkadotRuntimeParachainsDisputesSlashingPalletError: { _enum: [ "InvalidKeyOwnershipProof", @@ -5621,7 +5665,7 @@ export default { "DuplicateSlashingReport", ], }, - /** Lookup700: pallet_message_queue::BookState */ + /** Lookup705: pallet_message_queue::BookState */ PalletMessageQueueBookState: { _alias: { size_: "size", @@ -5633,12 +5677,12 @@ export default { messageCount: "u64", size_: "u64", }, - /** Lookup702: pallet_message_queue::Neighbours */ + /** Lookup707: pallet_message_queue::Neighbours */ PalletMessageQueueNeighbours: { prev: "PolkadotRuntimeParachainsInclusionAggregateMessageOrigin", next: "PolkadotRuntimeParachainsInclusionAggregateMessageOrigin", }, - /** Lookup704: pallet_message_queue::Page */ + /** Lookup709: pallet_message_queue::Page */ PalletMessageQueuePage: { remaining: "u32", remainingSize: "u32", @@ -5647,7 +5691,7 @@ export default { last: "u32", heap: "Bytes", }, - /** Lookup706: pallet_message_queue::pallet::Error */ + /** Lookup711: pallet_message_queue::pallet::Error */ PalletMessageQueueError: { _enum: [ "NotReapable", @@ -5661,38 +5705,38 @@ export default { "RecursiveDisallowed", ], }, - /** Lookup707: polkadot_runtime_parachains::assigner_on_demand::types::CoreAffinityCount */ + /** Lookup712: polkadot_runtime_parachains::assigner_on_demand::types::CoreAffinityCount */ PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount: { coreIndex: "u32", count: "u32", }, - /** Lookup708: polkadot_runtime_parachains::assigner_on_demand::types::QueueStatusType */ + /** Lookup713: polkadot_runtime_parachains::assigner_on_demand::types::QueueStatusType */ PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType: { traffic: "u128", nextIndex: "u32", smallestIndex: "u32", freedIndices: "BinaryHeapReverseQueueIndex", }, - /** Lookup710: BinaryHeap */ + /** Lookup715: BinaryHeap */ BinaryHeapReverseQueueIndex: "Vec", - /** Lookup713: BinaryHeap */ + /** Lookup718: BinaryHeap */ BinaryHeapEnqueuedOrder: "Vec", - /** Lookup714: polkadot_runtime_parachains::assigner_on_demand::types::EnqueuedOrder */ + /** Lookup719: polkadot_runtime_parachains::assigner_on_demand::types::EnqueuedOrder */ PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder: { paraId: "u32", idx: "u32", }, - /** Lookup718: polkadot_runtime_parachains::assigner_on_demand::pallet::Error */ + /** Lookup723: polkadot_runtime_parachains::assigner_on_demand::pallet::Error */ PolkadotRuntimeParachainsAssignerOnDemandPalletError: { _enum: ["QueueFull", "SpotPriceHigherThanMaxAmount"], }, - /** Lookup719: polkadot_runtime_common::paras_registrar::ParaInfo */ + /** Lookup724: polkadot_runtime_common::paras_registrar::ParaInfo */ PolkadotRuntimeCommonParasRegistrarParaInfo: { manager: "AccountId32", deposit: "u128", locked: "Option", }, - /** Lookup721: polkadot_runtime_common::paras_registrar::pallet::Error */ + /** Lookup726: polkadot_runtime_common::paras_registrar::pallet::Error */ PolkadotRuntimeCommonParasRegistrarPalletError: { _enum: [ "NotRegistered", @@ -5711,12 +5755,12 @@ export default { "CannotSwap", ], }, - /** Lookup722: pallet_utility::pallet::Error */ + /** Lookup727: pallet_utility::pallet::Error */ PalletUtilityError: { _enum: ["TooManyCalls"], }, /** - * Lookup724: pallet_identity::types::Registration> */ PalletIdentityRegistration: { @@ -5724,18 +5768,18 @@ export default { deposit: "u128", info: "PalletIdentityLegacyIdentityInfo", }, - /** Lookup733: pallet_identity::types::RegistrarInfo */ + /** Lookup738: pallet_identity::types::RegistrarInfo */ PalletIdentityRegistrarInfo: { account: "AccountId32", fee: "u128", fields: "u64", }, - /** Lookup735: pallet_identity::types::AuthorityProperties> */ + /** Lookup740: pallet_identity::types::AuthorityProperties> */ PalletIdentityAuthorityProperties: { suffix: "Bytes", allocation: "u32", }, - /** Lookup738: pallet_identity::pallet::Error */ + /** Lookup743: pallet_identity::pallet::Error */ PalletIdentityError: { _enum: [ "TooManySubAccounts", @@ -5767,7 +5811,7 @@ export default { ], }, /** - * Lookup741: pallet_scheduler::Scheduled, * BlockNumber, dancelight_runtime::OriginCaller, sp_core::crypto::AccountId32> */ @@ -5778,29 +5822,29 @@ export default { maybePeriodic: "Option<(u32,u32)>", origin: "DancelightRuntimeOriginCaller", }, - /** Lookup743: pallet_scheduler::RetryConfig */ + /** Lookup748: pallet_scheduler::RetryConfig */ PalletSchedulerRetryConfig: { totalRetries: "u8", remaining: "u8", period: "u32", }, - /** Lookup744: pallet_scheduler::pallet::Error */ + /** Lookup749: pallet_scheduler::pallet::Error */ PalletSchedulerError: { _enum: ["FailedToSchedule", "NotFound", "TargetBlockNumberInPast", "RescheduleNoChange", "Named"], }, - /** Lookup747: pallet_proxy::ProxyDefinition */ + /** Lookup752: pallet_proxy::ProxyDefinition */ PalletProxyProxyDefinition: { delegate: "AccountId32", proxyType: "DancelightRuntimeProxyType", delay: "u32", }, - /** Lookup751: pallet_proxy::Announcement */ + /** Lookup756: pallet_proxy::Announcement */ PalletProxyAnnouncement: { real: "AccountId32", callHash: "H256", height: "u32", }, - /** Lookup753: pallet_proxy::pallet::Error */ + /** Lookup758: pallet_proxy::pallet::Error */ PalletProxyError: { _enum: [ "TooMany", @@ -5813,14 +5857,14 @@ export default { "NoSelfProxy", ], }, - /** Lookup755: pallet_multisig::Multisig */ + /** Lookup760: pallet_multisig::Multisig */ PalletMultisigMultisig: { when: "PalletMultisigTimepoint", deposit: "u128", depositor: "AccountId32", approvals: "Vec", }, - /** Lookup757: pallet_multisig::pallet::Error */ + /** Lookup762: pallet_multisig::pallet::Error */ PalletMultisigError: { _enum: [ "MinimumThreshold", @@ -5839,7 +5883,7 @@ export default { "AlreadyStored", ], }, - /** Lookup758: pallet_preimage::OldRequestStatus */ + /** Lookup763: pallet_preimage::OldRequestStatus */ PalletPreimageOldRequestStatus: { _enum: { Unrequested: { @@ -5854,7 +5898,7 @@ export default { }, }, /** - * Lookup761: pallet_preimage::RequestStatus> */ PalletPreimageRequestStatus: { @@ -5870,7 +5914,7 @@ export default { }, }, }, - /** Lookup766: pallet_preimage::pallet::Error */ + /** Lookup771: pallet_preimage::pallet::Error */ PalletPreimageError: { _enum: [ "TooBig", @@ -5884,11 +5928,11 @@ export default { "NoCost", ], }, - /** Lookup767: pallet_asset_rate::pallet::Error */ + /** Lookup772: pallet_asset_rate::pallet::Error */ PalletAssetRateError: { _enum: ["UnknownAssetKind", "AlreadyExists", "Overflow"], }, - /** Lookup768: pallet_xcm::pallet::QueryStatus */ + /** Lookup773: pallet_xcm::pallet::QueryStatus */ PalletXcmQueryStatus: { _enum: { Pending: { @@ -5907,7 +5951,7 @@ export default { }, }, }, - /** Lookup772: xcm::VersionedResponse */ + /** Lookup777: xcm::VersionedResponse */ XcmVersionedResponse: { _enum: { __Unused0: "Null", @@ -5917,7 +5961,7 @@ export default { V4: "StagingXcmV4Response", }, }, - /** Lookup778: pallet_xcm::pallet::VersionMigrationStage */ + /** Lookup783: pallet_xcm::pallet::VersionMigrationStage */ PalletXcmVersionMigrationStage: { _enum: { MigrateSupportedVersion: "Null", @@ -5926,14 +5970,14 @@ export default { MigrateAndNotifyOldTargets: "Null", }, }, - /** Lookup780: pallet_xcm::pallet::RemoteLockedFungibleRecord */ + /** Lookup785: pallet_xcm::pallet::RemoteLockedFungibleRecord */ PalletXcmRemoteLockedFungibleRecord: { amount: "u128", owner: "XcmVersionedLocation", locker: "XcmVersionedLocation", consumers: "Vec<(Null,u128)>", }, - /** Lookup787: pallet_xcm::pallet::Error */ + /** Lookup792: pallet_xcm::pallet::Error */ PalletXcmError: { _enum: [ "Unreachable", @@ -5963,11 +6007,11 @@ export default { "LocalExecutionIncomplete", ], }, - /** Lookup788: pallet_migrations::pallet::Error */ + /** Lookup793: pallet_migrations::pallet::Error */ PalletMigrationsError: { _enum: ["PreimageMissing", "WrongUpperBound", "PreimageIsTooBig", "PreimageAlreadyExists"], }, - /** Lookup792: pallet_beefy::pallet::Error */ + /** Lookup797: pallet_beefy::pallet::Error */ PalletBeefyError: { _enum: [ "InvalidKeyOwnershipProof", @@ -5979,43 +6023,43 @@ export default { "InvalidConfiguration", ], }, - /** Lookup793: sp_consensus_beefy::mmr::BeefyAuthoritySet */ + /** Lookup798: sp_consensus_beefy::mmr::BeefyAuthoritySet */ SpConsensusBeefyMmrBeefyAuthoritySet: { id: "u64", len: "u32", keysetCommitment: "H256", }, - /** Lookup794: snowbridge_beacon_primitives::types::CompactBeaconState */ + /** Lookup799: snowbridge_beacon_primitives::types::CompactBeaconState */ SnowbridgeBeaconPrimitivesCompactBeaconState: { slot: "Compact", blockRootsRoot: "H256", }, - /** Lookup795: snowbridge_beacon_primitives::types::SyncCommitteePrepared */ + /** Lookup800: snowbridge_beacon_primitives::types::SyncCommitteePrepared */ SnowbridgeBeaconPrimitivesSyncCommitteePrepared: { root: "H256", - pubkeys: "[Lookup797;512]", + pubkeys: "[Lookup802;512]", aggregatePubkey: "SnowbridgeMilagroBlsKeysPublicKey", }, - /** Lookup797: snowbridge_milagro_bls::keys::PublicKey */ + /** Lookup802: snowbridge_milagro_bls::keys::PublicKey */ SnowbridgeMilagroBlsKeysPublicKey: { point: "SnowbridgeAmclBls381Ecp", }, - /** Lookup798: snowbridge_amcl::bls381::ecp::ECP */ + /** Lookup803: snowbridge_amcl::bls381::ecp::ECP */ SnowbridgeAmclBls381Ecp: { x: "SnowbridgeAmclBls381Fp", y: "SnowbridgeAmclBls381Fp", z: "SnowbridgeAmclBls381Fp", }, - /** Lookup799: snowbridge_amcl::bls381::fp::FP */ + /** Lookup804: snowbridge_amcl::bls381::fp::FP */ SnowbridgeAmclBls381Fp: { x: "SnowbridgeAmclBls381Big", xes: "i32", }, - /** Lookup800: snowbridge_amcl::bls381::big::Big */ + /** Lookup805: snowbridge_amcl::bls381::big::Big */ SnowbridgeAmclBls381Big: { w: "[i32;14]", }, - /** Lookup803: snowbridge_beacon_primitives::types::ForkVersions */ + /** Lookup808: snowbridge_beacon_primitives::types::ForkVersions */ SnowbridgeBeaconPrimitivesForkVersions: { genesis: "SnowbridgeBeaconPrimitivesFork", altair: "SnowbridgeBeaconPrimitivesFork", @@ -6023,12 +6067,12 @@ export default { capella: "SnowbridgeBeaconPrimitivesFork", deneb: "SnowbridgeBeaconPrimitivesFork", }, - /** Lookup804: snowbridge_beacon_primitives::types::Fork */ + /** Lookup809: snowbridge_beacon_primitives::types::Fork */ SnowbridgeBeaconPrimitivesFork: { version: "[u8;4]", epoch: "u64", }, - /** Lookup805: snowbridge_pallet_ethereum_client::pallet::Error */ + /** Lookup810: snowbridge_pallet_ethereum_client::pallet::Error */ SnowbridgePalletEthereumClientError: { _enum: { SkippedSyncCommitteePeriod: "Null", @@ -6058,11 +6102,11 @@ export default { Halted: "Null", }, }, - /** Lookup806: snowbridge_beacon_primitives::bls::BlsError */ + /** Lookup811: snowbridge_beacon_primitives::bls::BlsError */ SnowbridgeBeaconPrimitivesBlsBlsError: { _enum: ["InvalidSignature", "InvalidPublicKey", "InvalidAggregatePublicKeys", "SignatureVerificationFailed"], }, - /** Lookup807: polkadot_runtime_common::paras_sudo_wrapper::pallet::Error */ + /** Lookup812: polkadot_runtime_common::paras_sudo_wrapper::pallet::Error */ PolkadotRuntimeCommonParasSudoWrapperPalletError: { _enum: [ "ParaDoesntExist", @@ -6076,24 +6120,24 @@ export default { "TooManyCores", ], }, - /** Lookup808: pallet_sudo::pallet::Error */ + /** Lookup813: pallet_sudo::pallet::Error */ PalletSudoError: { _enum: ["RequireSudo"], }, - /** Lookup811: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ + /** Lookup816: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ FrameSystemExtensionsCheckNonZeroSender: "Null", - /** Lookup812: frame_system::extensions::check_spec_version::CheckSpecVersion */ + /** Lookup817: frame_system::extensions::check_spec_version::CheckSpecVersion */ FrameSystemExtensionsCheckSpecVersion: "Null", - /** Lookup813: frame_system::extensions::check_tx_version::CheckTxVersion */ + /** Lookup818: frame_system::extensions::check_tx_version::CheckTxVersion */ FrameSystemExtensionsCheckTxVersion: "Null", - /** Lookup814: frame_system::extensions::check_genesis::CheckGenesis */ + /** Lookup819: frame_system::extensions::check_genesis::CheckGenesis */ FrameSystemExtensionsCheckGenesis: "Null", - /** Lookup817: frame_system::extensions::check_nonce::CheckNonce */ + /** Lookup822: frame_system::extensions::check_nonce::CheckNonce */ FrameSystemExtensionsCheckNonce: "Compact", - /** Lookup818: frame_system::extensions::check_weight::CheckWeight */ + /** Lookup823: frame_system::extensions::check_weight::CheckWeight */ FrameSystemExtensionsCheckWeight: "Null", - /** Lookup819: pallet_transaction_payment::ChargeTransactionPayment */ + /** Lookup824: pallet_transaction_payment::ChargeTransactionPayment */ PalletTransactionPaymentChargeTransactionPayment: "Compact", - /** Lookup820: dancelight_runtime::Runtime */ + /** Lookup825: dancelight_runtime::Runtime */ DancelightRuntimeRuntime: "Null", }; diff --git a/typescript-api/src/dancelight/interfaces/registry.ts b/typescript-api/src/dancelight/interfaces/registry.ts index d299abfb1..90a56c31e 100644 --- a/typescript-api/src/dancelight/interfaces/registry.ts +++ b/typescript-api/src/dancelight/interfaces/registry.ts @@ -111,6 +111,10 @@ import type { PalletDataPreserversProfile, PalletDataPreserversProfileMode, PalletDataPreserversRegisteredProfile, + PalletExternalValidatorSlashesCall, + PalletExternalValidatorSlashesError, + PalletExternalValidatorSlashesEvent, + PalletExternalValidatorSlashesSlash, PalletExternalValidatorsCall, PalletExternalValidatorsError, PalletExternalValidatorsEvent, @@ -564,6 +568,10 @@ declare module "@polkadot/types/types/registry" { PalletDataPreserversProfile: PalletDataPreserversProfile; PalletDataPreserversProfileMode: PalletDataPreserversProfileMode; PalletDataPreserversRegisteredProfile: PalletDataPreserversRegisteredProfile; + PalletExternalValidatorSlashesCall: PalletExternalValidatorSlashesCall; + PalletExternalValidatorSlashesError: PalletExternalValidatorSlashesError; + PalletExternalValidatorSlashesEvent: PalletExternalValidatorSlashesEvent; + PalletExternalValidatorSlashesSlash: PalletExternalValidatorSlashesSlash; PalletExternalValidatorsCall: PalletExternalValidatorsCall; PalletExternalValidatorsError: PalletExternalValidatorsError; PalletExternalValidatorsEvent: PalletExternalValidatorsEvent; diff --git a/typescript-api/src/dancelight/interfaces/types-lookup.ts b/typescript-api/src/dancelight/interfaces/types-lookup.ts index c106648b3..37fe214a3 100644 --- a/typescript-api/src/dancelight/interfaces/types-lookup.ts +++ b/typescript-api/src/dancelight/interfaces/types-lookup.ts @@ -656,7 +656,18 @@ declare module "@polkadot/types/lookup" { readonly type: "NotForcing" | "ForceNew" | "ForceNone" | "ForceAlways"; } - /** @name PalletSessionEvent (56) */ + /** @name PalletExternalValidatorSlashesEvent (56) */ + interface PalletExternalValidatorSlashesEvent extends Enum { + readonly isSlashReported: boolean; + readonly asSlashReported: { + readonly validator: AccountId32; + readonly fraction: Perbill; + readonly slashEra: u32; + } & Struct; + readonly type: "SlashReported"; + } + + /** @name PalletSessionEvent (58) */ interface PalletSessionEvent extends Enum { readonly isNewSession: boolean; readonly asNewSession: { @@ -665,7 +676,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NewSession"; } - /** @name PalletGrandpaEvent (57) */ + /** @name PalletGrandpaEvent (59) */ interface PalletGrandpaEvent extends Enum { readonly isNewAuthorities: boolean; readonly asNewAuthorities: { @@ -676,10 +687,10 @@ declare module "@polkadot/types/lookup" { readonly type: "NewAuthorities" | "Paused" | "Resumed"; } - /** @name SpConsensusGrandpaAppPublic (60) */ + /** @name SpConsensusGrandpaAppPublic (62) */ interface SpConsensusGrandpaAppPublic extends U8aFixed {} - /** @name PalletInflationRewardsEvent (61) */ + /** @name PalletInflationRewardsEvent (63) */ interface PalletInflationRewardsEvent extends Enum { readonly isRewardedOrchestrator: boolean; readonly asRewardedOrchestrator: { @@ -695,7 +706,7 @@ declare module "@polkadot/types/lookup" { readonly type: "RewardedOrchestrator" | "RewardedContainer"; } - /** @name PalletTreasuryEvent (62) */ + /** @name PalletTreasuryEvent (64) */ interface PalletTreasuryEvent extends Enum { readonly isSpending: boolean; readonly asSpending: { @@ -772,7 +783,7 @@ declare module "@polkadot/types/lookup" { | "SpendProcessed"; } - /** @name PalletConvictionVotingEvent (64) */ + /** @name PalletConvictionVotingEvent (66) */ interface PalletConvictionVotingEvent extends Enum { readonly isDelegated: boolean; readonly asDelegated: ITuple<[AccountId32, AccountId32]>; @@ -781,7 +792,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Delegated" | "Undelegated"; } - /** @name PalletReferendaEvent (65) */ + /** @name PalletReferendaEvent (67) */ interface PalletReferendaEvent extends Enum { readonly isSubmitted: boolean; readonly asSubmitted: { @@ -885,7 +896,7 @@ declare module "@polkadot/types/lookup" { | "MetadataCleared"; } - /** @name FrameSupportPreimagesBounded (67) */ + /** @name FrameSupportPreimagesBounded (69) */ interface FrameSupportPreimagesBounded extends Enum { readonly isLegacy: boolean; readonly asLegacy: { @@ -901,7 +912,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Legacy" | "Inline" | "Lookup"; } - /** @name FrameSystemCall (69) */ + /** @name FrameSystemCall (71) */ interface FrameSystemCall extends Enum { readonly isRemark: boolean; readonly asRemark: { @@ -962,7 +973,7 @@ declare module "@polkadot/types/lookup" { | "ApplyAuthorizedUpgrade"; } - /** @name PalletBabeCall (73) */ + /** @name PalletBabeCall (75) */ interface PalletBabeCall extends Enum { readonly isReportEquivocation: boolean; readonly asReportEquivocation: { @@ -981,7 +992,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ReportEquivocation" | "ReportEquivocationUnsigned" | "PlanConfigChange"; } - /** @name SpConsensusSlotsEquivocationProof (74) */ + /** @name SpConsensusSlotsEquivocationProof (76) */ interface SpConsensusSlotsEquivocationProof extends Struct { readonly offender: SpConsensusBabeAppPublic; readonly slot: u64; @@ -989,7 +1000,7 @@ declare module "@polkadot/types/lookup" { readonly secondHeader: SpRuntimeHeader; } - /** @name SpRuntimeHeader (75) */ + /** @name SpRuntimeHeader (77) */ interface SpRuntimeHeader extends Struct { readonly parentHash: H256; readonly number: Compact; @@ -998,17 +1009,17 @@ declare module "@polkadot/types/lookup" { readonly digest: SpRuntimeDigest; } - /** @name SpConsensusBabeAppPublic (77) */ + /** @name SpConsensusBabeAppPublic (79) */ interface SpConsensusBabeAppPublic extends U8aFixed {} - /** @name SpSessionMembershipProof (78) */ + /** @name SpSessionMembershipProof (80) */ interface SpSessionMembershipProof extends Struct { readonly session: u32; readonly trieNodes: Vec; readonly validatorCount: u32; } - /** @name SpConsensusBabeDigestsNextConfigDescriptor (79) */ + /** @name SpConsensusBabeDigestsNextConfigDescriptor (81) */ interface SpConsensusBabeDigestsNextConfigDescriptor extends Enum { readonly isV1: boolean; readonly asV1: { @@ -1018,7 +1029,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V1"; } - /** @name SpConsensusBabeAllowedSlots (81) */ + /** @name SpConsensusBabeAllowedSlots (83) */ interface SpConsensusBabeAllowedSlots extends Enum { readonly isPrimarySlots: boolean; readonly isPrimaryAndSecondaryPlainSlots: boolean; @@ -1026,7 +1037,7 @@ declare module "@polkadot/types/lookup" { readonly type: "PrimarySlots" | "PrimaryAndSecondaryPlainSlots" | "PrimaryAndSecondaryVRFSlots"; } - /** @name PalletTimestampCall (82) */ + /** @name PalletTimestampCall (84) */ interface PalletTimestampCall extends Enum { readonly isSet: boolean; readonly asSet: { @@ -1035,7 +1046,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Set"; } - /** @name PalletBalancesCall (83) */ + /** @name PalletBalancesCall (85) */ interface PalletBalancesCall extends Enum { readonly isTransferAllowDeath: boolean; readonly asTransferAllowDeath: { @@ -1094,14 +1105,14 @@ declare module "@polkadot/types/lookup" { | "Burn"; } - /** @name PalletBalancesAdjustmentDirection (89) */ + /** @name PalletBalancesAdjustmentDirection (91) */ interface PalletBalancesAdjustmentDirection extends Enum { readonly isIncrease: boolean; readonly isDecrease: boolean; readonly type: "Increase" | "Decrease"; } - /** @name PalletParametersCall (90) */ + /** @name PalletParametersCall (92) */ interface PalletParametersCall extends Enum { readonly isSetParameter: boolean; readonly asSetParameter: { @@ -1110,14 +1121,14 @@ declare module "@polkadot/types/lookup" { readonly type: "SetParameter"; } - /** @name DancelightRuntimeRuntimeParameters (91) */ + /** @name DancelightRuntimeRuntimeParameters (93) */ interface DancelightRuntimeRuntimeParameters extends Enum { readonly isPreimage: boolean; readonly asPreimage: DancelightRuntimeDynamicParamsPreimageParameters; readonly type: "Preimage"; } - /** @name DancelightRuntimeDynamicParamsPreimageParameters (92) */ + /** @name DancelightRuntimeDynamicParamsPreimageParameters (94) */ interface DancelightRuntimeDynamicParamsPreimageParameters extends Enum { readonly isBaseDeposit: boolean; readonly asBaseDeposit: ITuple<[DancelightRuntimeDynamicParamsPreimageBaseDeposit, Option]>; @@ -1126,7 +1137,7 @@ declare module "@polkadot/types/lookup" { readonly type: "BaseDeposit" | "ByteDeposit"; } - /** @name PalletRegistrarCall (93) */ + /** @name PalletRegistrarCall (95) */ interface PalletRegistrarCall extends Enum { readonly isRegister: boolean; readonly asRegister: { @@ -1196,7 +1207,7 @@ declare module "@polkadot/types/lookup" { | "DeregisterWithRelayProof"; } - /** @name DpContainerChainGenesisDataContainerChainGenesisData (94) */ + /** @name DpContainerChainGenesisDataContainerChainGenesisData (96) */ interface DpContainerChainGenesisDataContainerChainGenesisData extends Struct { readonly storage: Vec; readonly name: Bytes; @@ -1206,42 +1217,42 @@ declare module "@polkadot/types/lookup" { readonly properties: DpContainerChainGenesisDataProperties; } - /** @name DpContainerChainGenesisDataContainerChainGenesisDataItem (96) */ + /** @name DpContainerChainGenesisDataContainerChainGenesisDataItem (98) */ interface DpContainerChainGenesisDataContainerChainGenesisDataItem extends Struct { readonly key: Bytes; readonly value: Bytes; } - /** @name DpContainerChainGenesisDataProperties (98) */ + /** @name DpContainerChainGenesisDataProperties (100) */ interface DpContainerChainGenesisDataProperties extends Struct { readonly tokenMetadata: DpContainerChainGenesisDataTokenMetadata; readonly isEthereum: bool; } - /** @name DpContainerChainGenesisDataTokenMetadata (99) */ + /** @name DpContainerChainGenesisDataTokenMetadata (101) */ interface DpContainerChainGenesisDataTokenMetadata extends Struct { readonly tokenSymbol: Bytes; readonly ss58Format: u32; readonly tokenDecimals: u32; } - /** @name TpTraitsSlotFrequency (103) */ + /** @name TpTraitsSlotFrequency (105) */ interface TpTraitsSlotFrequency extends Struct { readonly min: u32; readonly max: u32; } - /** @name TpTraitsParathreadParams (105) */ + /** @name TpTraitsParathreadParams (107) */ interface TpTraitsParathreadParams extends Struct { readonly slotFrequency: TpTraitsSlotFrequency; } - /** @name SpTrieStorageProof (106) */ + /** @name SpTrieStorageProof (108) */ interface SpTrieStorageProof extends Struct { readonly trieNodes: BTreeSet; } - /** @name SpRuntimeMultiSignature (108) */ + /** @name SpRuntimeMultiSignature (110) */ interface SpRuntimeMultiSignature extends Enum { readonly isEd25519: boolean; readonly asEd25519: U8aFixed; @@ -1252,7 +1263,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Ed25519" | "Sr25519" | "Ecdsa"; } - /** @name PalletConfigurationCall (111) */ + /** @name PalletConfigurationCall (113) */ interface PalletConfigurationCall extends Enum { readonly isSetMaxCollators: boolean; readonly asSetMaxCollators: { @@ -1307,7 +1318,7 @@ declare module "@polkadot/types/lookup" { | "SetBypassConsistencyCheck"; } - /** @name PalletInvulnerablesCall (114) */ + /** @name PalletInvulnerablesCall (115) */ interface PalletInvulnerablesCall extends Enum { readonly isAddInvulnerable: boolean; readonly asAddInvulnerable: { @@ -1320,13 +1331,13 @@ declare module "@polkadot/types/lookup" { readonly type: "AddInvulnerable" | "RemoveInvulnerable"; } - /** @name PalletCollatorAssignmentCall (115) */ + /** @name PalletCollatorAssignmentCall (116) */ type PalletCollatorAssignmentCall = Null; - /** @name PalletAuthorityAssignmentCall (116) */ + /** @name PalletAuthorityAssignmentCall (117) */ type PalletAuthorityAssignmentCall = Null; - /** @name PalletAuthorNotingCall (117) */ + /** @name PalletAuthorNotingCall (118) */ interface PalletAuthorNotingCall extends Enum { readonly isSetLatestAuthorData: boolean; readonly asSetLatestAuthorData: { @@ -1346,7 +1357,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SetLatestAuthorData" | "SetAuthor" | "KillAuthorData"; } - /** @name PalletServicesPaymentCall (118) */ + /** @name PalletServicesPaymentCall (119) */ interface PalletServicesPaymentCall extends Enum { readonly isPurchaseCredits: boolean; readonly asPurchaseCredits: { @@ -1393,7 +1404,7 @@ declare module "@polkadot/types/lookup" { | "SetMaxTip"; } - /** @name PalletDataPreserversCall (119) */ + /** @name PalletDataPreserversCall (120) */ interface PalletDataPreserversCall extends Enum { readonly isCreateProfile: boolean; readonly asCreateProfile: { @@ -1451,7 +1462,7 @@ declare module "@polkadot/types/lookup" { | "ForceStartAssignment"; } - /** @name PalletDataPreserversProfile (120) */ + /** @name PalletDataPreserversProfile (121) */ interface PalletDataPreserversProfile extends Struct { readonly url: Bytes; readonly paraIds: PalletDataPreserversParaIdsFilter; @@ -1459,7 +1470,7 @@ declare module "@polkadot/types/lookup" { readonly assignmentRequest: DancelightRuntimePreserversAssignmentPaymentRequest; } - /** @name PalletDataPreserversParaIdsFilter (122) */ + /** @name PalletDataPreserversParaIdsFilter (123) */ interface PalletDataPreserversParaIdsFilter extends Enum { readonly isAnyParaId: boolean; readonly isWhitelist: boolean; @@ -1469,7 +1480,7 @@ declare module "@polkadot/types/lookup" { readonly type: "AnyParaId" | "Whitelist" | "Blacklist"; } - /** @name PalletDataPreserversProfileMode (126) */ + /** @name PalletDataPreserversProfileMode (127) */ interface PalletDataPreserversProfileMode extends Enum { readonly isBootnode: boolean; readonly isRpc: boolean; @@ -1479,25 +1490,25 @@ declare module "@polkadot/types/lookup" { readonly type: "Bootnode" | "Rpc"; } - /** @name DancelightRuntimePreserversAssignmentPaymentRequest (127) */ + /** @name DancelightRuntimePreserversAssignmentPaymentRequest (128) */ interface DancelightRuntimePreserversAssignmentPaymentRequest extends Enum { readonly isFree: boolean; readonly type: "Free"; } - /** @name DancelightRuntimePreserversAssignmentPaymentExtra (128) */ + /** @name DancelightRuntimePreserversAssignmentPaymentExtra (129) */ interface DancelightRuntimePreserversAssignmentPaymentExtra extends Enum { readonly isFree: boolean; readonly type: "Free"; } - /** @name DancelightRuntimePreserversAssignmentPaymentWitness (129) */ + /** @name DancelightRuntimePreserversAssignmentPaymentWitness (130) */ interface DancelightRuntimePreserversAssignmentPaymentWitness extends Enum { readonly isFree: boolean; readonly type: "Free"; } - /** @name PalletExternalValidatorsCall (130) */ + /** @name PalletExternalValidatorsCall (131) */ interface PalletExternalValidatorsCall extends Enum { readonly isSkipExternalValidators: boolean; readonly asSkipExternalValidators: { @@ -1523,7 +1534,23 @@ declare module "@polkadot/types/lookup" { | "ForceNewEraAlways"; } - /** @name PalletSessionCall (131) */ + /** @name PalletExternalValidatorSlashesCall (132) */ + interface PalletExternalValidatorSlashesCall extends Enum { + readonly isCancelDeferredSlash: boolean; + readonly asCancelDeferredSlash: { + readonly era: u32; + readonly slashIndices: Vec; + } & Struct; + readonly isForceInjectSlash: boolean; + readonly asForceInjectSlash: { + readonly era: u32; + readonly validator: AccountId32; + readonly percentage: Perbill; + } & Struct; + readonly type: "CancelDeferredSlash" | "ForceInjectSlash"; + } + + /** @name PalletSessionCall (134) */ interface PalletSessionCall extends Enum { readonly isSetKeys: boolean; readonly asSetKeys: { @@ -1534,7 +1561,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SetKeys" | "PurgeKeys"; } - /** @name DancelightRuntimeSessionKeys (132) */ + /** @name DancelightRuntimeSessionKeys (135) */ interface DancelightRuntimeSessionKeys extends Struct { readonly grandpa: SpConsensusGrandpaAppPublic; readonly babe: SpConsensusBabeAppPublic; @@ -1545,22 +1572,22 @@ declare module "@polkadot/types/lookup" { readonly nimbus: NimbusPrimitivesNimbusCryptoPublic; } - /** @name PolkadotPrimitivesV7ValidatorAppPublic (133) */ + /** @name PolkadotPrimitivesV7ValidatorAppPublic (136) */ interface PolkadotPrimitivesV7ValidatorAppPublic extends U8aFixed {} - /** @name PolkadotPrimitivesV7AssignmentAppPublic (134) */ + /** @name PolkadotPrimitivesV7AssignmentAppPublic (137) */ interface PolkadotPrimitivesV7AssignmentAppPublic extends U8aFixed {} - /** @name SpAuthorityDiscoveryAppPublic (135) */ + /** @name SpAuthorityDiscoveryAppPublic (138) */ interface SpAuthorityDiscoveryAppPublic extends U8aFixed {} - /** @name SpConsensusBeefyEcdsaCryptoPublic (136) */ + /** @name SpConsensusBeefyEcdsaCryptoPublic (139) */ interface SpConsensusBeefyEcdsaCryptoPublic extends U8aFixed {} - /** @name NimbusPrimitivesNimbusCryptoPublic (138) */ + /** @name NimbusPrimitivesNimbusCryptoPublic (141) */ interface NimbusPrimitivesNimbusCryptoPublic extends U8aFixed {} - /** @name PalletGrandpaCall (139) */ + /** @name PalletGrandpaCall (142) */ interface PalletGrandpaCall extends Enum { readonly isReportEquivocation: boolean; readonly asReportEquivocation: { @@ -1580,13 +1607,13 @@ declare module "@polkadot/types/lookup" { readonly type: "ReportEquivocation" | "ReportEquivocationUnsigned" | "NoteStalled"; } - /** @name SpConsensusGrandpaEquivocationProof (140) */ + /** @name SpConsensusGrandpaEquivocationProof (143) */ interface SpConsensusGrandpaEquivocationProof extends Struct { readonly setId: u64; readonly equivocation: SpConsensusGrandpaEquivocation; } - /** @name SpConsensusGrandpaEquivocation (141) */ + /** @name SpConsensusGrandpaEquivocation (144) */ interface SpConsensusGrandpaEquivocation extends Enum { readonly isPrevote: boolean; readonly asPrevote: FinalityGrandpaEquivocationPrevote; @@ -1595,7 +1622,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Prevote" | "Precommit"; } - /** @name FinalityGrandpaEquivocationPrevote (142) */ + /** @name FinalityGrandpaEquivocationPrevote (145) */ interface FinalityGrandpaEquivocationPrevote extends Struct { readonly roundNumber: u64; readonly identity: SpConsensusGrandpaAppPublic; @@ -1603,16 +1630,16 @@ declare module "@polkadot/types/lookup" { readonly second: ITuple<[FinalityGrandpaPrevote, SpConsensusGrandpaAppSignature]>; } - /** @name FinalityGrandpaPrevote (143) */ + /** @name FinalityGrandpaPrevote (146) */ interface FinalityGrandpaPrevote extends Struct { readonly targetHash: H256; readonly targetNumber: u32; } - /** @name SpConsensusGrandpaAppSignature (144) */ + /** @name SpConsensusGrandpaAppSignature (147) */ interface SpConsensusGrandpaAppSignature extends U8aFixed {} - /** @name FinalityGrandpaEquivocationPrecommit (146) */ + /** @name FinalityGrandpaEquivocationPrecommit (149) */ interface FinalityGrandpaEquivocationPrecommit extends Struct { readonly roundNumber: u64; readonly identity: SpConsensusGrandpaAppPublic; @@ -1620,13 +1647,13 @@ declare module "@polkadot/types/lookup" { readonly second: ITuple<[FinalityGrandpaPrecommit, SpConsensusGrandpaAppSignature]>; } - /** @name FinalityGrandpaPrecommit (147) */ + /** @name FinalityGrandpaPrecommit (150) */ interface FinalityGrandpaPrecommit extends Struct { readonly targetHash: H256; readonly targetNumber: u32; } - /** @name PalletTreasuryCall (149) */ + /** @name PalletTreasuryCall (152) */ interface PalletTreasuryCall extends Enum { readonly isSpendLocal: boolean; readonly asSpendLocal: { @@ -1659,7 +1686,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SpendLocal" | "RemoveApproval" | "Spend" | "Payout" | "CheckStatus" | "VoidSpend"; } - /** @name PalletConvictionVotingCall (151) */ + /** @name PalletConvictionVotingCall (154) */ interface PalletConvictionVotingCall extends Enum { readonly isVote: boolean; readonly asVote: { @@ -1696,7 +1723,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Vote" | "Delegate" | "Undelegate" | "Unlock" | "RemoveVote" | "RemoveOtherVote"; } - /** @name PalletConvictionVotingVoteAccountVote (152) */ + /** @name PalletConvictionVotingVoteAccountVote (155) */ interface PalletConvictionVotingVoteAccountVote extends Enum { readonly isStandard: boolean; readonly asStandard: { @@ -1717,7 +1744,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Standard" | "Split" | "SplitAbstain"; } - /** @name PalletConvictionVotingConviction (154) */ + /** @name PalletConvictionVotingConviction (157) */ interface PalletConvictionVotingConviction extends Enum { readonly isNone: boolean; readonly isLocked1x: boolean; @@ -1729,7 +1756,7 @@ declare module "@polkadot/types/lookup" { readonly type: "None" | "Locked1x" | "Locked2x" | "Locked3x" | "Locked4x" | "Locked5x" | "Locked6x"; } - /** @name PalletReferendaCall (156) */ + /** @name PalletReferendaCall (159) */ interface PalletReferendaCall extends Enum { readonly isSubmit: boolean; readonly asSubmit: { @@ -1782,7 +1809,7 @@ declare module "@polkadot/types/lookup" { | "SetMetadata"; } - /** @name DancelightRuntimeOriginCaller (157) */ + /** @name DancelightRuntimeOriginCaller (160) */ interface DancelightRuntimeOriginCaller extends Enum { readonly isSystem: boolean; readonly asSystem: FrameSupportDispatchRawOrigin; @@ -1796,7 +1823,7 @@ declare module "@polkadot/types/lookup" { readonly type: "System" | "Void" | "Origins" | "ParachainsOrigin" | "XcmPallet"; } - /** @name FrameSupportDispatchRawOrigin (158) */ + /** @name FrameSupportDispatchRawOrigin (161) */ interface FrameSupportDispatchRawOrigin extends Enum { readonly isRoot: boolean; readonly isSigned: boolean; @@ -1805,7 +1832,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Root" | "Signed" | "None"; } - /** @name DancelightRuntimeGovernanceOriginsPalletCustomOriginsOrigin (159) */ + /** @name DancelightRuntimeGovernanceOriginsPalletCustomOriginsOrigin (162) */ interface DancelightRuntimeGovernanceOriginsPalletCustomOriginsOrigin extends Enum { readonly isStakingAdmin: boolean; readonly isTreasurer: boolean; @@ -1864,14 +1891,14 @@ declare module "@polkadot/types/lookup" { | "Fellowship9Dan"; } - /** @name PolkadotRuntimeParachainsOriginPalletOrigin (160) */ + /** @name PolkadotRuntimeParachainsOriginPalletOrigin (163) */ interface PolkadotRuntimeParachainsOriginPalletOrigin extends Enum { readonly isParachain: boolean; readonly asParachain: u32; readonly type: "Parachain"; } - /** @name PalletXcmOrigin (161) */ + /** @name PalletXcmOrigin (164) */ interface PalletXcmOrigin extends Enum { readonly isXcm: boolean; readonly asXcm: StagingXcmV4Location; @@ -1880,13 +1907,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Xcm" | "Response"; } - /** @name StagingXcmV4Location (162) */ + /** @name StagingXcmV4Location (165) */ interface StagingXcmV4Location extends Struct { readonly parents: u8; readonly interior: StagingXcmV4Junctions; } - /** @name StagingXcmV4Junctions (163) */ + /** @name StagingXcmV4Junctions (166) */ interface StagingXcmV4Junctions extends Enum { readonly isHere: boolean; readonly isX1: boolean; @@ -1908,7 +1935,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "X1" | "X2" | "X3" | "X4" | "X5" | "X6" | "X7" | "X8"; } - /** @name StagingXcmV4Junction (165) */ + /** @name StagingXcmV4Junction (168) */ interface StagingXcmV4Junction extends Enum { readonly isParachain: boolean; readonly asParachain: Compact; @@ -1957,7 +1984,7 @@ declare module "@polkadot/types/lookup" { | "GlobalConsensus"; } - /** @name StagingXcmV4JunctionNetworkId (167) */ + /** @name StagingXcmV4JunctionNetworkId (170) */ interface StagingXcmV4JunctionNetworkId extends Enum { readonly isByGenesis: boolean; readonly asByGenesis: U8aFixed; @@ -1992,7 +2019,7 @@ declare module "@polkadot/types/lookup" { | "PolkadotBulletin"; } - /** @name XcmV3JunctionBodyId (168) */ + /** @name XcmV3JunctionBodyId (171) */ interface XcmV3JunctionBodyId extends Enum { readonly isUnit: boolean; readonly isMoniker: boolean; @@ -2019,7 +2046,7 @@ declare module "@polkadot/types/lookup" { | "Treasury"; } - /** @name XcmV3JunctionBodyPart (169) */ + /** @name XcmV3JunctionBodyPart (172) */ interface XcmV3JunctionBodyPart extends Enum { readonly isVoice: boolean; readonly isMembers: boolean; @@ -2044,10 +2071,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Voice" | "Members" | "Fraction" | "AtLeastProportion" | "MoreThanProportion"; } - /** @name SpCoreVoid (177) */ + /** @name SpCoreVoid (180) */ type SpCoreVoid = Null; - /** @name FrameSupportScheduleDispatchTime (178) */ + /** @name FrameSupportScheduleDispatchTime (181) */ interface FrameSupportScheduleDispatchTime extends Enum { readonly isAt: boolean; readonly asAt: u32; @@ -2056,7 +2083,7 @@ declare module "@polkadot/types/lookup" { readonly type: "At" | "After"; } - /** @name PalletRankedCollectiveCall (180) */ + /** @name PalletRankedCollectiveCall (183) */ interface PalletRankedCollectiveCall extends Enum { readonly isAddMember: boolean; readonly asAddMember: { @@ -2100,7 +2127,7 @@ declare module "@polkadot/types/lookup" { | "ExchangeMember"; } - /** @name PalletWhitelistCall (182) */ + /** @name PalletWhitelistCall (185) */ interface PalletWhitelistCall extends Enum { readonly isWhitelistCall: boolean; readonly asWhitelistCall: { @@ -2127,7 +2154,7 @@ declare module "@polkadot/types/lookup" { | "DispatchWhitelistedCallWithPreimage"; } - /** @name PolkadotRuntimeParachainsConfigurationPalletCall (183) */ + /** @name PolkadotRuntimeParachainsConfigurationPalletCall (186) */ interface PolkadotRuntimeParachainsConfigurationPalletCall extends Enum { readonly isSetValidationUpgradeCooldown: boolean; readonly asSetValidationUpgradeCooldown: { @@ -2373,16 +2400,16 @@ declare module "@polkadot/types/lookup" { | "SetSchedulerParams"; } - /** @name PolkadotPrimitivesV7AsyncBackingAsyncBackingParams (184) */ + /** @name PolkadotPrimitivesV7AsyncBackingAsyncBackingParams (187) */ interface PolkadotPrimitivesV7AsyncBackingAsyncBackingParams extends Struct { readonly maxCandidateDepth: u32; readonly allowedAncestryLen: u32; } - /** @name PolkadotPrimitivesV7ExecutorParams (185) */ + /** @name PolkadotPrimitivesV7ExecutorParams (188) */ interface PolkadotPrimitivesV7ExecutorParams extends Vec {} - /** @name PolkadotPrimitivesV7ExecutorParamsExecutorParam (187) */ + /** @name PolkadotPrimitivesV7ExecutorParamsExecutorParam (190) */ interface PolkadotPrimitivesV7ExecutorParamsExecutorParam extends Enum { readonly isMaxMemoryPages: boolean; readonly asMaxMemoryPages: u32; @@ -2407,26 +2434,26 @@ declare module "@polkadot/types/lookup" { | "WasmExtBulkMemory"; } - /** @name PolkadotPrimitivesV7PvfPrepKind (188) */ + /** @name PolkadotPrimitivesV7PvfPrepKind (191) */ interface PolkadotPrimitivesV7PvfPrepKind extends Enum { readonly isPrecheck: boolean; readonly isPrepare: boolean; readonly type: "Precheck" | "Prepare"; } - /** @name PolkadotPrimitivesV7PvfExecKind (189) */ + /** @name PolkadotPrimitivesV7PvfExecKind (192) */ interface PolkadotPrimitivesV7PvfExecKind extends Enum { readonly isBacking: boolean; readonly isApproval: boolean; readonly type: "Backing" | "Approval"; } - /** @name PolkadotPrimitivesV7ApprovalVotingParams (190) */ + /** @name PolkadotPrimitivesV7ApprovalVotingParams (193) */ interface PolkadotPrimitivesV7ApprovalVotingParams extends Struct { readonly maxApprovalCoalesceCount: u32; } - /** @name PolkadotPrimitivesVstagingSchedulerParams (191) */ + /** @name PolkadotPrimitivesVstagingSchedulerParams (194) */ interface PolkadotPrimitivesVstagingSchedulerParams extends Struct { readonly groupRotationFrequency: u32; readonly parasAvailabilityPeriod: u32; @@ -2441,13 +2468,13 @@ declare module "@polkadot/types/lookup" { readonly ttl: u32; } - /** @name PolkadotRuntimeParachainsSharedPalletCall (192) */ + /** @name PolkadotRuntimeParachainsSharedPalletCall (195) */ type PolkadotRuntimeParachainsSharedPalletCall = Null; - /** @name PolkadotRuntimeParachainsInclusionPalletCall (193) */ + /** @name PolkadotRuntimeParachainsInclusionPalletCall (196) */ type PolkadotRuntimeParachainsInclusionPalletCall = Null; - /** @name PolkadotRuntimeParachainsParasInherentPalletCall (194) */ + /** @name PolkadotRuntimeParachainsParasInherentPalletCall (197) */ interface PolkadotRuntimeParachainsParasInherentPalletCall extends Enum { readonly isEnter: boolean; readonly asEnter: { @@ -2456,7 +2483,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Enter"; } - /** @name PolkadotPrimitivesV7InherentData (195) */ + /** @name PolkadotPrimitivesV7InherentData (198) */ interface PolkadotPrimitivesV7InherentData extends Struct { readonly bitfields: Vec; readonly backedCandidates: Vec; @@ -2464,33 +2491,33 @@ declare module "@polkadot/types/lookup" { readonly parentHeader: SpRuntimeHeader; } - /** @name PolkadotPrimitivesV7SignedUncheckedSigned (197) */ + /** @name PolkadotPrimitivesV7SignedUncheckedSigned (200) */ interface PolkadotPrimitivesV7SignedUncheckedSigned extends Struct { readonly payload: BitVec; readonly validatorIndex: u32; readonly signature: PolkadotPrimitivesV7ValidatorAppSignature; } - /** @name BitvecOrderLsb0 (200) */ + /** @name BitvecOrderLsb0 (203) */ type BitvecOrderLsb0 = Null; - /** @name PolkadotPrimitivesV7ValidatorAppSignature (202) */ + /** @name PolkadotPrimitivesV7ValidatorAppSignature (205) */ interface PolkadotPrimitivesV7ValidatorAppSignature extends U8aFixed {} - /** @name PolkadotPrimitivesV7BackedCandidate (204) */ + /** @name PolkadotPrimitivesV7BackedCandidate (207) */ interface PolkadotPrimitivesV7BackedCandidate extends Struct { readonly candidate: PolkadotPrimitivesV7CommittedCandidateReceipt; readonly validityVotes: Vec; readonly validatorIndices: BitVec; } - /** @name PolkadotPrimitivesV7CommittedCandidateReceipt (205) */ + /** @name PolkadotPrimitivesV7CommittedCandidateReceipt (208) */ interface PolkadotPrimitivesV7CommittedCandidateReceipt extends Struct { readonly descriptor: PolkadotPrimitivesV7CandidateDescriptor; readonly commitments: PolkadotPrimitivesV7CandidateCommitments; } - /** @name PolkadotPrimitivesV7CandidateDescriptor (206) */ + /** @name PolkadotPrimitivesV7CandidateDescriptor (209) */ interface PolkadotPrimitivesV7CandidateDescriptor extends Struct { readonly paraId: u32; readonly relayParent: H256; @@ -2503,13 +2530,13 @@ declare module "@polkadot/types/lookup" { readonly validationCodeHash: H256; } - /** @name PolkadotPrimitivesV7CollatorAppPublic (207) */ + /** @name PolkadotPrimitivesV7CollatorAppPublic (210) */ interface PolkadotPrimitivesV7CollatorAppPublic extends U8aFixed {} - /** @name PolkadotPrimitivesV7CollatorAppSignature (208) */ + /** @name PolkadotPrimitivesV7CollatorAppSignature (211) */ interface PolkadotPrimitivesV7CollatorAppSignature extends U8aFixed {} - /** @name PolkadotPrimitivesV7CandidateCommitments (210) */ + /** @name PolkadotPrimitivesV7CandidateCommitments (213) */ interface PolkadotPrimitivesV7CandidateCommitments extends Struct { readonly upwardMessages: Vec; readonly horizontalMessages: Vec; @@ -2519,13 +2546,13 @@ declare module "@polkadot/types/lookup" { readonly hrmpWatermark: u32; } - /** @name PolkadotCorePrimitivesOutboundHrmpMessage (213) */ + /** @name PolkadotCorePrimitivesOutboundHrmpMessage (216) */ interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct { readonly recipient: u32; readonly data: Bytes; } - /** @name PolkadotPrimitivesV7ValidityAttestation (218) */ + /** @name PolkadotPrimitivesV7ValidityAttestation (221) */ interface PolkadotPrimitivesV7ValidityAttestation extends Enum { readonly isImplicit: boolean; readonly asImplicit: PolkadotPrimitivesV7ValidatorAppSignature; @@ -2534,7 +2561,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Implicit" | "Explicit"; } - /** @name PolkadotPrimitivesV7DisputeStatementSet (220) */ + /** @name PolkadotPrimitivesV7DisputeStatementSet (223) */ interface PolkadotPrimitivesV7DisputeStatementSet extends Struct { readonly candidateHash: H256; readonly session: u32; @@ -2543,7 +2570,7 @@ declare module "@polkadot/types/lookup" { >; } - /** @name PolkadotPrimitivesV7DisputeStatement (224) */ + /** @name PolkadotPrimitivesV7DisputeStatement (227) */ interface PolkadotPrimitivesV7DisputeStatement extends Enum { readonly isValid: boolean; readonly asValid: PolkadotPrimitivesV7ValidDisputeStatementKind; @@ -2552,7 +2579,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Valid" | "Invalid"; } - /** @name PolkadotPrimitivesV7ValidDisputeStatementKind (225) */ + /** @name PolkadotPrimitivesV7ValidDisputeStatementKind (228) */ interface PolkadotPrimitivesV7ValidDisputeStatementKind extends Enum { readonly isExplicit: boolean; readonly isBackingSeconded: boolean; @@ -2570,13 +2597,13 @@ declare module "@polkadot/types/lookup" { | "ApprovalCheckingMultipleCandidates"; } - /** @name PolkadotPrimitivesV7InvalidDisputeStatementKind (227) */ + /** @name PolkadotPrimitivesV7InvalidDisputeStatementKind (230) */ interface PolkadotPrimitivesV7InvalidDisputeStatementKind extends Enum { readonly isExplicit: boolean; readonly type: "Explicit"; } - /** @name PolkadotRuntimeParachainsParasPalletCall (228) */ + /** @name PolkadotRuntimeParachainsParasPalletCall (231) */ interface PolkadotRuntimeParachainsParasPalletCall extends Enum { readonly isForceSetCurrentCode: boolean; readonly asForceSetCurrentCode: { @@ -2633,7 +2660,7 @@ declare module "@polkadot/types/lookup" { | "ForceSetMostRecentContext"; } - /** @name PolkadotPrimitivesV7PvfCheckStatement (229) */ + /** @name PolkadotPrimitivesV7PvfCheckStatement (232) */ interface PolkadotPrimitivesV7PvfCheckStatement extends Struct { readonly accept: bool; readonly subject: H256; @@ -2641,7 +2668,7 @@ declare module "@polkadot/types/lookup" { readonly validatorIndex: u32; } - /** @name PolkadotRuntimeParachainsInitializerPalletCall (230) */ + /** @name PolkadotRuntimeParachainsInitializerPalletCall (233) */ interface PolkadotRuntimeParachainsInitializerPalletCall extends Enum { readonly isForceApprove: boolean; readonly asForceApprove: { @@ -2650,7 +2677,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ForceApprove"; } - /** @name PolkadotRuntimeParachainsHrmpPalletCall (231) */ + /** @name PolkadotRuntimeParachainsHrmpPalletCall (234) */ interface PolkadotRuntimeParachainsHrmpPalletCall extends Enum { readonly isHrmpInitOpenChannel: boolean; readonly asHrmpInitOpenChannel: { @@ -2720,19 +2747,19 @@ declare module "@polkadot/types/lookup" { | "EstablishChannelWithSystem"; } - /** @name PolkadotParachainPrimitivesPrimitivesHrmpChannelId (232) */ + /** @name PolkadotParachainPrimitivesPrimitivesHrmpChannelId (235) */ interface PolkadotParachainPrimitivesPrimitivesHrmpChannelId extends Struct { readonly sender: u32; readonly recipient: u32; } - /** @name PolkadotRuntimeParachainsDisputesPalletCall (233) */ + /** @name PolkadotRuntimeParachainsDisputesPalletCall (236) */ interface PolkadotRuntimeParachainsDisputesPalletCall extends Enum { readonly isForceUnfreeze: boolean; readonly type: "ForceUnfreeze"; } - /** @name PolkadotRuntimeParachainsDisputesSlashingPalletCall (234) */ + /** @name PolkadotRuntimeParachainsDisputesSlashingPalletCall (237) */ interface PolkadotRuntimeParachainsDisputesSlashingPalletCall extends Enum { readonly isReportDisputeLostUnsigned: boolean; readonly asReportDisputeLostUnsigned: { @@ -2742,7 +2769,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ReportDisputeLostUnsigned"; } - /** @name PolkadotPrimitivesV7SlashingDisputeProof (235) */ + /** @name PolkadotPrimitivesV7SlashingDisputeProof (238) */ interface PolkadotPrimitivesV7SlashingDisputeProof extends Struct { readonly timeSlot: PolkadotPrimitivesV7SlashingDisputesTimeSlot; readonly kind: PolkadotPrimitivesV7SlashingSlashingOffenceKind; @@ -2750,20 +2777,20 @@ declare module "@polkadot/types/lookup" { readonly validatorId: PolkadotPrimitivesV7ValidatorAppPublic; } - /** @name PolkadotPrimitivesV7SlashingDisputesTimeSlot (236) */ + /** @name PolkadotPrimitivesV7SlashingDisputesTimeSlot (239) */ interface PolkadotPrimitivesV7SlashingDisputesTimeSlot extends Struct { readonly sessionIndex: u32; readonly candidateHash: H256; } - /** @name PolkadotPrimitivesV7SlashingSlashingOffenceKind (237) */ + /** @name PolkadotPrimitivesV7SlashingSlashingOffenceKind (240) */ interface PolkadotPrimitivesV7SlashingSlashingOffenceKind extends Enum { readonly isForInvalid: boolean; readonly isAgainstValid: boolean; readonly type: "ForInvalid" | "AgainstValid"; } - /** @name PalletMessageQueueCall (238) */ + /** @name PalletMessageQueueCall (241) */ interface PalletMessageQueueCall extends Enum { readonly isReapPage: boolean; readonly asReapPage: { @@ -2780,21 +2807,21 @@ declare module "@polkadot/types/lookup" { readonly type: "ReapPage" | "ExecuteOverweight"; } - /** @name PolkadotRuntimeParachainsInclusionAggregateMessageOrigin (239) */ + /** @name PolkadotRuntimeParachainsInclusionAggregateMessageOrigin (242) */ interface PolkadotRuntimeParachainsInclusionAggregateMessageOrigin extends Enum { readonly isUmp: boolean; readonly asUmp: PolkadotRuntimeParachainsInclusionUmpQueueId; readonly type: "Ump"; } - /** @name PolkadotRuntimeParachainsInclusionUmpQueueId (240) */ + /** @name PolkadotRuntimeParachainsInclusionUmpQueueId (243) */ interface PolkadotRuntimeParachainsInclusionUmpQueueId extends Enum { readonly isPara: boolean; readonly asPara: u32; readonly type: "Para"; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletCall (241) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletCall (244) */ interface PolkadotRuntimeParachainsAssignerOnDemandPalletCall extends Enum { readonly isPlaceOrderAllowDeath: boolean; readonly asPlaceOrderAllowDeath: { @@ -2809,7 +2836,7 @@ declare module "@polkadot/types/lookup" { readonly type: "PlaceOrderAllowDeath" | "PlaceOrderKeepAlive"; } - /** @name PolkadotRuntimeCommonParasRegistrarPalletCall (242) */ + /** @name PolkadotRuntimeCommonParasRegistrarPalletCall (245) */ interface PolkadotRuntimeCommonParasRegistrarPalletCall extends Enum { readonly isRegister: boolean; readonly asRegister: { @@ -2865,7 +2892,7 @@ declare module "@polkadot/types/lookup" { | "SetCurrentHead"; } - /** @name PalletUtilityCall (243) */ + /** @name PalletUtilityCall (246) */ interface PalletUtilityCall extends Enum { readonly isBatch: boolean; readonly asBatch: { @@ -2897,7 +2924,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Batch" | "AsDerivative" | "BatchAll" | "DispatchAs" | "ForceBatch" | "WithWeight"; } - /** @name PalletIdentityCall (245) */ + /** @name PalletIdentityCall (248) */ interface PalletIdentityCall extends Enum { readonly isAddRegistrar: boolean; readonly asAddRegistrar: { @@ -3019,7 +3046,7 @@ declare module "@polkadot/types/lookup" { | "RemoveDanglingUsername"; } - /** @name PalletIdentityLegacyIdentityInfo (246) */ + /** @name PalletIdentityLegacyIdentityInfo (249) */ interface PalletIdentityLegacyIdentityInfo extends Struct { readonly additional: Vec>; readonly display: Data; @@ -3032,7 +3059,7 @@ declare module "@polkadot/types/lookup" { readonly twitter: Data; } - /** @name PalletIdentityJudgement (283) */ + /** @name PalletIdentityJudgement (286) */ interface PalletIdentityJudgement extends Enum { readonly isUnknown: boolean; readonly isFeePaid: boolean; @@ -3045,7 +3072,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unknown" | "FeePaid" | "Reasonable" | "KnownGood" | "OutOfDate" | "LowQuality" | "Erroneous"; } - /** @name PalletSchedulerCall (286) */ + /** @name PalletSchedulerCall (289) */ interface PalletSchedulerCall extends Enum { readonly isSchedule: boolean; readonly asSchedule: { @@ -3119,7 +3146,7 @@ declare module "@polkadot/types/lookup" { | "CancelRetryNamed"; } - /** @name PalletProxyCall (289) */ + /** @name PalletProxyCall (292) */ interface PalletProxyCall extends Enum { readonly isProxy: boolean; readonly asProxy: { @@ -3189,7 +3216,7 @@ declare module "@polkadot/types/lookup" { | "ProxyAnnounced"; } - /** @name DancelightRuntimeProxyType (291) */ + /** @name DancelightRuntimeProxyType (294) */ interface DancelightRuntimeProxyType extends Enum { readonly isAny: boolean; readonly isNonTransfer: boolean; @@ -3208,7 +3235,7 @@ declare module "@polkadot/types/lookup" { | "OnDemandOrdering"; } - /** @name PalletMultisigCall (292) */ + /** @name PalletMultisigCall (295) */ interface PalletMultisigCall extends Enum { readonly isAsMultiThreshold1: boolean; readonly asAsMultiThreshold1: { @@ -3241,13 +3268,13 @@ declare module "@polkadot/types/lookup" { readonly type: "AsMultiThreshold1" | "AsMulti" | "ApproveAsMulti" | "CancelAsMulti"; } - /** @name PalletMultisigTimepoint (294) */ + /** @name PalletMultisigTimepoint (297) */ interface PalletMultisigTimepoint extends Struct { readonly height: u32; readonly index: u32; } - /** @name PalletPreimageCall (295) */ + /** @name PalletPreimageCall (298) */ interface PalletPreimageCall extends Enum { readonly isNotePreimage: boolean; readonly asNotePreimage: { @@ -3272,7 +3299,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NotePreimage" | "UnnotePreimage" | "RequestPreimage" | "UnrequestPreimage" | "EnsureUpdated"; } - /** @name PalletAssetRateCall (297) */ + /** @name PalletAssetRateCall (300) */ interface PalletAssetRateCall extends Enum { readonly isCreate: boolean; readonly asCreate: { @@ -3291,7 +3318,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Create" | "Update" | "Remove"; } - /** @name PalletXcmCall (299) */ + /** @name PalletXcmCall (302) */ interface PalletXcmCall extends Enum { readonly isSend: boolean; readonly asSend: { @@ -3394,7 +3421,7 @@ declare module "@polkadot/types/lookup" { | "TransferAssetsUsingTypeAndThen"; } - /** @name XcmVersionedLocation (300) */ + /** @name XcmVersionedLocation (303) */ interface XcmVersionedLocation extends Enum { readonly isV2: boolean; readonly asV2: XcmV2MultiLocation; @@ -3405,13 +3432,13 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name XcmV2MultiLocation (301) */ + /** @name XcmV2MultiLocation (304) */ interface XcmV2MultiLocation extends Struct { readonly parents: u8; readonly interior: XcmV2MultilocationJunctions; } - /** @name XcmV2MultilocationJunctions (302) */ + /** @name XcmV2MultilocationJunctions (305) */ interface XcmV2MultilocationJunctions extends Enum { readonly isHere: boolean; readonly isX1: boolean; @@ -3448,7 +3475,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "X1" | "X2" | "X3" | "X4" | "X5" | "X6" | "X7" | "X8"; } - /** @name XcmV2Junction (303) */ + /** @name XcmV2Junction (306) */ interface XcmV2Junction extends Enum { readonly isParachain: boolean; readonly asParachain: Compact; @@ -3491,7 +3518,7 @@ declare module "@polkadot/types/lookup" { | "Plurality"; } - /** @name XcmV2NetworkId (304) */ + /** @name XcmV2NetworkId (307) */ interface XcmV2NetworkId extends Enum { readonly isAny: boolean; readonly isNamed: boolean; @@ -3501,7 +3528,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Any" | "Named" | "Polkadot" | "Kusama"; } - /** @name XcmV2BodyId (306) */ + /** @name XcmV2BodyId (309) */ interface XcmV2BodyId extends Enum { readonly isUnit: boolean; readonly isNamed: boolean; @@ -3528,7 +3555,7 @@ declare module "@polkadot/types/lookup" { | "Treasury"; } - /** @name XcmV2BodyPart (307) */ + /** @name XcmV2BodyPart (310) */ interface XcmV2BodyPart extends Enum { readonly isVoice: boolean; readonly isMembers: boolean; @@ -3553,13 +3580,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Voice" | "Members" | "Fraction" | "AtLeastProportion" | "MoreThanProportion"; } - /** @name StagingXcmV3MultiLocation (308) */ + /** @name StagingXcmV3MultiLocation (311) */ interface StagingXcmV3MultiLocation extends Struct { readonly parents: u8; readonly interior: XcmV3Junctions; } - /** @name XcmV3Junctions (309) */ + /** @name XcmV3Junctions (312) */ interface XcmV3Junctions extends Enum { readonly isHere: boolean; readonly isX1: boolean; @@ -3596,7 +3623,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "X1" | "X2" | "X3" | "X4" | "X5" | "X6" | "X7" | "X8"; } - /** @name XcmV3Junction (310) */ + /** @name XcmV3Junction (313) */ interface XcmV3Junction extends Enum { readonly isParachain: boolean; readonly asParachain: Compact; @@ -3645,7 +3672,7 @@ declare module "@polkadot/types/lookup" { | "GlobalConsensus"; } - /** @name XcmV3JunctionNetworkId (312) */ + /** @name XcmV3JunctionNetworkId (315) */ interface XcmV3JunctionNetworkId extends Enum { readonly isByGenesis: boolean; readonly asByGenesis: U8aFixed; @@ -3680,7 +3707,7 @@ declare module "@polkadot/types/lookup" { | "PolkadotBulletin"; } - /** @name XcmVersionedXcm (313) */ + /** @name XcmVersionedXcm (316) */ interface XcmVersionedXcm extends Enum { readonly isV2: boolean; readonly asV2: XcmV2Xcm; @@ -3691,10 +3718,10 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name XcmV2Xcm (314) */ + /** @name XcmV2Xcm (317) */ interface XcmV2Xcm extends Vec {} - /** @name XcmV2Instruction (316) */ + /** @name XcmV2Instruction (319) */ interface XcmV2Instruction extends Enum { readonly isWithdrawAsset: boolean; readonly asWithdrawAsset: XcmV2MultiassetMultiAssets; @@ -3842,16 +3869,16 @@ declare module "@polkadot/types/lookup" { | "UnsubscribeVersion"; } - /** @name XcmV2MultiassetMultiAssets (317) */ + /** @name XcmV2MultiassetMultiAssets (320) */ interface XcmV2MultiassetMultiAssets extends Vec {} - /** @name XcmV2MultiAsset (319) */ + /** @name XcmV2MultiAsset (322) */ interface XcmV2MultiAsset extends Struct { readonly id: XcmV2MultiassetAssetId; readonly fun: XcmV2MultiassetFungibility; } - /** @name XcmV2MultiassetAssetId (320) */ + /** @name XcmV2MultiassetAssetId (323) */ interface XcmV2MultiassetAssetId extends Enum { readonly isConcrete: boolean; readonly asConcrete: XcmV2MultiLocation; @@ -3860,7 +3887,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Concrete" | "Abstract"; } - /** @name XcmV2MultiassetFungibility (321) */ + /** @name XcmV2MultiassetFungibility (324) */ interface XcmV2MultiassetFungibility extends Enum { readonly isFungible: boolean; readonly asFungible: Compact; @@ -3869,7 +3896,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV2MultiassetAssetInstance (322) */ + /** @name XcmV2MultiassetAssetInstance (325) */ interface XcmV2MultiassetAssetInstance extends Enum { readonly isUndefined: boolean; readonly isIndex: boolean; @@ -3887,7 +3914,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Undefined" | "Index" | "Array4" | "Array8" | "Array16" | "Array32" | "Blob"; } - /** @name XcmV2Response (323) */ + /** @name XcmV2Response (326) */ interface XcmV2Response extends Enum { readonly isNull: boolean; readonly isAssets: boolean; @@ -3899,7 +3926,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Null" | "Assets" | "ExecutionResult" | "Version"; } - /** @name XcmV2TraitsError (326) */ + /** @name XcmV2TraitsError (329) */ interface XcmV2TraitsError extends Enum { readonly isOverflow: boolean; readonly isUnimplemented: boolean; @@ -3958,7 +3985,7 @@ declare module "@polkadot/types/lookup" { | "WeightNotComputable"; } - /** @name XcmV2OriginKind (327) */ + /** @name XcmV2OriginKind (330) */ interface XcmV2OriginKind extends Enum { readonly isNative: boolean; readonly isSovereignAccount: boolean; @@ -3967,12 +3994,12 @@ declare module "@polkadot/types/lookup" { readonly type: "Native" | "SovereignAccount" | "Superuser" | "Xcm"; } - /** @name XcmDoubleEncoded (328) */ + /** @name XcmDoubleEncoded (331) */ interface XcmDoubleEncoded extends Struct { readonly encoded: Bytes; } - /** @name XcmV2MultiassetMultiAssetFilter (329) */ + /** @name XcmV2MultiassetMultiAssetFilter (332) */ interface XcmV2MultiassetMultiAssetFilter extends Enum { readonly isDefinite: boolean; readonly asDefinite: XcmV2MultiassetMultiAssets; @@ -3981,7 +4008,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Definite" | "Wild"; } - /** @name XcmV2MultiassetWildMultiAsset (330) */ + /** @name XcmV2MultiassetWildMultiAsset (333) */ interface XcmV2MultiassetWildMultiAsset extends Enum { readonly isAll: boolean; readonly isAllOf: boolean; @@ -3992,14 +4019,14 @@ declare module "@polkadot/types/lookup" { readonly type: "All" | "AllOf"; } - /** @name XcmV2MultiassetWildFungibility (331) */ + /** @name XcmV2MultiassetWildFungibility (334) */ interface XcmV2MultiassetWildFungibility extends Enum { readonly isFungible: boolean; readonly isNonFungible: boolean; readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV2WeightLimit (332) */ + /** @name XcmV2WeightLimit (335) */ interface XcmV2WeightLimit extends Enum { readonly isUnlimited: boolean; readonly isLimited: boolean; @@ -4007,10 +4034,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Unlimited" | "Limited"; } - /** @name XcmV3Xcm (333) */ + /** @name XcmV3Xcm (336) */ interface XcmV3Xcm extends Vec {} - /** @name XcmV3Instruction (335) */ + /** @name XcmV3Instruction (338) */ interface XcmV3Instruction extends Enum { readonly isWithdrawAsset: boolean; readonly asWithdrawAsset: XcmV3MultiassetMultiAssets; @@ -4240,16 +4267,16 @@ declare module "@polkadot/types/lookup" { | "UnpaidExecution"; } - /** @name XcmV3MultiassetMultiAssets (336) */ + /** @name XcmV3MultiassetMultiAssets (339) */ interface XcmV3MultiassetMultiAssets extends Vec {} - /** @name XcmV3MultiAsset (338) */ + /** @name XcmV3MultiAsset (341) */ interface XcmV3MultiAsset extends Struct { readonly id: XcmV3MultiassetAssetId; readonly fun: XcmV3MultiassetFungibility; } - /** @name XcmV3MultiassetAssetId (339) */ + /** @name XcmV3MultiassetAssetId (342) */ interface XcmV3MultiassetAssetId extends Enum { readonly isConcrete: boolean; readonly asConcrete: StagingXcmV3MultiLocation; @@ -4258,7 +4285,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Concrete" | "Abstract"; } - /** @name XcmV3MultiassetFungibility (340) */ + /** @name XcmV3MultiassetFungibility (343) */ interface XcmV3MultiassetFungibility extends Enum { readonly isFungible: boolean; readonly asFungible: Compact; @@ -4267,7 +4294,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV3MultiassetAssetInstance (341) */ + /** @name XcmV3MultiassetAssetInstance (344) */ interface XcmV3MultiassetAssetInstance extends Enum { readonly isUndefined: boolean; readonly isIndex: boolean; @@ -4283,7 +4310,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Undefined" | "Index" | "Array4" | "Array8" | "Array16" | "Array32"; } - /** @name XcmV3Response (342) */ + /** @name XcmV3Response (345) */ interface XcmV3Response extends Enum { readonly isNull: boolean; readonly isAssets: boolean; @@ -4299,7 +4326,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Null" | "Assets" | "ExecutionResult" | "Version" | "PalletsInfo" | "DispatchResult"; } - /** @name XcmV3TraitsError (345) */ + /** @name XcmV3TraitsError (348) */ interface XcmV3TraitsError extends Enum { readonly isOverflow: boolean; readonly isUnimplemented: boolean; @@ -4386,7 +4413,7 @@ declare module "@polkadot/types/lookup" { | "ExceedsStackLimit"; } - /** @name XcmV3PalletInfo (347) */ + /** @name XcmV3PalletInfo (350) */ interface XcmV3PalletInfo extends Struct { readonly index: Compact; readonly name: Bytes; @@ -4396,7 +4423,7 @@ declare module "@polkadot/types/lookup" { readonly patch: Compact; } - /** @name XcmV3MaybeErrorCode (350) */ + /** @name XcmV3MaybeErrorCode (353) */ interface XcmV3MaybeErrorCode extends Enum { readonly isSuccess: boolean; readonly isError: boolean; @@ -4406,7 +4433,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Success" | "Error" | "TruncatedError"; } - /** @name XcmV3OriginKind (353) */ + /** @name XcmV3OriginKind (356) */ interface XcmV3OriginKind extends Enum { readonly isNative: boolean; readonly isSovereignAccount: boolean; @@ -4415,14 +4442,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Native" | "SovereignAccount" | "Superuser" | "Xcm"; } - /** @name XcmV3QueryResponseInfo (354) */ + /** @name XcmV3QueryResponseInfo (357) */ interface XcmV3QueryResponseInfo extends Struct { readonly destination: StagingXcmV3MultiLocation; readonly queryId: Compact; readonly maxWeight: SpWeightsWeightV2Weight; } - /** @name XcmV3MultiassetMultiAssetFilter (355) */ + /** @name XcmV3MultiassetMultiAssetFilter (358) */ interface XcmV3MultiassetMultiAssetFilter extends Enum { readonly isDefinite: boolean; readonly asDefinite: XcmV3MultiassetMultiAssets; @@ -4431,7 +4458,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Definite" | "Wild"; } - /** @name XcmV3MultiassetWildMultiAsset (356) */ + /** @name XcmV3MultiassetWildMultiAsset (359) */ interface XcmV3MultiassetWildMultiAsset extends Enum { readonly isAll: boolean; readonly isAllOf: boolean; @@ -4450,14 +4477,14 @@ declare module "@polkadot/types/lookup" { readonly type: "All" | "AllOf" | "AllCounted" | "AllOfCounted"; } - /** @name XcmV3MultiassetWildFungibility (357) */ + /** @name XcmV3MultiassetWildFungibility (360) */ interface XcmV3MultiassetWildFungibility extends Enum { readonly isFungible: boolean; readonly isNonFungible: boolean; readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV3WeightLimit (358) */ + /** @name XcmV3WeightLimit (361) */ interface XcmV3WeightLimit extends Enum { readonly isUnlimited: boolean; readonly isLimited: boolean; @@ -4465,10 +4492,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Unlimited" | "Limited"; } - /** @name StagingXcmV4Xcm (359) */ + /** @name StagingXcmV4Xcm (362) */ interface StagingXcmV4Xcm extends Vec {} - /** @name StagingXcmV4Instruction (361) */ + /** @name StagingXcmV4Instruction (364) */ interface StagingXcmV4Instruction extends Enum { readonly isWithdrawAsset: boolean; readonly asWithdrawAsset: StagingXcmV4AssetAssets; @@ -4698,19 +4725,19 @@ declare module "@polkadot/types/lookup" { | "UnpaidExecution"; } - /** @name StagingXcmV4AssetAssets (362) */ + /** @name StagingXcmV4AssetAssets (365) */ interface StagingXcmV4AssetAssets extends Vec {} - /** @name StagingXcmV4Asset (364) */ + /** @name StagingXcmV4Asset (367) */ interface StagingXcmV4Asset extends Struct { readonly id: StagingXcmV4AssetAssetId; readonly fun: StagingXcmV4AssetFungibility; } - /** @name StagingXcmV4AssetAssetId (365) */ + /** @name StagingXcmV4AssetAssetId (368) */ interface StagingXcmV4AssetAssetId extends StagingXcmV4Location {} - /** @name StagingXcmV4AssetFungibility (366) */ + /** @name StagingXcmV4AssetFungibility (369) */ interface StagingXcmV4AssetFungibility extends Enum { readonly isFungible: boolean; readonly asFungible: Compact; @@ -4719,7 +4746,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Fungible" | "NonFungible"; } - /** @name StagingXcmV4AssetAssetInstance (367) */ + /** @name StagingXcmV4AssetAssetInstance (370) */ interface StagingXcmV4AssetAssetInstance extends Enum { readonly isUndefined: boolean; readonly isIndex: boolean; @@ -4735,7 +4762,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Undefined" | "Index" | "Array4" | "Array8" | "Array16" | "Array32"; } - /** @name StagingXcmV4Response (368) */ + /** @name StagingXcmV4Response (371) */ interface StagingXcmV4Response extends Enum { readonly isNull: boolean; readonly isAssets: boolean; @@ -4751,7 +4778,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Null" | "Assets" | "ExecutionResult" | "Version" | "PalletsInfo" | "DispatchResult"; } - /** @name StagingXcmV4PalletInfo (370) */ + /** @name StagingXcmV4PalletInfo (373) */ interface StagingXcmV4PalletInfo extends Struct { readonly index: Compact; readonly name: Bytes; @@ -4761,14 +4788,14 @@ declare module "@polkadot/types/lookup" { readonly patch: Compact; } - /** @name StagingXcmV4QueryResponseInfo (374) */ + /** @name StagingXcmV4QueryResponseInfo (377) */ interface StagingXcmV4QueryResponseInfo extends Struct { readonly destination: StagingXcmV4Location; readonly queryId: Compact; readonly maxWeight: SpWeightsWeightV2Weight; } - /** @name StagingXcmV4AssetAssetFilter (375) */ + /** @name StagingXcmV4AssetAssetFilter (378) */ interface StagingXcmV4AssetAssetFilter extends Enum { readonly isDefinite: boolean; readonly asDefinite: StagingXcmV4AssetAssets; @@ -4777,7 +4804,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Definite" | "Wild"; } - /** @name StagingXcmV4AssetWildAsset (376) */ + /** @name StagingXcmV4AssetWildAsset (379) */ interface StagingXcmV4AssetWildAsset extends Enum { readonly isAll: boolean; readonly isAllOf: boolean; @@ -4796,14 +4823,14 @@ declare module "@polkadot/types/lookup" { readonly type: "All" | "AllOf" | "AllCounted" | "AllOfCounted"; } - /** @name StagingXcmV4AssetWildFungibility (377) */ + /** @name StagingXcmV4AssetWildFungibility (380) */ interface StagingXcmV4AssetWildFungibility extends Enum { readonly isFungible: boolean; readonly isNonFungible: boolean; readonly type: "Fungible" | "NonFungible"; } - /** @name XcmVersionedAssets (378) */ + /** @name XcmVersionedAssets (381) */ interface XcmVersionedAssets extends Enum { readonly isV2: boolean; readonly asV2: XcmV2MultiassetMultiAssets; @@ -4814,7 +4841,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name StagingXcmExecutorAssetTransferTransferType (390) */ + /** @name StagingXcmExecutorAssetTransferTransferType (393) */ interface StagingXcmExecutorAssetTransferTransferType extends Enum { readonly isTeleport: boolean; readonly isLocalReserve: boolean; @@ -4824,7 +4851,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Teleport" | "LocalReserve" | "DestinationReserve" | "RemoteReserve"; } - /** @name XcmVersionedAssetId (391) */ + /** @name XcmVersionedAssetId (394) */ interface XcmVersionedAssetId extends Enum { readonly isV3: boolean; readonly asV3: XcmV3MultiassetAssetId; @@ -4833,7 +4860,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V3" | "V4"; } - /** @name PalletMigrationsCall (392) */ + /** @name PalletMigrationsCall (395) */ interface PalletMigrationsCall extends Enum { readonly isForceSetCursor: boolean; readonly asForceSetCursor: { @@ -4853,7 +4880,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ForceSetCursor" | "ForceSetActiveCursor" | "ForceOnboardMbms" | "ClearHistoric"; } - /** @name PalletMigrationsMigrationCursor (394) */ + /** @name PalletMigrationsMigrationCursor (397) */ interface PalletMigrationsMigrationCursor extends Enum { readonly isActive: boolean; readonly asActive: PalletMigrationsActiveCursor; @@ -4861,14 +4888,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Active" | "Stuck"; } - /** @name PalletMigrationsActiveCursor (396) */ + /** @name PalletMigrationsActiveCursor (399) */ interface PalletMigrationsActiveCursor extends Struct { readonly index: u32; readonly innerCursor: Option; readonly startedAt: u32; } - /** @name PalletMigrationsHistoricCleanupSelector (398) */ + /** @name PalletMigrationsHistoricCleanupSelector (401) */ interface PalletMigrationsHistoricCleanupSelector extends Enum { readonly isSpecific: boolean; readonly asSpecific: Vec; @@ -4880,7 +4907,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Specific" | "Wildcard"; } - /** @name PalletBeefyCall (401) */ + /** @name PalletBeefyCall (404) */ interface PalletBeefyCall extends Enum { readonly isReportDoubleVoting: boolean; readonly asReportDoubleVoting: { @@ -4926,40 +4953,40 @@ declare module "@polkadot/types/lookup" { | "ReportFutureBlockVotingUnsigned"; } - /** @name SpConsensusBeefyDoubleVotingProof (402) */ + /** @name SpConsensusBeefyDoubleVotingProof (405) */ interface SpConsensusBeefyDoubleVotingProof extends Struct { readonly first: SpConsensusBeefyVoteMessage; readonly second: SpConsensusBeefyVoteMessage; } - /** @name SpConsensusBeefyEcdsaCryptoSignature (403) */ + /** @name SpConsensusBeefyEcdsaCryptoSignature (406) */ interface SpConsensusBeefyEcdsaCryptoSignature extends U8aFixed {} - /** @name SpConsensusBeefyVoteMessage (404) */ + /** @name SpConsensusBeefyVoteMessage (407) */ interface SpConsensusBeefyVoteMessage extends Struct { readonly commitment: SpConsensusBeefyCommitment; readonly id: SpConsensusBeefyEcdsaCryptoPublic; readonly signature: SpConsensusBeefyEcdsaCryptoSignature; } - /** @name SpConsensusBeefyCommitment (405) */ + /** @name SpConsensusBeefyCommitment (408) */ interface SpConsensusBeefyCommitment extends Struct { readonly payload: SpConsensusBeefyPayload; readonly blockNumber: u32; readonly validatorSetId: u64; } - /** @name SpConsensusBeefyPayload (406) */ + /** @name SpConsensusBeefyPayload (409) */ interface SpConsensusBeefyPayload extends Vec> {} - /** @name SpConsensusBeefyForkVotingProof (409) */ + /** @name SpConsensusBeefyForkVotingProof (412) */ interface SpConsensusBeefyForkVotingProof extends Struct { readonly vote: SpConsensusBeefyVoteMessage; readonly ancestryProof: SpMmrPrimitivesAncestryProof; readonly header: SpRuntimeHeader; } - /** @name SpMmrPrimitivesAncestryProof (410) */ + /** @name SpMmrPrimitivesAncestryProof (413) */ interface SpMmrPrimitivesAncestryProof extends Struct { readonly prevPeaks: Vec; readonly prevLeafCount: u64; @@ -4967,12 +4994,12 @@ declare module "@polkadot/types/lookup" { readonly items: Vec>; } - /** @name SpConsensusBeefyFutureBlockVotingProof (413) */ + /** @name SpConsensusBeefyFutureBlockVotingProof (416) */ interface SpConsensusBeefyFutureBlockVotingProof extends Struct { readonly vote: SpConsensusBeefyVoteMessage; } - /** @name SnowbridgePalletEthereumClientCall (414) */ + /** @name SnowbridgePalletEthereumClientCall (417) */ interface SnowbridgePalletEthereumClientCall extends Enum { readonly isForceCheckpoint: boolean; readonly asForceCheckpoint: { @@ -4989,7 +5016,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ForceCheckpoint" | "Submit" | "SetOperatingMode"; } - /** @name SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate (415) */ + /** @name SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate (418) */ interface SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate extends Struct { readonly header: SnowbridgeBeaconPrimitivesBeaconHeader; readonly currentSyncCommittee: SnowbridgeBeaconPrimitivesSyncCommittee; @@ -4999,7 +5026,7 @@ declare module "@polkadot/types/lookup" { readonly blockRootsBranch: Vec; } - /** @name SnowbridgeBeaconPrimitivesBeaconHeader (416) */ + /** @name SnowbridgeBeaconPrimitivesBeaconHeader (419) */ interface SnowbridgeBeaconPrimitivesBeaconHeader extends Struct { readonly slot: u64; readonly proposerIndex: u64; @@ -5008,16 +5035,16 @@ declare module "@polkadot/types/lookup" { readonly bodyRoot: H256; } - /** @name SnowbridgeBeaconPrimitivesSyncCommittee (417) */ + /** @name SnowbridgeBeaconPrimitivesSyncCommittee (420) */ interface SnowbridgeBeaconPrimitivesSyncCommittee extends Struct { readonly pubkeys: Vec; readonly aggregatePubkey: SnowbridgeBeaconPrimitivesPublicKey; } - /** @name SnowbridgeBeaconPrimitivesPublicKey (419) */ + /** @name SnowbridgeBeaconPrimitivesPublicKey (422) */ interface SnowbridgeBeaconPrimitivesPublicKey extends U8aFixed {} - /** @name SnowbridgeBeaconPrimitivesUpdatesUpdate (421) */ + /** @name SnowbridgeBeaconPrimitivesUpdatesUpdate (424) */ interface SnowbridgeBeaconPrimitivesUpdatesUpdate extends Struct { readonly attestedHeader: SnowbridgeBeaconPrimitivesBeaconHeader; readonly syncAggregate: SnowbridgeBeaconPrimitivesSyncAggregate; @@ -5029,29 +5056,29 @@ declare module "@polkadot/types/lookup" { readonly blockRootsBranch: Vec; } - /** @name SnowbridgeBeaconPrimitivesSyncAggregate (422) */ + /** @name SnowbridgeBeaconPrimitivesSyncAggregate (425) */ interface SnowbridgeBeaconPrimitivesSyncAggregate extends Struct { readonly syncCommitteeBits: U8aFixed; readonly syncCommitteeSignature: SnowbridgeBeaconPrimitivesSignature; } - /** @name SnowbridgeBeaconPrimitivesSignature (423) */ + /** @name SnowbridgeBeaconPrimitivesSignature (426) */ interface SnowbridgeBeaconPrimitivesSignature extends U8aFixed {} - /** @name SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate (426) */ + /** @name SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate (429) */ interface SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate extends Struct { readonly nextSyncCommittee: SnowbridgeBeaconPrimitivesSyncCommittee; readonly nextSyncCommitteeBranch: Vec; } - /** @name SnowbridgeCoreOperatingModeBasicOperatingMode (427) */ + /** @name SnowbridgeCoreOperatingModeBasicOperatingMode (430) */ interface SnowbridgeCoreOperatingModeBasicOperatingMode extends Enum { readonly isNormal: boolean; readonly isHalted: boolean; readonly type: "Normal" | "Halted"; } - /** @name PolkadotRuntimeCommonParasSudoWrapperPalletCall (428) */ + /** @name PolkadotRuntimeCommonParasSudoWrapperPalletCall (431) */ interface PolkadotRuntimeCommonParasSudoWrapperPalletCall extends Enum { readonly isSudoScheduleParaInitialize: boolean; readonly asSudoScheduleParaInitialize: { @@ -5091,14 +5118,14 @@ declare module "@polkadot/types/lookup" { | "SudoEstablishHrmpChannel"; } - /** @name PolkadotRuntimeParachainsParasParaGenesisArgs (429) */ + /** @name PolkadotRuntimeParachainsParasParaGenesisArgs (432) */ interface PolkadotRuntimeParachainsParasParaGenesisArgs extends Struct { readonly genesisHead: Bytes; readonly validationCode: Bytes; readonly paraKind: bool; } - /** @name PalletRootTestingCall (430) */ + /** @name PalletRootTestingCall (433) */ interface PalletRootTestingCall extends Enum { readonly isFillBlock: boolean; readonly asFillBlock: { @@ -5108,7 +5135,7 @@ declare module "@polkadot/types/lookup" { readonly type: "FillBlock" | "TriggerDefensive"; } - /** @name PalletSudoCall (431) */ + /** @name PalletSudoCall (434) */ interface PalletSudoCall extends Enum { readonly isSudo: boolean; readonly asSudo: { @@ -5132,17 +5159,17 @@ declare module "@polkadot/types/lookup" { readonly type: "Sudo" | "SudoUncheckedWeight" | "SetKey" | "SudoAs" | "RemoveKey"; } - /** @name SpRuntimeBlakeTwo256 (432) */ + /** @name SpRuntimeBlakeTwo256 (435) */ type SpRuntimeBlakeTwo256 = Null; - /** @name PalletConvictionVotingTally (434) */ + /** @name PalletConvictionVotingTally (437) */ interface PalletConvictionVotingTally extends Struct { readonly ayes: u128; readonly nays: u128; readonly support: u128; } - /** @name PalletRankedCollectiveEvent (435) */ + /** @name PalletRankedCollectiveEvent (438) */ interface PalletRankedCollectiveEvent extends Enum { readonly isMemberAdded: boolean; readonly asMemberAdded: { @@ -5173,7 +5200,7 @@ declare module "@polkadot/types/lookup" { readonly type: "MemberAdded" | "RankChanged" | "MemberRemoved" | "Voted" | "MemberExchanged"; } - /** @name PalletRankedCollectiveVoteRecord (436) */ + /** @name PalletRankedCollectiveVoteRecord (439) */ interface PalletRankedCollectiveVoteRecord extends Enum { readonly isAye: boolean; readonly asAye: u32; @@ -5182,14 +5209,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Aye" | "Nay"; } - /** @name PalletRankedCollectiveTally (437) */ + /** @name PalletRankedCollectiveTally (440) */ interface PalletRankedCollectiveTally extends Struct { readonly bareAyes: u32; readonly ayes: u32; readonly nays: u32; } - /** @name PalletWhitelistEvent (439) */ + /** @name PalletWhitelistEvent (442) */ interface PalletWhitelistEvent extends Enum { readonly isCallWhitelisted: boolean; readonly asCallWhitelisted: { @@ -5207,19 +5234,19 @@ declare module "@polkadot/types/lookup" { readonly type: "CallWhitelisted" | "WhitelistedCallRemoved" | "WhitelistedCallDispatched"; } - /** @name FrameSupportDispatchPostDispatchInfo (441) */ + /** @name FrameSupportDispatchPostDispatchInfo (444) */ interface FrameSupportDispatchPostDispatchInfo extends Struct { readonly actualWeight: Option; readonly paysFee: FrameSupportDispatchPays; } - /** @name SpRuntimeDispatchErrorWithPostInfo (443) */ + /** @name SpRuntimeDispatchErrorWithPostInfo (446) */ interface SpRuntimeDispatchErrorWithPostInfo extends Struct { readonly postInfo: FrameSupportDispatchPostDispatchInfo; readonly error: SpRuntimeDispatchError; } - /** @name PolkadotRuntimeParachainsInclusionPalletEvent (444) */ + /** @name PolkadotRuntimeParachainsInclusionPalletEvent (447) */ interface PolkadotRuntimeParachainsInclusionPalletEvent extends Enum { readonly isCandidateBacked: boolean; readonly asCandidateBacked: ITuple<[PolkadotPrimitivesV7CandidateReceipt, Bytes, u32, u32]>; @@ -5235,13 +5262,13 @@ declare module "@polkadot/types/lookup" { readonly type: "CandidateBacked" | "CandidateIncluded" | "CandidateTimedOut" | "UpwardMessagesReceived"; } - /** @name PolkadotPrimitivesV7CandidateReceipt (445) */ + /** @name PolkadotPrimitivesV7CandidateReceipt (448) */ interface PolkadotPrimitivesV7CandidateReceipt extends Struct { readonly descriptor: PolkadotPrimitivesV7CandidateDescriptor; readonly commitmentsHash: H256; } - /** @name PolkadotRuntimeParachainsParasPalletEvent (448) */ + /** @name PolkadotRuntimeParachainsParasPalletEvent (451) */ interface PolkadotRuntimeParachainsParasPalletEvent extends Enum { readonly isCurrentCodeUpdated: boolean; readonly asCurrentCodeUpdated: u32; @@ -5270,7 +5297,7 @@ declare module "@polkadot/types/lookup" { | "PvfCheckRejected"; } - /** @name PolkadotRuntimeParachainsHrmpPalletEvent (449) */ + /** @name PolkadotRuntimeParachainsHrmpPalletEvent (452) */ interface PolkadotRuntimeParachainsHrmpPalletEvent extends Enum { readonly isOpenChannelRequested: boolean; readonly asOpenChannelRequested: { @@ -5323,7 +5350,7 @@ declare module "@polkadot/types/lookup" { | "OpenChannelDepositsUpdated"; } - /** @name PolkadotRuntimeParachainsDisputesPalletEvent (450) */ + /** @name PolkadotRuntimeParachainsDisputesPalletEvent (453) */ interface PolkadotRuntimeParachainsDisputesPalletEvent extends Enum { readonly isDisputeInitiated: boolean; readonly asDisputeInitiated: ITuple<[H256, PolkadotRuntimeParachainsDisputesDisputeLocation]>; @@ -5334,21 +5361,21 @@ declare module "@polkadot/types/lookup" { readonly type: "DisputeInitiated" | "DisputeConcluded" | "Revert"; } - /** @name PolkadotRuntimeParachainsDisputesDisputeLocation (451) */ + /** @name PolkadotRuntimeParachainsDisputesDisputeLocation (454) */ interface PolkadotRuntimeParachainsDisputesDisputeLocation extends Enum { readonly isLocal: boolean; readonly isRemote: boolean; readonly type: "Local" | "Remote"; } - /** @name PolkadotRuntimeParachainsDisputesDisputeResult (452) */ + /** @name PolkadotRuntimeParachainsDisputesDisputeResult (455) */ interface PolkadotRuntimeParachainsDisputesDisputeResult extends Enum { readonly isValid: boolean; readonly isInvalid: boolean; readonly type: "Valid" | "Invalid"; } - /** @name PalletMessageQueueEvent (453) */ + /** @name PalletMessageQueueEvent (456) */ interface PalletMessageQueueEvent extends Enum { readonly isProcessingFailed: boolean; readonly asProcessingFailed: { @@ -5378,7 +5405,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ProcessingFailed" | "Processed" | "OverweightEnqueued" | "PageReaped"; } - /** @name FrameSupportMessagesProcessMessageError (454) */ + /** @name FrameSupportMessagesProcessMessageError (457) */ interface FrameSupportMessagesProcessMessageError extends Enum { readonly isBadFormat: boolean; readonly isCorrupt: boolean; @@ -5390,7 +5417,7 @@ declare module "@polkadot/types/lookup" { readonly type: "BadFormat" | "Corrupt" | "Unsupported" | "Overweight" | "Yield" | "StackLimitReached"; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletEvent (455) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletEvent (458) */ interface PolkadotRuntimeParachainsAssignerOnDemandPalletEvent extends Enum { readonly isOnDemandOrderPlaced: boolean; readonly asOnDemandOrderPlaced: { @@ -5405,7 +5432,7 @@ declare module "@polkadot/types/lookup" { readonly type: "OnDemandOrderPlaced" | "SpotPriceSet"; } - /** @name PolkadotRuntimeCommonParasRegistrarPalletEvent (456) */ + /** @name PolkadotRuntimeCommonParasRegistrarPalletEvent (459) */ interface PolkadotRuntimeCommonParasRegistrarPalletEvent extends Enum { readonly isRegistered: boolean; readonly asRegistered: { @@ -5429,7 +5456,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Registered" | "Deregistered" | "Reserved" | "Swapped"; } - /** @name PalletUtilityEvent (457) */ + /** @name PalletUtilityEvent (460) */ interface PalletUtilityEvent extends Enum { readonly isBatchInterrupted: boolean; readonly asBatchInterrupted: { @@ -5456,7 +5483,7 @@ declare module "@polkadot/types/lookup" { | "DispatchedAs"; } - /** @name PalletIdentityEvent (459) */ + /** @name PalletIdentityEvent (462) */ interface PalletIdentityEvent extends Enum { readonly isIdentitySet: boolean; readonly asIdentitySet: { @@ -5562,7 +5589,7 @@ declare module "@polkadot/types/lookup" { | "DanglingUsernameRemoved"; } - /** @name PalletSchedulerEvent (460) */ + /** @name PalletSchedulerEvent (463) */ interface PalletSchedulerEvent extends Enum { readonly isScheduled: boolean; readonly asScheduled: { @@ -5624,7 +5651,7 @@ declare module "@polkadot/types/lookup" { | "PermanentlyOverweight"; } - /** @name PalletProxyEvent (462) */ + /** @name PalletProxyEvent (465) */ interface PalletProxyEvent extends Enum { readonly isProxyExecuted: boolean; readonly asProxyExecuted: { @@ -5660,7 +5687,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ProxyExecuted" | "PureCreated" | "Announced" | "ProxyAdded" | "ProxyRemoved"; } - /** @name PalletMultisigEvent (463) */ + /** @name PalletMultisigEvent (466) */ interface PalletMultisigEvent extends Enum { readonly isNewMultisig: boolean; readonly asNewMultisig: { @@ -5693,7 +5720,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NewMultisig" | "MultisigApproval" | "MultisigExecuted" | "MultisigCancelled"; } - /** @name PalletPreimageEvent (464) */ + /** @name PalletPreimageEvent (467) */ interface PalletPreimageEvent extends Enum { readonly isNoted: boolean; readonly asNoted: { @@ -5710,7 +5737,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Noted" | "Requested" | "Cleared"; } - /** @name PalletAssetRateEvent (465) */ + /** @name PalletAssetRateEvent (468) */ interface PalletAssetRateEvent extends Enum { readonly isAssetRateCreated: boolean; readonly asAssetRateCreated: { @@ -5730,7 +5757,7 @@ declare module "@polkadot/types/lookup" { readonly type: "AssetRateCreated" | "AssetRateRemoved" | "AssetRateUpdated"; } - /** @name PalletXcmEvent (466) */ + /** @name PalletXcmEvent (469) */ interface PalletXcmEvent extends Enum { readonly isAttempted: boolean; readonly asAttempted: { @@ -5895,7 +5922,7 @@ declare module "@polkadot/types/lookup" { | "VersionMigrationFinished"; } - /** @name StagingXcmV4TraitsOutcome (467) */ + /** @name StagingXcmV4TraitsOutcome (470) */ interface StagingXcmV4TraitsOutcome extends Enum { readonly isComplete: boolean; readonly asComplete: { @@ -5913,7 +5940,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Complete" | "Incomplete" | "Error"; } - /** @name PalletMigrationsEvent (468) */ + /** @name PalletMigrationsEvent (471) */ interface PalletMigrationsEvent extends Enum { readonly isRuntimeUpgradeStarted: boolean; readonly isRuntimeUpgradeCompleted: boolean; @@ -5946,7 +5973,7 @@ declare module "@polkadot/types/lookup" { | "FailedToResumeIdleXcmExecution"; } - /** @name SnowbridgePalletEthereumClientEvent (470) */ + /** @name SnowbridgePalletEthereumClientEvent (473) */ interface SnowbridgePalletEthereumClientEvent extends Enum { readonly isBeaconHeaderImported: boolean; readonly asBeaconHeaderImported: { @@ -5964,13 +5991,13 @@ declare module "@polkadot/types/lookup" { readonly type: "BeaconHeaderImported" | "SyncCommitteeUpdated" | "OperatingModeChanged"; } - /** @name PalletRootTestingEvent (471) */ + /** @name PalletRootTestingEvent (474) */ interface PalletRootTestingEvent extends Enum { readonly isDefensiveTestCall: boolean; readonly type: "DefensiveTestCall"; } - /** @name PalletSudoEvent (472) */ + /** @name PalletSudoEvent (475) */ interface PalletSudoEvent extends Enum { readonly isSudid: boolean; readonly asSudid: { @@ -5989,7 +6016,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Sudid" | "KeyChanged" | "KeyRemoved" | "SudoAsDone"; } - /** @name FrameSystemPhase (473) */ + /** @name FrameSystemPhase (476) */ interface FrameSystemPhase extends Enum { readonly isApplyExtrinsic: boolean; readonly asApplyExtrinsic: u32; @@ -5998,33 +6025,33 @@ declare module "@polkadot/types/lookup" { readonly type: "ApplyExtrinsic" | "Finalization" | "Initialization"; } - /** @name FrameSystemLastRuntimeUpgradeInfo (475) */ + /** @name FrameSystemLastRuntimeUpgradeInfo (478) */ interface FrameSystemLastRuntimeUpgradeInfo extends Struct { readonly specVersion: Compact; readonly specName: Text; } - /** @name FrameSystemCodeUpgradeAuthorization (477) */ + /** @name FrameSystemCodeUpgradeAuthorization (480) */ interface FrameSystemCodeUpgradeAuthorization extends Struct { readonly codeHash: H256; readonly checkVersion: bool; } - /** @name FrameSystemLimitsBlockWeights (478) */ + /** @name FrameSystemLimitsBlockWeights (481) */ interface FrameSystemLimitsBlockWeights extends Struct { readonly baseBlock: SpWeightsWeightV2Weight; readonly maxBlock: SpWeightsWeightV2Weight; readonly perClass: FrameSupportDispatchPerDispatchClassWeightsPerClass; } - /** @name FrameSupportDispatchPerDispatchClassWeightsPerClass (479) */ + /** @name FrameSupportDispatchPerDispatchClassWeightsPerClass (482) */ interface FrameSupportDispatchPerDispatchClassWeightsPerClass extends Struct { readonly normal: FrameSystemLimitsWeightsPerClass; readonly operational: FrameSystemLimitsWeightsPerClass; readonly mandatory: FrameSystemLimitsWeightsPerClass; } - /** @name FrameSystemLimitsWeightsPerClass (480) */ + /** @name FrameSystemLimitsWeightsPerClass (483) */ interface FrameSystemLimitsWeightsPerClass extends Struct { readonly baseExtrinsic: SpWeightsWeightV2Weight; readonly maxExtrinsic: Option; @@ -6032,25 +6059,25 @@ declare module "@polkadot/types/lookup" { readonly reserved: Option; } - /** @name FrameSystemLimitsBlockLength (481) */ + /** @name FrameSystemLimitsBlockLength (484) */ interface FrameSystemLimitsBlockLength extends Struct { readonly max: FrameSupportDispatchPerDispatchClassU32; } - /** @name FrameSupportDispatchPerDispatchClassU32 (482) */ + /** @name FrameSupportDispatchPerDispatchClassU32 (485) */ interface FrameSupportDispatchPerDispatchClassU32 extends Struct { readonly normal: u32; readonly operational: u32; readonly mandatory: u32; } - /** @name SpWeightsRuntimeDbWeight (483) */ + /** @name SpWeightsRuntimeDbWeight (486) */ interface SpWeightsRuntimeDbWeight extends Struct { readonly read: u64; readonly write: u64; } - /** @name SpVersionRuntimeVersion (484) */ + /** @name SpVersionRuntimeVersion (487) */ interface SpVersionRuntimeVersion extends Struct { readonly specName: Text; readonly implName: Text; @@ -6062,7 +6089,7 @@ declare module "@polkadot/types/lookup" { readonly stateVersion: u8; } - /** @name FrameSystemError (488) */ + /** @name FrameSystemError (491) */ interface FrameSystemError extends Enum { readonly isInvalidSpecName: boolean; readonly isSpecVersionNeedsToIncrease: boolean; @@ -6085,7 +6112,7 @@ declare module "@polkadot/types/lookup" { | "Unauthorized"; } - /** @name SpConsensusBabeDigestsPreDigest (495) */ + /** @name SpConsensusBabeDigestsPreDigest (498) */ interface SpConsensusBabeDigestsPreDigest extends Enum { readonly isPrimary: boolean; readonly asPrimary: SpConsensusBabeDigestsPrimaryPreDigest; @@ -6096,39 +6123,39 @@ declare module "@polkadot/types/lookup" { readonly type: "Primary" | "SecondaryPlain" | "SecondaryVRF"; } - /** @name SpConsensusBabeDigestsPrimaryPreDigest (496) */ + /** @name SpConsensusBabeDigestsPrimaryPreDigest (499) */ interface SpConsensusBabeDigestsPrimaryPreDigest extends Struct { readonly authorityIndex: u32; readonly slot: u64; readonly vrfSignature: SpCoreSr25519VrfVrfSignature; } - /** @name SpCoreSr25519VrfVrfSignature (497) */ + /** @name SpCoreSr25519VrfVrfSignature (500) */ interface SpCoreSr25519VrfVrfSignature extends Struct { readonly preOutput: U8aFixed; readonly proof: U8aFixed; } - /** @name SpConsensusBabeDigestsSecondaryPlainPreDigest (498) */ + /** @name SpConsensusBabeDigestsSecondaryPlainPreDigest (501) */ interface SpConsensusBabeDigestsSecondaryPlainPreDigest extends Struct { readonly authorityIndex: u32; readonly slot: u64; } - /** @name SpConsensusBabeDigestsSecondaryVRFPreDigest (499) */ + /** @name SpConsensusBabeDigestsSecondaryVRFPreDigest (502) */ interface SpConsensusBabeDigestsSecondaryVRFPreDigest extends Struct { readonly authorityIndex: u32; readonly slot: u64; readonly vrfSignature: SpCoreSr25519VrfVrfSignature; } - /** @name SpConsensusBabeBabeEpochConfiguration (500) */ + /** @name SpConsensusBabeBabeEpochConfiguration (503) */ interface SpConsensusBabeBabeEpochConfiguration extends Struct { readonly c: ITuple<[u64, u64]>; readonly allowedSlots: SpConsensusBabeAllowedSlots; } - /** @name PalletBabeError (504) */ + /** @name PalletBabeError (507) */ interface PalletBabeError extends Enum { readonly isInvalidEquivocationProof: boolean; readonly isInvalidKeyOwnershipProof: boolean; @@ -6141,14 +6168,14 @@ declare module "@polkadot/types/lookup" { | "InvalidConfiguration"; } - /** @name PalletBalancesBalanceLock (506) */ + /** @name PalletBalancesBalanceLock (509) */ interface PalletBalancesBalanceLock extends Struct { readonly id: U8aFixed; readonly amount: u128; readonly reasons: PalletBalancesReasons; } - /** @name PalletBalancesReasons (507) */ + /** @name PalletBalancesReasons (510) */ interface PalletBalancesReasons extends Enum { readonly isFee: boolean; readonly isMisc: boolean; @@ -6156,13 +6183,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Fee" | "Misc" | "All"; } - /** @name PalletBalancesReserveData (510) */ + /** @name PalletBalancesReserveData (513) */ interface PalletBalancesReserveData extends Struct { readonly id: U8aFixed; readonly amount: u128; } - /** @name DancelightRuntimeRuntimeHoldReason (514) */ + /** @name DancelightRuntimeRuntimeHoldReason (517) */ interface DancelightRuntimeRuntimeHoldReason extends Enum { readonly isContainerRegistrar: boolean; readonly asContainerRegistrar: PalletRegistrarHoldReason; @@ -6173,31 +6200,31 @@ declare module "@polkadot/types/lookup" { readonly type: "ContainerRegistrar" | "DataPreservers" | "Preimage"; } - /** @name PalletRegistrarHoldReason (515) */ + /** @name PalletRegistrarHoldReason (518) */ interface PalletRegistrarHoldReason extends Enum { readonly isRegistrarDeposit: boolean; readonly type: "RegistrarDeposit"; } - /** @name PalletDataPreserversHoldReason (516) */ + /** @name PalletDataPreserversHoldReason (519) */ interface PalletDataPreserversHoldReason extends Enum { readonly isProfileDeposit: boolean; readonly type: "ProfileDeposit"; } - /** @name PalletPreimageHoldReason (517) */ + /** @name PalletPreimageHoldReason (520) */ interface PalletPreimageHoldReason extends Enum { readonly isPreimage: boolean; readonly type: "Preimage"; } - /** @name FrameSupportTokensMiscIdAmount (520) */ + /** @name FrameSupportTokensMiscIdAmount (523) */ interface FrameSupportTokensMiscIdAmount extends Struct { readonly id: Null; readonly amount: u128; } - /** @name PalletBalancesError (522) */ + /** @name PalletBalancesError (525) */ interface PalletBalancesError extends Enum { readonly isVestingBalance: boolean; readonly isLiquidityRestrictions: boolean; @@ -6226,26 +6253,26 @@ declare module "@polkadot/types/lookup" { | "DeltaZero"; } - /** @name PalletTransactionPaymentReleases (523) */ + /** @name PalletTransactionPaymentReleases (526) */ interface PalletTransactionPaymentReleases extends Enum { readonly isV1Ancient: boolean; readonly isV2: boolean; readonly type: "V1Ancient" | "V2"; } - /** @name SpStakingOffenceOffenceDetails (524) */ + /** @name SpStakingOffenceOffenceDetails (527) */ interface SpStakingOffenceOffenceDetails extends Struct { readonly offender: ITuple<[AccountId32, Null]>; readonly reporters: Vec; } - /** @name PalletRegistrarDepositInfo (536) */ + /** @name PalletRegistrarDepositInfo (539) */ interface PalletRegistrarDepositInfo extends Struct { readonly creator: AccountId32; readonly deposit: u128; } - /** @name PalletRegistrarError (537) */ + /** @name PalletRegistrarError (540) */ interface PalletRegistrarError extends Enum { readonly isParaIdAlreadyRegistered: boolean; readonly isParaIdNotRegistered: boolean; @@ -6284,7 +6311,7 @@ declare module "@polkadot/types/lookup" { | "WasmCodeNecessary"; } - /** @name PalletConfigurationHostConfiguration (538) */ + /** @name PalletConfigurationHostConfiguration (541) */ interface PalletConfigurationHostConfiguration extends Struct { readonly maxCollators: u32; readonly minOrchestratorCollators: u32; @@ -6297,13 +6324,13 @@ declare module "@polkadot/types/lookup" { readonly maxParachainCoresPercentage: Option; } - /** @name PalletConfigurationError (541) */ + /** @name PalletConfigurationError (544) */ interface PalletConfigurationError extends Enum { readonly isInvalidNewValue: boolean; readonly type: "InvalidNewValue"; } - /** @name PalletInvulnerablesError (543) */ + /** @name PalletInvulnerablesError (546) */ interface PalletInvulnerablesError extends Enum { readonly isTooManyInvulnerables: boolean; readonly isAlreadyInvulnerable: boolean; @@ -6318,26 +6345,26 @@ declare module "@polkadot/types/lookup" { | "UnableToDeriveCollatorId"; } - /** @name DpCollatorAssignmentAssignedCollatorsAccountId32 (544) */ + /** @name DpCollatorAssignmentAssignedCollatorsAccountId32 (547) */ interface DpCollatorAssignmentAssignedCollatorsAccountId32 extends Struct { readonly orchestratorChain: Vec; readonly containerChains: BTreeMap>; } - /** @name DpCollatorAssignmentAssignedCollatorsPublic (549) */ + /** @name DpCollatorAssignmentAssignedCollatorsPublic (552) */ interface DpCollatorAssignmentAssignedCollatorsPublic extends Struct { readonly orchestratorChain: Vec; readonly containerChains: BTreeMap>; } - /** @name TpTraitsContainerChainBlockInfo (557) */ + /** @name TpTraitsContainerChainBlockInfo (560) */ interface TpTraitsContainerChainBlockInfo extends Struct { readonly blockNumber: u32; readonly author: AccountId32; readonly latestSlotNumber: u64; } - /** @name PalletAuthorNotingError (558) */ + /** @name PalletAuthorNotingError (561) */ interface PalletAuthorNotingError extends Enum { readonly isFailedReading: boolean; readonly isFailedDecodingHeader: boolean; @@ -6356,7 +6383,7 @@ declare module "@polkadot/types/lookup" { | "NonAuraDigest"; } - /** @name PalletServicesPaymentError (559) */ + /** @name PalletServicesPaymentError (562) */ interface PalletServicesPaymentError extends Enum { readonly isInsufficientFundsToPurchaseCredits: boolean; readonly isInsufficientCredits: boolean; @@ -6364,7 +6391,7 @@ declare module "@polkadot/types/lookup" { readonly type: "InsufficientFundsToPurchaseCredits" | "InsufficientCredits" | "CreditPriceTooExpensive"; } - /** @name PalletDataPreserversRegisteredProfile (560) */ + /** @name PalletDataPreserversRegisteredProfile (563) */ interface PalletDataPreserversRegisteredProfile extends Struct { readonly account: AccountId32; readonly deposit: u128; @@ -6372,7 +6399,7 @@ declare module "@polkadot/types/lookup" { readonly assignment: Option>; } - /** @name PalletDataPreserversError (566) */ + /** @name PalletDataPreserversError (569) */ interface PalletDataPreserversError extends Enum { readonly isNoBootNodes: boolean; readonly isUnknownProfileId: boolean; @@ -6397,13 +6424,13 @@ declare module "@polkadot/types/lookup" { | "CantDeleteAssignedProfile"; } - /** @name TpTraitsActiveEraInfo (569) */ + /** @name TpTraitsActiveEraInfo (572) */ interface TpTraitsActiveEraInfo extends Struct { readonly index: u32; readonly start: Option; } - /** @name PalletExternalValidatorsError (571) */ + /** @name PalletExternalValidatorsError (574) */ interface PalletExternalValidatorsError extends Enum { readonly isTooManyInvulnerables: boolean; readonly isAlreadyInvulnerable: boolean; @@ -6418,10 +6445,38 @@ declare module "@polkadot/types/lookup" { | "UnableToDeriveCollatorId"; } - /** @name SpCoreCryptoKeyTypeId (576) */ + /** @name PalletExternalValidatorSlashesSlash (577) */ + interface PalletExternalValidatorSlashesSlash extends Struct { + readonly validator: AccountId32; + readonly reporters: Vec; + readonly slashId: u32; + readonly percentage: Perbill; + readonly confirmed: bool; + } + + /** @name PalletExternalValidatorSlashesError (578) */ + interface PalletExternalValidatorSlashesError extends Enum { + readonly isEmptyTargets: boolean; + readonly isInvalidSlashIndex: boolean; + readonly isNotSortedAndUnique: boolean; + readonly isProvidedFutureEra: boolean; + readonly isProvidedNonSlashableEra: boolean; + readonly isActiveEraNotSet: boolean; + readonly isDeferPeriodIsOver: boolean; + readonly type: + | "EmptyTargets" + | "InvalidSlashIndex" + | "NotSortedAndUnique" + | "ProvidedFutureEra" + | "ProvidedNonSlashableEra" + | "ActiveEraNotSet" + | "DeferPeriodIsOver"; + } + + /** @name SpCoreCryptoKeyTypeId (582) */ interface SpCoreCryptoKeyTypeId extends U8aFixed {} - /** @name PalletSessionError (577) */ + /** @name PalletSessionError (583) */ interface PalletSessionError extends Enum { readonly isInvalidProof: boolean; readonly isNoAssociatedValidatorId: boolean; @@ -6431,7 +6486,7 @@ declare module "@polkadot/types/lookup" { readonly type: "InvalidProof" | "NoAssociatedValidatorId" | "DuplicatedKey" | "NoKeys" | "NoAccount"; } - /** @name PalletGrandpaStoredState (578) */ + /** @name PalletGrandpaStoredState (584) */ interface PalletGrandpaStoredState extends Enum { readonly isLive: boolean; readonly isPendingPause: boolean; @@ -6448,7 +6503,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Live" | "PendingPause" | "Paused" | "PendingResume"; } - /** @name PalletGrandpaStoredPendingChange (579) */ + /** @name PalletGrandpaStoredPendingChange (585) */ interface PalletGrandpaStoredPendingChange extends Struct { readonly scheduledAt: u32; readonly delay: u32; @@ -6456,7 +6511,7 @@ declare module "@polkadot/types/lookup" { readonly forced: Option; } - /** @name PalletGrandpaError (581) */ + /** @name PalletGrandpaError (587) */ interface PalletGrandpaError extends Enum { readonly isPauseFailed: boolean; readonly isResumeFailed: boolean; @@ -6475,13 +6530,13 @@ declare module "@polkadot/types/lookup" { | "DuplicateOffenceReport"; } - /** @name PalletInflationRewardsChainsToRewardValue (584) */ + /** @name PalletInflationRewardsChainsToRewardValue (590) */ interface PalletInflationRewardsChainsToRewardValue extends Struct { readonly paraIds: Vec; readonly rewardsPerChain: u128; } - /** @name PalletTreasuryProposal (585) */ + /** @name PalletTreasuryProposal (591) */ interface PalletTreasuryProposal extends Struct { readonly proposer: AccountId32; readonly value: u128; @@ -6489,7 +6544,7 @@ declare module "@polkadot/types/lookup" { readonly bond: u128; } - /** @name PalletTreasurySpendStatus (587) */ + /** @name PalletTreasurySpendStatus (593) */ interface PalletTreasurySpendStatus extends Struct { readonly assetKind: Null; readonly amount: u128; @@ -6499,7 +6554,7 @@ declare module "@polkadot/types/lookup" { readonly status: PalletTreasuryPaymentState; } - /** @name PalletTreasuryPaymentState (588) */ + /** @name PalletTreasuryPaymentState (594) */ interface PalletTreasuryPaymentState extends Enum { readonly isPending: boolean; readonly isAttempted: boolean; @@ -6510,10 +6565,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Pending" | "Attempted" | "Failed"; } - /** @name FrameSupportPalletId (590) */ + /** @name FrameSupportPalletId (596) */ interface FrameSupportPalletId extends U8aFixed {} - /** @name PalletTreasuryError (591) */ + /** @name PalletTreasuryError (597) */ interface PalletTreasuryError extends Enum { readonly isInvalidIndex: boolean; readonly isTooManyApprovals: boolean; @@ -6540,7 +6595,7 @@ declare module "@polkadot/types/lookup" { | "Inconclusive"; } - /** @name PalletConvictionVotingVoteVoting (593) */ + /** @name PalletConvictionVotingVoteVoting (599) */ interface PalletConvictionVotingVoteVoting extends Enum { readonly isCasting: boolean; readonly asCasting: PalletConvictionVotingVoteCasting; @@ -6549,23 +6604,23 @@ declare module "@polkadot/types/lookup" { readonly type: "Casting" | "Delegating"; } - /** @name PalletConvictionVotingVoteCasting (594) */ + /** @name PalletConvictionVotingVoteCasting (600) */ interface PalletConvictionVotingVoteCasting extends Struct { readonly votes: Vec>; readonly delegations: PalletConvictionVotingDelegations; readonly prior: PalletConvictionVotingVotePriorLock; } - /** @name PalletConvictionVotingDelegations (598) */ + /** @name PalletConvictionVotingDelegations (604) */ interface PalletConvictionVotingDelegations extends Struct { readonly votes: u128; readonly capital: u128; } - /** @name PalletConvictionVotingVotePriorLock (599) */ + /** @name PalletConvictionVotingVotePriorLock (605) */ interface PalletConvictionVotingVotePriorLock extends ITuple<[u32, u128]> {} - /** @name PalletConvictionVotingVoteDelegating (600) */ + /** @name PalletConvictionVotingVoteDelegating (606) */ interface PalletConvictionVotingVoteDelegating extends Struct { readonly balance: u128; readonly target: AccountId32; @@ -6574,7 +6629,7 @@ declare module "@polkadot/types/lookup" { readonly prior: PalletConvictionVotingVotePriorLock; } - /** @name PalletConvictionVotingError (604) */ + /** @name PalletConvictionVotingError (610) */ interface PalletConvictionVotingError extends Enum { readonly isNotOngoing: boolean; readonly isNotVoter: boolean; @@ -6603,7 +6658,7 @@ declare module "@polkadot/types/lookup" { | "BadClass"; } - /** @name PalletReferendaReferendumInfoConvictionVotingTally (605) */ + /** @name PalletReferendaReferendumInfoConvictionVotingTally (611) */ interface PalletReferendaReferendumInfoConvictionVotingTally extends Enum { readonly isOngoing: boolean; readonly asOngoing: PalletReferendaReferendumStatusConvictionVotingTally; @@ -6620,7 +6675,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Ongoing" | "Approved" | "Rejected" | "Cancelled" | "TimedOut" | "Killed"; } - /** @name PalletReferendaReferendumStatusConvictionVotingTally (606) */ + /** @name PalletReferendaReferendumStatusConvictionVotingTally (612) */ interface PalletReferendaReferendumStatusConvictionVotingTally extends Struct { readonly track: u16; readonly origin: DancelightRuntimeOriginCaller; @@ -6635,19 +6690,19 @@ declare module "@polkadot/types/lookup" { readonly alarm: Option]>>; } - /** @name PalletReferendaDeposit (607) */ + /** @name PalletReferendaDeposit (613) */ interface PalletReferendaDeposit extends Struct { readonly who: AccountId32; readonly amount: u128; } - /** @name PalletReferendaDecidingStatus (610) */ + /** @name PalletReferendaDecidingStatus (616) */ interface PalletReferendaDecidingStatus extends Struct { readonly since: u32; readonly confirming: Option; } - /** @name PalletReferendaTrackInfo (618) */ + /** @name PalletReferendaTrackInfo (624) */ interface PalletReferendaTrackInfo extends Struct { readonly name: Text; readonly maxDeciding: u32; @@ -6660,7 +6715,7 @@ declare module "@polkadot/types/lookup" { readonly minSupport: PalletReferendaCurve; } - /** @name PalletReferendaCurve (619) */ + /** @name PalletReferendaCurve (625) */ interface PalletReferendaCurve extends Enum { readonly isLinearDecreasing: boolean; readonly asLinearDecreasing: { @@ -6684,7 +6739,7 @@ declare module "@polkadot/types/lookup" { readonly type: "LinearDecreasing" | "SteppedDecreasing" | "Reciprocal"; } - /** @name PalletReferendaError (622) */ + /** @name PalletReferendaError (628) */ interface PalletReferendaError extends Enum { readonly isNotOngoing: boolean; readonly isHasDeposit: boolean; @@ -6717,12 +6772,12 @@ declare module "@polkadot/types/lookup" { | "PreimageStoredWithDifferentLength"; } - /** @name PalletRankedCollectiveMemberRecord (623) */ + /** @name PalletRankedCollectiveMemberRecord (629) */ interface PalletRankedCollectiveMemberRecord extends Struct { readonly rank: u16; } - /** @name PalletRankedCollectiveError (628) */ + /** @name PalletRankedCollectiveError (633) */ interface PalletRankedCollectiveError extends Enum { readonly isAlreadyMember: boolean; readonly isNotMember: boolean; @@ -6749,7 +6804,7 @@ declare module "@polkadot/types/lookup" { | "TooManyMembers"; } - /** @name PalletReferendaReferendumInfoRankedCollectiveTally (629) */ + /** @name PalletReferendaReferendumInfoRankedCollectiveTally (634) */ interface PalletReferendaReferendumInfoRankedCollectiveTally extends Enum { readonly isOngoing: boolean; readonly asOngoing: PalletReferendaReferendumStatusRankedCollectiveTally; @@ -6766,7 +6821,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Ongoing" | "Approved" | "Rejected" | "Cancelled" | "TimedOut" | "Killed"; } - /** @name PalletReferendaReferendumStatusRankedCollectiveTally (630) */ + /** @name PalletReferendaReferendumStatusRankedCollectiveTally (635) */ interface PalletReferendaReferendumStatusRankedCollectiveTally extends Struct { readonly track: u16; readonly origin: DancelightRuntimeOriginCaller; @@ -6781,7 +6836,7 @@ declare module "@polkadot/types/lookup" { readonly alarm: Option]>>; } - /** @name PalletWhitelistError (633) */ + /** @name PalletWhitelistError (638) */ interface PalletWhitelistError extends Enum { readonly isUnavailablePreImage: boolean; readonly isUndecodableCall: boolean; @@ -6796,7 +6851,7 @@ declare module "@polkadot/types/lookup" { | "CallAlreadyWhitelisted"; } - /** @name PolkadotRuntimeParachainsConfigurationHostConfiguration (634) */ + /** @name PolkadotRuntimeParachainsConfigurationHostConfiguration (639) */ interface PolkadotRuntimeParachainsConfigurationHostConfiguration extends Struct { readonly maxCodeSize: u32; readonly maxHeadDataSize: u32; @@ -6835,19 +6890,19 @@ declare module "@polkadot/types/lookup" { readonly schedulerParams: PolkadotPrimitivesVstagingSchedulerParams; } - /** @name PolkadotRuntimeParachainsConfigurationPalletError (637) */ + /** @name PolkadotRuntimeParachainsConfigurationPalletError (642) */ interface PolkadotRuntimeParachainsConfigurationPalletError extends Enum { readonly isInvalidNewValue: boolean; readonly type: "InvalidNewValue"; } - /** @name PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker (640) */ + /** @name PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker (645) */ interface PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker extends Struct { readonly buffer: Vec>; readonly latestNumber: u32; } - /** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (644) */ + /** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (649) */ interface PolkadotRuntimeParachainsInclusionCandidatePendingAvailability extends Struct { readonly core: u32; readonly hash_: H256; @@ -6860,7 +6915,7 @@ declare module "@polkadot/types/lookup" { readonly backingGroup: u32; } - /** @name PolkadotRuntimeParachainsInclusionPalletError (645) */ + /** @name PolkadotRuntimeParachainsInclusionPalletError (650) */ interface PolkadotRuntimeParachainsInclusionPalletError extends Enum { readonly isValidatorIndexOutOfBounds: boolean; readonly isUnscheduledCandidate: boolean; @@ -6901,7 +6956,7 @@ declare module "@polkadot/types/lookup" { | "ParaHeadMismatch"; } - /** @name PolkadotPrimitivesV7ScrapedOnChainVotes (646) */ + /** @name PolkadotPrimitivesV7ScrapedOnChainVotes (651) */ interface PolkadotPrimitivesV7ScrapedOnChainVotes extends Struct { readonly session: u32; readonly backingValidatorsPerCandidate: Vec< @@ -6910,7 +6965,7 @@ declare module "@polkadot/types/lookup" { readonly disputes: Vec; } - /** @name PolkadotRuntimeParachainsParasInherentPalletError (651) */ + /** @name PolkadotRuntimeParachainsParasInherentPalletError (656) */ interface PolkadotRuntimeParachainsParasInherentPalletError extends Enum { readonly isTooManyInclusionInherents: boolean; readonly isInvalidParentHeader: boolean; @@ -6925,7 +6980,7 @@ declare module "@polkadot/types/lookup" { | "UnscheduledCandidate"; } - /** @name PolkadotRuntimeParachainsSchedulerPalletCoreOccupied (654) */ + /** @name PolkadotRuntimeParachainsSchedulerPalletCoreOccupied (659) */ interface PolkadotRuntimeParachainsSchedulerPalletCoreOccupied extends Enum { readonly isFree: boolean; readonly isParas: boolean; @@ -6933,14 +6988,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Free" | "Paras"; } - /** @name PolkadotRuntimeParachainsSchedulerPalletParasEntry (655) */ + /** @name PolkadotRuntimeParachainsSchedulerPalletParasEntry (660) */ interface PolkadotRuntimeParachainsSchedulerPalletParasEntry extends Struct { readonly assignment: PolkadotRuntimeParachainsSchedulerCommonAssignment; readonly availabilityTimeouts: u32; readonly ttl: u32; } - /** @name PolkadotRuntimeParachainsSchedulerCommonAssignment (656) */ + /** @name PolkadotRuntimeParachainsSchedulerCommonAssignment (661) */ interface PolkadotRuntimeParachainsSchedulerCommonAssignment extends Enum { readonly isPool: boolean; readonly asPool: { @@ -6952,7 +7007,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Pool" | "Bulk"; } - /** @name PolkadotRuntimeParachainsParasPvfCheckActiveVoteState (661) */ + /** @name PolkadotRuntimeParachainsParasPvfCheckActiveVoteState (666) */ interface PolkadotRuntimeParachainsParasPvfCheckActiveVoteState extends Struct { readonly votesAccept: BitVec; readonly votesReject: BitVec; @@ -6961,7 +7016,7 @@ declare module "@polkadot/types/lookup" { readonly causes: Vec; } - /** @name PolkadotRuntimeParachainsParasPvfCheckCause (663) */ + /** @name PolkadotRuntimeParachainsParasPvfCheckCause (668) */ interface PolkadotRuntimeParachainsParasPvfCheckCause extends Enum { readonly isOnboarding: boolean; readonly asOnboarding: u32; @@ -6974,14 +7029,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Onboarding" | "Upgrade"; } - /** @name PolkadotRuntimeParachainsParasUpgradeStrategy (664) */ + /** @name PolkadotRuntimeParachainsParasUpgradeStrategy (669) */ interface PolkadotRuntimeParachainsParasUpgradeStrategy extends Enum { readonly isSetGoAheadSignal: boolean; readonly isApplyAtExpectedBlock: boolean; readonly type: "SetGoAheadSignal" | "ApplyAtExpectedBlock"; } - /** @name PolkadotRuntimeParachainsParasParaLifecycle (666) */ + /** @name PolkadotRuntimeParachainsParasParaLifecycle (671) */ interface PolkadotRuntimeParachainsParasParaLifecycle extends Enum { readonly isOnboarding: boolean; readonly isParathread: boolean; @@ -7000,32 +7055,32 @@ declare module "@polkadot/types/lookup" { | "OffboardingParachain"; } - /** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (668) */ + /** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (673) */ interface PolkadotRuntimeParachainsParasParaPastCodeMeta extends Struct { readonly upgradeTimes: Vec; readonly lastPruned: Option; } - /** @name PolkadotRuntimeParachainsParasReplacementTimes (670) */ + /** @name PolkadotRuntimeParachainsParasReplacementTimes (675) */ interface PolkadotRuntimeParachainsParasReplacementTimes extends Struct { readonly expectedAt: u32; readonly activatedAt: u32; } - /** @name PolkadotPrimitivesV7UpgradeGoAhead (672) */ + /** @name PolkadotPrimitivesV7UpgradeGoAhead (677) */ interface PolkadotPrimitivesV7UpgradeGoAhead extends Enum { readonly isAbort: boolean; readonly isGoAhead: boolean; readonly type: "Abort" | "GoAhead"; } - /** @name PolkadotPrimitivesV7UpgradeRestriction (673) */ + /** @name PolkadotPrimitivesV7UpgradeRestriction (678) */ interface PolkadotPrimitivesV7UpgradeRestriction extends Enum { readonly isPresent: boolean; readonly type: "Present"; } - /** @name PolkadotRuntimeParachainsParasPalletError (674) */ + /** @name PolkadotRuntimeParachainsParasPalletError (679) */ interface PolkadotRuntimeParachainsParasPalletError extends Enum { readonly isNotRegistered: boolean; readonly isCannotOnboard: boolean; @@ -7056,20 +7111,20 @@ declare module "@polkadot/types/lookup" { | "InvalidCode"; } - /** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (676) */ + /** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (681) */ interface PolkadotRuntimeParachainsInitializerBufferedSessionChange extends Struct { readonly validators: Vec; readonly queued: Vec; readonly sessionIndex: u32; } - /** @name PolkadotCorePrimitivesInboundDownwardMessage (678) */ + /** @name PolkadotCorePrimitivesInboundDownwardMessage (683) */ interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct { readonly sentAt: u32; readonly msg: Bytes; } - /** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (679) */ + /** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (684) */ interface PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest extends Struct { readonly confirmed: bool; readonly age: u32; @@ -7079,7 +7134,7 @@ declare module "@polkadot/types/lookup" { readonly maxTotalSize: u32; } - /** @name PolkadotRuntimeParachainsHrmpHrmpChannel (681) */ + /** @name PolkadotRuntimeParachainsHrmpHrmpChannel (686) */ interface PolkadotRuntimeParachainsHrmpHrmpChannel extends Struct { readonly maxCapacity: u32; readonly maxTotalSize: u32; @@ -7091,13 +7146,13 @@ declare module "@polkadot/types/lookup" { readonly recipientDeposit: u128; } - /** @name PolkadotCorePrimitivesInboundHrmpMessage (683) */ + /** @name PolkadotCorePrimitivesInboundHrmpMessage (688) */ interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct { readonly sentAt: u32; readonly data: Bytes; } - /** @name PolkadotRuntimeParachainsHrmpPalletError (686) */ + /** @name PolkadotRuntimeParachainsHrmpPalletError (691) */ interface PolkadotRuntimeParachainsHrmpPalletError extends Enum { readonly isOpenHrmpChannelToSelf: boolean; readonly isOpenHrmpChannelInvalidRecipient: boolean; @@ -7142,7 +7197,7 @@ declare module "@polkadot/types/lookup" { | "ChannelCreationNotAuthorized"; } - /** @name PolkadotPrimitivesV7SessionInfo (688) */ + /** @name PolkadotPrimitivesV7SessionInfo (693) */ interface PolkadotPrimitivesV7SessionInfo extends Struct { readonly activeValidatorIndices: Vec; readonly randomSeed: U8aFixed; @@ -7159,13 +7214,13 @@ declare module "@polkadot/types/lookup" { readonly neededApprovals: u32; } - /** @name PolkadotPrimitivesV7IndexedVecValidatorIndex (689) */ + /** @name PolkadotPrimitivesV7IndexedVecValidatorIndex (694) */ interface PolkadotPrimitivesV7IndexedVecValidatorIndex extends Vec {} - /** @name PolkadotPrimitivesV7IndexedVecGroupIndex (690) */ + /** @name PolkadotPrimitivesV7IndexedVecGroupIndex (695) */ interface PolkadotPrimitivesV7IndexedVecGroupIndex extends Vec> {} - /** @name PolkadotPrimitivesV7DisputeState (692) */ + /** @name PolkadotPrimitivesV7DisputeState (697) */ interface PolkadotPrimitivesV7DisputeState extends Struct { readonly validatorsFor: BitVec; readonly validatorsAgainst: BitVec; @@ -7173,7 +7228,7 @@ declare module "@polkadot/types/lookup" { readonly concludedAt: Option; } - /** @name PolkadotRuntimeParachainsDisputesPalletError (694) */ + /** @name PolkadotRuntimeParachainsDisputesPalletError (699) */ interface PolkadotRuntimeParachainsDisputesPalletError extends Enum { readonly isDuplicateDisputeStatementSets: boolean; readonly isAncientDisputeStatement: boolean; @@ -7196,13 +7251,13 @@ declare module "@polkadot/types/lookup" { | "UnconfirmedDispute"; } - /** @name PolkadotPrimitivesV7SlashingPendingSlashes (695) */ + /** @name PolkadotPrimitivesV7SlashingPendingSlashes (700) */ interface PolkadotPrimitivesV7SlashingPendingSlashes extends Struct { readonly keys_: BTreeMap; readonly kind: PolkadotPrimitivesV7SlashingSlashingOffenceKind; } - /** @name PolkadotRuntimeParachainsDisputesSlashingPalletError (699) */ + /** @name PolkadotRuntimeParachainsDisputesSlashingPalletError (704) */ interface PolkadotRuntimeParachainsDisputesSlashingPalletError extends Enum { readonly isInvalidKeyOwnershipProof: boolean; readonly isInvalidSessionIndex: boolean; @@ -7219,7 +7274,7 @@ declare module "@polkadot/types/lookup" { | "DuplicateSlashingReport"; } - /** @name PalletMessageQueueBookState (700) */ + /** @name PalletMessageQueueBookState (705) */ interface PalletMessageQueueBookState extends Struct { readonly begin: u32; readonly end: u32; @@ -7229,13 +7284,13 @@ declare module "@polkadot/types/lookup" { readonly size_: u64; } - /** @name PalletMessageQueueNeighbours (702) */ + /** @name PalletMessageQueueNeighbours (707) */ interface PalletMessageQueueNeighbours extends Struct { readonly prev: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin; readonly next: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin; } - /** @name PalletMessageQueuePage (704) */ + /** @name PalletMessageQueuePage (709) */ interface PalletMessageQueuePage extends Struct { readonly remaining: u32; readonly remainingSize: u32; @@ -7245,7 +7300,7 @@ declare module "@polkadot/types/lookup" { readonly heap: Bytes; } - /** @name PalletMessageQueueError (706) */ + /** @name PalletMessageQueueError (711) */ interface PalletMessageQueueError extends Enum { readonly isNotReapable: boolean; readonly isNoPage: boolean; @@ -7268,13 +7323,13 @@ declare module "@polkadot/types/lookup" { | "RecursiveDisallowed"; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount (707) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount (712) */ interface PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount extends Struct { readonly coreIndex: u32; readonly count: u32; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType (708) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType (713) */ interface PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType extends Struct { readonly traffic: u128; readonly nextIndex: u32; @@ -7282,33 +7337,33 @@ declare module "@polkadot/types/lookup" { readonly freedIndices: BinaryHeapReverseQueueIndex; } - /** @name BinaryHeapReverseQueueIndex (710) */ + /** @name BinaryHeapReverseQueueIndex (715) */ interface BinaryHeapReverseQueueIndex extends Vec {} - /** @name BinaryHeapEnqueuedOrder (713) */ + /** @name BinaryHeapEnqueuedOrder (718) */ interface BinaryHeapEnqueuedOrder extends Vec {} - /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder (714) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder (719) */ interface PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder extends Struct { readonly paraId: u32; readonly idx: u32; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletError (718) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletError (723) */ interface PolkadotRuntimeParachainsAssignerOnDemandPalletError extends Enum { readonly isQueueFull: boolean; readonly isSpotPriceHigherThanMaxAmount: boolean; readonly type: "QueueFull" | "SpotPriceHigherThanMaxAmount"; } - /** @name PolkadotRuntimeCommonParasRegistrarParaInfo (719) */ + /** @name PolkadotRuntimeCommonParasRegistrarParaInfo (724) */ interface PolkadotRuntimeCommonParasRegistrarParaInfo extends Struct { readonly manager: AccountId32; readonly deposit: u128; readonly locked: Option; } - /** @name PolkadotRuntimeCommonParasRegistrarPalletError (721) */ + /** @name PolkadotRuntimeCommonParasRegistrarPalletError (726) */ interface PolkadotRuntimeCommonParasRegistrarPalletError extends Enum { readonly isNotRegistered: boolean; readonly isAlreadyRegistered: boolean; @@ -7341,33 +7396,33 @@ declare module "@polkadot/types/lookup" { | "CannotSwap"; } - /** @name PalletUtilityError (722) */ + /** @name PalletUtilityError (727) */ interface PalletUtilityError extends Enum { readonly isTooManyCalls: boolean; readonly type: "TooManyCalls"; } - /** @name PalletIdentityRegistration (724) */ + /** @name PalletIdentityRegistration (729) */ interface PalletIdentityRegistration extends Struct { readonly judgements: Vec>; readonly deposit: u128; readonly info: PalletIdentityLegacyIdentityInfo; } - /** @name PalletIdentityRegistrarInfo (733) */ + /** @name PalletIdentityRegistrarInfo (738) */ interface PalletIdentityRegistrarInfo extends Struct { readonly account: AccountId32; readonly fee: u128; readonly fields: u64; } - /** @name PalletIdentityAuthorityProperties (735) */ + /** @name PalletIdentityAuthorityProperties (740) */ interface PalletIdentityAuthorityProperties extends Struct { readonly suffix: Bytes; readonly allocation: u32; } - /** @name PalletIdentityError (738) */ + /** @name PalletIdentityError (743) */ interface PalletIdentityError extends Enum { readonly isTooManySubAccounts: boolean; readonly isNotFound: boolean; @@ -7424,7 +7479,7 @@ declare module "@polkadot/types/lookup" { | "NotExpired"; } - /** @name PalletSchedulerScheduled (741) */ + /** @name PalletSchedulerScheduled (746) */ interface PalletSchedulerScheduled extends Struct { readonly maybeId: Option; readonly priority: u8; @@ -7433,14 +7488,14 @@ declare module "@polkadot/types/lookup" { readonly origin: DancelightRuntimeOriginCaller; } - /** @name PalletSchedulerRetryConfig (743) */ + /** @name PalletSchedulerRetryConfig (748) */ interface PalletSchedulerRetryConfig extends Struct { readonly totalRetries: u8; readonly remaining: u8; readonly period: u32; } - /** @name PalletSchedulerError (744) */ + /** @name PalletSchedulerError (749) */ interface PalletSchedulerError extends Enum { readonly isFailedToSchedule: boolean; readonly isNotFound: boolean; @@ -7450,21 +7505,21 @@ declare module "@polkadot/types/lookup" { readonly type: "FailedToSchedule" | "NotFound" | "TargetBlockNumberInPast" | "RescheduleNoChange" | "Named"; } - /** @name PalletProxyProxyDefinition (747) */ + /** @name PalletProxyProxyDefinition (752) */ interface PalletProxyProxyDefinition extends Struct { readonly delegate: AccountId32; readonly proxyType: DancelightRuntimeProxyType; readonly delay: u32; } - /** @name PalletProxyAnnouncement (751) */ + /** @name PalletProxyAnnouncement (756) */ interface PalletProxyAnnouncement extends Struct { readonly real: AccountId32; readonly callHash: H256; readonly height: u32; } - /** @name PalletProxyError (753) */ + /** @name PalletProxyError (758) */ interface PalletProxyError extends Enum { readonly isTooMany: boolean; readonly isNotFound: boolean; @@ -7485,7 +7540,7 @@ declare module "@polkadot/types/lookup" { | "NoSelfProxy"; } - /** @name PalletMultisigMultisig (755) */ + /** @name PalletMultisigMultisig (760) */ interface PalletMultisigMultisig extends Struct { readonly when: PalletMultisigTimepoint; readonly deposit: u128; @@ -7493,7 +7548,7 @@ declare module "@polkadot/types/lookup" { readonly approvals: Vec; } - /** @name PalletMultisigError (757) */ + /** @name PalletMultisigError (762) */ interface PalletMultisigError extends Enum { readonly isMinimumThreshold: boolean; readonly isAlreadyApproved: boolean; @@ -7526,7 +7581,7 @@ declare module "@polkadot/types/lookup" { | "AlreadyStored"; } - /** @name PalletPreimageOldRequestStatus (758) */ + /** @name PalletPreimageOldRequestStatus (763) */ interface PalletPreimageOldRequestStatus extends Enum { readonly isUnrequested: boolean; readonly asUnrequested: { @@ -7542,7 +7597,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unrequested" | "Requested"; } - /** @name PalletPreimageRequestStatus (761) */ + /** @name PalletPreimageRequestStatus (766) */ interface PalletPreimageRequestStatus extends Enum { readonly isUnrequested: boolean; readonly asUnrequested: { @@ -7558,7 +7613,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unrequested" | "Requested"; } - /** @name PalletPreimageError (766) */ + /** @name PalletPreimageError (771) */ interface PalletPreimageError extends Enum { readonly isTooBig: boolean; readonly isAlreadyNoted: boolean; @@ -7581,7 +7636,7 @@ declare module "@polkadot/types/lookup" { | "NoCost"; } - /** @name PalletAssetRateError (767) */ + /** @name PalletAssetRateError (772) */ interface PalletAssetRateError extends Enum { readonly isUnknownAssetKind: boolean; readonly isAlreadyExists: boolean; @@ -7589,7 +7644,7 @@ declare module "@polkadot/types/lookup" { readonly type: "UnknownAssetKind" | "AlreadyExists" | "Overflow"; } - /** @name PalletXcmQueryStatus (768) */ + /** @name PalletXcmQueryStatus (773) */ interface PalletXcmQueryStatus extends Enum { readonly isPending: boolean; readonly asPending: { @@ -7611,7 +7666,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Pending" | "VersionNotifier" | "Ready"; } - /** @name XcmVersionedResponse (772) */ + /** @name XcmVersionedResponse (777) */ interface XcmVersionedResponse extends Enum { readonly isV2: boolean; readonly asV2: XcmV2Response; @@ -7622,7 +7677,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name PalletXcmVersionMigrationStage (778) */ + /** @name PalletXcmVersionMigrationStage (783) */ interface PalletXcmVersionMigrationStage extends Enum { readonly isMigrateSupportedVersion: boolean; readonly isMigrateVersionNotifiers: boolean; @@ -7636,7 +7691,7 @@ declare module "@polkadot/types/lookup" { | "MigrateAndNotifyOldTargets"; } - /** @name PalletXcmRemoteLockedFungibleRecord (780) */ + /** @name PalletXcmRemoteLockedFungibleRecord (785) */ interface PalletXcmRemoteLockedFungibleRecord extends Struct { readonly amount: u128; readonly owner: XcmVersionedLocation; @@ -7644,7 +7699,7 @@ declare module "@polkadot/types/lookup" { readonly consumers: Vec>; } - /** @name PalletXcmError (787) */ + /** @name PalletXcmError (792) */ interface PalletXcmError extends Enum { readonly isUnreachable: boolean; readonly isSendFailure: boolean; @@ -7697,7 +7752,7 @@ declare module "@polkadot/types/lookup" { | "LocalExecutionIncomplete"; } - /** @name PalletMigrationsError (788) */ + /** @name PalletMigrationsError (793) */ interface PalletMigrationsError extends Enum { readonly isPreimageMissing: boolean; readonly isWrongUpperBound: boolean; @@ -7706,7 +7761,7 @@ declare module "@polkadot/types/lookup" { readonly type: "PreimageMissing" | "WrongUpperBound" | "PreimageIsTooBig" | "PreimageAlreadyExists"; } - /** @name PalletBeefyError (792) */ + /** @name PalletBeefyError (797) */ interface PalletBeefyError extends Enum { readonly isInvalidKeyOwnershipProof: boolean; readonly isInvalidDoubleVotingProof: boolean; @@ -7725,50 +7780,50 @@ declare module "@polkadot/types/lookup" { | "InvalidConfiguration"; } - /** @name SpConsensusBeefyMmrBeefyAuthoritySet (793) */ + /** @name SpConsensusBeefyMmrBeefyAuthoritySet (798) */ interface SpConsensusBeefyMmrBeefyAuthoritySet extends Struct { readonly id: u64; readonly len: u32; readonly keysetCommitment: H256; } - /** @name SnowbridgeBeaconPrimitivesCompactBeaconState (794) */ + /** @name SnowbridgeBeaconPrimitivesCompactBeaconState (799) */ interface SnowbridgeBeaconPrimitivesCompactBeaconState extends Struct { readonly slot: Compact; readonly blockRootsRoot: H256; } - /** @name SnowbridgeBeaconPrimitivesSyncCommitteePrepared (795) */ + /** @name SnowbridgeBeaconPrimitivesSyncCommitteePrepared (800) */ interface SnowbridgeBeaconPrimitivesSyncCommitteePrepared extends Struct { readonly root: H256; readonly pubkeys: Vec; readonly aggregatePubkey: SnowbridgeMilagroBlsKeysPublicKey; } - /** @name SnowbridgeMilagroBlsKeysPublicKey (797) */ + /** @name SnowbridgeMilagroBlsKeysPublicKey (802) */ interface SnowbridgeMilagroBlsKeysPublicKey extends Struct { readonly point: SnowbridgeAmclBls381Ecp; } - /** @name SnowbridgeAmclBls381Ecp (798) */ + /** @name SnowbridgeAmclBls381Ecp (803) */ interface SnowbridgeAmclBls381Ecp extends Struct { readonly x: SnowbridgeAmclBls381Fp; readonly y: SnowbridgeAmclBls381Fp; readonly z: SnowbridgeAmclBls381Fp; } - /** @name SnowbridgeAmclBls381Fp (799) */ + /** @name SnowbridgeAmclBls381Fp (804) */ interface SnowbridgeAmclBls381Fp extends Struct { readonly x: SnowbridgeAmclBls381Big; readonly xes: i32; } - /** @name SnowbridgeAmclBls381Big (800) */ + /** @name SnowbridgeAmclBls381Big (805) */ interface SnowbridgeAmclBls381Big extends Struct { readonly w: Vec; } - /** @name SnowbridgeBeaconPrimitivesForkVersions (803) */ + /** @name SnowbridgeBeaconPrimitivesForkVersions (808) */ interface SnowbridgeBeaconPrimitivesForkVersions extends Struct { readonly genesis: SnowbridgeBeaconPrimitivesFork; readonly altair: SnowbridgeBeaconPrimitivesFork; @@ -7777,13 +7832,13 @@ declare module "@polkadot/types/lookup" { readonly deneb: SnowbridgeBeaconPrimitivesFork; } - /** @name SnowbridgeBeaconPrimitivesFork (804) */ + /** @name SnowbridgeBeaconPrimitivesFork (809) */ interface SnowbridgeBeaconPrimitivesFork extends Struct { readonly version: U8aFixed; readonly epoch: u64; } - /** @name SnowbridgePalletEthereumClientError (805) */ + /** @name SnowbridgePalletEthereumClientError (810) */ interface SnowbridgePalletEthereumClientError extends Enum { readonly isSkippedSyncCommitteePeriod: boolean; readonly isSyncCommitteeUpdateRequired: boolean; @@ -7839,7 +7894,7 @@ declare module "@polkadot/types/lookup" { | "Halted"; } - /** @name SnowbridgeBeaconPrimitivesBlsBlsError (806) */ + /** @name SnowbridgeBeaconPrimitivesBlsBlsError (811) */ interface SnowbridgeBeaconPrimitivesBlsBlsError extends Enum { readonly isInvalidSignature: boolean; readonly isInvalidPublicKey: boolean; @@ -7852,7 +7907,7 @@ declare module "@polkadot/types/lookup" { | "SignatureVerificationFailed"; } - /** @name PolkadotRuntimeCommonParasSudoWrapperPalletError (807) */ + /** @name PolkadotRuntimeCommonParasSudoWrapperPalletError (812) */ interface PolkadotRuntimeCommonParasSudoWrapperPalletError extends Enum { readonly isParaDoesntExist: boolean; readonly isParaAlreadyExists: boolean; @@ -7875,33 +7930,33 @@ declare module "@polkadot/types/lookup" { | "TooManyCores"; } - /** @name PalletSudoError (808) */ + /** @name PalletSudoError (813) */ interface PalletSudoError extends Enum { readonly isRequireSudo: boolean; readonly type: "RequireSudo"; } - /** @name FrameSystemExtensionsCheckNonZeroSender (811) */ + /** @name FrameSystemExtensionsCheckNonZeroSender (816) */ type FrameSystemExtensionsCheckNonZeroSender = Null; - /** @name FrameSystemExtensionsCheckSpecVersion (812) */ + /** @name FrameSystemExtensionsCheckSpecVersion (817) */ type FrameSystemExtensionsCheckSpecVersion = Null; - /** @name FrameSystemExtensionsCheckTxVersion (813) */ + /** @name FrameSystemExtensionsCheckTxVersion (818) */ type FrameSystemExtensionsCheckTxVersion = Null; - /** @name FrameSystemExtensionsCheckGenesis (814) */ + /** @name FrameSystemExtensionsCheckGenesis (819) */ type FrameSystemExtensionsCheckGenesis = Null; - /** @name FrameSystemExtensionsCheckNonce (817) */ + /** @name FrameSystemExtensionsCheckNonce (822) */ interface FrameSystemExtensionsCheckNonce extends Compact {} - /** @name FrameSystemExtensionsCheckWeight (818) */ + /** @name FrameSystemExtensionsCheckWeight (823) */ type FrameSystemExtensionsCheckWeight = Null; - /** @name PalletTransactionPaymentChargeTransactionPayment (819) */ + /** @name PalletTransactionPaymentChargeTransactionPayment (824) */ interface PalletTransactionPaymentChargeTransactionPayment extends Compact {} - /** @name DancelightRuntimeRuntime (820) */ + /** @name DancelightRuntimeRuntime (825) */ type DancelightRuntimeRuntime = Null; } // declare module From 1b2ff172b4838d772be21243a13ff115085275cc Mon Sep 17 00:00:00 2001 From: girazoki Date: Wed, 30 Oct 2024 16:02:49 +0100 Subject: [PATCH 58/82] a few fixes here and there --- pallets/external-validator-slashes/src/lib.rs | 64 +++++++++------ .../external-validator-slashes/src/mock.rs | 27 ++++++- .../external-validator-slashes/src/tests.rs | 77 ++++++++++++++++++- 3 files changed, 139 insertions(+), 29 deletions(-) diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index f658212b1..e20cefd7c 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -76,8 +76,6 @@ pub mod pallet { + TryFrom; /// A conversion from account ID to validator ID. - /// - /// Its cost must be at most one storage read. type ValidatorIdOf: Convert>; /// Number of eras that slashes are deferred by, after computation. @@ -91,6 +89,7 @@ pub mod pallet { #[pallet::constant] type BondingDuration: Get; + // SlashId type, used as a counter on the number of slashes type SlashId: Default + FullCodec + TypeInfo @@ -106,8 +105,10 @@ pub mod pallet { /// Interface for interacting with a session pallet. type SessionInterface: SessionInterface; + /// Era index provider, used to fetch the active era among other thins type EraIndexProvider: EraIndexProvider; + /// Invulnerable provider, used to get the invulnerables to know when not to slash type InvulnerablesProvider: InvulnerablesProvider; /// The weight information of this pallet. @@ -123,6 +124,7 @@ pub mod pallet { ProvidedNonSlashableEra, ActiveEraNotSet, DeferPeriodIsOver, + ErrorComputingSlash, } #[pallet::pallet] @@ -142,6 +144,7 @@ pub mod pallet { #[pallet::unbounded] pub type BondedEras = StorageValue<_, Vec<(EraIndex, SessionIndex)>, ValueQuery>; + /// A counter on the number of slashes we have performed #[pallet::storage] #[pallet::getter(fn next_slash_id)] pub type NextSlashId = StorageValue<_, T::SlashId, ValueQuery>; @@ -155,6 +158,7 @@ pub mod pallet { #[pallet::call] impl Pallet { + /// Cancel a slash that was deferred for a later era #[pallet::call_index(0)] #[pallet::weight(T::WeightInfo::cancel_deferred_slash(slash_indices.len() as u32))] pub fn cancel_deferred_slash( @@ -166,6 +170,7 @@ pub mod pallet { let active_era = T::EraIndexProvider::active_era().index; + // We need to be in the defer period ensure!( era <= active_era .saturating_add(T::SlashDeferDuration::get().saturating_add(One::one())) @@ -178,7 +183,7 @@ pub mod pallet { is_sorted_and_unique(&slash_indices), Error::::NotSortedAndUnique ); - + // fetch slashes for the era in which we want to defer let mut era_slashes = Slashes::::get(&era); let last_item = slash_indices[slash_indices.len() - 1]; @@ -192,6 +197,7 @@ pub mod pallet { era_slashes.remove(index); } + // insert back slashes Slashes::::insert(&era, &era_slashes); Ok(()) } @@ -211,26 +217,33 @@ pub mod pallet { let slash_defer_duration = T::SlashDeferDuration::get(); - let window_start = active_era.saturating_sub(T::BondingDuration::get()); - ensure!(era >= window_start, Error::::ProvidedNonSlashableEra); + let _ = T::EraIndexProvider::era_to_session_start(era) + .ok_or(Error::::ProvidedNonSlashableEra)?; let next_slash_id = NextSlashId::::get(); - let slash = Slash:: { - slash_id: next_slash_id, - reporters: vec![], - confirmed: false, - - validator, + let slash = compute_slash::( percentage, + next_slash_id, + era, + validator, + slash_defer_duration, + ) + .ok_or(Error::::ErrorComputingSlash)?; + + // If we defer duration is 0, we immediately apply and confirm + let era_to_consider = if slash_defer_duration == 0 { + era + } else { + era.saturating_add(slash_defer_duration) + .saturating_add(One::one()) }; - let mut era_slashes = Slashes::::get(&era); + + let mut era_slashes = Slashes::::get(&era_to_consider); era_slashes.push(slash); - Slashes::::insert( - &era.saturating_add(slash_defer_duration) - .saturating_add(One::one()), - &era_slashes, - ); + + Slashes::::insert(era_to_consider, &era_slashes); + NextSlashId::::put(next_slash_id.saturating_add(One::one())); Ok(()) } @@ -337,12 +350,17 @@ where slash_era + slash_defer_duration + 1, ); - Slashes::::mutate( - slash_era - .saturating_add(slash_defer_duration) - .saturating_add(One::one()), - move |for_later| for_later.push(slash), - ); + // Cover slash defer duration equal to 0 + if slash_defer_duration == 0 { + Slashes::::mutate(slash_era, move |for_now| for_now.push(slash)); + } else { + Slashes::::mutate( + slash_era + .saturating_add(slash_defer_duration) + .saturating_add(One::one()), + move |for_later| for_later.push(slash), + ); + } // Fix unwrap next_slash_id = next_slash_id.saturating_add(One::one()); diff --git a/pallets/external-validator-slashes/src/mock.rs b/pallets/external-validator-slashes/src/mock.rs index ef9305073..e5661ea33 100644 --- a/pallets/external-validator-slashes/src/mock.rs +++ b/pallets/external-validator-slashes/src/mock.rs @@ -18,7 +18,7 @@ use { crate as external_validator_slashes, frame_support::{ parameter_types, - traits::{ConstU16, ConstU64}, + traits::{ConstU16, ConstU64, Get}, }, frame_system as system, sp_core::H256, @@ -114,6 +114,7 @@ pub struct MockEraIndexProvider; thread_local! { pub static ERA_INDEX: RefCell = const { RefCell::new(0) }; + pub static DEFER_PERIOD: RefCell = const { RefCell::new(2) }; } impl MockEraIndexProvider { @@ -130,7 +131,13 @@ impl EraIndexProvider for MockEraIndexProvider { } } fn era_to_session_start(era_index: EraIndex) -> Option { - Some(era_index.into()) + let active_era = Self::active_era().index; + if era_index > active_era || era_index < active_era.saturating_sub(BondingDuration::get()) { + None + } else { + // Else we assume eras start at the same time as sessions + Some(era_index.into()) + } } } @@ -176,8 +183,20 @@ impl InvulnerablesProvider for MockInvulnerableProvider { } } +pub struct DeferPeriodGetter; +impl Get for DeferPeriodGetter { + fn get() -> EraIndex { + DEFER_PERIOD.with(|q| (*q.borrow()).clone()) + } +} + +impl DeferPeriodGetter { + pub fn with_defer_period(defer_period: EraIndex) { + DEFER_PERIOD.with(|r| *r.borrow_mut() = defer_period); + } +} + parameter_types! { - pub const DeferPeriod: u32 = 2u32; pub const BondingDuration: u32 = 5u32; } @@ -185,7 +204,7 @@ impl external_validator_slashes::Config for Test { type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; type ValidatorIdOf = IdentityValidator; - type SlashDeferDuration = DeferPeriod; + type SlashDeferDuration = DeferPeriodGetter; type BondingDuration = BondingDuration; type SlashId = u32; type SessionInterface = (); diff --git a/pallets/external-validator-slashes/src/tests.rs b/pallets/external-validator-slashes/src/tests.rs index ef512daee..5609346e4 100644 --- a/pallets/external-validator-slashes/src/tests.rs +++ b/pallets/external-validator-slashes/src/tests.rs @@ -170,7 +170,7 @@ fn test_on_offence_injects_offences() { ); // current era (1) + defer period + 1 let slash_era = 0 - .saturating_add(crate::mock::DeferPeriod::get()) + .saturating_add(crate::mock::DeferPeriodGetter::get()) .saturating_add(One::one()); assert_eq!( @@ -202,13 +202,86 @@ fn test_on_offence_does_not_work_for_invulnerables() { ); // current era (1) + defer period + 1 let slash_era = 1 - .saturating_add(crate::mock::DeferPeriod::get()) + .saturating_add(crate::mock::DeferPeriodGetter::get()) .saturating_add(One::one()); assert_eq!(Slashes::::get(slash_era), vec![]); }); } +#[test] +fn defer_period_of_zero_confirms_immediately_slashes() { + new_test_ext().execute_with(|| { + crate::mock::DeferPeriodGetter::with_defer_period(0); + start_era(0, 0); + assert_ok!(ExternalValidatorSlashes::force_inject_slash( + RuntimeOrigin::root(), + 0, + 1u64, + Perbill::from_percent(75) + )); + assert_eq!( + Slashes::::get(0), + vec![Slash { + validator: 1, + percentage: Perbill::from_percent(75), + confirmed: true, + reporters: vec![], + slash_id: 0 + }] + ); + }); +} + +#[test] +fn we_cannot_cancel_anything_with_defer_period_zero() { + new_test_ext().execute_with(|| { + crate::mock::DeferPeriodGetter::with_defer_period(0); + start_era(0, 0); + assert_ok!(ExternalValidatorSlashes::force_inject_slash( + RuntimeOrigin::root(), + 0, + 1u64, + Perbill::from_percent(75) + )); + assert_noop!( + ExternalValidatorSlashes::cancel_deferred_slash(RuntimeOrigin::root(), 0, vec![0]), + Error::::DeferPeriodIsOver + ); + }); +} + +#[test] +fn test_on_offence_defer_period_0() { + new_test_ext().execute_with(|| { + crate::mock::DeferPeriodGetter::with_defer_period(0); + start_era(0, 0); + start_era(1, 1); + Pallet::::on_offence( + &[OffenceDetails { + // 1 and 2 are invulnerables + offender: (3, ()), + reporters: vec![], + }], + &[Perbill::from_percent(75)], + 0, + ); + + let slash_era = 0; + + assert_eq!( + Slashes::::get(slash_era), + vec![Slash { + validator: 3, + percentage: Perbill::from_percent(75), + confirmed: true, + reporters: vec![], + slash_id: 0 + }] + ); + }); +} + fn start_era(era_index: EraIndex, session_index: SessionIndex) { Pallet::::on_era_start(era_index, session_index); crate::mock::MockEraIndexProvider::with_era(era_index); From 6d7e6b92d7c5fda2ab917f39208ae8bbbd0b46fb Mon Sep 17 00:00:00 2001 From: girazoki Date: Wed, 30 Oct 2024 17:29:39 +0100 Subject: [PATCH 59/82] change a few things --- solo-chains/runtime/dancelight/src/lib.rs | 4 +-- .../runtime/dancelight/src/tests/slashes.rs | 33 ++++++++++++------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index bcac11209..72512b77a 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -487,7 +487,7 @@ impl pallet_session::historical::Config for Runtime { } parameter_types! { - pub const BondingDuration: sp_staking::EraIndex = 28; + pub const BondingDuration: sp_staking::EraIndex = runtime_common::prod_or_fast!(12, 5); } parameter_types! { @@ -1210,7 +1210,7 @@ impl SessionInterface for DancelightSessionInterface { parameter_types! { pub const SessionsPerEra: SessionIndex = runtime_common::prod_or_fast!(6, 3); - pub const SlashDeferDuration: EraIndex = 2; + pub const SlashDeferDuration: EraIndex = runtime_common::prod_or_fast!(11, 4); } impl pallet_external_validators::Config for Runtime { diff --git a/solo-chains/runtime/dancelight/src/tests/slashes.rs b/solo-chains/runtime/dancelight/src/tests/slashes.rs index 15c4791d4..d63bbf33d 100644 --- a/solo-chains/runtime/dancelight/src/tests/slashes.rs +++ b/solo-chains/runtime/dancelight/src/tests/slashes.rs @@ -262,10 +262,14 @@ fn test_slashes_are_cleaned_after_bonding_period() { + 1) * SessionsPerEra::get(); - println!("first session era 3 pruned {:?}", fist_session_era_3_pruned); + let first_era_deferred = + ExternalValidators::current_era().unwrap() + SlashDeferDuration::get() + 1; + + println!("first era deferred {:?}", first_era_deferred); run_to_session(fist_session_era_3_pruned); - let slashes_after_bonding_period = ExternalValidatorSlashes::slashes(3); + let slashes_after_bonding_period = + ExternalValidatorSlashes::slashes(first_era_deferred); assert_eq!(slashes_after_bonding_period.len(), 0); }); } @@ -296,19 +300,19 @@ fn test_slashes_can_be_cleared_before_deferred_period_applies() { assert_eq!(reports.len(), 1); assert_eq!(ExternalValidators::current_era().unwrap(), 0); - let slashes = ExternalValidatorSlashes::slashes( - ExternalValidators::current_era().unwrap() + SlashDeferDuration::get() + 1, - ); + let deferred_era = + ExternalValidators::current_era().unwrap() + SlashDeferDuration::get() + 1; + let slashes = ExternalValidatorSlashes::slashes(deferred_era); assert_eq!(slashes.len(), 1); assert_eq!(slashes[0].validator, AccountId::from(ALICE)); // Now let's clean it up assert_ok!(ExternalValidatorSlashes::cancel_deferred_slash( RuntimeOrigin::root(), - 3, + deferred_era, vec![0] )); - let slashes_after_cancel = ExternalValidatorSlashes::slashes(3); + let slashes_after_cancel = ExternalValidatorSlashes::slashes(deferred_era); assert_eq!(slashes_after_cancel.len(), 0); }); } @@ -339,9 +343,10 @@ fn test_slashes_cannot_be_cancelled_after_defer_period() { assert_eq!(reports.len(), 1); assert_eq!(ExternalValidators::current_era().unwrap(), 0); - let slashes = ExternalValidatorSlashes::slashes( - ExternalValidators::current_era().unwrap() + SlashDeferDuration::get() + 1, - ); + let deferred_era = + ExternalValidators::current_era().unwrap() + SlashDeferDuration::get() + 1; + + let slashes = ExternalValidatorSlashes::slashes(deferred_era); assert_eq!(slashes.len(), 1); assert_eq!(slashes[0].validator, AccountId::from(ALICE)); @@ -355,10 +360,14 @@ fn test_slashes_cannot_be_cancelled_after_defer_period() { * SessionsPerEra::get(); run_to_session(first_deferred_session); - assert_eq!(ExternalValidators::current_era().unwrap(), 3); + assert_eq!(ExternalValidators::current_era().unwrap(), deferred_era); // Now let's clean it up assert_noop!( - ExternalValidatorSlashes::cancel_deferred_slash(RuntimeOrigin::root(), 3, vec![0]), + ExternalValidatorSlashes::cancel_deferred_slash( + RuntimeOrigin::root(), + deferred_era, + vec![0] + ), pallet_external_validator_slashes::Error::::DeferPeriodIsOver ); }); From 50f823745b983fc275f6d9ff848a3f85f93c12a7 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 30 Oct 2024 18:06:14 +0100 Subject: [PATCH 60/82] pr comments --- .../external-validators/src/benchmarking.rs | 38 +---- pallets/external-validators/src/lib.rs | 150 +++++------------- pallets/external-validators/src/mock.rs | 7 +- pallets/external-validators/src/tests.rs | 6 +- pallets/external-validators/src/weights.rs | 48 +----- pallets/invulnerables/src/lib.rs | 9 -- pallets/invulnerables/src/mock.rs | 6 +- runtime/dancebox/src/lib.rs | 8 +- runtime/flashbox/src/lib.rs | 8 +- .../dancelight/src/genesis_config_presets.rs | 1 + solo-chains/runtime/dancelight/src/lib.rs | 7 +- .../dancelight/src/tests/common/mod.rs | 1 + .../src/tests/external_validators_tests.rs | 16 +- .../src/weights/pallet_external_validators.rs | 24 +-- 14 files changed, 95 insertions(+), 234 deletions(-) diff --git a/pallets/external-validators/src/benchmarking.rs b/pallets/external-validators/src/benchmarking.rs index de5096cb4..73947bb22 100644 --- a/pallets/external-validators/src/benchmarking.rs +++ b/pallets/external-validators/src/benchmarking.rs @@ -14,12 +14,12 @@ // You should have received a copy of the GNU General Public License // along with Tanssi. If not, see -//! Benchmarking setup for pallet-invulnerables +//! Benchmarking setup for pallet_external_validators use super::*; #[allow(unused)] -use crate::Pallet as InvulnerablesPallet; +use crate::Pallet as ExternalValidators; use { frame_benchmarking::{account, v2::*, BenchmarkError}, frame_support::{ @@ -186,34 +186,12 @@ mod benchmarks { } #[benchmark] - fn force_no_eras() -> Result<(), BenchmarkError> { + fn force_era() -> Result<(), BenchmarkError> { let origin = T::UpdateOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; #[extrinsic_call] - _(origin as T::RuntimeOrigin); - - Ok(()) - } - - #[benchmark] - fn force_new_era() -> Result<(), BenchmarkError> { - let origin = - T::UpdateOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; - - #[extrinsic_call] - _(origin as T::RuntimeOrigin); - - Ok(()) - } - - #[benchmark] - fn force_new_era_always() -> Result<(), BenchmarkError> { - let origin = - T::UpdateOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; - - #[extrinsic_call] - _(origin as T::RuntimeOrigin); + _(origin as T::RuntimeOrigin, Forcing::ForceNew); Ok(()) } @@ -237,22 +215,22 @@ mod benchmarks { invulnerables.into_iter().unzip(); for account in account_ids { - >::add_whitelisted(origin.clone(), account) - .expect("add invulnerable failed"); + >::add_whitelisted(origin.clone(), account) + .expect("add whitelisted failed"); } let new_era_session = T::SessionsPerEra::get(); #[block] { - as SessionManager<_>>::new_session(new_era_session); + as SessionManager<_>>::new_session(new_era_session); } Ok(()) } impl_benchmark_test_suite!( - InvulnerablesPallet, + ExternalValidators, crate::mock::new_test_ext(), crate::mock::Test, ); diff --git a/pallets/external-validators/src/lib.rs b/pallets/external-validators/src/lib.rs index f47c48339..93ea90698 100644 --- a/pallets/external-validators/src/lib.rs +++ b/pallets/external-validators/src/lib.rs @@ -21,11 +21,13 @@ //! ## Terminology //! //! - WhitelistedValidators: Fixed validators set by root/governance. Have priority over the external validators. -//! - ExternalValidators: Validators set using storage proofs from another blockchain. Changing them triggers a -//! new era. Can be disabled by setting `SkipExternalValidators` to true. +//! - ExternalValidators: Validators set using storage proofs from another blockchain. Can be disabled by setting +//! `SkipExternalValidators` to true. //! -//! Validators only change once per era. By default the era changes after a fixed number of sessions, but that can -//! be changed by root/governance to increase era on every session, or to never change. +//! Validators only change once per era. By default the era changes after a fixed number of sessions, but new eras +//! can be forced or disabled using a root extrinsic. +//! +//! The structure of this pallet and the concept of eras is inspired by `pallet_staking` from Polkadot. #![cfg_attr(not(feature = "std"), no_std)] @@ -76,18 +78,6 @@ pub mod pallet { sp_std::vec::Vec, }; - /// The current storage version. - const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); - - /// A convertor from collators id. Since this pallet does not have stash/controller, this is - /// just identity. - pub struct IdentityCollator; - impl sp_runtime::traits::Convert> for IdentityCollator { - fn convert(t: T) -> Option { - Some(t) - } - } - /// Configure the pallet by specifying the parameters and types on which it depends. #[pallet::config] pub trait Config: frame_system::Config { @@ -157,7 +147,6 @@ pub mod pallet { } #[pallet::pallet] - #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); /// Fixed validators set by root/governance. Have priority over the external validators. @@ -196,6 +185,7 @@ pub mod pallet { #[pallet::genesis_config] #[derive(DefaultNoBound)] pub struct GenesisConfig { + pub skip_external_validators: bool, pub whitelisted_validators: Vec, } @@ -220,15 +210,16 @@ pub mod pallet { .expect("genesis validators are more than T::MaxWhitelistedValidators"); >::put(bounded_validators); + >::put(self.skip_external_validators); } } #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { - /// A new Invulnerable was added. + /// A new whitelisted validator was added. WhitelistedValidatorAdded { account_id: T::AccountId }, - /// An Invulnerable was removed. + /// A whitelisted validator was removed. WhitelistedValidatorRemoved { account_id: T::AccountId }, /// A new era has started. NewEra { era: EraIndex }, @@ -238,16 +229,16 @@ pub mod pallet { #[pallet::error] pub enum Error { - /// There are too many Invulnerables. - TooManyInvulnerables, - /// Account is already an Invulnerable. - AlreadyInvulnerable, - /// Account is not an Invulnerable. - NotInvulnerable, + /// There are too many whitelisted validators. + TooManyWhitelisted, + /// Account is already whitelisted. + AlreadyWhitelisted, + /// Account is not whitelisted. + NotWhitelisted, /// Account does not have keys registered NoKeysRegistered, - /// Unable to derive collator id from account id - UnableToDeriveCollatorId, + /// Unable to derive validator id from account id + UnableToDeriveValidatorId, } #[pallet::call] @@ -278,18 +269,18 @@ pub mod pallet { ) -> DispatchResultWithPostInfo { T::UpdateOrigin::ensure_origin(origin)?; // don't let one unprepared collator ruin things for everyone. - let maybe_collator_id = T::ValidatorIdOf::convert(who.clone()) + let maybe_validator_id = T::ValidatorIdOf::convert(who.clone()) .filter(T::ValidatorRegistration::is_registered); - let collator_id = maybe_collator_id.ok_or(Error::::NoKeysRegistered)?; + let validator_id = maybe_validator_id.ok_or(Error::::NoKeysRegistered)?; - >::try_mutate(|invulnerables| -> DispatchResult { - if invulnerables.contains(&collator_id) { - Err(Error::::AlreadyInvulnerable)?; + >::try_mutate(|whitelisted| -> DispatchResult { + if whitelisted.contains(&validator_id) { + Err(Error::::AlreadyWhitelisted)?; } - invulnerables - .try_push(collator_id.clone()) - .map_err(|_| Error::::TooManyInvulnerables)?; + whitelisted + .try_push(validator_id.clone()) + .map_err(|_| Error::::TooManyWhitelisted)?; Ok(()) })?; @@ -313,15 +304,15 @@ pub mod pallet { pub fn remove_whitelisted(origin: OriginFor, who: T::AccountId) -> DispatchResult { T::UpdateOrigin::ensure_origin(origin)?; - let collator_id = T::ValidatorIdOf::convert(who.clone()) - .ok_or(Error::::UnableToDeriveCollatorId)?; + let validator_id = T::ValidatorIdOf::convert(who.clone()) + .ok_or(Error::::UnableToDeriveValidatorId)?; - >::try_mutate(|invulnerables| -> DispatchResult { - let pos = invulnerables + >::try_mutate(|whitelisted| -> DispatchResult { + let pos = whitelisted .iter() - .position(|x| x == &collator_id) - .ok_or(Error::::NotInvulnerable)?; - invulnerables.remove(pos); + .position(|x| x == &validator_id) + .ok_or(Error::::NotWhitelisted)?; + whitelisted.remove(pos); Ok(()) })?; @@ -329,63 +320,12 @@ pub mod pallet { Ok(()) } - /// Force there to be no new eras indefinitely. - /// - /// The dispatch origin must be Root. - /// - /// # Warning - /// - /// The election process starts multiple blocks before the end of the era. - /// Thus the election process may be ongoing when this is called. In this case the - /// election will continue until the next era is triggered. - /// - /// ## Complexity - /// - No arguments. - /// - Weight: O(1) + /// Force when the next era will start. Possible values: next session, never, same as always. #[pallet::call_index(3)] - #[pallet::weight(T::WeightInfo::force_no_eras())] - pub fn force_no_eras(origin: OriginFor) -> DispatchResult { - T::UpdateOrigin::ensure_origin(origin)?; - Self::set_force_era(Forcing::ForceNone); - Ok(()) - } - - /// Force there to be a new era at the end of the next session. After this, it will be - /// reset to normal (non-forced) behaviour. - /// - /// The dispatch origin must be Root. - /// - /// # Warning - /// - /// The election process starts multiple blocks before the end of the era. - /// If this is called just before a new era is triggered, the election process may not - /// have enough blocks to get a result. - /// - /// ## Complexity - /// - No arguments. - /// - Weight: O(1) - #[pallet::call_index(4)] - #[pallet::weight(T::WeightInfo::force_new_era())] - pub fn force_new_era(origin: OriginFor) -> DispatchResult { + #[pallet::weight(T::WeightInfo::force_era())] + pub fn force_era(origin: OriginFor, mode: Forcing) -> DispatchResult { T::UpdateOrigin::ensure_origin(origin)?; - Self::set_force_era(Forcing::ForceNew); - Ok(()) - } - - /// Force there to be a new era at the end of sessions indefinitely. - /// - /// The dispatch origin must be Root. - /// - /// # Warning - /// - /// The election process starts multiple blocks before the end of the era. - /// If this is called just before a new era is triggered, the election process may not - /// have enough blocks to get a result. - #[pallet::call_index(5)] - #[pallet::weight(T::WeightInfo::force_new_era_always())] - pub fn force_new_era_always(origin: OriginFor) -> DispatchResult { - T::UpdateOrigin::ensure_origin(origin)?; - Self::set_force_era(Forcing::ForceAlways); + Self::set_force_era(mode); Ok(()) } } @@ -515,6 +455,8 @@ pub mod pallet { /// Start a new era. It does: /// * Increment `active_era.index`, /// * reset `active_era.start`, + /// * emit `NewEra` event, + /// * call `OnEraStart` hook, pub(crate) fn start_era(start_session: SessionIndex) { let active_era = ActiveEra::::mutate(|active_era| { let new_index = active_era.as_ref().map(|info| info.index + 1).unwrap_or(0); @@ -525,15 +467,14 @@ pub mod pallet { }); new_index }); + Self::deposit_event(Event::NewEra { era: active_era }); T::OnEraStart::on_era_start(active_era, start_session); } - /// Compute payout for era. + /// End era. It does: + /// * call `OnEraEnd` hook, pub(crate) fn end_era(active_era: ActiveEraInfo, _session_index: SessionIndex) { - // Note: active_era_start can be None if end era is called during genesis config. - if let Some(_active_era_start) = active_era.start { - // TODO: EraPaid event here - } + // Note: active_era.start can be None if end era is called during genesis config. T::OnEraEnd::on_era_end(active_era.index); } @@ -564,9 +505,6 @@ pub mod pallet { /// Potentially plan a new era. /// - /// Get election result from `T::ElectionProvider`. - /// In case election result has more than [`MinimumValidatorCount`] validator trigger a new era. - /// /// In case a new era is planned, the new validator set is returned. pub(crate) fn try_trigger_new_era( start_session_index: SessionIndex, @@ -688,7 +626,7 @@ pub enum Forcing { /// Not forcing anything - just let whatever happen. #[default] NotForcing, - /// Force a new era, then reset to `NotForcing` as soon as it is done. + /// Force a new era on the next session start, then reset to `NotForcing` as soon as it is done. ForceNew, /// Avoid a new era indefinitely. ForceNone, diff --git a/pallets/external-validators/src/mock.rs b/pallets/external-validators/src/mock.rs index cafb80f75..4cc6c81b5 100644 --- a/pallets/external-validators/src/mock.rs +++ b/pallets/external-validators/src/mock.rs @@ -27,7 +27,7 @@ use { sp_core::H256, sp_runtime::{ testing::UintAuthorityId, - traits::{BlakeTwo256, IdentityLookup, OpaqueKeys}, + traits::{BlakeTwo256, ConvertInto, IdentityLookup, OpaqueKeys}, BuildStorage, RuntimeAppPublic, }, }; @@ -134,7 +134,7 @@ impl Config for Test { type MaxWhitelistedValidators = ConstU32<20>; type MaxExternalValidators = ConstU32<20>; type ValidatorId = ::AccountId; - type ValidatorIdOf = IdentityCollator; + type ValidatorIdOf = ConvertInto; type ValidatorRegistration = IsRegistered; type UnixTime = Timestamp; type SessionsPerEra = SessionsPerEra; @@ -186,7 +186,7 @@ impl pallet_session::Config for Test { type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; // we don't have stash and controller, thus we don't need the convert as well. - type ValidatorIdOf = IdentityCollator; + type ValidatorIdOf = ConvertInto; type ShouldEndSession = pallet_session::PeriodicSessions; type NextSessionRotation = pallet_session::PeriodicSessions; type SessionManager = ExternalValidators; @@ -289,6 +289,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities { .assimilate_storage(&mut t) .unwrap(); pallet_external_validators::GenesisConfig:: { + skip_external_validators: false, whitelisted_validators, } .assimilate_storage(&mut t) diff --git a/pallets/external-validators/src/tests.rs b/pallets/external-validators/src/tests.rs index d1b8ab31d..173e64316 100644 --- a/pallets/external-validators/src/tests.rs +++ b/pallets/external-validators/src/tests.rs @@ -53,7 +53,7 @@ fn add_whitelisted_works() { // same element cannot be added more than once assert_noop!( ExternalValidators::add_whitelisted(RuntimeOrigin::signed(RootAccount::get()), new), - Error::::AlreadyInvulnerable + Error::::AlreadyWhitelisted ); // new element is now part of the invulnerables list @@ -101,7 +101,7 @@ fn validator_limit_works() { RuntimeOrigin::signed(RootAccount::get()), ii ), - Error::::TooManyInvulnerables + Error::::TooManyWhitelisted ); } } @@ -143,7 +143,7 @@ fn remove_whitelisted_works() { // cannot remove invulnerable not in the list assert_noop!( ExternalValidators::remove_whitelisted(RuntimeOrigin::signed(RootAccount::get()), 2), - Error::::NotInvulnerable + Error::::NotWhitelisted ); // cannot remove without privilege diff --git a/pallets/external-validators/src/weights.rs b/pallets/external-validators/src/weights.rs index ed64c9dd4..1ea819a2b 100644 --- a/pallets/external-validators/src/weights.rs +++ b/pallets/external-validators/src/weights.rs @@ -56,9 +56,7 @@ pub trait WeightInfo { fn skip_external_validators() -> Weight; fn add_whitelisted(b: u32, ) -> Weight; fn remove_whitelisted(b: u32, ) -> Weight; - fn force_no_eras() -> Weight; - fn force_new_era() -> Weight; - fn force_new_era_always() -> Weight; + fn force_era() -> Weight; fn new_session(r: u32, ) -> Weight; } @@ -108,7 +106,7 @@ impl WeightInfo for SubstrateWeight { } /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) - fn force_no_eras() -> Weight { + fn force_era() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -116,26 +114,6 @@ impl WeightInfo for SubstrateWeight { Weight::from_parts(4_924_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) - /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) - fn force_new_era() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_727_000 picoseconds. - Weight::from_parts(4_990_000, 0) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) - /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) - fn force_new_era_always() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_648_000 picoseconds. - Weight::from_parts(4_863_000, 0) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } /// Storage: `ExternalValidators::ForceEra` (r:1 w:0) /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) /// Storage: `ExternalValidators::EraSessionStart` (r:1 w:1) @@ -207,7 +185,7 @@ impl WeightInfo for () { } /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) - fn force_no_eras() -> Weight { + fn force_era() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -215,26 +193,6 @@ impl WeightInfo for () { Weight::from_parts(4_924_000, 0) .saturating_add(RocksDbWeight::get().writes(1_u64)) } - /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) - /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) - fn force_new_era() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_727_000 picoseconds. - Weight::from_parts(4_990_000, 0) - .saturating_add(RocksDbWeight::get().writes(1_u64)) - } - /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) - /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) - fn force_new_era_always() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_648_000 picoseconds. - Weight::from_parts(4_863_000, 0) - .saturating_add(RocksDbWeight::get().writes(1_u64)) - } /// Storage: `ExternalValidators::ForceEra` (r:1 w:0) /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) /// Storage: `ExternalValidators::EraSessionStart` (r:1 w:1) diff --git a/pallets/invulnerables/src/lib.rs b/pallets/invulnerables/src/lib.rs index 8798a029a..bf832ca25 100644 --- a/pallets/invulnerables/src/lib.rs +++ b/pallets/invulnerables/src/lib.rs @@ -65,15 +65,6 @@ pub mod pallet { /// The current storage version. const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); - /// A convertor from collators id. Since this pallet does not have stash/controller, this is - /// just identity. - pub struct IdentityCollator; - impl sp_runtime::traits::Convert> for IdentityCollator { - fn convert(t: T) -> Option { - Some(t) - } - } - /// Configure the pallet by specifying the parameters and types on which it depends. #[pallet::config] pub trait Config: frame_system::Config { diff --git a/pallets/invulnerables/src/mock.rs b/pallets/invulnerables/src/mock.rs index 22672aac2..b019f778a 100644 --- a/pallets/invulnerables/src/mock.rs +++ b/pallets/invulnerables/src/mock.rs @@ -25,7 +25,7 @@ use { sp_core::H256, sp_runtime::{ testing::UintAuthorityId, - traits::{BlakeTwo256, IdentityLookup, OpaqueKeys}, + traits::{BlakeTwo256, ConvertInto, IdentityLookup, OpaqueKeys}, BuildStorage, RuntimeAppPublic, }, }; @@ -117,7 +117,7 @@ impl Config for Test { type UpdateOrigin = EnsureSignedBy; type MaxInvulnerables = ConstU32<20>; type CollatorId = ::AccountId; - type CollatorIdOf = IdentityCollator; + type CollatorIdOf = ConvertInto; type CollatorRegistration = IsRegistered; type WeightInfo = (); #[cfg(feature = "runtime-benchmarks")] @@ -165,7 +165,7 @@ impl pallet_session::Config for Test { type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; // we don't have stash and controller, thus we don't need the convert as well. - type ValidatorIdOf = IdentityCollator; + type ValidatorIdOf = ConvertInto; type ShouldEndSession = pallet_session::PeriodicSessions; type NextSessionRotation = pallet_session::PeriodicSessions; type SessionManager = Invulnerables; diff --git a/runtime/dancebox/src/lib.rs b/runtime/dancebox/src/lib.rs index a275c237c..6f5eb2ed6 100644 --- a/runtime/dancebox/src/lib.rs +++ b/runtime/dancebox/src/lib.rs @@ -97,8 +97,8 @@ use { sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ - AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, Hash as HashT, - IdentityLookup, Verify, + AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, + Hash as HashT, IdentityLookup, Verify, }, transaction_validity::{TransactionSource, TransactionValidity}, AccountId32, ApplyExtrinsicResult, @@ -726,7 +726,7 @@ impl pallet_session::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ValidatorId = CollatorId; // we don't have stash and controller, thus we don't need the convert as well. - type ValidatorIdOf = pallet_invulnerables::IdentityCollator; + type ValidatorIdOf = ConvertInto; type ShouldEndSession = pallet_session::PeriodicSessions; type NextSessionRotation = pallet_session::PeriodicSessions; type SessionManager = CollatorsFromInvulnerablesAndThenFromStaking; @@ -1123,7 +1123,7 @@ impl pallet_invulnerables::Config for Runtime { type UpdateOrigin = EnsureRoot; type MaxInvulnerables = MaxInvulnerables; type CollatorId = ::AccountId; - type CollatorIdOf = pallet_invulnerables::IdentityCollator; + type CollatorIdOf = ConvertInto; type CollatorRegistration = Session; type WeightInfo = weights::pallet_invulnerables::SubstrateWeight; #[cfg(feature = "runtime-benchmarks")] diff --git a/runtime/flashbox/src/lib.rs b/runtime/flashbox/src/lib.rs index 08346eb97..724d9865b 100644 --- a/runtime/flashbox/src/lib.rs +++ b/runtime/flashbox/src/lib.rs @@ -88,8 +88,8 @@ use { sp_runtime::{ create_runtime_str, generic, impl_opaque_keys, traits::{ - AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, IdentityLookup, - Verify, + AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, + IdentityLookup, Verify, }, transaction_validity::{TransactionSource, TransactionValidity}, AccountId32, ApplyExtrinsicResult, @@ -608,7 +608,7 @@ impl pallet_session::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ValidatorId = ::AccountId; // we don't have stash and controller, thus we don't need the convert as well. - type ValidatorIdOf = pallet_invulnerables::IdentityCollator; + type ValidatorIdOf = ConvertInto; type ShouldEndSession = pallet_session::PeriodicSessions; type NextSessionRotation = pallet_session::PeriodicSessions; type SessionManager = CollatorsFromInvulnerables; @@ -971,7 +971,7 @@ impl pallet_invulnerables::Config for Runtime { type UpdateOrigin = EnsureRoot; type MaxInvulnerables = MaxInvulnerables; type CollatorId = CollatorId; - type CollatorIdOf = pallet_invulnerables::IdentityCollator; + type CollatorIdOf = ConvertInto; type CollatorRegistration = Session; type WeightInfo = weights::pallet_invulnerables::SubstrateWeight; #[cfg(feature = "runtime-benchmarks")] diff --git a/solo-chains/runtime/dancelight/src/genesis_config_presets.rs b/solo-chains/runtime/dancelight/src/genesis_config_presets.rs index a092ae3e1..7134acdcc 100644 --- a/solo-chains/runtime/dancelight/src/genesis_config_presets.rs +++ b/solo-chains/runtime/dancelight/src/genesis_config_presets.rs @@ -411,6 +411,7 @@ fn dancelight_testnet_genesis( ..Default::default() }, "externalValidators": crate::ExternalValidatorsConfig { + skip_external_validators: false, whitelisted_validators: initial_authorities .iter() .map(|x| { diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index fdc445a2b..0871b53a9 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -79,7 +79,10 @@ use { serde::{Deserialize, Serialize}, sp_core::{storage::well_known_keys as StorageWellKnownKeys, Get}, sp_genesis_builder::PresetId, - sp_runtime::{traits::BlockNumberProvider, AccountId32}, + sp_runtime::{ + traits::{BlockNumberProvider, ConvertInto}, + AccountId32, + }, sp_std::{ cmp::Ordering, collections::{btree_map::BTreeMap, btree_set::BTreeSet, vec_deque::VecDeque}, @@ -1247,7 +1250,7 @@ impl pallet_invulnerables::Config for Runtime { type UpdateOrigin = EnsureRoot; type MaxInvulnerables = MaxInvulnerables; type CollatorId = ::AccountId; - type CollatorIdOf = pallet_invulnerables::IdentityCollator; + type CollatorIdOf = ConvertInto; type CollatorRegistration = Session; type WeightInfo = (); #[cfg(feature = "runtime-benchmarks")] diff --git a/solo-chains/runtime/dancelight/src/tests/common/mod.rs b/solo-chains/runtime/dancelight/src/tests/common/mod.rs index dd4085e80..f155a87a9 100644 --- a/solo-chains/runtime/dancelight/src/tests/common/mod.rs +++ b/solo-chains/runtime/dancelight/src/tests/common/mod.rs @@ -636,6 +636,7 @@ impl ExtBuilder { } pallet_external_validators::GenesisConfig:: { + skip_external_validators: false, whitelisted_validators: self .validators .iter() diff --git a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs index 1b8136a07..7ffae844d 100644 --- a/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs +++ b/solo-chains/runtime/dancelight/src/tests/external_validators_tests.rs @@ -21,6 +21,7 @@ use { tests::common::*, ExternalValidators, MaxExternalValidators, SessionKeys, SessionsPerEra, }, frame_support::{assert_ok, traits::fungible::Mutate}, + pallet_external_validators::Forcing, std::{collections::HashMap, ops::RangeInclusive}, }; @@ -444,7 +445,10 @@ mod force_eras { ExternalValidators::set_external_validators(vec![mock_validator.clone()]).unwrap(); assert_eq!(ExternalValidators::current_era(), Some(0)); - assert_ok!(ExternalValidators::force_new_era(root_origin())); + assert_ok!(ExternalValidators::force_era( + root_origin(), + Forcing::ForceNew + )); // Still era 1, until next session assert_eq!(ExternalValidators::current_era(), Some(0)); assert_eq!(Session::current_index(), 0); @@ -549,7 +553,10 @@ mod force_eras { ExternalValidators::set_external_validators(vec![mock_validator.clone()]).unwrap(); // Validators will never change assert_eq!(ExternalValidators::current_era(), Some(0)); - assert_ok!(ExternalValidators::force_no_eras(root_origin())); + assert_ok!(ExternalValidators::force_era( + root_origin(), + Forcing::ForceNone + )); run_to_session(sessions_per_era); assert_eq!(ExternalValidators::current_era(), Some(0)); @@ -596,7 +603,10 @@ mod force_eras { ExternalValidators::set_external_validators(vec![mock_validator.clone()]).unwrap(); // Validators will change on every session assert_eq!(ExternalValidators::current_era(), Some(0)); - assert_ok!(ExternalValidators::force_new_era_always(root_origin())); + assert_ok!(ExternalValidators::force_era( + root_origin(), + Forcing::ForceAlways + )); run_to_session(2); assert_eq!(ExternalValidators::current_era(), Some(2)); diff --git a/solo-chains/runtime/dancelight/src/weights/pallet_external_validators.rs b/solo-chains/runtime/dancelight/src/weights/pallet_external_validators.rs index 99001dac2..f243a0807 100644 --- a/solo-chains/runtime/dancelight/src/weights/pallet_external_validators.rs +++ b/solo-chains/runtime/dancelight/src/weights/pallet_external_validators.rs @@ -97,7 +97,7 @@ impl pallet_external_validators::WeightInfo for Substra } /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) - fn force_no_eras() -> Weight { + fn force_era() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` @@ -105,26 +105,6 @@ impl pallet_external_validators::WeightInfo for Substra Weight::from_parts(4_781_000, 0) .saturating_add(T::DbWeight::get().writes(1_u64)) } - /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) - /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) - fn force_new_era() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_475_000 picoseconds. - Weight::from_parts(4_785_000, 0) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } - /// Storage: `ExternalValidators::ForceEra` (r:0 w:1) - /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) - fn force_new_era_always() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 4_407_000 picoseconds. - Weight::from_parts(4_680_000, 0) - .saturating_add(T::DbWeight::get().writes(1_u64)) - } /// Storage: `ExternalValidators::ForceEra` (r:1 w:0) /// Proof: `ExternalValidators::ForceEra` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) /// Storage: `ExternalValidators::EraSessionStart` (r:1 w:1) @@ -149,4 +129,4 @@ impl pallet_external_validators::WeightInfo for Substra .saturating_add(T::DbWeight::get().reads(6_u64)) .saturating_add(T::DbWeight::get().writes(2_u64)) } -} \ No newline at end of file +} From 916efa58769b07cc045eabc2a7bd1d774a6d3e38 Mon Sep 17 00:00:00 2001 From: girazoki Date: Wed, 30 Oct 2024 18:06:33 +0100 Subject: [PATCH 61/82] wip --- solo-chains/runtime/dancelight/src/lib.rs | 4 ++-- .../slashes/test_slashes_are_confirmed_after_defer_period.ts | 2 +- .../test_slashes_are_not_applicable_to_invulnerables.ts | 2 +- .../slashes/test_slashes_are_removed_after_bonding_period.ts | 2 +- test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts | 5 ++++- .../slashes/test_slashes_can_be_cancelled.ts | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index 72512b77a..4a4f60b06 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -487,7 +487,7 @@ impl pallet_session::historical::Config for Runtime { } parameter_types! { - pub const BondingDuration: sp_staking::EraIndex = runtime_common::prod_or_fast!(12, 5); + pub const BondingDuration: sp_staking::EraIndex = runtime_common::prod_or_fast!(28, 3); } parameter_types! { @@ -1210,7 +1210,7 @@ impl SessionInterface for DancelightSessionInterface { parameter_types! { pub const SessionsPerEra: SessionIndex = runtime_common::prod_or_fast!(6, 3); - pub const SlashDeferDuration: EraIndex = runtime_common::prod_or_fast!(11, 4); + pub const SlashDeferDuration: EraIndex = runtime_common::prod_or_fast!(27, 2); } impl pallet_external_validators::Config for Runtime { diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts index 6c216f394..0b26310ad 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts @@ -64,7 +64,7 @@ describeSuite({ await context.createBlock(signedTx); // Slash item should be there - const DeferPeriod = 2; + const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.SlashDeferDuration; // scheduled slashes const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts index 88b99743c..d75f7a7fd 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts @@ -56,7 +56,7 @@ describeSuite({ await context.createBlock(signedTx); // Slash item should be there - const DeferPeriod = 2; + const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.SlashDeferDuration; // Alice is an invulnerable, therefore she should not be slashed const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts index 9ce814674..2401517ed 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts @@ -64,7 +64,7 @@ describeSuite({ await context.createBlock(signedTx); // Slash item should be there - const DeferPeriod = 2; + const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.SlashDeferDuration; // scheduled slashes const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts index 8b8c4c297..2b54a8cd7 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts @@ -47,6 +47,8 @@ describeSuite({ ) ).unwrap(); + console.log(keyOwnershipProof) + const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( polkadotJs.tx.utility.dispatchAs( { @@ -64,8 +66,9 @@ describeSuite({ await context.createBlock(signedTx); // Slash item should be there - const DeferPeriod = 2; + const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.slashDeferDuration; + console.log(DeferPeriod) // scheduled slashes const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); expect(expectedSlashes.length).to.be.eq(1); diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts index e2a802254..218421760 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts @@ -64,7 +64,7 @@ describeSuite({ await context.createBlock(signedTx); // Slash item should be there - const DeferPeriod = 2; + const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.SlashDeferDuration; // scheduled slashes const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); From 485ce853c7b4490bc3a786365d2be4b89ef0f750 Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 30 Oct 2024 18:16:34 +0100 Subject: [PATCH 62/82] typescript-api --- .../interfaces/augment-api-errors.ts | 16 ++--- .../interfaces/augment-api-events.ts | 4 +- .../dancelight/interfaces/augment-api-tx.ts | 59 +++++-------------- .../src/dancelight/interfaces/lookup.ts | 14 ++--- .../src/dancelight/interfaces/types-lookup.ts | 31 ++++------ 5 files changed, 45 insertions(+), 79 deletions(-) diff --git a/typescript-api/src/dancelight/interfaces/augment-api-errors.ts b/typescript-api/src/dancelight/interfaces/augment-api-errors.ts index 33b6f83ed..e41215365 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-errors.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-errors.ts @@ -230,16 +230,16 @@ declare module "@polkadot/api-base/types/errors" { [key: string]: AugmentedError; }; externalValidators: { - /** Account is already an Invulnerable. */ - AlreadyInvulnerable: AugmentedError; + /** Account is already whitelisted. */ + AlreadyWhitelisted: AugmentedError; /** Account does not have keys registered */ NoKeysRegistered: AugmentedError; - /** Account is not an Invulnerable. */ - NotInvulnerable: AugmentedError; - /** There are too many Invulnerables. */ - TooManyInvulnerables: AugmentedError; - /** Unable to derive collator id from account id */ - UnableToDeriveCollatorId: AugmentedError; + /** Account is not whitelisted. */ + NotWhitelisted: AugmentedError; + /** There are too many whitelisted validators. */ + TooManyWhitelisted: AugmentedError; + /** Unable to derive validator id from account id */ + UnableToDeriveValidatorId: AugmentedError; /** Generic error */ [key: string]: AugmentedError; }; diff --git a/typescript-api/src/dancelight/interfaces/augment-api-events.ts b/typescript-api/src/dancelight/interfaces/augment-api-events.ts index 129b2eab1..b96506f9e 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-events.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-events.ts @@ -221,9 +221,9 @@ declare module "@polkadot/api-base/types/events" { >; /** A new era has started. */ NewEra: AugmentedEvent; - /** A new Invulnerable was added. */ + /** A new whitelisted validator was added. */ WhitelistedValidatorAdded: AugmentedEvent; - /** An Invulnerable was removed. */ + /** A whitelisted validator was removed. */ WhitelistedValidatorRemoved: AugmentedEvent; /** Generic event */ [key: string]: AugmentedEvent; diff --git a/typescript-api/src/dancelight/interfaces/augment-api-tx.ts b/typescript-api/src/dancelight/interfaces/augment-api-tx.ts index ba5866b99..5dc700896 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-tx.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-tx.ts @@ -29,6 +29,7 @@ import type { PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDataPreserversProfile, + PalletExternalValidatorsForcing, PalletIdentityJudgement, PalletIdentityLegacyIdentityInfo, PalletMigrationsHistoricCleanupSelector, @@ -1284,50 +1285,20 @@ declare module "@polkadot/api-base/types/submittable" { (who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic, [AccountId32] >; - /** - * Force there to be a new era at the end of the next session. After this, it will be reset to normal (non-forced) - * behaviour. - * - * The dispatch origin must be Root. - * - * # Warning - * - * The election process starts multiple blocks before the end of the era. If this is called just before a new era - * is triggered, the election process may not have enough blocks to get a result. - * - * ## Complexity - * - * - No arguments. - * - Weight: O(1) - */ - forceNewEra: AugmentedSubmittable<() => SubmittableExtrinsic, []>; - /** - * Force there to be a new era at the end of sessions indefinitely. - * - * The dispatch origin must be Root. - * - * # Warning - * - * The election process starts multiple blocks before the end of the era. If this is called just before a new era - * is triggered, the election process may not have enough blocks to get a result. - */ - forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic, []>; - /** - * Force there to be no new eras indefinitely. - * - * The dispatch origin must be Root. - * - * # Warning - * - * The election process starts multiple blocks before the end of the era. Thus the election process may be ongoing - * when this is called. In this case the election will continue until the next era is triggered. - * - * ## Complexity - * - * - No arguments. - * - Weight: O(1) - */ - forceNoEras: AugmentedSubmittable<() => SubmittableExtrinsic, []>; + /** Force when the next era will start. Possible values: next session, never, same as always. */ + forceEra: AugmentedSubmittable< + ( + mode: + | PalletExternalValidatorsForcing + | "NotForcing" + | "ForceNew" + | "ForceNone" + | "ForceAlways" + | number + | Uint8Array + ) => SubmittableExtrinsic, + [PalletExternalValidatorsForcing] + >; /** * Remove an account `who` from the list of `WhitelistedValidators` collators. * diff --git a/typescript-api/src/dancelight/interfaces/lookup.ts b/typescript-api/src/dancelight/interfaces/lookup.ts index b8a0173f2..a0d2e6cb1 100644 --- a/typescript-api/src/dancelight/interfaces/lookup.ts +++ b/typescript-api/src/dancelight/interfaces/lookup.ts @@ -1174,9 +1174,9 @@ export default { remove_whitelisted: { who: "AccountId32", }, - force_no_eras: "Null", - force_new_era: "Null", - force_new_era_always: "Null", + force_era: { + mode: "PalletExternalValidatorsForcing", + }, }, }, /** Lookup131: pallet_session::pallet::Call */ @@ -4996,11 +4996,11 @@ export default { /** Lookup571: pallet_external_validators::pallet::Error */ PalletExternalValidatorsError: { _enum: [ - "TooManyInvulnerables", - "AlreadyInvulnerable", - "NotInvulnerable", + "TooManyWhitelisted", + "AlreadyWhitelisted", + "NotWhitelisted", "NoKeysRegistered", - "UnableToDeriveCollatorId", + "UnableToDeriveValidatorId", ], }, /** Lookup576: sp_core::crypto::KeyTypeId */ diff --git a/typescript-api/src/dancelight/interfaces/types-lookup.ts b/typescript-api/src/dancelight/interfaces/types-lookup.ts index c106648b3..442ca7e4c 100644 --- a/typescript-api/src/dancelight/interfaces/types-lookup.ts +++ b/typescript-api/src/dancelight/interfaces/types-lookup.ts @@ -1511,16 +1511,11 @@ declare module "@polkadot/types/lookup" { readonly asRemoveWhitelisted: { readonly who: AccountId32; } & Struct; - readonly isForceNoEras: boolean; - readonly isForceNewEra: boolean; - readonly isForceNewEraAlways: boolean; - readonly type: - | "SkipExternalValidators" - | "AddWhitelisted" - | "RemoveWhitelisted" - | "ForceNoEras" - | "ForceNewEra" - | "ForceNewEraAlways"; + readonly isForceEra: boolean; + readonly asForceEra: { + readonly mode: PalletExternalValidatorsForcing; + } & Struct; + readonly type: "SkipExternalValidators" | "AddWhitelisted" | "RemoveWhitelisted" | "ForceEra"; } /** @name PalletSessionCall (131) */ @@ -6405,17 +6400,17 @@ declare module "@polkadot/types/lookup" { /** @name PalletExternalValidatorsError (571) */ interface PalletExternalValidatorsError extends Enum { - readonly isTooManyInvulnerables: boolean; - readonly isAlreadyInvulnerable: boolean; - readonly isNotInvulnerable: boolean; + readonly isTooManyWhitelisted: boolean; + readonly isAlreadyWhitelisted: boolean; + readonly isNotWhitelisted: boolean; readonly isNoKeysRegistered: boolean; - readonly isUnableToDeriveCollatorId: boolean; + readonly isUnableToDeriveValidatorId: boolean; readonly type: - | "TooManyInvulnerables" - | "AlreadyInvulnerable" - | "NotInvulnerable" + | "TooManyWhitelisted" + | "AlreadyWhitelisted" + | "NotWhitelisted" | "NoKeysRegistered" - | "UnableToDeriveCollatorId"; + | "UnableToDeriveValidatorId"; } /** @name SpCoreCryptoKeyTypeId (576) */ From 5cdac08e017798a0e0034c46568302d5e0405b2a Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Wed, 30 Oct 2024 18:26:55 +0100 Subject: [PATCH 63/82] typescript-api --- .../src/dancelight/interfaces/lookup.ts | 21 +++++++++++++++++-- .../src/dancelight/interfaces/types-lookup.ts | 18 ++++++++++++++-- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/typescript-api/src/dancelight/interfaces/lookup.ts b/typescript-api/src/dancelight/interfaces/lookup.ts index a0d2e6cb1..ad1e3967e 100644 --- a/typescript-api/src/dancelight/interfaces/lookup.ts +++ b/typescript-api/src/dancelight/interfaces/lookup.ts @@ -2612,7 +2612,16 @@ export default { }, /** Lookup291: dancelight_runtime::ProxyType */ DancelightRuntimeProxyType: { - _enum: ["Any", "NonTransfer", "Governance", "IdentityJudgement", "CancelProxy", "Auction", "OnDemandOrdering"], + _enum: [ + "Any", + "NonTransfer", + "Governance", + "IdentityJudgement", + "CancelProxy", + "Auction", + "OnDemandOrdering", + "SudoRegistrar", + ], }, /** Lookup292: pallet_multisig::pallet::Call */ PalletMultisigCall: { @@ -6094,6 +6103,14 @@ export default { FrameSystemExtensionsCheckWeight: "Null", /** Lookup819: pallet_transaction_payment::ChargeTransactionPayment */ PalletTransactionPaymentChargeTransactionPayment: "Compact", - /** Lookup820: dancelight_runtime::Runtime */ + /** Lookup820: frame_metadata_hash_extension::CheckMetadataHash */ + FrameMetadataHashExtensionCheckMetadataHash: { + mode: "FrameMetadataHashExtensionMode", + }, + /** Lookup821: frame_metadata_hash_extension::Mode */ + FrameMetadataHashExtensionMode: { + _enum: ["Disabled", "Enabled"], + }, + /** Lookup822: dancelight_runtime::Runtime */ DancelightRuntimeRuntime: "Null", }; diff --git a/typescript-api/src/dancelight/interfaces/types-lookup.ts b/typescript-api/src/dancelight/interfaces/types-lookup.ts index 442ca7e4c..ff5f90d32 100644 --- a/typescript-api/src/dancelight/interfaces/types-lookup.ts +++ b/typescript-api/src/dancelight/interfaces/types-lookup.ts @@ -3193,6 +3193,7 @@ declare module "@polkadot/types/lookup" { readonly isCancelProxy: boolean; readonly isAuction: boolean; readonly isOnDemandOrdering: boolean; + readonly isSudoRegistrar: boolean; readonly type: | "Any" | "NonTransfer" @@ -3200,7 +3201,8 @@ declare module "@polkadot/types/lookup" { | "IdentityJudgement" | "CancelProxy" | "Auction" - | "OnDemandOrdering"; + | "OnDemandOrdering" + | "SudoRegistrar"; } /** @name PalletMultisigCall (292) */ @@ -7897,6 +7899,18 @@ declare module "@polkadot/types/lookup" { /** @name PalletTransactionPaymentChargeTransactionPayment (819) */ interface PalletTransactionPaymentChargeTransactionPayment extends Compact {} - /** @name DancelightRuntimeRuntime (820) */ + /** @name FrameMetadataHashExtensionCheckMetadataHash (820) */ + interface FrameMetadataHashExtensionCheckMetadataHash extends Struct { + readonly mode: FrameMetadataHashExtensionMode; + } + + /** @name FrameMetadataHashExtensionMode (821) */ + interface FrameMetadataHashExtensionMode extends Enum { + readonly isDisabled: boolean; + readonly isEnabled: boolean; + readonly type: "Disabled" | "Enabled"; + } + + /** @name DancelightRuntimeRuntime (822) */ type DancelightRuntimeRuntime = Null; } // declare module From fdd3cc8a2f8c0717e38e72c49adcce21f7215698 Mon Sep 17 00:00:00 2001 From: girazoki Date: Wed, 30 Oct 2024 19:09:14 +0100 Subject: [PATCH 64/82] new tests --- .../slashes/test_slashes_are_confirmed_after_defer_period.ts | 2 +- .../test_slashes_are_not_applicable_to_invulnerables.ts | 4 ++-- .../slashes/test_slashes_are_removed_after_bonding_period.ts | 4 ++-- test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts | 3 +-- .../dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts | 2 +- test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts index 0b26310ad..b652ea603 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts @@ -64,7 +64,7 @@ describeSuite({ await context.createBlock(signedTx); // Slash item should be there - const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.SlashDeferDuration; + const DeferPeriod = (await polkadotJs.consts.externalValidatorSlashes.slashDeferDuration).toNumber(); // scheduled slashes const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts index d75f7a7fd..e00fe5b01 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts @@ -56,10 +56,10 @@ describeSuite({ await context.createBlock(signedTx); // Slash item should be there - const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.SlashDeferDuration; + const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.slashDeferDuration; // Alice is an invulnerable, therefore she should not be slashed - const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod.toNumber() + 1); expect(expectedSlashes.length).to.be.eq(0); }, }); diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts index 2401517ed..e3044c9fc 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts @@ -64,7 +64,7 @@ describeSuite({ await context.createBlock(signedTx); // Slash item should be there - const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.SlashDeferDuration; + const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.slashDeferDuration; // scheduled slashes const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); @@ -89,7 +89,7 @@ describeSuite({ // scheduled slashes const expectedSlashesAfterDefer = await polkadotJs.query.externalValidatorSlashes.slashes( - DeferPeriod + 1 + DeferPeriod.toNumber() + 1 ); expect(expectedSlashesAfterDefer.length).to.be.eq(0); }, diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts index 2b54a8cd7..a23f158bb 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts @@ -68,9 +68,8 @@ describeSuite({ // Slash item should be there const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.slashDeferDuration; - console.log(DeferPeriod) // scheduled slashes - const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod.toNumber() + 1); expect(expectedSlashes.length).to.be.eq(1); expect(u8aToHex(expectedSlashes[0].validator)).to.be.eq(u8aToHex(aliceStash.addressRaw)); }, diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts index 218421760..c0281eb8a 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts @@ -64,7 +64,7 @@ describeSuite({ await context.createBlock(signedTx); // Slash item should be there - const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.SlashDeferDuration; + const DeferPeriod = (await polkadotJs.consts.externalValidatorSlashes.slashDeferDuration).toNumber(); // scheduled slashes const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts index 6ec531e5b..d62d58851 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts @@ -63,7 +63,7 @@ describeSuite({ await context.createBlock(signedTx); // Slash item should be there - const DeferPeriod = 2; + const DeferPeriod = (await polkadotJs.consts.externalValidatorSlashes.slashDeferDuration).toNumber(); // scheduled slashes const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); From dd0eb781591a2f669ec935d892c5f70b4fc53920 Mon Sep 17 00:00:00 2001 From: girazoki Date: Wed, 30 Oct 2024 19:09:41 +0100 Subject: [PATCH 65/82] typescript api --- .../src/dancelight/interfaces/augment-api-errors.ts | 1 + typescript-api/src/dancelight/interfaces/augment-api-query.ts | 1 + typescript-api/src/dancelight/interfaces/augment-api-tx.ts | 1 + typescript-api/src/dancelight/interfaces/lookup.ts | 1 + typescript-api/src/dancelight/interfaces/types-lookup.ts | 4 +++- 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/typescript-api/src/dancelight/interfaces/augment-api-errors.ts b/typescript-api/src/dancelight/interfaces/augment-api-errors.ts index 36c202cfd..3ec85b6df 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-errors.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-errors.ts @@ -247,6 +247,7 @@ declare module "@polkadot/api-base/types/errors" { ActiveEraNotSet: AugmentedError; DeferPeriodIsOver: AugmentedError; EmptyTargets: AugmentedError; + ErrorComputingSlash: AugmentedError; InvalidSlashIndex: AugmentedError; NotSortedAndUnique: AugmentedError; ProvidedFutureEra: AugmentedError; diff --git a/typescript-api/src/dancelight/interfaces/augment-api-query.ts b/typescript-api/src/dancelight/interfaces/augment-api-query.ts index 795e66174..0b044d84f 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-query.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-query.ts @@ -706,6 +706,7 @@ declare module "@polkadot/api-base/types/storage" { */ bondedEras: AugmentedQuery Observable>>, []> & QueryableStorageEntry; + /** A counter on the number of slashes we have performed */ nextSlashId: AugmentedQuery Observable, []> & QueryableStorageEntry; /** All unapplied slashes that are queued for later. */ slashes: AugmentedQuery< diff --git a/typescript-api/src/dancelight/interfaces/augment-api-tx.ts b/typescript-api/src/dancelight/interfaces/augment-api-tx.ts index b4055f819..eabc1ca4d 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-tx.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-tx.ts @@ -1350,6 +1350,7 @@ declare module "@polkadot/api-base/types/submittable" { [key: string]: SubmittableExtrinsicFunction; }; externalValidatorSlashes: { + /** Cancel a slash that was deferred for a later era */ cancelDeferredSlash: AugmentedSubmittable< ( era: u32 | AnyNumber | Uint8Array, diff --git a/typescript-api/src/dancelight/interfaces/lookup.ts b/typescript-api/src/dancelight/interfaces/lookup.ts index ebaae77d5..e21a03653 100644 --- a/typescript-api/src/dancelight/interfaces/lookup.ts +++ b/typescript-api/src/dancelight/interfaces/lookup.ts @@ -5045,6 +5045,7 @@ export default { "ProvidedNonSlashableEra", "ActiveEraNotSet", "DeferPeriodIsOver", + "ErrorComputingSlash", ], }, /** Lookup582: sp_core::crypto::KeyTypeId */ diff --git a/typescript-api/src/dancelight/interfaces/types-lookup.ts b/typescript-api/src/dancelight/interfaces/types-lookup.ts index 37fe214a3..c2e4a34f1 100644 --- a/typescript-api/src/dancelight/interfaces/types-lookup.ts +++ b/typescript-api/src/dancelight/interfaces/types-lookup.ts @@ -6463,6 +6463,7 @@ declare module "@polkadot/types/lookup" { readonly isProvidedNonSlashableEra: boolean; readonly isActiveEraNotSet: boolean; readonly isDeferPeriodIsOver: boolean; + readonly isErrorComputingSlash: boolean; readonly type: | "EmptyTargets" | "InvalidSlashIndex" @@ -6470,7 +6471,8 @@ declare module "@polkadot/types/lookup" { | "ProvidedFutureEra" | "ProvidedNonSlashableEra" | "ActiveEraNotSet" - | "DeferPeriodIsOver"; + | "DeferPeriodIsOver" + | "ErrorComputingSlash"; } /** @name SpCoreCryptoKeyTypeId (582) */ From 65c1f33f376d9c0a5146f48c7b571f3074a24c60 Mon Sep 17 00:00:00 2001 From: girazoki Date: Wed, 30 Oct 2024 19:49:39 +0100 Subject: [PATCH 66/82] try now --- ...lashes_are_confirmed_after_defer_period.ts | 3 +- ...hes_are_not_applicable_to_invulnerables.ts | 3 +- ...lashes_are_removed_after_bonding_period.ts | 3 +- .../slashes/test_slashes_babe.ts | 5 +- .../slashes/test_slashes_can_be_cancelled.ts | 3 +- .../slashes/test_slashes_grandpa.ts | 3 +- .../interfaces/augment-api-runtime.ts | 43 +++++- .../src/dancebox/interfaces/augment-types.ts | 136 +++++++++++++++++- .../dancelight/interfaces/augment-types.ts | 136 +++++++++++++++++- .../src/flashbox/interfaces/augment-types.ts | 136 +++++++++++++++++- 10 files changed, 444 insertions(+), 27 deletions(-) diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts index b652ea603..9b27c56e7 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_confirmed_after_defer_period.ts @@ -46,13 +46,14 @@ describeSuite({ u8aToHex(aliceBabePair.publicKey) ) ).unwrap(); + const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( polkadotJs.tx.utility.dispatchAs( { system: { Signed: alice.address }, } as any, - polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof) + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProofHex) ), { refTime: 1n, diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts index e00fe5b01..1ac9e17ef 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts @@ -38,13 +38,14 @@ describeSuite({ u8aToHex(aliceBabePair.publicKey) ) ).unwrap(); + const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( polkadotJs.tx.utility.dispatchAs( { system: { Signed: alice.address }, } as any, - polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof) + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProofHex) ), { refTime: 1n, diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts index e3044c9fc..220cb1111 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts @@ -46,13 +46,14 @@ describeSuite({ u8aToHex(aliceBabePair.publicKey) ) ).unwrap(); + const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( polkadotJs.tx.utility.dispatchAs( { system: { Signed: alice.address }, } as any, - polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof) + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProofHex) ), { refTime: 1n, diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts index a23f158bb..bd49f12c4 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts @@ -46,15 +46,14 @@ describeSuite({ u8aToHex(aliceBabePair.publicKey) ) ).unwrap(); - - console.log(keyOwnershipProof) + const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( polkadotJs.tx.utility.dispatchAs( { system: { Signed: alice.address }, } as any, - polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof) + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProofHex) ), { refTime: 1n, diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts index c0281eb8a..8047093e7 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_can_be_cancelled.ts @@ -46,13 +46,14 @@ describeSuite({ u8aToHex(aliceBabePair.publicKey) ) ).unwrap(); + const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( polkadotJs.tx.utility.dispatchAs( { system: { Signed: alice.address }, } as any, - polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProof) + polkadotJs.tx.babe.reportEquivocation(doubleVotingProof, keyOwnershipProofHex) ), { refTime: 1n, diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts index d62d58851..830ca0a3f 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_grandpa.ts @@ -45,13 +45,14 @@ describeSuite({ u8aToHex(aliceGrandpaPair.publicKey) ) ).unwrap(); + const keyOwnershipProofHex = `0x${keyOwnershipProof.toHuman().toString().slice(8)}`; const tx = polkadotJs.tx.sudo.sudoUncheckedWeight( polkadotJs.tx.utility.dispatchAs( { system: { Signed: alice.address }, } as any, - polkadotJs.tx.grandpa.reportEquivocation(doubleVotingProof, keyOwnershipProof) + polkadotJs.tx.grandpa.reportEquivocation(doubleVotingProof, keyOwnershipProofHex) ), { refTime: 1n, diff --git a/typescript-api/src/dancebox/interfaces/augment-api-runtime.ts b/typescript-api/src/dancebox/interfaces/augment-api-runtime.ts index 087e4590d..c6543a26d 100644 --- a/typescript-api/src/dancebox/interfaces/augment-api-runtime.ts +++ b/typescript-api/src/dancebox/interfaces/augment-api-runtime.ts @@ -7,11 +7,12 @@ import "@polkadot/api-base/types/calls"; import type { ApiTypes, AugmentedCall, DecoratedCallBase } from "@polkadot/api-base/types"; import type { Bytes, Null, Option, Result, Vec, u128, u32 } from "@polkadot/types-codec"; -import type { AnyNumber, ITuple } from "@polkadot/types-codec/types"; +import type { AnyNumber, IMethod, ITuple } from "@polkadot/types-codec/types"; import type { CheckInherentsResult, InherentData } from "@polkadot/types/interfaces/blockbuilder"; import type { BlockHash } from "@polkadot/types/interfaces/chain"; import type { AuthorityId } from "@polkadot/types/interfaces/consensus"; import type { CollationInfo } from "@polkadot/types/interfaces/cumulus"; +import type { CallDryRunEffects, XcmDryRunApiError, XcmDryRunEffects } from "@polkadot/types/interfaces/dryRunApi"; import type { Extrinsic } from "@polkadot/types/interfaces/extrinsics"; import type { GenesisBuildErr } from "@polkadot/types/interfaces/genesisBuilder"; import type { OpaqueMetadata } from "@polkadot/types/interfaces/metadata"; @@ -24,6 +25,8 @@ import type { Header, Index, KeyTypeId, + OriginCaller, + RuntimeCall, SlotDuration, Weight, WeightV2, @@ -31,6 +34,7 @@ import type { import type { RuntimeVersion } from "@polkadot/types/interfaces/state"; import type { ApplyExtrinsicResult } from "@polkadot/types/interfaces/system"; import type { TransactionSource, TransactionValidity } from "@polkadot/types/interfaces/txqueue"; +import type { VersionedMultiLocation, VersionedXcm } from "@polkadot/types/interfaces/xcm"; import type { XcmPaymentApiError } from "@polkadot/types/interfaces/xcmPaymentApi"; import type { Error } from "@polkadot/types/interfaces/xcmRuntimeApi"; import type { XcmVersionedAssetId, XcmVersionedLocation, XcmVersionedXcm } from "@polkadot/types/lookup"; @@ -121,6 +125,43 @@ declare module "@polkadot/api-base/types/calls" { /** Generic call */ [key: string]: DecoratedCallBase; }; + /** 0x91b1c8b16328eb92/1 */ + dryRunApi: { + /** Dry run call */ + dryRunCall: AugmentedCall< + ApiType, + ( + origin: OriginCaller | { System: any } | string | Uint8Array, + call: RuntimeCall | IMethod | string | Uint8Array + ) => Observable> + >; + /** Dry run XCM program */ + dryRunXcm: AugmentedCall< + ApiType, + ( + originLocation: + | VersionedMultiLocation + | { V0: any } + | { V1: any } + | { V2: any } + | { V3: any } + | { V4: any } + | string + | Uint8Array, + xcm: + | VersionedXcm + | { V0: any } + | { V1: any } + | { V2: any } + | { V3: any } + | { V4: any } + | string + | Uint8Array + ) => Observable> + >; + /** Generic call */ + [key: string]: DecoratedCallBase; + }; /** 0xfbc577b9d747efd6/1 */ genesisBuilder: { /** Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage. */ diff --git a/typescript-api/src/dancebox/interfaces/augment-types.ts b/typescript-api/src/dancebox/interfaces/augment-types.ts index 8258442d0..b47f3cdcb 100644 --- a/typescript-api/src/dancebox/interfaces/augment-types.ts +++ b/typescript-api/src/dancebox/interfaces/augment-types.ts @@ -311,6 +311,13 @@ import type { VotingDirectVote, } from "@polkadot/types/interfaces/democracy"; import type { BlockStats } from "@polkadot/types/interfaces/dev"; +import type { + CallDryRunEffects, + DispatchResultWithPostInfo, + PostDispatchInfo, + XcmDryRunApiError, + XcmDryRunEffects, +} from "@polkadot/types/interfaces/dryRunApi"; import type { ApprovalFlag, DefunctVoter, @@ -396,10 +403,13 @@ import type { ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, + ExtrinsicPayloadV5, ExtrinsicSignature, ExtrinsicSignatureV4, + ExtrinsicSignatureV5, ExtrinsicUnknown, ExtrinsicV4, + ExtrinsicV5, ImmortalEra, MortalEra, MultiSignature, @@ -1145,48 +1155,88 @@ import type { import type { Multisig, Timepoint } from "@polkadot/types/interfaces/utility"; import type { VestingInfo } from "@polkadot/types/interfaces/vesting"; import type { + AssetIdV2, + AssetIdV3, + AssetIdV4, AssetInstance, AssetInstanceV0, AssetInstanceV1, AssetInstanceV2, + AssetInstanceV3, + AssetInstanceV4, BodyId, + BodyIdV2, + BodyIdV3, BodyPart, + BodyPartV2, + BodyPartV3, DoubleEncodedCall, Fungibility, FungibilityV0, FungibilityV1, FungibilityV2, + FungibilityV3, + FungibilityV4, InboundStatus, InstructionV2, + InstructionV3, + InstructionV4, InteriorMultiLocation, + InteriorMultiLocationV2, + InteriorMultiLocationV3, Junction, JunctionV0, JunctionV1, JunctionV2, + JunctionV3, + JunctionV4, Junctions, JunctionsV1, JunctionsV2, + JunctionsV3, + JunctionsV4, + MaxPalletNameLen, + MaxPalletsInfo, + MaybeErrorCodeV3, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, + MultiAssetFilterV3, + MultiAssetFilterV4, MultiAssetV0, MultiAssetV1, MultiAssetV2, + MultiAssetV3, + MultiAssetV4, MultiAssets, MultiAssetsV1, MultiAssetsV2, + MultiAssetsV3, + MultiAssetsV4, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, + MultiLocationV3, + MultiLocationV4, NetworkId, + NetworkIdV2, + NetworkIdV3, + NetworkIdV4, OriginKindV0, OriginKindV1, OriginKindV2, + OriginKindV3, + OriginKindV4, OutboundStatus, Outcome, + OutcomeV4, + PalletInfoV3, + PalletInfoV4, QueryId, + QueryResponseInfoV3, + QueryResponseInfoV4, QueryStatus, QueueConfigData, Response, @@ -1194,36 +1244,49 @@ import type { ResponseV1, ResponseV2, ResponseV2Error, - ResponseV2Result, + ResponseV3, + ResponseV3Error, + ResponseV3Result, + ResponseV4, + UncheckedFungibilityV4, VersionMigrationStage, + VersionV3, + VersionV4, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, + WeightLimitV3, WildFungibility, WildFungibilityV0, WildFungibilityV1, WildFungibilityV2, + WildFungibilityV3, + WildFungibilityV4, WildMultiAsset, WildMultiAssetV1, WildMultiAssetV2, + WildMultiAssetV3, + WildMultiAssetV4, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, - XcmOrder, + XcmErrorV3, + XcmErrorV4, XcmOrderV0, XcmOrderV1, - XcmOrderV2, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, + XcmV3, + XcmV4, XcmVersion, XcmpMessageFormat, } from "@polkadot/types/interfaces/xcm"; @@ -1275,10 +1338,15 @@ declare module "@polkadot/types/types/registry" { AssetDestroyWitness: AssetDestroyWitness; AssetDetails: AssetDetails; AssetId: AssetId; + AssetIdV2: AssetIdV2; + AssetIdV3: AssetIdV3; + AssetIdV4: AssetIdV4; AssetInstance: AssetInstance; AssetInstanceV0: AssetInstanceV0; AssetInstanceV1: AssetInstanceV1; AssetInstanceV2: AssetInstanceV2; + AssetInstanceV3: AssetInstanceV3; + AssetInstanceV4: AssetInstanceV4; AssetMetadata: AssetMetadata; AssetOptions: AssetOptions; AssignmentId: AssignmentId; @@ -1351,7 +1419,11 @@ declare module "@polkadot/types/types/registry" { BlockV2: BlockV2; BlockWeights: BlockWeights; BodyId: BodyId; + BodyIdV2: BodyIdV2; + BodyIdV3: BodyIdV3; BodyPart: BodyPart; + BodyPartV2: BodyPartV2; + BodyPartV3: BodyPartV3; bool: bool; Bool: Bool; Bounty: Bounty; @@ -1367,6 +1439,7 @@ declare module "@polkadot/types/types/registry" { BufferedSessionChange: BufferedSessionChange; Bytes: Bytes; Call: Call; + CallDryRunEffects: CallDryRunEffects; CallHash: CallHash; CallHashOf: CallHashOf; CallIndex: CallIndex; @@ -1526,6 +1599,7 @@ declare module "@polkadot/types/types/registry" { DispatchResult: DispatchResult; DispatchResultOf: DispatchResultOf; DispatchResultTo198: DispatchResultTo198; + DispatchResultWithPostInfo: DispatchResultWithPostInfo; DisputeLocation: DisputeLocation; DisputeProof: DisputeProof; DisputeResult: DisputeResult; @@ -1645,12 +1719,15 @@ declare module "@polkadot/types/types/registry" { ExtrinsicPayload: ExtrinsicPayload; ExtrinsicPayloadUnknown: ExtrinsicPayloadUnknown; ExtrinsicPayloadV4: ExtrinsicPayloadV4; + ExtrinsicPayloadV5: ExtrinsicPayloadV5; ExtrinsicSignature: ExtrinsicSignature; ExtrinsicSignatureV4: ExtrinsicSignatureV4; + ExtrinsicSignatureV5: ExtrinsicSignatureV5; ExtrinsicStatus: ExtrinsicStatus; ExtrinsicsWeight: ExtrinsicsWeight; ExtrinsicUnknown: ExtrinsicUnknown; ExtrinsicV4: ExtrinsicV4; + ExtrinsicV5: ExtrinsicV5; f32: f32; F32: F32; f64: f64; @@ -1686,6 +1763,8 @@ declare module "@polkadot/types/types/registry" { FungibilityV0: FungibilityV0; FungibilityV1: FungibilityV1; FungibilityV2: FungibilityV2; + FungibilityV3: FungibilityV3; + FungibilityV4: FungibilityV4; FungiblesAccessError: FungiblesAccessError; Gas: Gas; GenesisBuildErr: GenesisBuildErr; @@ -1772,8 +1851,12 @@ declare module "@polkadot/types/types/registry" { InstantiateReturnValueOk: InstantiateReturnValueOk; InstantiateReturnValueTo267: InstantiateReturnValueTo267; InstructionV2: InstructionV2; + InstructionV3: InstructionV3; + InstructionV4: InstructionV4; InstructionWeights: InstructionWeights; InteriorMultiLocation: InteriorMultiLocation; + InteriorMultiLocationV2: InteriorMultiLocationV2; + InteriorMultiLocationV3: InteriorMultiLocationV3; InvalidDisputeStatementKind: InvalidDisputeStatementKind; InvalidTransaction: InvalidTransaction; isize: isize; @@ -1783,9 +1866,13 @@ declare module "@polkadot/types/types/registry" { Junctions: Junctions; JunctionsV1: JunctionsV1; JunctionsV2: JunctionsV2; + JunctionsV3: JunctionsV3; + JunctionsV4: JunctionsV4; JunctionV0: JunctionV0; JunctionV1: JunctionV1; JunctionV2: JunctionV2; + JunctionV3: JunctionV3; + JunctionV4: JunctionV4; Justification: Justification; JustificationNotification: JustificationNotification; Justifications: Justifications; @@ -1810,6 +1897,9 @@ declare module "@polkadot/types/types/registry" { LookupSource: LookupSource; LookupTarget: LookupTarget; LotteryConfig: LotteryConfig; + MaxPalletNameLen: MaxPalletNameLen; + MaxPalletsInfo: MaxPalletsInfo; + MaybeErrorCodeV3: MaybeErrorCodeV3; MaybeRandomness: MaybeRandomness; MaybeVrf: MaybeVrf; MemberCount: MemberCount; @@ -1866,22 +1956,33 @@ declare module "@polkadot/types/types/registry" { MultiAssetFilter: MultiAssetFilter; MultiAssetFilterV1: MultiAssetFilterV1; MultiAssetFilterV2: MultiAssetFilterV2; + MultiAssetFilterV3: MultiAssetFilterV3; + MultiAssetFilterV4: MultiAssetFilterV4; MultiAssets: MultiAssets; MultiAssetsV1: MultiAssetsV1; MultiAssetsV2: MultiAssetsV2; + MultiAssetsV3: MultiAssetsV3; + MultiAssetsV4: MultiAssetsV4; MultiAssetV0: MultiAssetV0; MultiAssetV1: MultiAssetV1; MultiAssetV2: MultiAssetV2; + MultiAssetV3: MultiAssetV3; + MultiAssetV4: MultiAssetV4; MultiDisputeStatementSet: MultiDisputeStatementSet; MultiLocation: MultiLocation; MultiLocationV0: MultiLocationV0; MultiLocationV1: MultiLocationV1; MultiLocationV2: MultiLocationV2; + MultiLocationV3: MultiLocationV3; + MultiLocationV4: MultiLocationV4; Multiplier: Multiplier; Multisig: Multisig; MultiSignature: MultiSignature; MultiSigner: MultiSigner; NetworkId: NetworkId; + NetworkIdV2: NetworkIdV2; + NetworkIdV3: NetworkIdV3; + NetworkIdV4: NetworkIdV4; NetworkState: NetworkState; NetworkStatePeerset: NetworkStatePeerset; NetworkStatePeersetInfo: NetworkStatePeersetInfo; @@ -1925,6 +2026,8 @@ declare module "@polkadot/types/types/registry" { OriginKindV0: OriginKindV0; OriginKindV1: OriginKindV1; OriginKindV2: OriginKindV2; + OriginKindV3: OriginKindV3; + OriginKindV4: OriginKindV4; OutboundHrmpChannelLimitations: OutboundHrmpChannelLimitations; OutboundHrmpMessage: OutboundHrmpMessage; OutboundLaneData: OutboundLaneData; @@ -1932,6 +2035,7 @@ declare module "@polkadot/types/types/registry" { OutboundPayload: OutboundPayload; OutboundStatus: OutboundStatus; Outcome: Outcome; + OutcomeV4: OutcomeV4; OuterEnums15: OuterEnums15; OverweightIndex: OverweightIndex; Owner: Owner; @@ -1946,6 +2050,8 @@ declare module "@polkadot/types/types/registry" { PalletEventMetadataLatest: PalletEventMetadataLatest; PalletEventMetadataV14: PalletEventMetadataV14; PalletId: PalletId; + PalletInfoV3: PalletInfoV3; + PalletInfoV4: PalletInfoV4; PalletMetadataLatest: PalletMetadataLatest; PalletMetadataV14: PalletMetadataV14; PalletMetadataV15: PalletMetadataV15; @@ -1998,6 +2104,7 @@ declare module "@polkadot/types/types/registry" { Points: Points; PortableType: PortableType; PortableTypeV14: PortableTypeV14; + PostDispatchInfo: PostDispatchInfo; Precommits: Precommits; PrefabWasmModule: PrefabWasmModule; PrefixedStorageKey: PrefixedStorageKey; @@ -2018,6 +2125,8 @@ declare module "@polkadot/types/types/registry" { PvfExecTimeoutKind: PvfExecTimeoutKind; PvfPrepTimeoutKind: PvfPrepTimeoutKind; QueryId: QueryId; + QueryResponseInfoV3: QueryResponseInfoV3; + QueryResponseInfoV4: QueryResponseInfoV4; QueryStatus: QueryStatus; QueueConfigData: QueueConfigData; QueuedParathread: QueuedParathread; @@ -2075,7 +2184,10 @@ declare module "@polkadot/types/types/registry" { ResponseV1: ResponseV1; ResponseV2: ResponseV2; ResponseV2Error: ResponseV2Error; - ResponseV2Result: ResponseV2Result; + ResponseV3: ResponseV3; + ResponseV3Error: ResponseV3Error; + ResponseV3Result: ResponseV3Result; + ResponseV4: ResponseV4; Retriable: Retriable; RewardDestination: RewardDestination; RewardPoint: RewardPoint; @@ -2312,6 +2424,7 @@ declare module "@polkadot/types/types/registry" { U8: U8; UnappliedSlash: UnappliedSlash; UnappliedSlashOther: UnappliedSlashOther; + UncheckedFungibilityV4: UncheckedFungibilityV4; UncleEntryItem: UncleEntryItem; UnknownTransaction: UnknownTransaction; UnlockChunk: UnlockChunk; @@ -2350,6 +2463,8 @@ declare module "@polkadot/types/types/registry" { VersionedResponse: VersionedResponse; VersionedXcm: VersionedXcm; VersionMigrationStage: VersionMigrationStage; + VersionV3: VersionV3; + VersionV4: VersionV4; VestingInfo: VestingInfo; VestingSchedule: VestingSchedule; Vote: Vote; @@ -2370,6 +2485,7 @@ declare module "@polkadot/types/types/registry" { VrfProof: VrfProof; Weight: Weight; WeightLimitV2: WeightLimitV2; + WeightLimitV3: WeightLimitV3; WeightMultiplier: WeightMultiplier; WeightPerClass: WeightPerClass; WeightToFeeCoefficient: WeightToFeeCoefficient; @@ -2380,9 +2496,13 @@ declare module "@polkadot/types/types/registry" { WildFungibilityV0: WildFungibilityV0; WildFungibilityV1: WildFungibilityV1; WildFungibilityV2: WildFungibilityV2; + WildFungibilityV3: WildFungibilityV3; + WildFungibilityV4: WildFungibilityV4; WildMultiAsset: WildMultiAsset; WildMultiAssetV1: WildMultiAssetV1; WildMultiAssetV2: WildMultiAssetV2; + WildMultiAssetV3: WildMultiAssetV3; + WildMultiAssetV4: WildMultiAssetV4; WinnersData: WinnersData; WinnersData10: WinnersData10; WinnersDataTuple: WinnersDataTuple; @@ -2393,14 +2513,16 @@ declare module "@polkadot/types/types/registry" { WithdrawReasons: WithdrawReasons; Xcm: Xcm; XcmAssetId: XcmAssetId; + XcmDryRunApiError: XcmDryRunApiError; + XcmDryRunEffects: XcmDryRunEffects; XcmError: XcmError; XcmErrorV0: XcmErrorV0; XcmErrorV1: XcmErrorV1; XcmErrorV2: XcmErrorV2; - XcmOrder: XcmOrder; + XcmErrorV3: XcmErrorV3; + XcmErrorV4: XcmErrorV4; XcmOrderV0: XcmOrderV0; XcmOrderV1: XcmOrderV1; - XcmOrderV2: XcmOrderV2; XcmOrigin: XcmOrigin; XcmOriginKind: XcmOriginKind; XcmPaymentApiError: XcmPaymentApiError; @@ -2408,6 +2530,8 @@ declare module "@polkadot/types/types/registry" { XcmV0: XcmV0; XcmV1: XcmV1; XcmV2: XcmV2; + XcmV3: XcmV3; + XcmV4: XcmV4; XcmVersion: XcmVersion; } // InterfaceTypes } // declare module diff --git a/typescript-api/src/dancelight/interfaces/augment-types.ts b/typescript-api/src/dancelight/interfaces/augment-types.ts index 8258442d0..b47f3cdcb 100644 --- a/typescript-api/src/dancelight/interfaces/augment-types.ts +++ b/typescript-api/src/dancelight/interfaces/augment-types.ts @@ -311,6 +311,13 @@ import type { VotingDirectVote, } from "@polkadot/types/interfaces/democracy"; import type { BlockStats } from "@polkadot/types/interfaces/dev"; +import type { + CallDryRunEffects, + DispatchResultWithPostInfo, + PostDispatchInfo, + XcmDryRunApiError, + XcmDryRunEffects, +} from "@polkadot/types/interfaces/dryRunApi"; import type { ApprovalFlag, DefunctVoter, @@ -396,10 +403,13 @@ import type { ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, + ExtrinsicPayloadV5, ExtrinsicSignature, ExtrinsicSignatureV4, + ExtrinsicSignatureV5, ExtrinsicUnknown, ExtrinsicV4, + ExtrinsicV5, ImmortalEra, MortalEra, MultiSignature, @@ -1145,48 +1155,88 @@ import type { import type { Multisig, Timepoint } from "@polkadot/types/interfaces/utility"; import type { VestingInfo } from "@polkadot/types/interfaces/vesting"; import type { + AssetIdV2, + AssetIdV3, + AssetIdV4, AssetInstance, AssetInstanceV0, AssetInstanceV1, AssetInstanceV2, + AssetInstanceV3, + AssetInstanceV4, BodyId, + BodyIdV2, + BodyIdV3, BodyPart, + BodyPartV2, + BodyPartV3, DoubleEncodedCall, Fungibility, FungibilityV0, FungibilityV1, FungibilityV2, + FungibilityV3, + FungibilityV4, InboundStatus, InstructionV2, + InstructionV3, + InstructionV4, InteriorMultiLocation, + InteriorMultiLocationV2, + InteriorMultiLocationV3, Junction, JunctionV0, JunctionV1, JunctionV2, + JunctionV3, + JunctionV4, Junctions, JunctionsV1, JunctionsV2, + JunctionsV3, + JunctionsV4, + MaxPalletNameLen, + MaxPalletsInfo, + MaybeErrorCodeV3, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, + MultiAssetFilterV3, + MultiAssetFilterV4, MultiAssetV0, MultiAssetV1, MultiAssetV2, + MultiAssetV3, + MultiAssetV4, MultiAssets, MultiAssetsV1, MultiAssetsV2, + MultiAssetsV3, + MultiAssetsV4, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, + MultiLocationV3, + MultiLocationV4, NetworkId, + NetworkIdV2, + NetworkIdV3, + NetworkIdV4, OriginKindV0, OriginKindV1, OriginKindV2, + OriginKindV3, + OriginKindV4, OutboundStatus, Outcome, + OutcomeV4, + PalletInfoV3, + PalletInfoV4, QueryId, + QueryResponseInfoV3, + QueryResponseInfoV4, QueryStatus, QueueConfigData, Response, @@ -1194,36 +1244,49 @@ import type { ResponseV1, ResponseV2, ResponseV2Error, - ResponseV2Result, + ResponseV3, + ResponseV3Error, + ResponseV3Result, + ResponseV4, + UncheckedFungibilityV4, VersionMigrationStage, + VersionV3, + VersionV4, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, + WeightLimitV3, WildFungibility, WildFungibilityV0, WildFungibilityV1, WildFungibilityV2, + WildFungibilityV3, + WildFungibilityV4, WildMultiAsset, WildMultiAssetV1, WildMultiAssetV2, + WildMultiAssetV3, + WildMultiAssetV4, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, - XcmOrder, + XcmErrorV3, + XcmErrorV4, XcmOrderV0, XcmOrderV1, - XcmOrderV2, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, + XcmV3, + XcmV4, XcmVersion, XcmpMessageFormat, } from "@polkadot/types/interfaces/xcm"; @@ -1275,10 +1338,15 @@ declare module "@polkadot/types/types/registry" { AssetDestroyWitness: AssetDestroyWitness; AssetDetails: AssetDetails; AssetId: AssetId; + AssetIdV2: AssetIdV2; + AssetIdV3: AssetIdV3; + AssetIdV4: AssetIdV4; AssetInstance: AssetInstance; AssetInstanceV0: AssetInstanceV0; AssetInstanceV1: AssetInstanceV1; AssetInstanceV2: AssetInstanceV2; + AssetInstanceV3: AssetInstanceV3; + AssetInstanceV4: AssetInstanceV4; AssetMetadata: AssetMetadata; AssetOptions: AssetOptions; AssignmentId: AssignmentId; @@ -1351,7 +1419,11 @@ declare module "@polkadot/types/types/registry" { BlockV2: BlockV2; BlockWeights: BlockWeights; BodyId: BodyId; + BodyIdV2: BodyIdV2; + BodyIdV3: BodyIdV3; BodyPart: BodyPart; + BodyPartV2: BodyPartV2; + BodyPartV3: BodyPartV3; bool: bool; Bool: Bool; Bounty: Bounty; @@ -1367,6 +1439,7 @@ declare module "@polkadot/types/types/registry" { BufferedSessionChange: BufferedSessionChange; Bytes: Bytes; Call: Call; + CallDryRunEffects: CallDryRunEffects; CallHash: CallHash; CallHashOf: CallHashOf; CallIndex: CallIndex; @@ -1526,6 +1599,7 @@ declare module "@polkadot/types/types/registry" { DispatchResult: DispatchResult; DispatchResultOf: DispatchResultOf; DispatchResultTo198: DispatchResultTo198; + DispatchResultWithPostInfo: DispatchResultWithPostInfo; DisputeLocation: DisputeLocation; DisputeProof: DisputeProof; DisputeResult: DisputeResult; @@ -1645,12 +1719,15 @@ declare module "@polkadot/types/types/registry" { ExtrinsicPayload: ExtrinsicPayload; ExtrinsicPayloadUnknown: ExtrinsicPayloadUnknown; ExtrinsicPayloadV4: ExtrinsicPayloadV4; + ExtrinsicPayloadV5: ExtrinsicPayloadV5; ExtrinsicSignature: ExtrinsicSignature; ExtrinsicSignatureV4: ExtrinsicSignatureV4; + ExtrinsicSignatureV5: ExtrinsicSignatureV5; ExtrinsicStatus: ExtrinsicStatus; ExtrinsicsWeight: ExtrinsicsWeight; ExtrinsicUnknown: ExtrinsicUnknown; ExtrinsicV4: ExtrinsicV4; + ExtrinsicV5: ExtrinsicV5; f32: f32; F32: F32; f64: f64; @@ -1686,6 +1763,8 @@ declare module "@polkadot/types/types/registry" { FungibilityV0: FungibilityV0; FungibilityV1: FungibilityV1; FungibilityV2: FungibilityV2; + FungibilityV3: FungibilityV3; + FungibilityV4: FungibilityV4; FungiblesAccessError: FungiblesAccessError; Gas: Gas; GenesisBuildErr: GenesisBuildErr; @@ -1772,8 +1851,12 @@ declare module "@polkadot/types/types/registry" { InstantiateReturnValueOk: InstantiateReturnValueOk; InstantiateReturnValueTo267: InstantiateReturnValueTo267; InstructionV2: InstructionV2; + InstructionV3: InstructionV3; + InstructionV4: InstructionV4; InstructionWeights: InstructionWeights; InteriorMultiLocation: InteriorMultiLocation; + InteriorMultiLocationV2: InteriorMultiLocationV2; + InteriorMultiLocationV3: InteriorMultiLocationV3; InvalidDisputeStatementKind: InvalidDisputeStatementKind; InvalidTransaction: InvalidTransaction; isize: isize; @@ -1783,9 +1866,13 @@ declare module "@polkadot/types/types/registry" { Junctions: Junctions; JunctionsV1: JunctionsV1; JunctionsV2: JunctionsV2; + JunctionsV3: JunctionsV3; + JunctionsV4: JunctionsV4; JunctionV0: JunctionV0; JunctionV1: JunctionV1; JunctionV2: JunctionV2; + JunctionV3: JunctionV3; + JunctionV4: JunctionV4; Justification: Justification; JustificationNotification: JustificationNotification; Justifications: Justifications; @@ -1810,6 +1897,9 @@ declare module "@polkadot/types/types/registry" { LookupSource: LookupSource; LookupTarget: LookupTarget; LotteryConfig: LotteryConfig; + MaxPalletNameLen: MaxPalletNameLen; + MaxPalletsInfo: MaxPalletsInfo; + MaybeErrorCodeV3: MaybeErrorCodeV3; MaybeRandomness: MaybeRandomness; MaybeVrf: MaybeVrf; MemberCount: MemberCount; @@ -1866,22 +1956,33 @@ declare module "@polkadot/types/types/registry" { MultiAssetFilter: MultiAssetFilter; MultiAssetFilterV1: MultiAssetFilterV1; MultiAssetFilterV2: MultiAssetFilterV2; + MultiAssetFilterV3: MultiAssetFilterV3; + MultiAssetFilterV4: MultiAssetFilterV4; MultiAssets: MultiAssets; MultiAssetsV1: MultiAssetsV1; MultiAssetsV2: MultiAssetsV2; + MultiAssetsV3: MultiAssetsV3; + MultiAssetsV4: MultiAssetsV4; MultiAssetV0: MultiAssetV0; MultiAssetV1: MultiAssetV1; MultiAssetV2: MultiAssetV2; + MultiAssetV3: MultiAssetV3; + MultiAssetV4: MultiAssetV4; MultiDisputeStatementSet: MultiDisputeStatementSet; MultiLocation: MultiLocation; MultiLocationV0: MultiLocationV0; MultiLocationV1: MultiLocationV1; MultiLocationV2: MultiLocationV2; + MultiLocationV3: MultiLocationV3; + MultiLocationV4: MultiLocationV4; Multiplier: Multiplier; Multisig: Multisig; MultiSignature: MultiSignature; MultiSigner: MultiSigner; NetworkId: NetworkId; + NetworkIdV2: NetworkIdV2; + NetworkIdV3: NetworkIdV3; + NetworkIdV4: NetworkIdV4; NetworkState: NetworkState; NetworkStatePeerset: NetworkStatePeerset; NetworkStatePeersetInfo: NetworkStatePeersetInfo; @@ -1925,6 +2026,8 @@ declare module "@polkadot/types/types/registry" { OriginKindV0: OriginKindV0; OriginKindV1: OriginKindV1; OriginKindV2: OriginKindV2; + OriginKindV3: OriginKindV3; + OriginKindV4: OriginKindV4; OutboundHrmpChannelLimitations: OutboundHrmpChannelLimitations; OutboundHrmpMessage: OutboundHrmpMessage; OutboundLaneData: OutboundLaneData; @@ -1932,6 +2035,7 @@ declare module "@polkadot/types/types/registry" { OutboundPayload: OutboundPayload; OutboundStatus: OutboundStatus; Outcome: Outcome; + OutcomeV4: OutcomeV4; OuterEnums15: OuterEnums15; OverweightIndex: OverweightIndex; Owner: Owner; @@ -1946,6 +2050,8 @@ declare module "@polkadot/types/types/registry" { PalletEventMetadataLatest: PalletEventMetadataLatest; PalletEventMetadataV14: PalletEventMetadataV14; PalletId: PalletId; + PalletInfoV3: PalletInfoV3; + PalletInfoV4: PalletInfoV4; PalletMetadataLatest: PalletMetadataLatest; PalletMetadataV14: PalletMetadataV14; PalletMetadataV15: PalletMetadataV15; @@ -1998,6 +2104,7 @@ declare module "@polkadot/types/types/registry" { Points: Points; PortableType: PortableType; PortableTypeV14: PortableTypeV14; + PostDispatchInfo: PostDispatchInfo; Precommits: Precommits; PrefabWasmModule: PrefabWasmModule; PrefixedStorageKey: PrefixedStorageKey; @@ -2018,6 +2125,8 @@ declare module "@polkadot/types/types/registry" { PvfExecTimeoutKind: PvfExecTimeoutKind; PvfPrepTimeoutKind: PvfPrepTimeoutKind; QueryId: QueryId; + QueryResponseInfoV3: QueryResponseInfoV3; + QueryResponseInfoV4: QueryResponseInfoV4; QueryStatus: QueryStatus; QueueConfigData: QueueConfigData; QueuedParathread: QueuedParathread; @@ -2075,7 +2184,10 @@ declare module "@polkadot/types/types/registry" { ResponseV1: ResponseV1; ResponseV2: ResponseV2; ResponseV2Error: ResponseV2Error; - ResponseV2Result: ResponseV2Result; + ResponseV3: ResponseV3; + ResponseV3Error: ResponseV3Error; + ResponseV3Result: ResponseV3Result; + ResponseV4: ResponseV4; Retriable: Retriable; RewardDestination: RewardDestination; RewardPoint: RewardPoint; @@ -2312,6 +2424,7 @@ declare module "@polkadot/types/types/registry" { U8: U8; UnappliedSlash: UnappliedSlash; UnappliedSlashOther: UnappliedSlashOther; + UncheckedFungibilityV4: UncheckedFungibilityV4; UncleEntryItem: UncleEntryItem; UnknownTransaction: UnknownTransaction; UnlockChunk: UnlockChunk; @@ -2350,6 +2463,8 @@ declare module "@polkadot/types/types/registry" { VersionedResponse: VersionedResponse; VersionedXcm: VersionedXcm; VersionMigrationStage: VersionMigrationStage; + VersionV3: VersionV3; + VersionV4: VersionV4; VestingInfo: VestingInfo; VestingSchedule: VestingSchedule; Vote: Vote; @@ -2370,6 +2485,7 @@ declare module "@polkadot/types/types/registry" { VrfProof: VrfProof; Weight: Weight; WeightLimitV2: WeightLimitV2; + WeightLimitV3: WeightLimitV3; WeightMultiplier: WeightMultiplier; WeightPerClass: WeightPerClass; WeightToFeeCoefficient: WeightToFeeCoefficient; @@ -2380,9 +2496,13 @@ declare module "@polkadot/types/types/registry" { WildFungibilityV0: WildFungibilityV0; WildFungibilityV1: WildFungibilityV1; WildFungibilityV2: WildFungibilityV2; + WildFungibilityV3: WildFungibilityV3; + WildFungibilityV4: WildFungibilityV4; WildMultiAsset: WildMultiAsset; WildMultiAssetV1: WildMultiAssetV1; WildMultiAssetV2: WildMultiAssetV2; + WildMultiAssetV3: WildMultiAssetV3; + WildMultiAssetV4: WildMultiAssetV4; WinnersData: WinnersData; WinnersData10: WinnersData10; WinnersDataTuple: WinnersDataTuple; @@ -2393,14 +2513,16 @@ declare module "@polkadot/types/types/registry" { WithdrawReasons: WithdrawReasons; Xcm: Xcm; XcmAssetId: XcmAssetId; + XcmDryRunApiError: XcmDryRunApiError; + XcmDryRunEffects: XcmDryRunEffects; XcmError: XcmError; XcmErrorV0: XcmErrorV0; XcmErrorV1: XcmErrorV1; XcmErrorV2: XcmErrorV2; - XcmOrder: XcmOrder; + XcmErrorV3: XcmErrorV3; + XcmErrorV4: XcmErrorV4; XcmOrderV0: XcmOrderV0; XcmOrderV1: XcmOrderV1; - XcmOrderV2: XcmOrderV2; XcmOrigin: XcmOrigin; XcmOriginKind: XcmOriginKind; XcmPaymentApiError: XcmPaymentApiError; @@ -2408,6 +2530,8 @@ declare module "@polkadot/types/types/registry" { XcmV0: XcmV0; XcmV1: XcmV1; XcmV2: XcmV2; + XcmV3: XcmV3; + XcmV4: XcmV4; XcmVersion: XcmVersion; } // InterfaceTypes } // declare module diff --git a/typescript-api/src/flashbox/interfaces/augment-types.ts b/typescript-api/src/flashbox/interfaces/augment-types.ts index 8258442d0..b47f3cdcb 100644 --- a/typescript-api/src/flashbox/interfaces/augment-types.ts +++ b/typescript-api/src/flashbox/interfaces/augment-types.ts @@ -311,6 +311,13 @@ import type { VotingDirectVote, } from "@polkadot/types/interfaces/democracy"; import type { BlockStats } from "@polkadot/types/interfaces/dev"; +import type { + CallDryRunEffects, + DispatchResultWithPostInfo, + PostDispatchInfo, + XcmDryRunApiError, + XcmDryRunEffects, +} from "@polkadot/types/interfaces/dryRunApi"; import type { ApprovalFlag, DefunctVoter, @@ -396,10 +403,13 @@ import type { ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, + ExtrinsicPayloadV5, ExtrinsicSignature, ExtrinsicSignatureV4, + ExtrinsicSignatureV5, ExtrinsicUnknown, ExtrinsicV4, + ExtrinsicV5, ImmortalEra, MortalEra, MultiSignature, @@ -1145,48 +1155,88 @@ import type { import type { Multisig, Timepoint } from "@polkadot/types/interfaces/utility"; import type { VestingInfo } from "@polkadot/types/interfaces/vesting"; import type { + AssetIdV2, + AssetIdV3, + AssetIdV4, AssetInstance, AssetInstanceV0, AssetInstanceV1, AssetInstanceV2, + AssetInstanceV3, + AssetInstanceV4, BodyId, + BodyIdV2, + BodyIdV3, BodyPart, + BodyPartV2, + BodyPartV3, DoubleEncodedCall, Fungibility, FungibilityV0, FungibilityV1, FungibilityV2, + FungibilityV3, + FungibilityV4, InboundStatus, InstructionV2, + InstructionV3, + InstructionV4, InteriorMultiLocation, + InteriorMultiLocationV2, + InteriorMultiLocationV3, Junction, JunctionV0, JunctionV1, JunctionV2, + JunctionV3, + JunctionV4, Junctions, JunctionsV1, JunctionsV2, + JunctionsV3, + JunctionsV4, + MaxPalletNameLen, + MaxPalletsInfo, + MaybeErrorCodeV3, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, + MultiAssetFilterV3, + MultiAssetFilterV4, MultiAssetV0, MultiAssetV1, MultiAssetV2, + MultiAssetV3, + MultiAssetV4, MultiAssets, MultiAssetsV1, MultiAssetsV2, + MultiAssetsV3, + MultiAssetsV4, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, + MultiLocationV3, + MultiLocationV4, NetworkId, + NetworkIdV2, + NetworkIdV3, + NetworkIdV4, OriginKindV0, OriginKindV1, OriginKindV2, + OriginKindV3, + OriginKindV4, OutboundStatus, Outcome, + OutcomeV4, + PalletInfoV3, + PalletInfoV4, QueryId, + QueryResponseInfoV3, + QueryResponseInfoV4, QueryStatus, QueueConfigData, Response, @@ -1194,36 +1244,49 @@ import type { ResponseV1, ResponseV2, ResponseV2Error, - ResponseV2Result, + ResponseV3, + ResponseV3Error, + ResponseV3Result, + ResponseV4, + UncheckedFungibilityV4, VersionMigrationStage, + VersionV3, + VersionV4, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, + WeightLimitV3, WildFungibility, WildFungibilityV0, WildFungibilityV1, WildFungibilityV2, + WildFungibilityV3, + WildFungibilityV4, WildMultiAsset, WildMultiAssetV1, WildMultiAssetV2, + WildMultiAssetV3, + WildMultiAssetV4, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, - XcmOrder, + XcmErrorV3, + XcmErrorV4, XcmOrderV0, XcmOrderV1, - XcmOrderV2, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, + XcmV3, + XcmV4, XcmVersion, XcmpMessageFormat, } from "@polkadot/types/interfaces/xcm"; @@ -1275,10 +1338,15 @@ declare module "@polkadot/types/types/registry" { AssetDestroyWitness: AssetDestroyWitness; AssetDetails: AssetDetails; AssetId: AssetId; + AssetIdV2: AssetIdV2; + AssetIdV3: AssetIdV3; + AssetIdV4: AssetIdV4; AssetInstance: AssetInstance; AssetInstanceV0: AssetInstanceV0; AssetInstanceV1: AssetInstanceV1; AssetInstanceV2: AssetInstanceV2; + AssetInstanceV3: AssetInstanceV3; + AssetInstanceV4: AssetInstanceV4; AssetMetadata: AssetMetadata; AssetOptions: AssetOptions; AssignmentId: AssignmentId; @@ -1351,7 +1419,11 @@ declare module "@polkadot/types/types/registry" { BlockV2: BlockV2; BlockWeights: BlockWeights; BodyId: BodyId; + BodyIdV2: BodyIdV2; + BodyIdV3: BodyIdV3; BodyPart: BodyPart; + BodyPartV2: BodyPartV2; + BodyPartV3: BodyPartV3; bool: bool; Bool: Bool; Bounty: Bounty; @@ -1367,6 +1439,7 @@ declare module "@polkadot/types/types/registry" { BufferedSessionChange: BufferedSessionChange; Bytes: Bytes; Call: Call; + CallDryRunEffects: CallDryRunEffects; CallHash: CallHash; CallHashOf: CallHashOf; CallIndex: CallIndex; @@ -1526,6 +1599,7 @@ declare module "@polkadot/types/types/registry" { DispatchResult: DispatchResult; DispatchResultOf: DispatchResultOf; DispatchResultTo198: DispatchResultTo198; + DispatchResultWithPostInfo: DispatchResultWithPostInfo; DisputeLocation: DisputeLocation; DisputeProof: DisputeProof; DisputeResult: DisputeResult; @@ -1645,12 +1719,15 @@ declare module "@polkadot/types/types/registry" { ExtrinsicPayload: ExtrinsicPayload; ExtrinsicPayloadUnknown: ExtrinsicPayloadUnknown; ExtrinsicPayloadV4: ExtrinsicPayloadV4; + ExtrinsicPayloadV5: ExtrinsicPayloadV5; ExtrinsicSignature: ExtrinsicSignature; ExtrinsicSignatureV4: ExtrinsicSignatureV4; + ExtrinsicSignatureV5: ExtrinsicSignatureV5; ExtrinsicStatus: ExtrinsicStatus; ExtrinsicsWeight: ExtrinsicsWeight; ExtrinsicUnknown: ExtrinsicUnknown; ExtrinsicV4: ExtrinsicV4; + ExtrinsicV5: ExtrinsicV5; f32: f32; F32: F32; f64: f64; @@ -1686,6 +1763,8 @@ declare module "@polkadot/types/types/registry" { FungibilityV0: FungibilityV0; FungibilityV1: FungibilityV1; FungibilityV2: FungibilityV2; + FungibilityV3: FungibilityV3; + FungibilityV4: FungibilityV4; FungiblesAccessError: FungiblesAccessError; Gas: Gas; GenesisBuildErr: GenesisBuildErr; @@ -1772,8 +1851,12 @@ declare module "@polkadot/types/types/registry" { InstantiateReturnValueOk: InstantiateReturnValueOk; InstantiateReturnValueTo267: InstantiateReturnValueTo267; InstructionV2: InstructionV2; + InstructionV3: InstructionV3; + InstructionV4: InstructionV4; InstructionWeights: InstructionWeights; InteriorMultiLocation: InteriorMultiLocation; + InteriorMultiLocationV2: InteriorMultiLocationV2; + InteriorMultiLocationV3: InteriorMultiLocationV3; InvalidDisputeStatementKind: InvalidDisputeStatementKind; InvalidTransaction: InvalidTransaction; isize: isize; @@ -1783,9 +1866,13 @@ declare module "@polkadot/types/types/registry" { Junctions: Junctions; JunctionsV1: JunctionsV1; JunctionsV2: JunctionsV2; + JunctionsV3: JunctionsV3; + JunctionsV4: JunctionsV4; JunctionV0: JunctionV0; JunctionV1: JunctionV1; JunctionV2: JunctionV2; + JunctionV3: JunctionV3; + JunctionV4: JunctionV4; Justification: Justification; JustificationNotification: JustificationNotification; Justifications: Justifications; @@ -1810,6 +1897,9 @@ declare module "@polkadot/types/types/registry" { LookupSource: LookupSource; LookupTarget: LookupTarget; LotteryConfig: LotteryConfig; + MaxPalletNameLen: MaxPalletNameLen; + MaxPalletsInfo: MaxPalletsInfo; + MaybeErrorCodeV3: MaybeErrorCodeV3; MaybeRandomness: MaybeRandomness; MaybeVrf: MaybeVrf; MemberCount: MemberCount; @@ -1866,22 +1956,33 @@ declare module "@polkadot/types/types/registry" { MultiAssetFilter: MultiAssetFilter; MultiAssetFilterV1: MultiAssetFilterV1; MultiAssetFilterV2: MultiAssetFilterV2; + MultiAssetFilterV3: MultiAssetFilterV3; + MultiAssetFilterV4: MultiAssetFilterV4; MultiAssets: MultiAssets; MultiAssetsV1: MultiAssetsV1; MultiAssetsV2: MultiAssetsV2; + MultiAssetsV3: MultiAssetsV3; + MultiAssetsV4: MultiAssetsV4; MultiAssetV0: MultiAssetV0; MultiAssetV1: MultiAssetV1; MultiAssetV2: MultiAssetV2; + MultiAssetV3: MultiAssetV3; + MultiAssetV4: MultiAssetV4; MultiDisputeStatementSet: MultiDisputeStatementSet; MultiLocation: MultiLocation; MultiLocationV0: MultiLocationV0; MultiLocationV1: MultiLocationV1; MultiLocationV2: MultiLocationV2; + MultiLocationV3: MultiLocationV3; + MultiLocationV4: MultiLocationV4; Multiplier: Multiplier; Multisig: Multisig; MultiSignature: MultiSignature; MultiSigner: MultiSigner; NetworkId: NetworkId; + NetworkIdV2: NetworkIdV2; + NetworkIdV3: NetworkIdV3; + NetworkIdV4: NetworkIdV4; NetworkState: NetworkState; NetworkStatePeerset: NetworkStatePeerset; NetworkStatePeersetInfo: NetworkStatePeersetInfo; @@ -1925,6 +2026,8 @@ declare module "@polkadot/types/types/registry" { OriginKindV0: OriginKindV0; OriginKindV1: OriginKindV1; OriginKindV2: OriginKindV2; + OriginKindV3: OriginKindV3; + OriginKindV4: OriginKindV4; OutboundHrmpChannelLimitations: OutboundHrmpChannelLimitations; OutboundHrmpMessage: OutboundHrmpMessage; OutboundLaneData: OutboundLaneData; @@ -1932,6 +2035,7 @@ declare module "@polkadot/types/types/registry" { OutboundPayload: OutboundPayload; OutboundStatus: OutboundStatus; Outcome: Outcome; + OutcomeV4: OutcomeV4; OuterEnums15: OuterEnums15; OverweightIndex: OverweightIndex; Owner: Owner; @@ -1946,6 +2050,8 @@ declare module "@polkadot/types/types/registry" { PalletEventMetadataLatest: PalletEventMetadataLatest; PalletEventMetadataV14: PalletEventMetadataV14; PalletId: PalletId; + PalletInfoV3: PalletInfoV3; + PalletInfoV4: PalletInfoV4; PalletMetadataLatest: PalletMetadataLatest; PalletMetadataV14: PalletMetadataV14; PalletMetadataV15: PalletMetadataV15; @@ -1998,6 +2104,7 @@ declare module "@polkadot/types/types/registry" { Points: Points; PortableType: PortableType; PortableTypeV14: PortableTypeV14; + PostDispatchInfo: PostDispatchInfo; Precommits: Precommits; PrefabWasmModule: PrefabWasmModule; PrefixedStorageKey: PrefixedStorageKey; @@ -2018,6 +2125,8 @@ declare module "@polkadot/types/types/registry" { PvfExecTimeoutKind: PvfExecTimeoutKind; PvfPrepTimeoutKind: PvfPrepTimeoutKind; QueryId: QueryId; + QueryResponseInfoV3: QueryResponseInfoV3; + QueryResponseInfoV4: QueryResponseInfoV4; QueryStatus: QueryStatus; QueueConfigData: QueueConfigData; QueuedParathread: QueuedParathread; @@ -2075,7 +2184,10 @@ declare module "@polkadot/types/types/registry" { ResponseV1: ResponseV1; ResponseV2: ResponseV2; ResponseV2Error: ResponseV2Error; - ResponseV2Result: ResponseV2Result; + ResponseV3: ResponseV3; + ResponseV3Error: ResponseV3Error; + ResponseV3Result: ResponseV3Result; + ResponseV4: ResponseV4; Retriable: Retriable; RewardDestination: RewardDestination; RewardPoint: RewardPoint; @@ -2312,6 +2424,7 @@ declare module "@polkadot/types/types/registry" { U8: U8; UnappliedSlash: UnappliedSlash; UnappliedSlashOther: UnappliedSlashOther; + UncheckedFungibilityV4: UncheckedFungibilityV4; UncleEntryItem: UncleEntryItem; UnknownTransaction: UnknownTransaction; UnlockChunk: UnlockChunk; @@ -2350,6 +2463,8 @@ declare module "@polkadot/types/types/registry" { VersionedResponse: VersionedResponse; VersionedXcm: VersionedXcm; VersionMigrationStage: VersionMigrationStage; + VersionV3: VersionV3; + VersionV4: VersionV4; VestingInfo: VestingInfo; VestingSchedule: VestingSchedule; Vote: Vote; @@ -2370,6 +2485,7 @@ declare module "@polkadot/types/types/registry" { VrfProof: VrfProof; Weight: Weight; WeightLimitV2: WeightLimitV2; + WeightLimitV3: WeightLimitV3; WeightMultiplier: WeightMultiplier; WeightPerClass: WeightPerClass; WeightToFeeCoefficient: WeightToFeeCoefficient; @@ -2380,9 +2496,13 @@ declare module "@polkadot/types/types/registry" { WildFungibilityV0: WildFungibilityV0; WildFungibilityV1: WildFungibilityV1; WildFungibilityV2: WildFungibilityV2; + WildFungibilityV3: WildFungibilityV3; + WildFungibilityV4: WildFungibilityV4; WildMultiAsset: WildMultiAsset; WildMultiAssetV1: WildMultiAssetV1; WildMultiAssetV2: WildMultiAssetV2; + WildMultiAssetV3: WildMultiAssetV3; + WildMultiAssetV4: WildMultiAssetV4; WinnersData: WinnersData; WinnersData10: WinnersData10; WinnersDataTuple: WinnersDataTuple; @@ -2393,14 +2513,16 @@ declare module "@polkadot/types/types/registry" { WithdrawReasons: WithdrawReasons; Xcm: Xcm; XcmAssetId: XcmAssetId; + XcmDryRunApiError: XcmDryRunApiError; + XcmDryRunEffects: XcmDryRunEffects; XcmError: XcmError; XcmErrorV0: XcmErrorV0; XcmErrorV1: XcmErrorV1; XcmErrorV2: XcmErrorV2; - XcmOrder: XcmOrder; + XcmErrorV3: XcmErrorV3; + XcmErrorV4: XcmErrorV4; XcmOrderV0: XcmOrderV0; XcmOrderV1: XcmOrderV1; - XcmOrderV2: XcmOrderV2; XcmOrigin: XcmOrigin; XcmOriginKind: XcmOriginKind; XcmPaymentApiError: XcmPaymentApiError; @@ -2408,6 +2530,8 @@ declare module "@polkadot/types/types/registry" { XcmV0: XcmV0; XcmV1: XcmV1; XcmV2: XcmV2; + XcmV3: XcmV3; + XcmV4: XcmV4; XcmVersion: XcmVersion; } // InterfaceTypes } // declare module From 2b9e475aa2a266df05a80b76f967ae0b4381ef0a Mon Sep 17 00:00:00 2001 From: Tomasz Polaczyk Date: Thu, 31 Oct 2024 09:41:58 +0100 Subject: [PATCH 67/82] Test migration --- runtime/common/src/migrations.rs | 5 +- .../dancelight/src/tests/migrations_test.rs | 47 ++++++++++++++++++- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/runtime/common/src/migrations.rs b/runtime/common/src/migrations.rs index a2df9caee..1eb5138b1 100644 --- a/runtime/common/src/migrations.rs +++ b/runtime/common/src/migrations.rs @@ -1125,6 +1125,9 @@ where let migrate_external_validators = ExternalValidatorsInitialMigration::(Default::default()); - vec![Box::new(migrate_mmr_leaf_pallet), Box::new(migrate_external_validators)] + vec![ + Box::new(migrate_mmr_leaf_pallet), + Box::new(migrate_external_validators), + ] } } diff --git a/solo-chains/runtime/dancelight/src/tests/migrations_test.rs b/solo-chains/runtime/dancelight/src/tests/migrations_test.rs index 3db642a3d..a25866281 100644 --- a/solo-chains/runtime/dancelight/src/tests/migrations_test.rs +++ b/solo-chains/runtime/dancelight/src/tests/migrations_test.rs @@ -15,12 +15,13 @@ // along with Tanssi. If not, see use crate::tests::common::ExtBuilder; -use crate::{BeefyMmrLeaf, PalletInfo, Runtime}; +use crate::{BeefyMmrLeaf, ExternalValidators, PalletInfo, Runtime, Session}; use beefy_primitives::mmr::BeefyAuthoritySet; +use frame_support::migration::clear_storage_prefix; use frame_support::storage::unhashed; use frame_support::traits::PalletInfo as _; use pallet_migrations::Migration; -use tanssi_runtime_common::migrations::MigrateMMRLeafPallet; +use tanssi_runtime_common::migrations::{ExternalValidatorsInitialMigration, MigrateMMRLeafPallet}; use xcm::v3::Weight; #[test] @@ -72,3 +73,45 @@ fn test_migration_mmr_leaf_pallet_renaming() { ); }); } + +#[test] +fn test_migration_external_validators_pallet() { + ExtBuilder::default().build().execute_with(|| { + let migrate_external_validators = + ExternalValidatorsInitialMigration::(Default::default()); + let old_pallet_name = b"ValidatorManager"; + + // Kill storage of ExternalValidators pallet, because this migration will initialize this pallet + let _ = clear_storage_prefix(b"ExternalValidators", b"", b"", None, None); + + // Simulate adding data to the old pallet storage + // The value is not used for anything, we only care that it is removed by the migration. + let old_storage_key = + frame_support::storage::storage_prefix(old_pallet_name, b"ValidatorsToAdd"); + let expected_validators: Vec = vec![5, 6]; + unhashed::put(&old_storage_key, &expected_validators); + + // Run migration + let _used_weight = migrate_external_validators.migrate(Weight::MAX); + + // Assert that ValidatorManager pallet prefix is empty after migration + let old_pallet_key = frame_support::storage::storage_prefix(old_pallet_name, b""); + let old_storage_exists = unhashed::contains_prefixed_key(&old_pallet_key); + assert!( + !old_storage_exists, + "Old pallet storage should be cleared after migration" + ); + + // Assert that ExternalValidators has the validators from ValidatorManager + let migrated_validators = ExternalValidators::validators(); + let empty = vec![]; + assert_ne!( + migrated_validators, empty, + "ExternalValidators should not be empty after migration" + ); + + // ExternalValidators should be equal to validators from Session::queued_keys + let expected_validators: Vec<_> = Session::queued_keys().into_iter().map(|x| x.0).collect(); + assert_eq!(migrated_validators, expected_validators); + }); +} From d7571f2c295a3bab05b3a0e300add76987f39b93 Mon Sep 17 00:00:00 2001 From: girazoki Date: Thu, 31 Oct 2024 10:15:02 +0100 Subject: [PATCH 68/82] fix last test --- .../test_slashes_are_removed_after_bonding_period.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts index 220cb1111..91eb73304 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_removed_after_bonding_period.ts @@ -65,7 +65,7 @@ describeSuite({ await context.createBlock(signedTx); // Slash item should be there - const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.slashDeferDuration; + const DeferPeriod = (await polkadotJs.consts.externalValidatorSlashes.slashDeferDuration).toNumber(); // scheduled slashes const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod + 1); @@ -84,13 +84,13 @@ describeSuite({ const currentIndex = await polkadotJs.query.session.currentIndex(); const targetSession = - currentIndex.toNumber() + sessionsPerEra * (DeferPeriod + 1) + sessionsPerEra * bondingPeriod; + currentIndex.toNumber() + sessionsPerEra * (DeferPeriod + 1) + sessionsPerEra * (bondingPeriod + 1); // TODO: check this - await jumpToSession(context, targetSession + 10); + await jumpToSession(context, targetSession); // scheduled slashes const expectedSlashesAfterDefer = await polkadotJs.query.externalValidatorSlashes.slashes( - DeferPeriod.toNumber() + 1 + DeferPeriod + 1 ); expect(expectedSlashesAfterDefer.length).to.be.eq(0); }, From 1b6822194d76c99a58a7b60d8abe5a6b47ed4e58 Mon Sep 17 00:00:00 2001 From: girazoki Date: Thu, 31 Oct 2024 10:30:53 +0100 Subject: [PATCH 69/82] clippy --- pallets/external-validator-slashes/src/lib.rs | 2 +- pallets/external-validator-slashes/src/mock.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index e20cefd7c..267d75d47 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -324,7 +324,7 @@ where } let slash = compute_slash::( - slash_fraction.clone(), + *slash_fraction, next_slash_id, slash_era, stash.clone(), diff --git a/pallets/external-validator-slashes/src/mock.rs b/pallets/external-validator-slashes/src/mock.rs index e5661ea33..8c54b3b52 100644 --- a/pallets/external-validator-slashes/src/mock.rs +++ b/pallets/external-validator-slashes/src/mock.rs @@ -136,7 +136,7 @@ impl EraIndexProvider for MockEraIndexProvider { None } else { // Else we assume eras start at the same time as sessions - Some(era_index.into()) + Some(era_index) } } } @@ -186,7 +186,7 @@ impl InvulnerablesProvider for MockInvulnerableProvider { pub struct DeferPeriodGetter; impl Get for DeferPeriodGetter { fn get() -> EraIndex { - DEFER_PERIOD.with(|q| (*q.borrow()).clone()) + DEFER_PERIOD.with(|q| (*q.borrow())) } } @@ -216,7 +216,7 @@ impl external_validator_slashes::Config for Test { pub struct FullIdentificationOf; impl sp_runtime::traits::Convert> for FullIdentificationOf { fn convert(_: AccountId) -> Option<()> { - Some(Default::default()) + Some(()) } } From 4a04af9285b12c73f5776da2010970e9c1cbbfb1 Mon Sep 17 00:00:00 2001 From: girazoki Date: Thu, 31 Oct 2024 10:32:26 +0100 Subject: [PATCH 70/82] slashes formatting --- .../test_slashes_are_not_applicable_to_invulnerables.ts | 4 +++- test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts index 1ac9e17ef..e4c5b4ce6 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_are_not_applicable_to_invulnerables.ts @@ -60,7 +60,9 @@ describeSuite({ const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.slashDeferDuration; // Alice is an invulnerable, therefore she should not be slashed - const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod.toNumber() + 1); + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes( + DeferPeriod.toNumber() + 1 + ); expect(expectedSlashes.length).to.be.eq(0); }, }); diff --git a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts index bd49f12c4..f1a5d56c4 100644 --- a/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts +++ b/test/suites/dev-tanssi-relay/slashes/test_slashes_babe.ts @@ -68,7 +68,9 @@ describeSuite({ const DeferPeriod = await polkadotJs.consts.externalValidatorSlashes.slashDeferDuration; // scheduled slashes - const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes(DeferPeriod.toNumber() + 1); + const expectedSlashes = await polkadotJs.query.externalValidatorSlashes.slashes( + DeferPeriod.toNumber() + 1 + ); expect(expectedSlashes.length).to.be.eq(1); expect(u8aToHex(expectedSlashes[0].validator)).to.be.eq(u8aToHex(aliceStash.addressRaw)); }, From ec357a7e7c168d52740795df1c753034a79a0b4e Mon Sep 17 00:00:00 2001 From: girazoki Date: Thu, 31 Oct 2024 10:45:55 +0100 Subject: [PATCH 71/82] ts api --- typescript-api/src/dancelight/interfaces/lookup.ts | 6 +++--- typescript-api/src/dancelight/interfaces/types-lookup.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/typescript-api/src/dancelight/interfaces/lookup.ts b/typescript-api/src/dancelight/interfaces/lookup.ts index 7e1b47830..4bd81315b 100644 --- a/typescript-api/src/dancelight/interfaces/lookup.ts +++ b/typescript-api/src/dancelight/interfaces/lookup.ts @@ -6148,14 +6148,14 @@ export default { FrameSystemExtensionsCheckWeight: "Null", /** Lookup824: pallet_transaction_payment::ChargeTransactionPayment */ PalletTransactionPaymentChargeTransactionPayment: "Compact", - /** Lookup820: frame_metadata_hash_extension::CheckMetadataHash */ + /** Lookup825: frame_metadata_hash_extension::CheckMetadataHash */ FrameMetadataHashExtensionCheckMetadataHash: { mode: "FrameMetadataHashExtensionMode", }, - /** Lookup821: frame_metadata_hash_extension::Mode */ + /** Lookup826: frame_metadata_hash_extension::Mode */ FrameMetadataHashExtensionMode: { _enum: ["Disabled", "Enabled"], }, - /** Lookup822: dancelight_runtime::Runtime */ + /** Lookup827: dancelight_runtime::Runtime */ DancelightRuntimeRuntime: "Null", }; diff --git a/typescript-api/src/dancelight/interfaces/types-lookup.ts b/typescript-api/src/dancelight/interfaces/types-lookup.ts index 5e5b4032f..e17ceb0a6 100644 --- a/typescript-api/src/dancelight/interfaces/types-lookup.ts +++ b/typescript-api/src/dancelight/interfaces/types-lookup.ts @@ -7956,18 +7956,18 @@ declare module "@polkadot/types/lookup" { /** @name PalletTransactionPaymentChargeTransactionPayment (824) */ interface PalletTransactionPaymentChargeTransactionPayment extends Compact {} - /** @name FrameMetadataHashExtensionCheckMetadataHash (820) */ + /** @name FrameMetadataHashExtensionCheckMetadataHash (825) */ interface FrameMetadataHashExtensionCheckMetadataHash extends Struct { readonly mode: FrameMetadataHashExtensionMode; } - /** @name FrameMetadataHashExtensionMode (821) */ + /** @name FrameMetadataHashExtensionMode (826) */ interface FrameMetadataHashExtensionMode extends Enum { readonly isDisabled: boolean; readonly isEnabled: boolean; readonly type: "Disabled" | "Enabled"; } - /** @name DancelightRuntimeRuntime (822) */ + /** @name DancelightRuntimeRuntime (827) */ type DancelightRuntimeRuntime = Null; } // declare module From efc69f174a9397635e89cd651db7a819e1d32a82 Mon Sep 17 00:00:00 2001 From: girazoki Date: Thu, 31 Oct 2024 10:54:20 +0100 Subject: [PATCH 72/82] api --- .../interfaces/augment-api-runtime.ts | 43 +++++- .../src/dancebox/interfaces/augment-types.ts | 136 +++++++++++++++++- .../dancelight/interfaces/augment-types.ts | 136 +++++++++++++++++- .../src/flashbox/interfaces/augment-types.ts | 136 +++++++++++++++++- 4 files changed, 432 insertions(+), 19 deletions(-) diff --git a/typescript-api/src/dancebox/interfaces/augment-api-runtime.ts b/typescript-api/src/dancebox/interfaces/augment-api-runtime.ts index 087e4590d..c6543a26d 100644 --- a/typescript-api/src/dancebox/interfaces/augment-api-runtime.ts +++ b/typescript-api/src/dancebox/interfaces/augment-api-runtime.ts @@ -7,11 +7,12 @@ import "@polkadot/api-base/types/calls"; import type { ApiTypes, AugmentedCall, DecoratedCallBase } from "@polkadot/api-base/types"; import type { Bytes, Null, Option, Result, Vec, u128, u32 } from "@polkadot/types-codec"; -import type { AnyNumber, ITuple } from "@polkadot/types-codec/types"; +import type { AnyNumber, IMethod, ITuple } from "@polkadot/types-codec/types"; import type { CheckInherentsResult, InherentData } from "@polkadot/types/interfaces/blockbuilder"; import type { BlockHash } from "@polkadot/types/interfaces/chain"; import type { AuthorityId } from "@polkadot/types/interfaces/consensus"; import type { CollationInfo } from "@polkadot/types/interfaces/cumulus"; +import type { CallDryRunEffects, XcmDryRunApiError, XcmDryRunEffects } from "@polkadot/types/interfaces/dryRunApi"; import type { Extrinsic } from "@polkadot/types/interfaces/extrinsics"; import type { GenesisBuildErr } from "@polkadot/types/interfaces/genesisBuilder"; import type { OpaqueMetadata } from "@polkadot/types/interfaces/metadata"; @@ -24,6 +25,8 @@ import type { Header, Index, KeyTypeId, + OriginCaller, + RuntimeCall, SlotDuration, Weight, WeightV2, @@ -31,6 +34,7 @@ import type { import type { RuntimeVersion } from "@polkadot/types/interfaces/state"; import type { ApplyExtrinsicResult } from "@polkadot/types/interfaces/system"; import type { TransactionSource, TransactionValidity } from "@polkadot/types/interfaces/txqueue"; +import type { VersionedMultiLocation, VersionedXcm } from "@polkadot/types/interfaces/xcm"; import type { XcmPaymentApiError } from "@polkadot/types/interfaces/xcmPaymentApi"; import type { Error } from "@polkadot/types/interfaces/xcmRuntimeApi"; import type { XcmVersionedAssetId, XcmVersionedLocation, XcmVersionedXcm } from "@polkadot/types/lookup"; @@ -121,6 +125,43 @@ declare module "@polkadot/api-base/types/calls" { /** Generic call */ [key: string]: DecoratedCallBase; }; + /** 0x91b1c8b16328eb92/1 */ + dryRunApi: { + /** Dry run call */ + dryRunCall: AugmentedCall< + ApiType, + ( + origin: OriginCaller | { System: any } | string | Uint8Array, + call: RuntimeCall | IMethod | string | Uint8Array + ) => Observable> + >; + /** Dry run XCM program */ + dryRunXcm: AugmentedCall< + ApiType, + ( + originLocation: + | VersionedMultiLocation + | { V0: any } + | { V1: any } + | { V2: any } + | { V3: any } + | { V4: any } + | string + | Uint8Array, + xcm: + | VersionedXcm + | { V0: any } + | { V1: any } + | { V2: any } + | { V3: any } + | { V4: any } + | string + | Uint8Array + ) => Observable> + >; + /** Generic call */ + [key: string]: DecoratedCallBase; + }; /** 0xfbc577b9d747efd6/1 */ genesisBuilder: { /** Build `RuntimeGenesisConfig` from a JSON blob not using any defaults and store it in the storage. */ diff --git a/typescript-api/src/dancebox/interfaces/augment-types.ts b/typescript-api/src/dancebox/interfaces/augment-types.ts index 8258442d0..b47f3cdcb 100644 --- a/typescript-api/src/dancebox/interfaces/augment-types.ts +++ b/typescript-api/src/dancebox/interfaces/augment-types.ts @@ -311,6 +311,13 @@ import type { VotingDirectVote, } from "@polkadot/types/interfaces/democracy"; import type { BlockStats } from "@polkadot/types/interfaces/dev"; +import type { + CallDryRunEffects, + DispatchResultWithPostInfo, + PostDispatchInfo, + XcmDryRunApiError, + XcmDryRunEffects, +} from "@polkadot/types/interfaces/dryRunApi"; import type { ApprovalFlag, DefunctVoter, @@ -396,10 +403,13 @@ import type { ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, + ExtrinsicPayloadV5, ExtrinsicSignature, ExtrinsicSignatureV4, + ExtrinsicSignatureV5, ExtrinsicUnknown, ExtrinsicV4, + ExtrinsicV5, ImmortalEra, MortalEra, MultiSignature, @@ -1145,48 +1155,88 @@ import type { import type { Multisig, Timepoint } from "@polkadot/types/interfaces/utility"; import type { VestingInfo } from "@polkadot/types/interfaces/vesting"; import type { + AssetIdV2, + AssetIdV3, + AssetIdV4, AssetInstance, AssetInstanceV0, AssetInstanceV1, AssetInstanceV2, + AssetInstanceV3, + AssetInstanceV4, BodyId, + BodyIdV2, + BodyIdV3, BodyPart, + BodyPartV2, + BodyPartV3, DoubleEncodedCall, Fungibility, FungibilityV0, FungibilityV1, FungibilityV2, + FungibilityV3, + FungibilityV4, InboundStatus, InstructionV2, + InstructionV3, + InstructionV4, InteriorMultiLocation, + InteriorMultiLocationV2, + InteriorMultiLocationV3, Junction, JunctionV0, JunctionV1, JunctionV2, + JunctionV3, + JunctionV4, Junctions, JunctionsV1, JunctionsV2, + JunctionsV3, + JunctionsV4, + MaxPalletNameLen, + MaxPalletsInfo, + MaybeErrorCodeV3, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, + MultiAssetFilterV3, + MultiAssetFilterV4, MultiAssetV0, MultiAssetV1, MultiAssetV2, + MultiAssetV3, + MultiAssetV4, MultiAssets, MultiAssetsV1, MultiAssetsV2, + MultiAssetsV3, + MultiAssetsV4, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, + MultiLocationV3, + MultiLocationV4, NetworkId, + NetworkIdV2, + NetworkIdV3, + NetworkIdV4, OriginKindV0, OriginKindV1, OriginKindV2, + OriginKindV3, + OriginKindV4, OutboundStatus, Outcome, + OutcomeV4, + PalletInfoV3, + PalletInfoV4, QueryId, + QueryResponseInfoV3, + QueryResponseInfoV4, QueryStatus, QueueConfigData, Response, @@ -1194,36 +1244,49 @@ import type { ResponseV1, ResponseV2, ResponseV2Error, - ResponseV2Result, + ResponseV3, + ResponseV3Error, + ResponseV3Result, + ResponseV4, + UncheckedFungibilityV4, VersionMigrationStage, + VersionV3, + VersionV4, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, + WeightLimitV3, WildFungibility, WildFungibilityV0, WildFungibilityV1, WildFungibilityV2, + WildFungibilityV3, + WildFungibilityV4, WildMultiAsset, WildMultiAssetV1, WildMultiAssetV2, + WildMultiAssetV3, + WildMultiAssetV4, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, - XcmOrder, + XcmErrorV3, + XcmErrorV4, XcmOrderV0, XcmOrderV1, - XcmOrderV2, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, + XcmV3, + XcmV4, XcmVersion, XcmpMessageFormat, } from "@polkadot/types/interfaces/xcm"; @@ -1275,10 +1338,15 @@ declare module "@polkadot/types/types/registry" { AssetDestroyWitness: AssetDestroyWitness; AssetDetails: AssetDetails; AssetId: AssetId; + AssetIdV2: AssetIdV2; + AssetIdV3: AssetIdV3; + AssetIdV4: AssetIdV4; AssetInstance: AssetInstance; AssetInstanceV0: AssetInstanceV0; AssetInstanceV1: AssetInstanceV1; AssetInstanceV2: AssetInstanceV2; + AssetInstanceV3: AssetInstanceV3; + AssetInstanceV4: AssetInstanceV4; AssetMetadata: AssetMetadata; AssetOptions: AssetOptions; AssignmentId: AssignmentId; @@ -1351,7 +1419,11 @@ declare module "@polkadot/types/types/registry" { BlockV2: BlockV2; BlockWeights: BlockWeights; BodyId: BodyId; + BodyIdV2: BodyIdV2; + BodyIdV3: BodyIdV3; BodyPart: BodyPart; + BodyPartV2: BodyPartV2; + BodyPartV3: BodyPartV3; bool: bool; Bool: Bool; Bounty: Bounty; @@ -1367,6 +1439,7 @@ declare module "@polkadot/types/types/registry" { BufferedSessionChange: BufferedSessionChange; Bytes: Bytes; Call: Call; + CallDryRunEffects: CallDryRunEffects; CallHash: CallHash; CallHashOf: CallHashOf; CallIndex: CallIndex; @@ -1526,6 +1599,7 @@ declare module "@polkadot/types/types/registry" { DispatchResult: DispatchResult; DispatchResultOf: DispatchResultOf; DispatchResultTo198: DispatchResultTo198; + DispatchResultWithPostInfo: DispatchResultWithPostInfo; DisputeLocation: DisputeLocation; DisputeProof: DisputeProof; DisputeResult: DisputeResult; @@ -1645,12 +1719,15 @@ declare module "@polkadot/types/types/registry" { ExtrinsicPayload: ExtrinsicPayload; ExtrinsicPayloadUnknown: ExtrinsicPayloadUnknown; ExtrinsicPayloadV4: ExtrinsicPayloadV4; + ExtrinsicPayloadV5: ExtrinsicPayloadV5; ExtrinsicSignature: ExtrinsicSignature; ExtrinsicSignatureV4: ExtrinsicSignatureV4; + ExtrinsicSignatureV5: ExtrinsicSignatureV5; ExtrinsicStatus: ExtrinsicStatus; ExtrinsicsWeight: ExtrinsicsWeight; ExtrinsicUnknown: ExtrinsicUnknown; ExtrinsicV4: ExtrinsicV4; + ExtrinsicV5: ExtrinsicV5; f32: f32; F32: F32; f64: f64; @@ -1686,6 +1763,8 @@ declare module "@polkadot/types/types/registry" { FungibilityV0: FungibilityV0; FungibilityV1: FungibilityV1; FungibilityV2: FungibilityV2; + FungibilityV3: FungibilityV3; + FungibilityV4: FungibilityV4; FungiblesAccessError: FungiblesAccessError; Gas: Gas; GenesisBuildErr: GenesisBuildErr; @@ -1772,8 +1851,12 @@ declare module "@polkadot/types/types/registry" { InstantiateReturnValueOk: InstantiateReturnValueOk; InstantiateReturnValueTo267: InstantiateReturnValueTo267; InstructionV2: InstructionV2; + InstructionV3: InstructionV3; + InstructionV4: InstructionV4; InstructionWeights: InstructionWeights; InteriorMultiLocation: InteriorMultiLocation; + InteriorMultiLocationV2: InteriorMultiLocationV2; + InteriorMultiLocationV3: InteriorMultiLocationV3; InvalidDisputeStatementKind: InvalidDisputeStatementKind; InvalidTransaction: InvalidTransaction; isize: isize; @@ -1783,9 +1866,13 @@ declare module "@polkadot/types/types/registry" { Junctions: Junctions; JunctionsV1: JunctionsV1; JunctionsV2: JunctionsV2; + JunctionsV3: JunctionsV3; + JunctionsV4: JunctionsV4; JunctionV0: JunctionV0; JunctionV1: JunctionV1; JunctionV2: JunctionV2; + JunctionV3: JunctionV3; + JunctionV4: JunctionV4; Justification: Justification; JustificationNotification: JustificationNotification; Justifications: Justifications; @@ -1810,6 +1897,9 @@ declare module "@polkadot/types/types/registry" { LookupSource: LookupSource; LookupTarget: LookupTarget; LotteryConfig: LotteryConfig; + MaxPalletNameLen: MaxPalletNameLen; + MaxPalletsInfo: MaxPalletsInfo; + MaybeErrorCodeV3: MaybeErrorCodeV3; MaybeRandomness: MaybeRandomness; MaybeVrf: MaybeVrf; MemberCount: MemberCount; @@ -1866,22 +1956,33 @@ declare module "@polkadot/types/types/registry" { MultiAssetFilter: MultiAssetFilter; MultiAssetFilterV1: MultiAssetFilterV1; MultiAssetFilterV2: MultiAssetFilterV2; + MultiAssetFilterV3: MultiAssetFilterV3; + MultiAssetFilterV4: MultiAssetFilterV4; MultiAssets: MultiAssets; MultiAssetsV1: MultiAssetsV1; MultiAssetsV2: MultiAssetsV2; + MultiAssetsV3: MultiAssetsV3; + MultiAssetsV4: MultiAssetsV4; MultiAssetV0: MultiAssetV0; MultiAssetV1: MultiAssetV1; MultiAssetV2: MultiAssetV2; + MultiAssetV3: MultiAssetV3; + MultiAssetV4: MultiAssetV4; MultiDisputeStatementSet: MultiDisputeStatementSet; MultiLocation: MultiLocation; MultiLocationV0: MultiLocationV0; MultiLocationV1: MultiLocationV1; MultiLocationV2: MultiLocationV2; + MultiLocationV3: MultiLocationV3; + MultiLocationV4: MultiLocationV4; Multiplier: Multiplier; Multisig: Multisig; MultiSignature: MultiSignature; MultiSigner: MultiSigner; NetworkId: NetworkId; + NetworkIdV2: NetworkIdV2; + NetworkIdV3: NetworkIdV3; + NetworkIdV4: NetworkIdV4; NetworkState: NetworkState; NetworkStatePeerset: NetworkStatePeerset; NetworkStatePeersetInfo: NetworkStatePeersetInfo; @@ -1925,6 +2026,8 @@ declare module "@polkadot/types/types/registry" { OriginKindV0: OriginKindV0; OriginKindV1: OriginKindV1; OriginKindV2: OriginKindV2; + OriginKindV3: OriginKindV3; + OriginKindV4: OriginKindV4; OutboundHrmpChannelLimitations: OutboundHrmpChannelLimitations; OutboundHrmpMessage: OutboundHrmpMessage; OutboundLaneData: OutboundLaneData; @@ -1932,6 +2035,7 @@ declare module "@polkadot/types/types/registry" { OutboundPayload: OutboundPayload; OutboundStatus: OutboundStatus; Outcome: Outcome; + OutcomeV4: OutcomeV4; OuterEnums15: OuterEnums15; OverweightIndex: OverweightIndex; Owner: Owner; @@ -1946,6 +2050,8 @@ declare module "@polkadot/types/types/registry" { PalletEventMetadataLatest: PalletEventMetadataLatest; PalletEventMetadataV14: PalletEventMetadataV14; PalletId: PalletId; + PalletInfoV3: PalletInfoV3; + PalletInfoV4: PalletInfoV4; PalletMetadataLatest: PalletMetadataLatest; PalletMetadataV14: PalletMetadataV14; PalletMetadataV15: PalletMetadataV15; @@ -1998,6 +2104,7 @@ declare module "@polkadot/types/types/registry" { Points: Points; PortableType: PortableType; PortableTypeV14: PortableTypeV14; + PostDispatchInfo: PostDispatchInfo; Precommits: Precommits; PrefabWasmModule: PrefabWasmModule; PrefixedStorageKey: PrefixedStorageKey; @@ -2018,6 +2125,8 @@ declare module "@polkadot/types/types/registry" { PvfExecTimeoutKind: PvfExecTimeoutKind; PvfPrepTimeoutKind: PvfPrepTimeoutKind; QueryId: QueryId; + QueryResponseInfoV3: QueryResponseInfoV3; + QueryResponseInfoV4: QueryResponseInfoV4; QueryStatus: QueryStatus; QueueConfigData: QueueConfigData; QueuedParathread: QueuedParathread; @@ -2075,7 +2184,10 @@ declare module "@polkadot/types/types/registry" { ResponseV1: ResponseV1; ResponseV2: ResponseV2; ResponseV2Error: ResponseV2Error; - ResponseV2Result: ResponseV2Result; + ResponseV3: ResponseV3; + ResponseV3Error: ResponseV3Error; + ResponseV3Result: ResponseV3Result; + ResponseV4: ResponseV4; Retriable: Retriable; RewardDestination: RewardDestination; RewardPoint: RewardPoint; @@ -2312,6 +2424,7 @@ declare module "@polkadot/types/types/registry" { U8: U8; UnappliedSlash: UnappliedSlash; UnappliedSlashOther: UnappliedSlashOther; + UncheckedFungibilityV4: UncheckedFungibilityV4; UncleEntryItem: UncleEntryItem; UnknownTransaction: UnknownTransaction; UnlockChunk: UnlockChunk; @@ -2350,6 +2463,8 @@ declare module "@polkadot/types/types/registry" { VersionedResponse: VersionedResponse; VersionedXcm: VersionedXcm; VersionMigrationStage: VersionMigrationStage; + VersionV3: VersionV3; + VersionV4: VersionV4; VestingInfo: VestingInfo; VestingSchedule: VestingSchedule; Vote: Vote; @@ -2370,6 +2485,7 @@ declare module "@polkadot/types/types/registry" { VrfProof: VrfProof; Weight: Weight; WeightLimitV2: WeightLimitV2; + WeightLimitV3: WeightLimitV3; WeightMultiplier: WeightMultiplier; WeightPerClass: WeightPerClass; WeightToFeeCoefficient: WeightToFeeCoefficient; @@ -2380,9 +2496,13 @@ declare module "@polkadot/types/types/registry" { WildFungibilityV0: WildFungibilityV0; WildFungibilityV1: WildFungibilityV1; WildFungibilityV2: WildFungibilityV2; + WildFungibilityV3: WildFungibilityV3; + WildFungibilityV4: WildFungibilityV4; WildMultiAsset: WildMultiAsset; WildMultiAssetV1: WildMultiAssetV1; WildMultiAssetV2: WildMultiAssetV2; + WildMultiAssetV3: WildMultiAssetV3; + WildMultiAssetV4: WildMultiAssetV4; WinnersData: WinnersData; WinnersData10: WinnersData10; WinnersDataTuple: WinnersDataTuple; @@ -2393,14 +2513,16 @@ declare module "@polkadot/types/types/registry" { WithdrawReasons: WithdrawReasons; Xcm: Xcm; XcmAssetId: XcmAssetId; + XcmDryRunApiError: XcmDryRunApiError; + XcmDryRunEffects: XcmDryRunEffects; XcmError: XcmError; XcmErrorV0: XcmErrorV0; XcmErrorV1: XcmErrorV1; XcmErrorV2: XcmErrorV2; - XcmOrder: XcmOrder; + XcmErrorV3: XcmErrorV3; + XcmErrorV4: XcmErrorV4; XcmOrderV0: XcmOrderV0; XcmOrderV1: XcmOrderV1; - XcmOrderV2: XcmOrderV2; XcmOrigin: XcmOrigin; XcmOriginKind: XcmOriginKind; XcmPaymentApiError: XcmPaymentApiError; @@ -2408,6 +2530,8 @@ declare module "@polkadot/types/types/registry" { XcmV0: XcmV0; XcmV1: XcmV1; XcmV2: XcmV2; + XcmV3: XcmV3; + XcmV4: XcmV4; XcmVersion: XcmVersion; } // InterfaceTypes } // declare module diff --git a/typescript-api/src/dancelight/interfaces/augment-types.ts b/typescript-api/src/dancelight/interfaces/augment-types.ts index 8258442d0..b47f3cdcb 100644 --- a/typescript-api/src/dancelight/interfaces/augment-types.ts +++ b/typescript-api/src/dancelight/interfaces/augment-types.ts @@ -311,6 +311,13 @@ import type { VotingDirectVote, } from "@polkadot/types/interfaces/democracy"; import type { BlockStats } from "@polkadot/types/interfaces/dev"; +import type { + CallDryRunEffects, + DispatchResultWithPostInfo, + PostDispatchInfo, + XcmDryRunApiError, + XcmDryRunEffects, +} from "@polkadot/types/interfaces/dryRunApi"; import type { ApprovalFlag, DefunctVoter, @@ -396,10 +403,13 @@ import type { ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, + ExtrinsicPayloadV5, ExtrinsicSignature, ExtrinsicSignatureV4, + ExtrinsicSignatureV5, ExtrinsicUnknown, ExtrinsicV4, + ExtrinsicV5, ImmortalEra, MortalEra, MultiSignature, @@ -1145,48 +1155,88 @@ import type { import type { Multisig, Timepoint } from "@polkadot/types/interfaces/utility"; import type { VestingInfo } from "@polkadot/types/interfaces/vesting"; import type { + AssetIdV2, + AssetIdV3, + AssetIdV4, AssetInstance, AssetInstanceV0, AssetInstanceV1, AssetInstanceV2, + AssetInstanceV3, + AssetInstanceV4, BodyId, + BodyIdV2, + BodyIdV3, BodyPart, + BodyPartV2, + BodyPartV3, DoubleEncodedCall, Fungibility, FungibilityV0, FungibilityV1, FungibilityV2, + FungibilityV3, + FungibilityV4, InboundStatus, InstructionV2, + InstructionV3, + InstructionV4, InteriorMultiLocation, + InteriorMultiLocationV2, + InteriorMultiLocationV3, Junction, JunctionV0, JunctionV1, JunctionV2, + JunctionV3, + JunctionV4, Junctions, JunctionsV1, JunctionsV2, + JunctionsV3, + JunctionsV4, + MaxPalletNameLen, + MaxPalletsInfo, + MaybeErrorCodeV3, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, + MultiAssetFilterV3, + MultiAssetFilterV4, MultiAssetV0, MultiAssetV1, MultiAssetV2, + MultiAssetV3, + MultiAssetV4, MultiAssets, MultiAssetsV1, MultiAssetsV2, + MultiAssetsV3, + MultiAssetsV4, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, + MultiLocationV3, + MultiLocationV4, NetworkId, + NetworkIdV2, + NetworkIdV3, + NetworkIdV4, OriginKindV0, OriginKindV1, OriginKindV2, + OriginKindV3, + OriginKindV4, OutboundStatus, Outcome, + OutcomeV4, + PalletInfoV3, + PalletInfoV4, QueryId, + QueryResponseInfoV3, + QueryResponseInfoV4, QueryStatus, QueueConfigData, Response, @@ -1194,36 +1244,49 @@ import type { ResponseV1, ResponseV2, ResponseV2Error, - ResponseV2Result, + ResponseV3, + ResponseV3Error, + ResponseV3Result, + ResponseV4, + UncheckedFungibilityV4, VersionMigrationStage, + VersionV3, + VersionV4, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, + WeightLimitV3, WildFungibility, WildFungibilityV0, WildFungibilityV1, WildFungibilityV2, + WildFungibilityV3, + WildFungibilityV4, WildMultiAsset, WildMultiAssetV1, WildMultiAssetV2, + WildMultiAssetV3, + WildMultiAssetV4, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, - XcmOrder, + XcmErrorV3, + XcmErrorV4, XcmOrderV0, XcmOrderV1, - XcmOrderV2, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, + XcmV3, + XcmV4, XcmVersion, XcmpMessageFormat, } from "@polkadot/types/interfaces/xcm"; @@ -1275,10 +1338,15 @@ declare module "@polkadot/types/types/registry" { AssetDestroyWitness: AssetDestroyWitness; AssetDetails: AssetDetails; AssetId: AssetId; + AssetIdV2: AssetIdV2; + AssetIdV3: AssetIdV3; + AssetIdV4: AssetIdV4; AssetInstance: AssetInstance; AssetInstanceV0: AssetInstanceV0; AssetInstanceV1: AssetInstanceV1; AssetInstanceV2: AssetInstanceV2; + AssetInstanceV3: AssetInstanceV3; + AssetInstanceV4: AssetInstanceV4; AssetMetadata: AssetMetadata; AssetOptions: AssetOptions; AssignmentId: AssignmentId; @@ -1351,7 +1419,11 @@ declare module "@polkadot/types/types/registry" { BlockV2: BlockV2; BlockWeights: BlockWeights; BodyId: BodyId; + BodyIdV2: BodyIdV2; + BodyIdV3: BodyIdV3; BodyPart: BodyPart; + BodyPartV2: BodyPartV2; + BodyPartV3: BodyPartV3; bool: bool; Bool: Bool; Bounty: Bounty; @@ -1367,6 +1439,7 @@ declare module "@polkadot/types/types/registry" { BufferedSessionChange: BufferedSessionChange; Bytes: Bytes; Call: Call; + CallDryRunEffects: CallDryRunEffects; CallHash: CallHash; CallHashOf: CallHashOf; CallIndex: CallIndex; @@ -1526,6 +1599,7 @@ declare module "@polkadot/types/types/registry" { DispatchResult: DispatchResult; DispatchResultOf: DispatchResultOf; DispatchResultTo198: DispatchResultTo198; + DispatchResultWithPostInfo: DispatchResultWithPostInfo; DisputeLocation: DisputeLocation; DisputeProof: DisputeProof; DisputeResult: DisputeResult; @@ -1645,12 +1719,15 @@ declare module "@polkadot/types/types/registry" { ExtrinsicPayload: ExtrinsicPayload; ExtrinsicPayloadUnknown: ExtrinsicPayloadUnknown; ExtrinsicPayloadV4: ExtrinsicPayloadV4; + ExtrinsicPayloadV5: ExtrinsicPayloadV5; ExtrinsicSignature: ExtrinsicSignature; ExtrinsicSignatureV4: ExtrinsicSignatureV4; + ExtrinsicSignatureV5: ExtrinsicSignatureV5; ExtrinsicStatus: ExtrinsicStatus; ExtrinsicsWeight: ExtrinsicsWeight; ExtrinsicUnknown: ExtrinsicUnknown; ExtrinsicV4: ExtrinsicV4; + ExtrinsicV5: ExtrinsicV5; f32: f32; F32: F32; f64: f64; @@ -1686,6 +1763,8 @@ declare module "@polkadot/types/types/registry" { FungibilityV0: FungibilityV0; FungibilityV1: FungibilityV1; FungibilityV2: FungibilityV2; + FungibilityV3: FungibilityV3; + FungibilityV4: FungibilityV4; FungiblesAccessError: FungiblesAccessError; Gas: Gas; GenesisBuildErr: GenesisBuildErr; @@ -1772,8 +1851,12 @@ declare module "@polkadot/types/types/registry" { InstantiateReturnValueOk: InstantiateReturnValueOk; InstantiateReturnValueTo267: InstantiateReturnValueTo267; InstructionV2: InstructionV2; + InstructionV3: InstructionV3; + InstructionV4: InstructionV4; InstructionWeights: InstructionWeights; InteriorMultiLocation: InteriorMultiLocation; + InteriorMultiLocationV2: InteriorMultiLocationV2; + InteriorMultiLocationV3: InteriorMultiLocationV3; InvalidDisputeStatementKind: InvalidDisputeStatementKind; InvalidTransaction: InvalidTransaction; isize: isize; @@ -1783,9 +1866,13 @@ declare module "@polkadot/types/types/registry" { Junctions: Junctions; JunctionsV1: JunctionsV1; JunctionsV2: JunctionsV2; + JunctionsV3: JunctionsV3; + JunctionsV4: JunctionsV4; JunctionV0: JunctionV0; JunctionV1: JunctionV1; JunctionV2: JunctionV2; + JunctionV3: JunctionV3; + JunctionV4: JunctionV4; Justification: Justification; JustificationNotification: JustificationNotification; Justifications: Justifications; @@ -1810,6 +1897,9 @@ declare module "@polkadot/types/types/registry" { LookupSource: LookupSource; LookupTarget: LookupTarget; LotteryConfig: LotteryConfig; + MaxPalletNameLen: MaxPalletNameLen; + MaxPalletsInfo: MaxPalletsInfo; + MaybeErrorCodeV3: MaybeErrorCodeV3; MaybeRandomness: MaybeRandomness; MaybeVrf: MaybeVrf; MemberCount: MemberCount; @@ -1866,22 +1956,33 @@ declare module "@polkadot/types/types/registry" { MultiAssetFilter: MultiAssetFilter; MultiAssetFilterV1: MultiAssetFilterV1; MultiAssetFilterV2: MultiAssetFilterV2; + MultiAssetFilterV3: MultiAssetFilterV3; + MultiAssetFilterV4: MultiAssetFilterV4; MultiAssets: MultiAssets; MultiAssetsV1: MultiAssetsV1; MultiAssetsV2: MultiAssetsV2; + MultiAssetsV3: MultiAssetsV3; + MultiAssetsV4: MultiAssetsV4; MultiAssetV0: MultiAssetV0; MultiAssetV1: MultiAssetV1; MultiAssetV2: MultiAssetV2; + MultiAssetV3: MultiAssetV3; + MultiAssetV4: MultiAssetV4; MultiDisputeStatementSet: MultiDisputeStatementSet; MultiLocation: MultiLocation; MultiLocationV0: MultiLocationV0; MultiLocationV1: MultiLocationV1; MultiLocationV2: MultiLocationV2; + MultiLocationV3: MultiLocationV3; + MultiLocationV4: MultiLocationV4; Multiplier: Multiplier; Multisig: Multisig; MultiSignature: MultiSignature; MultiSigner: MultiSigner; NetworkId: NetworkId; + NetworkIdV2: NetworkIdV2; + NetworkIdV3: NetworkIdV3; + NetworkIdV4: NetworkIdV4; NetworkState: NetworkState; NetworkStatePeerset: NetworkStatePeerset; NetworkStatePeersetInfo: NetworkStatePeersetInfo; @@ -1925,6 +2026,8 @@ declare module "@polkadot/types/types/registry" { OriginKindV0: OriginKindV0; OriginKindV1: OriginKindV1; OriginKindV2: OriginKindV2; + OriginKindV3: OriginKindV3; + OriginKindV4: OriginKindV4; OutboundHrmpChannelLimitations: OutboundHrmpChannelLimitations; OutboundHrmpMessage: OutboundHrmpMessage; OutboundLaneData: OutboundLaneData; @@ -1932,6 +2035,7 @@ declare module "@polkadot/types/types/registry" { OutboundPayload: OutboundPayload; OutboundStatus: OutboundStatus; Outcome: Outcome; + OutcomeV4: OutcomeV4; OuterEnums15: OuterEnums15; OverweightIndex: OverweightIndex; Owner: Owner; @@ -1946,6 +2050,8 @@ declare module "@polkadot/types/types/registry" { PalletEventMetadataLatest: PalletEventMetadataLatest; PalletEventMetadataV14: PalletEventMetadataV14; PalletId: PalletId; + PalletInfoV3: PalletInfoV3; + PalletInfoV4: PalletInfoV4; PalletMetadataLatest: PalletMetadataLatest; PalletMetadataV14: PalletMetadataV14; PalletMetadataV15: PalletMetadataV15; @@ -1998,6 +2104,7 @@ declare module "@polkadot/types/types/registry" { Points: Points; PortableType: PortableType; PortableTypeV14: PortableTypeV14; + PostDispatchInfo: PostDispatchInfo; Precommits: Precommits; PrefabWasmModule: PrefabWasmModule; PrefixedStorageKey: PrefixedStorageKey; @@ -2018,6 +2125,8 @@ declare module "@polkadot/types/types/registry" { PvfExecTimeoutKind: PvfExecTimeoutKind; PvfPrepTimeoutKind: PvfPrepTimeoutKind; QueryId: QueryId; + QueryResponseInfoV3: QueryResponseInfoV3; + QueryResponseInfoV4: QueryResponseInfoV4; QueryStatus: QueryStatus; QueueConfigData: QueueConfigData; QueuedParathread: QueuedParathread; @@ -2075,7 +2184,10 @@ declare module "@polkadot/types/types/registry" { ResponseV1: ResponseV1; ResponseV2: ResponseV2; ResponseV2Error: ResponseV2Error; - ResponseV2Result: ResponseV2Result; + ResponseV3: ResponseV3; + ResponseV3Error: ResponseV3Error; + ResponseV3Result: ResponseV3Result; + ResponseV4: ResponseV4; Retriable: Retriable; RewardDestination: RewardDestination; RewardPoint: RewardPoint; @@ -2312,6 +2424,7 @@ declare module "@polkadot/types/types/registry" { U8: U8; UnappliedSlash: UnappliedSlash; UnappliedSlashOther: UnappliedSlashOther; + UncheckedFungibilityV4: UncheckedFungibilityV4; UncleEntryItem: UncleEntryItem; UnknownTransaction: UnknownTransaction; UnlockChunk: UnlockChunk; @@ -2350,6 +2463,8 @@ declare module "@polkadot/types/types/registry" { VersionedResponse: VersionedResponse; VersionedXcm: VersionedXcm; VersionMigrationStage: VersionMigrationStage; + VersionV3: VersionV3; + VersionV4: VersionV4; VestingInfo: VestingInfo; VestingSchedule: VestingSchedule; Vote: Vote; @@ -2370,6 +2485,7 @@ declare module "@polkadot/types/types/registry" { VrfProof: VrfProof; Weight: Weight; WeightLimitV2: WeightLimitV2; + WeightLimitV3: WeightLimitV3; WeightMultiplier: WeightMultiplier; WeightPerClass: WeightPerClass; WeightToFeeCoefficient: WeightToFeeCoefficient; @@ -2380,9 +2496,13 @@ declare module "@polkadot/types/types/registry" { WildFungibilityV0: WildFungibilityV0; WildFungibilityV1: WildFungibilityV1; WildFungibilityV2: WildFungibilityV2; + WildFungibilityV3: WildFungibilityV3; + WildFungibilityV4: WildFungibilityV4; WildMultiAsset: WildMultiAsset; WildMultiAssetV1: WildMultiAssetV1; WildMultiAssetV2: WildMultiAssetV2; + WildMultiAssetV3: WildMultiAssetV3; + WildMultiAssetV4: WildMultiAssetV4; WinnersData: WinnersData; WinnersData10: WinnersData10; WinnersDataTuple: WinnersDataTuple; @@ -2393,14 +2513,16 @@ declare module "@polkadot/types/types/registry" { WithdrawReasons: WithdrawReasons; Xcm: Xcm; XcmAssetId: XcmAssetId; + XcmDryRunApiError: XcmDryRunApiError; + XcmDryRunEffects: XcmDryRunEffects; XcmError: XcmError; XcmErrorV0: XcmErrorV0; XcmErrorV1: XcmErrorV1; XcmErrorV2: XcmErrorV2; - XcmOrder: XcmOrder; + XcmErrorV3: XcmErrorV3; + XcmErrorV4: XcmErrorV4; XcmOrderV0: XcmOrderV0; XcmOrderV1: XcmOrderV1; - XcmOrderV2: XcmOrderV2; XcmOrigin: XcmOrigin; XcmOriginKind: XcmOriginKind; XcmPaymentApiError: XcmPaymentApiError; @@ -2408,6 +2530,8 @@ declare module "@polkadot/types/types/registry" { XcmV0: XcmV0; XcmV1: XcmV1; XcmV2: XcmV2; + XcmV3: XcmV3; + XcmV4: XcmV4; XcmVersion: XcmVersion; } // InterfaceTypes } // declare module diff --git a/typescript-api/src/flashbox/interfaces/augment-types.ts b/typescript-api/src/flashbox/interfaces/augment-types.ts index 8258442d0..b47f3cdcb 100644 --- a/typescript-api/src/flashbox/interfaces/augment-types.ts +++ b/typescript-api/src/flashbox/interfaces/augment-types.ts @@ -311,6 +311,13 @@ import type { VotingDirectVote, } from "@polkadot/types/interfaces/democracy"; import type { BlockStats } from "@polkadot/types/interfaces/dev"; +import type { + CallDryRunEffects, + DispatchResultWithPostInfo, + PostDispatchInfo, + XcmDryRunApiError, + XcmDryRunEffects, +} from "@polkadot/types/interfaces/dryRunApi"; import type { ApprovalFlag, DefunctVoter, @@ -396,10 +403,13 @@ import type { ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, + ExtrinsicPayloadV5, ExtrinsicSignature, ExtrinsicSignatureV4, + ExtrinsicSignatureV5, ExtrinsicUnknown, ExtrinsicV4, + ExtrinsicV5, ImmortalEra, MortalEra, MultiSignature, @@ -1145,48 +1155,88 @@ import type { import type { Multisig, Timepoint } from "@polkadot/types/interfaces/utility"; import type { VestingInfo } from "@polkadot/types/interfaces/vesting"; import type { + AssetIdV2, + AssetIdV3, + AssetIdV4, AssetInstance, AssetInstanceV0, AssetInstanceV1, AssetInstanceV2, + AssetInstanceV3, + AssetInstanceV4, BodyId, + BodyIdV2, + BodyIdV3, BodyPart, + BodyPartV2, + BodyPartV3, DoubleEncodedCall, Fungibility, FungibilityV0, FungibilityV1, FungibilityV2, + FungibilityV3, + FungibilityV4, InboundStatus, InstructionV2, + InstructionV3, + InstructionV4, InteriorMultiLocation, + InteriorMultiLocationV2, + InteriorMultiLocationV3, Junction, JunctionV0, JunctionV1, JunctionV2, + JunctionV3, + JunctionV4, Junctions, JunctionsV1, JunctionsV2, + JunctionsV3, + JunctionsV4, + MaxPalletNameLen, + MaxPalletsInfo, + MaybeErrorCodeV3, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, + MultiAssetFilterV3, + MultiAssetFilterV4, MultiAssetV0, MultiAssetV1, MultiAssetV2, + MultiAssetV3, + MultiAssetV4, MultiAssets, MultiAssetsV1, MultiAssetsV2, + MultiAssetsV3, + MultiAssetsV4, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, + MultiLocationV3, + MultiLocationV4, NetworkId, + NetworkIdV2, + NetworkIdV3, + NetworkIdV4, OriginKindV0, OriginKindV1, OriginKindV2, + OriginKindV3, + OriginKindV4, OutboundStatus, Outcome, + OutcomeV4, + PalletInfoV3, + PalletInfoV4, QueryId, + QueryResponseInfoV3, + QueryResponseInfoV4, QueryStatus, QueueConfigData, Response, @@ -1194,36 +1244,49 @@ import type { ResponseV1, ResponseV2, ResponseV2Error, - ResponseV2Result, + ResponseV3, + ResponseV3Error, + ResponseV3Result, + ResponseV4, + UncheckedFungibilityV4, VersionMigrationStage, + VersionV3, + VersionV4, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, + WeightLimitV3, WildFungibility, WildFungibilityV0, WildFungibilityV1, WildFungibilityV2, + WildFungibilityV3, + WildFungibilityV4, WildMultiAsset, WildMultiAssetV1, WildMultiAssetV2, + WildMultiAssetV3, + WildMultiAssetV4, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, - XcmOrder, + XcmErrorV3, + XcmErrorV4, XcmOrderV0, XcmOrderV1, - XcmOrderV2, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, + XcmV3, + XcmV4, XcmVersion, XcmpMessageFormat, } from "@polkadot/types/interfaces/xcm"; @@ -1275,10 +1338,15 @@ declare module "@polkadot/types/types/registry" { AssetDestroyWitness: AssetDestroyWitness; AssetDetails: AssetDetails; AssetId: AssetId; + AssetIdV2: AssetIdV2; + AssetIdV3: AssetIdV3; + AssetIdV4: AssetIdV4; AssetInstance: AssetInstance; AssetInstanceV0: AssetInstanceV0; AssetInstanceV1: AssetInstanceV1; AssetInstanceV2: AssetInstanceV2; + AssetInstanceV3: AssetInstanceV3; + AssetInstanceV4: AssetInstanceV4; AssetMetadata: AssetMetadata; AssetOptions: AssetOptions; AssignmentId: AssignmentId; @@ -1351,7 +1419,11 @@ declare module "@polkadot/types/types/registry" { BlockV2: BlockV2; BlockWeights: BlockWeights; BodyId: BodyId; + BodyIdV2: BodyIdV2; + BodyIdV3: BodyIdV3; BodyPart: BodyPart; + BodyPartV2: BodyPartV2; + BodyPartV3: BodyPartV3; bool: bool; Bool: Bool; Bounty: Bounty; @@ -1367,6 +1439,7 @@ declare module "@polkadot/types/types/registry" { BufferedSessionChange: BufferedSessionChange; Bytes: Bytes; Call: Call; + CallDryRunEffects: CallDryRunEffects; CallHash: CallHash; CallHashOf: CallHashOf; CallIndex: CallIndex; @@ -1526,6 +1599,7 @@ declare module "@polkadot/types/types/registry" { DispatchResult: DispatchResult; DispatchResultOf: DispatchResultOf; DispatchResultTo198: DispatchResultTo198; + DispatchResultWithPostInfo: DispatchResultWithPostInfo; DisputeLocation: DisputeLocation; DisputeProof: DisputeProof; DisputeResult: DisputeResult; @@ -1645,12 +1719,15 @@ declare module "@polkadot/types/types/registry" { ExtrinsicPayload: ExtrinsicPayload; ExtrinsicPayloadUnknown: ExtrinsicPayloadUnknown; ExtrinsicPayloadV4: ExtrinsicPayloadV4; + ExtrinsicPayloadV5: ExtrinsicPayloadV5; ExtrinsicSignature: ExtrinsicSignature; ExtrinsicSignatureV4: ExtrinsicSignatureV4; + ExtrinsicSignatureV5: ExtrinsicSignatureV5; ExtrinsicStatus: ExtrinsicStatus; ExtrinsicsWeight: ExtrinsicsWeight; ExtrinsicUnknown: ExtrinsicUnknown; ExtrinsicV4: ExtrinsicV4; + ExtrinsicV5: ExtrinsicV5; f32: f32; F32: F32; f64: f64; @@ -1686,6 +1763,8 @@ declare module "@polkadot/types/types/registry" { FungibilityV0: FungibilityV0; FungibilityV1: FungibilityV1; FungibilityV2: FungibilityV2; + FungibilityV3: FungibilityV3; + FungibilityV4: FungibilityV4; FungiblesAccessError: FungiblesAccessError; Gas: Gas; GenesisBuildErr: GenesisBuildErr; @@ -1772,8 +1851,12 @@ declare module "@polkadot/types/types/registry" { InstantiateReturnValueOk: InstantiateReturnValueOk; InstantiateReturnValueTo267: InstantiateReturnValueTo267; InstructionV2: InstructionV2; + InstructionV3: InstructionV3; + InstructionV4: InstructionV4; InstructionWeights: InstructionWeights; InteriorMultiLocation: InteriorMultiLocation; + InteriorMultiLocationV2: InteriorMultiLocationV2; + InteriorMultiLocationV3: InteriorMultiLocationV3; InvalidDisputeStatementKind: InvalidDisputeStatementKind; InvalidTransaction: InvalidTransaction; isize: isize; @@ -1783,9 +1866,13 @@ declare module "@polkadot/types/types/registry" { Junctions: Junctions; JunctionsV1: JunctionsV1; JunctionsV2: JunctionsV2; + JunctionsV3: JunctionsV3; + JunctionsV4: JunctionsV4; JunctionV0: JunctionV0; JunctionV1: JunctionV1; JunctionV2: JunctionV2; + JunctionV3: JunctionV3; + JunctionV4: JunctionV4; Justification: Justification; JustificationNotification: JustificationNotification; Justifications: Justifications; @@ -1810,6 +1897,9 @@ declare module "@polkadot/types/types/registry" { LookupSource: LookupSource; LookupTarget: LookupTarget; LotteryConfig: LotteryConfig; + MaxPalletNameLen: MaxPalletNameLen; + MaxPalletsInfo: MaxPalletsInfo; + MaybeErrorCodeV3: MaybeErrorCodeV3; MaybeRandomness: MaybeRandomness; MaybeVrf: MaybeVrf; MemberCount: MemberCount; @@ -1866,22 +1956,33 @@ declare module "@polkadot/types/types/registry" { MultiAssetFilter: MultiAssetFilter; MultiAssetFilterV1: MultiAssetFilterV1; MultiAssetFilterV2: MultiAssetFilterV2; + MultiAssetFilterV3: MultiAssetFilterV3; + MultiAssetFilterV4: MultiAssetFilterV4; MultiAssets: MultiAssets; MultiAssetsV1: MultiAssetsV1; MultiAssetsV2: MultiAssetsV2; + MultiAssetsV3: MultiAssetsV3; + MultiAssetsV4: MultiAssetsV4; MultiAssetV0: MultiAssetV0; MultiAssetV1: MultiAssetV1; MultiAssetV2: MultiAssetV2; + MultiAssetV3: MultiAssetV3; + MultiAssetV4: MultiAssetV4; MultiDisputeStatementSet: MultiDisputeStatementSet; MultiLocation: MultiLocation; MultiLocationV0: MultiLocationV0; MultiLocationV1: MultiLocationV1; MultiLocationV2: MultiLocationV2; + MultiLocationV3: MultiLocationV3; + MultiLocationV4: MultiLocationV4; Multiplier: Multiplier; Multisig: Multisig; MultiSignature: MultiSignature; MultiSigner: MultiSigner; NetworkId: NetworkId; + NetworkIdV2: NetworkIdV2; + NetworkIdV3: NetworkIdV3; + NetworkIdV4: NetworkIdV4; NetworkState: NetworkState; NetworkStatePeerset: NetworkStatePeerset; NetworkStatePeersetInfo: NetworkStatePeersetInfo; @@ -1925,6 +2026,8 @@ declare module "@polkadot/types/types/registry" { OriginKindV0: OriginKindV0; OriginKindV1: OriginKindV1; OriginKindV2: OriginKindV2; + OriginKindV3: OriginKindV3; + OriginKindV4: OriginKindV4; OutboundHrmpChannelLimitations: OutboundHrmpChannelLimitations; OutboundHrmpMessage: OutboundHrmpMessage; OutboundLaneData: OutboundLaneData; @@ -1932,6 +2035,7 @@ declare module "@polkadot/types/types/registry" { OutboundPayload: OutboundPayload; OutboundStatus: OutboundStatus; Outcome: Outcome; + OutcomeV4: OutcomeV4; OuterEnums15: OuterEnums15; OverweightIndex: OverweightIndex; Owner: Owner; @@ -1946,6 +2050,8 @@ declare module "@polkadot/types/types/registry" { PalletEventMetadataLatest: PalletEventMetadataLatest; PalletEventMetadataV14: PalletEventMetadataV14; PalletId: PalletId; + PalletInfoV3: PalletInfoV3; + PalletInfoV4: PalletInfoV4; PalletMetadataLatest: PalletMetadataLatest; PalletMetadataV14: PalletMetadataV14; PalletMetadataV15: PalletMetadataV15; @@ -1998,6 +2104,7 @@ declare module "@polkadot/types/types/registry" { Points: Points; PortableType: PortableType; PortableTypeV14: PortableTypeV14; + PostDispatchInfo: PostDispatchInfo; Precommits: Precommits; PrefabWasmModule: PrefabWasmModule; PrefixedStorageKey: PrefixedStorageKey; @@ -2018,6 +2125,8 @@ declare module "@polkadot/types/types/registry" { PvfExecTimeoutKind: PvfExecTimeoutKind; PvfPrepTimeoutKind: PvfPrepTimeoutKind; QueryId: QueryId; + QueryResponseInfoV3: QueryResponseInfoV3; + QueryResponseInfoV4: QueryResponseInfoV4; QueryStatus: QueryStatus; QueueConfigData: QueueConfigData; QueuedParathread: QueuedParathread; @@ -2075,7 +2184,10 @@ declare module "@polkadot/types/types/registry" { ResponseV1: ResponseV1; ResponseV2: ResponseV2; ResponseV2Error: ResponseV2Error; - ResponseV2Result: ResponseV2Result; + ResponseV3: ResponseV3; + ResponseV3Error: ResponseV3Error; + ResponseV3Result: ResponseV3Result; + ResponseV4: ResponseV4; Retriable: Retriable; RewardDestination: RewardDestination; RewardPoint: RewardPoint; @@ -2312,6 +2424,7 @@ declare module "@polkadot/types/types/registry" { U8: U8; UnappliedSlash: UnappliedSlash; UnappliedSlashOther: UnappliedSlashOther; + UncheckedFungibilityV4: UncheckedFungibilityV4; UncleEntryItem: UncleEntryItem; UnknownTransaction: UnknownTransaction; UnlockChunk: UnlockChunk; @@ -2350,6 +2463,8 @@ declare module "@polkadot/types/types/registry" { VersionedResponse: VersionedResponse; VersionedXcm: VersionedXcm; VersionMigrationStage: VersionMigrationStage; + VersionV3: VersionV3; + VersionV4: VersionV4; VestingInfo: VestingInfo; VestingSchedule: VestingSchedule; Vote: Vote; @@ -2370,6 +2485,7 @@ declare module "@polkadot/types/types/registry" { VrfProof: VrfProof; Weight: Weight; WeightLimitV2: WeightLimitV2; + WeightLimitV3: WeightLimitV3; WeightMultiplier: WeightMultiplier; WeightPerClass: WeightPerClass; WeightToFeeCoefficient: WeightToFeeCoefficient; @@ -2380,9 +2496,13 @@ declare module "@polkadot/types/types/registry" { WildFungibilityV0: WildFungibilityV0; WildFungibilityV1: WildFungibilityV1; WildFungibilityV2: WildFungibilityV2; + WildFungibilityV3: WildFungibilityV3; + WildFungibilityV4: WildFungibilityV4; WildMultiAsset: WildMultiAsset; WildMultiAssetV1: WildMultiAssetV1; WildMultiAssetV2: WildMultiAssetV2; + WildMultiAssetV3: WildMultiAssetV3; + WildMultiAssetV4: WildMultiAssetV4; WinnersData: WinnersData; WinnersData10: WinnersData10; WinnersDataTuple: WinnersDataTuple; @@ -2393,14 +2513,16 @@ declare module "@polkadot/types/types/registry" { WithdrawReasons: WithdrawReasons; Xcm: Xcm; XcmAssetId: XcmAssetId; + XcmDryRunApiError: XcmDryRunApiError; + XcmDryRunEffects: XcmDryRunEffects; XcmError: XcmError; XcmErrorV0: XcmErrorV0; XcmErrorV1: XcmErrorV1; XcmErrorV2: XcmErrorV2; - XcmOrder: XcmOrder; + XcmErrorV3: XcmErrorV3; + XcmErrorV4: XcmErrorV4; XcmOrderV0: XcmOrderV0; XcmOrderV1: XcmOrderV1; - XcmOrderV2: XcmOrderV2; XcmOrigin: XcmOrigin; XcmOriginKind: XcmOriginKind; XcmPaymentApiError: XcmPaymentApiError; @@ -2408,6 +2530,8 @@ declare module "@polkadot/types/types/registry" { XcmV0: XcmV0; XcmV1: XcmV1; XcmV2: XcmV2; + XcmV3: XcmV3; + XcmV4: XcmV4; XcmVersion: XcmVersion; } // InterfaceTypes } // declare module From 415151d5c820ed1495a790c56e134c3b5986d7c1 Mon Sep 17 00:00:00 2001 From: girazoki Date: Thu, 31 Oct 2024 16:05:13 +0100 Subject: [PATCH 73/82] fix clippy --- pallets/external-validator-slashes/src/mock.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/external-validator-slashes/src/mock.rs b/pallets/external-validator-slashes/src/mock.rs index 8c54b3b52..2421239c9 100644 --- a/pallets/external-validator-slashes/src/mock.rs +++ b/pallets/external-validator-slashes/src/mock.rs @@ -126,7 +126,7 @@ impl MockEraIndexProvider { impl EraIndexProvider for MockEraIndexProvider { fn active_era() -> ActiveEraInfo { ActiveEraInfo { - index: ERA_INDEX.with(|q| (*q.borrow()).clone()), + index: ERA_INDEX.with(|q| *q.borrow()), start: None, } } From 0d169a55235a780726f07c764c8b2892bf7a82a1 Mon Sep 17 00:00:00 2001 From: girazoki Date: Mon, 4 Nov 2024 11:02:15 +0100 Subject: [PATCH 74/82] typescript api new --- .../interfaces/augment-api-consts.ts | 13 + .../interfaces/augment-api-errors.ts | 12 + .../interfaces/augment-api-events.ts | 10 + .../interfaces/augment-api-query.ts | 31 + .../dancelight/interfaces/augment-api-tx.ts | 20 + .../src/dancelight/interfaces/lookup.ts | 895 +++++++++--------- .../src/dancelight/interfaces/registry.ts | 8 + .../src/dancelight/interfaces/types-lookup.ts | 889 +++++++++-------- 8 files changed, 1037 insertions(+), 841 deletions(-) diff --git a/typescript-api/src/dancelight/interfaces/augment-api-consts.ts b/typescript-api/src/dancelight/interfaces/augment-api-consts.ts index dc0004bb4..411a2d61d 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-consts.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-consts.ts @@ -155,6 +155,19 @@ declare module "@polkadot/api-base/types/consts" { /** Generic const */ [key: string]: Codec; }; + externalValidatorSlashes: { + /** Number of eras that staked funds must remain bonded for. */ + bondingDuration: u32 & AugmentedConst; + /** + * Number of eras that slashes are deferred by, after computation. + * + * This should be less than the bonding duration. Set to 0 if slashes should be applied immediately, without + * opportunity for intervention. + */ + slashDeferDuration: u32 & AugmentedConst; + /** Generic const */ + [key: string]: Codec; + }; fellowshipReferenda: { /** * Quantization level for the referendum wakeup scheduler. A higher number will result in fewer storage diff --git a/typescript-api/src/dancelight/interfaces/augment-api-errors.ts b/typescript-api/src/dancelight/interfaces/augment-api-errors.ts index e41215365..1b170dfc4 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-errors.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-errors.ts @@ -243,6 +243,18 @@ declare module "@polkadot/api-base/types/errors" { /** Generic error */ [key: string]: AugmentedError; }; + externalValidatorSlashes: { + ActiveEraNotSet: AugmentedError; + DeferPeriodIsOver: AugmentedError; + EmptyTargets: AugmentedError; + ErrorComputingSlash: AugmentedError; + InvalidSlashIndex: AugmentedError; + NotSortedAndUnique: AugmentedError; + ProvidedFutureEra: AugmentedError; + ProvidedNonSlashableEra: AugmentedError; + /** Generic error */ + [key: string]: AugmentedError; + }; fellowshipCollective: { /** Account is already a member. */ AlreadyMember: AugmentedError; diff --git a/typescript-api/src/dancelight/interfaces/augment-api-events.ts b/typescript-api/src/dancelight/interfaces/augment-api-events.ts index c7fd12288..bf0aa160b 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-events.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-events.ts @@ -228,6 +228,16 @@ declare module "@polkadot/api-base/types/events" { /** Generic event */ [key: string]: AugmentedEvent; }; + externalValidatorSlashes: { + /** Removed author data */ + SlashReported: AugmentedEvent< + ApiType, + [validator: AccountId32, fraction: Perbill, slashEra: u32], + { validator: AccountId32; fraction: Perbill; slashEra: u32 } + >; + /** Generic event */ + [key: string]: AugmentedEvent; + }; fellowshipCollective: { /** A member `who` has been added. */ MemberAdded: AugmentedEvent; diff --git a/typescript-api/src/dancelight/interfaces/augment-api-query.ts b/typescript-api/src/dancelight/interfaces/augment-api-query.ts index ad9e5579f..f10abf0a0 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-query.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-query.ts @@ -47,6 +47,7 @@ import type { PalletConfigurationHostConfiguration, PalletConvictionVotingVoteVoting, PalletDataPreserversRegisteredProfile, + PalletExternalValidatorSlashesSlash, PalletExternalValidatorsForcing, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, @@ -711,6 +712,36 @@ declare module "@polkadot/api-base/types/storage" { /** Generic query */ [key: string]: QueryableStorageEntry; }; + externalValidatorSlashes: { + /** + * A mapping from still-bonded eras to the first session index of that era. + * + * Must contains information for eras for the range: `[active_era - bounding_duration; active_era]` + */ + bondedEras: AugmentedQuery Observable>>, []> & + QueryableStorageEntry; + /** A counter on the number of slashes we have performed */ + nextSlashId: AugmentedQuery Observable, []> & QueryableStorageEntry; + /** All unapplied slashes that are queued for later. */ + slashes: AugmentedQuery< + ApiType, + (arg: u32 | AnyNumber | Uint8Array) => Observable>, + [u32] + > & + QueryableStorageEntry; + /** All slashing events on validators, mapped by era to the highest slash proportion and slash value of the era. */ + validatorSlashInEra: AugmentedQuery< + ApiType, + ( + arg1: u32 | AnyNumber | Uint8Array, + arg2: AccountId32 | string | Uint8Array + ) => Observable>, + [u32, AccountId32] + > & + QueryableStorageEntry; + /** Generic query */ + [key: string]: QueryableStorageEntry; + }; fellowshipCollective: { /** The index of each ranks's member into the group of members who have at least that rank. */ idToIndex: AugmentedQuery< diff --git a/typescript-api/src/dancelight/interfaces/augment-api-tx.ts b/typescript-api/src/dancelight/interfaces/augment-api-tx.ts index 12d597a23..2bb4f9520 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-tx.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-tx.ts @@ -1320,6 +1320,26 @@ declare module "@polkadot/api-base/types/submittable" { /** Generic tx */ [key: string]: SubmittableExtrinsicFunction; }; + externalValidatorSlashes: { + /** Cancel a slash that was deferred for a later era */ + cancelDeferredSlash: AugmentedSubmittable< + ( + era: u32 | AnyNumber | Uint8Array, + slashIndices: Vec | (u32 | AnyNumber | Uint8Array)[] + ) => SubmittableExtrinsic, + [u32, Vec] + >; + forceInjectSlash: AugmentedSubmittable< + ( + era: u32 | AnyNumber | Uint8Array, + validator: AccountId32 | string | Uint8Array, + percentage: Perbill | AnyNumber | Uint8Array + ) => SubmittableExtrinsic, + [u32, AccountId32, Perbill] + >; + /** Generic tx */ + [key: string]: SubmittableExtrinsicFunction; + }; fellowshipCollective: { /** * Introduce a new member. diff --git a/typescript-api/src/dancelight/interfaces/lookup.ts b/typescript-api/src/dancelight/interfaces/lookup.ts index ad1e3967e..4bd81315b 100644 --- a/typescript-api/src/dancelight/interfaces/lookup.ts +++ b/typescript-api/src/dancelight/interfaces/lookup.ts @@ -453,7 +453,17 @@ export default { PalletExternalValidatorsForcing: { _enum: ["NotForcing", "ForceNew", "ForceNone", "ForceAlways"], }, - /** Lookup56: pallet_session::pallet::Event */ + /** Lookup56: pallet_external_validator_slashes::pallet::Event */ + PalletExternalValidatorSlashesEvent: { + _enum: { + SlashReported: { + validator: "AccountId32", + fraction: "Perbill", + slashEra: "u32", + }, + }, + }, + /** Lookup58: pallet_session::pallet::Event */ PalletSessionEvent: { _enum: { NewSession: { @@ -461,7 +471,7 @@ export default { }, }, }, - /** Lookup57: pallet_grandpa::pallet::Event */ + /** Lookup59: pallet_grandpa::pallet::Event */ PalletGrandpaEvent: { _enum: { NewAuthorities: { @@ -471,9 +481,9 @@ export default { Resumed: "Null", }, }, - /** Lookup60: sp_consensus_grandpa::app::Public */ + /** Lookup62: sp_consensus_grandpa::app::Public */ SpConsensusGrandpaAppPublic: "[u8;32]", - /** Lookup61: pallet_inflation_rewards::pallet::Event */ + /** Lookup63: pallet_inflation_rewards::pallet::Event */ PalletInflationRewardsEvent: { _enum: { RewardedOrchestrator: { @@ -487,7 +497,7 @@ export default { }, }, }, - /** Lookup62: pallet_treasury::pallet::Event */ + /** Lookup64: pallet_treasury::pallet::Event */ PalletTreasuryEvent: { _enum: { Spending: { @@ -540,14 +550,14 @@ export default { }, }, }, - /** Lookup64: pallet_conviction_voting::pallet::Event */ + /** Lookup66: pallet_conviction_voting::pallet::Event */ PalletConvictionVotingEvent: { _enum: { Delegated: "(AccountId32,AccountId32)", Undelegated: "AccountId32", }, }, - /** Lookup65: pallet_referenda::pallet::Event */ + /** Lookup67: pallet_referenda::pallet::Event */ PalletReferendaEvent: { _enum: { Submitted: { @@ -626,7 +636,7 @@ export default { }, }, /** - * Lookup67: frame_support::traits::preimages::Bounded */ FrameSupportPreimagesBounded: { @@ -647,7 +657,7 @@ export default { }, }, }, - /** Lookup69: frame_system::pallet::Call */ + /** Lookup71: frame_system::pallet::Call */ FrameSystemCall: { _enum: { remark: { @@ -690,7 +700,7 @@ export default { }, }, }, - /** Lookup73: pallet_babe::pallet::Call */ + /** Lookup75: pallet_babe::pallet::Call */ PalletBabeCall: { _enum: { report_equivocation: { @@ -707,7 +717,7 @@ export default { }, }, /** - * Lookup74: sp_consensus_slots::EquivocationProof, + * Lookup76: sp_consensus_slots::EquivocationProof, * sp_consensus_babe::app::Public> */ SpConsensusSlotsEquivocationProof: { @@ -716,7 +726,7 @@ export default { firstHeader: "SpRuntimeHeader", secondHeader: "SpRuntimeHeader", }, - /** Lookup75: sp_runtime::generic::header::Header */ + /** Lookup77: sp_runtime::generic::header::Header */ SpRuntimeHeader: { parentHash: "H256", number: "Compact", @@ -724,15 +734,15 @@ export default { extrinsicsRoot: "H256", digest: "SpRuntimeDigest", }, - /** Lookup77: sp_consensus_babe::app::Public */ + /** Lookup79: sp_consensus_babe::app::Public */ SpConsensusBabeAppPublic: "[u8;32]", - /** Lookup78: sp_session::MembershipProof */ + /** Lookup80: sp_session::MembershipProof */ SpSessionMembershipProof: { session: "u32", trieNodes: "Vec", validatorCount: "u32", }, - /** Lookup79: sp_consensus_babe::digests::NextConfigDescriptor */ + /** Lookup81: sp_consensus_babe::digests::NextConfigDescriptor */ SpConsensusBabeDigestsNextConfigDescriptor: { _enum: { __Unused0: "Null", @@ -742,11 +752,11 @@ export default { }, }, }, - /** Lookup81: sp_consensus_babe::AllowedSlots */ + /** Lookup83: sp_consensus_babe::AllowedSlots */ SpConsensusBabeAllowedSlots: { _enum: ["PrimarySlots", "PrimaryAndSecondaryPlainSlots", "PrimaryAndSecondaryVRFSlots"], }, - /** Lookup82: pallet_timestamp::pallet::Call */ + /** Lookup84: pallet_timestamp::pallet::Call */ PalletTimestampCall: { _enum: { set: { @@ -754,7 +764,7 @@ export default { }, }, }, - /** Lookup83: pallet_balances::pallet::Call */ + /** Lookup85: pallet_balances::pallet::Call */ PalletBalancesCall: { _enum: { transfer_allow_death: { @@ -797,11 +807,11 @@ export default { }, }, }, - /** Lookup89: pallet_balances::types::AdjustmentDirection */ + /** Lookup91: pallet_balances::types::AdjustmentDirection */ PalletBalancesAdjustmentDirection: { _enum: ["Increase", "Decrease"], }, - /** Lookup90: pallet_parameters::pallet::Call */ + /** Lookup92: pallet_parameters::pallet::Call */ PalletParametersCall: { _enum: { set_parameter: { @@ -809,20 +819,20 @@ export default { }, }, }, - /** Lookup91: dancelight_runtime::RuntimeParameters */ + /** Lookup93: dancelight_runtime::RuntimeParameters */ DancelightRuntimeRuntimeParameters: { _enum: { Preimage: "DancelightRuntimeDynamicParamsPreimageParameters", }, }, - /** Lookup92: dancelight_runtime::dynamic_params::preimage::Parameters */ + /** Lookup94: dancelight_runtime::dynamic_params::preimage::Parameters */ DancelightRuntimeDynamicParamsPreimageParameters: { _enum: { BaseDeposit: "(DancelightRuntimeDynamicParamsPreimageBaseDeposit,Option)", ByteDeposit: "(DancelightRuntimeDynamicParamsPreimageByteDeposit,Option)", }, }, - /** Lookup93: pallet_registrar::pallet::Call */ + /** Lookup95: pallet_registrar::pallet::Call */ PalletRegistrarCall: { _enum: { register: { @@ -873,7 +883,7 @@ export default { }, }, }, - /** Lookup94: dp_container_chain_genesis_data::ContainerChainGenesisData */ + /** Lookup96: dp_container_chain_genesis_data::ContainerChainGenesisData */ DpContainerChainGenesisDataContainerChainGenesisData: { storage: "Vec", name: "Bytes", @@ -882,36 +892,36 @@ export default { extensions: "Bytes", properties: "DpContainerChainGenesisDataProperties", }, - /** Lookup96: dp_container_chain_genesis_data::ContainerChainGenesisDataItem */ + /** Lookup98: dp_container_chain_genesis_data::ContainerChainGenesisDataItem */ DpContainerChainGenesisDataContainerChainGenesisDataItem: { key: "Bytes", value: "Bytes", }, - /** Lookup98: dp_container_chain_genesis_data::Properties */ + /** Lookup100: dp_container_chain_genesis_data::Properties */ DpContainerChainGenesisDataProperties: { tokenMetadata: "DpContainerChainGenesisDataTokenMetadata", isEthereum: "bool", }, - /** Lookup99: dp_container_chain_genesis_data::TokenMetadata */ + /** Lookup101: dp_container_chain_genesis_data::TokenMetadata */ DpContainerChainGenesisDataTokenMetadata: { tokenSymbol: "Bytes", ss58Format: "u32", tokenDecimals: "u32", }, - /** Lookup103: tp_traits::SlotFrequency */ + /** Lookup105: tp_traits::SlotFrequency */ TpTraitsSlotFrequency: { min: "u32", max: "u32", }, - /** Lookup105: tp_traits::ParathreadParams */ + /** Lookup107: tp_traits::ParathreadParams */ TpTraitsParathreadParams: { slotFrequency: "TpTraitsSlotFrequency", }, - /** Lookup106: sp_trie::storage_proof::StorageProof */ + /** Lookup108: sp_trie::storage_proof::StorageProof */ SpTrieStorageProof: { trieNodes: "BTreeSet", }, - /** Lookup108: sp_runtime::MultiSignature */ + /** Lookup110: sp_runtime::MultiSignature */ SpRuntimeMultiSignature: { _enum: { Ed25519: "[u8;64]", @@ -919,7 +929,7 @@ export default { Ecdsa: "[u8;65]", }, }, - /** Lookup111: pallet_configuration::pallet::Call */ + /** Lookup113: pallet_configuration::pallet::Call */ PalletConfigurationCall: { _enum: { set_max_collators: { @@ -1019,7 +1029,7 @@ export default { }, }, }, - /** Lookup114: pallet_invulnerables::pallet::Call */ + /** Lookup115: pallet_invulnerables::pallet::Call */ PalletInvulnerablesCall: { _enum: { __Unused0: "Null", @@ -1031,11 +1041,11 @@ export default { }, }, }, - /** Lookup115: pallet_collator_assignment::pallet::Call */ + /** Lookup116: pallet_collator_assignment::pallet::Call */ PalletCollatorAssignmentCall: "Null", - /** Lookup116: pallet_authority_assignment::pallet::Call */ + /** Lookup117: pallet_authority_assignment::pallet::Call */ PalletAuthorityAssignmentCall: "Null", - /** Lookup117: pallet_author_noting::pallet::Call */ + /** Lookup118: pallet_author_noting::pallet::Call */ PalletAuthorNotingCall: { _enum: { set_latest_author_data: { @@ -1052,7 +1062,7 @@ export default { }, }, }, - /** Lookup118: pallet_services_payment::pallet::Call */ + /** Lookup119: pallet_services_payment::pallet::Call */ PalletServicesPaymentCall: { _enum: { purchase_credits: { @@ -1085,7 +1095,7 @@ export default { }, }, }, - /** Lookup119: pallet_data_preservers::pallet::Call */ + /** Lookup120: pallet_data_preservers::pallet::Call */ PalletDataPreserversCall: { _enum: { __Unused0: "Null", @@ -1126,14 +1136,14 @@ export default { }, }, }, - /** Lookup120: pallet_data_preservers::types::Profile */ + /** Lookup121: pallet_data_preservers::types::Profile */ PalletDataPreserversProfile: { url: "Bytes", paraIds: "PalletDataPreserversParaIdsFilter", mode: "PalletDataPreserversProfileMode", assignmentRequest: "DancelightRuntimePreserversAssignmentPaymentRequest", }, - /** Lookup122: pallet_data_preservers::types::ParaIdsFilter */ + /** Lookup123: pallet_data_preservers::types::ParaIdsFilter */ PalletDataPreserversParaIdsFilter: { _enum: { AnyParaId: "Null", @@ -1141,7 +1151,7 @@ export default { Blacklist: "BTreeSet", }, }, - /** Lookup126: pallet_data_preservers::types::ProfileMode */ + /** Lookup127: pallet_data_preservers::types::ProfileMode */ PalletDataPreserversProfileMode: { _enum: { Bootnode: "Null", @@ -1150,19 +1160,19 @@ export default { }, }, }, - /** Lookup127: dancelight_runtime::PreserversAssignmentPaymentRequest */ + /** Lookup128: dancelight_runtime::PreserversAssignmentPaymentRequest */ DancelightRuntimePreserversAssignmentPaymentRequest: { _enum: ["Free"], }, - /** Lookup128: dancelight_runtime::PreserversAssignmentPaymentExtra */ + /** Lookup129: dancelight_runtime::PreserversAssignmentPaymentExtra */ DancelightRuntimePreserversAssignmentPaymentExtra: { _enum: ["Free"], }, - /** Lookup129: dancelight_runtime::PreserversAssignmentPaymentWitness */ + /** Lookup130: dancelight_runtime::PreserversAssignmentPaymentWitness */ DancelightRuntimePreserversAssignmentPaymentWitness: { _enum: ["Free"], }, - /** Lookup130: pallet_external_validators::pallet::Call */ + /** Lookup131: pallet_external_validators::pallet::Call */ PalletExternalValidatorsCall: { _enum: { skip_external_validators: { @@ -1179,7 +1189,21 @@ export default { }, }, }, - /** Lookup131: pallet_session::pallet::Call */ + /** Lookup132: pallet_external_validator_slashes::pallet::Call */ + PalletExternalValidatorSlashesCall: { + _enum: { + cancel_deferred_slash: { + era: "u32", + slashIndices: "Vec", + }, + force_inject_slash: { + era: "u32", + validator: "AccountId32", + percentage: "Perbill", + }, + }, + }, + /** Lookup134: pallet_session::pallet::Call */ PalletSessionCall: { _enum: { set_keys: { @@ -1192,7 +1216,7 @@ export default { purge_keys: "Null", }, }, - /** Lookup132: dancelight_runtime::SessionKeys */ + /** Lookup135: dancelight_runtime::SessionKeys */ DancelightRuntimeSessionKeys: { grandpa: "SpConsensusGrandpaAppPublic", babe: "SpConsensusBabeAppPublic", @@ -1202,17 +1226,17 @@ export default { beefy: "SpConsensusBeefyEcdsaCryptoPublic", nimbus: "NimbusPrimitivesNimbusCryptoPublic", }, - /** Lookup133: polkadot_primitives::v7::validator_app::Public */ + /** Lookup136: polkadot_primitives::v7::validator_app::Public */ PolkadotPrimitivesV7ValidatorAppPublic: "[u8;32]", - /** Lookup134: polkadot_primitives::v7::assignment_app::Public */ + /** Lookup137: polkadot_primitives::v7::assignment_app::Public */ PolkadotPrimitivesV7AssignmentAppPublic: "[u8;32]", - /** Lookup135: sp_authority_discovery::app::Public */ + /** Lookup138: sp_authority_discovery::app::Public */ SpAuthorityDiscoveryAppPublic: "[u8;32]", - /** Lookup136: sp_consensus_beefy::ecdsa_crypto::Public */ + /** Lookup139: sp_consensus_beefy::ecdsa_crypto::Public */ SpConsensusBeefyEcdsaCryptoPublic: "[u8;33]", - /** Lookup138: nimbus_primitives::nimbus_crypto::Public */ + /** Lookup141: nimbus_primitives::nimbus_crypto::Public */ NimbusPrimitivesNimbusCryptoPublic: "[u8;32]", - /** Lookup139: pallet_grandpa::pallet::Call */ + /** Lookup142: pallet_grandpa::pallet::Call */ PalletGrandpaCall: { _enum: { report_equivocation: { @@ -1229,12 +1253,12 @@ export default { }, }, }, - /** Lookup140: sp_consensus_grandpa::EquivocationProof */ + /** Lookup143: sp_consensus_grandpa::EquivocationProof */ SpConsensusGrandpaEquivocationProof: { setId: "u64", equivocation: "SpConsensusGrandpaEquivocation", }, - /** Lookup141: sp_consensus_grandpa::Equivocation */ + /** Lookup144: sp_consensus_grandpa::Equivocation */ SpConsensusGrandpaEquivocation: { _enum: { Prevote: "FinalityGrandpaEquivocationPrevote", @@ -1242,7 +1266,7 @@ export default { }, }, /** - * Lookup142: finality_grandpa::Equivocation, sp_consensus_grandpa::app::Signature> */ FinalityGrandpaEquivocationPrevote: { @@ -1251,15 +1275,15 @@ export default { first: "(FinalityGrandpaPrevote,SpConsensusGrandpaAppSignature)", second: "(FinalityGrandpaPrevote,SpConsensusGrandpaAppSignature)", }, - /** Lookup143: finality_grandpa::Prevote */ + /** Lookup146: finality_grandpa::Prevote */ FinalityGrandpaPrevote: { targetHash: "H256", targetNumber: "u32", }, - /** Lookup144: sp_consensus_grandpa::app::Signature */ + /** Lookup147: sp_consensus_grandpa::app::Signature */ SpConsensusGrandpaAppSignature: "[u8;64]", /** - * Lookup146: finality_grandpa::Equivocation, sp_consensus_grandpa::app::Signature> */ FinalityGrandpaEquivocationPrecommit: { @@ -1268,12 +1292,12 @@ export default { first: "(FinalityGrandpaPrecommit,SpConsensusGrandpaAppSignature)", second: "(FinalityGrandpaPrecommit,SpConsensusGrandpaAppSignature)", }, - /** Lookup147: finality_grandpa::Precommit */ + /** Lookup150: finality_grandpa::Precommit */ FinalityGrandpaPrecommit: { targetHash: "H256", targetNumber: "u32", }, - /** Lookup149: pallet_treasury::pallet::Call */ + /** Lookup152: pallet_treasury::pallet::Call */ PalletTreasuryCall: { _enum: { __Unused0: "Null", @@ -1303,7 +1327,7 @@ export default { }, }, }, - /** Lookup151: pallet_conviction_voting::pallet::Call */ + /** Lookup154: pallet_conviction_voting::pallet::Call */ PalletConvictionVotingCall: { _enum: { vote: { @@ -1334,7 +1358,7 @@ export default { }, }, }, - /** Lookup152: pallet_conviction_voting::vote::AccountVote */ + /** Lookup155: pallet_conviction_voting::vote::AccountVote */ PalletConvictionVotingVoteAccountVote: { _enum: { Standard: { @@ -1352,11 +1376,11 @@ export default { }, }, }, - /** Lookup154: pallet_conviction_voting::conviction::Conviction */ + /** Lookup157: pallet_conviction_voting::conviction::Conviction */ PalletConvictionVotingConviction: { _enum: ["None", "Locked1x", "Locked2x", "Locked3x", "Locked4x", "Locked5x", "Locked6x"], }, - /** Lookup156: pallet_referenda::pallet::Call */ + /** Lookup159: pallet_referenda::pallet::Call */ PalletReferendaCall: { _enum: { submit: { @@ -1391,7 +1415,7 @@ export default { }, }, }, - /** Lookup157: dancelight_runtime::OriginCaller */ + /** Lookup160: dancelight_runtime::OriginCaller */ DancelightRuntimeOriginCaller: { _enum: { system: "FrameSupportDispatchRawOrigin", @@ -1487,7 +1511,7 @@ export default { XcmPallet: "PalletXcmOrigin", }, }, - /** Lookup158: frame_support::dispatch::RawOrigin */ + /** Lookup161: frame_support::dispatch::RawOrigin */ FrameSupportDispatchRawOrigin: { _enum: { Root: "Null", @@ -1495,7 +1519,7 @@ export default { None: "Null", }, }, - /** Lookup159: dancelight_runtime::governance::origins::pallet_custom_origins::Origin */ + /** Lookup162: dancelight_runtime::governance::origins::pallet_custom_origins::Origin */ DancelightRuntimeGovernanceOriginsPalletCustomOriginsOrigin: { _enum: [ "StakingAdmin", @@ -1527,39 +1551,39 @@ export default { "Fellowship9Dan", ], }, - /** Lookup160: polkadot_runtime_parachains::origin::pallet::Origin */ + /** Lookup163: polkadot_runtime_parachains::origin::pallet::Origin */ PolkadotRuntimeParachainsOriginPalletOrigin: { _enum: { Parachain: "u32", }, }, - /** Lookup161: pallet_xcm::pallet::Origin */ + /** Lookup164: pallet_xcm::pallet::Origin */ PalletXcmOrigin: { _enum: { Xcm: "StagingXcmV4Location", Response: "StagingXcmV4Location", }, }, - /** Lookup162: staging_xcm::v4::location::Location */ + /** Lookup165: staging_xcm::v4::location::Location */ StagingXcmV4Location: { parents: "u8", interior: "StagingXcmV4Junctions", }, - /** Lookup163: staging_xcm::v4::junctions::Junctions */ + /** Lookup166: staging_xcm::v4::junctions::Junctions */ StagingXcmV4Junctions: { _enum: { Here: "Null", - X1: "[Lookup165;1]", - X2: "[Lookup165;2]", - X3: "[Lookup165;3]", - X4: "[Lookup165;4]", - X5: "[Lookup165;5]", - X6: "[Lookup165;6]", - X7: "[Lookup165;7]", - X8: "[Lookup165;8]", + X1: "[Lookup168;1]", + X2: "[Lookup168;2]", + X3: "[Lookup168;3]", + X4: "[Lookup168;4]", + X5: "[Lookup168;5]", + X6: "[Lookup168;6]", + X7: "[Lookup168;7]", + X8: "[Lookup168;8]", }, }, - /** Lookup165: staging_xcm::v4::junction::Junction */ + /** Lookup168: staging_xcm::v4::junction::Junction */ StagingXcmV4Junction: { _enum: { Parachain: "Compact", @@ -1589,7 +1613,7 @@ export default { GlobalConsensus: "StagingXcmV4JunctionNetworkId", }, }, - /** Lookup167: staging_xcm::v4::junction::NetworkId */ + /** Lookup170: staging_xcm::v4::junction::NetworkId */ StagingXcmV4JunctionNetworkId: { _enum: { ByGenesis: "[u8;32]", @@ -1610,7 +1634,7 @@ export default { PolkadotBulletin: "Null", }, }, - /** Lookup168: xcm::v3::junction::BodyId */ + /** Lookup171: xcm::v3::junction::BodyId */ XcmV3JunctionBodyId: { _enum: { Unit: "Null", @@ -1625,7 +1649,7 @@ export default { Treasury: "Null", }, }, - /** Lookup169: xcm::v3::junction::BodyPart */ + /** Lookup172: xcm::v3::junction::BodyPart */ XcmV3JunctionBodyPart: { _enum: { Voice: "Null", @@ -1646,16 +1670,16 @@ export default { }, }, }, - /** Lookup177: sp_core::Void */ + /** Lookup180: sp_core::Void */ SpCoreVoid: "Null", - /** Lookup178: frame_support::traits::schedule::DispatchTime */ + /** Lookup181: frame_support::traits::schedule::DispatchTime */ FrameSupportScheduleDispatchTime: { _enum: { At: "u32", After: "u32", }, }, - /** Lookup180: pallet_ranked_collective::pallet::Call */ + /** Lookup183: pallet_ranked_collective::pallet::Call */ PalletRankedCollectiveCall: { _enum: { add_member: { @@ -1685,7 +1709,7 @@ export default { }, }, }, - /** Lookup182: pallet_whitelist::pallet::Call */ + /** Lookup185: pallet_whitelist::pallet::Call */ PalletWhitelistCall: { _enum: { whitelist_call: { @@ -1704,7 +1728,7 @@ export default { }, }, }, - /** Lookup183: polkadot_runtime_parachains::configuration::pallet::Call */ + /** Lookup186: polkadot_runtime_parachains::configuration::pallet::Call */ PolkadotRuntimeParachainsConfigurationPalletCall: { _enum: { set_validation_upgrade_cooldown: { @@ -2003,14 +2027,14 @@ export default { }, }, }, - /** Lookup184: polkadot_primitives::v7::async_backing::AsyncBackingParams */ + /** Lookup187: polkadot_primitives::v7::async_backing::AsyncBackingParams */ PolkadotPrimitivesV7AsyncBackingAsyncBackingParams: { maxCandidateDepth: "u32", allowedAncestryLen: "u32", }, - /** Lookup185: polkadot_primitives::v7::executor_params::ExecutorParams */ + /** Lookup188: polkadot_primitives::v7::executor_params::ExecutorParams */ PolkadotPrimitivesV7ExecutorParams: "Vec", - /** Lookup187: polkadot_primitives::v7::executor_params::ExecutorParam */ + /** Lookup190: polkadot_primitives::v7::executor_params::ExecutorParam */ PolkadotPrimitivesV7ExecutorParamsExecutorParam: { _enum: { __Unused0: "Null", @@ -2023,19 +2047,19 @@ export default { WasmExtBulkMemory: "Null", }, }, - /** Lookup188: polkadot_primitives::v7::PvfPrepKind */ + /** Lookup191: polkadot_primitives::v7::PvfPrepKind */ PolkadotPrimitivesV7PvfPrepKind: { _enum: ["Precheck", "Prepare"], }, - /** Lookup189: polkadot_primitives::v7::PvfExecKind */ + /** Lookup192: polkadot_primitives::v7::PvfExecKind */ PolkadotPrimitivesV7PvfExecKind: { _enum: ["Backing", "Approval"], }, - /** Lookup190: polkadot_primitives::v7::ApprovalVotingParams */ + /** Lookup193: polkadot_primitives::v7::ApprovalVotingParams */ PolkadotPrimitivesV7ApprovalVotingParams: { maxApprovalCoalesceCount: "u32", }, - /** Lookup191: polkadot_primitives::vstaging::SchedulerParams */ + /** Lookup194: polkadot_primitives::vstaging::SchedulerParams */ PolkadotPrimitivesVstagingSchedulerParams: { groupRotationFrequency: "u32", parasAvailabilityPeriod: "u32", @@ -2049,11 +2073,11 @@ export default { onDemandBaseFee: "u128", ttl: "u32", }, - /** Lookup192: polkadot_runtime_parachains::shared::pallet::Call */ + /** Lookup195: polkadot_runtime_parachains::shared::pallet::Call */ PolkadotRuntimeParachainsSharedPalletCall: "Null", - /** Lookup193: polkadot_runtime_parachains::inclusion::pallet::Call */ + /** Lookup196: polkadot_runtime_parachains::inclusion::pallet::Call */ PolkadotRuntimeParachainsInclusionPalletCall: "Null", - /** Lookup194: polkadot_runtime_parachains::paras_inherent::pallet::Call */ + /** Lookup197: polkadot_runtime_parachains::paras_inherent::pallet::Call */ PolkadotRuntimeParachainsParasInherentPalletCall: { _enum: { enter: { @@ -2061,7 +2085,7 @@ export default { }, }, }, - /** Lookup195: polkadot_primitives::v7::InherentData> */ + /** Lookup198: polkadot_primitives::v7::InherentData> */ PolkadotPrimitivesV7InherentData: { bitfields: "Vec", backedCandidates: "Vec", @@ -2069,7 +2093,7 @@ export default { parentHeader: "SpRuntimeHeader", }, /** - * Lookup197: polkadot_primitives::v7::signed::UncheckedSigned */ PolkadotPrimitivesV7SignedUncheckedSigned: { @@ -2077,22 +2101,22 @@ export default { validatorIndex: "u32", signature: "PolkadotPrimitivesV7ValidatorAppSignature", }, - /** Lookup200: bitvec::order::Lsb0 */ + /** Lookup203: bitvec::order::Lsb0 */ BitvecOrderLsb0: "Null", - /** Lookup202: polkadot_primitives::v7::validator_app::Signature */ + /** Lookup205: polkadot_primitives::v7::validator_app::Signature */ PolkadotPrimitivesV7ValidatorAppSignature: "[u8;64]", - /** Lookup204: polkadot_primitives::v7::BackedCandidate */ + /** Lookup207: polkadot_primitives::v7::BackedCandidate */ PolkadotPrimitivesV7BackedCandidate: { candidate: "PolkadotPrimitivesV7CommittedCandidateReceipt", validityVotes: "Vec", validatorIndices: "BitVec", }, - /** Lookup205: polkadot_primitives::v7::CommittedCandidateReceipt */ + /** Lookup208: polkadot_primitives::v7::CommittedCandidateReceipt */ PolkadotPrimitivesV7CommittedCandidateReceipt: { descriptor: "PolkadotPrimitivesV7CandidateDescriptor", commitments: "PolkadotPrimitivesV7CandidateCommitments", }, - /** Lookup206: polkadot_primitives::v7::CandidateDescriptor */ + /** Lookup209: polkadot_primitives::v7::CandidateDescriptor */ PolkadotPrimitivesV7CandidateDescriptor: { paraId: "u32", relayParent: "H256", @@ -2104,11 +2128,11 @@ export default { paraHead: "H256", validationCodeHash: "H256", }, - /** Lookup207: polkadot_primitives::v7::collator_app::Public */ + /** Lookup210: polkadot_primitives::v7::collator_app::Public */ PolkadotPrimitivesV7CollatorAppPublic: "[u8;32]", - /** Lookup208: polkadot_primitives::v7::collator_app::Signature */ + /** Lookup211: polkadot_primitives::v7::collator_app::Signature */ PolkadotPrimitivesV7CollatorAppSignature: "[u8;64]", - /** Lookup210: polkadot_primitives::v7::CandidateCommitments */ + /** Lookup213: polkadot_primitives::v7::CandidateCommitments */ PolkadotPrimitivesV7CandidateCommitments: { upwardMessages: "Vec", horizontalMessages: "Vec", @@ -2117,12 +2141,12 @@ export default { processedDownwardMessages: "u32", hrmpWatermark: "u32", }, - /** Lookup213: polkadot_core_primitives::OutboundHrmpMessage */ + /** Lookup216: polkadot_core_primitives::OutboundHrmpMessage */ PolkadotCorePrimitivesOutboundHrmpMessage: { recipient: "u32", data: "Bytes", }, - /** Lookup218: polkadot_primitives::v7::ValidityAttestation */ + /** Lookup221: polkadot_primitives::v7::ValidityAttestation */ PolkadotPrimitivesV7ValidityAttestation: { _enum: { __Unused0: "Null", @@ -2130,20 +2154,20 @@ export default { Explicit: "PolkadotPrimitivesV7ValidatorAppSignature", }, }, - /** Lookup220: polkadot_primitives::v7::DisputeStatementSet */ + /** Lookup223: polkadot_primitives::v7::DisputeStatementSet */ PolkadotPrimitivesV7DisputeStatementSet: { candidateHash: "H256", session: "u32", statements: "Vec<(PolkadotPrimitivesV7DisputeStatement,u32,PolkadotPrimitivesV7ValidatorAppSignature)>", }, - /** Lookup224: polkadot_primitives::v7::DisputeStatement */ + /** Lookup227: polkadot_primitives::v7::DisputeStatement */ PolkadotPrimitivesV7DisputeStatement: { _enum: { Valid: "PolkadotPrimitivesV7ValidDisputeStatementKind", Invalid: "PolkadotPrimitivesV7InvalidDisputeStatementKind", }, }, - /** Lookup225: polkadot_primitives::v7::ValidDisputeStatementKind */ + /** Lookup228: polkadot_primitives::v7::ValidDisputeStatementKind */ PolkadotPrimitivesV7ValidDisputeStatementKind: { _enum: { Explicit: "Null", @@ -2153,11 +2177,11 @@ export default { ApprovalCheckingMultipleCandidates: "Vec", }, }, - /** Lookup227: polkadot_primitives::v7::InvalidDisputeStatementKind */ + /** Lookup230: polkadot_primitives::v7::InvalidDisputeStatementKind */ PolkadotPrimitivesV7InvalidDisputeStatementKind: { _enum: ["Explicit"], }, - /** Lookup228: polkadot_runtime_parachains::paras::pallet::Call */ + /** Lookup231: polkadot_runtime_parachains::paras::pallet::Call */ PolkadotRuntimeParachainsParasPalletCall: { _enum: { force_set_current_code: { @@ -2196,14 +2220,14 @@ export default { }, }, }, - /** Lookup229: polkadot_primitives::v7::PvfCheckStatement */ + /** Lookup232: polkadot_primitives::v7::PvfCheckStatement */ PolkadotPrimitivesV7PvfCheckStatement: { accept: "bool", subject: "H256", sessionIndex: "u32", validatorIndex: "u32", }, - /** Lookup230: polkadot_runtime_parachains::initializer::pallet::Call */ + /** Lookup233: polkadot_runtime_parachains::initializer::pallet::Call */ PolkadotRuntimeParachainsInitializerPalletCall: { _enum: { force_approve: { @@ -2211,7 +2235,7 @@ export default { }, }, }, - /** Lookup231: polkadot_runtime_parachains::hrmp::pallet::Call */ + /** Lookup234: polkadot_runtime_parachains::hrmp::pallet::Call */ PolkadotRuntimeParachainsHrmpPalletCall: { _enum: { hrmp_init_open_channel: { @@ -2259,16 +2283,16 @@ export default { }, }, }, - /** Lookup232: polkadot_parachain_primitives::primitives::HrmpChannelId */ + /** Lookup235: polkadot_parachain_primitives::primitives::HrmpChannelId */ PolkadotParachainPrimitivesPrimitivesHrmpChannelId: { sender: "u32", recipient: "u32", }, - /** Lookup233: polkadot_runtime_parachains::disputes::pallet::Call */ + /** Lookup236: polkadot_runtime_parachains::disputes::pallet::Call */ PolkadotRuntimeParachainsDisputesPalletCall: { _enum: ["force_unfreeze"], }, - /** Lookup234: polkadot_runtime_parachains::disputes::slashing::pallet::Call */ + /** Lookup237: polkadot_runtime_parachains::disputes::slashing::pallet::Call */ PolkadotRuntimeParachainsDisputesSlashingPalletCall: { _enum: { report_dispute_lost_unsigned: { @@ -2277,23 +2301,23 @@ export default { }, }, }, - /** Lookup235: polkadot_primitives::v7::slashing::DisputeProof */ + /** Lookup238: polkadot_primitives::v7::slashing::DisputeProof */ PolkadotPrimitivesV7SlashingDisputeProof: { timeSlot: "PolkadotPrimitivesV7SlashingDisputesTimeSlot", kind: "PolkadotPrimitivesV7SlashingSlashingOffenceKind", validatorIndex: "u32", validatorId: "PolkadotPrimitivesV7ValidatorAppPublic", }, - /** Lookup236: polkadot_primitives::v7::slashing::DisputesTimeSlot */ + /** Lookup239: polkadot_primitives::v7::slashing::DisputesTimeSlot */ PolkadotPrimitivesV7SlashingDisputesTimeSlot: { sessionIndex: "u32", candidateHash: "H256", }, - /** Lookup237: polkadot_primitives::v7::slashing::SlashingOffenceKind */ + /** Lookup240: polkadot_primitives::v7::slashing::SlashingOffenceKind */ PolkadotPrimitivesV7SlashingSlashingOffenceKind: { _enum: ["ForInvalid", "AgainstValid"], }, - /** Lookup238: pallet_message_queue::pallet::Call */ + /** Lookup241: pallet_message_queue::pallet::Call */ PalletMessageQueueCall: { _enum: { reap_page: { @@ -2308,19 +2332,19 @@ export default { }, }, }, - /** Lookup239: polkadot_runtime_parachains::inclusion::AggregateMessageOrigin */ + /** Lookup242: polkadot_runtime_parachains::inclusion::AggregateMessageOrigin */ PolkadotRuntimeParachainsInclusionAggregateMessageOrigin: { _enum: { Ump: "PolkadotRuntimeParachainsInclusionUmpQueueId", }, }, - /** Lookup240: polkadot_runtime_parachains::inclusion::UmpQueueId */ + /** Lookup243: polkadot_runtime_parachains::inclusion::UmpQueueId */ PolkadotRuntimeParachainsInclusionUmpQueueId: { _enum: { Para: "u32", }, }, - /** Lookup241: polkadot_runtime_parachains::assigner_on_demand::pallet::Call */ + /** Lookup244: polkadot_runtime_parachains::assigner_on_demand::pallet::Call */ PolkadotRuntimeParachainsAssignerOnDemandPalletCall: { _enum: { place_order_allow_death: { @@ -2333,7 +2357,7 @@ export default { }, }, }, - /** Lookup242: polkadot_runtime_common::paras_registrar::pallet::Call */ + /** Lookup245: polkadot_runtime_common::paras_registrar::pallet::Call */ PolkadotRuntimeCommonParasRegistrarPalletCall: { _enum: { register: { @@ -2372,7 +2396,7 @@ export default { }, }, }, - /** Lookup243: pallet_utility::pallet::Call */ + /** Lookup246: pallet_utility::pallet::Call */ PalletUtilityCall: { _enum: { batch: { @@ -2398,7 +2422,7 @@ export default { }, }, }, - /** Lookup245: pallet_identity::pallet::Call */ + /** Lookup248: pallet_identity::pallet::Call */ PalletIdentityCall: { _enum: { add_registrar: { @@ -2481,7 +2505,7 @@ export default { }, }, }, - /** Lookup246: pallet_identity::legacy::IdentityInfo */ + /** Lookup249: pallet_identity::legacy::IdentityInfo */ PalletIdentityLegacyIdentityInfo: { additional: "Vec<(Data,Data)>", display: "Data", @@ -2493,7 +2517,7 @@ export default { image: "Data", twitter: "Data", }, - /** Lookup283: pallet_identity::types::Judgement */ + /** Lookup286: pallet_identity::types::Judgement */ PalletIdentityJudgement: { _enum: { Unknown: "Null", @@ -2505,7 +2529,7 @@ export default { Erroneous: "Null", }, }, - /** Lookup286: pallet_scheduler::pallet::Call */ + /** Lookup289: pallet_scheduler::pallet::Call */ PalletSchedulerCall: { _enum: { schedule: { @@ -2559,7 +2583,7 @@ export default { }, }, }, - /** Lookup289: pallet_proxy::pallet::Call */ + /** Lookup292: pallet_proxy::pallet::Call */ PalletProxyCall: { _enum: { proxy: { @@ -2610,7 +2634,7 @@ export default { }, }, }, - /** Lookup291: dancelight_runtime::ProxyType */ + /** Lookup294: dancelight_runtime::ProxyType */ DancelightRuntimeProxyType: { _enum: [ "Any", @@ -2623,7 +2647,7 @@ export default { "SudoRegistrar", ], }, - /** Lookup292: pallet_multisig::pallet::Call */ + /** Lookup295: pallet_multisig::pallet::Call */ PalletMultisigCall: { _enum: { as_multi_threshold_1: { @@ -2652,12 +2676,12 @@ export default { }, }, }, - /** Lookup294: pallet_multisig::Timepoint */ + /** Lookup297: pallet_multisig::Timepoint */ PalletMultisigTimepoint: { height: "u32", index: "u32", }, - /** Lookup295: pallet_preimage::pallet::Call */ + /** Lookup298: pallet_preimage::pallet::Call */ PalletPreimageCall: { _enum: { note_preimage: { @@ -2686,7 +2710,7 @@ export default { }, }, }, - /** Lookup297: pallet_asset_rate::pallet::Call */ + /** Lookup300: pallet_asset_rate::pallet::Call */ PalletAssetRateCall: { _enum: { create: { @@ -2702,7 +2726,7 @@ export default { }, }, }, - /** Lookup299: pallet_xcm::pallet::Call */ + /** Lookup302: pallet_xcm::pallet::Call */ PalletXcmCall: { _enum: { send: { @@ -2777,7 +2801,7 @@ export default { }, }, }, - /** Lookup300: xcm::VersionedLocation */ + /** Lookup303: xcm::VersionedLocation */ XcmVersionedLocation: { _enum: { __Unused0: "Null", @@ -2787,12 +2811,12 @@ export default { V4: "StagingXcmV4Location", }, }, - /** Lookup301: xcm::v2::multilocation::MultiLocation */ + /** Lookup304: xcm::v2::multilocation::MultiLocation */ XcmV2MultiLocation: { parents: "u8", interior: "XcmV2MultilocationJunctions", }, - /** Lookup302: xcm::v2::multilocation::Junctions */ + /** Lookup305: xcm::v2::multilocation::Junctions */ XcmV2MultilocationJunctions: { _enum: { Here: "Null", @@ -2806,7 +2830,7 @@ export default { X8: "(XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction,XcmV2Junction)", }, }, - /** Lookup303: xcm::v2::junction::Junction */ + /** Lookup306: xcm::v2::junction::Junction */ XcmV2Junction: { _enum: { Parachain: "Compact", @@ -2832,7 +2856,7 @@ export default { }, }, }, - /** Lookup304: xcm::v2::NetworkId */ + /** Lookup307: xcm::v2::NetworkId */ XcmV2NetworkId: { _enum: { Any: "Null", @@ -2841,7 +2865,7 @@ export default { Kusama: "Null", }, }, - /** Lookup306: xcm::v2::BodyId */ + /** Lookup309: xcm::v2::BodyId */ XcmV2BodyId: { _enum: { Unit: "Null", @@ -2856,7 +2880,7 @@ export default { Treasury: "Null", }, }, - /** Lookup307: xcm::v2::BodyPart */ + /** Lookup310: xcm::v2::BodyPart */ XcmV2BodyPart: { _enum: { Voice: "Null", @@ -2877,12 +2901,12 @@ export default { }, }, }, - /** Lookup308: staging_xcm::v3::multilocation::MultiLocation */ + /** Lookup311: staging_xcm::v3::multilocation::MultiLocation */ StagingXcmV3MultiLocation: { parents: "u8", interior: "XcmV3Junctions", }, - /** Lookup309: xcm::v3::junctions::Junctions */ + /** Lookup312: xcm::v3::junctions::Junctions */ XcmV3Junctions: { _enum: { Here: "Null", @@ -2896,7 +2920,7 @@ export default { X8: "(XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction,XcmV3Junction)", }, }, - /** Lookup310: xcm::v3::junction::Junction */ + /** Lookup313: xcm::v3::junction::Junction */ XcmV3Junction: { _enum: { Parachain: "Compact", @@ -2926,7 +2950,7 @@ export default { GlobalConsensus: "XcmV3JunctionNetworkId", }, }, - /** Lookup312: xcm::v3::junction::NetworkId */ + /** Lookup315: xcm::v3::junction::NetworkId */ XcmV3JunctionNetworkId: { _enum: { ByGenesis: "[u8;32]", @@ -2947,7 +2971,7 @@ export default { PolkadotBulletin: "Null", }, }, - /** Lookup313: xcm::VersionedXcm */ + /** Lookup316: xcm::VersionedXcm */ XcmVersionedXcm: { _enum: { __Unused0: "Null", @@ -2957,9 +2981,9 @@ export default { V4: "StagingXcmV4Xcm", }, }, - /** Lookup314: xcm::v2::Xcm */ + /** Lookup317: xcm::v2::Xcm */ XcmV2Xcm: "Vec", - /** Lookup316: xcm::v2::Instruction */ + /** Lookup319: xcm::v2::Instruction */ XcmV2Instruction: { _enum: { WithdrawAsset: "XcmV2MultiassetMultiAssets", @@ -3055,28 +3079,28 @@ export default { UnsubscribeVersion: "Null", }, }, - /** Lookup317: xcm::v2::multiasset::MultiAssets */ + /** Lookup320: xcm::v2::multiasset::MultiAssets */ XcmV2MultiassetMultiAssets: "Vec", - /** Lookup319: xcm::v2::multiasset::MultiAsset */ + /** Lookup322: xcm::v2::multiasset::MultiAsset */ XcmV2MultiAsset: { id: "XcmV2MultiassetAssetId", fun: "XcmV2MultiassetFungibility", }, - /** Lookup320: xcm::v2::multiasset::AssetId */ + /** Lookup323: xcm::v2::multiasset::AssetId */ XcmV2MultiassetAssetId: { _enum: { Concrete: "XcmV2MultiLocation", Abstract: "Bytes", }, }, - /** Lookup321: xcm::v2::multiasset::Fungibility */ + /** Lookup324: xcm::v2::multiasset::Fungibility */ XcmV2MultiassetFungibility: { _enum: { Fungible: "Compact", NonFungible: "XcmV2MultiassetAssetInstance", }, }, - /** Lookup322: xcm::v2::multiasset::AssetInstance */ + /** Lookup325: xcm::v2::multiasset::AssetInstance */ XcmV2MultiassetAssetInstance: { _enum: { Undefined: "Null", @@ -3088,7 +3112,7 @@ export default { Blob: "Bytes", }, }, - /** Lookup323: xcm::v2::Response */ + /** Lookup326: xcm::v2::Response */ XcmV2Response: { _enum: { Null: "Null", @@ -3097,7 +3121,7 @@ export default { Version: "u32", }, }, - /** Lookup326: xcm::v2::traits::Error */ + /** Lookup329: xcm::v2::traits::Error */ XcmV2TraitsError: { _enum: { Overflow: "Null", @@ -3128,22 +3152,22 @@ export default { WeightNotComputable: "Null", }, }, - /** Lookup327: xcm::v2::OriginKind */ + /** Lookup330: xcm::v2::OriginKind */ XcmV2OriginKind: { _enum: ["Native", "SovereignAccount", "Superuser", "Xcm"], }, - /** Lookup328: xcm::double_encoded::DoubleEncoded */ + /** Lookup331: xcm::double_encoded::DoubleEncoded */ XcmDoubleEncoded: { encoded: "Bytes", }, - /** Lookup329: xcm::v2::multiasset::MultiAssetFilter */ + /** Lookup332: xcm::v2::multiasset::MultiAssetFilter */ XcmV2MultiassetMultiAssetFilter: { _enum: { Definite: "XcmV2MultiassetMultiAssets", Wild: "XcmV2MultiassetWildMultiAsset", }, }, - /** Lookup330: xcm::v2::multiasset::WildMultiAsset */ + /** Lookup333: xcm::v2::multiasset::WildMultiAsset */ XcmV2MultiassetWildMultiAsset: { _enum: { All: "Null", @@ -3153,20 +3177,20 @@ export default { }, }, }, - /** Lookup331: xcm::v2::multiasset::WildFungibility */ + /** Lookup334: xcm::v2::multiasset::WildFungibility */ XcmV2MultiassetWildFungibility: { _enum: ["Fungible", "NonFungible"], }, - /** Lookup332: xcm::v2::WeightLimit */ + /** Lookup335: xcm::v2::WeightLimit */ XcmV2WeightLimit: { _enum: { Unlimited: "Null", Limited: "Compact", }, }, - /** Lookup333: xcm::v3::Xcm */ + /** Lookup336: xcm::v3::Xcm */ XcmV3Xcm: "Vec", - /** Lookup335: xcm::v3::Instruction */ + /** Lookup338: xcm::v3::Instruction */ XcmV3Instruction: { _enum: { WithdrawAsset: "XcmV3MultiassetMultiAssets", @@ -3306,28 +3330,28 @@ export default { }, }, }, - /** Lookup336: xcm::v3::multiasset::MultiAssets */ + /** Lookup339: xcm::v3::multiasset::MultiAssets */ XcmV3MultiassetMultiAssets: "Vec", - /** Lookup338: xcm::v3::multiasset::MultiAsset */ + /** Lookup341: xcm::v3::multiasset::MultiAsset */ XcmV3MultiAsset: { id: "XcmV3MultiassetAssetId", fun: "XcmV3MultiassetFungibility", }, - /** Lookup339: xcm::v3::multiasset::AssetId */ + /** Lookup342: xcm::v3::multiasset::AssetId */ XcmV3MultiassetAssetId: { _enum: { Concrete: "StagingXcmV3MultiLocation", Abstract: "[u8;32]", }, }, - /** Lookup340: xcm::v3::multiasset::Fungibility */ + /** Lookup343: xcm::v3::multiasset::Fungibility */ XcmV3MultiassetFungibility: { _enum: { Fungible: "Compact", NonFungible: "XcmV3MultiassetAssetInstance", }, }, - /** Lookup341: xcm::v3::multiasset::AssetInstance */ + /** Lookup344: xcm::v3::multiasset::AssetInstance */ XcmV3MultiassetAssetInstance: { _enum: { Undefined: "Null", @@ -3338,7 +3362,7 @@ export default { Array32: "[u8;32]", }, }, - /** Lookup342: xcm::v3::Response */ + /** Lookup345: xcm::v3::Response */ XcmV3Response: { _enum: { Null: "Null", @@ -3349,7 +3373,7 @@ export default { DispatchResult: "XcmV3MaybeErrorCode", }, }, - /** Lookup345: xcm::v3::traits::Error */ + /** Lookup348: xcm::v3::traits::Error */ XcmV3TraitsError: { _enum: { Overflow: "Null", @@ -3394,7 +3418,7 @@ export default { ExceedsStackLimit: "Null", }, }, - /** Lookup347: xcm::v3::PalletInfo */ + /** Lookup350: xcm::v3::PalletInfo */ XcmV3PalletInfo: { index: "Compact", name: "Bytes", @@ -3403,7 +3427,7 @@ export default { minor: "Compact", patch: "Compact", }, - /** Lookup350: xcm::v3::MaybeErrorCode */ + /** Lookup353: xcm::v3::MaybeErrorCode */ XcmV3MaybeErrorCode: { _enum: { Success: "Null", @@ -3411,24 +3435,24 @@ export default { TruncatedError: "Bytes", }, }, - /** Lookup353: xcm::v3::OriginKind */ + /** Lookup356: xcm::v3::OriginKind */ XcmV3OriginKind: { _enum: ["Native", "SovereignAccount", "Superuser", "Xcm"], }, - /** Lookup354: xcm::v3::QueryResponseInfo */ + /** Lookup357: xcm::v3::QueryResponseInfo */ XcmV3QueryResponseInfo: { destination: "StagingXcmV3MultiLocation", queryId: "Compact", maxWeight: "SpWeightsWeightV2Weight", }, - /** Lookup355: xcm::v3::multiasset::MultiAssetFilter */ + /** Lookup358: xcm::v3::multiasset::MultiAssetFilter */ XcmV3MultiassetMultiAssetFilter: { _enum: { Definite: "XcmV3MultiassetMultiAssets", Wild: "XcmV3MultiassetWildMultiAsset", }, }, - /** Lookup356: xcm::v3::multiasset::WildMultiAsset */ + /** Lookup359: xcm::v3::multiasset::WildMultiAsset */ XcmV3MultiassetWildMultiAsset: { _enum: { All: "Null", @@ -3444,20 +3468,20 @@ export default { }, }, }, - /** Lookup357: xcm::v3::multiasset::WildFungibility */ + /** Lookup360: xcm::v3::multiasset::WildFungibility */ XcmV3MultiassetWildFungibility: { _enum: ["Fungible", "NonFungible"], }, - /** Lookup358: xcm::v3::WeightLimit */ + /** Lookup361: xcm::v3::WeightLimit */ XcmV3WeightLimit: { _enum: { Unlimited: "Null", Limited: "SpWeightsWeightV2Weight", }, }, - /** Lookup359: staging_xcm::v4::Xcm */ + /** Lookup362: staging_xcm::v4::Xcm */ StagingXcmV4Xcm: "Vec", - /** Lookup361: staging_xcm::v4::Instruction */ + /** Lookup364: staging_xcm::v4::Instruction */ StagingXcmV4Instruction: { _enum: { WithdrawAsset: "StagingXcmV4AssetAssets", @@ -3597,23 +3621,23 @@ export default { }, }, }, - /** Lookup362: staging_xcm::v4::asset::Assets */ + /** Lookup365: staging_xcm::v4::asset::Assets */ StagingXcmV4AssetAssets: "Vec", - /** Lookup364: staging_xcm::v4::asset::Asset */ + /** Lookup367: staging_xcm::v4::asset::Asset */ StagingXcmV4Asset: { id: "StagingXcmV4AssetAssetId", fun: "StagingXcmV4AssetFungibility", }, - /** Lookup365: staging_xcm::v4::asset::AssetId */ + /** Lookup368: staging_xcm::v4::asset::AssetId */ StagingXcmV4AssetAssetId: "StagingXcmV4Location", - /** Lookup366: staging_xcm::v4::asset::Fungibility */ + /** Lookup369: staging_xcm::v4::asset::Fungibility */ StagingXcmV4AssetFungibility: { _enum: { Fungible: "Compact", NonFungible: "StagingXcmV4AssetAssetInstance", }, }, - /** Lookup367: staging_xcm::v4::asset::AssetInstance */ + /** Lookup370: staging_xcm::v4::asset::AssetInstance */ StagingXcmV4AssetAssetInstance: { _enum: { Undefined: "Null", @@ -3624,7 +3648,7 @@ export default { Array32: "[u8;32]", }, }, - /** Lookup368: staging_xcm::v4::Response */ + /** Lookup371: staging_xcm::v4::Response */ StagingXcmV4Response: { _enum: { Null: "Null", @@ -3635,7 +3659,7 @@ export default { DispatchResult: "XcmV3MaybeErrorCode", }, }, - /** Lookup370: staging_xcm::v4::PalletInfo */ + /** Lookup373: staging_xcm::v4::PalletInfo */ StagingXcmV4PalletInfo: { index: "Compact", name: "Bytes", @@ -3644,20 +3668,20 @@ export default { minor: "Compact", patch: "Compact", }, - /** Lookup374: staging_xcm::v4::QueryResponseInfo */ + /** Lookup377: staging_xcm::v4::QueryResponseInfo */ StagingXcmV4QueryResponseInfo: { destination: "StagingXcmV4Location", queryId: "Compact", maxWeight: "SpWeightsWeightV2Weight", }, - /** Lookup375: staging_xcm::v4::asset::AssetFilter */ + /** Lookup378: staging_xcm::v4::asset::AssetFilter */ StagingXcmV4AssetAssetFilter: { _enum: { Definite: "StagingXcmV4AssetAssets", Wild: "StagingXcmV4AssetWildAsset", }, }, - /** Lookup376: staging_xcm::v4::asset::WildAsset */ + /** Lookup379: staging_xcm::v4::asset::WildAsset */ StagingXcmV4AssetWildAsset: { _enum: { All: "Null", @@ -3673,11 +3697,11 @@ export default { }, }, }, - /** Lookup377: staging_xcm::v4::asset::WildFungibility */ + /** Lookup380: staging_xcm::v4::asset::WildFungibility */ StagingXcmV4AssetWildFungibility: { _enum: ["Fungible", "NonFungible"], }, - /** Lookup378: xcm::VersionedAssets */ + /** Lookup381: xcm::VersionedAssets */ XcmVersionedAssets: { _enum: { __Unused0: "Null", @@ -3687,7 +3711,7 @@ export default { V4: "StagingXcmV4AssetAssets", }, }, - /** Lookup390: staging_xcm_executor::traits::asset_transfer::TransferType */ + /** Lookup393: staging_xcm_executor::traits::asset_transfer::TransferType */ StagingXcmExecutorAssetTransferTransferType: { _enum: { Teleport: "Null", @@ -3696,7 +3720,7 @@ export default { RemoteReserve: "XcmVersionedLocation", }, }, - /** Lookup391: xcm::VersionedAssetId */ + /** Lookup394: xcm::VersionedAssetId */ XcmVersionedAssetId: { _enum: { __Unused0: "Null", @@ -3706,7 +3730,7 @@ export default { V4: "StagingXcmV4AssetAssetId", }, }, - /** Lookup392: pallet_migrations::pallet::Call */ + /** Lookup395: pallet_migrations::pallet::Call */ PalletMigrationsCall: { _enum: { force_set_cursor: { @@ -3723,20 +3747,20 @@ export default { }, }, }, - /** Lookup394: pallet_migrations::MigrationCursor, BlockNumber> */ + /** Lookup397: pallet_migrations::MigrationCursor, BlockNumber> */ PalletMigrationsMigrationCursor: { _enum: { Active: "PalletMigrationsActiveCursor", Stuck: "Null", }, }, - /** Lookup396: pallet_migrations::ActiveCursor, BlockNumber> */ + /** Lookup399: pallet_migrations::ActiveCursor, BlockNumber> */ PalletMigrationsActiveCursor: { index: "u32", innerCursor: "Option", startedAt: "u32", }, - /** Lookup398: pallet_migrations::HistoricCleanupSelector> */ + /** Lookup401: pallet_migrations::HistoricCleanupSelector> */ PalletMigrationsHistoricCleanupSelector: { _enum: { Specific: "Vec", @@ -3746,7 +3770,7 @@ export default { }, }, }, - /** Lookup401: pallet_beefy::pallet::Call */ + /** Lookup404: pallet_beefy::pallet::Call */ PalletBeefyCall: { _enum: { report_double_voting: { @@ -3779,17 +3803,17 @@ export default { }, }, /** - * Lookup402: sp_consensus_beefy::DoubleVotingProof */ SpConsensusBeefyDoubleVotingProof: { first: "SpConsensusBeefyVoteMessage", second: "SpConsensusBeefyVoteMessage", }, - /** Lookup403: sp_consensus_beefy::ecdsa_crypto::Signature */ + /** Lookup406: sp_consensus_beefy::ecdsa_crypto::Signature */ SpConsensusBeefyEcdsaCryptoSignature: "[u8;65]", /** - * Lookup404: sp_consensus_beefy::VoteMessage */ SpConsensusBeefyVoteMessage: { @@ -3797,16 +3821,16 @@ export default { id: "SpConsensusBeefyEcdsaCryptoPublic", signature: "SpConsensusBeefyEcdsaCryptoSignature", }, - /** Lookup405: sp_consensus_beefy::commitment::Commitment */ + /** Lookup408: sp_consensus_beefy::commitment::Commitment */ SpConsensusBeefyCommitment: { payload: "SpConsensusBeefyPayload", blockNumber: "u32", validatorSetId: "u64", }, - /** Lookup406: sp_consensus_beefy::payload::Payload */ + /** Lookup409: sp_consensus_beefy::payload::Payload */ SpConsensusBeefyPayload: "Vec<([u8;2],Bytes)>", /** - * Lookup409: sp_consensus_beefy::ForkVotingProof, + * Lookup412: sp_consensus_beefy::ForkVotingProof, * sp_consensus_beefy::ecdsa_crypto::Public, sp_mmr_primitives::AncestryProof> */ SpConsensusBeefyForkVotingProof: { @@ -3814,18 +3838,18 @@ export default { ancestryProof: "SpMmrPrimitivesAncestryProof", header: "SpRuntimeHeader", }, - /** Lookup410: sp_mmr_primitives::AncestryProof */ + /** Lookup413: sp_mmr_primitives::AncestryProof */ SpMmrPrimitivesAncestryProof: { prevPeaks: "Vec", prevLeafCount: "u64", leafCount: "u64", items: "Vec<(u64,H256)>", }, - /** Lookup413: sp_consensus_beefy::FutureBlockVotingProof */ + /** Lookup416: sp_consensus_beefy::FutureBlockVotingProof */ SpConsensusBeefyFutureBlockVotingProof: { vote: "SpConsensusBeefyVoteMessage", }, - /** Lookup414: snowbridge_pallet_ethereum_client::pallet::Call */ + /** Lookup417: snowbridge_pallet_ethereum_client::pallet::Call */ SnowbridgePalletEthereumClientCall: { _enum: { force_checkpoint: { @@ -3840,7 +3864,7 @@ export default { }, }, }, - /** Lookup415: snowbridge_beacon_primitives::updates::CheckpointUpdate */ + /** Lookup418: snowbridge_beacon_primitives::updates::CheckpointUpdate */ SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate: { header: "SnowbridgeBeaconPrimitivesBeaconHeader", currentSyncCommittee: "SnowbridgeBeaconPrimitivesSyncCommittee", @@ -3849,7 +3873,7 @@ export default { blockRootsRoot: "H256", blockRootsBranch: "Vec", }, - /** Lookup416: snowbridge_beacon_primitives::types::BeaconHeader */ + /** Lookup419: snowbridge_beacon_primitives::types::BeaconHeader */ SnowbridgeBeaconPrimitivesBeaconHeader: { slot: "u64", proposerIndex: "u64", @@ -3857,14 +3881,14 @@ export default { stateRoot: "H256", bodyRoot: "H256", }, - /** Lookup417: snowbridge_beacon_primitives::types::SyncCommittee */ + /** Lookup420: snowbridge_beacon_primitives::types::SyncCommittee */ SnowbridgeBeaconPrimitivesSyncCommittee: { pubkeys: "[[u8;48];512]", aggregatePubkey: "SnowbridgeBeaconPrimitivesPublicKey", }, - /** Lookup419: snowbridge_beacon_primitives::types::PublicKey */ + /** Lookup422: snowbridge_beacon_primitives::types::PublicKey */ SnowbridgeBeaconPrimitivesPublicKey: "[u8;48]", - /** Lookup421: snowbridge_beacon_primitives::updates::Update */ + /** Lookup424: snowbridge_beacon_primitives::updates::Update */ SnowbridgeBeaconPrimitivesUpdatesUpdate: { attestedHeader: "SnowbridgeBeaconPrimitivesBeaconHeader", syncAggregate: "SnowbridgeBeaconPrimitivesSyncAggregate", @@ -3875,23 +3899,23 @@ export default { blockRootsRoot: "H256", blockRootsBranch: "Vec", }, - /** Lookup422: snowbridge_beacon_primitives::types::SyncAggregate */ + /** Lookup425: snowbridge_beacon_primitives::types::SyncAggregate */ SnowbridgeBeaconPrimitivesSyncAggregate: { syncCommitteeBits: "[u8;64]", syncCommitteeSignature: "SnowbridgeBeaconPrimitivesSignature", }, - /** Lookup423: snowbridge_beacon_primitives::types::Signature */ + /** Lookup426: snowbridge_beacon_primitives::types::Signature */ SnowbridgeBeaconPrimitivesSignature: "[u8;96]", - /** Lookup426: snowbridge_beacon_primitives::updates::NextSyncCommitteeUpdate */ + /** Lookup429: snowbridge_beacon_primitives::updates::NextSyncCommitteeUpdate */ SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate: { nextSyncCommittee: "SnowbridgeBeaconPrimitivesSyncCommittee", nextSyncCommitteeBranch: "Vec", }, - /** Lookup427: snowbridge_core::operating_mode::BasicOperatingMode */ + /** Lookup430: snowbridge_core::operating_mode::BasicOperatingMode */ SnowbridgeCoreOperatingModeBasicOperatingMode: { _enum: ["Normal", "Halted"], }, - /** Lookup428: polkadot_runtime_common::paras_sudo_wrapper::pallet::Call */ + /** Lookup431: polkadot_runtime_common::paras_sudo_wrapper::pallet::Call */ PolkadotRuntimeCommonParasSudoWrapperPalletCall: { _enum: { sudo_schedule_para_initialize: { @@ -3919,13 +3943,13 @@ export default { }, }, }, - /** Lookup429: polkadot_runtime_parachains::paras::ParaGenesisArgs */ + /** Lookup432: polkadot_runtime_parachains::paras::ParaGenesisArgs */ PolkadotRuntimeParachainsParasParaGenesisArgs: { genesisHead: "Bytes", validationCode: "Bytes", paraKind: "bool", }, - /** Lookup430: pallet_root_testing::pallet::Call */ + /** Lookup433: pallet_root_testing::pallet::Call */ PalletRootTestingCall: { _enum: { fill_block: { @@ -3934,7 +3958,7 @@ export default { trigger_defensive: "Null", }, }, - /** Lookup431: pallet_sudo::pallet::Call */ + /** Lookup434: pallet_sudo::pallet::Call */ PalletSudoCall: { _enum: { sudo: { @@ -3957,15 +3981,15 @@ export default { remove_key: "Null", }, }, - /** Lookup432: sp_runtime::traits::BlakeTwo256 */ + /** Lookup435: sp_runtime::traits::BlakeTwo256 */ SpRuntimeBlakeTwo256: "Null", - /** Lookup434: pallet_conviction_voting::types::Tally */ + /** Lookup437: pallet_conviction_voting::types::Tally */ PalletConvictionVotingTally: { ayes: "u128", nays: "u128", support: "u128", }, - /** Lookup435: pallet_ranked_collective::pallet::Event */ + /** Lookup438: pallet_ranked_collective::pallet::Event */ PalletRankedCollectiveEvent: { _enum: { MemberAdded: { @@ -3991,20 +4015,20 @@ export default { }, }, }, - /** Lookup436: pallet_ranked_collective::VoteRecord */ + /** Lookup439: pallet_ranked_collective::VoteRecord */ PalletRankedCollectiveVoteRecord: { _enum: { Aye: "u32", Nay: "u32", }, }, - /** Lookup437: pallet_ranked_collective::Tally */ + /** Lookup440: pallet_ranked_collective::Tally */ PalletRankedCollectiveTally: { bareAyes: "u32", ayes: "u32", nays: "u32", }, - /** Lookup439: pallet_whitelist::pallet::Event */ + /** Lookup442: pallet_whitelist::pallet::Event */ PalletWhitelistEvent: { _enum: { CallWhitelisted: { @@ -4019,17 +4043,17 @@ export default { }, }, }, - /** Lookup441: frame_support::dispatch::PostDispatchInfo */ + /** Lookup444: frame_support::dispatch::PostDispatchInfo */ FrameSupportDispatchPostDispatchInfo: { actualWeight: "Option", paysFee: "FrameSupportDispatchPays", }, - /** Lookup443: sp_runtime::DispatchErrorWithPostInfo */ + /** Lookup446: sp_runtime::DispatchErrorWithPostInfo */ SpRuntimeDispatchErrorWithPostInfo: { postInfo: "FrameSupportDispatchPostDispatchInfo", error: "SpRuntimeDispatchError", }, - /** Lookup444: polkadot_runtime_parachains::inclusion::pallet::Event */ + /** Lookup447: polkadot_runtime_parachains::inclusion::pallet::Event */ PolkadotRuntimeParachainsInclusionPalletEvent: { _enum: { CandidateBacked: "(PolkadotPrimitivesV7CandidateReceipt,Bytes,u32,u32)", @@ -4041,12 +4065,12 @@ export default { }, }, }, - /** Lookup445: polkadot_primitives::v7::CandidateReceipt */ + /** Lookup448: polkadot_primitives::v7::CandidateReceipt */ PolkadotPrimitivesV7CandidateReceipt: { descriptor: "PolkadotPrimitivesV7CandidateDescriptor", commitmentsHash: "H256", }, - /** Lookup448: polkadot_runtime_parachains::paras::pallet::Event */ + /** Lookup451: polkadot_runtime_parachains::paras::pallet::Event */ PolkadotRuntimeParachainsParasPalletEvent: { _enum: { CurrentCodeUpdated: "u32", @@ -4059,7 +4083,7 @@ export default { PvfCheckRejected: "(H256,u32)", }, }, - /** Lookup449: polkadot_runtime_parachains::hrmp::pallet::Event */ + /** Lookup452: polkadot_runtime_parachains::hrmp::pallet::Event */ PolkadotRuntimeParachainsHrmpPalletEvent: { _enum: { OpenChannelRequested: { @@ -4098,7 +4122,7 @@ export default { }, }, }, - /** Lookup450: polkadot_runtime_parachains::disputes::pallet::Event */ + /** Lookup453: polkadot_runtime_parachains::disputes::pallet::Event */ PolkadotRuntimeParachainsDisputesPalletEvent: { _enum: { DisputeInitiated: "(H256,PolkadotRuntimeParachainsDisputesDisputeLocation)", @@ -4106,15 +4130,15 @@ export default { Revert: "u32", }, }, - /** Lookup451: polkadot_runtime_parachains::disputes::DisputeLocation */ + /** Lookup454: polkadot_runtime_parachains::disputes::DisputeLocation */ PolkadotRuntimeParachainsDisputesDisputeLocation: { _enum: ["Local", "Remote"], }, - /** Lookup452: polkadot_runtime_parachains::disputes::DisputeResult */ + /** Lookup455: polkadot_runtime_parachains::disputes::DisputeResult */ PolkadotRuntimeParachainsDisputesDisputeResult: { _enum: ["Valid", "Invalid"], }, - /** Lookup453: pallet_message_queue::pallet::Event */ + /** Lookup456: pallet_message_queue::pallet::Event */ PalletMessageQueueEvent: { _enum: { ProcessingFailed: { @@ -4140,7 +4164,7 @@ export default { }, }, }, - /** Lookup454: frame_support::traits::messages::ProcessMessageError */ + /** Lookup457: frame_support::traits::messages::ProcessMessageError */ FrameSupportMessagesProcessMessageError: { _enum: { BadFormat: "Null", @@ -4151,7 +4175,7 @@ export default { StackLimitReached: "Null", }, }, - /** Lookup455: polkadot_runtime_parachains::assigner_on_demand::pallet::Event */ + /** Lookup458: polkadot_runtime_parachains::assigner_on_demand::pallet::Event */ PolkadotRuntimeParachainsAssignerOnDemandPalletEvent: { _enum: { OnDemandOrderPlaced: { @@ -4164,7 +4188,7 @@ export default { }, }, }, - /** Lookup456: polkadot_runtime_common::paras_registrar::pallet::Event */ + /** Lookup459: polkadot_runtime_common::paras_registrar::pallet::Event */ PolkadotRuntimeCommonParasRegistrarPalletEvent: { _enum: { Registered: { @@ -4184,7 +4208,7 @@ export default { }, }, }, - /** Lookup457: pallet_utility::pallet::Event */ + /** Lookup460: pallet_utility::pallet::Event */ PalletUtilityEvent: { _enum: { BatchInterrupted: { @@ -4202,7 +4226,7 @@ export default { }, }, }, - /** Lookup459: pallet_identity::pallet::Event */ + /** Lookup462: pallet_identity::pallet::Event */ PalletIdentityEvent: { _enum: { IdentitySet: { @@ -4274,7 +4298,7 @@ export default { }, }, }, - /** Lookup460: pallet_scheduler::pallet::Event */ + /** Lookup463: pallet_scheduler::pallet::Event */ PalletSchedulerEvent: { _enum: { Scheduled: { @@ -4318,7 +4342,7 @@ export default { }, }, }, - /** Lookup462: pallet_proxy::pallet::Event */ + /** Lookup465: pallet_proxy::pallet::Event */ PalletProxyEvent: { _enum: { ProxyExecuted: { @@ -4349,7 +4373,7 @@ export default { }, }, }, - /** Lookup463: pallet_multisig::pallet::Event */ + /** Lookup466: pallet_multisig::pallet::Event */ PalletMultisigEvent: { _enum: { NewMultisig: { @@ -4378,7 +4402,7 @@ export default { }, }, }, - /** Lookup464: pallet_preimage::pallet::Event */ + /** Lookup467: pallet_preimage::pallet::Event */ PalletPreimageEvent: { _enum: { Noted: { @@ -4401,7 +4425,7 @@ export default { }, }, }, - /** Lookup465: pallet_asset_rate::pallet::Event */ + /** Lookup468: pallet_asset_rate::pallet::Event */ PalletAssetRateEvent: { _enum: { AssetRateCreated: { @@ -4421,7 +4445,7 @@ export default { }, }, }, - /** Lookup466: pallet_xcm::pallet::Event */ + /** Lookup469: pallet_xcm::pallet::Event */ PalletXcmEvent: { _enum: { Attempted: { @@ -4544,7 +4568,7 @@ export default { }, }, }, - /** Lookup467: staging_xcm::v4::traits::Outcome */ + /** Lookup470: staging_xcm::v4::traits::Outcome */ StagingXcmV4TraitsOutcome: { _enum: { Complete: { @@ -4559,7 +4583,7 @@ export default { }, }, }, - /** Lookup468: pallet_migrations::pallet::Event */ + /** Lookup471: pallet_migrations::pallet::Event */ PalletMigrationsEvent: { _enum: { RuntimeUpgradeStarted: "Null", @@ -4581,7 +4605,7 @@ export default { }, }, }, - /** Lookup470: snowbridge_pallet_ethereum_client::pallet::Event */ + /** Lookup473: snowbridge_pallet_ethereum_client::pallet::Event */ SnowbridgePalletEthereumClientEvent: { _enum: { BeaconHeaderImported: { @@ -4596,11 +4620,11 @@ export default { }, }, }, - /** Lookup471: pallet_root_testing::pallet::Event */ + /** Lookup474: pallet_root_testing::pallet::Event */ PalletRootTestingEvent: { _enum: ["DefensiveTestCall"], }, - /** Lookup472: pallet_sudo::pallet::Event */ + /** Lookup475: pallet_sudo::pallet::Event */ PalletSudoEvent: { _enum: { Sudid: { @@ -4619,7 +4643,7 @@ export default { }, }, }, - /** Lookup473: frame_system::Phase */ + /** Lookup476: frame_system::Phase */ FrameSystemPhase: { _enum: { ApplyExtrinsic: "u32", @@ -4627,51 +4651,51 @@ export default { Initialization: "Null", }, }, - /** Lookup475: frame_system::LastRuntimeUpgradeInfo */ + /** Lookup478: frame_system::LastRuntimeUpgradeInfo */ FrameSystemLastRuntimeUpgradeInfo: { specVersion: "Compact", specName: "Text", }, - /** Lookup477: frame_system::CodeUpgradeAuthorization */ + /** Lookup480: frame_system::CodeUpgradeAuthorization */ FrameSystemCodeUpgradeAuthorization: { codeHash: "H256", checkVersion: "bool", }, - /** Lookup478: frame_system::limits::BlockWeights */ + /** Lookup481: frame_system::limits::BlockWeights */ FrameSystemLimitsBlockWeights: { baseBlock: "SpWeightsWeightV2Weight", maxBlock: "SpWeightsWeightV2Weight", perClass: "FrameSupportDispatchPerDispatchClassWeightsPerClass", }, - /** Lookup479: frame_support::dispatch::PerDispatchClass */ + /** Lookup482: frame_support::dispatch::PerDispatchClass */ FrameSupportDispatchPerDispatchClassWeightsPerClass: { normal: "FrameSystemLimitsWeightsPerClass", operational: "FrameSystemLimitsWeightsPerClass", mandatory: "FrameSystemLimitsWeightsPerClass", }, - /** Lookup480: frame_system::limits::WeightsPerClass */ + /** Lookup483: frame_system::limits::WeightsPerClass */ FrameSystemLimitsWeightsPerClass: { baseExtrinsic: "SpWeightsWeightV2Weight", maxExtrinsic: "Option", maxTotal: "Option", reserved: "Option", }, - /** Lookup481: frame_system::limits::BlockLength */ + /** Lookup484: frame_system::limits::BlockLength */ FrameSystemLimitsBlockLength: { max: "FrameSupportDispatchPerDispatchClassU32", }, - /** Lookup482: frame_support::dispatch::PerDispatchClass */ + /** Lookup485: frame_support::dispatch::PerDispatchClass */ FrameSupportDispatchPerDispatchClassU32: { normal: "u32", operational: "u32", mandatory: "u32", }, - /** Lookup483: sp_weights::RuntimeDbWeight */ + /** Lookup486: sp_weights::RuntimeDbWeight */ SpWeightsRuntimeDbWeight: { read: "u64", write: "u64", }, - /** Lookup484: sp_version::RuntimeVersion */ + /** Lookup487: sp_version::RuntimeVersion */ SpVersionRuntimeVersion: { specName: "Text", implName: "Text", @@ -4682,7 +4706,7 @@ export default { transactionVersion: "u32", stateVersion: "u8", }, - /** Lookup488: frame_system::pallet::Error */ + /** Lookup491: frame_system::pallet::Error */ FrameSystemError: { _enum: [ "InvalidSpecName", @@ -4696,7 +4720,7 @@ export default { "Unauthorized", ], }, - /** Lookup495: sp_consensus_babe::digests::PreDigest */ + /** Lookup498: sp_consensus_babe::digests::PreDigest */ SpConsensusBabeDigestsPreDigest: { _enum: { __Unused0: "Null", @@ -4705,34 +4729,34 @@ export default { SecondaryVRF: "SpConsensusBabeDigestsSecondaryVRFPreDigest", }, }, - /** Lookup496: sp_consensus_babe::digests::PrimaryPreDigest */ + /** Lookup499: sp_consensus_babe::digests::PrimaryPreDigest */ SpConsensusBabeDigestsPrimaryPreDigest: { authorityIndex: "u32", slot: "u64", vrfSignature: "SpCoreSr25519VrfVrfSignature", }, - /** Lookup497: sp_core::sr25519::vrf::VrfSignature */ + /** Lookup500: sp_core::sr25519::vrf::VrfSignature */ SpCoreSr25519VrfVrfSignature: { preOutput: "[u8;32]", proof: "[u8;64]", }, - /** Lookup498: sp_consensus_babe::digests::SecondaryPlainPreDigest */ + /** Lookup501: sp_consensus_babe::digests::SecondaryPlainPreDigest */ SpConsensusBabeDigestsSecondaryPlainPreDigest: { authorityIndex: "u32", slot: "u64", }, - /** Lookup499: sp_consensus_babe::digests::SecondaryVRFPreDigest */ + /** Lookup502: sp_consensus_babe::digests::SecondaryVRFPreDigest */ SpConsensusBabeDigestsSecondaryVRFPreDigest: { authorityIndex: "u32", slot: "u64", vrfSignature: "SpCoreSr25519VrfVrfSignature", }, - /** Lookup500: sp_consensus_babe::BabeEpochConfiguration */ + /** Lookup503: sp_consensus_babe::BabeEpochConfiguration */ SpConsensusBabeBabeEpochConfiguration: { c: "(u64,u64)", allowedSlots: "SpConsensusBabeAllowedSlots", }, - /** Lookup504: pallet_babe::pallet::Error */ + /** Lookup507: pallet_babe::pallet::Error */ PalletBabeError: { _enum: [ "InvalidEquivocationProof", @@ -4741,22 +4765,22 @@ export default { "InvalidConfiguration", ], }, - /** Lookup506: pallet_balances::types::BalanceLock */ + /** Lookup509: pallet_balances::types::BalanceLock */ PalletBalancesBalanceLock: { id: "[u8;8]", amount: "u128", reasons: "PalletBalancesReasons", }, - /** Lookup507: pallet_balances::types::Reasons */ + /** Lookup510: pallet_balances::types::Reasons */ PalletBalancesReasons: { _enum: ["Fee", "Misc", "All"], }, - /** Lookup510: pallet_balances::types::ReserveData */ + /** Lookup513: pallet_balances::types::ReserveData */ PalletBalancesReserveData: { id: "[u8;8]", amount: "u128", }, - /** Lookup514: dancelight_runtime::RuntimeHoldReason */ + /** Lookup517: dancelight_runtime::RuntimeHoldReason */ DancelightRuntimeRuntimeHoldReason: { _enum: { __Unused0: "Null", @@ -4847,24 +4871,24 @@ export default { Preimage: "PalletPreimageHoldReason", }, }, - /** Lookup515: pallet_registrar::pallet::HoldReason */ + /** Lookup518: pallet_registrar::pallet::HoldReason */ PalletRegistrarHoldReason: { _enum: ["RegistrarDeposit"], }, - /** Lookup516: pallet_data_preservers::pallet::HoldReason */ + /** Lookup519: pallet_data_preservers::pallet::HoldReason */ PalletDataPreserversHoldReason: { _enum: ["ProfileDeposit"], }, - /** Lookup517: pallet_preimage::pallet::HoldReason */ + /** Lookup520: pallet_preimage::pallet::HoldReason */ PalletPreimageHoldReason: { _enum: ["Preimage"], }, - /** Lookup520: frame_support::traits::tokens::misc::IdAmount */ + /** Lookup523: frame_support::traits::tokens::misc::IdAmount */ FrameSupportTokensMiscIdAmount: { id: "Null", amount: "u128", }, - /** Lookup522: pallet_balances::pallet::Error */ + /** Lookup525: pallet_balances::pallet::Error */ PalletBalancesError: { _enum: [ "VestingBalance", @@ -4881,21 +4905,21 @@ export default { "DeltaZero", ], }, - /** Lookup523: pallet_transaction_payment::Releases */ + /** Lookup526: pallet_transaction_payment::Releases */ PalletTransactionPaymentReleases: { _enum: ["V1Ancient", "V2"], }, - /** Lookup524: sp_staking::offence::OffenceDetails */ + /** Lookup527: sp_staking::offence::OffenceDetails */ SpStakingOffenceOffenceDetails: { offender: "(AccountId32,Null)", reporters: "Vec", }, - /** Lookup536: pallet_registrar::pallet::DepositInfo */ + /** Lookup539: pallet_registrar::pallet::DepositInfo */ PalletRegistrarDepositInfo: { creator: "AccountId32", deposit: "u128", }, - /** Lookup537: pallet_registrar::pallet::Error */ + /** Lookup540: pallet_registrar::pallet::Error */ PalletRegistrarError: { _enum: [ "ParaIdAlreadyRegistered", @@ -4917,7 +4941,7 @@ export default { "WasmCodeNecessary", ], }, - /** Lookup538: pallet_configuration::HostConfiguration */ + /** Lookup541: pallet_configuration::HostConfiguration */ PalletConfigurationHostConfiguration: { maxCollators: "u32", minOrchestratorCollators: "u32", @@ -4929,11 +4953,11 @@ export default { targetContainerChainFullness: "Perbill", maxParachainCoresPercentage: "Option", }, - /** Lookup541: pallet_configuration::pallet::Error */ + /** Lookup544: pallet_configuration::pallet::Error */ PalletConfigurationError: { _enum: ["InvalidNewValue"], }, - /** Lookup543: pallet_invulnerables::pallet::Error */ + /** Lookup546: pallet_invulnerables::pallet::Error */ PalletInvulnerablesError: { _enum: [ "TooManyInvulnerables", @@ -4943,23 +4967,23 @@ export default { "UnableToDeriveCollatorId", ], }, - /** Lookup544: dp_collator_assignment::AssignedCollators */ + /** Lookup547: dp_collator_assignment::AssignedCollators */ DpCollatorAssignmentAssignedCollatorsAccountId32: { orchestratorChain: "Vec", containerChains: "BTreeMap>", }, - /** Lookup549: dp_collator_assignment::AssignedCollators */ + /** Lookup552: dp_collator_assignment::AssignedCollators */ DpCollatorAssignmentAssignedCollatorsPublic: { orchestratorChain: "Vec", containerChains: "BTreeMap>", }, - /** Lookup557: tp_traits::ContainerChainBlockInfo */ + /** Lookup560: tp_traits::ContainerChainBlockInfo */ TpTraitsContainerChainBlockInfo: { blockNumber: "u32", author: "AccountId32", latestSlotNumber: "u64", }, - /** Lookup558: pallet_author_noting::pallet::Error */ + /** Lookup561: pallet_author_noting::pallet::Error */ PalletAuthorNotingError: { _enum: [ "FailedReading", @@ -4971,18 +4995,18 @@ export default { "NonAuraDigest", ], }, - /** Lookup559: pallet_services_payment::pallet::Error */ + /** Lookup562: pallet_services_payment::pallet::Error */ PalletServicesPaymentError: { _enum: ["InsufficientFundsToPurchaseCredits", "InsufficientCredits", "CreditPriceTooExpensive"], }, - /** Lookup560: pallet_data_preservers::types::RegisteredProfile */ + /** Lookup563: pallet_data_preservers::types::RegisteredProfile */ PalletDataPreserversRegisteredProfile: { account: "AccountId32", deposit: "u128", profile: "PalletDataPreserversProfile", assignment: "Option<(u32,DancelightRuntimePreserversAssignmentPaymentWitness)>", }, - /** Lookup566: pallet_data_preservers::pallet::Error */ + /** Lookup569: pallet_data_preservers::pallet::Error */ PalletDataPreserversError: { _enum: [ "NoBootNodes", @@ -4997,12 +5021,12 @@ export default { "CantDeleteAssignedProfile", ], }, - /** Lookup569: tp_traits::ActiveEraInfo */ + /** Lookup572: tp_traits::ActiveEraInfo */ TpTraitsActiveEraInfo: { index: "u32", start: "Option", }, - /** Lookup571: pallet_external_validators::pallet::Error */ + /** Lookup574: pallet_external_validators::pallet::Error */ PalletExternalValidatorsError: { _enum: [ "TooManyWhitelisted", @@ -5012,13 +5036,34 @@ export default { "UnableToDeriveValidatorId", ], }, - /** Lookup576: sp_core::crypto::KeyTypeId */ + /** Lookup577: pallet_external_validator_slashes::Slash */ + PalletExternalValidatorSlashesSlash: { + validator: "AccountId32", + reporters: "Vec", + slashId: "u32", + percentage: "Perbill", + confirmed: "bool", + }, + /** Lookup578: pallet_external_validator_slashes::pallet::Error */ + PalletExternalValidatorSlashesError: { + _enum: [ + "EmptyTargets", + "InvalidSlashIndex", + "NotSortedAndUnique", + "ProvidedFutureEra", + "ProvidedNonSlashableEra", + "ActiveEraNotSet", + "DeferPeriodIsOver", + "ErrorComputingSlash", + ], + }, + /** Lookup582: sp_core::crypto::KeyTypeId */ SpCoreCryptoKeyTypeId: "[u8;4]", - /** Lookup577: pallet_session::pallet::Error */ + /** Lookup583: pallet_session::pallet::Error */ PalletSessionError: { _enum: ["InvalidProof", "NoAssociatedValidatorId", "DuplicatedKey", "NoKeys", "NoAccount"], }, - /** Lookup578: pallet_grandpa::StoredState */ + /** Lookup584: pallet_grandpa::StoredState */ PalletGrandpaStoredState: { _enum: { Live: "Null", @@ -5033,14 +5078,14 @@ export default { }, }, }, - /** Lookup579: pallet_grandpa::StoredPendingChange */ + /** Lookup585: pallet_grandpa::StoredPendingChange */ PalletGrandpaStoredPendingChange: { scheduledAt: "u32", delay: "u32", nextAuthorities: "Vec<(SpConsensusGrandpaAppPublic,u64)>", forced: "Option", }, - /** Lookup581: pallet_grandpa::pallet::Error */ + /** Lookup587: pallet_grandpa::pallet::Error */ PalletGrandpaError: { _enum: [ "PauseFailed", @@ -5052,12 +5097,12 @@ export default { "DuplicateOffenceReport", ], }, - /** Lookup584: pallet_inflation_rewards::pallet::ChainsToRewardValue */ + /** Lookup590: pallet_inflation_rewards::pallet::ChainsToRewardValue */ PalletInflationRewardsChainsToRewardValue: { paraIds: "Vec", rewardsPerChain: "u128", }, - /** Lookup585: pallet_treasury::Proposal */ + /** Lookup591: pallet_treasury::Proposal */ PalletTreasuryProposal: { proposer: "AccountId32", value: "u128", @@ -5065,7 +5110,7 @@ export default { bond: "u128", }, /** - * Lookup587: pallet_treasury::SpendStatus */ PalletTreasurySpendStatus: { @@ -5076,7 +5121,7 @@ export default { expireAt: "u32", status: "PalletTreasuryPaymentState", }, - /** Lookup588: pallet_treasury::PaymentState */ + /** Lookup594: pallet_treasury::PaymentState */ PalletTreasuryPaymentState: { _enum: { Pending: "Null", @@ -5086,9 +5131,9 @@ export default { Failed: "Null", }, }, - /** Lookup590: frame_support::PalletId */ + /** Lookup596: frame_support::PalletId */ FrameSupportPalletId: "[u8;8]", - /** Lookup591: pallet_treasury::pallet::Error */ + /** Lookup597: pallet_treasury::pallet::Error */ PalletTreasuryError: { _enum: [ "InvalidIndex", @@ -5105,7 +5150,7 @@ export default { ], }, /** - * Lookup593: pallet_conviction_voting::vote::Voting */ PalletConvictionVotingVoteVoting: { @@ -5114,20 +5159,20 @@ export default { Delegating: "PalletConvictionVotingVoteDelegating", }, }, - /** Lookup594: pallet_conviction_voting::vote::Casting */ + /** Lookup600: pallet_conviction_voting::vote::Casting */ PalletConvictionVotingVoteCasting: { votes: "Vec<(u32,PalletConvictionVotingVoteAccountVote)>", delegations: "PalletConvictionVotingDelegations", prior: "PalletConvictionVotingVotePriorLock", }, - /** Lookup598: pallet_conviction_voting::types::Delegations */ + /** Lookup604: pallet_conviction_voting::types::Delegations */ PalletConvictionVotingDelegations: { votes: "u128", capital: "u128", }, - /** Lookup599: pallet_conviction_voting::vote::PriorLock */ + /** Lookup605: pallet_conviction_voting::vote::PriorLock */ PalletConvictionVotingVotePriorLock: "(u32,u128)", - /** Lookup600: pallet_conviction_voting::vote::Delegating */ + /** Lookup606: pallet_conviction_voting::vote::Delegating */ PalletConvictionVotingVoteDelegating: { balance: "u128", target: "AccountId32", @@ -5135,7 +5180,7 @@ export default { delegations: "PalletConvictionVotingDelegations", prior: "PalletConvictionVotingVotePriorLock", }, - /** Lookup604: pallet_conviction_voting::pallet::Error */ + /** Lookup610: pallet_conviction_voting::pallet::Error */ PalletConvictionVotingError: { _enum: [ "NotOngoing", @@ -5153,7 +5198,7 @@ export default { ], }, /** - * Lookup605: pallet_referenda::types::ReferendumInfo, * Balance, pallet_conviction_voting::types::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5168,7 +5213,7 @@ export default { }, }, /** - * Lookup606: pallet_referenda::types::ReferendumStatus, * Balance, pallet_conviction_voting::types::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5185,17 +5230,17 @@ export default { inQueue: "bool", alarm: "Option<(u32,(u32,u32))>", }, - /** Lookup607: pallet_referenda::types::Deposit */ + /** Lookup613: pallet_referenda::types::Deposit */ PalletReferendaDeposit: { who: "AccountId32", amount: "u128", }, - /** Lookup610: pallet_referenda::types::DecidingStatus */ + /** Lookup616: pallet_referenda::types::DecidingStatus */ PalletReferendaDecidingStatus: { since: "u32", confirming: "Option", }, - /** Lookup618: pallet_referenda::types::TrackInfo */ + /** Lookup624: pallet_referenda::types::TrackInfo */ PalletReferendaTrackInfo: { name: "Text", maxDeciding: "u32", @@ -5207,7 +5252,7 @@ export default { minApproval: "PalletReferendaCurve", minSupport: "PalletReferendaCurve", }, - /** Lookup619: pallet_referenda::types::Curve */ + /** Lookup625: pallet_referenda::types::Curve */ PalletReferendaCurve: { _enum: { LinearDecreasing: { @@ -5228,7 +5273,7 @@ export default { }, }, }, - /** Lookup622: pallet_referenda::pallet::Error */ + /** Lookup628: pallet_referenda::pallet::Error */ PalletReferendaError: { _enum: [ "NotOngoing", @@ -5247,11 +5292,11 @@ export default { "PreimageStoredWithDifferentLength", ], }, - /** Lookup623: pallet_ranked_collective::MemberRecord */ + /** Lookup629: pallet_ranked_collective::MemberRecord */ PalletRankedCollectiveMemberRecord: { rank: "u16", }, - /** Lookup628: pallet_ranked_collective::pallet::Error */ + /** Lookup633: pallet_ranked_collective::pallet::Error */ PalletRankedCollectiveError: { _enum: [ "AlreadyMember", @@ -5268,7 +5313,7 @@ export default { ], }, /** - * Lookup629: pallet_referenda::types::ReferendumInfo, * Balance, pallet_ranked_collective::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5283,7 +5328,7 @@ export default { }, }, /** - * Lookup630: pallet_referenda::types::ReferendumStatus, * Balance, pallet_ranked_collective::Tally, sp_core::crypto::AccountId32, ScheduleAddress> */ @@ -5300,7 +5345,7 @@ export default { inQueue: "bool", alarm: "Option<(u32,(u32,u32))>", }, - /** Lookup633: pallet_whitelist::pallet::Error */ + /** Lookup638: pallet_whitelist::pallet::Error */ PalletWhitelistError: { _enum: [ "UnavailablePreImage", @@ -5310,7 +5355,7 @@ export default { "CallAlreadyWhitelisted", ], }, - /** Lookup634: polkadot_runtime_parachains::configuration::HostConfiguration */ + /** Lookup639: polkadot_runtime_parachains::configuration::HostConfiguration */ PolkadotRuntimeParachainsConfigurationHostConfiguration: { maxCodeSize: "u32", maxHeadDataSize: "u32", @@ -5348,16 +5393,16 @@ export default { approvalVotingParams: "PolkadotPrimitivesV7ApprovalVotingParams", schedulerParams: "PolkadotPrimitivesVstagingSchedulerParams", }, - /** Lookup637: polkadot_runtime_parachains::configuration::pallet::Error */ + /** Lookup642: polkadot_runtime_parachains::configuration::pallet::Error */ PolkadotRuntimeParachainsConfigurationPalletError: { _enum: ["InvalidNewValue"], }, - /** Lookup640: polkadot_runtime_parachains::shared::AllowedRelayParentsTracker */ + /** Lookup645: polkadot_runtime_parachains::shared::AllowedRelayParentsTracker */ PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker: { buffer: "Vec<(H256,H256)>", latestNumber: "u32", }, - /** Lookup644: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability */ + /** Lookup649: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability */ PolkadotRuntimeParachainsInclusionCandidatePendingAvailability: { _alias: { hash_: "hash", @@ -5372,7 +5417,7 @@ export default { backedInNumber: "u32", backingGroup: "u32", }, - /** Lookup645: polkadot_runtime_parachains::inclusion::pallet::Error */ + /** Lookup650: polkadot_runtime_parachains::inclusion::pallet::Error */ PolkadotRuntimeParachainsInclusionPalletError: { _enum: [ "ValidatorIndexOutOfBounds", @@ -5395,14 +5440,14 @@ export default { "ParaHeadMismatch", ], }, - /** Lookup646: polkadot_primitives::v7::ScrapedOnChainVotes */ + /** Lookup651: polkadot_primitives::v7::ScrapedOnChainVotes */ PolkadotPrimitivesV7ScrapedOnChainVotes: { session: "u32", backingValidatorsPerCandidate: "Vec<(PolkadotPrimitivesV7CandidateReceipt,Vec<(u32,PolkadotPrimitivesV7ValidityAttestation)>)>", disputes: "Vec", }, - /** Lookup651: polkadot_runtime_parachains::paras_inherent::pallet::Error */ + /** Lookup656: polkadot_runtime_parachains::paras_inherent::pallet::Error */ PolkadotRuntimeParachainsParasInherentPalletError: { _enum: [ "TooManyInclusionInherents", @@ -5412,20 +5457,20 @@ export default { "UnscheduledCandidate", ], }, - /** Lookup654: polkadot_runtime_parachains::scheduler::pallet::CoreOccupied */ + /** Lookup659: polkadot_runtime_parachains::scheduler::pallet::CoreOccupied */ PolkadotRuntimeParachainsSchedulerPalletCoreOccupied: { _enum: { Free: "Null", Paras: "PolkadotRuntimeParachainsSchedulerPalletParasEntry", }, }, - /** Lookup655: polkadot_runtime_parachains::scheduler::pallet::ParasEntry */ + /** Lookup660: polkadot_runtime_parachains::scheduler::pallet::ParasEntry */ PolkadotRuntimeParachainsSchedulerPalletParasEntry: { assignment: "PolkadotRuntimeParachainsSchedulerCommonAssignment", availabilityTimeouts: "u32", ttl: "u32", }, - /** Lookup656: polkadot_runtime_parachains::scheduler::common::Assignment */ + /** Lookup661: polkadot_runtime_parachains::scheduler::common::Assignment */ PolkadotRuntimeParachainsSchedulerCommonAssignment: { _enum: { Pool: { @@ -5435,7 +5480,7 @@ export default { Bulk: "u32", }, }, - /** Lookup661: polkadot_runtime_parachains::paras::PvfCheckActiveVoteState */ + /** Lookup666: polkadot_runtime_parachains::paras::PvfCheckActiveVoteState */ PolkadotRuntimeParachainsParasPvfCheckActiveVoteState: { votesAccept: "BitVec", votesReject: "BitVec", @@ -5443,7 +5488,7 @@ export default { createdAt: "u32", causes: "Vec", }, - /** Lookup663: polkadot_runtime_parachains::paras::PvfCheckCause */ + /** Lookup668: polkadot_runtime_parachains::paras::PvfCheckCause */ PolkadotRuntimeParachainsParasPvfCheckCause: { _enum: { Onboarding: "u32", @@ -5454,11 +5499,11 @@ export default { }, }, }, - /** Lookup664: polkadot_runtime_parachains::paras::UpgradeStrategy */ + /** Lookup669: polkadot_runtime_parachains::paras::UpgradeStrategy */ PolkadotRuntimeParachainsParasUpgradeStrategy: { _enum: ["SetGoAheadSignal", "ApplyAtExpectedBlock"], }, - /** Lookup666: polkadot_runtime_parachains::paras::ParaLifecycle */ + /** Lookup671: polkadot_runtime_parachains::paras::ParaLifecycle */ PolkadotRuntimeParachainsParasParaLifecycle: { _enum: [ "Onboarding", @@ -5470,25 +5515,25 @@ export default { "OffboardingParachain", ], }, - /** Lookup668: polkadot_runtime_parachains::paras::ParaPastCodeMeta */ + /** Lookup673: polkadot_runtime_parachains::paras::ParaPastCodeMeta */ PolkadotRuntimeParachainsParasParaPastCodeMeta: { upgradeTimes: "Vec", lastPruned: "Option", }, - /** Lookup670: polkadot_runtime_parachains::paras::ReplacementTimes */ + /** Lookup675: polkadot_runtime_parachains::paras::ReplacementTimes */ PolkadotRuntimeParachainsParasReplacementTimes: { expectedAt: "u32", activatedAt: "u32", }, - /** Lookup672: polkadot_primitives::v7::UpgradeGoAhead */ + /** Lookup677: polkadot_primitives::v7::UpgradeGoAhead */ PolkadotPrimitivesV7UpgradeGoAhead: { _enum: ["Abort", "GoAhead"], }, - /** Lookup673: polkadot_primitives::v7::UpgradeRestriction */ + /** Lookup678: polkadot_primitives::v7::UpgradeRestriction */ PolkadotPrimitivesV7UpgradeRestriction: { _enum: ["Present"], }, - /** Lookup674: polkadot_runtime_parachains::paras::pallet::Error */ + /** Lookup679: polkadot_runtime_parachains::paras::pallet::Error */ PolkadotRuntimeParachainsParasPalletError: { _enum: [ "NotRegistered", @@ -5506,18 +5551,18 @@ export default { "InvalidCode", ], }, - /** Lookup676: polkadot_runtime_parachains::initializer::BufferedSessionChange */ + /** Lookup681: polkadot_runtime_parachains::initializer::BufferedSessionChange */ PolkadotRuntimeParachainsInitializerBufferedSessionChange: { validators: "Vec", queued: "Vec", sessionIndex: "u32", }, - /** Lookup678: polkadot_core_primitives::InboundDownwardMessage */ + /** Lookup683: polkadot_core_primitives::InboundDownwardMessage */ PolkadotCorePrimitivesInboundDownwardMessage: { sentAt: "u32", msg: "Bytes", }, - /** Lookup679: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest */ + /** Lookup684: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest */ PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest: { confirmed: "bool", age: "u32", @@ -5526,7 +5571,7 @@ export default { maxCapacity: "u32", maxTotalSize: "u32", }, - /** Lookup681: polkadot_runtime_parachains::hrmp::HrmpChannel */ + /** Lookup686: polkadot_runtime_parachains::hrmp::HrmpChannel */ PolkadotRuntimeParachainsHrmpHrmpChannel: { maxCapacity: "u32", maxTotalSize: "u32", @@ -5537,12 +5582,12 @@ export default { senderDeposit: "u128", recipientDeposit: "u128", }, - /** Lookup683: polkadot_core_primitives::InboundHrmpMessage */ + /** Lookup688: polkadot_core_primitives::InboundHrmpMessage */ PolkadotCorePrimitivesInboundHrmpMessage: { sentAt: "u32", data: "Bytes", }, - /** Lookup686: polkadot_runtime_parachains::hrmp::pallet::Error */ + /** Lookup691: polkadot_runtime_parachains::hrmp::pallet::Error */ PolkadotRuntimeParachainsHrmpPalletError: { _enum: [ "OpenHrmpChannelToSelf", @@ -5567,7 +5612,7 @@ export default { "ChannelCreationNotAuthorized", ], }, - /** Lookup688: polkadot_primitives::v7::SessionInfo */ + /** Lookup693: polkadot_primitives::v7::SessionInfo */ PolkadotPrimitivesV7SessionInfo: { activeValidatorIndices: "Vec", randomSeed: "[u8;32]", @@ -5584,20 +5629,20 @@ export default { neededApprovals: "u32", }, /** - * Lookup689: polkadot_primitives::v7::IndexedVec */ PolkadotPrimitivesV7IndexedVecValidatorIndex: "Vec", - /** Lookup690: polkadot_primitives::v7::IndexedVec */ + /** Lookup695: polkadot_primitives::v7::IndexedVec */ PolkadotPrimitivesV7IndexedVecGroupIndex: "Vec>", - /** Lookup692: polkadot_primitives::v7::DisputeState */ + /** Lookup697: polkadot_primitives::v7::DisputeState */ PolkadotPrimitivesV7DisputeState: { validatorsFor: "BitVec", validatorsAgainst: "BitVec", start: "u32", concludedAt: "Option", }, - /** Lookup694: polkadot_runtime_parachains::disputes::pallet::Error */ + /** Lookup699: polkadot_runtime_parachains::disputes::pallet::Error */ PolkadotRuntimeParachainsDisputesPalletError: { _enum: [ "DuplicateDisputeStatementSets", @@ -5611,7 +5656,7 @@ export default { "UnconfirmedDispute", ], }, - /** Lookup695: polkadot_primitives::v7::slashing::PendingSlashes */ + /** Lookup700: polkadot_primitives::v7::slashing::PendingSlashes */ PolkadotPrimitivesV7SlashingPendingSlashes: { _alias: { keys_: "keys", @@ -5619,7 +5664,7 @@ export default { keys_: "BTreeMap", kind: "PolkadotPrimitivesV7SlashingSlashingOffenceKind", }, - /** Lookup699: polkadot_runtime_parachains::disputes::slashing::pallet::Error */ + /** Lookup704: polkadot_runtime_parachains::disputes::slashing::pallet::Error */ PolkadotRuntimeParachainsDisputesSlashingPalletError: { _enum: [ "InvalidKeyOwnershipProof", @@ -5630,7 +5675,7 @@ export default { "DuplicateSlashingReport", ], }, - /** Lookup700: pallet_message_queue::BookState */ + /** Lookup705: pallet_message_queue::BookState */ PalletMessageQueueBookState: { _alias: { size_: "size", @@ -5642,12 +5687,12 @@ export default { messageCount: "u64", size_: "u64", }, - /** Lookup702: pallet_message_queue::Neighbours */ + /** Lookup707: pallet_message_queue::Neighbours */ PalletMessageQueueNeighbours: { prev: "PolkadotRuntimeParachainsInclusionAggregateMessageOrigin", next: "PolkadotRuntimeParachainsInclusionAggregateMessageOrigin", }, - /** Lookup704: pallet_message_queue::Page */ + /** Lookup709: pallet_message_queue::Page */ PalletMessageQueuePage: { remaining: "u32", remainingSize: "u32", @@ -5656,7 +5701,7 @@ export default { last: "u32", heap: "Bytes", }, - /** Lookup706: pallet_message_queue::pallet::Error */ + /** Lookup711: pallet_message_queue::pallet::Error */ PalletMessageQueueError: { _enum: [ "NotReapable", @@ -5670,38 +5715,38 @@ export default { "RecursiveDisallowed", ], }, - /** Lookup707: polkadot_runtime_parachains::assigner_on_demand::types::CoreAffinityCount */ + /** Lookup712: polkadot_runtime_parachains::assigner_on_demand::types::CoreAffinityCount */ PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount: { coreIndex: "u32", count: "u32", }, - /** Lookup708: polkadot_runtime_parachains::assigner_on_demand::types::QueueStatusType */ + /** Lookup713: polkadot_runtime_parachains::assigner_on_demand::types::QueueStatusType */ PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType: { traffic: "u128", nextIndex: "u32", smallestIndex: "u32", freedIndices: "BinaryHeapReverseQueueIndex", }, - /** Lookup710: BinaryHeap */ + /** Lookup715: BinaryHeap */ BinaryHeapReverseQueueIndex: "Vec", - /** Lookup713: BinaryHeap */ + /** Lookup718: BinaryHeap */ BinaryHeapEnqueuedOrder: "Vec", - /** Lookup714: polkadot_runtime_parachains::assigner_on_demand::types::EnqueuedOrder */ + /** Lookup719: polkadot_runtime_parachains::assigner_on_demand::types::EnqueuedOrder */ PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder: { paraId: "u32", idx: "u32", }, - /** Lookup718: polkadot_runtime_parachains::assigner_on_demand::pallet::Error */ + /** Lookup723: polkadot_runtime_parachains::assigner_on_demand::pallet::Error */ PolkadotRuntimeParachainsAssignerOnDemandPalletError: { _enum: ["QueueFull", "SpotPriceHigherThanMaxAmount"], }, - /** Lookup719: polkadot_runtime_common::paras_registrar::ParaInfo */ + /** Lookup724: polkadot_runtime_common::paras_registrar::ParaInfo */ PolkadotRuntimeCommonParasRegistrarParaInfo: { manager: "AccountId32", deposit: "u128", locked: "Option", }, - /** Lookup721: polkadot_runtime_common::paras_registrar::pallet::Error */ + /** Lookup726: polkadot_runtime_common::paras_registrar::pallet::Error */ PolkadotRuntimeCommonParasRegistrarPalletError: { _enum: [ "NotRegistered", @@ -5720,12 +5765,12 @@ export default { "CannotSwap", ], }, - /** Lookup722: pallet_utility::pallet::Error */ + /** Lookup727: pallet_utility::pallet::Error */ PalletUtilityError: { _enum: ["TooManyCalls"], }, /** - * Lookup724: pallet_identity::types::Registration> */ PalletIdentityRegistration: { @@ -5733,18 +5778,18 @@ export default { deposit: "u128", info: "PalletIdentityLegacyIdentityInfo", }, - /** Lookup733: pallet_identity::types::RegistrarInfo */ + /** Lookup738: pallet_identity::types::RegistrarInfo */ PalletIdentityRegistrarInfo: { account: "AccountId32", fee: "u128", fields: "u64", }, - /** Lookup735: pallet_identity::types::AuthorityProperties> */ + /** Lookup740: pallet_identity::types::AuthorityProperties> */ PalletIdentityAuthorityProperties: { suffix: "Bytes", allocation: "u32", }, - /** Lookup738: pallet_identity::pallet::Error */ + /** Lookup743: pallet_identity::pallet::Error */ PalletIdentityError: { _enum: [ "TooManySubAccounts", @@ -5776,7 +5821,7 @@ export default { ], }, /** - * Lookup741: pallet_scheduler::Scheduled, * BlockNumber, dancelight_runtime::OriginCaller, sp_core::crypto::AccountId32> */ @@ -5787,29 +5832,29 @@ export default { maybePeriodic: "Option<(u32,u32)>", origin: "DancelightRuntimeOriginCaller", }, - /** Lookup743: pallet_scheduler::RetryConfig */ + /** Lookup748: pallet_scheduler::RetryConfig */ PalletSchedulerRetryConfig: { totalRetries: "u8", remaining: "u8", period: "u32", }, - /** Lookup744: pallet_scheduler::pallet::Error */ + /** Lookup749: pallet_scheduler::pallet::Error */ PalletSchedulerError: { _enum: ["FailedToSchedule", "NotFound", "TargetBlockNumberInPast", "RescheduleNoChange", "Named"], }, - /** Lookup747: pallet_proxy::ProxyDefinition */ + /** Lookup752: pallet_proxy::ProxyDefinition */ PalletProxyProxyDefinition: { delegate: "AccountId32", proxyType: "DancelightRuntimeProxyType", delay: "u32", }, - /** Lookup751: pallet_proxy::Announcement */ + /** Lookup756: pallet_proxy::Announcement */ PalletProxyAnnouncement: { real: "AccountId32", callHash: "H256", height: "u32", }, - /** Lookup753: pallet_proxy::pallet::Error */ + /** Lookup758: pallet_proxy::pallet::Error */ PalletProxyError: { _enum: [ "TooMany", @@ -5822,14 +5867,14 @@ export default { "NoSelfProxy", ], }, - /** Lookup755: pallet_multisig::Multisig */ + /** Lookup760: pallet_multisig::Multisig */ PalletMultisigMultisig: { when: "PalletMultisigTimepoint", deposit: "u128", depositor: "AccountId32", approvals: "Vec", }, - /** Lookup757: pallet_multisig::pallet::Error */ + /** Lookup762: pallet_multisig::pallet::Error */ PalletMultisigError: { _enum: [ "MinimumThreshold", @@ -5848,7 +5893,7 @@ export default { "AlreadyStored", ], }, - /** Lookup758: pallet_preimage::OldRequestStatus */ + /** Lookup763: pallet_preimage::OldRequestStatus */ PalletPreimageOldRequestStatus: { _enum: { Unrequested: { @@ -5863,7 +5908,7 @@ export default { }, }, /** - * Lookup761: pallet_preimage::RequestStatus> */ PalletPreimageRequestStatus: { @@ -5879,7 +5924,7 @@ export default { }, }, }, - /** Lookup766: pallet_preimage::pallet::Error */ + /** Lookup771: pallet_preimage::pallet::Error */ PalletPreimageError: { _enum: [ "TooBig", @@ -5893,11 +5938,11 @@ export default { "NoCost", ], }, - /** Lookup767: pallet_asset_rate::pallet::Error */ + /** Lookup772: pallet_asset_rate::pallet::Error */ PalletAssetRateError: { _enum: ["UnknownAssetKind", "AlreadyExists", "Overflow"], }, - /** Lookup768: pallet_xcm::pallet::QueryStatus */ + /** Lookup773: pallet_xcm::pallet::QueryStatus */ PalletXcmQueryStatus: { _enum: { Pending: { @@ -5916,7 +5961,7 @@ export default { }, }, }, - /** Lookup772: xcm::VersionedResponse */ + /** Lookup777: xcm::VersionedResponse */ XcmVersionedResponse: { _enum: { __Unused0: "Null", @@ -5926,7 +5971,7 @@ export default { V4: "StagingXcmV4Response", }, }, - /** Lookup778: pallet_xcm::pallet::VersionMigrationStage */ + /** Lookup783: pallet_xcm::pallet::VersionMigrationStage */ PalletXcmVersionMigrationStage: { _enum: { MigrateSupportedVersion: "Null", @@ -5935,14 +5980,14 @@ export default { MigrateAndNotifyOldTargets: "Null", }, }, - /** Lookup780: pallet_xcm::pallet::RemoteLockedFungibleRecord */ + /** Lookup785: pallet_xcm::pallet::RemoteLockedFungibleRecord */ PalletXcmRemoteLockedFungibleRecord: { amount: "u128", owner: "XcmVersionedLocation", locker: "XcmVersionedLocation", consumers: "Vec<(Null,u128)>", }, - /** Lookup787: pallet_xcm::pallet::Error */ + /** Lookup792: pallet_xcm::pallet::Error */ PalletXcmError: { _enum: [ "Unreachable", @@ -5972,11 +6017,11 @@ export default { "LocalExecutionIncomplete", ], }, - /** Lookup788: pallet_migrations::pallet::Error */ + /** Lookup793: pallet_migrations::pallet::Error */ PalletMigrationsError: { _enum: ["PreimageMissing", "WrongUpperBound", "PreimageIsTooBig", "PreimageAlreadyExists"], }, - /** Lookup792: pallet_beefy::pallet::Error */ + /** Lookup797: pallet_beefy::pallet::Error */ PalletBeefyError: { _enum: [ "InvalidKeyOwnershipProof", @@ -5988,43 +6033,43 @@ export default { "InvalidConfiguration", ], }, - /** Lookup793: sp_consensus_beefy::mmr::BeefyAuthoritySet */ + /** Lookup798: sp_consensus_beefy::mmr::BeefyAuthoritySet */ SpConsensusBeefyMmrBeefyAuthoritySet: { id: "u64", len: "u32", keysetCommitment: "H256", }, - /** Lookup794: snowbridge_beacon_primitives::types::CompactBeaconState */ + /** Lookup799: snowbridge_beacon_primitives::types::CompactBeaconState */ SnowbridgeBeaconPrimitivesCompactBeaconState: { slot: "Compact", blockRootsRoot: "H256", }, - /** Lookup795: snowbridge_beacon_primitives::types::SyncCommitteePrepared */ + /** Lookup800: snowbridge_beacon_primitives::types::SyncCommitteePrepared */ SnowbridgeBeaconPrimitivesSyncCommitteePrepared: { root: "H256", - pubkeys: "[Lookup797;512]", + pubkeys: "[Lookup802;512]", aggregatePubkey: "SnowbridgeMilagroBlsKeysPublicKey", }, - /** Lookup797: snowbridge_milagro_bls::keys::PublicKey */ + /** Lookup802: snowbridge_milagro_bls::keys::PublicKey */ SnowbridgeMilagroBlsKeysPublicKey: { point: "SnowbridgeAmclBls381Ecp", }, - /** Lookup798: snowbridge_amcl::bls381::ecp::ECP */ + /** Lookup803: snowbridge_amcl::bls381::ecp::ECP */ SnowbridgeAmclBls381Ecp: { x: "SnowbridgeAmclBls381Fp", y: "SnowbridgeAmclBls381Fp", z: "SnowbridgeAmclBls381Fp", }, - /** Lookup799: snowbridge_amcl::bls381::fp::FP */ + /** Lookup804: snowbridge_amcl::bls381::fp::FP */ SnowbridgeAmclBls381Fp: { x: "SnowbridgeAmclBls381Big", xes: "i32", }, - /** Lookup800: snowbridge_amcl::bls381::big::Big */ + /** Lookup805: snowbridge_amcl::bls381::big::Big */ SnowbridgeAmclBls381Big: { w: "[i32;14]", }, - /** Lookup803: snowbridge_beacon_primitives::types::ForkVersions */ + /** Lookup808: snowbridge_beacon_primitives::types::ForkVersions */ SnowbridgeBeaconPrimitivesForkVersions: { genesis: "SnowbridgeBeaconPrimitivesFork", altair: "SnowbridgeBeaconPrimitivesFork", @@ -6032,12 +6077,12 @@ export default { capella: "SnowbridgeBeaconPrimitivesFork", deneb: "SnowbridgeBeaconPrimitivesFork", }, - /** Lookup804: snowbridge_beacon_primitives::types::Fork */ + /** Lookup809: snowbridge_beacon_primitives::types::Fork */ SnowbridgeBeaconPrimitivesFork: { version: "[u8;4]", epoch: "u64", }, - /** Lookup805: snowbridge_pallet_ethereum_client::pallet::Error */ + /** Lookup810: snowbridge_pallet_ethereum_client::pallet::Error */ SnowbridgePalletEthereumClientError: { _enum: { SkippedSyncCommitteePeriod: "Null", @@ -6067,11 +6112,11 @@ export default { Halted: "Null", }, }, - /** Lookup806: snowbridge_beacon_primitives::bls::BlsError */ + /** Lookup811: snowbridge_beacon_primitives::bls::BlsError */ SnowbridgeBeaconPrimitivesBlsBlsError: { _enum: ["InvalidSignature", "InvalidPublicKey", "InvalidAggregatePublicKeys", "SignatureVerificationFailed"], }, - /** Lookup807: polkadot_runtime_common::paras_sudo_wrapper::pallet::Error */ + /** Lookup812: polkadot_runtime_common::paras_sudo_wrapper::pallet::Error */ PolkadotRuntimeCommonParasSudoWrapperPalletError: { _enum: [ "ParaDoesntExist", @@ -6085,32 +6130,32 @@ export default { "TooManyCores", ], }, - /** Lookup808: pallet_sudo::pallet::Error */ + /** Lookup813: pallet_sudo::pallet::Error */ PalletSudoError: { _enum: ["RequireSudo"], }, - /** Lookup811: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ + /** Lookup816: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender */ FrameSystemExtensionsCheckNonZeroSender: "Null", - /** Lookup812: frame_system::extensions::check_spec_version::CheckSpecVersion */ + /** Lookup817: frame_system::extensions::check_spec_version::CheckSpecVersion */ FrameSystemExtensionsCheckSpecVersion: "Null", - /** Lookup813: frame_system::extensions::check_tx_version::CheckTxVersion */ + /** Lookup818: frame_system::extensions::check_tx_version::CheckTxVersion */ FrameSystemExtensionsCheckTxVersion: "Null", - /** Lookup814: frame_system::extensions::check_genesis::CheckGenesis */ + /** Lookup819: frame_system::extensions::check_genesis::CheckGenesis */ FrameSystemExtensionsCheckGenesis: "Null", - /** Lookup817: frame_system::extensions::check_nonce::CheckNonce */ + /** Lookup822: frame_system::extensions::check_nonce::CheckNonce */ FrameSystemExtensionsCheckNonce: "Compact", - /** Lookup818: frame_system::extensions::check_weight::CheckWeight */ + /** Lookup823: frame_system::extensions::check_weight::CheckWeight */ FrameSystemExtensionsCheckWeight: "Null", - /** Lookup819: pallet_transaction_payment::ChargeTransactionPayment */ + /** Lookup824: pallet_transaction_payment::ChargeTransactionPayment */ PalletTransactionPaymentChargeTransactionPayment: "Compact", - /** Lookup820: frame_metadata_hash_extension::CheckMetadataHash */ + /** Lookup825: frame_metadata_hash_extension::CheckMetadataHash */ FrameMetadataHashExtensionCheckMetadataHash: { mode: "FrameMetadataHashExtensionMode", }, - /** Lookup821: frame_metadata_hash_extension::Mode */ + /** Lookup826: frame_metadata_hash_extension::Mode */ FrameMetadataHashExtensionMode: { _enum: ["Disabled", "Enabled"], }, - /** Lookup822: dancelight_runtime::Runtime */ + /** Lookup827: dancelight_runtime::Runtime */ DancelightRuntimeRuntime: "Null", }; diff --git a/typescript-api/src/dancelight/interfaces/registry.ts b/typescript-api/src/dancelight/interfaces/registry.ts index 69cf32fa3..d0e80fce6 100644 --- a/typescript-api/src/dancelight/interfaces/registry.ts +++ b/typescript-api/src/dancelight/interfaces/registry.ts @@ -113,6 +113,10 @@ import type { PalletDataPreserversProfile, PalletDataPreserversProfileMode, PalletDataPreserversRegisteredProfile, + PalletExternalValidatorSlashesCall, + PalletExternalValidatorSlashesError, + PalletExternalValidatorSlashesEvent, + PalletExternalValidatorSlashesSlash, PalletExternalValidatorsCall, PalletExternalValidatorsError, PalletExternalValidatorsEvent, @@ -568,6 +572,10 @@ declare module "@polkadot/types/types/registry" { PalletDataPreserversProfile: PalletDataPreserversProfile; PalletDataPreserversProfileMode: PalletDataPreserversProfileMode; PalletDataPreserversRegisteredProfile: PalletDataPreserversRegisteredProfile; + PalletExternalValidatorSlashesCall: PalletExternalValidatorSlashesCall; + PalletExternalValidatorSlashesError: PalletExternalValidatorSlashesError; + PalletExternalValidatorSlashesEvent: PalletExternalValidatorSlashesEvent; + PalletExternalValidatorSlashesSlash: PalletExternalValidatorSlashesSlash; PalletExternalValidatorsCall: PalletExternalValidatorsCall; PalletExternalValidatorsError: PalletExternalValidatorsError; PalletExternalValidatorsEvent: PalletExternalValidatorsEvent; diff --git a/typescript-api/src/dancelight/interfaces/types-lookup.ts b/typescript-api/src/dancelight/interfaces/types-lookup.ts index ff5f90d32..e17ceb0a6 100644 --- a/typescript-api/src/dancelight/interfaces/types-lookup.ts +++ b/typescript-api/src/dancelight/interfaces/types-lookup.ts @@ -656,7 +656,18 @@ declare module "@polkadot/types/lookup" { readonly type: "NotForcing" | "ForceNew" | "ForceNone" | "ForceAlways"; } - /** @name PalletSessionEvent (56) */ + /** @name PalletExternalValidatorSlashesEvent (56) */ + interface PalletExternalValidatorSlashesEvent extends Enum { + readonly isSlashReported: boolean; + readonly asSlashReported: { + readonly validator: AccountId32; + readonly fraction: Perbill; + readonly slashEra: u32; + } & Struct; + readonly type: "SlashReported"; + } + + /** @name PalletSessionEvent (58) */ interface PalletSessionEvent extends Enum { readonly isNewSession: boolean; readonly asNewSession: { @@ -665,7 +676,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NewSession"; } - /** @name PalletGrandpaEvent (57) */ + /** @name PalletGrandpaEvent (59) */ interface PalletGrandpaEvent extends Enum { readonly isNewAuthorities: boolean; readonly asNewAuthorities: { @@ -676,10 +687,10 @@ declare module "@polkadot/types/lookup" { readonly type: "NewAuthorities" | "Paused" | "Resumed"; } - /** @name SpConsensusGrandpaAppPublic (60) */ + /** @name SpConsensusGrandpaAppPublic (62) */ interface SpConsensusGrandpaAppPublic extends U8aFixed {} - /** @name PalletInflationRewardsEvent (61) */ + /** @name PalletInflationRewardsEvent (63) */ interface PalletInflationRewardsEvent extends Enum { readonly isRewardedOrchestrator: boolean; readonly asRewardedOrchestrator: { @@ -695,7 +706,7 @@ declare module "@polkadot/types/lookup" { readonly type: "RewardedOrchestrator" | "RewardedContainer"; } - /** @name PalletTreasuryEvent (62) */ + /** @name PalletTreasuryEvent (64) */ interface PalletTreasuryEvent extends Enum { readonly isSpending: boolean; readonly asSpending: { @@ -772,7 +783,7 @@ declare module "@polkadot/types/lookup" { | "SpendProcessed"; } - /** @name PalletConvictionVotingEvent (64) */ + /** @name PalletConvictionVotingEvent (66) */ interface PalletConvictionVotingEvent extends Enum { readonly isDelegated: boolean; readonly asDelegated: ITuple<[AccountId32, AccountId32]>; @@ -781,7 +792,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Delegated" | "Undelegated"; } - /** @name PalletReferendaEvent (65) */ + /** @name PalletReferendaEvent (67) */ interface PalletReferendaEvent extends Enum { readonly isSubmitted: boolean; readonly asSubmitted: { @@ -885,7 +896,7 @@ declare module "@polkadot/types/lookup" { | "MetadataCleared"; } - /** @name FrameSupportPreimagesBounded (67) */ + /** @name FrameSupportPreimagesBounded (69) */ interface FrameSupportPreimagesBounded extends Enum { readonly isLegacy: boolean; readonly asLegacy: { @@ -901,7 +912,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Legacy" | "Inline" | "Lookup"; } - /** @name FrameSystemCall (69) */ + /** @name FrameSystemCall (71) */ interface FrameSystemCall extends Enum { readonly isRemark: boolean; readonly asRemark: { @@ -962,7 +973,7 @@ declare module "@polkadot/types/lookup" { | "ApplyAuthorizedUpgrade"; } - /** @name PalletBabeCall (73) */ + /** @name PalletBabeCall (75) */ interface PalletBabeCall extends Enum { readonly isReportEquivocation: boolean; readonly asReportEquivocation: { @@ -981,7 +992,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ReportEquivocation" | "ReportEquivocationUnsigned" | "PlanConfigChange"; } - /** @name SpConsensusSlotsEquivocationProof (74) */ + /** @name SpConsensusSlotsEquivocationProof (76) */ interface SpConsensusSlotsEquivocationProof extends Struct { readonly offender: SpConsensusBabeAppPublic; readonly slot: u64; @@ -989,7 +1000,7 @@ declare module "@polkadot/types/lookup" { readonly secondHeader: SpRuntimeHeader; } - /** @name SpRuntimeHeader (75) */ + /** @name SpRuntimeHeader (77) */ interface SpRuntimeHeader extends Struct { readonly parentHash: H256; readonly number: Compact; @@ -998,17 +1009,17 @@ declare module "@polkadot/types/lookup" { readonly digest: SpRuntimeDigest; } - /** @name SpConsensusBabeAppPublic (77) */ + /** @name SpConsensusBabeAppPublic (79) */ interface SpConsensusBabeAppPublic extends U8aFixed {} - /** @name SpSessionMembershipProof (78) */ + /** @name SpSessionMembershipProof (80) */ interface SpSessionMembershipProof extends Struct { readonly session: u32; readonly trieNodes: Vec; readonly validatorCount: u32; } - /** @name SpConsensusBabeDigestsNextConfigDescriptor (79) */ + /** @name SpConsensusBabeDigestsNextConfigDescriptor (81) */ interface SpConsensusBabeDigestsNextConfigDescriptor extends Enum { readonly isV1: boolean; readonly asV1: { @@ -1018,7 +1029,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V1"; } - /** @name SpConsensusBabeAllowedSlots (81) */ + /** @name SpConsensusBabeAllowedSlots (83) */ interface SpConsensusBabeAllowedSlots extends Enum { readonly isPrimarySlots: boolean; readonly isPrimaryAndSecondaryPlainSlots: boolean; @@ -1026,7 +1037,7 @@ declare module "@polkadot/types/lookup" { readonly type: "PrimarySlots" | "PrimaryAndSecondaryPlainSlots" | "PrimaryAndSecondaryVRFSlots"; } - /** @name PalletTimestampCall (82) */ + /** @name PalletTimestampCall (84) */ interface PalletTimestampCall extends Enum { readonly isSet: boolean; readonly asSet: { @@ -1035,7 +1046,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Set"; } - /** @name PalletBalancesCall (83) */ + /** @name PalletBalancesCall (85) */ interface PalletBalancesCall extends Enum { readonly isTransferAllowDeath: boolean; readonly asTransferAllowDeath: { @@ -1094,14 +1105,14 @@ declare module "@polkadot/types/lookup" { | "Burn"; } - /** @name PalletBalancesAdjustmentDirection (89) */ + /** @name PalletBalancesAdjustmentDirection (91) */ interface PalletBalancesAdjustmentDirection extends Enum { readonly isIncrease: boolean; readonly isDecrease: boolean; readonly type: "Increase" | "Decrease"; } - /** @name PalletParametersCall (90) */ + /** @name PalletParametersCall (92) */ interface PalletParametersCall extends Enum { readonly isSetParameter: boolean; readonly asSetParameter: { @@ -1110,14 +1121,14 @@ declare module "@polkadot/types/lookup" { readonly type: "SetParameter"; } - /** @name DancelightRuntimeRuntimeParameters (91) */ + /** @name DancelightRuntimeRuntimeParameters (93) */ interface DancelightRuntimeRuntimeParameters extends Enum { readonly isPreimage: boolean; readonly asPreimage: DancelightRuntimeDynamicParamsPreimageParameters; readonly type: "Preimage"; } - /** @name DancelightRuntimeDynamicParamsPreimageParameters (92) */ + /** @name DancelightRuntimeDynamicParamsPreimageParameters (94) */ interface DancelightRuntimeDynamicParamsPreimageParameters extends Enum { readonly isBaseDeposit: boolean; readonly asBaseDeposit: ITuple<[DancelightRuntimeDynamicParamsPreimageBaseDeposit, Option]>; @@ -1126,7 +1137,7 @@ declare module "@polkadot/types/lookup" { readonly type: "BaseDeposit" | "ByteDeposit"; } - /** @name PalletRegistrarCall (93) */ + /** @name PalletRegistrarCall (95) */ interface PalletRegistrarCall extends Enum { readonly isRegister: boolean; readonly asRegister: { @@ -1196,7 +1207,7 @@ declare module "@polkadot/types/lookup" { | "DeregisterWithRelayProof"; } - /** @name DpContainerChainGenesisDataContainerChainGenesisData (94) */ + /** @name DpContainerChainGenesisDataContainerChainGenesisData (96) */ interface DpContainerChainGenesisDataContainerChainGenesisData extends Struct { readonly storage: Vec; readonly name: Bytes; @@ -1206,42 +1217,42 @@ declare module "@polkadot/types/lookup" { readonly properties: DpContainerChainGenesisDataProperties; } - /** @name DpContainerChainGenesisDataContainerChainGenesisDataItem (96) */ + /** @name DpContainerChainGenesisDataContainerChainGenesisDataItem (98) */ interface DpContainerChainGenesisDataContainerChainGenesisDataItem extends Struct { readonly key: Bytes; readonly value: Bytes; } - /** @name DpContainerChainGenesisDataProperties (98) */ + /** @name DpContainerChainGenesisDataProperties (100) */ interface DpContainerChainGenesisDataProperties extends Struct { readonly tokenMetadata: DpContainerChainGenesisDataTokenMetadata; readonly isEthereum: bool; } - /** @name DpContainerChainGenesisDataTokenMetadata (99) */ + /** @name DpContainerChainGenesisDataTokenMetadata (101) */ interface DpContainerChainGenesisDataTokenMetadata extends Struct { readonly tokenSymbol: Bytes; readonly ss58Format: u32; readonly tokenDecimals: u32; } - /** @name TpTraitsSlotFrequency (103) */ + /** @name TpTraitsSlotFrequency (105) */ interface TpTraitsSlotFrequency extends Struct { readonly min: u32; readonly max: u32; } - /** @name TpTraitsParathreadParams (105) */ + /** @name TpTraitsParathreadParams (107) */ interface TpTraitsParathreadParams extends Struct { readonly slotFrequency: TpTraitsSlotFrequency; } - /** @name SpTrieStorageProof (106) */ + /** @name SpTrieStorageProof (108) */ interface SpTrieStorageProof extends Struct { readonly trieNodes: BTreeSet; } - /** @name SpRuntimeMultiSignature (108) */ + /** @name SpRuntimeMultiSignature (110) */ interface SpRuntimeMultiSignature extends Enum { readonly isEd25519: boolean; readonly asEd25519: U8aFixed; @@ -1252,7 +1263,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Ed25519" | "Sr25519" | "Ecdsa"; } - /** @name PalletConfigurationCall (111) */ + /** @name PalletConfigurationCall (113) */ interface PalletConfigurationCall extends Enum { readonly isSetMaxCollators: boolean; readonly asSetMaxCollators: { @@ -1307,7 +1318,7 @@ declare module "@polkadot/types/lookup" { | "SetBypassConsistencyCheck"; } - /** @name PalletInvulnerablesCall (114) */ + /** @name PalletInvulnerablesCall (115) */ interface PalletInvulnerablesCall extends Enum { readonly isAddInvulnerable: boolean; readonly asAddInvulnerable: { @@ -1320,13 +1331,13 @@ declare module "@polkadot/types/lookup" { readonly type: "AddInvulnerable" | "RemoveInvulnerable"; } - /** @name PalletCollatorAssignmentCall (115) */ + /** @name PalletCollatorAssignmentCall (116) */ type PalletCollatorAssignmentCall = Null; - /** @name PalletAuthorityAssignmentCall (116) */ + /** @name PalletAuthorityAssignmentCall (117) */ type PalletAuthorityAssignmentCall = Null; - /** @name PalletAuthorNotingCall (117) */ + /** @name PalletAuthorNotingCall (118) */ interface PalletAuthorNotingCall extends Enum { readonly isSetLatestAuthorData: boolean; readonly asSetLatestAuthorData: { @@ -1346,7 +1357,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SetLatestAuthorData" | "SetAuthor" | "KillAuthorData"; } - /** @name PalletServicesPaymentCall (118) */ + /** @name PalletServicesPaymentCall (119) */ interface PalletServicesPaymentCall extends Enum { readonly isPurchaseCredits: boolean; readonly asPurchaseCredits: { @@ -1393,7 +1404,7 @@ declare module "@polkadot/types/lookup" { | "SetMaxTip"; } - /** @name PalletDataPreserversCall (119) */ + /** @name PalletDataPreserversCall (120) */ interface PalletDataPreserversCall extends Enum { readonly isCreateProfile: boolean; readonly asCreateProfile: { @@ -1451,7 +1462,7 @@ declare module "@polkadot/types/lookup" { | "ForceStartAssignment"; } - /** @name PalletDataPreserversProfile (120) */ + /** @name PalletDataPreserversProfile (121) */ interface PalletDataPreserversProfile extends Struct { readonly url: Bytes; readonly paraIds: PalletDataPreserversParaIdsFilter; @@ -1459,7 +1470,7 @@ declare module "@polkadot/types/lookup" { readonly assignmentRequest: DancelightRuntimePreserversAssignmentPaymentRequest; } - /** @name PalletDataPreserversParaIdsFilter (122) */ + /** @name PalletDataPreserversParaIdsFilter (123) */ interface PalletDataPreserversParaIdsFilter extends Enum { readonly isAnyParaId: boolean; readonly isWhitelist: boolean; @@ -1469,7 +1480,7 @@ declare module "@polkadot/types/lookup" { readonly type: "AnyParaId" | "Whitelist" | "Blacklist"; } - /** @name PalletDataPreserversProfileMode (126) */ + /** @name PalletDataPreserversProfileMode (127) */ interface PalletDataPreserversProfileMode extends Enum { readonly isBootnode: boolean; readonly isRpc: boolean; @@ -1479,25 +1490,25 @@ declare module "@polkadot/types/lookup" { readonly type: "Bootnode" | "Rpc"; } - /** @name DancelightRuntimePreserversAssignmentPaymentRequest (127) */ + /** @name DancelightRuntimePreserversAssignmentPaymentRequest (128) */ interface DancelightRuntimePreserversAssignmentPaymentRequest extends Enum { readonly isFree: boolean; readonly type: "Free"; } - /** @name DancelightRuntimePreserversAssignmentPaymentExtra (128) */ + /** @name DancelightRuntimePreserversAssignmentPaymentExtra (129) */ interface DancelightRuntimePreserversAssignmentPaymentExtra extends Enum { readonly isFree: boolean; readonly type: "Free"; } - /** @name DancelightRuntimePreserversAssignmentPaymentWitness (129) */ + /** @name DancelightRuntimePreserversAssignmentPaymentWitness (130) */ interface DancelightRuntimePreserversAssignmentPaymentWitness extends Enum { readonly isFree: boolean; readonly type: "Free"; } - /** @name PalletExternalValidatorsCall (130) */ + /** @name PalletExternalValidatorsCall (131) */ interface PalletExternalValidatorsCall extends Enum { readonly isSkipExternalValidators: boolean; readonly asSkipExternalValidators: { @@ -1518,7 +1529,23 @@ declare module "@polkadot/types/lookup" { readonly type: "SkipExternalValidators" | "AddWhitelisted" | "RemoveWhitelisted" | "ForceEra"; } - /** @name PalletSessionCall (131) */ + /** @name PalletExternalValidatorSlashesCall (132) */ + interface PalletExternalValidatorSlashesCall extends Enum { + readonly isCancelDeferredSlash: boolean; + readonly asCancelDeferredSlash: { + readonly era: u32; + readonly slashIndices: Vec; + } & Struct; + readonly isForceInjectSlash: boolean; + readonly asForceInjectSlash: { + readonly era: u32; + readonly validator: AccountId32; + readonly percentage: Perbill; + } & Struct; + readonly type: "CancelDeferredSlash" | "ForceInjectSlash"; + } + + /** @name PalletSessionCall (134) */ interface PalletSessionCall extends Enum { readonly isSetKeys: boolean; readonly asSetKeys: { @@ -1529,7 +1556,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SetKeys" | "PurgeKeys"; } - /** @name DancelightRuntimeSessionKeys (132) */ + /** @name DancelightRuntimeSessionKeys (135) */ interface DancelightRuntimeSessionKeys extends Struct { readonly grandpa: SpConsensusGrandpaAppPublic; readonly babe: SpConsensusBabeAppPublic; @@ -1540,22 +1567,22 @@ declare module "@polkadot/types/lookup" { readonly nimbus: NimbusPrimitivesNimbusCryptoPublic; } - /** @name PolkadotPrimitivesV7ValidatorAppPublic (133) */ + /** @name PolkadotPrimitivesV7ValidatorAppPublic (136) */ interface PolkadotPrimitivesV7ValidatorAppPublic extends U8aFixed {} - /** @name PolkadotPrimitivesV7AssignmentAppPublic (134) */ + /** @name PolkadotPrimitivesV7AssignmentAppPublic (137) */ interface PolkadotPrimitivesV7AssignmentAppPublic extends U8aFixed {} - /** @name SpAuthorityDiscoveryAppPublic (135) */ + /** @name SpAuthorityDiscoveryAppPublic (138) */ interface SpAuthorityDiscoveryAppPublic extends U8aFixed {} - /** @name SpConsensusBeefyEcdsaCryptoPublic (136) */ + /** @name SpConsensusBeefyEcdsaCryptoPublic (139) */ interface SpConsensusBeefyEcdsaCryptoPublic extends U8aFixed {} - /** @name NimbusPrimitivesNimbusCryptoPublic (138) */ + /** @name NimbusPrimitivesNimbusCryptoPublic (141) */ interface NimbusPrimitivesNimbusCryptoPublic extends U8aFixed {} - /** @name PalletGrandpaCall (139) */ + /** @name PalletGrandpaCall (142) */ interface PalletGrandpaCall extends Enum { readonly isReportEquivocation: boolean; readonly asReportEquivocation: { @@ -1575,13 +1602,13 @@ declare module "@polkadot/types/lookup" { readonly type: "ReportEquivocation" | "ReportEquivocationUnsigned" | "NoteStalled"; } - /** @name SpConsensusGrandpaEquivocationProof (140) */ + /** @name SpConsensusGrandpaEquivocationProof (143) */ interface SpConsensusGrandpaEquivocationProof extends Struct { readonly setId: u64; readonly equivocation: SpConsensusGrandpaEquivocation; } - /** @name SpConsensusGrandpaEquivocation (141) */ + /** @name SpConsensusGrandpaEquivocation (144) */ interface SpConsensusGrandpaEquivocation extends Enum { readonly isPrevote: boolean; readonly asPrevote: FinalityGrandpaEquivocationPrevote; @@ -1590,7 +1617,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Prevote" | "Precommit"; } - /** @name FinalityGrandpaEquivocationPrevote (142) */ + /** @name FinalityGrandpaEquivocationPrevote (145) */ interface FinalityGrandpaEquivocationPrevote extends Struct { readonly roundNumber: u64; readonly identity: SpConsensusGrandpaAppPublic; @@ -1598,16 +1625,16 @@ declare module "@polkadot/types/lookup" { readonly second: ITuple<[FinalityGrandpaPrevote, SpConsensusGrandpaAppSignature]>; } - /** @name FinalityGrandpaPrevote (143) */ + /** @name FinalityGrandpaPrevote (146) */ interface FinalityGrandpaPrevote extends Struct { readonly targetHash: H256; readonly targetNumber: u32; } - /** @name SpConsensusGrandpaAppSignature (144) */ + /** @name SpConsensusGrandpaAppSignature (147) */ interface SpConsensusGrandpaAppSignature extends U8aFixed {} - /** @name FinalityGrandpaEquivocationPrecommit (146) */ + /** @name FinalityGrandpaEquivocationPrecommit (149) */ interface FinalityGrandpaEquivocationPrecommit extends Struct { readonly roundNumber: u64; readonly identity: SpConsensusGrandpaAppPublic; @@ -1615,13 +1642,13 @@ declare module "@polkadot/types/lookup" { readonly second: ITuple<[FinalityGrandpaPrecommit, SpConsensusGrandpaAppSignature]>; } - /** @name FinalityGrandpaPrecommit (147) */ + /** @name FinalityGrandpaPrecommit (150) */ interface FinalityGrandpaPrecommit extends Struct { readonly targetHash: H256; readonly targetNumber: u32; } - /** @name PalletTreasuryCall (149) */ + /** @name PalletTreasuryCall (152) */ interface PalletTreasuryCall extends Enum { readonly isSpendLocal: boolean; readonly asSpendLocal: { @@ -1654,7 +1681,7 @@ declare module "@polkadot/types/lookup" { readonly type: "SpendLocal" | "RemoveApproval" | "Spend" | "Payout" | "CheckStatus" | "VoidSpend"; } - /** @name PalletConvictionVotingCall (151) */ + /** @name PalletConvictionVotingCall (154) */ interface PalletConvictionVotingCall extends Enum { readonly isVote: boolean; readonly asVote: { @@ -1691,7 +1718,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Vote" | "Delegate" | "Undelegate" | "Unlock" | "RemoveVote" | "RemoveOtherVote"; } - /** @name PalletConvictionVotingVoteAccountVote (152) */ + /** @name PalletConvictionVotingVoteAccountVote (155) */ interface PalletConvictionVotingVoteAccountVote extends Enum { readonly isStandard: boolean; readonly asStandard: { @@ -1712,7 +1739,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Standard" | "Split" | "SplitAbstain"; } - /** @name PalletConvictionVotingConviction (154) */ + /** @name PalletConvictionVotingConviction (157) */ interface PalletConvictionVotingConviction extends Enum { readonly isNone: boolean; readonly isLocked1x: boolean; @@ -1724,7 +1751,7 @@ declare module "@polkadot/types/lookup" { readonly type: "None" | "Locked1x" | "Locked2x" | "Locked3x" | "Locked4x" | "Locked5x" | "Locked6x"; } - /** @name PalletReferendaCall (156) */ + /** @name PalletReferendaCall (159) */ interface PalletReferendaCall extends Enum { readonly isSubmit: boolean; readonly asSubmit: { @@ -1777,7 +1804,7 @@ declare module "@polkadot/types/lookup" { | "SetMetadata"; } - /** @name DancelightRuntimeOriginCaller (157) */ + /** @name DancelightRuntimeOriginCaller (160) */ interface DancelightRuntimeOriginCaller extends Enum { readonly isSystem: boolean; readonly asSystem: FrameSupportDispatchRawOrigin; @@ -1791,7 +1818,7 @@ declare module "@polkadot/types/lookup" { readonly type: "System" | "Void" | "Origins" | "ParachainsOrigin" | "XcmPallet"; } - /** @name FrameSupportDispatchRawOrigin (158) */ + /** @name FrameSupportDispatchRawOrigin (161) */ interface FrameSupportDispatchRawOrigin extends Enum { readonly isRoot: boolean; readonly isSigned: boolean; @@ -1800,7 +1827,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Root" | "Signed" | "None"; } - /** @name DancelightRuntimeGovernanceOriginsPalletCustomOriginsOrigin (159) */ + /** @name DancelightRuntimeGovernanceOriginsPalletCustomOriginsOrigin (162) */ interface DancelightRuntimeGovernanceOriginsPalletCustomOriginsOrigin extends Enum { readonly isStakingAdmin: boolean; readonly isTreasurer: boolean; @@ -1859,14 +1886,14 @@ declare module "@polkadot/types/lookup" { | "Fellowship9Dan"; } - /** @name PolkadotRuntimeParachainsOriginPalletOrigin (160) */ + /** @name PolkadotRuntimeParachainsOriginPalletOrigin (163) */ interface PolkadotRuntimeParachainsOriginPalletOrigin extends Enum { readonly isParachain: boolean; readonly asParachain: u32; readonly type: "Parachain"; } - /** @name PalletXcmOrigin (161) */ + /** @name PalletXcmOrigin (164) */ interface PalletXcmOrigin extends Enum { readonly isXcm: boolean; readonly asXcm: StagingXcmV4Location; @@ -1875,13 +1902,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Xcm" | "Response"; } - /** @name StagingXcmV4Location (162) */ + /** @name StagingXcmV4Location (165) */ interface StagingXcmV4Location extends Struct { readonly parents: u8; readonly interior: StagingXcmV4Junctions; } - /** @name StagingXcmV4Junctions (163) */ + /** @name StagingXcmV4Junctions (166) */ interface StagingXcmV4Junctions extends Enum { readonly isHere: boolean; readonly isX1: boolean; @@ -1903,7 +1930,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "X1" | "X2" | "X3" | "X4" | "X5" | "X6" | "X7" | "X8"; } - /** @name StagingXcmV4Junction (165) */ + /** @name StagingXcmV4Junction (168) */ interface StagingXcmV4Junction extends Enum { readonly isParachain: boolean; readonly asParachain: Compact; @@ -1952,7 +1979,7 @@ declare module "@polkadot/types/lookup" { | "GlobalConsensus"; } - /** @name StagingXcmV4JunctionNetworkId (167) */ + /** @name StagingXcmV4JunctionNetworkId (170) */ interface StagingXcmV4JunctionNetworkId extends Enum { readonly isByGenesis: boolean; readonly asByGenesis: U8aFixed; @@ -1987,7 +2014,7 @@ declare module "@polkadot/types/lookup" { | "PolkadotBulletin"; } - /** @name XcmV3JunctionBodyId (168) */ + /** @name XcmV3JunctionBodyId (171) */ interface XcmV3JunctionBodyId extends Enum { readonly isUnit: boolean; readonly isMoniker: boolean; @@ -2014,7 +2041,7 @@ declare module "@polkadot/types/lookup" { | "Treasury"; } - /** @name XcmV3JunctionBodyPart (169) */ + /** @name XcmV3JunctionBodyPart (172) */ interface XcmV3JunctionBodyPart extends Enum { readonly isVoice: boolean; readonly isMembers: boolean; @@ -2039,10 +2066,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Voice" | "Members" | "Fraction" | "AtLeastProportion" | "MoreThanProportion"; } - /** @name SpCoreVoid (177) */ + /** @name SpCoreVoid (180) */ type SpCoreVoid = Null; - /** @name FrameSupportScheduleDispatchTime (178) */ + /** @name FrameSupportScheduleDispatchTime (181) */ interface FrameSupportScheduleDispatchTime extends Enum { readonly isAt: boolean; readonly asAt: u32; @@ -2051,7 +2078,7 @@ declare module "@polkadot/types/lookup" { readonly type: "At" | "After"; } - /** @name PalletRankedCollectiveCall (180) */ + /** @name PalletRankedCollectiveCall (183) */ interface PalletRankedCollectiveCall extends Enum { readonly isAddMember: boolean; readonly asAddMember: { @@ -2095,7 +2122,7 @@ declare module "@polkadot/types/lookup" { | "ExchangeMember"; } - /** @name PalletWhitelistCall (182) */ + /** @name PalletWhitelistCall (185) */ interface PalletWhitelistCall extends Enum { readonly isWhitelistCall: boolean; readonly asWhitelistCall: { @@ -2122,7 +2149,7 @@ declare module "@polkadot/types/lookup" { | "DispatchWhitelistedCallWithPreimage"; } - /** @name PolkadotRuntimeParachainsConfigurationPalletCall (183) */ + /** @name PolkadotRuntimeParachainsConfigurationPalletCall (186) */ interface PolkadotRuntimeParachainsConfigurationPalletCall extends Enum { readonly isSetValidationUpgradeCooldown: boolean; readonly asSetValidationUpgradeCooldown: { @@ -2368,16 +2395,16 @@ declare module "@polkadot/types/lookup" { | "SetSchedulerParams"; } - /** @name PolkadotPrimitivesV7AsyncBackingAsyncBackingParams (184) */ + /** @name PolkadotPrimitivesV7AsyncBackingAsyncBackingParams (187) */ interface PolkadotPrimitivesV7AsyncBackingAsyncBackingParams extends Struct { readonly maxCandidateDepth: u32; readonly allowedAncestryLen: u32; } - /** @name PolkadotPrimitivesV7ExecutorParams (185) */ + /** @name PolkadotPrimitivesV7ExecutorParams (188) */ interface PolkadotPrimitivesV7ExecutorParams extends Vec {} - /** @name PolkadotPrimitivesV7ExecutorParamsExecutorParam (187) */ + /** @name PolkadotPrimitivesV7ExecutorParamsExecutorParam (190) */ interface PolkadotPrimitivesV7ExecutorParamsExecutorParam extends Enum { readonly isMaxMemoryPages: boolean; readonly asMaxMemoryPages: u32; @@ -2402,26 +2429,26 @@ declare module "@polkadot/types/lookup" { | "WasmExtBulkMemory"; } - /** @name PolkadotPrimitivesV7PvfPrepKind (188) */ + /** @name PolkadotPrimitivesV7PvfPrepKind (191) */ interface PolkadotPrimitivesV7PvfPrepKind extends Enum { readonly isPrecheck: boolean; readonly isPrepare: boolean; readonly type: "Precheck" | "Prepare"; } - /** @name PolkadotPrimitivesV7PvfExecKind (189) */ + /** @name PolkadotPrimitivesV7PvfExecKind (192) */ interface PolkadotPrimitivesV7PvfExecKind extends Enum { readonly isBacking: boolean; readonly isApproval: boolean; readonly type: "Backing" | "Approval"; } - /** @name PolkadotPrimitivesV7ApprovalVotingParams (190) */ + /** @name PolkadotPrimitivesV7ApprovalVotingParams (193) */ interface PolkadotPrimitivesV7ApprovalVotingParams extends Struct { readonly maxApprovalCoalesceCount: u32; } - /** @name PolkadotPrimitivesVstagingSchedulerParams (191) */ + /** @name PolkadotPrimitivesVstagingSchedulerParams (194) */ interface PolkadotPrimitivesVstagingSchedulerParams extends Struct { readonly groupRotationFrequency: u32; readonly parasAvailabilityPeriod: u32; @@ -2436,13 +2463,13 @@ declare module "@polkadot/types/lookup" { readonly ttl: u32; } - /** @name PolkadotRuntimeParachainsSharedPalletCall (192) */ + /** @name PolkadotRuntimeParachainsSharedPalletCall (195) */ type PolkadotRuntimeParachainsSharedPalletCall = Null; - /** @name PolkadotRuntimeParachainsInclusionPalletCall (193) */ + /** @name PolkadotRuntimeParachainsInclusionPalletCall (196) */ type PolkadotRuntimeParachainsInclusionPalletCall = Null; - /** @name PolkadotRuntimeParachainsParasInherentPalletCall (194) */ + /** @name PolkadotRuntimeParachainsParasInherentPalletCall (197) */ interface PolkadotRuntimeParachainsParasInherentPalletCall extends Enum { readonly isEnter: boolean; readonly asEnter: { @@ -2451,7 +2478,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Enter"; } - /** @name PolkadotPrimitivesV7InherentData (195) */ + /** @name PolkadotPrimitivesV7InherentData (198) */ interface PolkadotPrimitivesV7InherentData extends Struct { readonly bitfields: Vec; readonly backedCandidates: Vec; @@ -2459,33 +2486,33 @@ declare module "@polkadot/types/lookup" { readonly parentHeader: SpRuntimeHeader; } - /** @name PolkadotPrimitivesV7SignedUncheckedSigned (197) */ + /** @name PolkadotPrimitivesV7SignedUncheckedSigned (200) */ interface PolkadotPrimitivesV7SignedUncheckedSigned extends Struct { readonly payload: BitVec; readonly validatorIndex: u32; readonly signature: PolkadotPrimitivesV7ValidatorAppSignature; } - /** @name BitvecOrderLsb0 (200) */ + /** @name BitvecOrderLsb0 (203) */ type BitvecOrderLsb0 = Null; - /** @name PolkadotPrimitivesV7ValidatorAppSignature (202) */ + /** @name PolkadotPrimitivesV7ValidatorAppSignature (205) */ interface PolkadotPrimitivesV7ValidatorAppSignature extends U8aFixed {} - /** @name PolkadotPrimitivesV7BackedCandidate (204) */ + /** @name PolkadotPrimitivesV7BackedCandidate (207) */ interface PolkadotPrimitivesV7BackedCandidate extends Struct { readonly candidate: PolkadotPrimitivesV7CommittedCandidateReceipt; readonly validityVotes: Vec; readonly validatorIndices: BitVec; } - /** @name PolkadotPrimitivesV7CommittedCandidateReceipt (205) */ + /** @name PolkadotPrimitivesV7CommittedCandidateReceipt (208) */ interface PolkadotPrimitivesV7CommittedCandidateReceipt extends Struct { readonly descriptor: PolkadotPrimitivesV7CandidateDescriptor; readonly commitments: PolkadotPrimitivesV7CandidateCommitments; } - /** @name PolkadotPrimitivesV7CandidateDescriptor (206) */ + /** @name PolkadotPrimitivesV7CandidateDescriptor (209) */ interface PolkadotPrimitivesV7CandidateDescriptor extends Struct { readonly paraId: u32; readonly relayParent: H256; @@ -2498,13 +2525,13 @@ declare module "@polkadot/types/lookup" { readonly validationCodeHash: H256; } - /** @name PolkadotPrimitivesV7CollatorAppPublic (207) */ + /** @name PolkadotPrimitivesV7CollatorAppPublic (210) */ interface PolkadotPrimitivesV7CollatorAppPublic extends U8aFixed {} - /** @name PolkadotPrimitivesV7CollatorAppSignature (208) */ + /** @name PolkadotPrimitivesV7CollatorAppSignature (211) */ interface PolkadotPrimitivesV7CollatorAppSignature extends U8aFixed {} - /** @name PolkadotPrimitivesV7CandidateCommitments (210) */ + /** @name PolkadotPrimitivesV7CandidateCommitments (213) */ interface PolkadotPrimitivesV7CandidateCommitments extends Struct { readonly upwardMessages: Vec; readonly horizontalMessages: Vec; @@ -2514,13 +2541,13 @@ declare module "@polkadot/types/lookup" { readonly hrmpWatermark: u32; } - /** @name PolkadotCorePrimitivesOutboundHrmpMessage (213) */ + /** @name PolkadotCorePrimitivesOutboundHrmpMessage (216) */ interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct { readonly recipient: u32; readonly data: Bytes; } - /** @name PolkadotPrimitivesV7ValidityAttestation (218) */ + /** @name PolkadotPrimitivesV7ValidityAttestation (221) */ interface PolkadotPrimitivesV7ValidityAttestation extends Enum { readonly isImplicit: boolean; readonly asImplicit: PolkadotPrimitivesV7ValidatorAppSignature; @@ -2529,7 +2556,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Implicit" | "Explicit"; } - /** @name PolkadotPrimitivesV7DisputeStatementSet (220) */ + /** @name PolkadotPrimitivesV7DisputeStatementSet (223) */ interface PolkadotPrimitivesV7DisputeStatementSet extends Struct { readonly candidateHash: H256; readonly session: u32; @@ -2538,7 +2565,7 @@ declare module "@polkadot/types/lookup" { >; } - /** @name PolkadotPrimitivesV7DisputeStatement (224) */ + /** @name PolkadotPrimitivesV7DisputeStatement (227) */ interface PolkadotPrimitivesV7DisputeStatement extends Enum { readonly isValid: boolean; readonly asValid: PolkadotPrimitivesV7ValidDisputeStatementKind; @@ -2547,7 +2574,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Valid" | "Invalid"; } - /** @name PolkadotPrimitivesV7ValidDisputeStatementKind (225) */ + /** @name PolkadotPrimitivesV7ValidDisputeStatementKind (228) */ interface PolkadotPrimitivesV7ValidDisputeStatementKind extends Enum { readonly isExplicit: boolean; readonly isBackingSeconded: boolean; @@ -2565,13 +2592,13 @@ declare module "@polkadot/types/lookup" { | "ApprovalCheckingMultipleCandidates"; } - /** @name PolkadotPrimitivesV7InvalidDisputeStatementKind (227) */ + /** @name PolkadotPrimitivesV7InvalidDisputeStatementKind (230) */ interface PolkadotPrimitivesV7InvalidDisputeStatementKind extends Enum { readonly isExplicit: boolean; readonly type: "Explicit"; } - /** @name PolkadotRuntimeParachainsParasPalletCall (228) */ + /** @name PolkadotRuntimeParachainsParasPalletCall (231) */ interface PolkadotRuntimeParachainsParasPalletCall extends Enum { readonly isForceSetCurrentCode: boolean; readonly asForceSetCurrentCode: { @@ -2628,7 +2655,7 @@ declare module "@polkadot/types/lookup" { | "ForceSetMostRecentContext"; } - /** @name PolkadotPrimitivesV7PvfCheckStatement (229) */ + /** @name PolkadotPrimitivesV7PvfCheckStatement (232) */ interface PolkadotPrimitivesV7PvfCheckStatement extends Struct { readonly accept: bool; readonly subject: H256; @@ -2636,7 +2663,7 @@ declare module "@polkadot/types/lookup" { readonly validatorIndex: u32; } - /** @name PolkadotRuntimeParachainsInitializerPalletCall (230) */ + /** @name PolkadotRuntimeParachainsInitializerPalletCall (233) */ interface PolkadotRuntimeParachainsInitializerPalletCall extends Enum { readonly isForceApprove: boolean; readonly asForceApprove: { @@ -2645,7 +2672,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ForceApprove"; } - /** @name PolkadotRuntimeParachainsHrmpPalletCall (231) */ + /** @name PolkadotRuntimeParachainsHrmpPalletCall (234) */ interface PolkadotRuntimeParachainsHrmpPalletCall extends Enum { readonly isHrmpInitOpenChannel: boolean; readonly asHrmpInitOpenChannel: { @@ -2715,19 +2742,19 @@ declare module "@polkadot/types/lookup" { | "EstablishChannelWithSystem"; } - /** @name PolkadotParachainPrimitivesPrimitivesHrmpChannelId (232) */ + /** @name PolkadotParachainPrimitivesPrimitivesHrmpChannelId (235) */ interface PolkadotParachainPrimitivesPrimitivesHrmpChannelId extends Struct { readonly sender: u32; readonly recipient: u32; } - /** @name PolkadotRuntimeParachainsDisputesPalletCall (233) */ + /** @name PolkadotRuntimeParachainsDisputesPalletCall (236) */ interface PolkadotRuntimeParachainsDisputesPalletCall extends Enum { readonly isForceUnfreeze: boolean; readonly type: "ForceUnfreeze"; } - /** @name PolkadotRuntimeParachainsDisputesSlashingPalletCall (234) */ + /** @name PolkadotRuntimeParachainsDisputesSlashingPalletCall (237) */ interface PolkadotRuntimeParachainsDisputesSlashingPalletCall extends Enum { readonly isReportDisputeLostUnsigned: boolean; readonly asReportDisputeLostUnsigned: { @@ -2737,7 +2764,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ReportDisputeLostUnsigned"; } - /** @name PolkadotPrimitivesV7SlashingDisputeProof (235) */ + /** @name PolkadotPrimitivesV7SlashingDisputeProof (238) */ interface PolkadotPrimitivesV7SlashingDisputeProof extends Struct { readonly timeSlot: PolkadotPrimitivesV7SlashingDisputesTimeSlot; readonly kind: PolkadotPrimitivesV7SlashingSlashingOffenceKind; @@ -2745,20 +2772,20 @@ declare module "@polkadot/types/lookup" { readonly validatorId: PolkadotPrimitivesV7ValidatorAppPublic; } - /** @name PolkadotPrimitivesV7SlashingDisputesTimeSlot (236) */ + /** @name PolkadotPrimitivesV7SlashingDisputesTimeSlot (239) */ interface PolkadotPrimitivesV7SlashingDisputesTimeSlot extends Struct { readonly sessionIndex: u32; readonly candidateHash: H256; } - /** @name PolkadotPrimitivesV7SlashingSlashingOffenceKind (237) */ + /** @name PolkadotPrimitivesV7SlashingSlashingOffenceKind (240) */ interface PolkadotPrimitivesV7SlashingSlashingOffenceKind extends Enum { readonly isForInvalid: boolean; readonly isAgainstValid: boolean; readonly type: "ForInvalid" | "AgainstValid"; } - /** @name PalletMessageQueueCall (238) */ + /** @name PalletMessageQueueCall (241) */ interface PalletMessageQueueCall extends Enum { readonly isReapPage: boolean; readonly asReapPage: { @@ -2775,21 +2802,21 @@ declare module "@polkadot/types/lookup" { readonly type: "ReapPage" | "ExecuteOverweight"; } - /** @name PolkadotRuntimeParachainsInclusionAggregateMessageOrigin (239) */ + /** @name PolkadotRuntimeParachainsInclusionAggregateMessageOrigin (242) */ interface PolkadotRuntimeParachainsInclusionAggregateMessageOrigin extends Enum { readonly isUmp: boolean; readonly asUmp: PolkadotRuntimeParachainsInclusionUmpQueueId; readonly type: "Ump"; } - /** @name PolkadotRuntimeParachainsInclusionUmpQueueId (240) */ + /** @name PolkadotRuntimeParachainsInclusionUmpQueueId (243) */ interface PolkadotRuntimeParachainsInclusionUmpQueueId extends Enum { readonly isPara: boolean; readonly asPara: u32; readonly type: "Para"; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletCall (241) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletCall (244) */ interface PolkadotRuntimeParachainsAssignerOnDemandPalletCall extends Enum { readonly isPlaceOrderAllowDeath: boolean; readonly asPlaceOrderAllowDeath: { @@ -2804,7 +2831,7 @@ declare module "@polkadot/types/lookup" { readonly type: "PlaceOrderAllowDeath" | "PlaceOrderKeepAlive"; } - /** @name PolkadotRuntimeCommonParasRegistrarPalletCall (242) */ + /** @name PolkadotRuntimeCommonParasRegistrarPalletCall (245) */ interface PolkadotRuntimeCommonParasRegistrarPalletCall extends Enum { readonly isRegister: boolean; readonly asRegister: { @@ -2860,7 +2887,7 @@ declare module "@polkadot/types/lookup" { | "SetCurrentHead"; } - /** @name PalletUtilityCall (243) */ + /** @name PalletUtilityCall (246) */ interface PalletUtilityCall extends Enum { readonly isBatch: boolean; readonly asBatch: { @@ -2892,7 +2919,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Batch" | "AsDerivative" | "BatchAll" | "DispatchAs" | "ForceBatch" | "WithWeight"; } - /** @name PalletIdentityCall (245) */ + /** @name PalletIdentityCall (248) */ interface PalletIdentityCall extends Enum { readonly isAddRegistrar: boolean; readonly asAddRegistrar: { @@ -3014,7 +3041,7 @@ declare module "@polkadot/types/lookup" { | "RemoveDanglingUsername"; } - /** @name PalletIdentityLegacyIdentityInfo (246) */ + /** @name PalletIdentityLegacyIdentityInfo (249) */ interface PalletIdentityLegacyIdentityInfo extends Struct { readonly additional: Vec>; readonly display: Data; @@ -3027,7 +3054,7 @@ declare module "@polkadot/types/lookup" { readonly twitter: Data; } - /** @name PalletIdentityJudgement (283) */ + /** @name PalletIdentityJudgement (286) */ interface PalletIdentityJudgement extends Enum { readonly isUnknown: boolean; readonly isFeePaid: boolean; @@ -3040,7 +3067,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unknown" | "FeePaid" | "Reasonable" | "KnownGood" | "OutOfDate" | "LowQuality" | "Erroneous"; } - /** @name PalletSchedulerCall (286) */ + /** @name PalletSchedulerCall (289) */ interface PalletSchedulerCall extends Enum { readonly isSchedule: boolean; readonly asSchedule: { @@ -3114,7 +3141,7 @@ declare module "@polkadot/types/lookup" { | "CancelRetryNamed"; } - /** @name PalletProxyCall (289) */ + /** @name PalletProxyCall (292) */ interface PalletProxyCall extends Enum { readonly isProxy: boolean; readonly asProxy: { @@ -3184,7 +3211,7 @@ declare module "@polkadot/types/lookup" { | "ProxyAnnounced"; } - /** @name DancelightRuntimeProxyType (291) */ + /** @name DancelightRuntimeProxyType (294) */ interface DancelightRuntimeProxyType extends Enum { readonly isAny: boolean; readonly isNonTransfer: boolean; @@ -3205,7 +3232,7 @@ declare module "@polkadot/types/lookup" { | "SudoRegistrar"; } - /** @name PalletMultisigCall (292) */ + /** @name PalletMultisigCall (295) */ interface PalletMultisigCall extends Enum { readonly isAsMultiThreshold1: boolean; readonly asAsMultiThreshold1: { @@ -3238,13 +3265,13 @@ declare module "@polkadot/types/lookup" { readonly type: "AsMultiThreshold1" | "AsMulti" | "ApproveAsMulti" | "CancelAsMulti"; } - /** @name PalletMultisigTimepoint (294) */ + /** @name PalletMultisigTimepoint (297) */ interface PalletMultisigTimepoint extends Struct { readonly height: u32; readonly index: u32; } - /** @name PalletPreimageCall (295) */ + /** @name PalletPreimageCall (298) */ interface PalletPreimageCall extends Enum { readonly isNotePreimage: boolean; readonly asNotePreimage: { @@ -3269,7 +3296,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NotePreimage" | "UnnotePreimage" | "RequestPreimage" | "UnrequestPreimage" | "EnsureUpdated"; } - /** @name PalletAssetRateCall (297) */ + /** @name PalletAssetRateCall (300) */ interface PalletAssetRateCall extends Enum { readonly isCreate: boolean; readonly asCreate: { @@ -3288,7 +3315,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Create" | "Update" | "Remove"; } - /** @name PalletXcmCall (299) */ + /** @name PalletXcmCall (302) */ interface PalletXcmCall extends Enum { readonly isSend: boolean; readonly asSend: { @@ -3391,7 +3418,7 @@ declare module "@polkadot/types/lookup" { | "TransferAssetsUsingTypeAndThen"; } - /** @name XcmVersionedLocation (300) */ + /** @name XcmVersionedLocation (303) */ interface XcmVersionedLocation extends Enum { readonly isV2: boolean; readonly asV2: XcmV2MultiLocation; @@ -3402,13 +3429,13 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name XcmV2MultiLocation (301) */ + /** @name XcmV2MultiLocation (304) */ interface XcmV2MultiLocation extends Struct { readonly parents: u8; readonly interior: XcmV2MultilocationJunctions; } - /** @name XcmV2MultilocationJunctions (302) */ + /** @name XcmV2MultilocationJunctions (305) */ interface XcmV2MultilocationJunctions extends Enum { readonly isHere: boolean; readonly isX1: boolean; @@ -3445,7 +3472,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "X1" | "X2" | "X3" | "X4" | "X5" | "X6" | "X7" | "X8"; } - /** @name XcmV2Junction (303) */ + /** @name XcmV2Junction (306) */ interface XcmV2Junction extends Enum { readonly isParachain: boolean; readonly asParachain: Compact; @@ -3488,7 +3515,7 @@ declare module "@polkadot/types/lookup" { | "Plurality"; } - /** @name XcmV2NetworkId (304) */ + /** @name XcmV2NetworkId (307) */ interface XcmV2NetworkId extends Enum { readonly isAny: boolean; readonly isNamed: boolean; @@ -3498,7 +3525,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Any" | "Named" | "Polkadot" | "Kusama"; } - /** @name XcmV2BodyId (306) */ + /** @name XcmV2BodyId (309) */ interface XcmV2BodyId extends Enum { readonly isUnit: boolean; readonly isNamed: boolean; @@ -3525,7 +3552,7 @@ declare module "@polkadot/types/lookup" { | "Treasury"; } - /** @name XcmV2BodyPart (307) */ + /** @name XcmV2BodyPart (310) */ interface XcmV2BodyPart extends Enum { readonly isVoice: boolean; readonly isMembers: boolean; @@ -3550,13 +3577,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Voice" | "Members" | "Fraction" | "AtLeastProportion" | "MoreThanProportion"; } - /** @name StagingXcmV3MultiLocation (308) */ + /** @name StagingXcmV3MultiLocation (311) */ interface StagingXcmV3MultiLocation extends Struct { readonly parents: u8; readonly interior: XcmV3Junctions; } - /** @name XcmV3Junctions (309) */ + /** @name XcmV3Junctions (312) */ interface XcmV3Junctions extends Enum { readonly isHere: boolean; readonly isX1: boolean; @@ -3593,7 +3620,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Here" | "X1" | "X2" | "X3" | "X4" | "X5" | "X6" | "X7" | "X8"; } - /** @name XcmV3Junction (310) */ + /** @name XcmV3Junction (313) */ interface XcmV3Junction extends Enum { readonly isParachain: boolean; readonly asParachain: Compact; @@ -3642,7 +3669,7 @@ declare module "@polkadot/types/lookup" { | "GlobalConsensus"; } - /** @name XcmV3JunctionNetworkId (312) */ + /** @name XcmV3JunctionNetworkId (315) */ interface XcmV3JunctionNetworkId extends Enum { readonly isByGenesis: boolean; readonly asByGenesis: U8aFixed; @@ -3677,7 +3704,7 @@ declare module "@polkadot/types/lookup" { | "PolkadotBulletin"; } - /** @name XcmVersionedXcm (313) */ + /** @name XcmVersionedXcm (316) */ interface XcmVersionedXcm extends Enum { readonly isV2: boolean; readonly asV2: XcmV2Xcm; @@ -3688,10 +3715,10 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name XcmV2Xcm (314) */ + /** @name XcmV2Xcm (317) */ interface XcmV2Xcm extends Vec {} - /** @name XcmV2Instruction (316) */ + /** @name XcmV2Instruction (319) */ interface XcmV2Instruction extends Enum { readonly isWithdrawAsset: boolean; readonly asWithdrawAsset: XcmV2MultiassetMultiAssets; @@ -3839,16 +3866,16 @@ declare module "@polkadot/types/lookup" { | "UnsubscribeVersion"; } - /** @name XcmV2MultiassetMultiAssets (317) */ + /** @name XcmV2MultiassetMultiAssets (320) */ interface XcmV2MultiassetMultiAssets extends Vec {} - /** @name XcmV2MultiAsset (319) */ + /** @name XcmV2MultiAsset (322) */ interface XcmV2MultiAsset extends Struct { readonly id: XcmV2MultiassetAssetId; readonly fun: XcmV2MultiassetFungibility; } - /** @name XcmV2MultiassetAssetId (320) */ + /** @name XcmV2MultiassetAssetId (323) */ interface XcmV2MultiassetAssetId extends Enum { readonly isConcrete: boolean; readonly asConcrete: XcmV2MultiLocation; @@ -3857,7 +3884,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Concrete" | "Abstract"; } - /** @name XcmV2MultiassetFungibility (321) */ + /** @name XcmV2MultiassetFungibility (324) */ interface XcmV2MultiassetFungibility extends Enum { readonly isFungible: boolean; readonly asFungible: Compact; @@ -3866,7 +3893,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV2MultiassetAssetInstance (322) */ + /** @name XcmV2MultiassetAssetInstance (325) */ interface XcmV2MultiassetAssetInstance extends Enum { readonly isUndefined: boolean; readonly isIndex: boolean; @@ -3884,7 +3911,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Undefined" | "Index" | "Array4" | "Array8" | "Array16" | "Array32" | "Blob"; } - /** @name XcmV2Response (323) */ + /** @name XcmV2Response (326) */ interface XcmV2Response extends Enum { readonly isNull: boolean; readonly isAssets: boolean; @@ -3896,7 +3923,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Null" | "Assets" | "ExecutionResult" | "Version"; } - /** @name XcmV2TraitsError (326) */ + /** @name XcmV2TraitsError (329) */ interface XcmV2TraitsError extends Enum { readonly isOverflow: boolean; readonly isUnimplemented: boolean; @@ -3955,7 +3982,7 @@ declare module "@polkadot/types/lookup" { | "WeightNotComputable"; } - /** @name XcmV2OriginKind (327) */ + /** @name XcmV2OriginKind (330) */ interface XcmV2OriginKind extends Enum { readonly isNative: boolean; readonly isSovereignAccount: boolean; @@ -3964,12 +3991,12 @@ declare module "@polkadot/types/lookup" { readonly type: "Native" | "SovereignAccount" | "Superuser" | "Xcm"; } - /** @name XcmDoubleEncoded (328) */ + /** @name XcmDoubleEncoded (331) */ interface XcmDoubleEncoded extends Struct { readonly encoded: Bytes; } - /** @name XcmV2MultiassetMultiAssetFilter (329) */ + /** @name XcmV2MultiassetMultiAssetFilter (332) */ interface XcmV2MultiassetMultiAssetFilter extends Enum { readonly isDefinite: boolean; readonly asDefinite: XcmV2MultiassetMultiAssets; @@ -3978,7 +4005,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Definite" | "Wild"; } - /** @name XcmV2MultiassetWildMultiAsset (330) */ + /** @name XcmV2MultiassetWildMultiAsset (333) */ interface XcmV2MultiassetWildMultiAsset extends Enum { readonly isAll: boolean; readonly isAllOf: boolean; @@ -3989,14 +4016,14 @@ declare module "@polkadot/types/lookup" { readonly type: "All" | "AllOf"; } - /** @name XcmV2MultiassetWildFungibility (331) */ + /** @name XcmV2MultiassetWildFungibility (334) */ interface XcmV2MultiassetWildFungibility extends Enum { readonly isFungible: boolean; readonly isNonFungible: boolean; readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV2WeightLimit (332) */ + /** @name XcmV2WeightLimit (335) */ interface XcmV2WeightLimit extends Enum { readonly isUnlimited: boolean; readonly isLimited: boolean; @@ -4004,10 +4031,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Unlimited" | "Limited"; } - /** @name XcmV3Xcm (333) */ + /** @name XcmV3Xcm (336) */ interface XcmV3Xcm extends Vec {} - /** @name XcmV3Instruction (335) */ + /** @name XcmV3Instruction (338) */ interface XcmV3Instruction extends Enum { readonly isWithdrawAsset: boolean; readonly asWithdrawAsset: XcmV3MultiassetMultiAssets; @@ -4237,16 +4264,16 @@ declare module "@polkadot/types/lookup" { | "UnpaidExecution"; } - /** @name XcmV3MultiassetMultiAssets (336) */ + /** @name XcmV3MultiassetMultiAssets (339) */ interface XcmV3MultiassetMultiAssets extends Vec {} - /** @name XcmV3MultiAsset (338) */ + /** @name XcmV3MultiAsset (341) */ interface XcmV3MultiAsset extends Struct { readonly id: XcmV3MultiassetAssetId; readonly fun: XcmV3MultiassetFungibility; } - /** @name XcmV3MultiassetAssetId (339) */ + /** @name XcmV3MultiassetAssetId (342) */ interface XcmV3MultiassetAssetId extends Enum { readonly isConcrete: boolean; readonly asConcrete: StagingXcmV3MultiLocation; @@ -4255,7 +4282,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Concrete" | "Abstract"; } - /** @name XcmV3MultiassetFungibility (340) */ + /** @name XcmV3MultiassetFungibility (343) */ interface XcmV3MultiassetFungibility extends Enum { readonly isFungible: boolean; readonly asFungible: Compact; @@ -4264,7 +4291,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV3MultiassetAssetInstance (341) */ + /** @name XcmV3MultiassetAssetInstance (344) */ interface XcmV3MultiassetAssetInstance extends Enum { readonly isUndefined: boolean; readonly isIndex: boolean; @@ -4280,7 +4307,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Undefined" | "Index" | "Array4" | "Array8" | "Array16" | "Array32"; } - /** @name XcmV3Response (342) */ + /** @name XcmV3Response (345) */ interface XcmV3Response extends Enum { readonly isNull: boolean; readonly isAssets: boolean; @@ -4296,7 +4323,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Null" | "Assets" | "ExecutionResult" | "Version" | "PalletsInfo" | "DispatchResult"; } - /** @name XcmV3TraitsError (345) */ + /** @name XcmV3TraitsError (348) */ interface XcmV3TraitsError extends Enum { readonly isOverflow: boolean; readonly isUnimplemented: boolean; @@ -4383,7 +4410,7 @@ declare module "@polkadot/types/lookup" { | "ExceedsStackLimit"; } - /** @name XcmV3PalletInfo (347) */ + /** @name XcmV3PalletInfo (350) */ interface XcmV3PalletInfo extends Struct { readonly index: Compact; readonly name: Bytes; @@ -4393,7 +4420,7 @@ declare module "@polkadot/types/lookup" { readonly patch: Compact; } - /** @name XcmV3MaybeErrorCode (350) */ + /** @name XcmV3MaybeErrorCode (353) */ interface XcmV3MaybeErrorCode extends Enum { readonly isSuccess: boolean; readonly isError: boolean; @@ -4403,7 +4430,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Success" | "Error" | "TruncatedError"; } - /** @name XcmV3OriginKind (353) */ + /** @name XcmV3OriginKind (356) */ interface XcmV3OriginKind extends Enum { readonly isNative: boolean; readonly isSovereignAccount: boolean; @@ -4412,14 +4439,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Native" | "SovereignAccount" | "Superuser" | "Xcm"; } - /** @name XcmV3QueryResponseInfo (354) */ + /** @name XcmV3QueryResponseInfo (357) */ interface XcmV3QueryResponseInfo extends Struct { readonly destination: StagingXcmV3MultiLocation; readonly queryId: Compact; readonly maxWeight: SpWeightsWeightV2Weight; } - /** @name XcmV3MultiassetMultiAssetFilter (355) */ + /** @name XcmV3MultiassetMultiAssetFilter (358) */ interface XcmV3MultiassetMultiAssetFilter extends Enum { readonly isDefinite: boolean; readonly asDefinite: XcmV3MultiassetMultiAssets; @@ -4428,7 +4455,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Definite" | "Wild"; } - /** @name XcmV3MultiassetWildMultiAsset (356) */ + /** @name XcmV3MultiassetWildMultiAsset (359) */ interface XcmV3MultiassetWildMultiAsset extends Enum { readonly isAll: boolean; readonly isAllOf: boolean; @@ -4447,14 +4474,14 @@ declare module "@polkadot/types/lookup" { readonly type: "All" | "AllOf" | "AllCounted" | "AllOfCounted"; } - /** @name XcmV3MultiassetWildFungibility (357) */ + /** @name XcmV3MultiassetWildFungibility (360) */ interface XcmV3MultiassetWildFungibility extends Enum { readonly isFungible: boolean; readonly isNonFungible: boolean; readonly type: "Fungible" | "NonFungible"; } - /** @name XcmV3WeightLimit (358) */ + /** @name XcmV3WeightLimit (361) */ interface XcmV3WeightLimit extends Enum { readonly isUnlimited: boolean; readonly isLimited: boolean; @@ -4462,10 +4489,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Unlimited" | "Limited"; } - /** @name StagingXcmV4Xcm (359) */ + /** @name StagingXcmV4Xcm (362) */ interface StagingXcmV4Xcm extends Vec {} - /** @name StagingXcmV4Instruction (361) */ + /** @name StagingXcmV4Instruction (364) */ interface StagingXcmV4Instruction extends Enum { readonly isWithdrawAsset: boolean; readonly asWithdrawAsset: StagingXcmV4AssetAssets; @@ -4695,19 +4722,19 @@ declare module "@polkadot/types/lookup" { | "UnpaidExecution"; } - /** @name StagingXcmV4AssetAssets (362) */ + /** @name StagingXcmV4AssetAssets (365) */ interface StagingXcmV4AssetAssets extends Vec {} - /** @name StagingXcmV4Asset (364) */ + /** @name StagingXcmV4Asset (367) */ interface StagingXcmV4Asset extends Struct { readonly id: StagingXcmV4AssetAssetId; readonly fun: StagingXcmV4AssetFungibility; } - /** @name StagingXcmV4AssetAssetId (365) */ + /** @name StagingXcmV4AssetAssetId (368) */ interface StagingXcmV4AssetAssetId extends StagingXcmV4Location {} - /** @name StagingXcmV4AssetFungibility (366) */ + /** @name StagingXcmV4AssetFungibility (369) */ interface StagingXcmV4AssetFungibility extends Enum { readonly isFungible: boolean; readonly asFungible: Compact; @@ -4716,7 +4743,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Fungible" | "NonFungible"; } - /** @name StagingXcmV4AssetAssetInstance (367) */ + /** @name StagingXcmV4AssetAssetInstance (370) */ interface StagingXcmV4AssetAssetInstance extends Enum { readonly isUndefined: boolean; readonly isIndex: boolean; @@ -4732,7 +4759,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Undefined" | "Index" | "Array4" | "Array8" | "Array16" | "Array32"; } - /** @name StagingXcmV4Response (368) */ + /** @name StagingXcmV4Response (371) */ interface StagingXcmV4Response extends Enum { readonly isNull: boolean; readonly isAssets: boolean; @@ -4748,7 +4775,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Null" | "Assets" | "ExecutionResult" | "Version" | "PalletsInfo" | "DispatchResult"; } - /** @name StagingXcmV4PalletInfo (370) */ + /** @name StagingXcmV4PalletInfo (373) */ interface StagingXcmV4PalletInfo extends Struct { readonly index: Compact; readonly name: Bytes; @@ -4758,14 +4785,14 @@ declare module "@polkadot/types/lookup" { readonly patch: Compact; } - /** @name StagingXcmV4QueryResponseInfo (374) */ + /** @name StagingXcmV4QueryResponseInfo (377) */ interface StagingXcmV4QueryResponseInfo extends Struct { readonly destination: StagingXcmV4Location; readonly queryId: Compact; readonly maxWeight: SpWeightsWeightV2Weight; } - /** @name StagingXcmV4AssetAssetFilter (375) */ + /** @name StagingXcmV4AssetAssetFilter (378) */ interface StagingXcmV4AssetAssetFilter extends Enum { readonly isDefinite: boolean; readonly asDefinite: StagingXcmV4AssetAssets; @@ -4774,7 +4801,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Definite" | "Wild"; } - /** @name StagingXcmV4AssetWildAsset (376) */ + /** @name StagingXcmV4AssetWildAsset (379) */ interface StagingXcmV4AssetWildAsset extends Enum { readonly isAll: boolean; readonly isAllOf: boolean; @@ -4793,14 +4820,14 @@ declare module "@polkadot/types/lookup" { readonly type: "All" | "AllOf" | "AllCounted" | "AllOfCounted"; } - /** @name StagingXcmV4AssetWildFungibility (377) */ + /** @name StagingXcmV4AssetWildFungibility (380) */ interface StagingXcmV4AssetWildFungibility extends Enum { readonly isFungible: boolean; readonly isNonFungible: boolean; readonly type: "Fungible" | "NonFungible"; } - /** @name XcmVersionedAssets (378) */ + /** @name XcmVersionedAssets (381) */ interface XcmVersionedAssets extends Enum { readonly isV2: boolean; readonly asV2: XcmV2MultiassetMultiAssets; @@ -4811,7 +4838,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name StagingXcmExecutorAssetTransferTransferType (390) */ + /** @name StagingXcmExecutorAssetTransferTransferType (393) */ interface StagingXcmExecutorAssetTransferTransferType extends Enum { readonly isTeleport: boolean; readonly isLocalReserve: boolean; @@ -4821,7 +4848,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Teleport" | "LocalReserve" | "DestinationReserve" | "RemoteReserve"; } - /** @name XcmVersionedAssetId (391) */ + /** @name XcmVersionedAssetId (394) */ interface XcmVersionedAssetId extends Enum { readonly isV3: boolean; readonly asV3: XcmV3MultiassetAssetId; @@ -4830,7 +4857,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V3" | "V4"; } - /** @name PalletMigrationsCall (392) */ + /** @name PalletMigrationsCall (395) */ interface PalletMigrationsCall extends Enum { readonly isForceSetCursor: boolean; readonly asForceSetCursor: { @@ -4850,7 +4877,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ForceSetCursor" | "ForceSetActiveCursor" | "ForceOnboardMbms" | "ClearHistoric"; } - /** @name PalletMigrationsMigrationCursor (394) */ + /** @name PalletMigrationsMigrationCursor (397) */ interface PalletMigrationsMigrationCursor extends Enum { readonly isActive: boolean; readonly asActive: PalletMigrationsActiveCursor; @@ -4858,14 +4885,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Active" | "Stuck"; } - /** @name PalletMigrationsActiveCursor (396) */ + /** @name PalletMigrationsActiveCursor (399) */ interface PalletMigrationsActiveCursor extends Struct { readonly index: u32; readonly innerCursor: Option; readonly startedAt: u32; } - /** @name PalletMigrationsHistoricCleanupSelector (398) */ + /** @name PalletMigrationsHistoricCleanupSelector (401) */ interface PalletMigrationsHistoricCleanupSelector extends Enum { readonly isSpecific: boolean; readonly asSpecific: Vec; @@ -4877,7 +4904,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Specific" | "Wildcard"; } - /** @name PalletBeefyCall (401) */ + /** @name PalletBeefyCall (404) */ interface PalletBeefyCall extends Enum { readonly isReportDoubleVoting: boolean; readonly asReportDoubleVoting: { @@ -4923,40 +4950,40 @@ declare module "@polkadot/types/lookup" { | "ReportFutureBlockVotingUnsigned"; } - /** @name SpConsensusBeefyDoubleVotingProof (402) */ + /** @name SpConsensusBeefyDoubleVotingProof (405) */ interface SpConsensusBeefyDoubleVotingProof extends Struct { readonly first: SpConsensusBeefyVoteMessage; readonly second: SpConsensusBeefyVoteMessage; } - /** @name SpConsensusBeefyEcdsaCryptoSignature (403) */ + /** @name SpConsensusBeefyEcdsaCryptoSignature (406) */ interface SpConsensusBeefyEcdsaCryptoSignature extends U8aFixed {} - /** @name SpConsensusBeefyVoteMessage (404) */ + /** @name SpConsensusBeefyVoteMessage (407) */ interface SpConsensusBeefyVoteMessage extends Struct { readonly commitment: SpConsensusBeefyCommitment; readonly id: SpConsensusBeefyEcdsaCryptoPublic; readonly signature: SpConsensusBeefyEcdsaCryptoSignature; } - /** @name SpConsensusBeefyCommitment (405) */ + /** @name SpConsensusBeefyCommitment (408) */ interface SpConsensusBeefyCommitment extends Struct { readonly payload: SpConsensusBeefyPayload; readonly blockNumber: u32; readonly validatorSetId: u64; } - /** @name SpConsensusBeefyPayload (406) */ + /** @name SpConsensusBeefyPayload (409) */ interface SpConsensusBeefyPayload extends Vec> {} - /** @name SpConsensusBeefyForkVotingProof (409) */ + /** @name SpConsensusBeefyForkVotingProof (412) */ interface SpConsensusBeefyForkVotingProof extends Struct { readonly vote: SpConsensusBeefyVoteMessage; readonly ancestryProof: SpMmrPrimitivesAncestryProof; readonly header: SpRuntimeHeader; } - /** @name SpMmrPrimitivesAncestryProof (410) */ + /** @name SpMmrPrimitivesAncestryProof (413) */ interface SpMmrPrimitivesAncestryProof extends Struct { readonly prevPeaks: Vec; readonly prevLeafCount: u64; @@ -4964,12 +4991,12 @@ declare module "@polkadot/types/lookup" { readonly items: Vec>; } - /** @name SpConsensusBeefyFutureBlockVotingProof (413) */ + /** @name SpConsensusBeefyFutureBlockVotingProof (416) */ interface SpConsensusBeefyFutureBlockVotingProof extends Struct { readonly vote: SpConsensusBeefyVoteMessage; } - /** @name SnowbridgePalletEthereumClientCall (414) */ + /** @name SnowbridgePalletEthereumClientCall (417) */ interface SnowbridgePalletEthereumClientCall extends Enum { readonly isForceCheckpoint: boolean; readonly asForceCheckpoint: { @@ -4986,7 +5013,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ForceCheckpoint" | "Submit" | "SetOperatingMode"; } - /** @name SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate (415) */ + /** @name SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate (418) */ interface SnowbridgeBeaconPrimitivesUpdatesCheckpointUpdate extends Struct { readonly header: SnowbridgeBeaconPrimitivesBeaconHeader; readonly currentSyncCommittee: SnowbridgeBeaconPrimitivesSyncCommittee; @@ -4996,7 +5023,7 @@ declare module "@polkadot/types/lookup" { readonly blockRootsBranch: Vec; } - /** @name SnowbridgeBeaconPrimitivesBeaconHeader (416) */ + /** @name SnowbridgeBeaconPrimitivesBeaconHeader (419) */ interface SnowbridgeBeaconPrimitivesBeaconHeader extends Struct { readonly slot: u64; readonly proposerIndex: u64; @@ -5005,16 +5032,16 @@ declare module "@polkadot/types/lookup" { readonly bodyRoot: H256; } - /** @name SnowbridgeBeaconPrimitivesSyncCommittee (417) */ + /** @name SnowbridgeBeaconPrimitivesSyncCommittee (420) */ interface SnowbridgeBeaconPrimitivesSyncCommittee extends Struct { readonly pubkeys: Vec; readonly aggregatePubkey: SnowbridgeBeaconPrimitivesPublicKey; } - /** @name SnowbridgeBeaconPrimitivesPublicKey (419) */ + /** @name SnowbridgeBeaconPrimitivesPublicKey (422) */ interface SnowbridgeBeaconPrimitivesPublicKey extends U8aFixed {} - /** @name SnowbridgeBeaconPrimitivesUpdatesUpdate (421) */ + /** @name SnowbridgeBeaconPrimitivesUpdatesUpdate (424) */ interface SnowbridgeBeaconPrimitivesUpdatesUpdate extends Struct { readonly attestedHeader: SnowbridgeBeaconPrimitivesBeaconHeader; readonly syncAggregate: SnowbridgeBeaconPrimitivesSyncAggregate; @@ -5026,29 +5053,29 @@ declare module "@polkadot/types/lookup" { readonly blockRootsBranch: Vec; } - /** @name SnowbridgeBeaconPrimitivesSyncAggregate (422) */ + /** @name SnowbridgeBeaconPrimitivesSyncAggregate (425) */ interface SnowbridgeBeaconPrimitivesSyncAggregate extends Struct { readonly syncCommitteeBits: U8aFixed; readonly syncCommitteeSignature: SnowbridgeBeaconPrimitivesSignature; } - /** @name SnowbridgeBeaconPrimitivesSignature (423) */ + /** @name SnowbridgeBeaconPrimitivesSignature (426) */ interface SnowbridgeBeaconPrimitivesSignature extends U8aFixed {} - /** @name SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate (426) */ + /** @name SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate (429) */ interface SnowbridgeBeaconPrimitivesUpdatesNextSyncCommitteeUpdate extends Struct { readonly nextSyncCommittee: SnowbridgeBeaconPrimitivesSyncCommittee; readonly nextSyncCommitteeBranch: Vec; } - /** @name SnowbridgeCoreOperatingModeBasicOperatingMode (427) */ + /** @name SnowbridgeCoreOperatingModeBasicOperatingMode (430) */ interface SnowbridgeCoreOperatingModeBasicOperatingMode extends Enum { readonly isNormal: boolean; readonly isHalted: boolean; readonly type: "Normal" | "Halted"; } - /** @name PolkadotRuntimeCommonParasSudoWrapperPalletCall (428) */ + /** @name PolkadotRuntimeCommonParasSudoWrapperPalletCall (431) */ interface PolkadotRuntimeCommonParasSudoWrapperPalletCall extends Enum { readonly isSudoScheduleParaInitialize: boolean; readonly asSudoScheduleParaInitialize: { @@ -5088,14 +5115,14 @@ declare module "@polkadot/types/lookup" { | "SudoEstablishHrmpChannel"; } - /** @name PolkadotRuntimeParachainsParasParaGenesisArgs (429) */ + /** @name PolkadotRuntimeParachainsParasParaGenesisArgs (432) */ interface PolkadotRuntimeParachainsParasParaGenesisArgs extends Struct { readonly genesisHead: Bytes; readonly validationCode: Bytes; readonly paraKind: bool; } - /** @name PalletRootTestingCall (430) */ + /** @name PalletRootTestingCall (433) */ interface PalletRootTestingCall extends Enum { readonly isFillBlock: boolean; readonly asFillBlock: { @@ -5105,7 +5132,7 @@ declare module "@polkadot/types/lookup" { readonly type: "FillBlock" | "TriggerDefensive"; } - /** @name PalletSudoCall (431) */ + /** @name PalletSudoCall (434) */ interface PalletSudoCall extends Enum { readonly isSudo: boolean; readonly asSudo: { @@ -5129,17 +5156,17 @@ declare module "@polkadot/types/lookup" { readonly type: "Sudo" | "SudoUncheckedWeight" | "SetKey" | "SudoAs" | "RemoveKey"; } - /** @name SpRuntimeBlakeTwo256 (432) */ + /** @name SpRuntimeBlakeTwo256 (435) */ type SpRuntimeBlakeTwo256 = Null; - /** @name PalletConvictionVotingTally (434) */ + /** @name PalletConvictionVotingTally (437) */ interface PalletConvictionVotingTally extends Struct { readonly ayes: u128; readonly nays: u128; readonly support: u128; } - /** @name PalletRankedCollectiveEvent (435) */ + /** @name PalletRankedCollectiveEvent (438) */ interface PalletRankedCollectiveEvent extends Enum { readonly isMemberAdded: boolean; readonly asMemberAdded: { @@ -5170,7 +5197,7 @@ declare module "@polkadot/types/lookup" { readonly type: "MemberAdded" | "RankChanged" | "MemberRemoved" | "Voted" | "MemberExchanged"; } - /** @name PalletRankedCollectiveVoteRecord (436) */ + /** @name PalletRankedCollectiveVoteRecord (439) */ interface PalletRankedCollectiveVoteRecord extends Enum { readonly isAye: boolean; readonly asAye: u32; @@ -5179,14 +5206,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Aye" | "Nay"; } - /** @name PalletRankedCollectiveTally (437) */ + /** @name PalletRankedCollectiveTally (440) */ interface PalletRankedCollectiveTally extends Struct { readonly bareAyes: u32; readonly ayes: u32; readonly nays: u32; } - /** @name PalletWhitelistEvent (439) */ + /** @name PalletWhitelistEvent (442) */ interface PalletWhitelistEvent extends Enum { readonly isCallWhitelisted: boolean; readonly asCallWhitelisted: { @@ -5204,19 +5231,19 @@ declare module "@polkadot/types/lookup" { readonly type: "CallWhitelisted" | "WhitelistedCallRemoved" | "WhitelistedCallDispatched"; } - /** @name FrameSupportDispatchPostDispatchInfo (441) */ + /** @name FrameSupportDispatchPostDispatchInfo (444) */ interface FrameSupportDispatchPostDispatchInfo extends Struct { readonly actualWeight: Option; readonly paysFee: FrameSupportDispatchPays; } - /** @name SpRuntimeDispatchErrorWithPostInfo (443) */ + /** @name SpRuntimeDispatchErrorWithPostInfo (446) */ interface SpRuntimeDispatchErrorWithPostInfo extends Struct { readonly postInfo: FrameSupportDispatchPostDispatchInfo; readonly error: SpRuntimeDispatchError; } - /** @name PolkadotRuntimeParachainsInclusionPalletEvent (444) */ + /** @name PolkadotRuntimeParachainsInclusionPalletEvent (447) */ interface PolkadotRuntimeParachainsInclusionPalletEvent extends Enum { readonly isCandidateBacked: boolean; readonly asCandidateBacked: ITuple<[PolkadotPrimitivesV7CandidateReceipt, Bytes, u32, u32]>; @@ -5232,13 +5259,13 @@ declare module "@polkadot/types/lookup" { readonly type: "CandidateBacked" | "CandidateIncluded" | "CandidateTimedOut" | "UpwardMessagesReceived"; } - /** @name PolkadotPrimitivesV7CandidateReceipt (445) */ + /** @name PolkadotPrimitivesV7CandidateReceipt (448) */ interface PolkadotPrimitivesV7CandidateReceipt extends Struct { readonly descriptor: PolkadotPrimitivesV7CandidateDescriptor; readonly commitmentsHash: H256; } - /** @name PolkadotRuntimeParachainsParasPalletEvent (448) */ + /** @name PolkadotRuntimeParachainsParasPalletEvent (451) */ interface PolkadotRuntimeParachainsParasPalletEvent extends Enum { readonly isCurrentCodeUpdated: boolean; readonly asCurrentCodeUpdated: u32; @@ -5267,7 +5294,7 @@ declare module "@polkadot/types/lookup" { | "PvfCheckRejected"; } - /** @name PolkadotRuntimeParachainsHrmpPalletEvent (449) */ + /** @name PolkadotRuntimeParachainsHrmpPalletEvent (452) */ interface PolkadotRuntimeParachainsHrmpPalletEvent extends Enum { readonly isOpenChannelRequested: boolean; readonly asOpenChannelRequested: { @@ -5320,7 +5347,7 @@ declare module "@polkadot/types/lookup" { | "OpenChannelDepositsUpdated"; } - /** @name PolkadotRuntimeParachainsDisputesPalletEvent (450) */ + /** @name PolkadotRuntimeParachainsDisputesPalletEvent (453) */ interface PolkadotRuntimeParachainsDisputesPalletEvent extends Enum { readonly isDisputeInitiated: boolean; readonly asDisputeInitiated: ITuple<[H256, PolkadotRuntimeParachainsDisputesDisputeLocation]>; @@ -5331,21 +5358,21 @@ declare module "@polkadot/types/lookup" { readonly type: "DisputeInitiated" | "DisputeConcluded" | "Revert"; } - /** @name PolkadotRuntimeParachainsDisputesDisputeLocation (451) */ + /** @name PolkadotRuntimeParachainsDisputesDisputeLocation (454) */ interface PolkadotRuntimeParachainsDisputesDisputeLocation extends Enum { readonly isLocal: boolean; readonly isRemote: boolean; readonly type: "Local" | "Remote"; } - /** @name PolkadotRuntimeParachainsDisputesDisputeResult (452) */ + /** @name PolkadotRuntimeParachainsDisputesDisputeResult (455) */ interface PolkadotRuntimeParachainsDisputesDisputeResult extends Enum { readonly isValid: boolean; readonly isInvalid: boolean; readonly type: "Valid" | "Invalid"; } - /** @name PalletMessageQueueEvent (453) */ + /** @name PalletMessageQueueEvent (456) */ interface PalletMessageQueueEvent extends Enum { readonly isProcessingFailed: boolean; readonly asProcessingFailed: { @@ -5375,7 +5402,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ProcessingFailed" | "Processed" | "OverweightEnqueued" | "PageReaped"; } - /** @name FrameSupportMessagesProcessMessageError (454) */ + /** @name FrameSupportMessagesProcessMessageError (457) */ interface FrameSupportMessagesProcessMessageError extends Enum { readonly isBadFormat: boolean; readonly isCorrupt: boolean; @@ -5387,7 +5414,7 @@ declare module "@polkadot/types/lookup" { readonly type: "BadFormat" | "Corrupt" | "Unsupported" | "Overweight" | "Yield" | "StackLimitReached"; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletEvent (455) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletEvent (458) */ interface PolkadotRuntimeParachainsAssignerOnDemandPalletEvent extends Enum { readonly isOnDemandOrderPlaced: boolean; readonly asOnDemandOrderPlaced: { @@ -5402,7 +5429,7 @@ declare module "@polkadot/types/lookup" { readonly type: "OnDemandOrderPlaced" | "SpotPriceSet"; } - /** @name PolkadotRuntimeCommonParasRegistrarPalletEvent (456) */ + /** @name PolkadotRuntimeCommonParasRegistrarPalletEvent (459) */ interface PolkadotRuntimeCommonParasRegistrarPalletEvent extends Enum { readonly isRegistered: boolean; readonly asRegistered: { @@ -5426,7 +5453,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Registered" | "Deregistered" | "Reserved" | "Swapped"; } - /** @name PalletUtilityEvent (457) */ + /** @name PalletUtilityEvent (460) */ interface PalletUtilityEvent extends Enum { readonly isBatchInterrupted: boolean; readonly asBatchInterrupted: { @@ -5453,7 +5480,7 @@ declare module "@polkadot/types/lookup" { | "DispatchedAs"; } - /** @name PalletIdentityEvent (459) */ + /** @name PalletIdentityEvent (462) */ interface PalletIdentityEvent extends Enum { readonly isIdentitySet: boolean; readonly asIdentitySet: { @@ -5559,7 +5586,7 @@ declare module "@polkadot/types/lookup" { | "DanglingUsernameRemoved"; } - /** @name PalletSchedulerEvent (460) */ + /** @name PalletSchedulerEvent (463) */ interface PalletSchedulerEvent extends Enum { readonly isScheduled: boolean; readonly asScheduled: { @@ -5621,7 +5648,7 @@ declare module "@polkadot/types/lookup" { | "PermanentlyOverweight"; } - /** @name PalletProxyEvent (462) */ + /** @name PalletProxyEvent (465) */ interface PalletProxyEvent extends Enum { readonly isProxyExecuted: boolean; readonly asProxyExecuted: { @@ -5657,7 +5684,7 @@ declare module "@polkadot/types/lookup" { readonly type: "ProxyExecuted" | "PureCreated" | "Announced" | "ProxyAdded" | "ProxyRemoved"; } - /** @name PalletMultisigEvent (463) */ + /** @name PalletMultisigEvent (466) */ interface PalletMultisigEvent extends Enum { readonly isNewMultisig: boolean; readonly asNewMultisig: { @@ -5690,7 +5717,7 @@ declare module "@polkadot/types/lookup" { readonly type: "NewMultisig" | "MultisigApproval" | "MultisigExecuted" | "MultisigCancelled"; } - /** @name PalletPreimageEvent (464) */ + /** @name PalletPreimageEvent (467) */ interface PalletPreimageEvent extends Enum { readonly isNoted: boolean; readonly asNoted: { @@ -5707,7 +5734,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Noted" | "Requested" | "Cleared"; } - /** @name PalletAssetRateEvent (465) */ + /** @name PalletAssetRateEvent (468) */ interface PalletAssetRateEvent extends Enum { readonly isAssetRateCreated: boolean; readonly asAssetRateCreated: { @@ -5727,7 +5754,7 @@ declare module "@polkadot/types/lookup" { readonly type: "AssetRateCreated" | "AssetRateRemoved" | "AssetRateUpdated"; } - /** @name PalletXcmEvent (466) */ + /** @name PalletXcmEvent (469) */ interface PalletXcmEvent extends Enum { readonly isAttempted: boolean; readonly asAttempted: { @@ -5892,7 +5919,7 @@ declare module "@polkadot/types/lookup" { | "VersionMigrationFinished"; } - /** @name StagingXcmV4TraitsOutcome (467) */ + /** @name StagingXcmV4TraitsOutcome (470) */ interface StagingXcmV4TraitsOutcome extends Enum { readonly isComplete: boolean; readonly asComplete: { @@ -5910,7 +5937,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Complete" | "Incomplete" | "Error"; } - /** @name PalletMigrationsEvent (468) */ + /** @name PalletMigrationsEvent (471) */ interface PalletMigrationsEvent extends Enum { readonly isRuntimeUpgradeStarted: boolean; readonly isRuntimeUpgradeCompleted: boolean; @@ -5943,7 +5970,7 @@ declare module "@polkadot/types/lookup" { | "FailedToResumeIdleXcmExecution"; } - /** @name SnowbridgePalletEthereumClientEvent (470) */ + /** @name SnowbridgePalletEthereumClientEvent (473) */ interface SnowbridgePalletEthereumClientEvent extends Enum { readonly isBeaconHeaderImported: boolean; readonly asBeaconHeaderImported: { @@ -5961,13 +5988,13 @@ declare module "@polkadot/types/lookup" { readonly type: "BeaconHeaderImported" | "SyncCommitteeUpdated" | "OperatingModeChanged"; } - /** @name PalletRootTestingEvent (471) */ + /** @name PalletRootTestingEvent (474) */ interface PalletRootTestingEvent extends Enum { readonly isDefensiveTestCall: boolean; readonly type: "DefensiveTestCall"; } - /** @name PalletSudoEvent (472) */ + /** @name PalletSudoEvent (475) */ interface PalletSudoEvent extends Enum { readonly isSudid: boolean; readonly asSudid: { @@ -5986,7 +6013,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Sudid" | "KeyChanged" | "KeyRemoved" | "SudoAsDone"; } - /** @name FrameSystemPhase (473) */ + /** @name FrameSystemPhase (476) */ interface FrameSystemPhase extends Enum { readonly isApplyExtrinsic: boolean; readonly asApplyExtrinsic: u32; @@ -5995,33 +6022,33 @@ declare module "@polkadot/types/lookup" { readonly type: "ApplyExtrinsic" | "Finalization" | "Initialization"; } - /** @name FrameSystemLastRuntimeUpgradeInfo (475) */ + /** @name FrameSystemLastRuntimeUpgradeInfo (478) */ interface FrameSystemLastRuntimeUpgradeInfo extends Struct { readonly specVersion: Compact; readonly specName: Text; } - /** @name FrameSystemCodeUpgradeAuthorization (477) */ + /** @name FrameSystemCodeUpgradeAuthorization (480) */ interface FrameSystemCodeUpgradeAuthorization extends Struct { readonly codeHash: H256; readonly checkVersion: bool; } - /** @name FrameSystemLimitsBlockWeights (478) */ + /** @name FrameSystemLimitsBlockWeights (481) */ interface FrameSystemLimitsBlockWeights extends Struct { readonly baseBlock: SpWeightsWeightV2Weight; readonly maxBlock: SpWeightsWeightV2Weight; readonly perClass: FrameSupportDispatchPerDispatchClassWeightsPerClass; } - /** @name FrameSupportDispatchPerDispatchClassWeightsPerClass (479) */ + /** @name FrameSupportDispatchPerDispatchClassWeightsPerClass (482) */ interface FrameSupportDispatchPerDispatchClassWeightsPerClass extends Struct { readonly normal: FrameSystemLimitsWeightsPerClass; readonly operational: FrameSystemLimitsWeightsPerClass; readonly mandatory: FrameSystemLimitsWeightsPerClass; } - /** @name FrameSystemLimitsWeightsPerClass (480) */ + /** @name FrameSystemLimitsWeightsPerClass (483) */ interface FrameSystemLimitsWeightsPerClass extends Struct { readonly baseExtrinsic: SpWeightsWeightV2Weight; readonly maxExtrinsic: Option; @@ -6029,25 +6056,25 @@ declare module "@polkadot/types/lookup" { readonly reserved: Option; } - /** @name FrameSystemLimitsBlockLength (481) */ + /** @name FrameSystemLimitsBlockLength (484) */ interface FrameSystemLimitsBlockLength extends Struct { readonly max: FrameSupportDispatchPerDispatchClassU32; } - /** @name FrameSupportDispatchPerDispatchClassU32 (482) */ + /** @name FrameSupportDispatchPerDispatchClassU32 (485) */ interface FrameSupportDispatchPerDispatchClassU32 extends Struct { readonly normal: u32; readonly operational: u32; readonly mandatory: u32; } - /** @name SpWeightsRuntimeDbWeight (483) */ + /** @name SpWeightsRuntimeDbWeight (486) */ interface SpWeightsRuntimeDbWeight extends Struct { readonly read: u64; readonly write: u64; } - /** @name SpVersionRuntimeVersion (484) */ + /** @name SpVersionRuntimeVersion (487) */ interface SpVersionRuntimeVersion extends Struct { readonly specName: Text; readonly implName: Text; @@ -6059,7 +6086,7 @@ declare module "@polkadot/types/lookup" { readonly stateVersion: u8; } - /** @name FrameSystemError (488) */ + /** @name FrameSystemError (491) */ interface FrameSystemError extends Enum { readonly isInvalidSpecName: boolean; readonly isSpecVersionNeedsToIncrease: boolean; @@ -6082,7 +6109,7 @@ declare module "@polkadot/types/lookup" { | "Unauthorized"; } - /** @name SpConsensusBabeDigestsPreDigest (495) */ + /** @name SpConsensusBabeDigestsPreDigest (498) */ interface SpConsensusBabeDigestsPreDigest extends Enum { readonly isPrimary: boolean; readonly asPrimary: SpConsensusBabeDigestsPrimaryPreDigest; @@ -6093,39 +6120,39 @@ declare module "@polkadot/types/lookup" { readonly type: "Primary" | "SecondaryPlain" | "SecondaryVRF"; } - /** @name SpConsensusBabeDigestsPrimaryPreDigest (496) */ + /** @name SpConsensusBabeDigestsPrimaryPreDigest (499) */ interface SpConsensusBabeDigestsPrimaryPreDigest extends Struct { readonly authorityIndex: u32; readonly slot: u64; readonly vrfSignature: SpCoreSr25519VrfVrfSignature; } - /** @name SpCoreSr25519VrfVrfSignature (497) */ + /** @name SpCoreSr25519VrfVrfSignature (500) */ interface SpCoreSr25519VrfVrfSignature extends Struct { readonly preOutput: U8aFixed; readonly proof: U8aFixed; } - /** @name SpConsensusBabeDigestsSecondaryPlainPreDigest (498) */ + /** @name SpConsensusBabeDigestsSecondaryPlainPreDigest (501) */ interface SpConsensusBabeDigestsSecondaryPlainPreDigest extends Struct { readonly authorityIndex: u32; readonly slot: u64; } - /** @name SpConsensusBabeDigestsSecondaryVRFPreDigest (499) */ + /** @name SpConsensusBabeDigestsSecondaryVRFPreDigest (502) */ interface SpConsensusBabeDigestsSecondaryVRFPreDigest extends Struct { readonly authorityIndex: u32; readonly slot: u64; readonly vrfSignature: SpCoreSr25519VrfVrfSignature; } - /** @name SpConsensusBabeBabeEpochConfiguration (500) */ + /** @name SpConsensusBabeBabeEpochConfiguration (503) */ interface SpConsensusBabeBabeEpochConfiguration extends Struct { readonly c: ITuple<[u64, u64]>; readonly allowedSlots: SpConsensusBabeAllowedSlots; } - /** @name PalletBabeError (504) */ + /** @name PalletBabeError (507) */ interface PalletBabeError extends Enum { readonly isInvalidEquivocationProof: boolean; readonly isInvalidKeyOwnershipProof: boolean; @@ -6138,14 +6165,14 @@ declare module "@polkadot/types/lookup" { | "InvalidConfiguration"; } - /** @name PalletBalancesBalanceLock (506) */ + /** @name PalletBalancesBalanceLock (509) */ interface PalletBalancesBalanceLock extends Struct { readonly id: U8aFixed; readonly amount: u128; readonly reasons: PalletBalancesReasons; } - /** @name PalletBalancesReasons (507) */ + /** @name PalletBalancesReasons (510) */ interface PalletBalancesReasons extends Enum { readonly isFee: boolean; readonly isMisc: boolean; @@ -6153,13 +6180,13 @@ declare module "@polkadot/types/lookup" { readonly type: "Fee" | "Misc" | "All"; } - /** @name PalletBalancesReserveData (510) */ + /** @name PalletBalancesReserveData (513) */ interface PalletBalancesReserveData extends Struct { readonly id: U8aFixed; readonly amount: u128; } - /** @name DancelightRuntimeRuntimeHoldReason (514) */ + /** @name DancelightRuntimeRuntimeHoldReason (517) */ interface DancelightRuntimeRuntimeHoldReason extends Enum { readonly isContainerRegistrar: boolean; readonly asContainerRegistrar: PalletRegistrarHoldReason; @@ -6170,31 +6197,31 @@ declare module "@polkadot/types/lookup" { readonly type: "ContainerRegistrar" | "DataPreservers" | "Preimage"; } - /** @name PalletRegistrarHoldReason (515) */ + /** @name PalletRegistrarHoldReason (518) */ interface PalletRegistrarHoldReason extends Enum { readonly isRegistrarDeposit: boolean; readonly type: "RegistrarDeposit"; } - /** @name PalletDataPreserversHoldReason (516) */ + /** @name PalletDataPreserversHoldReason (519) */ interface PalletDataPreserversHoldReason extends Enum { readonly isProfileDeposit: boolean; readonly type: "ProfileDeposit"; } - /** @name PalletPreimageHoldReason (517) */ + /** @name PalletPreimageHoldReason (520) */ interface PalletPreimageHoldReason extends Enum { readonly isPreimage: boolean; readonly type: "Preimage"; } - /** @name FrameSupportTokensMiscIdAmount (520) */ + /** @name FrameSupportTokensMiscIdAmount (523) */ interface FrameSupportTokensMiscIdAmount extends Struct { readonly id: Null; readonly amount: u128; } - /** @name PalletBalancesError (522) */ + /** @name PalletBalancesError (525) */ interface PalletBalancesError extends Enum { readonly isVestingBalance: boolean; readonly isLiquidityRestrictions: boolean; @@ -6223,26 +6250,26 @@ declare module "@polkadot/types/lookup" { | "DeltaZero"; } - /** @name PalletTransactionPaymentReleases (523) */ + /** @name PalletTransactionPaymentReleases (526) */ interface PalletTransactionPaymentReleases extends Enum { readonly isV1Ancient: boolean; readonly isV2: boolean; readonly type: "V1Ancient" | "V2"; } - /** @name SpStakingOffenceOffenceDetails (524) */ + /** @name SpStakingOffenceOffenceDetails (527) */ interface SpStakingOffenceOffenceDetails extends Struct { readonly offender: ITuple<[AccountId32, Null]>; readonly reporters: Vec; } - /** @name PalletRegistrarDepositInfo (536) */ + /** @name PalletRegistrarDepositInfo (539) */ interface PalletRegistrarDepositInfo extends Struct { readonly creator: AccountId32; readonly deposit: u128; } - /** @name PalletRegistrarError (537) */ + /** @name PalletRegistrarError (540) */ interface PalletRegistrarError extends Enum { readonly isParaIdAlreadyRegistered: boolean; readonly isParaIdNotRegistered: boolean; @@ -6281,7 +6308,7 @@ declare module "@polkadot/types/lookup" { | "WasmCodeNecessary"; } - /** @name PalletConfigurationHostConfiguration (538) */ + /** @name PalletConfigurationHostConfiguration (541) */ interface PalletConfigurationHostConfiguration extends Struct { readonly maxCollators: u32; readonly minOrchestratorCollators: u32; @@ -6294,13 +6321,13 @@ declare module "@polkadot/types/lookup" { readonly maxParachainCoresPercentage: Option; } - /** @name PalletConfigurationError (541) */ + /** @name PalletConfigurationError (544) */ interface PalletConfigurationError extends Enum { readonly isInvalidNewValue: boolean; readonly type: "InvalidNewValue"; } - /** @name PalletInvulnerablesError (543) */ + /** @name PalletInvulnerablesError (546) */ interface PalletInvulnerablesError extends Enum { readonly isTooManyInvulnerables: boolean; readonly isAlreadyInvulnerable: boolean; @@ -6315,26 +6342,26 @@ declare module "@polkadot/types/lookup" { | "UnableToDeriveCollatorId"; } - /** @name DpCollatorAssignmentAssignedCollatorsAccountId32 (544) */ + /** @name DpCollatorAssignmentAssignedCollatorsAccountId32 (547) */ interface DpCollatorAssignmentAssignedCollatorsAccountId32 extends Struct { readonly orchestratorChain: Vec; readonly containerChains: BTreeMap>; } - /** @name DpCollatorAssignmentAssignedCollatorsPublic (549) */ + /** @name DpCollatorAssignmentAssignedCollatorsPublic (552) */ interface DpCollatorAssignmentAssignedCollatorsPublic extends Struct { readonly orchestratorChain: Vec; readonly containerChains: BTreeMap>; } - /** @name TpTraitsContainerChainBlockInfo (557) */ + /** @name TpTraitsContainerChainBlockInfo (560) */ interface TpTraitsContainerChainBlockInfo extends Struct { readonly blockNumber: u32; readonly author: AccountId32; readonly latestSlotNumber: u64; } - /** @name PalletAuthorNotingError (558) */ + /** @name PalletAuthorNotingError (561) */ interface PalletAuthorNotingError extends Enum { readonly isFailedReading: boolean; readonly isFailedDecodingHeader: boolean; @@ -6353,7 +6380,7 @@ declare module "@polkadot/types/lookup" { | "NonAuraDigest"; } - /** @name PalletServicesPaymentError (559) */ + /** @name PalletServicesPaymentError (562) */ interface PalletServicesPaymentError extends Enum { readonly isInsufficientFundsToPurchaseCredits: boolean; readonly isInsufficientCredits: boolean; @@ -6361,7 +6388,7 @@ declare module "@polkadot/types/lookup" { readonly type: "InsufficientFundsToPurchaseCredits" | "InsufficientCredits" | "CreditPriceTooExpensive"; } - /** @name PalletDataPreserversRegisteredProfile (560) */ + /** @name PalletDataPreserversRegisteredProfile (563) */ interface PalletDataPreserversRegisteredProfile extends Struct { readonly account: AccountId32; readonly deposit: u128; @@ -6369,7 +6396,7 @@ declare module "@polkadot/types/lookup" { readonly assignment: Option>; } - /** @name PalletDataPreserversError (566) */ + /** @name PalletDataPreserversError (569) */ interface PalletDataPreserversError extends Enum { readonly isNoBootNodes: boolean; readonly isUnknownProfileId: boolean; @@ -6394,13 +6421,13 @@ declare module "@polkadot/types/lookup" { | "CantDeleteAssignedProfile"; } - /** @name TpTraitsActiveEraInfo (569) */ + /** @name TpTraitsActiveEraInfo (572) */ interface TpTraitsActiveEraInfo extends Struct { readonly index: u32; readonly start: Option; } - /** @name PalletExternalValidatorsError (571) */ + /** @name PalletExternalValidatorsError (574) */ interface PalletExternalValidatorsError extends Enum { readonly isTooManyWhitelisted: boolean; readonly isAlreadyWhitelisted: boolean; @@ -6415,10 +6442,40 @@ declare module "@polkadot/types/lookup" { | "UnableToDeriveValidatorId"; } - /** @name SpCoreCryptoKeyTypeId (576) */ + /** @name PalletExternalValidatorSlashesSlash (577) */ + interface PalletExternalValidatorSlashesSlash extends Struct { + readonly validator: AccountId32; + readonly reporters: Vec; + readonly slashId: u32; + readonly percentage: Perbill; + readonly confirmed: bool; + } + + /** @name PalletExternalValidatorSlashesError (578) */ + interface PalletExternalValidatorSlashesError extends Enum { + readonly isEmptyTargets: boolean; + readonly isInvalidSlashIndex: boolean; + readonly isNotSortedAndUnique: boolean; + readonly isProvidedFutureEra: boolean; + readonly isProvidedNonSlashableEra: boolean; + readonly isActiveEraNotSet: boolean; + readonly isDeferPeriodIsOver: boolean; + readonly isErrorComputingSlash: boolean; + readonly type: + | "EmptyTargets" + | "InvalidSlashIndex" + | "NotSortedAndUnique" + | "ProvidedFutureEra" + | "ProvidedNonSlashableEra" + | "ActiveEraNotSet" + | "DeferPeriodIsOver" + | "ErrorComputingSlash"; + } + + /** @name SpCoreCryptoKeyTypeId (582) */ interface SpCoreCryptoKeyTypeId extends U8aFixed {} - /** @name PalletSessionError (577) */ + /** @name PalletSessionError (583) */ interface PalletSessionError extends Enum { readonly isInvalidProof: boolean; readonly isNoAssociatedValidatorId: boolean; @@ -6428,7 +6485,7 @@ declare module "@polkadot/types/lookup" { readonly type: "InvalidProof" | "NoAssociatedValidatorId" | "DuplicatedKey" | "NoKeys" | "NoAccount"; } - /** @name PalletGrandpaStoredState (578) */ + /** @name PalletGrandpaStoredState (584) */ interface PalletGrandpaStoredState extends Enum { readonly isLive: boolean; readonly isPendingPause: boolean; @@ -6445,7 +6502,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Live" | "PendingPause" | "Paused" | "PendingResume"; } - /** @name PalletGrandpaStoredPendingChange (579) */ + /** @name PalletGrandpaStoredPendingChange (585) */ interface PalletGrandpaStoredPendingChange extends Struct { readonly scheduledAt: u32; readonly delay: u32; @@ -6453,7 +6510,7 @@ declare module "@polkadot/types/lookup" { readonly forced: Option; } - /** @name PalletGrandpaError (581) */ + /** @name PalletGrandpaError (587) */ interface PalletGrandpaError extends Enum { readonly isPauseFailed: boolean; readonly isResumeFailed: boolean; @@ -6472,13 +6529,13 @@ declare module "@polkadot/types/lookup" { | "DuplicateOffenceReport"; } - /** @name PalletInflationRewardsChainsToRewardValue (584) */ + /** @name PalletInflationRewardsChainsToRewardValue (590) */ interface PalletInflationRewardsChainsToRewardValue extends Struct { readonly paraIds: Vec; readonly rewardsPerChain: u128; } - /** @name PalletTreasuryProposal (585) */ + /** @name PalletTreasuryProposal (591) */ interface PalletTreasuryProposal extends Struct { readonly proposer: AccountId32; readonly value: u128; @@ -6486,7 +6543,7 @@ declare module "@polkadot/types/lookup" { readonly bond: u128; } - /** @name PalletTreasurySpendStatus (587) */ + /** @name PalletTreasurySpendStatus (593) */ interface PalletTreasurySpendStatus extends Struct { readonly assetKind: Null; readonly amount: u128; @@ -6496,7 +6553,7 @@ declare module "@polkadot/types/lookup" { readonly status: PalletTreasuryPaymentState; } - /** @name PalletTreasuryPaymentState (588) */ + /** @name PalletTreasuryPaymentState (594) */ interface PalletTreasuryPaymentState extends Enum { readonly isPending: boolean; readonly isAttempted: boolean; @@ -6507,10 +6564,10 @@ declare module "@polkadot/types/lookup" { readonly type: "Pending" | "Attempted" | "Failed"; } - /** @name FrameSupportPalletId (590) */ + /** @name FrameSupportPalletId (596) */ interface FrameSupportPalletId extends U8aFixed {} - /** @name PalletTreasuryError (591) */ + /** @name PalletTreasuryError (597) */ interface PalletTreasuryError extends Enum { readonly isInvalidIndex: boolean; readonly isTooManyApprovals: boolean; @@ -6537,7 +6594,7 @@ declare module "@polkadot/types/lookup" { | "Inconclusive"; } - /** @name PalletConvictionVotingVoteVoting (593) */ + /** @name PalletConvictionVotingVoteVoting (599) */ interface PalletConvictionVotingVoteVoting extends Enum { readonly isCasting: boolean; readonly asCasting: PalletConvictionVotingVoteCasting; @@ -6546,23 +6603,23 @@ declare module "@polkadot/types/lookup" { readonly type: "Casting" | "Delegating"; } - /** @name PalletConvictionVotingVoteCasting (594) */ + /** @name PalletConvictionVotingVoteCasting (600) */ interface PalletConvictionVotingVoteCasting extends Struct { readonly votes: Vec>; readonly delegations: PalletConvictionVotingDelegations; readonly prior: PalletConvictionVotingVotePriorLock; } - /** @name PalletConvictionVotingDelegations (598) */ + /** @name PalletConvictionVotingDelegations (604) */ interface PalletConvictionVotingDelegations extends Struct { readonly votes: u128; readonly capital: u128; } - /** @name PalletConvictionVotingVotePriorLock (599) */ + /** @name PalletConvictionVotingVotePriorLock (605) */ interface PalletConvictionVotingVotePriorLock extends ITuple<[u32, u128]> {} - /** @name PalletConvictionVotingVoteDelegating (600) */ + /** @name PalletConvictionVotingVoteDelegating (606) */ interface PalletConvictionVotingVoteDelegating extends Struct { readonly balance: u128; readonly target: AccountId32; @@ -6571,7 +6628,7 @@ declare module "@polkadot/types/lookup" { readonly prior: PalletConvictionVotingVotePriorLock; } - /** @name PalletConvictionVotingError (604) */ + /** @name PalletConvictionVotingError (610) */ interface PalletConvictionVotingError extends Enum { readonly isNotOngoing: boolean; readonly isNotVoter: boolean; @@ -6600,7 +6657,7 @@ declare module "@polkadot/types/lookup" { | "BadClass"; } - /** @name PalletReferendaReferendumInfoConvictionVotingTally (605) */ + /** @name PalletReferendaReferendumInfoConvictionVotingTally (611) */ interface PalletReferendaReferendumInfoConvictionVotingTally extends Enum { readonly isOngoing: boolean; readonly asOngoing: PalletReferendaReferendumStatusConvictionVotingTally; @@ -6617,7 +6674,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Ongoing" | "Approved" | "Rejected" | "Cancelled" | "TimedOut" | "Killed"; } - /** @name PalletReferendaReferendumStatusConvictionVotingTally (606) */ + /** @name PalletReferendaReferendumStatusConvictionVotingTally (612) */ interface PalletReferendaReferendumStatusConvictionVotingTally extends Struct { readonly track: u16; readonly origin: DancelightRuntimeOriginCaller; @@ -6632,19 +6689,19 @@ declare module "@polkadot/types/lookup" { readonly alarm: Option]>>; } - /** @name PalletReferendaDeposit (607) */ + /** @name PalletReferendaDeposit (613) */ interface PalletReferendaDeposit extends Struct { readonly who: AccountId32; readonly amount: u128; } - /** @name PalletReferendaDecidingStatus (610) */ + /** @name PalletReferendaDecidingStatus (616) */ interface PalletReferendaDecidingStatus extends Struct { readonly since: u32; readonly confirming: Option; } - /** @name PalletReferendaTrackInfo (618) */ + /** @name PalletReferendaTrackInfo (624) */ interface PalletReferendaTrackInfo extends Struct { readonly name: Text; readonly maxDeciding: u32; @@ -6657,7 +6714,7 @@ declare module "@polkadot/types/lookup" { readonly minSupport: PalletReferendaCurve; } - /** @name PalletReferendaCurve (619) */ + /** @name PalletReferendaCurve (625) */ interface PalletReferendaCurve extends Enum { readonly isLinearDecreasing: boolean; readonly asLinearDecreasing: { @@ -6681,7 +6738,7 @@ declare module "@polkadot/types/lookup" { readonly type: "LinearDecreasing" | "SteppedDecreasing" | "Reciprocal"; } - /** @name PalletReferendaError (622) */ + /** @name PalletReferendaError (628) */ interface PalletReferendaError extends Enum { readonly isNotOngoing: boolean; readonly isHasDeposit: boolean; @@ -6714,12 +6771,12 @@ declare module "@polkadot/types/lookup" { | "PreimageStoredWithDifferentLength"; } - /** @name PalletRankedCollectiveMemberRecord (623) */ + /** @name PalletRankedCollectiveMemberRecord (629) */ interface PalletRankedCollectiveMemberRecord extends Struct { readonly rank: u16; } - /** @name PalletRankedCollectiveError (628) */ + /** @name PalletRankedCollectiveError (633) */ interface PalletRankedCollectiveError extends Enum { readonly isAlreadyMember: boolean; readonly isNotMember: boolean; @@ -6746,7 +6803,7 @@ declare module "@polkadot/types/lookup" { | "TooManyMembers"; } - /** @name PalletReferendaReferendumInfoRankedCollectiveTally (629) */ + /** @name PalletReferendaReferendumInfoRankedCollectiveTally (634) */ interface PalletReferendaReferendumInfoRankedCollectiveTally extends Enum { readonly isOngoing: boolean; readonly asOngoing: PalletReferendaReferendumStatusRankedCollectiveTally; @@ -6763,7 +6820,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Ongoing" | "Approved" | "Rejected" | "Cancelled" | "TimedOut" | "Killed"; } - /** @name PalletReferendaReferendumStatusRankedCollectiveTally (630) */ + /** @name PalletReferendaReferendumStatusRankedCollectiveTally (635) */ interface PalletReferendaReferendumStatusRankedCollectiveTally extends Struct { readonly track: u16; readonly origin: DancelightRuntimeOriginCaller; @@ -6778,7 +6835,7 @@ declare module "@polkadot/types/lookup" { readonly alarm: Option]>>; } - /** @name PalletWhitelistError (633) */ + /** @name PalletWhitelistError (638) */ interface PalletWhitelistError extends Enum { readonly isUnavailablePreImage: boolean; readonly isUndecodableCall: boolean; @@ -6793,7 +6850,7 @@ declare module "@polkadot/types/lookup" { | "CallAlreadyWhitelisted"; } - /** @name PolkadotRuntimeParachainsConfigurationHostConfiguration (634) */ + /** @name PolkadotRuntimeParachainsConfigurationHostConfiguration (639) */ interface PolkadotRuntimeParachainsConfigurationHostConfiguration extends Struct { readonly maxCodeSize: u32; readonly maxHeadDataSize: u32; @@ -6832,19 +6889,19 @@ declare module "@polkadot/types/lookup" { readonly schedulerParams: PolkadotPrimitivesVstagingSchedulerParams; } - /** @name PolkadotRuntimeParachainsConfigurationPalletError (637) */ + /** @name PolkadotRuntimeParachainsConfigurationPalletError (642) */ interface PolkadotRuntimeParachainsConfigurationPalletError extends Enum { readonly isInvalidNewValue: boolean; readonly type: "InvalidNewValue"; } - /** @name PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker (640) */ + /** @name PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker (645) */ interface PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker extends Struct { readonly buffer: Vec>; readonly latestNumber: u32; } - /** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (644) */ + /** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (649) */ interface PolkadotRuntimeParachainsInclusionCandidatePendingAvailability extends Struct { readonly core: u32; readonly hash_: H256; @@ -6857,7 +6914,7 @@ declare module "@polkadot/types/lookup" { readonly backingGroup: u32; } - /** @name PolkadotRuntimeParachainsInclusionPalletError (645) */ + /** @name PolkadotRuntimeParachainsInclusionPalletError (650) */ interface PolkadotRuntimeParachainsInclusionPalletError extends Enum { readonly isValidatorIndexOutOfBounds: boolean; readonly isUnscheduledCandidate: boolean; @@ -6898,7 +6955,7 @@ declare module "@polkadot/types/lookup" { | "ParaHeadMismatch"; } - /** @name PolkadotPrimitivesV7ScrapedOnChainVotes (646) */ + /** @name PolkadotPrimitivesV7ScrapedOnChainVotes (651) */ interface PolkadotPrimitivesV7ScrapedOnChainVotes extends Struct { readonly session: u32; readonly backingValidatorsPerCandidate: Vec< @@ -6907,7 +6964,7 @@ declare module "@polkadot/types/lookup" { readonly disputes: Vec; } - /** @name PolkadotRuntimeParachainsParasInherentPalletError (651) */ + /** @name PolkadotRuntimeParachainsParasInherentPalletError (656) */ interface PolkadotRuntimeParachainsParasInherentPalletError extends Enum { readonly isTooManyInclusionInherents: boolean; readonly isInvalidParentHeader: boolean; @@ -6922,7 +6979,7 @@ declare module "@polkadot/types/lookup" { | "UnscheduledCandidate"; } - /** @name PolkadotRuntimeParachainsSchedulerPalletCoreOccupied (654) */ + /** @name PolkadotRuntimeParachainsSchedulerPalletCoreOccupied (659) */ interface PolkadotRuntimeParachainsSchedulerPalletCoreOccupied extends Enum { readonly isFree: boolean; readonly isParas: boolean; @@ -6930,14 +6987,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Free" | "Paras"; } - /** @name PolkadotRuntimeParachainsSchedulerPalletParasEntry (655) */ + /** @name PolkadotRuntimeParachainsSchedulerPalletParasEntry (660) */ interface PolkadotRuntimeParachainsSchedulerPalletParasEntry extends Struct { readonly assignment: PolkadotRuntimeParachainsSchedulerCommonAssignment; readonly availabilityTimeouts: u32; readonly ttl: u32; } - /** @name PolkadotRuntimeParachainsSchedulerCommonAssignment (656) */ + /** @name PolkadotRuntimeParachainsSchedulerCommonAssignment (661) */ interface PolkadotRuntimeParachainsSchedulerCommonAssignment extends Enum { readonly isPool: boolean; readonly asPool: { @@ -6949,7 +7006,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Pool" | "Bulk"; } - /** @name PolkadotRuntimeParachainsParasPvfCheckActiveVoteState (661) */ + /** @name PolkadotRuntimeParachainsParasPvfCheckActiveVoteState (666) */ interface PolkadotRuntimeParachainsParasPvfCheckActiveVoteState extends Struct { readonly votesAccept: BitVec; readonly votesReject: BitVec; @@ -6958,7 +7015,7 @@ declare module "@polkadot/types/lookup" { readonly causes: Vec; } - /** @name PolkadotRuntimeParachainsParasPvfCheckCause (663) */ + /** @name PolkadotRuntimeParachainsParasPvfCheckCause (668) */ interface PolkadotRuntimeParachainsParasPvfCheckCause extends Enum { readonly isOnboarding: boolean; readonly asOnboarding: u32; @@ -6971,14 +7028,14 @@ declare module "@polkadot/types/lookup" { readonly type: "Onboarding" | "Upgrade"; } - /** @name PolkadotRuntimeParachainsParasUpgradeStrategy (664) */ + /** @name PolkadotRuntimeParachainsParasUpgradeStrategy (669) */ interface PolkadotRuntimeParachainsParasUpgradeStrategy extends Enum { readonly isSetGoAheadSignal: boolean; readonly isApplyAtExpectedBlock: boolean; readonly type: "SetGoAheadSignal" | "ApplyAtExpectedBlock"; } - /** @name PolkadotRuntimeParachainsParasParaLifecycle (666) */ + /** @name PolkadotRuntimeParachainsParasParaLifecycle (671) */ interface PolkadotRuntimeParachainsParasParaLifecycle extends Enum { readonly isOnboarding: boolean; readonly isParathread: boolean; @@ -6997,32 +7054,32 @@ declare module "@polkadot/types/lookup" { | "OffboardingParachain"; } - /** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (668) */ + /** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (673) */ interface PolkadotRuntimeParachainsParasParaPastCodeMeta extends Struct { readonly upgradeTimes: Vec; readonly lastPruned: Option; } - /** @name PolkadotRuntimeParachainsParasReplacementTimes (670) */ + /** @name PolkadotRuntimeParachainsParasReplacementTimes (675) */ interface PolkadotRuntimeParachainsParasReplacementTimes extends Struct { readonly expectedAt: u32; readonly activatedAt: u32; } - /** @name PolkadotPrimitivesV7UpgradeGoAhead (672) */ + /** @name PolkadotPrimitivesV7UpgradeGoAhead (677) */ interface PolkadotPrimitivesV7UpgradeGoAhead extends Enum { readonly isAbort: boolean; readonly isGoAhead: boolean; readonly type: "Abort" | "GoAhead"; } - /** @name PolkadotPrimitivesV7UpgradeRestriction (673) */ + /** @name PolkadotPrimitivesV7UpgradeRestriction (678) */ interface PolkadotPrimitivesV7UpgradeRestriction extends Enum { readonly isPresent: boolean; readonly type: "Present"; } - /** @name PolkadotRuntimeParachainsParasPalletError (674) */ + /** @name PolkadotRuntimeParachainsParasPalletError (679) */ interface PolkadotRuntimeParachainsParasPalletError extends Enum { readonly isNotRegistered: boolean; readonly isCannotOnboard: boolean; @@ -7053,20 +7110,20 @@ declare module "@polkadot/types/lookup" { | "InvalidCode"; } - /** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (676) */ + /** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (681) */ interface PolkadotRuntimeParachainsInitializerBufferedSessionChange extends Struct { readonly validators: Vec; readonly queued: Vec; readonly sessionIndex: u32; } - /** @name PolkadotCorePrimitivesInboundDownwardMessage (678) */ + /** @name PolkadotCorePrimitivesInboundDownwardMessage (683) */ interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct { readonly sentAt: u32; readonly msg: Bytes; } - /** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (679) */ + /** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (684) */ interface PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest extends Struct { readonly confirmed: bool; readonly age: u32; @@ -7076,7 +7133,7 @@ declare module "@polkadot/types/lookup" { readonly maxTotalSize: u32; } - /** @name PolkadotRuntimeParachainsHrmpHrmpChannel (681) */ + /** @name PolkadotRuntimeParachainsHrmpHrmpChannel (686) */ interface PolkadotRuntimeParachainsHrmpHrmpChannel extends Struct { readonly maxCapacity: u32; readonly maxTotalSize: u32; @@ -7088,13 +7145,13 @@ declare module "@polkadot/types/lookup" { readonly recipientDeposit: u128; } - /** @name PolkadotCorePrimitivesInboundHrmpMessage (683) */ + /** @name PolkadotCorePrimitivesInboundHrmpMessage (688) */ interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct { readonly sentAt: u32; readonly data: Bytes; } - /** @name PolkadotRuntimeParachainsHrmpPalletError (686) */ + /** @name PolkadotRuntimeParachainsHrmpPalletError (691) */ interface PolkadotRuntimeParachainsHrmpPalletError extends Enum { readonly isOpenHrmpChannelToSelf: boolean; readonly isOpenHrmpChannelInvalidRecipient: boolean; @@ -7139,7 +7196,7 @@ declare module "@polkadot/types/lookup" { | "ChannelCreationNotAuthorized"; } - /** @name PolkadotPrimitivesV7SessionInfo (688) */ + /** @name PolkadotPrimitivesV7SessionInfo (693) */ interface PolkadotPrimitivesV7SessionInfo extends Struct { readonly activeValidatorIndices: Vec; readonly randomSeed: U8aFixed; @@ -7156,13 +7213,13 @@ declare module "@polkadot/types/lookup" { readonly neededApprovals: u32; } - /** @name PolkadotPrimitivesV7IndexedVecValidatorIndex (689) */ + /** @name PolkadotPrimitivesV7IndexedVecValidatorIndex (694) */ interface PolkadotPrimitivesV7IndexedVecValidatorIndex extends Vec {} - /** @name PolkadotPrimitivesV7IndexedVecGroupIndex (690) */ + /** @name PolkadotPrimitivesV7IndexedVecGroupIndex (695) */ interface PolkadotPrimitivesV7IndexedVecGroupIndex extends Vec> {} - /** @name PolkadotPrimitivesV7DisputeState (692) */ + /** @name PolkadotPrimitivesV7DisputeState (697) */ interface PolkadotPrimitivesV7DisputeState extends Struct { readonly validatorsFor: BitVec; readonly validatorsAgainst: BitVec; @@ -7170,7 +7227,7 @@ declare module "@polkadot/types/lookup" { readonly concludedAt: Option; } - /** @name PolkadotRuntimeParachainsDisputesPalletError (694) */ + /** @name PolkadotRuntimeParachainsDisputesPalletError (699) */ interface PolkadotRuntimeParachainsDisputesPalletError extends Enum { readonly isDuplicateDisputeStatementSets: boolean; readonly isAncientDisputeStatement: boolean; @@ -7193,13 +7250,13 @@ declare module "@polkadot/types/lookup" { | "UnconfirmedDispute"; } - /** @name PolkadotPrimitivesV7SlashingPendingSlashes (695) */ + /** @name PolkadotPrimitivesV7SlashingPendingSlashes (700) */ interface PolkadotPrimitivesV7SlashingPendingSlashes extends Struct { readonly keys_: BTreeMap; readonly kind: PolkadotPrimitivesV7SlashingSlashingOffenceKind; } - /** @name PolkadotRuntimeParachainsDisputesSlashingPalletError (699) */ + /** @name PolkadotRuntimeParachainsDisputesSlashingPalletError (704) */ interface PolkadotRuntimeParachainsDisputesSlashingPalletError extends Enum { readonly isInvalidKeyOwnershipProof: boolean; readonly isInvalidSessionIndex: boolean; @@ -7216,7 +7273,7 @@ declare module "@polkadot/types/lookup" { | "DuplicateSlashingReport"; } - /** @name PalletMessageQueueBookState (700) */ + /** @name PalletMessageQueueBookState (705) */ interface PalletMessageQueueBookState extends Struct { readonly begin: u32; readonly end: u32; @@ -7226,13 +7283,13 @@ declare module "@polkadot/types/lookup" { readonly size_: u64; } - /** @name PalletMessageQueueNeighbours (702) */ + /** @name PalletMessageQueueNeighbours (707) */ interface PalletMessageQueueNeighbours extends Struct { readonly prev: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin; readonly next: PolkadotRuntimeParachainsInclusionAggregateMessageOrigin; } - /** @name PalletMessageQueuePage (704) */ + /** @name PalletMessageQueuePage (709) */ interface PalletMessageQueuePage extends Struct { readonly remaining: u32; readonly remainingSize: u32; @@ -7242,7 +7299,7 @@ declare module "@polkadot/types/lookup" { readonly heap: Bytes; } - /** @name PalletMessageQueueError (706) */ + /** @name PalletMessageQueueError (711) */ interface PalletMessageQueueError extends Enum { readonly isNotReapable: boolean; readonly isNoPage: boolean; @@ -7265,13 +7322,13 @@ declare module "@polkadot/types/lookup" { | "RecursiveDisallowed"; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount (707) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount (712) */ interface PolkadotRuntimeParachainsAssignerOnDemandTypesCoreAffinityCount extends Struct { readonly coreIndex: u32; readonly count: u32; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType (708) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType (713) */ interface PolkadotRuntimeParachainsAssignerOnDemandTypesQueueStatusType extends Struct { readonly traffic: u128; readonly nextIndex: u32; @@ -7279,33 +7336,33 @@ declare module "@polkadot/types/lookup" { readonly freedIndices: BinaryHeapReverseQueueIndex; } - /** @name BinaryHeapReverseQueueIndex (710) */ + /** @name BinaryHeapReverseQueueIndex (715) */ interface BinaryHeapReverseQueueIndex extends Vec {} - /** @name BinaryHeapEnqueuedOrder (713) */ + /** @name BinaryHeapEnqueuedOrder (718) */ interface BinaryHeapEnqueuedOrder extends Vec {} - /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder (714) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder (719) */ interface PolkadotRuntimeParachainsAssignerOnDemandTypesEnqueuedOrder extends Struct { readonly paraId: u32; readonly idx: u32; } - /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletError (718) */ + /** @name PolkadotRuntimeParachainsAssignerOnDemandPalletError (723) */ interface PolkadotRuntimeParachainsAssignerOnDemandPalletError extends Enum { readonly isQueueFull: boolean; readonly isSpotPriceHigherThanMaxAmount: boolean; readonly type: "QueueFull" | "SpotPriceHigherThanMaxAmount"; } - /** @name PolkadotRuntimeCommonParasRegistrarParaInfo (719) */ + /** @name PolkadotRuntimeCommonParasRegistrarParaInfo (724) */ interface PolkadotRuntimeCommonParasRegistrarParaInfo extends Struct { readonly manager: AccountId32; readonly deposit: u128; readonly locked: Option; } - /** @name PolkadotRuntimeCommonParasRegistrarPalletError (721) */ + /** @name PolkadotRuntimeCommonParasRegistrarPalletError (726) */ interface PolkadotRuntimeCommonParasRegistrarPalletError extends Enum { readonly isNotRegistered: boolean; readonly isAlreadyRegistered: boolean; @@ -7338,33 +7395,33 @@ declare module "@polkadot/types/lookup" { | "CannotSwap"; } - /** @name PalletUtilityError (722) */ + /** @name PalletUtilityError (727) */ interface PalletUtilityError extends Enum { readonly isTooManyCalls: boolean; readonly type: "TooManyCalls"; } - /** @name PalletIdentityRegistration (724) */ + /** @name PalletIdentityRegistration (729) */ interface PalletIdentityRegistration extends Struct { readonly judgements: Vec>; readonly deposit: u128; readonly info: PalletIdentityLegacyIdentityInfo; } - /** @name PalletIdentityRegistrarInfo (733) */ + /** @name PalletIdentityRegistrarInfo (738) */ interface PalletIdentityRegistrarInfo extends Struct { readonly account: AccountId32; readonly fee: u128; readonly fields: u64; } - /** @name PalletIdentityAuthorityProperties (735) */ + /** @name PalletIdentityAuthorityProperties (740) */ interface PalletIdentityAuthorityProperties extends Struct { readonly suffix: Bytes; readonly allocation: u32; } - /** @name PalletIdentityError (738) */ + /** @name PalletIdentityError (743) */ interface PalletIdentityError extends Enum { readonly isTooManySubAccounts: boolean; readonly isNotFound: boolean; @@ -7421,7 +7478,7 @@ declare module "@polkadot/types/lookup" { | "NotExpired"; } - /** @name PalletSchedulerScheduled (741) */ + /** @name PalletSchedulerScheduled (746) */ interface PalletSchedulerScheduled extends Struct { readonly maybeId: Option; readonly priority: u8; @@ -7430,14 +7487,14 @@ declare module "@polkadot/types/lookup" { readonly origin: DancelightRuntimeOriginCaller; } - /** @name PalletSchedulerRetryConfig (743) */ + /** @name PalletSchedulerRetryConfig (748) */ interface PalletSchedulerRetryConfig extends Struct { readonly totalRetries: u8; readonly remaining: u8; readonly period: u32; } - /** @name PalletSchedulerError (744) */ + /** @name PalletSchedulerError (749) */ interface PalletSchedulerError extends Enum { readonly isFailedToSchedule: boolean; readonly isNotFound: boolean; @@ -7447,21 +7504,21 @@ declare module "@polkadot/types/lookup" { readonly type: "FailedToSchedule" | "NotFound" | "TargetBlockNumberInPast" | "RescheduleNoChange" | "Named"; } - /** @name PalletProxyProxyDefinition (747) */ + /** @name PalletProxyProxyDefinition (752) */ interface PalletProxyProxyDefinition extends Struct { readonly delegate: AccountId32; readonly proxyType: DancelightRuntimeProxyType; readonly delay: u32; } - /** @name PalletProxyAnnouncement (751) */ + /** @name PalletProxyAnnouncement (756) */ interface PalletProxyAnnouncement extends Struct { readonly real: AccountId32; readonly callHash: H256; readonly height: u32; } - /** @name PalletProxyError (753) */ + /** @name PalletProxyError (758) */ interface PalletProxyError extends Enum { readonly isTooMany: boolean; readonly isNotFound: boolean; @@ -7482,7 +7539,7 @@ declare module "@polkadot/types/lookup" { | "NoSelfProxy"; } - /** @name PalletMultisigMultisig (755) */ + /** @name PalletMultisigMultisig (760) */ interface PalletMultisigMultisig extends Struct { readonly when: PalletMultisigTimepoint; readonly deposit: u128; @@ -7490,7 +7547,7 @@ declare module "@polkadot/types/lookup" { readonly approvals: Vec; } - /** @name PalletMultisigError (757) */ + /** @name PalletMultisigError (762) */ interface PalletMultisigError extends Enum { readonly isMinimumThreshold: boolean; readonly isAlreadyApproved: boolean; @@ -7523,7 +7580,7 @@ declare module "@polkadot/types/lookup" { | "AlreadyStored"; } - /** @name PalletPreimageOldRequestStatus (758) */ + /** @name PalletPreimageOldRequestStatus (763) */ interface PalletPreimageOldRequestStatus extends Enum { readonly isUnrequested: boolean; readonly asUnrequested: { @@ -7539,7 +7596,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unrequested" | "Requested"; } - /** @name PalletPreimageRequestStatus (761) */ + /** @name PalletPreimageRequestStatus (766) */ interface PalletPreimageRequestStatus extends Enum { readonly isUnrequested: boolean; readonly asUnrequested: { @@ -7555,7 +7612,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Unrequested" | "Requested"; } - /** @name PalletPreimageError (766) */ + /** @name PalletPreimageError (771) */ interface PalletPreimageError extends Enum { readonly isTooBig: boolean; readonly isAlreadyNoted: boolean; @@ -7578,7 +7635,7 @@ declare module "@polkadot/types/lookup" { | "NoCost"; } - /** @name PalletAssetRateError (767) */ + /** @name PalletAssetRateError (772) */ interface PalletAssetRateError extends Enum { readonly isUnknownAssetKind: boolean; readonly isAlreadyExists: boolean; @@ -7586,7 +7643,7 @@ declare module "@polkadot/types/lookup" { readonly type: "UnknownAssetKind" | "AlreadyExists" | "Overflow"; } - /** @name PalletXcmQueryStatus (768) */ + /** @name PalletXcmQueryStatus (773) */ interface PalletXcmQueryStatus extends Enum { readonly isPending: boolean; readonly asPending: { @@ -7608,7 +7665,7 @@ declare module "@polkadot/types/lookup" { readonly type: "Pending" | "VersionNotifier" | "Ready"; } - /** @name XcmVersionedResponse (772) */ + /** @name XcmVersionedResponse (777) */ interface XcmVersionedResponse extends Enum { readonly isV2: boolean; readonly asV2: XcmV2Response; @@ -7619,7 +7676,7 @@ declare module "@polkadot/types/lookup" { readonly type: "V2" | "V3" | "V4"; } - /** @name PalletXcmVersionMigrationStage (778) */ + /** @name PalletXcmVersionMigrationStage (783) */ interface PalletXcmVersionMigrationStage extends Enum { readonly isMigrateSupportedVersion: boolean; readonly isMigrateVersionNotifiers: boolean; @@ -7633,7 +7690,7 @@ declare module "@polkadot/types/lookup" { | "MigrateAndNotifyOldTargets"; } - /** @name PalletXcmRemoteLockedFungibleRecord (780) */ + /** @name PalletXcmRemoteLockedFungibleRecord (785) */ interface PalletXcmRemoteLockedFungibleRecord extends Struct { readonly amount: u128; readonly owner: XcmVersionedLocation; @@ -7641,7 +7698,7 @@ declare module "@polkadot/types/lookup" { readonly consumers: Vec>; } - /** @name PalletXcmError (787) */ + /** @name PalletXcmError (792) */ interface PalletXcmError extends Enum { readonly isUnreachable: boolean; readonly isSendFailure: boolean; @@ -7694,7 +7751,7 @@ declare module "@polkadot/types/lookup" { | "LocalExecutionIncomplete"; } - /** @name PalletMigrationsError (788) */ + /** @name PalletMigrationsError (793) */ interface PalletMigrationsError extends Enum { readonly isPreimageMissing: boolean; readonly isWrongUpperBound: boolean; @@ -7703,7 +7760,7 @@ declare module "@polkadot/types/lookup" { readonly type: "PreimageMissing" | "WrongUpperBound" | "PreimageIsTooBig" | "PreimageAlreadyExists"; } - /** @name PalletBeefyError (792) */ + /** @name PalletBeefyError (797) */ interface PalletBeefyError extends Enum { readonly isInvalidKeyOwnershipProof: boolean; readonly isInvalidDoubleVotingProof: boolean; @@ -7722,50 +7779,50 @@ declare module "@polkadot/types/lookup" { | "InvalidConfiguration"; } - /** @name SpConsensusBeefyMmrBeefyAuthoritySet (793) */ + /** @name SpConsensusBeefyMmrBeefyAuthoritySet (798) */ interface SpConsensusBeefyMmrBeefyAuthoritySet extends Struct { readonly id: u64; readonly len: u32; readonly keysetCommitment: H256; } - /** @name SnowbridgeBeaconPrimitivesCompactBeaconState (794) */ + /** @name SnowbridgeBeaconPrimitivesCompactBeaconState (799) */ interface SnowbridgeBeaconPrimitivesCompactBeaconState extends Struct { readonly slot: Compact; readonly blockRootsRoot: H256; } - /** @name SnowbridgeBeaconPrimitivesSyncCommitteePrepared (795) */ + /** @name SnowbridgeBeaconPrimitivesSyncCommitteePrepared (800) */ interface SnowbridgeBeaconPrimitivesSyncCommitteePrepared extends Struct { readonly root: H256; readonly pubkeys: Vec; readonly aggregatePubkey: SnowbridgeMilagroBlsKeysPublicKey; } - /** @name SnowbridgeMilagroBlsKeysPublicKey (797) */ + /** @name SnowbridgeMilagroBlsKeysPublicKey (802) */ interface SnowbridgeMilagroBlsKeysPublicKey extends Struct { readonly point: SnowbridgeAmclBls381Ecp; } - /** @name SnowbridgeAmclBls381Ecp (798) */ + /** @name SnowbridgeAmclBls381Ecp (803) */ interface SnowbridgeAmclBls381Ecp extends Struct { readonly x: SnowbridgeAmclBls381Fp; readonly y: SnowbridgeAmclBls381Fp; readonly z: SnowbridgeAmclBls381Fp; } - /** @name SnowbridgeAmclBls381Fp (799) */ + /** @name SnowbridgeAmclBls381Fp (804) */ interface SnowbridgeAmclBls381Fp extends Struct { readonly x: SnowbridgeAmclBls381Big; readonly xes: i32; } - /** @name SnowbridgeAmclBls381Big (800) */ + /** @name SnowbridgeAmclBls381Big (805) */ interface SnowbridgeAmclBls381Big extends Struct { readonly w: Vec; } - /** @name SnowbridgeBeaconPrimitivesForkVersions (803) */ + /** @name SnowbridgeBeaconPrimitivesForkVersions (808) */ interface SnowbridgeBeaconPrimitivesForkVersions extends Struct { readonly genesis: SnowbridgeBeaconPrimitivesFork; readonly altair: SnowbridgeBeaconPrimitivesFork; @@ -7774,13 +7831,13 @@ declare module "@polkadot/types/lookup" { readonly deneb: SnowbridgeBeaconPrimitivesFork; } - /** @name SnowbridgeBeaconPrimitivesFork (804) */ + /** @name SnowbridgeBeaconPrimitivesFork (809) */ interface SnowbridgeBeaconPrimitivesFork extends Struct { readonly version: U8aFixed; readonly epoch: u64; } - /** @name SnowbridgePalletEthereumClientError (805) */ + /** @name SnowbridgePalletEthereumClientError (810) */ interface SnowbridgePalletEthereumClientError extends Enum { readonly isSkippedSyncCommitteePeriod: boolean; readonly isSyncCommitteeUpdateRequired: boolean; @@ -7836,7 +7893,7 @@ declare module "@polkadot/types/lookup" { | "Halted"; } - /** @name SnowbridgeBeaconPrimitivesBlsBlsError (806) */ + /** @name SnowbridgeBeaconPrimitivesBlsBlsError (811) */ interface SnowbridgeBeaconPrimitivesBlsBlsError extends Enum { readonly isInvalidSignature: boolean; readonly isInvalidPublicKey: boolean; @@ -7849,7 +7906,7 @@ declare module "@polkadot/types/lookup" { | "SignatureVerificationFailed"; } - /** @name PolkadotRuntimeCommonParasSudoWrapperPalletError (807) */ + /** @name PolkadotRuntimeCommonParasSudoWrapperPalletError (812) */ interface PolkadotRuntimeCommonParasSudoWrapperPalletError extends Enum { readonly isParaDoesntExist: boolean; readonly isParaAlreadyExists: boolean; @@ -7872,45 +7929,45 @@ declare module "@polkadot/types/lookup" { | "TooManyCores"; } - /** @name PalletSudoError (808) */ + /** @name PalletSudoError (813) */ interface PalletSudoError extends Enum { readonly isRequireSudo: boolean; readonly type: "RequireSudo"; } - /** @name FrameSystemExtensionsCheckNonZeroSender (811) */ + /** @name FrameSystemExtensionsCheckNonZeroSender (816) */ type FrameSystemExtensionsCheckNonZeroSender = Null; - /** @name FrameSystemExtensionsCheckSpecVersion (812) */ + /** @name FrameSystemExtensionsCheckSpecVersion (817) */ type FrameSystemExtensionsCheckSpecVersion = Null; - /** @name FrameSystemExtensionsCheckTxVersion (813) */ + /** @name FrameSystemExtensionsCheckTxVersion (818) */ type FrameSystemExtensionsCheckTxVersion = Null; - /** @name FrameSystemExtensionsCheckGenesis (814) */ + /** @name FrameSystemExtensionsCheckGenesis (819) */ type FrameSystemExtensionsCheckGenesis = Null; - /** @name FrameSystemExtensionsCheckNonce (817) */ + /** @name FrameSystemExtensionsCheckNonce (822) */ interface FrameSystemExtensionsCheckNonce extends Compact {} - /** @name FrameSystemExtensionsCheckWeight (818) */ + /** @name FrameSystemExtensionsCheckWeight (823) */ type FrameSystemExtensionsCheckWeight = Null; - /** @name PalletTransactionPaymentChargeTransactionPayment (819) */ + /** @name PalletTransactionPaymentChargeTransactionPayment (824) */ interface PalletTransactionPaymentChargeTransactionPayment extends Compact {} - /** @name FrameMetadataHashExtensionCheckMetadataHash (820) */ + /** @name FrameMetadataHashExtensionCheckMetadataHash (825) */ interface FrameMetadataHashExtensionCheckMetadataHash extends Struct { readonly mode: FrameMetadataHashExtensionMode; } - /** @name FrameMetadataHashExtensionMode (821) */ + /** @name FrameMetadataHashExtensionMode (826) */ interface FrameMetadataHashExtensionMode extends Enum { readonly isDisabled: boolean; readonly isEnabled: boolean; readonly type: "Disabled" | "Enabled"; } - /** @name DancelightRuntimeRuntime (822) */ + /** @name DancelightRuntimeRuntime (827) */ type DancelightRuntimeRuntime = Null; } // declare module From c56ac4585fc6d2371863367d5eaa0027fd7b4b6a Mon Sep 17 00:00:00 2001 From: girazoki Date: Mon, 4 Nov 2024 12:49:02 +0100 Subject: [PATCH 75/82] wip --- pallets/external-validator-slashes/src/benchmarking.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/external-validator-slashes/src/benchmarking.rs b/pallets/external-validator-slashes/src/benchmarking.rs index 146984185..783b77687 100644 --- a/pallets/external-validator-slashes/src/benchmarking.rs +++ b/pallets/external-validator-slashes/src/benchmarking.rs @@ -82,7 +82,7 @@ mod benchmarks { .saturating_add(One::one()) ) .len(), - 1 as usize + 1_usize ); Ok(()) } From c83087f576ef2aa94441d518d2d93ad6e193b0f0 Mon Sep 17 00:00:00 2001 From: girazoki Date: Mon, 4 Nov 2024 14:27:15 +0100 Subject: [PATCH 76/82] fmt --- .../runtime/dancelight/src/tests/slashes.rs | 32 +++++-------------- 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/solo-chains/runtime/dancelight/src/tests/slashes.rs b/solo-chains/runtime/dancelight/src/tests/slashes.rs index d63bbf33d..8ee1214ba 100644 --- a/solo-chains/runtime/dancelight/src/tests/slashes.rs +++ b/solo-chains/runtime/dancelight/src/tests/slashes.rs @@ -42,9 +42,7 @@ fn invulnerables_cannot_be_slashed() { .execute_with(|| { run_to_block(2); inject_babe_slash(&AccountId::from(ALICE).to_string()); - let reports: Vec<_> = pallet_offences::Reports::::iter() - .map(|offence| offence) - .collect(); + let reports = pallet_offences::Reports::::iter().collect::>(); assert_eq!(reports.len(), 1); assert_eq!(ExternalValidators::current_era().unwrap(), 0); @@ -75,9 +73,7 @@ fn non_invulnerables_can_be_slashed_with_babe() { inject_babe_slash(&AccountId::from(ALICE).to_string()); - let reports: Vec<_> = pallet_offences::Reports::::iter() - .map(|offence| offence) - .collect(); + let reports = pallet_offences::Reports::::iter().collect::>(); assert_eq!(reports.len(), 1); assert_eq!(ExternalValidators::current_era().unwrap(), 0); @@ -112,9 +108,7 @@ fn non_invulnerables_can_be_slashed_with_grandpa() { inject_grandpa_slash(&AccountId::from(ALICE).to_string()); - let reports: Vec<_> = pallet_offences::Reports::::iter() - .map(|offence| offence) - .collect(); + let reports = pallet_offences::Reports::::iter().collect::>(); assert_eq!(reports.len(), 1); assert_eq!(ExternalValidators::current_era().unwrap(), 0); @@ -155,9 +149,7 @@ fn test_slashing_percentage_applied_correctly() { inject_babe_slash(&AccountId::from(ALICE).to_string()); - let reports: Vec<_> = pallet_offences::Reports::::iter() - .map(|offence| offence) - .collect(); + let reports = pallet_offences::Reports::::iter().collect::>(); assert_eq!(reports.len(), 1); assert_eq!(ExternalValidators::current_era().unwrap(), 0); @@ -202,9 +194,7 @@ fn test_slashes_are_not_additive_in_percentage() { inject_grandpa_slash(&AccountId::from(ALICE).to_string()); - let reports: Vec<_> = pallet_offences::Reports::::iter() - .map(|offence| offence) - .collect(); + let reports = pallet_offences::Reports::::iter().collect::>(); // we have 2 reports assert_eq!(reports.len(), 2); @@ -243,9 +233,7 @@ fn test_slashes_are_cleaned_after_bonding_period() { inject_babe_slash(&AccountId::from(ALICE).to_string()); - let reports: Vec<_> = pallet_offences::Reports::::iter() - .map(|offence| offence) - .collect(); + let reports = pallet_offences::Reports::::iter().collect::>(); assert_eq!(reports.len(), 1); assert_eq!(ExternalValidators::current_era().unwrap(), 0); @@ -294,9 +282,7 @@ fn test_slashes_can_be_cleared_before_deferred_period_applies() { inject_babe_slash(&AccountId::from(ALICE).to_string()); - let reports: Vec<_> = pallet_offences::Reports::::iter() - .map(|offence| offence) - .collect(); + let reports = pallet_offences::Reports::::iter().collect::>(); assert_eq!(reports.len(), 1); assert_eq!(ExternalValidators::current_era().unwrap(), 0); @@ -337,9 +323,7 @@ fn test_slashes_cannot_be_cancelled_after_defer_period() { inject_babe_slash(&AccountId::from(ALICE).to_string()); - let reports: Vec<_> = pallet_offences::Reports::::iter() - .map(|offence| offence) - .collect(); + let reports = pallet_offences::Reports::::iter().collect::>(); assert_eq!(reports.len(), 1); assert_eq!(ExternalValidators::current_era().unwrap(), 0); From 86d0a1303e99ca8e0625537fc9c1f574c3744ec9 Mon Sep 17 00:00:00 2001 From: girazoki Date: Mon, 4 Nov 2024 14:32:18 +0100 Subject: [PATCH 77/82] first pr review fixes --- pallets/external-validator-slashes/src/lib.rs | 22 +++++++++---------- .../external-validator-slashes/src/mock.rs | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index 267d75d47..1ea67f499 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -413,17 +413,17 @@ impl OnEraStart for Pallet { impl Pallet { /// Apply previously-unapplied slashes on the beginning of a new era, after a delay. fn confirm_unconfirmed_slashes(active_era: EraIndex) { - let mut era_slashes = Slashes::::take(&active_era); - log!( - log::Level::Debug, - "found {} slashes scheduled to be confirmed in era {:?}", - era_slashes.len(), - active_era, - ); - for slash in &mut era_slashes { - slash.confirmed = true; - } - Slashes::::insert(active_era, &era_slashes); + Slashes::::mutate(&active_era, |era_slashes| { + log!( + log::Level::Debug, + "found {} slashes scheduled to be confirmed in era {:?}", + era_slashes.len(), + active_era, + ); + for slash in era_slashes { + slash.confirmed = true; + } + }); } } diff --git a/pallets/external-validator-slashes/src/mock.rs b/pallets/external-validator-slashes/src/mock.rs index 2421239c9..4132e28e0 100644 --- a/pallets/external-validator-slashes/src/mock.rs +++ b/pallets/external-validator-slashes/src/mock.rs @@ -88,7 +88,7 @@ parameter_types! { pub struct TestSessionManager; impl pallet_session::SessionManager for TestSessionManager { fn new_session(_new_index: SessionIndex) -> Option> { - Validators::mutate(|l| l.take()) + Validators::get() } fn end_session(_: SessionIndex) {} fn start_session(_: SessionIndex) {} From ed0c1699873798c7e60c0f80c266dcf88254bde4 Mon Sep 17 00:00:00 2001 From: girazoki Date: Mon, 4 Nov 2024 14:42:45 +0100 Subject: [PATCH 78/82] more pr feedback --- pallets/external-validator-slashes/src/lib.rs | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index 1ea67f499..ba1fa50fc 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -192,11 +192,10 @@ pub mod pallet { Error::::InvalidSlashIndex ); - for (removed, index) in slash_indices.into_iter().enumerate() { - let index = (index as usize) - removed; - era_slashes.remove(index); + // Remove elements starting from the highest index to avoid shifting issues. + for index in slash_indices.into_iter().rev() { + era_slashes.remove(index as usize); } - // insert back slashes Slashes::::insert(&era, &era_slashes); Ok(()) @@ -239,10 +238,9 @@ pub mod pallet { .saturating_add(One::one()) }; - let mut era_slashes = Slashes::::get(&era_to_consider); - era_slashes.push(slash); - - Slashes::::insert(era_to_consider, &era_slashes); + Slashes::::mutate(&era_to_consider, |era_slashes| { + era_slashes.push(slash); + }); NextSlashId::::put(next_slash_id.saturating_add(One::one())); Ok(()) @@ -396,7 +394,14 @@ impl OnEraStart for Pallet { // Kill slashing metadata. for (pruned_era, _) in bonded.drain(..n_to_prune) { - let _ = ValidatorSlashInEra::::clear_prefix(&pruned_era, REMOVE_LIMIT, None); + let removal_result = + ValidatorSlashInEra::::clear_prefix(&pruned_era, REMOVE_LIMIT, None); + if removal_result.maybe_cursor.is_some() { + log::error!( + "Not all validator slashes were remove for era {:?}", + pruned_era + ); + } Slashes::::remove(&pruned_era); } From 6f8b593a85368c6ace790dcea7025240df2ab593 Mon Sep 17 00:00:00 2001 From: girazoki Date: Mon, 4 Nov 2024 15:13:06 +0100 Subject: [PATCH 79/82] more fmt and pr fixes --- pallets/external-validator-slashes/src/lib.rs | 2 +- solo-chains/runtime/dancelight/src/tests/common/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index ba1fa50fc..eda2ed94e 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -105,7 +105,7 @@ pub mod pallet { /// Interface for interacting with a session pallet. type SessionInterface: SessionInterface; - /// Era index provider, used to fetch the active era among other thins + /// Era index provider, used to fetch the active era among other things type EraIndexProvider: EraIndexProvider; /// Invulnerable provider, used to get the invulnerables to know when not to slash diff --git a/solo-chains/runtime/dancelight/src/tests/common/mod.rs b/solo-chains/runtime/dancelight/src/tests/common/mod.rs index 8f33351fb..4c9c13222 100644 --- a/solo-chains/runtime/dancelight/src/tests/common/mod.rs +++ b/solo-chains/runtime/dancelight/src/tests/common/mod.rs @@ -1232,7 +1232,7 @@ pub fn generate_grandpa_equivocation_proof( let prevote_msg = finality_grandpa::Message::Prevote(prevote.clone()); let payload = grandpa_primitives::localized_payload(round, set_id, &prevote_msg); - let signed = authority_pair.sign(&payload).into(); + let signed = authority_pair.sign(&payload); (prevote, signed) }; @@ -1288,7 +1288,7 @@ pub fn generate_babe_equivocation_proof( let seal_header = |header: &mut crate::Header| { let prehash = header.hash(); let seal = ::babe_seal( - offender_authority_pair.sign(prehash.as_ref()).into(), + offender_authority_pair.sign(prehash.as_ref()), ); header.digest_mut().push(seal); }; From ddc30d83fc424a8382c09b33a7ffde9697e93984 Mon Sep 17 00:00:00 2001 From: girazoki Date: Mon, 4 Nov 2024 15:28:47 +0100 Subject: [PATCH 80/82] remove weight --- pallets/external-validator-slashes/src/lib.rs | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index eda2ed94e..43f05d723 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -271,14 +271,8 @@ where slash_fraction: &[Perbill], slash_session: SessionIndex, ) -> Weight { - let mut consumed_weight = Weight::from_parts(0, 0); - let mut add_db_reads_writes = |reads, writes| { - consumed_weight += T::DbWeight::get().reads_writes(reads, writes); - }; - let active_era = { let active_era = T::EraIndexProvider::active_era().index; - add_db_reads_writes(1, 0); active_era }; let active_era_start_session_index = T::EraIndexProvider::era_to_session_start(active_era) @@ -286,7 +280,6 @@ where frame_support::print("Error: start_session_index must be set for current_era"); 0 }); - add_db_reads_writes(1, 0); // Fast path for active-era report - most likely. // `slash_session` cannot be in a future active era. It must be in `active_era` or before. @@ -294,22 +287,18 @@ where active_era } else { let eras = BondedEras::::get(); - add_db_reads_writes(1, 0); // Reverse because it's more likely to find reports from recent eras. match eras.iter().rev().find(|&(_, sesh)| sesh <= &slash_session) { Some((slash_era, _)) => *slash_era, // Before bonding period. defensive - should be filtered out. - None => return consumed_weight, + None => return Weight::default(), } }; - add_db_reads_writes(1, 1); - let slash_defer_duration = T::SlashDeferDuration::get(); let invulnerables = T::InvulnerablesProvider::invulnerables(); - add_db_reads_writes(1, 0); let mut next_slash_id = NextSlashId::::get(); @@ -362,13 +351,10 @@ where // Fix unwrap next_slash_id = next_slash_id.saturating_add(One::one()); - add_db_reads_writes(1, 1); - } else { - add_db_reads_writes(4 /* fetch_spans */, 5 /* kick_out_if_recent */) } } NextSlashId::::put(next_slash_id); - consumed_weight + Weight::default() } } From 9c1ab404c8f75903c89aab5d8bc962693f7164b0 Mon Sep 17 00:00:00 2001 From: girazoki Date: Mon, 4 Nov 2024 16:18:59 +0100 Subject: [PATCH 81/82] add doc --- pallets/external-validator-slashes/src/lib.rs | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/pallets/external-validator-slashes/src/lib.rs b/pallets/external-validator-slashes/src/lib.rs index 43f05d723..eff102f22 100644 --- a/pallets/external-validator-slashes/src/lib.rs +++ b/pallets/external-validator-slashes/src/lib.rs @@ -14,6 +14,18 @@ // You should have received a copy of the GNU General Public License // along with Tanssi. If not, see +//! ExternalValidatorSlashes pallet. +//! +//! A pallet to store slashes based on offences committed by validators +//! Slashes can be cancelled during the DeferPeriod through cancel_deferred_slash +//! Slashes can also be forcedly injected via the force_inject_slash extrinsic +//! Slashes for a particular era are removed after the bondingPeriod has elapsed +//! +//! ## OnOffence trait +//! +//! The pallet also implements the OnOffence trait that reacts to offences being injected by other pallets +//! Invulnerables are not slashed and no slashing information is stored for them + #![cfg_attr(not(feature = "std"), no_std)] use { @@ -117,13 +129,19 @@ pub mod pallet { #[pallet::error] pub enum Error { + /// The era for which the slash wants to be cancelled has no slashes EmptyTargets, + /// No slash was found to be cancelled at the given index InvalidSlashIndex, + /// Slash indices to be cancelled are not sorted or unique NotSortedAndUnique, + /// Provided an era in the future ProvidedFutureEra, + /// Provided an era that is not slashable ProvidedNonSlashableEra, - ActiveEraNotSet, + /// The slash to be cancelled has already elapsed the DeferPeriod DeferPeriodIsOver, + /// There was an error computing the slash ErrorComputingSlash, } From ca32055119051ee740e74fe578b80fed6b0180ec Mon Sep 17 00:00:00 2001 From: girazoki Date: Mon, 4 Nov 2024 17:58:29 +0100 Subject: [PATCH 82/82] add correct typescript api --- .../src/dancelight/interfaces/augment-api-errors.ts | 8 +++++++- typescript-api/src/dancelight/interfaces/lookup.ts | 1 - typescript-api/src/dancelight/interfaces/types-lookup.ts | 2 -- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/typescript-api/src/dancelight/interfaces/augment-api-errors.ts b/typescript-api/src/dancelight/interfaces/augment-api-errors.ts index 1b170dfc4..9727ad457 100644 --- a/typescript-api/src/dancelight/interfaces/augment-api-errors.ts +++ b/typescript-api/src/dancelight/interfaces/augment-api-errors.ts @@ -244,13 +244,19 @@ declare module "@polkadot/api-base/types/errors" { [key: string]: AugmentedError; }; externalValidatorSlashes: { - ActiveEraNotSet: AugmentedError; + /** The slash to be cancelled has already elapsed the DeferPeriod */ DeferPeriodIsOver: AugmentedError; + /** The era for which the slash wants to be cancelled has no slashes */ EmptyTargets: AugmentedError; + /** There was an error computing the slash */ ErrorComputingSlash: AugmentedError; + /** No slash was found to be cancelled at the given index */ InvalidSlashIndex: AugmentedError; + /** Slash indices to be cancelled are not sorted or unique */ NotSortedAndUnique: AugmentedError; + /** Provided an era in the future */ ProvidedFutureEra: AugmentedError; + /** Provided an era that is not slashable */ ProvidedNonSlashableEra: AugmentedError; /** Generic error */ [key: string]: AugmentedError; diff --git a/typescript-api/src/dancelight/interfaces/lookup.ts b/typescript-api/src/dancelight/interfaces/lookup.ts index 4bd81315b..87c8d4016 100644 --- a/typescript-api/src/dancelight/interfaces/lookup.ts +++ b/typescript-api/src/dancelight/interfaces/lookup.ts @@ -5052,7 +5052,6 @@ export default { "NotSortedAndUnique", "ProvidedFutureEra", "ProvidedNonSlashableEra", - "ActiveEraNotSet", "DeferPeriodIsOver", "ErrorComputingSlash", ], diff --git a/typescript-api/src/dancelight/interfaces/types-lookup.ts b/typescript-api/src/dancelight/interfaces/types-lookup.ts index e17ceb0a6..8df791dea 100644 --- a/typescript-api/src/dancelight/interfaces/types-lookup.ts +++ b/typescript-api/src/dancelight/interfaces/types-lookup.ts @@ -6458,7 +6458,6 @@ declare module "@polkadot/types/lookup" { readonly isNotSortedAndUnique: boolean; readonly isProvidedFutureEra: boolean; readonly isProvidedNonSlashableEra: boolean; - readonly isActiveEraNotSet: boolean; readonly isDeferPeriodIsOver: boolean; readonly isErrorComputingSlash: boolean; readonly type: @@ -6467,7 +6466,6 @@ declare module "@polkadot/types/lookup" { | "NotSortedAndUnique" | "ProvidedFutureEra" | "ProvidedNonSlashableEra" - | "ActiveEraNotSet" | "DeferPeriodIsOver" | "ErrorComputingSlash"; }