chore: regenerate umbrella crate, fix feature propagation

This commit is contained in:
2025-12-16 11:28:32 +03:00
parent dd6d48f528
commit 620b0e3aa0
1358 changed files with 9464 additions and 7656 deletions
@@ -60,8 +60,10 @@ mod benchmarks {
let para_id = ParaId::from(1_u32);
let caller = RawOrigin::Root;
let _ =
AssignedSlots::<T>::set_max_permanent_slots(pezframe_system::Origin::<T>::Root.into(), 10);
let _ = AssignedSlots::<T>::set_max_permanent_slots(
pezframe_system::Origin::<T>::Root.into(),
10,
);
register_teyrchain::<T>(para_id);
let counter = PermanentSlotCount::<T>::get();
@@ -87,8 +89,10 @@ mod benchmarks {
let para_id = ParaId::from(2_u32);
let caller = RawOrigin::Root;
let _ =
AssignedSlots::<T>::set_max_temporary_slots(pezframe_system::Origin::<T>::Root.into(), 10);
let _ = AssignedSlots::<T>::set_max_temporary_slots(
pezframe_system::Origin::<T>::Root.into(),
10,
);
register_teyrchain::<T>(para_id);
let current_lease_period: BlockNumberFor<T> =
@@ -116,8 +120,10 @@ mod benchmarks {
let para_id = ParaId::from(3_u32);
let caller = RawOrigin::Root;
let _ =
AssignedSlots::<T>::set_max_temporary_slots(pezframe_system::Origin::<T>::Root.into(), 10);
let _ = AssignedSlots::<T>::set_max_temporary_slots(
pezframe_system::Origin::<T>::Root.into(),
10,
);
register_teyrchain::<T>(para_id);
let _ = AssignedSlots::<T>::assign_temp_teyrchain_slot(
@@ -34,14 +34,14 @@ use alloc::vec::Vec;
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use pezframe_support::{pezpallet_prelude::*, traits::Currency};
use pezframe_system::pezpallet_prelude::*;
pub use pezpallet::*;
use pezkuwi_primitives::Id as ParaId;
use pezkuwi_runtime_teyrchains::{
configuration,
paras::{self},
};
use scale_info::TypeInfo;
pub use pezpallet::*;
use pezsp_runtime::traits::{One, Saturating, Zero};
use scale_info::TypeInfo;
const LOG_TARGET: &str = "runtime::assigned_slots";
@@ -121,7 +121,8 @@ pub mod pezpallet {
pub trait Config: configuration::Config + paras::Config + slots::Config {
/// The overarching event type.
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
/// Origin for assigning slots.
type AssignSlotOrigin: EnsureOrigin<<Self as pezframe_system::Config>::RuntimeOrigin>;
@@ -637,13 +638,13 @@ mod tests {
use crate::{assigned_slots, mock::TestRegistrar, slots};
use pezframe_support::{assert_noop, assert_ok, derive_impl, parameter_types};
use pezframe_system::EnsureRoot;
use pezpallet_balances;
use pezkuwi_primitives::BlockNumber;
use pezkuwi_primitives_test_helpers::{dummy_head_data, dummy_validation_code};
use pezkuwi_runtime_teyrchains::{
configuration as teyrchains_configuration, paras as teyrchains_paras,
shared as teyrchains_shared,
};
use pezpallet_balances;
use pezsp_core::H256;
use pezsp_runtime::{
traits::{BlakeTwo256, IdentityLookup},
+1 -1
View File
@@ -23,9 +23,9 @@ use pezframe_support::{
assert_ok, derive_impl, ord_parameter_types, parameter_types, traits::EitherOfDiverse,
};
use pezframe_system::{EnsureRoot, EnsureSignedBy};
use pezpallet_balances;
use pezkuwi_primitives::{BlockNumber, Id as ParaId};
use pezkuwi_primitives_test_helpers::{dummy_head_data, dummy_validation_code};
use pezpallet_balances;
use pezsp_core::H256;
use pezsp_runtime::{
traits::{BlakeTwo256, IdentityLookup},
+3 -2
View File
@@ -32,8 +32,8 @@ use pezframe_support::{
weights::Weight,
};
use pezframe_system::pezpallet_prelude::BlockNumberFor;
pub use pezpallet::*;
use pezkuwi_primitives::Id as ParaId;
pub use pezpallet::*;
use pezsp_runtime::traits::{CheckedSub, One, Saturating, Zero};
type CurrencyOf<T> = <<T as Config>::Leaser as Leaser<BlockNumberFor<T>>>::Currency;
@@ -91,7 +91,8 @@ pub mod pezpallet {
pub trait Config: pezframe_system::Config {
/// The overarching event type.
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
/// The type representing the leasing system.
type Leaser: Leaser<
+1 -1
View File
@@ -20,9 +20,9 @@
use super::*;
use crate::{auctions::mock::*, mock::TestRegistrar};
use pezframe_support::{assert_noop, assert_ok, assert_storage_noop};
use pezpallet_balances;
use pezkuwi_primitives::Id as ParaId;
use pezkuwi_primitives_test_helpers::{dummy_hash, dummy_head_data, dummy_validation_code};
use pezpallet_balances;
use pezsp_core::H256;
use pezsp_runtime::DispatchError::BadOrigin;
@@ -25,11 +25,11 @@ use pezframe_support::{
traits::UnfilteredDispatchable,
};
use pezframe_system::RawOrigin;
use secp_utils::*;
use pezsp_runtime::{
traits::{DispatchTransaction, ValidateUnsigned},
DispatchResult,
};
use secp_utils::*;
const SEED: u32 = 0;
+3 -1
View File
@@ -23,7 +23,9 @@ use secp_utils::*;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use crate::claims;
use pezframe_support::{derive_impl, ord_parameter_types, parameter_types, traits::WithdrawReasons};
use pezframe_support::{
derive_impl, ord_parameter_types, parameter_types, traits::WithdrawReasons,
};
use pezpallet_balances;
use pezsp_runtime::{traits::Identity, BuildStorage};
+5 -4
View File
@@ -27,10 +27,8 @@ use pezframe_support::{
weights::Weight,
DefaultNoBound,
};
pub use pezpallet::*;
use pezkuwi_primitives::ValidityError;
use scale_info::TypeInfo;
use serde::{self, Deserialize, Deserializer, Serialize, Serializer};
pub use pezpallet::*;
use pezsp_io::{crypto::secp256k1_ecdsa_recover, hashing::keccak_256};
use pezsp_runtime::{
impl_tx_ext_default,
@@ -44,6 +42,8 @@ use pezsp_runtime::{
},
RuntimeDebug,
};
use scale_info::TypeInfo;
use serde::{self, Deserialize, Deserializer, Serialize, Serializer};
type CurrencyOf<T> = <<T as Config>::VestingSchedule as VestingSchedule<
<T as pezframe_system::Config>::AccountId,
@@ -209,7 +209,8 @@ pub mod pezpallet {
pub trait Config: pezframe_system::Config {
/// The overarching event type.
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type VestingSchedule: VestingSchedule<Self::AccountId, Moment = BlockNumberFor<Self>>;
#[pezpallet::constant]
type Prefix: Get<&'static [u8]>;
+1 -1
View File
@@ -21,8 +21,8 @@ use super::*;
use crate::{claims, claims::mock::*};
use claims::Call as ClaimsCall;
use hex_literal::hex;
use secp_utils::*;
use pezsp_runtime::transaction_validity::TransactionSource::External;
use secp_utils::*;
use codec::Encode;
// The testing primitives are very useful for avoiding having to work with signatures
@@ -29,8 +29,9 @@ impl<T: Config> OnRuntimeUpgrade for MigrateToTrackInactiveV2<T> {
if on_chain_version == 1 {
let mut translated = 0u64;
for item in Funds::<T>::iter_values() {
let b =
CurrencyOf::<T>::total_balance(&Pezpallet::<T>::fund_account_id(item.fund_index));
let b = CurrencyOf::<T>::total_balance(&Pezpallet::<T>::fund_account_id(
item.fund_index,
));
CurrencyOf::<T>::deactivate(b);
translated.saturating_inc();
}
+8 -4
View File
@@ -69,15 +69,15 @@ use pezframe_support::{
Identity, PalletId,
};
use pezframe_system::pezpallet_prelude::BlockNumberFor;
pub use pezpallet::*;
use pezkuwi_primitives::Id as ParaId;
use scale_info::TypeInfo;
pub use pezpallet::*;
use pezsp_runtime::{
traits::{
AccountIdConversion, CheckedAdd, Hash, IdentifyAccount, One, Saturating, Verify, Zero,
},
MultiSignature, MultiSigner, RuntimeDebug,
};
use scale_info::TypeInfo;
type CurrencyOf<T> = <<T as Config>::Auctioneer as Auctioneer<BlockNumberFor<T>>>::Currency;
type LeasePeriodOf<T> = <<T as Config>::Auctioneer as Auctioneer<BlockNumberFor<T>>>::LeasePeriod;
@@ -187,7 +187,8 @@ pub mod pezpallet {
#[pezpallet::config]
pub trait Config: pezframe_system::Config {
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
/// `PalletId` for the crowdloan pezpallet. An appropriate value could be
/// `PalletId(*b"py/cfund")`
@@ -552,7 +553,10 @@ pub mod pezpallet {
/// Remove a fund after the retirement period has ended and all funds have been returned.
#[pezpallet::call_index(4)]
#[pezpallet::weight(T::WeightInfo::dissolve())]
pub fn dissolve(origin: OriginFor<T>, #[pezpallet::compact] index: ParaId) -> DispatchResult {
pub fn dissolve(
origin: OriginFor<T>,
#[pezpallet::compact] index: ParaId,
) -> DispatchResult {
let who = ensure_signed(origin)?;
let fund = Funds::<T>::get(index).ok_or(Error::<T>::InvalidParaId)?;
+4 -3
View File
@@ -45,9 +45,10 @@ macro_rules! impl_elections_weights {
};
}
/// The numbers configured here could always be more than the the maximum limits of staking pezpallet
/// to ensure election snapshot will not run out of memory. For now, we set them to smaller values
/// since the staking is bounded and the weight pipeline takes hours for this single pezpallet.
/// The numbers configured here could always be more than the the maximum limits of staking
/// pezpallet to ensure election snapshot will not run out of memory. For now, we set them to
/// smaller values since the staking is bounded and the weight pipeline takes hours for this single
/// pezpallet.
pub struct BenchmarkConfig;
impl pezpallet_election_provider_multi_phase::BenchmarkingConfig for BenchmarkConfig {
const VOTERS: [u32; 2] = [1000, 2000];
@@ -22,8 +22,8 @@
//! - Avoid cluttering the source pezpallet with new dispatchables that are unrelated to its
//! functionality and only used for migration.
//!
//! After the migration is complete, the pezpallet may be removed from both chains' runtimes as well as
//! the `pezkuwi-runtime-common` crate.
//! After the migration is complete, the pezpallet may be removed from both chains' runtimes as well
//! as the `pezkuwi-runtime-common` crate.
use pezframe_support::{dispatch::DispatchResult, traits::Currency, weights::Weight};
pub use pezpallet::*;
@@ -79,7 +79,8 @@ pub mod pezpallet {
pub trait Config: pezframe_system::Config + pezpallet_identity::Config {
/// Overarching event type.
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
/// The origin that can reap identities. Expected to be `EnsureSigned<AccountId>` on the
/// source chain such that anyone can all this function.
@@ -119,7 +120,8 @@ pub mod pezpallet {
// - number of registrars (required to calculate weight)
// - byte size of `IdentityInfo` (required to calculate remote deposit)
// - number of sub accounts (required to calculate both weight and remote deposit)
let (registrars, bytes, subs) = pezpallet_identity::Pezpallet::<T>::reap_identity(&who)?;
let (registrars, bytes, subs) =
pezpallet_identity::Pezpallet::<T>::reap_identity(&who)?;
T::ReapIdentityHandler::on_reap_identity(&who, bytes, subs)?;
Self::deposit_event(Event::IdentityReaped { who });
let post = PostDispatchInfo {
@@ -137,7 +139,8 @@ pub mod pezpallet {
#[pezpallet::weight(<T as pezpallet::Config>::WeightInfo::poke_deposit())]
pub fn poke_deposit(origin: OriginFor<T>, who: T::AccountId) -> DispatchResultWithPostInfo {
ensure_root(origin)?;
let (id_deposit, subs_deposit) = pezpallet_identity::Pezpallet::<T>::poke_deposit(&who)?;
let (id_deposit, subs_deposit) =
pezpallet_identity::Pezpallet::<T>::poke_deposit(&who)?;
Self::deposit_event(Event::DepositUpdated {
who,
identity: id_deposit,
+4 -2
View File
@@ -22,8 +22,8 @@ use pezframe_support::traits::{
tokens::imbalance::ResolveTo,
Contains, ContainsPair, Imbalance, OnUnbalanced,
};
use pezpallet_treasury::TreasuryAccountId;
use pezkuwi_primitives::Balance;
use pezpallet_treasury::TreasuryAccountId;
use pezsp_runtime::{traits::TryConvert, Perquintill, RuntimeDebug};
use xcm::VersionedLocation;
@@ -61,7 +61,9 @@ where
// for tips, if any, 100% to author
tips.merge_into(&mut split.1);
}
ResolveTo::<TreasuryAccountId<R>, pezpallet_balances::Pezpallet<R>>::on_unbalanced(split.0);
ResolveTo::<TreasuryAccountId<R>, pezpallet_balances::Pezpallet<R>>::on_unbalanced(
split.0,
);
<ToAuthor<R> as OnUnbalanced<_>>::on_unbalanced(split.1);
}
}
@@ -34,7 +34,6 @@ use pezframe_support::{
};
use pezframe_support_test::TestRandomness;
use pezframe_system::EnsureRoot;
use pezpallet_identity::{self, legacy::IdentityInfo};
use pezkuwi_primitives::{
BlockNumber, HeadData, Id as ParaId, SessionIndex, ValidationCode, LOWEST_PUBLIC_ID,
MAX_CODE_SIZE,
@@ -42,6 +41,7 @@ use pezkuwi_primitives::{
use pezkuwi_runtime_teyrchains::{
configuration, dmp, origin, paras, shared, Origin as ParaOrigin, ParaLifecycle,
};
use pezpallet_identity::{self, legacy::IdentityInfo};
use pezsp_core::{ConstUint, H256};
use pezsp_io::TestExternalities;
use pezsp_keyring::Sr25519Keyring;
+1 -1
View File
@@ -124,11 +124,11 @@ macro_rules! impl_runtime_weights {
($runtime:ident) => {
use pezframe_support::{dispatch::DispatchClass, weights::Weight};
use pezframe_system::limits;
use pezpallet_transaction_payment::{Multiplier, TargetedFeeAdjustment};
pub use pezkuwi_runtime_common::{
impl_elections_weights, AVERAGE_ON_INITIALIZE_RATIO, MAXIMUM_BLOCK_WEIGHT,
NORMAL_DISPATCH_RATIO,
};
use pezpallet_transaction_payment::{Multiplier, TargetedFeeAdjustment};
use pezsp_runtime::{FixedPointNumber, Perquintill};
// Implement the weight types of the elections module.
@@ -37,13 +37,13 @@ use pezkuwi_runtime_teyrchains::{
use crate::traits::{OnSwap, Registrar};
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
pub use pezpallet::*;
use pezkuwi_runtime_teyrchains::paras::{OnNewHead, ParaKind};
use scale_info::TypeInfo;
pub use pezpallet::*;
use pezsp_runtime::{
traits::{CheckedSub, Saturating},
RuntimeDebug,
};
use scale_info::TypeInfo;
#[derive(
Encode,
@@ -131,7 +131,8 @@ pub mod pezpallet {
pub trait Config: configuration::Config + paras::Config {
/// The overarching event type.
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
/// The aggregated origin type must support the `teyrchains` origin. We require that we can
/// infallibly convert between this origin and the system origin, but in reality, they're
@@ -383,8 +384,8 @@ pub mod pezpallet {
///
/// This function will reserve a new Para Id to be owned/managed by the origin account.
/// The origin account is able to register head data and validation code using `register` to
/// create an on-demand teyrchain. Using the Slots pezpallet, an on-demand teyrchain can then
/// be upgraded to a lease holding teyrchain.
/// create an on-demand teyrchain. Using the Slots pezpallet, an on-demand teyrchain can
/// then be upgraded to a lease holding teyrchain.
///
/// ## Arguments
/// - `origin`: Must be called by a `Signed` origin. Becomes the manager/owner of the new
@@ -23,8 +23,8 @@ use crate::{
traits::Registrar as RegistrarTrait,
};
use pezframe_support::{assert_noop, assert_ok};
use pezpallet_balances::Error as BalancesError;
use pezkuwi_primitives::SessionIndex;
use pezpallet_balances::Error as BalancesError;
use pezsp_runtime::traits::BadOrigin;
#[test]
@@ -20,13 +20,13 @@ use alloc::boxed::Box;
use codec::Encode;
use pezframe_support::pezpallet_prelude::*;
use pezframe_system::pezpallet_prelude::*;
pub use pezpallet::*;
use pezkuwi_primitives::Id as ParaId;
use pezkuwi_runtime_teyrchains::{
configuration, dmp, hrmp,
paras::{self, AssignCoretime, ParaGenesisArgs, ParaKind},
ParaLifecycle,
};
pub use pezpallet::*;
#[pezframe_support::pezpallet]
pub mod pezpallet {
@@ -155,11 +155,12 @@ pub mod pezpallet {
ensure_root(origin)?;
ensure!(paras::Pezpallet::<T>::is_valid_para(id), Error::<T>::ParaDoesntExist);
let config = configuration::ActiveConfig::<T>::get();
dmp::Pezpallet::<T>::queue_downward_message(&config, id, xcm.encode()).map_err(|e| match e
{
dmp::QueueDownwardMessageError::ExceedsMaxMessageSize =>
Error::<T>::ExceedsMaxMessageSize.into(),
dmp::QueueDownwardMessageError::Unroutable => Error::<T>::Unroutable.into(),
dmp::Pezpallet::<T>::queue_downward_message(&config, id, xcm.encode()).map_err(|e| {
match e {
dmp::QueueDownwardMessageError::ExceedsMaxMessageSize =>
Error::<T>::ExceedsMaxMessageSize.into(),
dmp::QueueDownwardMessageError::Unroutable => Error::<T>::Unroutable.into(),
}
})
}
+3 -2
View File
@@ -24,12 +24,12 @@ use pezframe_support::{
};
use pezframe_system::pezpallet_prelude::*;
pub use pezpallet::*;
use scale_info::TypeInfo;
use pezsp_core::sr25519;
use pezsp_runtime::{
traits::{CheckedAdd, Saturating, Verify, Zero},
AnySignature, DispatchError, DispatchResult, Permill, RuntimeDebug,
};
use scale_info::TypeInfo;
type BalanceOf<T> =
<<T as Config>::Currency as Currency<<T as pezframe_system::Config>::AccountId>>::Balance;
@@ -101,7 +101,8 @@ pub mod pezpallet {
pub trait Config: pezframe_system::Config {
/// The overarching event type.
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
/// Balances Pezpallet
type Currency: Currency<Self::AccountId>;
+6 -5
View File
@@ -19,8 +19,8 @@
//! teyrchains and parathreads to be swapped.
//!
//! This doesn't handle the mechanics of determining which para ID actually ends up with a teyrchain
//! lease. This must handled by a separately, through the trait interface that this pezpallet provides
//! or the root dispatchables.
//! lease. This must handled by a separately, through the trait interface that this pezpallet
//! provides or the root dispatchables.
pub mod migration;
@@ -32,8 +32,8 @@ use pezframe_support::{
weights::Weight,
};
use pezframe_system::pezpallet_prelude::*;
pub use pezpallet::*;
use pezkuwi_primitives::Id as ParaId;
pub use pezpallet::*;
use pezsp_runtime::traits::{CheckedConversion, CheckedSub, Saturating, Zero};
type BalanceOf<T> =
@@ -75,7 +75,8 @@ pub mod pezpallet {
pub trait Config: pezframe_system::Config {
/// The overarching event type.
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>>
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
/// The currency type used for bidding.
type Currency: ReservableCurrency<Self::AccountId>;
@@ -506,9 +507,9 @@ mod tests {
use crate::{mock::TestRegistrar, slots};
use pezframe_support::{assert_noop, assert_ok, derive_impl, parameter_types};
use pezframe_system::EnsureRoot;
use pezpallet_balances;
use pezkuwi_primitives::BlockNumber;
use pezkuwi_primitives_test_helpers::{dummy_head_data, dummy_validation_code};
use pezpallet_balances;
use pezsp_core::H256;
use pezsp_runtime::{
traits::{BlakeTwo256, IdentityLookup},
+3 -1
View File
@@ -26,7 +26,9 @@ use pezpallet_staking::*;
/// register all inactive nominators for fast-unstake, and progress until they have all been
/// processed.
pub fn migrate_all_inactive_nominators<T: pezpallet_fast_unstake::Config + pezpallet_staking::Config>()
pub fn migrate_all_inactive_nominators<
T: pezpallet_fast_unstake::Config + pezpallet_staking::Config,
>()
where
<T as pezframe_system::Config>::RuntimeEvent: TryInto<pezpallet_fast_unstake::Event<T>>,
{