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:
2025-12-14 00:04:10 +03:00
parent 286de54384
commit 1c0e57d984
9084 changed files with 997839 additions and 997557 deletions
+50 -50
View File
@@ -26,23 +26,23 @@
// External crates imports
use alloc::vec::Vec;
use pezkuwi_sdk::{staging_teyrchain_info as teyrchain_info, *};
use pezkuwi_sdk::{pezstaging_teyrchain_info as teyrchain_info, *};
use cumulus_primitives_core::ParaId;
use frame_support::{
use pezframe_support::{
genesis_builder_helper::{build_state, get_preset},
weights::Weight,
};
use pallet_aura::Authorities;
use sp_api::impl_runtime_apis;
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
use sp_runtime::{
use pezpallet_aura::Authorities;
use pezsp_api::impl_runtime_apis;
use pezsp_consensus_aura::sr25519::AuthorityId as AuraId;
use pezsp_core::{crypto::KeyTypeId, OpaqueMetadata};
use pezsp_runtime::{
traits::Block as BlockT,
transaction_validity::{TransactionSource, TransactionValidity},
ApplyExtrinsicResult,
};
use sp_version::RuntimeVersion;
use pezsp_version::RuntimeVersion;
// Local module imports
use super::{
@@ -54,8 +54,8 @@ use super::{
// we move some impls outside so we can easily use them with `docify`.
impl Runtime {
#[docify::export]
fn impl_slot_duration() -> sp_consensus_aura::SlotDuration {
sp_consensus_aura::SlotDuration::from_millis(SLOT_DURATION)
fn impl_slot_duration() -> pezsp_consensus_aura::SlotDuration {
pezsp_consensus_aura::SlotDuration::from_millis(SLOT_DURATION)
}
#[docify::export]
@@ -68,8 +68,8 @@ impl Runtime {
}
impl_runtime_apis! {
impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
fn slot_duration() -> sp_consensus_aura::SlotDuration {
impl pezsp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
fn slot_duration() -> pezsp_consensus_aura::SlotDuration {
Runtime::impl_slot_duration()
}
@@ -93,7 +93,7 @@ impl_runtime_apis! {
}
}
impl sp_api::Core<Block> for Runtime {
impl pezsp_api::Core<Block> for Runtime {
fn version() -> RuntimeVersion {
VERSION
}
@@ -102,12 +102,12 @@ impl_runtime_apis! {
Executive::execute_block(block)
}
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
fn initialize_block(header: &<Block as BlockT>::Header) -> pezsp_runtime::ExtrinsicInclusionMode {
Executive::initialize_block(header)
}
}
impl sp_api::Metadata<Block> for Runtime {
impl pezsp_api::Metadata<Block> for Runtime {
fn metadata() -> OpaqueMetadata {
OpaqueMetadata::new(Runtime::metadata().into())
}
@@ -121,13 +121,13 @@ impl_runtime_apis! {
}
}
impl frame_support::view_functions::runtime_api::RuntimeViewFunction<Block> for Runtime {
fn execute_view_function(id: frame_support::view_functions::ViewFunctionId, input: Vec<u8>) -> Result<Vec<u8>, frame_support::view_functions::ViewFunctionDispatchError> {
impl pezframe_support::view_functions::runtime_api::RuntimeViewFunction<Block> for Runtime {
fn execute_view_function(id: pezframe_support::view_functions::ViewFunctionId, input: Vec<u8>) -> Result<Vec<u8>, pezframe_support::view_functions::ViewFunctionDispatchError> {
Runtime::execute_view_function(id, input)
}
}
impl sp_block_builder::BlockBuilder<Block> for Runtime {
impl pezsp_block_builder::BlockBuilder<Block> for Runtime {
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
Executive::apply_extrinsic(extrinsic)
}
@@ -136,19 +136,19 @@ impl_runtime_apis! {
Executive::finalize_block()
}
fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
fn inherent_extrinsics(data: pezsp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
data.create_extrinsics()
}
fn check_inherents(
block: <Block as BlockT>::LazyBlock,
data: sp_inherents::InherentData,
) -> sp_inherents::CheckInherentsResult {
data: pezsp_inherents::InherentData,
) -> pezsp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}
}
impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
impl pezsp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
fn validate_transaction(
source: TransactionSource,
tx: <Block as BlockT>::Extrinsic,
@@ -158,13 +158,13 @@ impl_runtime_apis! {
}
}
impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
impl pezsp_offchain::OffchainWorkerApi<Block> for Runtime {
fn offchain_worker(header: &<Block as BlockT>::Header) {
Executive::offchain_worker(header)
}
}
impl sp_session::SessionKeys<Block> for Runtime {
impl pezsp_session::SessionKeys<Block> for Runtime {
fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
SessionKeys::generate(seed)
}
@@ -176,23 +176,23 @@ impl_runtime_apis! {
}
}
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
impl pezframe_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
fn account_nonce(account: AccountId) -> Nonce {
System::account_nonce(account)
}
}
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
impl pezpallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
fn query_info(
uxt: <Block as BlockT>::Extrinsic,
len: u32,
) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> {
) -> pezpallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> {
TransactionPayment::query_info(uxt, len)
}
fn query_fee_details(
uxt: <Block as BlockT>::Extrinsic,
len: u32,
) -> pallet_transaction_payment::FeeDetails<Balance> {
) -> pezpallet_transaction_payment::FeeDetails<Balance> {
TransactionPayment::query_fee_details(uxt, len)
}
fn query_weight_to_fee(weight: Weight) -> Balance {
@@ -203,19 +203,19 @@ impl_runtime_apis! {
}
}
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
impl pezpallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
for Runtime
{
fn query_call_info(
call: RuntimeCall,
len: u32,
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
) -> pezpallet_transaction_payment::RuntimeDispatchInfo<Balance> {
TransactionPayment::query_call_info(call, len)
}
fn query_call_fee_details(
call: RuntimeCall,
len: u32,
) -> pallet_transaction_payment::FeeDetails<Balance> {
) -> pezpallet_transaction_payment::FeeDetails<Balance> {
TransactionPayment::query_call_fee_details(call, len)
}
fn query_weight_to_fee(weight: Weight) -> Balance {
@@ -233,8 +233,8 @@ impl_runtime_apis! {
}
#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
impl pezframe_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade(checks: pezframe_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
use super::configs::RuntimeBlockWeights;
let weight = Executive::try_runtime_upgrade(checks).unwrap();
@@ -245,7 +245,7 @@ impl_runtime_apis! {
block: <Block as BlockT>::LazyBlock,
state_root_check: bool,
signature_check: bool,
select: frame_try_runtime::TryStateSelect,
select: pezframe_try_runtime::TryStateSelect,
) -> Weight {
// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to
// have a backtrace here.
@@ -254,14 +254,14 @@ impl_runtime_apis! {
}
#[cfg(feature = "runtime-benchmarks")]
impl frame_benchmarking::Benchmark<Block> for Runtime {
impl pezframe_benchmarking::Benchmark<Block> for Runtime {
fn benchmark_metadata(extra: bool) -> (
Vec<frame_benchmarking::BenchmarkList>,
Vec<pezkuwi_sdk::frame_support::traits::StorageInfo>,
Vec<pezframe_benchmarking::BenchmarkList>,
Vec<pezkuwi_sdk::pezframe_support::traits::StorageInfo>,
) {
use frame_benchmarking::BenchmarkList;
use pezkuwi_sdk::frame_support::traits::StorageInfoTrait;
use frame_system_benchmarking::Pallet as SystemBench;
use pezframe_benchmarking::BenchmarkList;
use pezkuwi_sdk::pezframe_support::traits::StorageInfoTrait;
use pezframe_system_benchmarking::Pallet as SystemBench;
use cumulus_pallet_session_benchmarking::Pallet as SessionBench;
use super::*;
@@ -274,13 +274,13 @@ impl_runtime_apis! {
#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
use frame_benchmarking::{BenchmarkError, BenchmarkBatch};
config: pezframe_benchmarking::BenchmarkConfig
) -> Result<Vec<pezframe_benchmarking::BenchmarkBatch>, alloc::string::String> {
use pezframe_benchmarking::{BenchmarkError, BenchmarkBatch};
use super::*;
use frame_system_benchmarking::Pallet as SystemBench;
impl frame_system_benchmarking::Config for Runtime {
use pezframe_system_benchmarking::Pallet as SystemBench;
impl pezframe_system_benchmarking::Config for Runtime {
fn setup_set_code_requirements(code: &Vec<u8>) -> Result<(), BenchmarkError> {
TeyrchainSystem::initialize_for_set_code_benchmark(code.len() as u32);
Ok(())
@@ -294,7 +294,7 @@ impl_runtime_apis! {
use cumulus_pallet_session_benchmarking::Pallet as SessionBench;
impl cumulus_pallet_session_benchmarking::Config for Runtime {}
use pezkuwi_sdk::frame_support::traits::WhitelistedStorageKeys;
use pezkuwi_sdk::pezframe_support::traits::WhitelistedStorageKeys;
let whitelist = AllPalletsWithSystem::whitelisted_storage_keys();
let mut batches = Vec::<BenchmarkBatch>::new();
@@ -306,16 +306,16 @@ impl_runtime_apis! {
}
}
impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
impl pezsp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn build_state(config: Vec<u8>) -> pezsp_genesis_builder::Result {
build_state::<RuntimeGenesisConfig>(config)
}
fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
fn get_preset(id: &Option<pezsp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
get_preset::<RuntimeGenesisConfig>(id, crate::genesis_config_presets::get_preset)
}
fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
fn preset_names() -> Vec<pezsp_genesis_builder::PresetId> {
crate::genesis_config_presets::preset_names()
}
}
@@ -23,14 +23,14 @@
//
// For more information, please refer to <http://unlicense.org>
pezkuwi_sdk::frame_benchmarking::define_benchmarks!(
[frame_system, SystemBench::<Runtime>]
[pallet_balances, Balances]
[pallet_session, SessionBench::<Runtime>]
[pallet_timestamp, Timestamp]
[pallet_message_queue, MessageQueue]
[pallet_sudo, Sudo]
[pallet_collator_selection, CollatorSelection]
pezkuwi_sdk::pezframe_benchmarking::define_benchmarks!(
[pezframe_system, SystemBench::<Runtime>]
[pezpallet_balances, Balances]
[pezpallet_session, SessionBench::<Runtime>]
[pezpallet_timestamp, Timestamp]
[pezpallet_message_queue, MessageQueue]
[pezpallet_sudo, Sudo]
[pezpallet_collator_selection, CollatorSelection]
[cumulus_pallet_teyrchain_system, TeyrchainSystem]
[cumulus_pallet_xcmp_queue, XcmpQueue]
[cumulus_pallet_weight_reclaim, WeightReclaim]
+43 -43
View File
@@ -25,14 +25,14 @@
mod xcm_config;
use pezkuwi_sdk::{staging_teyrchain_info as teyrchain_info, staging_xcm as xcm, *};
use pezkuwi_sdk::{pezstaging_teyrchain_info as teyrchain_info, pezstaging_xcm as xcm, *};
#[cfg(not(feature = "runtime-benchmarks"))]
use pezkuwi_sdk::{staging_xcm_builder as xcm_builder, staging_xcm_executor as xcm_executor};
use pezkuwi_sdk::{pezstaging_xcm_builder as xcm_builder, pezstaging_xcm_executor as xcm_executor};
// Substrate and Pezkuwi dependencies
// Bizinikiwi and Pezkuwi dependencies
use cumulus_pallet_teyrchain_system::RelayNumberMonotonicallyIncreases;
use cumulus_primitives_core::{AggregateMessageOrigin, ParaId};
use frame_support::{
use pezframe_support::{
derive_impl,
dispatch::DispatchClass,
parameter_types,
@@ -42,17 +42,17 @@ use frame_support::{
weights::{ConstantMultiplier, Weight},
PalletId,
};
use frame_system::{
use pezframe_system::{
limits::{BlockLength, BlockWeights},
EnsureRoot,
};
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
use pezkuwi_runtime_common::{
xcm_sender::ExponentialPrice, BlockHashCount, SlowAdjustingFeeUpdate,
};
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_runtime::Perbill;
use sp_version::RuntimeVersion;
use pezsp_consensus_aura::sr25519::AuthorityId as AuraId;
use pezsp_runtime::Perbill;
use pezsp_version::RuntimeVersion;
use teyrchains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling};
use xcm::latest::prelude::{AssetId, BodyId};
@@ -70,7 +70,7 @@ use xcm_config::{RelayLocation, XcmOriginToTransactDispatchOrigin};
parameter_types! {
pub const Version: RuntimeVersion = VERSION;
// This part is copied from Substrate's `bin/node/runtime/src/lib.rs`.
// This part is copied from Bizinikiwi's `bin/node/runtime/src/lib.rs`.
// The `RuntimeBlockLength` and `RuntimeBlockWeights` exist here because the
// `DeletionWeightLimit` and `DeletionQueueDepth` depend on those to parameterize
// the lazy contract deletion.
@@ -103,11 +103,11 @@ parameter_types! {
#[allow(unused_parens)]
type SingleBlockMigrations = ();
/// The default types are being injected by [`derive_impl`](`frame_support::derive_impl`) from
/// [`TeyrchainDefaultConfig`](`struct@frame_system::config_preludes::TeyrchainDefaultConfig`),
/// The default types are being injected by [`derive_impl`](`pezframe_support::derive_impl`) from
/// [`TeyrchainDefaultConfig`](`struct@pezframe_system::config_preludes::TeyrchainDefaultConfig`),
/// but overridden as needed.
#[derive_impl(frame_system::config_preludes::TeyrchainDefaultConfig)]
impl frame_system::Config for Runtime {
#[derive_impl(pezframe_system::config_preludes::TeyrchainDefaultConfig)]
impl pezframe_system::Config for Runtime {
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
/// The index type for storing how many extrinsics an account has signed.
@@ -121,18 +121,18 @@ impl frame_system::Config for Runtime {
/// Runtime version.
type Version = Version;
/// The data to be stored in an account.
type AccountData = pallet_balances::AccountData<Balance>;
type AccountData = pezpallet_balances::AccountData<Balance>;
/// The weight of database operations that the runtime can invoke.
type DbWeight = RocksDbWeight;
/// Block & extrinsics weights: base values and limits.
type BlockWeights = RuntimeBlockWeights;
/// The maximum length of a block (in bytes).
type BlockLength = RuntimeBlockLength;
/// This is used as an identifier of the chain. 42 is the generic substrate prefix.
/// This is used as an identifier of the chain. 42 is the generic bizinikiwi prefix.
type SS58Prefix = SS58Prefix;
/// The action to take on a Runtime Upgrade
type OnSetCode = cumulus_pallet_teyrchain_system::TeyrchainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type MaxConsumers = pezframe_support::traits::ConstU32<16>;
type SingleBlockMigrations = SingleBlockMigrations;
}
@@ -141,7 +141,7 @@ impl cumulus_pallet_weight_reclaim::Config for Runtime {
type WeightInfo = ();
}
impl pallet_timestamp::Config for Runtime {
impl pezpallet_timestamp::Config for Runtime {
/// A timestamp: milliseconds since the unix epoch.
type Moment = u64;
type OnTimestampSet = Aura;
@@ -149,8 +149,8 @@ impl pallet_timestamp::Config for Runtime {
type WeightInfo = ();
}
impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
impl pezpallet_authorship::Config for Runtime {
type FindAuthor = pezpallet_session::FindAccountFromAuthorIndex<Self, Aura>;
type EventHandler = (CollatorSelection,);
}
@@ -158,7 +158,7 @@ parameter_types! {
pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT;
}
impl pallet_balances::Config for Runtime {
impl pezpallet_balances::Config for Runtime {
type MaxLocks = ConstU32<50>;
/// The type for recording an account's balance.
type Balance = Balance;
@@ -167,7 +167,7 @@ impl pallet_balances::Config for Runtime {
type DustRemoval = ();
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
type WeightInfo = pezpallet_balances::weights::BizinikiwiWeight<Runtime>;
type MaxReserves = ConstU32<50>;
type ReserveIdentifier = [u8; 8];
type RuntimeHoldReason = RuntimeHoldReason;
@@ -182,9 +182,9 @@ parameter_types! {
pub const TransactionByteFee: Balance = 10 * MICRO_UNIT;
}
impl pallet_transaction_payment::Config for Runtime {
impl pezpallet_transaction_payment::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter<Balances, ()>;
type OnChargeTransaction = pezpallet_transaction_payment::FungibleAdapter<Balances, ()>;
type WeightToFee = WeightToFee;
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
type FeeMultiplierUpdate = SlowAdjustingFeeUpdate<Self>;
@@ -192,7 +192,7 @@ impl pallet_transaction_payment::Config for Runtime {
type WeightInfo = ();
}
impl pallet_sudo::Config for Runtime {
impl pezpallet_sudo::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type WeightInfo = ();
@@ -210,7 +210,7 @@ impl cumulus_pallet_teyrchain_system::Config for Runtime {
type OnSystemEvent = ();
type SelfParaId = teyrchain_info::Pallet<Runtime>;
type OutboundXcmpMessageSource = XcmpQueue;
type DmpQueue = frame_support::traits::EnqueueWithOrigin<MessageQueue, RelayOrigin>;
type DmpQueue = pezframe_support::traits::EnqueueWithOrigin<MessageQueue, RelayOrigin>;
type ReservedDmpWeight = ReservedDmpWeight;
type XcmpMessageHandler = XcmpQueue;
type ReservedXcmpWeight = ReservedXcmpWeight;
@@ -225,11 +225,11 @@ parameter_types! {
pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block;
}
impl pallet_message_queue::Config for Runtime {
impl pezpallet_message_queue::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
#[cfg(feature = "runtime-benchmarks")]
type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor<
type MessageProcessor = pezpallet_message_queue::mock_helpers::NoopMessageProcessor<
cumulus_primitives_core::AggregateMessageOrigin,
>;
#[cfg(not(feature = "runtime-benchmarks"))]
@@ -242,8 +242,8 @@ impl pallet_message_queue::Config for Runtime {
// The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin:
type QueueChangeHandler = NarrowOriginToSibling<XcmpQueue>;
type QueuePausedQuery = NarrowOriginToSibling<XcmpQueue>;
type HeapSize = sp_core::ConstU32<{ 103 * 1024 }>;
type MaxStale = sp_core::ConstU32<8>;
type HeapSize = pezsp_core::ConstU32<{ 103 * 1024 }>;
type MaxStale = pezsp_core::ConstU32<8>;
type ServiceWeight = MessageQueueServiceWeight;
type IdleMaxServiceWeight = ();
}
@@ -272,7 +272,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type VersionWrapper = ();
// Enqueue XCMP messages from siblings for later processing.
type XcmpQueue = TransformOrigin<MessageQueue, AggregateMessageOrigin, ParaId, ParaIdToSibling>;
type MaxInboundSuspended = sp_core::ConstU32<1_000>;
type MaxInboundSuspended = pezsp_core::ConstU32<1_000>;
type MaxActiveOutboundChannels = ConstU32<128>;
type MaxPageSize = ConstU32<{ 1 << 16 }>;
type ControllerOrigin = EnsureRoot<AccountId>;
@@ -286,16 +286,16 @@ parameter_types! {
pub const Offset: u32 = 0;
}
impl pallet_session::Config for Runtime {
impl pezpallet_session::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type ValidatorId = <Self as frame_system::Config>::AccountId;
type ValidatorId = <Self as pezframe_system::Config>::AccountId;
// we don't have stash and controller, thus we don't need the convert as well.
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
type ShouldEndSession = pallet_session::PeriodicSessions<Period, Offset>;
type NextSessionRotation = pallet_session::PeriodicSessions<Period, Offset>;
type ValidatorIdOf = pezpallet_collator_selection::IdentityCollator;
type ShouldEndSession = pezpallet_session::PeriodicSessions<Period, Offset>;
type NextSessionRotation = pezpallet_session::PeriodicSessions<Period, Offset>;
type SessionManager = CollatorSelection;
// Essentially just Aura, but let's be pedantic.
type SessionHandler = <SessionKeys as sp_runtime::traits::OpaqueKeys>::KeyTypeIdProviders;
type SessionHandler = <SessionKeys as pezsp_runtime::traits::OpaqueKeys>::KeyTypeIdProviders;
type Keys = SessionKeys;
type DisablingStrategy = ();
type WeightInfo = ();
@@ -304,7 +304,7 @@ impl pallet_session::Config for Runtime {
}
#[docify::export(aura_config)]
impl pallet_aura::Config for Runtime {
impl pezpallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
@@ -325,7 +325,7 @@ pub type CollatorSelectionUpdateOrigin = EitherOfDiverse<
EnsureXcm<IsVoiceOfBody<RelayLocation, StakingAdminBodyId>>,
>;
impl pallet_collator_selection::Config for Runtime {
impl pezpallet_collator_selection::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type UpdateOrigin = CollatorSelectionUpdateOrigin;
@@ -335,14 +335,14 @@ impl pallet_collator_selection::Config for Runtime {
type MaxInvulnerables = ConstU32<20>;
// should be a multiple of session or things will get inconsistent
type KickThreshold = Period;
type ValidatorId = <Self as frame_system::Config>::AccountId;
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
type ValidatorId = <Self as pezframe_system::Config>::AccountId;
type ValidatorIdOf = pezpallet_collator_selection::IdentityCollator;
type ValidatorRegistration = Session;
type WeightInfo = ();
}
/// Configure the pallet template in pallets/template.
impl pallet_teyrchain_template::Config for Runtime {
impl pezpallet_teyrchain_template::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_teyrchain_template::weights::SubstrateWeight<Runtime>;
type WeightInfo = pezpallet_teyrchain_template::weights::BizinikiwiWeight<Runtime>;
}
@@ -5,20 +5,20 @@ use crate::{
};
use pezkuwi_sdk::{
staging_xcm as xcm, staging_xcm_builder as xcm_builder, staging_xcm_executor as xcm_executor, *,
pezstaging_xcm as xcm, pezstaging_xcm_builder as xcm_builder, pezstaging_xcm_executor as xcm_executor, *,
};
use frame_support::{
use pezframe_support::{
parameter_types,
traits::{ConstU32, Contains, Everything, Nothing},
weights::Weight,
};
use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough;
use pezframe_system::EnsureRoot;
use pezpallet_xcm::XcmPassthrough;
use pezkuwi_runtime_common::impls::ToAuthor;
use pezkuwi_sdk::{
pezkuwi_sdk_frame::traits::Disabled,
staging_xcm_builder::{DenyRecursively, DenyThenTry},
pezstaging_xcm_builder::{DenyRecursively, DenyThenTry},
};
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use xcm::latest::prelude::*;
@@ -169,7 +169,7 @@ pub type XcmRouter = WithUniqueTopic<(
XcmpQueue,
)>;
impl pallet_xcm::Config for Runtime {
impl pezpallet_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
type XcmRouter = XcmRouter;
@@ -187,13 +187,13 @@ impl pallet_xcm::Config for Runtime {
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
// ^ Override for AdvertisedXcmVersion default
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
type AdvertisedXcmVersion = pezpallet_xcm::CurrentXcmVersion;
type Currency = Balances;
type CurrencyMatcher = ();
type TrustedLockers = ();
type SovereignAccountOf = LocationToAccountId;
type MaxLockers = ConstU32<8>;
type WeightInfo = pallet_xcm::TestWeightInfo;
type WeightInfo = pezpallet_xcm::TestWeightInfo;
type AdminOrigin = EnsureRoot<AccountId>;
type MaxRemoteLockConsumers = ConstU32<0>;
type RemoteLockConsumerIdentifier = ();
@@ -5,13 +5,13 @@ use crate::{
use alloc::{vec, vec::Vec};
use pezkuwi_sdk::{staging_xcm as xcm, *};
use pezkuwi_sdk::{pezstaging_xcm as xcm, *};
use cumulus_primitives_core::ParaId;
use frame_support::build_struct_json_patch;
use pezframe_support::build_struct_json_patch;
use serde_json::Value;
use sp_genesis_builder::PresetId;
use sp_keyring::Sr25519Keyring;
use pezsp_genesis_builder::PresetId;
use pezsp_keyring::Sr25519Keyring;
use teyrchains_common::AuraId;
/// The default XCM version to set in genesis config.
@@ -92,8 +92,8 @@ fn development_config_genesis() -> Value {
/// Provides the JSON representation of predefined genesis config for given `id`.
pub fn get_preset(id: &PresetId) -> Option<vec::Vec<u8>> {
let patch = match id.as_ref() {
sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET => local_testnet_genesis(),
sp_genesis_builder::DEV_RUNTIME_PRESET => development_config_genesis(),
pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET => local_testnet_genesis(),
pezsp_genesis_builder::DEV_RUNTIME_PRESET => development_config_genesis(),
_ => return None,
};
Some(
@@ -106,7 +106,7 @@ pub fn get_preset(id: &PresetId) -> Option<vec::Vec<u8>> {
/// List of supported presets.
pub fn preset_names() -> Vec<PresetId> {
vec![
PresetId::from(sp_genesis_builder::DEV_RUNTIME_PRESET),
PresetId::from(sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET),
PresetId::from(pezsp_genesis_builder::DEV_RUNTIME_PRESET),
PresetId::from(pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET),
]
}
+55 -55
View File
@@ -17,25 +17,25 @@ extern crate alloc;
use alloc::vec::Vec;
use smallvec::smallvec;
use pezkuwi_sdk::{staging_teyrchain_info as teyrchain_info, *};
use pezkuwi_sdk::{pezstaging_teyrchain_info as teyrchain_info, *};
use sp_runtime::{
use pezsp_runtime::{
generic, impl_opaque_keys,
traits::{BlakeTwo256, IdentifyAccount, Verify},
MultiSignature,
};
#[cfg(feature = "std")]
use sp_version::NativeVersion;
use sp_version::RuntimeVersion;
use pezsp_version::NativeVersion;
use pezsp_version::RuntimeVersion;
use frame_support::weights::{
use pezframe_support::weights::{
constants::WEIGHT_REF_TIME_PER_SECOND, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients,
WeightToFeePolynomial,
};
pub use genesis_config_presets::TEYRCHAIN_ID;
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use sp_runtime::{MultiAddress, Perbill, Permill};
pub use pezsp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use pezsp_runtime::{MultiAddress, Perbill, Permill};
use weights::ExtrinsicBaseWeight;
@@ -53,7 +53,7 @@ pub type Balance = u128;
pub type Nonce = u32;
/// A hash of some data used by the chain.
pub type Hash = sp_core::H256;
pub type Hash = pezsp_core::H256;
/// An index to a block.
pub type BlockNumber = u32;
@@ -78,16 +78,16 @@ pub type BlockId = generic::BlockId<Block>;
pub type TxExtension = cumulus_pallet_weight_reclaim::StorageWeightReclaim<
Runtime,
(
frame_system::AuthorizeCall<Runtime>,
frame_system::CheckNonZeroSender<Runtime>,
frame_system::CheckSpecVersion<Runtime>,
frame_system::CheckTxVersion<Runtime>,
frame_system::CheckGenesis<Runtime>,
frame_system::CheckEra<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
pezframe_system::AuthorizeCall<Runtime>,
pezframe_system::CheckNonZeroSender<Runtime>,
pezframe_system::CheckSpecVersion<Runtime>,
pezframe_system::CheckTxVersion<Runtime>,
pezframe_system::CheckGenesis<Runtime>,
pezframe_system::CheckEra<Runtime>,
pezframe_system::CheckNonce<Runtime>,
pezframe_system::CheckWeight<Runtime>,
pezpallet_transaction_payment::ChargeTransactionPayment<Runtime>,
pezframe_metadata_hash_extension::CheckMetadataHash<Runtime>,
),
>;
@@ -96,10 +96,10 @@ pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, TxExtension>;
/// Executive: handles dispatch to the various modules.
pub type Executive = frame_executive::Executive<
pub type Executive = pezframe_executive::Executive<
Runtime,
Block,
frame_system::ChainContext<Runtime>,
pezframe_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
>;
@@ -137,8 +137,8 @@ impl WeightToFeePolynomial for WeightToFee {
/// to even the core data structures.
pub mod opaque {
use super::*;
pub use pezkuwi_sdk::sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;
use pezkuwi_sdk::sp_runtime::{
pub use pezkuwi_sdk::pezsp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;
use pezkuwi_sdk::pezsp_runtime::{
generic,
traits::{BlakeTwo256, Hash as HashT},
};
@@ -159,7 +159,7 @@ impl_opaque_keys! {
}
}
#[sp_version::runtime_version]
#[pezsp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: alloc::borrow::Cow::Borrowed("teyrchain-template-runtime"),
impl_name: alloc::borrow::Cow::Borrowed("teyrchain-template-runtime"),
@@ -175,7 +175,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
mod block_times {
/// This determines the average expected block time that we are targeting. Blocks will be
/// produced at a minimum duration defined by `SLOT_DURATION`. `SLOT_DURATION` is picked up by
/// `pallet_timestamp` which is in turn picked up by `pallet_aura` to implement `fn
/// `pezpallet_timestamp` which is in turn picked up by `pezpallet_aura` to implement `fn
/// slot_duration()`.
///
/// Change this to adjust the block time.
@@ -245,7 +245,7 @@ pub fn native_version() -> NativeVersion {
}
// Create the runtime by composing the FRAME pallets that were previously configured.
#[frame_support::runtime]
#[pezframe_support::runtime]
mod runtime {
#[runtime::runtime]
#[runtime::derive(
@@ -262,52 +262,52 @@ mod runtime {
)]
pub struct Runtime;
#[runtime::pallet_index(0)]
pub type System = frame_system;
#[runtime::pallet_index(1)]
#[runtime::pezpallet_index(0)]
pub type System = pezframe_system;
#[runtime::pezpallet_index(1)]
pub type TeyrchainSystem = cumulus_pallet_teyrchain_system;
#[runtime::pallet_index(2)]
pub type Timestamp = pallet_timestamp;
#[runtime::pallet_index(3)]
#[runtime::pezpallet_index(2)]
pub type Timestamp = pezpallet_timestamp;
#[runtime::pezpallet_index(3)]
pub type TeyrchainInfo = teyrchain_info;
#[runtime::pallet_index(4)]
#[runtime::pezpallet_index(4)]
pub type WeightReclaim = cumulus_pallet_weight_reclaim;
// Monetary stuff.
#[runtime::pallet_index(10)]
pub type Balances = pallet_balances;
#[runtime::pallet_index(11)]
pub type TransactionPayment = pallet_transaction_payment;
#[runtime::pezpallet_index(10)]
pub type Balances = pezpallet_balances;
#[runtime::pezpallet_index(11)]
pub type TransactionPayment = pezpallet_transaction_payment;
// Governance
#[runtime::pallet_index(15)]
pub type Sudo = pallet_sudo;
#[runtime::pezpallet_index(15)]
pub type Sudo = pezpallet_sudo;
// Collator support. The order of these 4 are important and shall not change.
#[runtime::pallet_index(20)]
pub type Authorship = pallet_authorship;
#[runtime::pallet_index(21)]
pub type CollatorSelection = pallet_collator_selection;
#[runtime::pallet_index(22)]
pub type Session = pallet_session;
#[runtime::pallet_index(23)]
pub type Aura = pallet_aura;
#[runtime::pallet_index(24)]
#[runtime::pezpallet_index(20)]
pub type Authorship = pezpallet_authorship;
#[runtime::pezpallet_index(21)]
pub type CollatorSelection = pezpallet_collator_selection;
#[runtime::pezpallet_index(22)]
pub type Session = pezpallet_session;
#[runtime::pezpallet_index(23)]
pub type Aura = pezpallet_aura;
#[runtime::pezpallet_index(24)]
pub type AuraExt = cumulus_pallet_aura_ext;
// XCM helpers.
#[runtime::pallet_index(30)]
#[runtime::pezpallet_index(30)]
pub type XcmpQueue = cumulus_pallet_xcmp_queue;
#[runtime::pallet_index(31)]
pub type PezkuwiXcm = pallet_xcm;
#[runtime::pallet_index(32)]
#[runtime::pezpallet_index(31)]
pub type PezkuwiXcm = pezpallet_xcm;
#[runtime::pezpallet_index(32)]
pub type CumulusXcm = cumulus_pallet_xcm;
#[runtime::pallet_index(33)]
pub type MessageQueue = pallet_message_queue;
#[runtime::pezpallet_index(33)]
pub type MessageQueue = pezpallet_message_queue;
// Template
#[runtime::pallet_index(50)]
pub type TemplatePallet = pallet_teyrchain_template;
#[runtime::pezpallet_index(50)]
pub type TemplatePallet = pezpallet_teyrchain_template;
}
#[docify::export(register_validate_block)]
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -18,7 +18,7 @@
pub mod constants {
use pezkuwi_sdk::*;
use frame_support::{
use pezframe_support::{
parameter_types,
weights::{constants, Weight},
};
@@ -33,7 +33,7 @@ pub mod constants {
mod test_weights {
use pezkuwi_sdk::*;
use frame_support::weights::constants;
use pezframe_support::weights::constants;
/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -18,7 +18,7 @@
pub mod constants {
use pezkuwi_sdk::*;
use frame_support::{
use pezframe_support::{
parameter_types,
weights::{constants, Weight},
};
@@ -33,7 +33,7 @@ pub mod constants {
mod test_weights {
use pezkuwi_sdk::*;
use frame_support::weights::constants;
use pezframe_support::weights::constants;
/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -18,7 +18,7 @@
pub mod constants {
use pezkuwi_sdk::*;
use frame_support::{
use pezframe_support::{
parameter_types,
weights::{constants, RuntimeDbWeight},
};
@@ -37,7 +37,7 @@ pub mod constants {
use pezkuwi_sdk::*;
use super::constants::ParityDbWeight as W;
use frame_support::weights::constants;
use pezframe_support::weights::constants;
/// Checks that all weights exist and have sane values.
// NOTE: If this test fails but you are sure that the generated values are fine,
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -18,13 +18,13 @@
pub mod constants {
use pezkuwi_sdk::*;
use frame_support::{
use pezframe_support::{
parameter_types,
weights::{constants, RuntimeDbWeight},
};
parameter_types! {
/// By default, Substrate uses `RocksDB`, so this will be the weight used throughout
/// By default, Bizinikiwi uses `RocksDB`, so this will be the weight used throughout
/// the runtime.
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
@@ -37,7 +37,7 @@ pub mod constants {
use pezkuwi_sdk::*;
use super::constants::RocksDbWeight as W;
use frame_support::weights::constants;
use pezframe_support::weights::constants;
/// Checks that all weights exist and have sane values.
// NOTE: If this test fails but you are sure that the generated values are fine,