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
+26 -26
View File
@@ -1,5 +1,5 @@
[package]
name = "pallet-bridge-teyrchains"
name = "pezpallet-bridge-teyrchains"
version = "0.7.0"
description = "Module that allows bridged relay chains to exchange information on their teyrchains' heads."
authors.workspace = true
@@ -20,20 +20,20 @@ bp-header-chain = { workspace = true }
bp-pezkuwi-core = { workspace = true }
bp-runtime = { workspace = true }
bp-teyrchains = { workspace = true }
pallet-bridge-grandpa = { workspace = true }
pezpallet-bridge-grandpa = { workspace = true }
# Substrate Dependencies
frame-benchmarking = { optional = true, workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
# Bizinikiwi Dependencies
pezframe-benchmarking = { optional = true, workspace = true }
pezframe-support = { workspace = true }
pezframe-system = { workspace = true }
pezsp-runtime = { workspace = true }
pezsp-std = { workspace = true }
[dev-dependencies]
bp-header-chain = { workspace = true, default-features = true }
bp-test-utils = { workspace = true, default-features = true }
sp-core = { workspace = true, default-features = true }
sp-io = { workspace = true, default-features = true }
pezsp-core = { workspace = true, default-features = true }
pezsp-io = { workspace = true, default-features = true }
[features]
default = ["std"]
@@ -43,13 +43,13 @@ std = [
"bp-runtime/std",
"bp-teyrchains/std",
"codec/std",
"frame-benchmarking/std",
"frame-support/std",
"frame-system/std",
"pallet-bridge-grandpa/std",
"pezframe-benchmarking/std",
"pezframe-support/std",
"pezframe-system/std",
"pezpallet-bridge-grandpa/std",
"scale-info/std",
"sp-runtime/std",
"sp-std/std",
"pezsp-runtime/std",
"pezsp-std/std",
"tracing/std",
]
runtime-benchmarks = [
@@ -58,16 +58,16 @@ runtime-benchmarks = [
"bp-runtime/runtime-benchmarks",
"bp-test-utils/runtime-benchmarks",
"bp-teyrchains/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-bridge-grandpa/runtime-benchmarks",
"sp-io/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"pezframe-benchmarking/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
"pezpallet-bridge-grandpa/runtime-benchmarks",
"pezsp-io/runtime-benchmarks",
"pezsp-runtime/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-bridge-grandpa/try-runtime",
"sp-runtime/try-runtime",
"pezframe-support/try-runtime",
"pezframe-system/try-runtime",
"pezpallet-bridge-grandpa/try-runtime",
"pezsp-runtime/try-runtime",
]
@@ -23,9 +23,9 @@ use crate::{
use bp_pezkuwi_core::teyrchains::{ParaHash, ParaHeadsProof, ParaId};
use bp_runtime::UnverifiedStorageProofParams;
use frame_benchmarking::{account, benchmarks_instance_pallet};
use frame_system::RawOrigin;
use sp_std::prelude::*;
use pezframe_benchmarking::{account, benchmarks_instance_pallet};
use pezframe_system::RawOrigin;
use pezsp_std::prelude::*;
/// Pallet we're benchmarking here.
pub struct Pallet<T: Config<I>, I: 'static = ()>(crate::Pallet<T, I>);
@@ -45,7 +45,7 @@ pub trait Config<I: 'static>: crate::Config<I> {
benchmarks_instance_pallet! {
where_clause {
where
<T as pallet_bridge_grandpa::Config<T::BridgesGrandpaPalletInstance>>::BridgedChain:
<T as pezpallet_bridge_grandpa::Config<T::BridgesGrandpaPalletInstance>>::BridgedChain:
bp_runtime::Chain<
BlockNumber = RelayBlockNumber,
Hash = RelayBlockHash,
+5 -5
View File
@@ -18,12 +18,12 @@ use crate::{Config, GrandpaPalletOf, Pallet, RelayBlockNumber};
use bp_header_chain::HeaderChain;
use bp_runtime::{HeaderId, OwnedBridgeModule};
use bp_teyrchains::{BestParaHeadHash, SubmitTeyrchainHeadsInfo};
use frame_support::{
use pezframe_support::{
dispatch::CallableCallFor,
traits::{Get, IsSubType},
};
use pallet_bridge_grandpa::SubmitFinalityProofHelper;
use sp_runtime::{
use pezpallet_bridge_grandpa::SubmitFinalityProofHelper;
use pezsp_runtime::{
traits::Zero,
transaction_validity::{InvalidTransaction, TransactionValidityError},
RuntimeDebug,
@@ -41,7 +41,7 @@ pub struct VerifiedSubmitTeyrchainHeadsInfo {
/// Helper struct that provides methods for working with the `SubmitTeyrchainHeads` call.
pub struct SubmitTeyrchainHeadsHelper<T: Config<I>, I: 'static> {
_phantom_data: sp_std::marker::PhantomData<(T, I)>,
_phantom_data: pezsp_std::marker::PhantomData<(T, I)>,
}
impl<T: Config<I>, I: 'static> SubmitTeyrchainHeadsHelper<T, I> {
@@ -292,7 +292,7 @@ mod tests {
}
fn insert_relay_block(num: RelayBlockNumber) {
pallet_bridge_grandpa::ImportedHeaders::<TestRuntime, crate::Instance1>::insert(
pezpallet_bridge_grandpa::ImportedHeaders::<TestRuntime, crate::Instance1>::insert(
RelayBlockHash::from([num as u8; 32]),
StoredHeaderData { number: num, state_root: RelayBlockHash::from([10u8; 32]) },
);
+40 -40
View File
@@ -34,10 +34,10 @@ use bp_teyrchains::{
ParaInfo, ParaStoredHeaderData, RelayBlockHash, RelayBlockHasher, RelayBlockNumber,
SubmitTeyrchainHeadsInfo,
};
use frame_support::{dispatch::PostDispatchInfo, DefaultNoBound};
use pallet_bridge_grandpa::SubmitFinalityProofHelper;
use pezframe_support::{dispatch::PostDispatchInfo, DefaultNoBound};
use pezpallet_bridge_grandpa::SubmitFinalityProofHelper;
use proofs::{StorageProofAdapter, TeyrchainsStorageProofAdapter};
use sp_std::{marker::PhantomData, vec::Vec};
use pezsp_std::{marker::PhantomData, vec::Vec};
#[cfg(feature = "runtime-benchmarks")]
use bp_runtime::HeaderOf;
@@ -72,7 +72,7 @@ struct UpdateTeyrchainHeadArtifacts {
pub prune_happened: bool,
}
#[frame_support::pallet]
#[pezframe_support::pallet]
pub mod pallet {
use super::*;
use bp_runtime::{
@@ -83,8 +83,8 @@ pub mod pallet {
BestParaHeadHash, ImportedParaHeadsKeyProvider, OnNewHead, ParaStoredHeaderDataBuilder,
ParasInfoKeyProvider,
};
use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
use pezframe_support::pezpallet_prelude::*;
use pezframe_system::pezpallet_prelude::*;
/// Stored teyrchain head data of given teyrchains pallet.
pub type StoredParaHeadDataOf<T, I> =
@@ -93,7 +93,7 @@ pub mod pallet {
pub type WeightInfoOf<T, I> = <T as Config<I>>::WeightInfo;
/// Bridge GRANDPA pallet that is used to verify teyrchain proofs.
pub type GrandpaPalletOf<T, I> =
pallet_bridge_grandpa::Pallet<T, <T as Config<I>>::BridgesGrandpaPalletInstance>;
pezpallet_bridge_grandpa::Pallet<T, <T as Config<I>>::BridgesGrandpaPalletInstance>;
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
@@ -158,7 +158,7 @@ pub mod pallet {
/// Convenience trait for defining `BridgedChain` bounds.
pub trait BoundedBridgeGrandpaConfig<I: 'static>:
pallet_bridge_grandpa::Config<I, BridgedChain = Self::BridgedRelayChain>
pezpallet_bridge_grandpa::Config<I, BridgedChain = Self::BridgedRelayChain>
{
/// Type of the bridged relay chain.
type BridgedRelayChain: Chain<
@@ -170,7 +170,7 @@ pub mod pallet {
impl<T, I: 'static> BoundedBridgeGrandpaConfig<I> for T
where
T: pallet_bridge_grandpa::Config<I>,
T: pezpallet_bridge_grandpa::Config<I>,
T::BridgedChain:
Chain<BlockNumber = RelayBlockNumber, Hash = RelayBlockHash, Hasher = RelayBlockHasher>,
{
@@ -178,14 +178,14 @@ pub mod pallet {
}
#[pallet::config]
#[pallet::disable_frame_system_supertrait_check]
#[pallet::disable_pezframe_system_supertrait_check]
pub trait Config<I: 'static = ()>:
BoundedBridgeGrandpaConfig<Self::BridgesGrandpaPalletInstance>
{
/// The overarching event type.
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self, I>>
+ IsType<<Self as frame_system::Config>::RuntimeEvent>;
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
/// Benchmarks results from runtime we're plugged into.
type WeightInfo: WeightInfoExt;
@@ -214,14 +214,14 @@ pub mod pallet {
/// chain.
///
/// Please keep in mind that this should be the name of the `runtime_teyrchains::paras`
/// pallet from pezkuwi repository, not the `pallet-bridge-teyrchains`.
/// pallet from pezkuwi repository, not the `pezpallet-bridge-teyrchains`.
#[pallet::constant]
type ParasPalletName: Get<&'static str>;
/// Teyrchain head data builder.
///
/// We never store teyrchain heads here, since they may be too big (e.g. because of large
/// digest items). Instead we're using the same approach as `pallet-bridge-grandpa`
/// digest items). Instead we're using the same approach as `pezpallet-bridge-grandpa`
/// pallet - we are only storing `bp_messages::StoredHeaderData` (number and state root),
/// which is enough for our applications. However, we work with different teyrchains here
/// and they can use different primitives (for block numbers and hash). So we can't store
@@ -433,7 +433,7 @@ pub mod pallet {
// we'll need relay chain header to verify that teyrchains heads are always increasing.
let (relay_block_number, relay_block_hash) = at_relay_block;
let relay_block = pallet_bridge_grandpa::ImportedHeaders::<
let relay_block = pezpallet_bridge_grandpa::ImportedHeaders::<
T,
T::BridgesGrandpaPalletInstance,
>::get(relay_block_hash)
@@ -583,7 +583,7 @@ pub mod pallet {
&& SubmitFinalityProofHelper::<T, T::BridgesGrandpaPalletInstance>::has_free_header_slots();
let pays_fee = if is_free {
tracing::trace!(target: LOG_TARGET, "Teyrchain heads update transaction is free");
pallet_bridge_grandpa::on_free_header_imported::<T, T::BridgesGrandpaPalletInstance>(
pezpallet_bridge_grandpa::on_free_header_imported::<T, T::BridgesGrandpaPalletInstance>(
);
Pays::No
} else {
@@ -743,7 +743,7 @@ pub mod pallet {
pub owner: Option<T::AccountId>,
/// Dummy marker.
#[serde(skip)]
pub _phantom: sp_std::marker::PhantomData<I>,
pub _phantom: pezsp_std::marker::PhantomData<I>,
}
#[pallet::genesis_build]
@@ -791,17 +791,17 @@ impl<T: Config<I>, I: 'static, C: Teyrchain<Hash = ParaHash>> HeaderChain<C>
}
}
/// (Re)initialize pallet with given header for using it in `pallet-bridge-messages` benchmarks.
/// (Re)initialize pallet with given header for using it in `pezpallet-bridge-messages` benchmarks.
#[cfg(feature = "runtime-benchmarks")]
pub fn initialize_for_benchmarks<T: Config<I>, I: 'static, PC: Teyrchain<Hash = ParaHash>>(
header: HeaderOf<PC>,
) {
use bp_pezkuwi_core::teyrchains::ParaHead;
use bp_runtime::HeaderIdProvider;
use sp_runtime::traits::Header;
use pezsp_runtime::traits::Header;
let relay_head =
pallet_bridge_grandpa::BridgedHeader::<T, T::BridgesGrandpaPalletInstance>::new(
pezpallet_bridge_grandpa::BridgedHeader::<T, T::BridgesGrandpaPalletInstance>::new(
0,
Default::default(),
Default::default(),
@@ -812,7 +812,7 @@ pub fn initialize_for_benchmarks<T: Config<I>, I: 'static, PC: Teyrchain<Hash =
let teyrchain_head = ParaHead(header.encode());
let updated_head_data = T::ParaStoredHeaderDataBuilder::try_build(teyrchain, &teyrchain_head)
.expect("failed to build stored teyrchain head in benchmarks");
pallet_bridge_grandpa::initialize_for_benchmarks::<T, T::BridgesGrandpaPalletInstance>(
pezpallet_bridge_grandpa::initialize_for_benchmarks::<T, T::BridgesGrandpaPalletInstance>(
relay_head.clone(),
);
Pallet::<T, I>::update_teyrchain_head(
@@ -850,25 +850,25 @@ pub(crate) mod tests {
use bp_teyrchains::{
BestParaHeadHash, BridgeTeyrchainCall, ImportedParaHeadsKeyProvider, ParasInfoKeyProvider,
};
use frame_support::{
use pezframe_support::{
assert_noop, assert_ok,
dispatch::DispatchResultWithPostInfo,
pallet_prelude::Pays,
pezpallet_prelude::Pays,
storage::generator::{StorageDoubleMap, StorageMap},
traits::Get,
weights::Weight,
};
use frame_system::{EventRecord, Pallet as System, Phase};
use sp_core::Hasher;
use sp_runtime::{traits::Header as HeaderT, DispatchError};
use pezframe_system::{EventRecord, Pallet as System, Phase};
use pezsp_core::Hasher;
use pezsp_runtime::{traits::Header as HeaderT, DispatchError};
type BridgesGrandpaPalletInstance = pallet_bridge_grandpa::Instance1;
type BridgesGrandpaPalletInstance = pezpallet_bridge_grandpa::Instance1;
type WeightInfo = <TestRuntime as Config>::WeightInfo;
type DbWeight = <TestRuntime as frame_system::Config>::DbWeight;
type DbWeight = <TestRuntime as pezframe_system::Config>::DbWeight;
pub(crate) fn initialize(state_root: RelayBlockHash) -> RelayBlockHash {
pallet_bridge_grandpa::FreeHeadersRemaining::<TestRuntime, BridgesGrandpaPalletInstance>::set(Some(100));
pallet_bridge_grandpa::Pallet::<TestRuntime, BridgesGrandpaPalletInstance>::initialize(
pezpallet_bridge_grandpa::FreeHeadersRemaining::<TestRuntime, BridgesGrandpaPalletInstance>::set(Some(100));
pezpallet_bridge_grandpa::Pallet::<TestRuntime, BridgesGrandpaPalletInstance>::initialize(
RuntimeOrigin::root(),
bp_header_chain::InitializationData {
header: Box::new(test_relay_header(0, state_root)),
@@ -893,7 +893,7 @@ pub(crate) mod tests {
let hash = header.hash();
let justification = make_default_justification(&header);
assert_ok!(
pallet_bridge_grandpa::Pallet::<TestRuntime, BridgesGrandpaPalletInstance>::submit_finality_proof_ex(
pezpallet_bridge_grandpa::Pallet::<TestRuntime, BridgesGrandpaPalletInstance>::submit_finality_proof_ex(
RuntimeOrigin::signed(1),
Box::new(header),
justification.clone(),
@@ -974,7 +974,7 @@ pub(crate) mod tests {
}
fn weight_of_import_teyrchain_1_head(proof: &ParaHeadsProof, prune_expected: bool) -> Weight {
let db_weight = <TestRuntime as frame_system::Config>::DbWeight::get();
let db_weight = <TestRuntime as pezframe_system::Config>::DbWeight::get();
WeightInfoOf::<TestRuntime, ()>::submit_teyrchain_heads_weight(db_weight, proof, 1)
.saturating_sub(if prune_expected {
Weight::zero()
@@ -1180,7 +1180,7 @@ pub(crate) mod tests {
EventRecord {
phase: Phase::Initialization,
event: TestEvent::Grandpa1(
pallet_bridge_grandpa::Event::UpdatedBestFinalizedHeader {
pezpallet_bridge_grandpa::Event::UpdatedBestFinalizedHeader {
number: 1,
hash: relay_1_hash,
grandpa_info: StoredHeaderGrandpaInfo {
@@ -1321,7 +1321,7 @@ pub(crate) mod tests {
EventRecord {
phase: Phase::Initialization,
event: TestEvent::Grandpa1(
pallet_bridge_grandpa::Event::UpdatedBestFinalizedHeader {
pezpallet_bridge_grandpa::Event::UpdatedBestFinalizedHeader {
number: 1,
hash: relay_1_hash,
grandpa_info: StoredHeaderGrandpaInfo {
@@ -1374,7 +1374,7 @@ pub(crate) mod tests {
EventRecord {
phase: Phase::Initialization,
event: TestEvent::Grandpa1(
pallet_bridge_grandpa::Event::UpdatedBestFinalizedHeader {
pezpallet_bridge_grandpa::Event::UpdatedBestFinalizedHeader {
number: 1,
hash: relay_1_hash,
grandpa_info: StoredHeaderGrandpaInfo {
@@ -1415,7 +1415,7 @@ pub(crate) mod tests {
EventRecord {
phase: Phase::Initialization,
event: TestEvent::Grandpa1(
pallet_bridge_grandpa::Event::UpdatedBestFinalizedHeader {
pezpallet_bridge_grandpa::Event::UpdatedBestFinalizedHeader {
number: 1,
hash: relay_1_hash,
grandpa_info: StoredHeaderGrandpaInfo {
@@ -1842,7 +1842,7 @@ pub(crate) mod tests {
initialize(Default::default());
// set free headers limit to `4`
let mut free_headers_remaining = 4;
pallet_bridge_grandpa::FreeHeadersRemaining::<TestRuntime, BridgesGrandpaPalletInstance>::set(
pezpallet_bridge_grandpa::FreeHeadersRemaining::<TestRuntime, BridgesGrandpaPalletInstance>::set(
Some(free_headers_remaining),
);
// import free GRANDPA and teyrchain headers
@@ -1855,7 +1855,7 @@ pub(crate) mod tests {
relay_block_number = relay_block_number + FreeHeadersInterval::get();
proceed(relay_block_number, state_root);
assert_eq!(
pallet_bridge_grandpa::FreeHeadersRemaining::<
pezpallet_bridge_grandpa::FreeHeadersRemaining::<
TestRuntime,
BridgesGrandpaPalletInstance,
>::get(),
@@ -1870,7 +1870,7 @@ pub(crate) mod tests {
proof,
),);
assert_eq!(
pallet_bridge_grandpa::FreeHeadersRemaining::<
pezpallet_bridge_grandpa::FreeHeadersRemaining::<
TestRuntime,
BridgesGrandpaPalletInstance,
>::get(),
@@ -1882,7 +1882,7 @@ pub(crate) mod tests {
let (state_root, proof, teyrchains) =
prepare_teyrchain_heads_proof::<RegularTeyrchainHeader>(vec![(2, head_data(2, 7))]);
relay_block_number = relay_block_number + FreeHeadersInterval::get();
let result = pallet_bridge_grandpa::Pallet::<TestRuntime, BridgesGrandpaPalletInstance>::submit_finality_proof_ex(
let result = pezpallet_bridge_grandpa::Pallet::<TestRuntime, BridgesGrandpaPalletInstance>::submit_finality_proof_ex(
RuntimeOrigin::signed(1),
Box::new(test_relay_header(relay_block_number, state_root)),
make_default_justification(&test_relay_header(relay_block_number, state_root)),
@@ -1899,7 +1899,7 @@ pub(crate) mod tests {
);
assert_eq!(result.unwrap().pays_fee, Pays::Yes);
assert_eq!(
pallet_bridge_grandpa::FreeHeadersRemaining::<
pezpallet_bridge_grandpa::FreeHeadersRemaining::<
TestRuntime,
BridgesGrandpaPalletInstance,
>::get(),
+21 -21
View File
@@ -17,23 +17,23 @@
use bp_header_chain::ChainWithGrandpa;
use bp_pezkuwi_core::teyrchains::ParaId;
use bp_runtime::{Chain, ChainId, Teyrchain};
use frame_support::{
use pezframe_support::{
construct_runtime, derive_impl, parameter_types, traits::ConstU32, weights::Weight,
};
use sp_runtime::{
use pezsp_runtime::{
testing::H256,
traits::{BlakeTwo256, Header as HeaderT},
MultiSignature, StateVersion,
};
use crate as pallet_bridge_teyrchains;
use crate as pezpallet_bridge_teyrchains;
pub type AccountId = u64;
pub type RelayBlockHeader =
sp_runtime::generic::Header<crate::RelayBlockNumber, crate::RelayBlockHasher>;
pezsp_runtime::generic::Header<crate::RelayBlockNumber, crate::RelayBlockHasher>;
type Block = frame_system::mocking::MockBlock<TestRuntime>;
type Block = pezframe_system::mocking::MockBlock<TestRuntime>;
pub const PARAS_PALLET_NAME: &str = "Paras";
pub const UNTRACKED_TEYRCHAIN_ID: u32 = 10;
@@ -42,9 +42,9 @@ pub const MAXIMAL_TEYRCHAIN_HEAD_DATA_SIZE: u32 = 1 + 8 + 32;
// total teyrchains that we use in tests
pub const TOTAL_TEYRCHAINS: u32 = 4;
pub type RegularTeyrchainHeader = sp_runtime::testing::Header;
pub type RegularTeyrchainHeader = pezsp_runtime::testing::Header;
pub type RegularTeyrchainHasher = BlakeTwo256;
pub type BigTeyrchainHeader = sp_runtime::generic::Header<u128, BlakeTwo256>;
pub type BigTeyrchainHeader = pezsp_runtime::generic::Header<u128, BlakeTwo256>;
pub struct Teyrchain1;
@@ -166,15 +166,15 @@ impl Teyrchain for BigTeyrchain {
construct_runtime! {
pub enum TestRuntime
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Grandpa1: pallet_bridge_grandpa::<Instance1>::{Pallet, Event<T>},
Grandpa2: pallet_bridge_grandpa::<Instance2>::{Pallet, Event<T>},
Teyrchains: pallet_bridge_teyrchains::{Call, Pallet, Event<T>},
System: pezframe_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Grandpa1: pezpallet_bridge_grandpa::<Instance1>::{Pallet, Event<T>},
Grandpa2: pezpallet_bridge_grandpa::<Instance2>::{Pallet, Event<T>},
Teyrchains: pezpallet_bridge_teyrchains::{Call, Pallet, Event<T>},
}
}
#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
impl frame_system::Config for TestRuntime {
#[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
impl pezframe_system::Config for TestRuntime {
type Block = Block;
}
@@ -183,7 +183,7 @@ parameter_types! {
pub const FreeHeadersInterval: u32 = 15;
}
impl pallet_bridge_grandpa::Config<pallet_bridge_grandpa::Instance1> for TestRuntime {
impl pezpallet_bridge_grandpa::Config<pezpallet_bridge_grandpa::Instance1> for TestRuntime {
type RuntimeEvent = RuntimeEvent;
type BridgedChain = TestBridgedChain;
type MaxFreeHeadersPerBlock = ConstU32<2>;
@@ -192,7 +192,7 @@ impl pallet_bridge_grandpa::Config<pallet_bridge_grandpa::Instance1> for TestRun
type WeightInfo = ();
}
impl pallet_bridge_grandpa::Config<pallet_bridge_grandpa::Instance2> for TestRuntime {
impl pezpallet_bridge_grandpa::Config<pezpallet_bridge_grandpa::Instance2> for TestRuntime {
type RuntimeEvent = RuntimeEvent;
type BridgedChain = TestBridgedChain;
type MaxFreeHeadersPerBlock = ConstU32<2>;
@@ -207,10 +207,10 @@ parameter_types! {
pub GetTenFirstTeyrchains: Vec<ParaId> = (0..10).map(ParaId).collect();
}
impl pallet_bridge_teyrchains::Config for TestRuntime {
impl pezpallet_bridge_teyrchains::Config for TestRuntime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
type BridgesGrandpaPalletInstance = pallet_bridge_grandpa::Instance1;
type BridgesGrandpaPalletInstance = pezpallet_bridge_grandpa::Instance1;
type ParasPalletName = ParasPalletName;
type ParaStoredHeaderDataBuilder = (Teyrchain1, Teyrchain2, Teyrchain3, BigTeyrchain);
type HeadsToKeep = HeadsToKeep;
@@ -219,7 +219,7 @@ impl pallet_bridge_teyrchains::Config for TestRuntime {
}
#[cfg(feature = "runtime-benchmarks")]
impl pallet_bridge_teyrchains::benchmarking::Config<()> for TestRuntime {
impl pezpallet_bridge_teyrchains::benchmarking::Config<()> for TestRuntime {
fn teyrchains() -> Vec<ParaId> {
vec![
ParaId(Teyrchain1::TEYRCHAIN_ID),
@@ -263,7 +263,7 @@ impl Chain for TestBridgedChain {
type AccountId = AccountId;
type Balance = u32;
type Nonce = u32;
type Signature = sp_runtime::testing::TestSignature;
type Signature = pezsp_runtime::testing::TestSignature;
const STATE_VERSION: StateVersion = StateVersion::V1;
@@ -285,8 +285,8 @@ impl ChainWithGrandpa for TestBridgedChain {
}
/// Return test externalities to use in tests.
pub fn new_test_ext() -> sp_io::TestExternalities {
sp_io::TestExternalities::new(Default::default())
pub fn new_test_ext() -> pezsp_io::TestExternalities {
pezsp_io::TestExternalities::new(Default::default())
}
/// Run pallet test.
+2 -2
View File
@@ -22,7 +22,7 @@ use bp_pezkuwi_core::teyrchains::{ParaHead, ParaId};
use bp_runtime::{RawStorageProof, StorageProofChecker, StorageProofError};
use bp_teyrchains::teyrchain_head_storage_key_at_source;
use codec::Decode;
use frame_support::traits::Get;
use pezframe_support::traits::Get;
/// Abstraction over storage proof manipulation, hiding implementation details of actual storage
/// proofs.
@@ -53,7 +53,7 @@ pub type TeyrchainsStorageProofAdapter<T, I> = RawStorageProofAdapter<T, I>;
/// A `StorageProofAdapter` implementation for raw storage proofs.
pub struct RawStorageProofAdapter<T: Config<I>, I: 'static> {
storage: StorageProofChecker<RelayBlockHasher>,
_dummy: sp_std::marker::PhantomData<(T, I)>,
_dummy: pezsp_std::marker::PhantomData<(T, I)>,
}
impl<T: Config<I>, I: 'static> RawStorageProofAdapter<T, I> {
+8 -8
View File
@@ -14,9 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
//! Autogenerated weights for pallet_bridge_teyrchains
//! Autogenerated weights for pezpallet_bridge_teyrchains
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-06-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `serban-ROG-Zephyrus`, CPU: `12th Gen Intel(R) Core(TM) i7-12700H`
@@ -29,7 +29,7 @@
// --chain=dev
// --steps=50
// --repeat=20
// --pallet=pallet_bridge_teyrchains
// --pallet=pezpallet_bridge_teyrchains
// --extrinsic=*
// --execution=wasm
// --wasm-execution=Compiled
@@ -42,24 +42,24 @@
#![allow(unused_imports)]
#![allow(missing_docs)]
use frame_support::{
use pezframe_support::{
traits::Get,
weights::{constants::RocksDbWeight, Weight},
};
use sp_std::marker::PhantomData;
use pezsp_std::marker::PhantomData;
/// Weight functions needed for pallet_bridge_teyrchains.
/// Weight functions needed for pezpallet_bridge_teyrchains.
pub trait WeightInfo {
fn submit_teyrchain_heads_with_n_teyrchains(p: u32) -> Weight;
fn submit_teyrchain_heads_with_1kb_proof() -> Weight;
fn submit_teyrchain_heads_with_16kb_proof() -> Weight;
}
/// Weights for `pallet_bridge_teyrchains` that are generated using one of the Bridge testnets.
/// Weights for `pezpallet_bridge_teyrchains` that are generated using one of the Bridge testnets.
///
/// Those weights are test only and must never be used in production.
pub struct BridgeWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for BridgeWeight<T> {
impl<T: pezframe_system::Config> WeightInfo for BridgeWeight<T> {
/// Storage: BridgeUnknownTeyrchains PalletOperatingMode (r:1 w:0)
///
/// Proof: BridgeUnknownTeyrchains PalletOperatingMode (max_values: Some(1), max_size: Some(1),
@@ -19,7 +19,7 @@
use crate::weights::{BridgeWeight, WeightInfo};
use bp_runtime::Size;
use frame_support::weights::{RuntimeDbWeight, Weight};
use pezframe_support::weights::{RuntimeDbWeight, Weight};
/// Size of the regular teyrchain head.
///
@@ -42,7 +42,7 @@ pub trait WeightInfoExt: WeightInfo {
//
// 2) slash relayer if he submits an invalid transaction.
//
// We read and update storage values of other pallets (`pallet-bridge-relayers` and
// We read and update storage values of other pallets (`pezpallet-bridge-relayers` and
// balances/assets pallet). So we need to add this weight to the weight of our call.
// Hence two following methods.
@@ -121,7 +121,7 @@ impl WeightInfoExt for () {
}
}
impl<T: frame_system::Config> WeightInfoExt for BridgeWeight<T> {
impl<T: pezframe_system::Config> WeightInfoExt for BridgeWeight<T> {
fn submit_teyrchain_heads_overhead_from_runtime() -> Weight {
Weight::zero()
}