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:
@@ -19,9 +19,9 @@
|
||||
#![cfg(feature = "runtime-benchmarks")]
|
||||
|
||||
use super::*;
|
||||
use frame_benchmarking::v2::*;
|
||||
use frame_support::traits::OriginTrait;
|
||||
use pallet_broker::CoreIndex as BrokerCoreIndex;
|
||||
use pezframe_benchmarking::v2::*;
|
||||
use pezframe_support::traits::OriginTrait;
|
||||
use pezpallet_broker::CoreIndex as BrokerCoreIndex;
|
||||
|
||||
#[benchmarks]
|
||||
mod benchmarks {
|
||||
@@ -30,12 +30,12 @@ mod benchmarks {
|
||||
|
||||
#[benchmark]
|
||||
fn request_revenue_at() {
|
||||
let root_origin = <T as frame_system::Config>::RuntimeOrigin::root();
|
||||
let root_origin = <T as pezframe_system::Config>::RuntimeOrigin::root();
|
||||
let mhr = <T as on_demand::Config>::MaxHistoricalRevenue::get();
|
||||
frame_system::Pallet::<T>::set_block_number((mhr + 2).into());
|
||||
pezframe_system::Pallet::<T>::set_block_number((mhr + 2).into());
|
||||
let minimum_balance = <T as on_demand::Config>::Currency::minimum_balance();
|
||||
let rev: BoundedVec<
|
||||
<<T as on_demand::Config>::Currency as frame_support::traits::Currency<
|
||||
<<T as on_demand::Config>::Currency as pezframe_support::traits::Currency<
|
||||
T::AccountId,
|
||||
>>::Balance,
|
||||
T::MaxHistoricalRevenue,
|
||||
@@ -51,17 +51,17 @@ mod benchmarks {
|
||||
);
|
||||
|
||||
#[extrinsic_call]
|
||||
_(root_origin as <T as frame_system::Config>::RuntimeOrigin, mhr + 1)
|
||||
_(root_origin as <T as pezframe_system::Config>::RuntimeOrigin, mhr + 1)
|
||||
}
|
||||
|
||||
#[benchmark]
|
||||
fn request_core_count() {
|
||||
// Setup
|
||||
let root_origin = <T as frame_system::Config>::RuntimeOrigin::root();
|
||||
let root_origin = <T as pezframe_system::Config>::RuntimeOrigin::root();
|
||||
|
||||
#[extrinsic_call]
|
||||
_(
|
||||
root_origin as <T as frame_system::Config>::RuntimeOrigin,
|
||||
root_origin as <T as pezframe_system::Config>::RuntimeOrigin,
|
||||
// random core count
|
||||
100,
|
||||
)
|
||||
@@ -70,7 +70,7 @@ mod benchmarks {
|
||||
#[benchmark]
|
||||
fn assign_core(s: Linear<1, 100>) {
|
||||
// Setup
|
||||
let root_origin = <T as frame_system::Config>::RuntimeOrigin::root();
|
||||
let root_origin = <T as pezframe_system::Config>::RuntimeOrigin::root();
|
||||
|
||||
// Use parameterized assignment count
|
||||
let mut assignments: Vec<(CoreAssignment, PartsOf57600)> = vec![0u16; s as usize - 1]
|
||||
@@ -89,7 +89,7 @@ mod benchmarks {
|
||||
|
||||
#[extrinsic_call]
|
||||
_(
|
||||
root_origin as <T as frame_system::Config>::RuntimeOrigin,
|
||||
root_origin as <T as pezframe_system::Config>::RuntimeOrigin,
|
||||
core_index,
|
||||
BlockNumberFor::<T>::from(5u32),
|
||||
assignments,
|
||||
@@ -100,10 +100,10 @@ mod benchmarks {
|
||||
#[benchmark]
|
||||
fn credit_account() {
|
||||
// Setup
|
||||
let root_origin = <T as frame_system::Config>::RuntimeOrigin::root();
|
||||
let root_origin = <T as pezframe_system::Config>::RuntimeOrigin::root();
|
||||
let who: T::AccountId = whitelisted_caller();
|
||||
|
||||
#[extrinsic_call]
|
||||
_(root_origin as <T as frame_system::Config>::RuntimeOrigin, who, 1_000_000u32.into())
|
||||
_(root_origin as <T as pezframe_system::Config>::RuntimeOrigin, who, 1_000_000u32.into())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,18 +30,18 @@ mod v_coretime {
|
||||
use codec::Encode;
|
||||
use core::{iter, result};
|
||||
#[cfg(feature = "try-runtime")]
|
||||
use frame_support::ensure;
|
||||
use frame_support::{
|
||||
use pezframe_support::ensure;
|
||||
use pezframe_support::{
|
||||
traits::{OnRuntimeUpgrade, PalletInfoAccess, StorageVersion},
|
||||
weights::Weight,
|
||||
};
|
||||
use frame_system::pallet_prelude::BlockNumberFor;
|
||||
use pallet_broker::{CoreAssignment, CoreMask, ScheduleItem};
|
||||
use pezframe_system::pezpallet_prelude::BlockNumberFor;
|
||||
use pezpallet_broker::{CoreAssignment, CoreMask, ScheduleItem};
|
||||
use pezkuwi_primitives::{CoreIndex, Id as ParaId};
|
||||
use pezkuwi_teyrchain_primitives::primitives::IsSystem;
|
||||
use sp_arithmetic::traits::SaturatedConversion;
|
||||
use sp_core::Get;
|
||||
use sp_runtime::BoundedVec;
|
||||
use pezsp_arithmetic::traits::SaturatedConversion;
|
||||
use pezsp_core::Get;
|
||||
use pezsp_runtime::BoundedVec;
|
||||
use xcm::prelude::{
|
||||
send_xcm, Instruction, Junction, Location, SendError, SendXcm, WeightLimit, Xcm,
|
||||
};
|
||||
@@ -77,7 +77,7 @@ mod v_coretime {
|
||||
let storage_version_key = StorageVersion::storage_key::<assigner_coretime::Pallet<T>>();
|
||||
|
||||
loop {
|
||||
match sp_io::storage::next_key(&next_key) {
|
||||
match pezsp_io::storage::next_key(&next_key) {
|
||||
// StorageVersion is initialized before, so we need to ignore it.
|
||||
Some(key) if &key == &storage_version_key => {
|
||||
next_key = key;
|
||||
@@ -112,7 +112,7 @@ mod v_coretime {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<Vec<u8>, sp_runtime::DispatchError> {
|
||||
fn pre_upgrade() -> Result<Vec<u8>, pezsp_runtime::DispatchError> {
|
||||
if Self::already_migrated() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
@@ -130,7 +130,7 @@ mod v_coretime {
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade(state: Vec<u8>) -> Result<(), sp_runtime::DispatchError> {
|
||||
fn post_upgrade(state: Vec<u8>) -> Result<(), pezsp_runtime::DispatchError> {
|
||||
if state.is_empty() {
|
||||
return Ok(());
|
||||
}
|
||||
@@ -165,7 +165,7 @@ mod v_coretime {
|
||||
>() -> Weight {
|
||||
let legacy_paras = LegacyLease::get_all_teyrchains_with_leases();
|
||||
let legacy_count = legacy_paras.len() as u32;
|
||||
let now = frame_system::Pallet::<T>::block_number();
|
||||
let now = pezframe_system::Pallet::<T>::block_number();
|
||||
for (core, para_id) in legacy_paras.into_iter().enumerate() {
|
||||
let r = assigner_coretime::Pallet::<T>::assign_core(
|
||||
CoreIndex(core as u32),
|
||||
|
||||
@@ -20,16 +20,16 @@
|
||||
|
||||
use alloc::{vec, vec::Vec};
|
||||
use core::result;
|
||||
use frame_support::{
|
||||
pallet_prelude::*,
|
||||
use pezframe_support::{
|
||||
pezpallet_prelude::*,
|
||||
traits::{defensive_prelude::*, Currency},
|
||||
};
|
||||
use frame_system::pallet_prelude::*;
|
||||
use pezframe_system::pezpallet_prelude::*;
|
||||
pub use pallet::*;
|
||||
use pallet_broker::{CoreAssignment, CoreIndex as BrokerCoreIndex};
|
||||
use pezpallet_broker::{CoreAssignment, CoreIndex as BrokerCoreIndex};
|
||||
use pezkuwi_primitives::{Balance, BlockNumber, CoreIndex, Id as ParaId};
|
||||
use sp_arithmetic::traits::SaturatedConversion;
|
||||
use sp_runtime::traits::TryConvert;
|
||||
use pezsp_arithmetic::traits::SaturatedConversion;
|
||||
use pezsp_runtime::traits::TryConvert;
|
||||
use xcm::prelude::*;
|
||||
use xcm_executor::traits::TransactAsset;
|
||||
|
||||
@@ -72,7 +72,7 @@ impl WeightInfo for TestWeightInfo {
|
||||
|
||||
/// Shorthand for the Balance type the runtime is using.
|
||||
pub type BalanceOf<T> = <<T as on_demand::Config>::Currency as Currency<
|
||||
<T as frame_system::Config>::AccountId,
|
||||
<T as pezframe_system::Config>::AccountId,
|
||||
>>::Balance;
|
||||
|
||||
/// Broker pallet index on the coretime chain. Used to
|
||||
@@ -89,9 +89,9 @@ enum BrokerRuntimePallets {
|
||||
#[derive(Encode, Decode)]
|
||||
enum CoretimeCalls {
|
||||
#[codec(index = 1)]
|
||||
Reserve(pallet_broker::Schedule),
|
||||
Reserve(pezpallet_broker::Schedule),
|
||||
#[codec(index = 3)]
|
||||
SetLease(pallet_broker::TaskId, pallet_broker::Timeslice),
|
||||
SetLease(pezpallet_broker::TaskId, pezpallet_broker::Timeslice),
|
||||
#[codec(index = 19)]
|
||||
NotifyCoreCount(u16),
|
||||
#[codec(index = 20)]
|
||||
@@ -100,11 +100,11 @@ enum CoretimeCalls {
|
||||
SwapLeases(ParaId, ParaId),
|
||||
}
|
||||
|
||||
#[frame_support::pallet]
|
||||
#[pezframe_support::pallet]
|
||||
pub mod pallet {
|
||||
|
||||
use crate::configuration;
|
||||
use sp_runtime::traits::TryConvert;
|
||||
use pezsp_runtime::traits::TryConvert;
|
||||
use xcm::latest::InteriorLocation;
|
||||
use xcm_executor::traits::TransactAsset;
|
||||
|
||||
@@ -115,11 +115,11 @@ pub mod pallet {
|
||||
pub struct Pallet<T>(_);
|
||||
|
||||
#[pallet::config]
|
||||
pub trait Config: frame_system::Config + assigner_coretime::Config + on_demand::Config {
|
||||
type RuntimeOrigin: From<<Self as frame_system::Config>::RuntimeOrigin>
|
||||
pub trait Config: pezframe_system::Config + assigner_coretime::Config + on_demand::Config {
|
||||
type RuntimeOrigin: From<<Self as pezframe_system::Config>::RuntimeOrigin>
|
||||
+ Into<result::Result<Origin, <Self as Config>::RuntimeOrigin>>;
|
||||
#[allow(deprecated)]
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
/// The ParaId of the coretime chain.
|
||||
#[pallet::constant]
|
||||
type BrokerId: Get<u32>;
|
||||
@@ -242,7 +242,7 @@ pub mod pallet {
|
||||
impl<T: Config> Pallet<T> {
|
||||
/// Ensure the origin is one of Root or the `para` itself.
|
||||
fn ensure_root_or_para(
|
||||
origin: <T as frame_system::Config>::RuntimeOrigin,
|
||||
origin: <T as pezframe_system::Config>::RuntimeOrigin,
|
||||
id: ParaId,
|
||||
) -> DispatchResult {
|
||||
if let Ok(caller_id) = ensure_teyrchain(<T as Config>::RuntimeOrigin::from(origin.clone()))
|
||||
@@ -287,7 +287,7 @@ impl<T: Config> Pallet<T> {
|
||||
/// The Relay-chain must be configured to ensure that only a single revenue information
|
||||
/// destination exists.
|
||||
pub fn notify_revenue(until: BlockNumber) -> DispatchResult {
|
||||
let now = <frame_system::Pallet<T>>::block_number();
|
||||
let now = <pezframe_system::Pallet<T>>::block_number();
|
||||
let until_bnf: BlockNumberFor<T> = until.into();
|
||||
|
||||
// When cannot be in the future.
|
||||
|
||||
Reference in New Issue
Block a user