feat: Rebrand Polkadot/Substrate references to PezkuwiChain
This commit systematically rebrands various references from Parity Technologies' Polkadot/Substrate ecosystem to PezkuwiChain within the kurdistan-sdk. Key changes include: - Updated external repository URLs (zombienet-sdk, parity-db, parity-scale-codec, wasm-instrument) to point to pezkuwichain forks. - Modified internal documentation and code comments to reflect PezkuwiChain naming and structure. - Replaced direct references to with or specific paths within the for XCM, Pezkuwi, and other modules. - Cleaned up deprecated issue and PR references in various and files, particularly in and modules. - Adjusted image and logo URLs in documentation to point to PezkuwiChain assets. - Removed or rephrased comments related to external Polkadot/Substrate PRs and issues. This is a significant step towards fully customizing the SDK for the PezkuwiChain ecosystem.
This commit is contained in:
@@ -16,10 +16,10 @@
|
||||
#![cfg(feature = "runtime-benchmarks")]
|
||||
|
||||
use crate::configuration::*;
|
||||
use frame_benchmarking::v2::*;
|
||||
use frame_system::RawOrigin;
|
||||
use pezframe_benchmarking::v2::*;
|
||||
use pezframe_system::RawOrigin;
|
||||
use pezkuwi_primitives::{ExecutorParam, ExecutorParams, PvfExecKind, PvfPrepKind};
|
||||
use sp_runtime::traits::One;
|
||||
use pezsp_runtime::traits::One;
|
||||
|
||||
#[benchmarks]
|
||||
mod benchmarks {
|
||||
|
||||
@@ -18,17 +18,17 @@
|
||||
|
||||
use crate::configuration::{Config, Pallet};
|
||||
use alloc::vec::Vec;
|
||||
use frame_support::{
|
||||
pallet_prelude::*,
|
||||
use pezframe_support::{
|
||||
pezpallet_prelude::*,
|
||||
traits::{Defensive, UncheckedOnRuntimeUpgrade},
|
||||
weights::Weight,
|
||||
};
|
||||
use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
use pezkuwi_primitives::{
|
||||
AsyncBackingParams, Balance, ExecutorParams, NodeFeatures, SessionIndex,
|
||||
LEGACY_MIN_BACKING_VOTES, ON_DEMAND_DEFAULT_QUEUE_MAX_SIZE,
|
||||
};
|
||||
use sp_runtime::Perbill;
|
||||
use pezsp_runtime::Perbill;
|
||||
|
||||
use super::v9::V9HostConfiguration;
|
||||
// All configuration of the runtime with respect to paras.
|
||||
@@ -137,11 +137,11 @@ impl<BlockNumber: Default + From<u32>> Default for V10HostConfiguration<BlockNum
|
||||
mod v9 {
|
||||
use super::*;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type ActiveConfig<T: Config> =
|
||||
StorageValue<Pallet<T>, V9HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type PendingConfigs<T: Config> = StorageValue<
|
||||
Pallet<T>,
|
||||
Vec<(SessionIndex, V9HostConfiguration<BlockNumberFor<T>>)>,
|
||||
@@ -152,11 +152,11 @@ mod v9 {
|
||||
mod v10 {
|
||||
use super::*;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type ActiveConfig<T: Config> =
|
||||
StorageValue<Pallet<T>, V10HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type PendingConfigs<T: Config> = StorageValue<
|
||||
Pallet<T>,
|
||||
Vec<(SessionIndex, V10HostConfiguration<BlockNumberFor<T>>)>,
|
||||
@@ -167,7 +167,7 @@ mod v10 {
|
||||
pub struct VersionUncheckedMigrateToV10<T>(core::marker::PhantomData<T>);
|
||||
impl<T: Config> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateToV10<T> {
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<Vec<u8>, sp_runtime::TryRuntimeError> {
|
||||
fn pre_upgrade() -> Result<Vec<u8>, pezsp_runtime::TryRuntimeError> {
|
||||
log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade() for HostConfiguration MigrateToV10");
|
||||
Ok(Vec::new())
|
||||
}
|
||||
@@ -177,7 +177,7 @@ impl<T: Config> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateToV10<T> {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), sp_runtime::TryRuntimeError> {
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade() for HostConfiguration MigrateToV10");
|
||||
ensure!(
|
||||
Pallet::<T>::on_chain_storage_version() >= StorageVersion::new(10),
|
||||
@@ -188,12 +188,12 @@ impl<T: Config> UncheckedOnRuntimeUpgrade for VersionUncheckedMigrateToV10<T> {
|
||||
}
|
||||
}
|
||||
|
||||
pub type MigrateToV10<T> = frame_support::migrations::VersionedMigration<
|
||||
pub type MigrateToV10<T> = pezframe_support::migrations::VersionedMigration<
|
||||
9,
|
||||
10,
|
||||
VersionUncheckedMigrateToV10<T>,
|
||||
Pallet<T>,
|
||||
<T as frame_system::Config>::DbWeight,
|
||||
<T as pezframe_system::Config>::DbWeight,
|
||||
>;
|
||||
|
||||
// Unusual formatting is justified:
|
||||
|
||||
@@ -18,20 +18,20 @@
|
||||
|
||||
use crate::configuration::{self, Config, Pallet};
|
||||
use alloc::vec::Vec;
|
||||
use frame_support::{
|
||||
use pezframe_support::{
|
||||
migrations::VersionedMigration,
|
||||
pallet_prelude::*,
|
||||
pezpallet_prelude::*,
|
||||
traits::{Defensive, UncheckedOnRuntimeUpgrade},
|
||||
weights::Weight,
|
||||
};
|
||||
use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
use pezkuwi_primitives::{
|
||||
ApprovalVotingParams, AsyncBackingParams, ExecutorParams, NodeFeatures, SessionIndex,
|
||||
LEGACY_MIN_BACKING_VOTES, ON_DEMAND_DEFAULT_QUEUE_MAX_SIZE,
|
||||
};
|
||||
|
||||
use pezkuwi_core_primitives::Balance;
|
||||
use sp_arithmetic::Perbill;
|
||||
use pezsp_arithmetic::Perbill;
|
||||
|
||||
use super::v10::V10HostConfiguration;
|
||||
|
||||
@@ -142,11 +142,11 @@ impl<BlockNumber: Default + From<u32>> Default for V11HostConfiguration<BlockNum
|
||||
mod v10 {
|
||||
use super::*;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type ActiveConfig<T: Config> =
|
||||
StorageValue<Pallet<T>, V10HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type PendingConfigs<T: Config> = StorageValue<
|
||||
Pallet<T>,
|
||||
Vec<(SessionIndex, V10HostConfiguration<BlockNumberFor<T>>)>,
|
||||
@@ -157,11 +157,11 @@ mod v10 {
|
||||
mod v11 {
|
||||
use super::*;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type ActiveConfig<T: Config> =
|
||||
StorageValue<Pallet<T>, V11HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type PendingConfigs<T: Config> = StorageValue<
|
||||
Pallet<T>,
|
||||
Vec<(SessionIndex, V11HostConfiguration<BlockNumberFor<T>>)>,
|
||||
@@ -174,13 +174,13 @@ pub type MigrateToV11<T> = VersionedMigration<
|
||||
11,
|
||||
UncheckedMigrateToV11<T>,
|
||||
Pallet<T>,
|
||||
<T as frame_system::Config>::DbWeight,
|
||||
<T as pezframe_system::Config>::DbWeight,
|
||||
>;
|
||||
|
||||
pub struct UncheckedMigrateToV11<T>(core::marker::PhantomData<T>);
|
||||
impl<T: Config> UncheckedOnRuntimeUpgrade for UncheckedMigrateToV11<T> {
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<Vec<u8>, sp_runtime::TryRuntimeError> {
|
||||
fn pre_upgrade() -> Result<Vec<u8>, pezsp_runtime::TryRuntimeError> {
|
||||
log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade() for HostConfiguration MigrateToV11");
|
||||
Ok(Vec::new())
|
||||
}
|
||||
@@ -195,7 +195,7 @@ impl<T: Config> UncheckedOnRuntimeUpgrade for UncheckedMigrateToV11<T> {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), sp_runtime::TryRuntimeError> {
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade() for HostConfiguration MigrateToV11");
|
||||
ensure!(
|
||||
StorageVersion::get::<Pallet<T>>() >= 11,
|
||||
|
||||
@@ -18,26 +18,26 @@
|
||||
|
||||
use crate::configuration::{self, migration::v11::V11HostConfiguration, Config, Pallet};
|
||||
use alloc::vec::Vec;
|
||||
use frame_support::{
|
||||
use pezframe_support::{
|
||||
migrations::VersionedMigration,
|
||||
pallet_prelude::*,
|
||||
pezpallet_prelude::*,
|
||||
traits::{Defensive, UncheckedOnRuntimeUpgrade},
|
||||
};
|
||||
use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
use pezkuwi_primitives::SchedulerParams;
|
||||
use sp_core::Get;
|
||||
use sp_staking::SessionIndex;
|
||||
use pezsp_core::Get;
|
||||
use pezsp_staking::SessionIndex;
|
||||
|
||||
type V12HostConfiguration<BlockNumber> = configuration::HostConfiguration<BlockNumber>;
|
||||
|
||||
mod v11 {
|
||||
use super::*;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type ActiveConfig<T: Config> =
|
||||
StorageValue<Pallet<T>, V11HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type PendingConfigs<T: Config> = StorageValue<
|
||||
Pallet<T>,
|
||||
Vec<(SessionIndex, V11HostConfiguration<BlockNumberFor<T>>)>,
|
||||
@@ -48,11 +48,11 @@ mod v11 {
|
||||
mod v12 {
|
||||
use super::*;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type ActiveConfig<T: Config> =
|
||||
StorageValue<Pallet<T>, V12HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type PendingConfigs<T: Config> = StorageValue<
|
||||
Pallet<T>,
|
||||
Vec<(SessionIndex, V12HostConfiguration<BlockNumberFor<T>>)>,
|
||||
@@ -65,14 +65,14 @@ pub type MigrateToV12<T> = VersionedMigration<
|
||||
12,
|
||||
UncheckedMigrateToV12<T>,
|
||||
Pallet<T>,
|
||||
<T as frame_system::Config>::DbWeight,
|
||||
<T as pezframe_system::Config>::DbWeight,
|
||||
>;
|
||||
|
||||
pub struct UncheckedMigrateToV12<T>(core::marker::PhantomData<T>);
|
||||
|
||||
impl<T: Config> UncheckedOnRuntimeUpgrade for UncheckedMigrateToV12<T> {
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<Vec<u8>, sp_runtime::TryRuntimeError> {
|
||||
fn pre_upgrade() -> Result<Vec<u8>, pezsp_runtime::TryRuntimeError> {
|
||||
log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade() for HostConfiguration MigrateToV12");
|
||||
Ok(Vec::new())
|
||||
}
|
||||
@@ -87,7 +87,7 @@ impl<T: Config> UncheckedOnRuntimeUpgrade for UncheckedMigrateToV12<T> {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), sp_runtime::TryRuntimeError> {
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade() for HostConfiguration MigrateToV12");
|
||||
ensure!(
|
||||
StorageVersion::get::<Pallet<T>>() >= 12,
|
||||
@@ -183,7 +183,7 @@ fn migrate_to_v12<T: Config>() -> Weight {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use pezkuwi_primitives::LEGACY_MIN_BACKING_VOTES;
|
||||
use sp_arithmetic::Perbill;
|
||||
use pezsp_arithmetic::Perbill;
|
||||
|
||||
use super::*;
|
||||
use crate::mock::{new_test_ext, Test};
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
use crate::configuration::{Config, Pallet};
|
||||
use alloc::vec::Vec;
|
||||
use frame_support::pallet_prelude::*;
|
||||
use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use pezframe_support::pezpallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
|
||||
use pezkuwi_primitives::{AsyncBackingParams, Balance, ExecutorParams, SessionIndex};
|
||||
|
||||
@@ -122,11 +122,11 @@ impl<BlockNumber: Default + From<u32>> Default for V6HostConfiguration<BlockNumb
|
||||
mod v6 {
|
||||
use super::*;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type ActiveConfig<T: Config> =
|
||||
StorageValue<Pallet<T>, V6HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type PendingConfigs<T: Config> = StorageValue<
|
||||
Pallet<T>,
|
||||
Vec<(SessionIndex, V6HostConfiguration<BlockNumberFor<T>>)>,
|
||||
|
||||
@@ -18,15 +18,15 @@
|
||||
|
||||
use crate::configuration::{self, Config, Pallet};
|
||||
use alloc::vec::Vec;
|
||||
use frame_support::{
|
||||
pallet_prelude::*,
|
||||
use pezframe_support::{
|
||||
pezpallet_prelude::*,
|
||||
traits::{Defensive, StorageVersion},
|
||||
weights::Weight,
|
||||
};
|
||||
use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
use pezkuwi_primitives::{AsyncBackingParams, Balance, ExecutorParams, SessionIndex};
|
||||
|
||||
use frame_support::traits::OnRuntimeUpgrade;
|
||||
use pezframe_support::traits::OnRuntimeUpgrade;
|
||||
|
||||
use super::v6::V6HostConfiguration;
|
||||
|
||||
@@ -127,11 +127,11 @@ impl<BlockNumber: Default + From<u32>> Default for V7HostConfiguration<BlockNumb
|
||||
mod v6 {
|
||||
use super::*;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type ActiveConfig<T: Config> =
|
||||
StorageValue<Pallet<T>, V6HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type PendingConfigs<T: Config> = StorageValue<
|
||||
Pallet<T>,
|
||||
Vec<(SessionIndex, V6HostConfiguration<BlockNumberFor<T>>)>,
|
||||
@@ -142,11 +142,11 @@ mod v6 {
|
||||
mod v7 {
|
||||
use super::*;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type ActiveConfig<T: Config> =
|
||||
StorageValue<Pallet<T>, V7HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type PendingConfigs<T: Config> = StorageValue<
|
||||
Pallet<T>,
|
||||
Vec<(SessionIndex, V7HostConfiguration<BlockNumberFor<T>>)>,
|
||||
@@ -157,7 +157,7 @@ mod v7 {
|
||||
pub struct MigrateToV7<T>(core::marker::PhantomData<T>);
|
||||
impl<T: Config> OnRuntimeUpgrade for MigrateToV7<T> {
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<Vec<u8>, sp_runtime::TryRuntimeError> {
|
||||
fn pre_upgrade() -> Result<Vec<u8>, pezsp_runtime::TryRuntimeError> {
|
||||
log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade()");
|
||||
Ok(Vec::new())
|
||||
}
|
||||
@@ -178,7 +178,7 @@ impl<T: Config> OnRuntimeUpgrade for MigrateToV7<T> {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), sp_runtime::TryRuntimeError> {
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade()");
|
||||
ensure!(
|
||||
StorageVersion::get::<Pallet<T>>() >= 7,
|
||||
|
||||
@@ -18,18 +18,18 @@
|
||||
|
||||
use crate::configuration::{self, Config, Pallet};
|
||||
use alloc::vec::Vec;
|
||||
use frame_support::{
|
||||
pallet_prelude::*,
|
||||
use pezframe_support::{
|
||||
pezpallet_prelude::*,
|
||||
traits::{Defensive, StorageVersion},
|
||||
weights::Weight,
|
||||
};
|
||||
use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
use pezkuwi_primitives::{
|
||||
AsyncBackingParams, Balance, ExecutorParams, SessionIndex, ON_DEMAND_DEFAULT_QUEUE_MAX_SIZE,
|
||||
};
|
||||
use sp_runtime::Perbill;
|
||||
use pezsp_runtime::Perbill;
|
||||
|
||||
use frame_support::traits::OnRuntimeUpgrade;
|
||||
use pezframe_support::traits::OnRuntimeUpgrade;
|
||||
|
||||
use super::v7::V7HostConfiguration;
|
||||
/// All configuration of the runtime with respect to paras.
|
||||
@@ -134,11 +134,11 @@ impl<BlockNumber: Default + From<u32>> Default for V8HostConfiguration<BlockNumb
|
||||
mod v7 {
|
||||
use super::*;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type ActiveConfig<T: Config> =
|
||||
StorageValue<Pallet<T>, V7HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type PendingConfigs<T: Config> = StorageValue<
|
||||
Pallet<T>,
|
||||
Vec<(SessionIndex, V7HostConfiguration<BlockNumberFor<T>>)>,
|
||||
@@ -149,11 +149,11 @@ mod v7 {
|
||||
mod v8 {
|
||||
use super::*;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type ActiveConfig<T: Config> =
|
||||
StorageValue<Pallet<T>, V8HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type PendingConfigs<T: Config> = StorageValue<
|
||||
Pallet<T>,
|
||||
Vec<(SessionIndex, V8HostConfiguration<BlockNumberFor<T>>)>,
|
||||
@@ -164,7 +164,7 @@ mod v8 {
|
||||
pub struct MigrateToV8<T>(core::marker::PhantomData<T>);
|
||||
impl<T: Config> OnRuntimeUpgrade for MigrateToV8<T> {
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<Vec<u8>, sp_runtime::TryRuntimeError> {
|
||||
fn pre_upgrade() -> Result<Vec<u8>, pezsp_runtime::TryRuntimeError> {
|
||||
log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade() for HostConfiguration MigrateToV8");
|
||||
Ok(Vec::new())
|
||||
}
|
||||
@@ -185,7 +185,7 @@ impl<T: Config> OnRuntimeUpgrade for MigrateToV8<T> {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), sp_runtime::TryRuntimeError> {
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade() for HostConfiguration MigrateToV8");
|
||||
ensure!(
|
||||
StorageVersion::get::<Pallet<T>>() >= 8,
|
||||
|
||||
@@ -18,19 +18,19 @@
|
||||
|
||||
use crate::configuration::{self, Config, Pallet};
|
||||
use alloc::vec::Vec;
|
||||
use frame_support::{
|
||||
pallet_prelude::*,
|
||||
use pezframe_support::{
|
||||
pezpallet_prelude::*,
|
||||
traits::{Defensive, StorageVersion},
|
||||
weights::Weight,
|
||||
};
|
||||
use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
use pezkuwi_primitives::{
|
||||
AsyncBackingParams, Balance, ExecutorParams, SessionIndex, LEGACY_MIN_BACKING_VOTES,
|
||||
ON_DEMAND_DEFAULT_QUEUE_MAX_SIZE,
|
||||
};
|
||||
use sp_runtime::Perbill;
|
||||
use pezsp_runtime::Perbill;
|
||||
|
||||
use frame_support::traits::OnRuntimeUpgrade;
|
||||
use pezframe_support::traits::OnRuntimeUpgrade;
|
||||
|
||||
use super::v8::V8HostConfiguration;
|
||||
/// All configuration of the runtime with respect to paras.
|
||||
@@ -137,11 +137,11 @@ impl<BlockNumber: Default + From<u32>> Default for V9HostConfiguration<BlockNumb
|
||||
mod v8 {
|
||||
use super::*;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type ActiveConfig<T: Config> =
|
||||
StorageValue<Pallet<T>, V8HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type PendingConfigs<T: Config> = StorageValue<
|
||||
Pallet<T>,
|
||||
Vec<(SessionIndex, V8HostConfiguration<BlockNumberFor<T>>)>,
|
||||
@@ -152,11 +152,11 @@ mod v8 {
|
||||
mod v9 {
|
||||
use super::*;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type ActiveConfig<T: Config> =
|
||||
StorageValue<Pallet<T>, V9HostConfiguration<BlockNumberFor<T>>, OptionQuery>;
|
||||
|
||||
#[frame_support::storage_alias]
|
||||
#[pezframe_support::storage_alias]
|
||||
pub(crate) type PendingConfigs<T: Config> = StorageValue<
|
||||
Pallet<T>,
|
||||
Vec<(SessionIndex, V9HostConfiguration<BlockNumberFor<T>>)>,
|
||||
@@ -167,7 +167,7 @@ mod v9 {
|
||||
pub struct MigrateToV9<T>(core::marker::PhantomData<T>);
|
||||
impl<T: Config> OnRuntimeUpgrade for MigrateToV9<T> {
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<Vec<u8>, sp_runtime::TryRuntimeError> {
|
||||
fn pre_upgrade() -> Result<Vec<u8>, pezsp_runtime::TryRuntimeError> {
|
||||
log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade() for HostConfiguration MigrateToV9");
|
||||
Ok(Vec::new())
|
||||
}
|
||||
@@ -188,7 +188,7 @@ impl<T: Config> OnRuntimeUpgrade for MigrateToV9<T> {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), sp_runtime::TryRuntimeError> {
|
||||
fn post_upgrade(_state: Vec<u8>) -> Result<(), pezsp_runtime::TryRuntimeError> {
|
||||
log::trace!(target: crate::configuration::LOG_TARGET, "Running post_upgrade() for HostConfiguration MigrateToV9");
|
||||
ensure!(
|
||||
StorageVersion::get::<Pallet<T>>() >= 9,
|
||||
|
||||
@@ -20,7 +20,7 @@ use crate::{
|
||||
mock::{new_test_ext, Configuration, MockGenesisConfig, ParasShared, RuntimeOrigin, Test},
|
||||
};
|
||||
use bitvec::{bitvec, prelude::Lsb0};
|
||||
use frame_support::{assert_err, assert_ok};
|
||||
use pezframe_support::{assert_err, assert_ok};
|
||||
|
||||
fn on_new_session(session_index: SessionIndex) -> (HostConfiguration<u32>, HostConfiguration<u32>) {
|
||||
ParasShared::set_session_index(session_index);
|
||||
@@ -513,7 +513,7 @@ fn verify_externally_accessible() {
|
||||
ActiveConfig::<Test>::put(ground_truth.clone());
|
||||
|
||||
// Extract the active config via the well known key.
|
||||
let raw_active_config = sp_io::storage::get(well_known_keys::ACTIVE_CONFIG)
|
||||
let raw_active_config = pezsp_io::storage::get(well_known_keys::ACTIVE_CONFIG)
|
||||
.expect("config must be present in storage under ACTIVE_CONFIG");
|
||||
let abridged_config = AbridgedHostConfiguration::decode(&mut &raw_active_config[..])
|
||||
.expect("HostConfiguration must be decodable into AbridgedHostConfiguration");
|
||||
@@ -539,7 +539,7 @@ fn verify_externally_accessible() {
|
||||
|
||||
#[test]
|
||||
fn active_config_hrmp_channel_size_and_capacity_ratio_works() {
|
||||
frame_support::parameter_types! {
|
||||
pezframe_support::parameter_types! {
|
||||
pub Ratio100: Percent = Percent::from_percent(100);
|
||||
pub Ratio50: Percent = Percent::from_percent(50);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user