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
+54 -54
View File
@@ -15,23 +15,23 @@
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
//! Transaction extension that rejects bridge-related transactions, that include
//! obsolete (duplicated) data or do not pass some additional pallet-specific
//! obsolete (duplicated) data or do not pass some additional pezpallet-specific
//! checks.
use bp_relayers::ExplicitOrAccountParams;
use bp_runtime::Teyrchain;
use bp_teyrchains::SubmitTeyrchainHeadsInfo;
use pallet_bridge_grandpa::{
use pezpallet_bridge_grandpa::{
BridgedBlockNumber, CallSubType as GrandpaCallSubType, SubmitFinalityProofHelper,
};
use pallet_bridge_messages::CallSubType as MessagesCallSubType;
use pallet_bridge_relayers::Pallet as RelayersPallet;
use pallet_bridge_teyrchains::{CallSubType as TeyrchainsCallSubtype, SubmitTeyrchainHeadsHelper};
use sp_runtime::{
use pezpallet_bridge_messages::CallSubType as MessagesCallSubType;
use pezpallet_bridge_relayers::Pallet as RelayersPallet;
use pezpallet_bridge_teyrchains::{CallSubType as TeyrchainsCallSubtype, SubmitTeyrchainHeadsHelper};
use pezsp_runtime::{
traits::{Get, UniqueSaturatedInto},
transaction_validity::{TransactionPriority, TransactionValidity, ValidTransactionBuilder},
};
use sp_std::marker::PhantomData;
use pezsp_std::marker::PhantomData;
// Re-export to avoid include tuplex dependency everywhere.
#[doc(hidden)]
@@ -68,7 +68,7 @@ impl<T, I: 'static, Priority: Get<TransactionPriority>, SlashAccount: Get<T::Acc
BridgeRuntimeFilterCall<T::AccountId, T::RuntimeCall>
for CheckAndBoostBridgeGrandpaTransactions<T, I, Priority, SlashAccount>
where
T: pallet_bridge_relayers::Config + pallet_bridge_grandpa::Config<I>,
T: pezpallet_bridge_relayers::Config + pezpallet_bridge_grandpa::Config<I>,
T::RuntimeCall: GrandpaCallSubType<T, I>,
{
// bridged header number, bundled in transaction
@@ -139,7 +139,7 @@ impl<
> BridgeRuntimeFilterCall<T::AccountId, T::RuntimeCall>
for CheckAndBoostBridgeTeyrchainsTransactions<T, TeyrchainsInstance, Para, Priority, SlashAccount>
where
T: pallet_bridge_relayers::Config + pallet_bridge_teyrchains::Config<TeyrchainsInstance>,
T: pezpallet_bridge_relayers::Config + pezpallet_bridge_teyrchains::Config<TeyrchainsInstance>,
TeyrchainsInstance: 'static,
Para: Teyrchain,
T::RuntimeCall: TeyrchainsCallSubtype<T, TeyrchainsInstance>,
@@ -188,9 +188,9 @@ where
}
impl<T, I: 'static> BridgeRuntimeFilterCall<T::AccountId, T::RuntimeCall>
for pallet_bridge_grandpa::Pallet<T, I>
for pezpallet_bridge_grandpa::Pallet<T, I>
where
T: pallet_bridge_grandpa::Config<I>,
T: pezpallet_bridge_grandpa::Config<I>,
T::RuntimeCall: GrandpaCallSubType<T, I>,
{
type ToPostDispatch = ();
@@ -204,9 +204,9 @@ where
}
impl<T, I: 'static> BridgeRuntimeFilterCall<T::AccountId, T::RuntimeCall>
for pallet_bridge_teyrchains::Pallet<T, I>
for pezpallet_bridge_teyrchains::Pallet<T, I>
where
T: pallet_bridge_teyrchains::Config<I>,
T: pezpallet_bridge_teyrchains::Config<I>,
T::RuntimeCall: TeyrchainsCallSubtype<T, I>,
{
type ToPostDispatch = ();
@@ -219,8 +219,8 @@ where
}
}
impl<T: pallet_bridge_messages::Config<I>, I: 'static>
BridgeRuntimeFilterCall<T::AccountId, T::RuntimeCall> for pallet_bridge_messages::Pallet<T, I>
impl<T: pezpallet_bridge_messages::Config<I>, I: 'static>
BridgeRuntimeFilterCall<T::AccountId, T::RuntimeCall> for pezpallet_bridge_messages::Pallet<T, I>
where
T::RuntimeCall: MessagesCallSubType<T, I>,
{
@@ -240,7 +240,7 @@ fn compute_priority_boost<T, N, Priority>(
improved_by: N,
) -> TransactionPriority
where
T: pallet_bridge_relayers::Config,
T: pezpallet_bridge_relayers::Config,
N: UniqueSaturatedInto<TransactionPriority>,
Priority: Get<TransactionPriority>,
{
@@ -271,9 +271,9 @@ where
#[macro_export]
macro_rules! generate_bridge_reject_obsolete_headers_and_messages {
($call:ty, $account_id:ty, $($filter_call:ty),*) => {
#[derive(Clone, codec::Decode, codec::DecodeWithMemTracking, Default, codec::Encode, Eq, PartialEq, sp_runtime::RuntimeDebug, scale_info::TypeInfo)]
#[derive(Clone, codec::Decode, codec::DecodeWithMemTracking, Default, codec::Encode, Eq, PartialEq, pezsp_runtime::RuntimeDebug, scale_info::TypeInfo)]
pub struct BridgeRejectObsoleteHeadersAndMessages;
impl sp_runtime::traits::TransactionExtension<$call> for BridgeRejectObsoleteHeadersAndMessages {
impl pezsp_runtime::traits::TransactionExtension<$call> for BridgeRejectObsoleteHeadersAndMessages {
const IDENTIFIER: &'static str = "BridgeRejectObsoleteHeadersAndMessages";
type Implicit = ();
type Val = Option<(
@@ -287,35 +287,35 @@ macro_rules! generate_bridge_reject_obsolete_headers_and_messages {
)>;
type Pre = Self::Val;
fn weight(&self, _: &$call) -> frame_support::pallet_prelude::Weight {
frame_support::pallet_prelude::Weight::zero()
fn weight(&self, _: &$call) -> pezframe_support::pezpallet_prelude::Weight {
pezframe_support::pezpallet_prelude::Weight::zero()
}
fn validate(
&self,
origin: <$call as sp_runtime::traits::Dispatchable>::RuntimeOrigin,
origin: <$call as pezsp_runtime::traits::Dispatchable>::RuntimeOrigin,
call: &$call,
_info: &sp_runtime::traits::DispatchInfoOf<$call>,
_info: &pezsp_runtime::traits::DispatchInfoOf<$call>,
_len: usize,
_self_implicit: Self::Implicit,
_inherited_implication: &impl codec::Encode,
_source: sp_runtime::transaction_validity::TransactionSource,
_source: pezsp_runtime::transaction_validity::TransactionSource,
) -> Result<
(
sp_runtime::transaction_validity::ValidTransaction,
pezsp_runtime::transaction_validity::ValidTransaction,
Self::Val,
<$call as sp_runtime::traits::Dispatchable>::RuntimeOrigin,
), sp_runtime::transaction_validity::TransactionValidityError
<$call as pezsp_runtime::traits::Dispatchable>::RuntimeOrigin,
), pezsp_runtime::transaction_validity::TransactionValidityError
> {
use $crate::extensions::__private::tuplex::PushBack;
use sp_runtime::traits::AsSystemOriginSigner;
use pezsp_runtime::traits::AsSystemOriginSigner;
let Some(who) = origin.as_system_origin_signer() else {
return Ok((Default::default(), None, origin));
};
let to_post_dispatch = ();
let tx_validity = sp_runtime::transaction_validity::ValidTransaction::default();
let tx_validity = pezsp_runtime::transaction_validity::ValidTransaction::default();
$(
let (from_validate, call_filter_validity) = <
$filter_call as
@@ -332,26 +332,26 @@ macro_rules! generate_bridge_reject_obsolete_headers_and_messages {
fn prepare(
self,
val: Self::Val,
_origin: &<$call as sp_runtime::traits::Dispatchable>::RuntimeOrigin,
_origin: &<$call as pezsp_runtime::traits::Dispatchable>::RuntimeOrigin,
_call: &$call,
_info: &sp_runtime::traits::DispatchInfoOf<$call>,
_info: &pezsp_runtime::traits::DispatchInfoOf<$call>,
_len: usize,
) -> Result<Self::Pre, sp_runtime::transaction_validity::TransactionValidityError> {
) -> Result<Self::Pre, pezsp_runtime::transaction_validity::TransactionValidityError> {
Ok(val)
}
#[allow(unused_variables)]
fn post_dispatch_details(
to_post_dispatch: Self::Pre,
info: &sp_runtime::traits::DispatchInfoOf<$call>,
post_info: &sp_runtime::traits::PostDispatchInfoOf<$call>,
info: &pezsp_runtime::traits::DispatchInfoOf<$call>,
post_info: &pezsp_runtime::traits::PostDispatchInfoOf<$call>,
len: usize,
result: &sp_runtime::DispatchResult,
) -> Result<frame_support::pallet_prelude::Weight, sp_runtime::transaction_validity::TransactionValidityError> {
result: &pezsp_runtime::DispatchResult,
) -> Result<pezframe_support::pezpallet_prelude::Weight, pezsp_runtime::transaction_validity::TransactionValidityError> {
use $crate::extensions::__private::tuplex::PopFront;
let Some((relayer, to_post_dispatch)) = to_post_dispatch else {
return Ok(frame_support::pallet_prelude::Weight::zero())
return Ok(pezframe_support::pezpallet_prelude::Weight::zero())
};
let has_failed = result.is_err();
@@ -364,7 +364,7 @@ macro_rules! generate_bridge_reject_obsolete_headers_and_messages {
$call,
>>::post_dispatch(&relayer, has_failed, item);
)*
Ok(frame_support::pallet_prelude::Weight::zero())
Ok(pezframe_support::pezpallet_prelude::Weight::zero())
}
}
};
@@ -382,11 +382,11 @@ mod tests {
use bp_test_utils::{make_default_justification, test_keyring, TEST_GRANDPA_SET_ID};
use bp_teyrchains::{BestParaHeadHash, ParaInfo};
use codec::{Decode, Encode, MaxEncodedLen};
use frame_support::{assert_err, assert_ok, traits::fungible::Mutate};
use pallet_bridge_grandpa::{Call as GrandpaCall, StoredAuthoritySet};
use pallet_bridge_teyrchains::Call as TeyrchainsCall;
use pezframe_support::{assert_err, assert_ok, traits::fungible::Mutate};
use pezpallet_bridge_grandpa::{Call as GrandpaCall, StoredAuthoritySet};
use pezpallet_bridge_teyrchains::Call as TeyrchainsCall;
use scale_info::TypeInfo;
use sp_runtime::{
use pezsp_runtime::{
traits::{
parameter_types, AsSystemOriginSigner, AsTransactionAuthorizedOrigin, ConstU64,
DispatchTransaction, Header as _, TransactionExtension,
@@ -436,7 +436,7 @@ mod tests {
}
}
impl sp_runtime::traits::Dispatchable for MockCall {
impl pezsp_runtime::traits::Dispatchable for MockCall {
type RuntimeOrigin = MockOrigin;
type Config = ();
type Info = ();
@@ -445,7 +445,7 @@ mod tests {
fn dispatch(
self,
_origin: Self::RuntimeOrigin,
) -> sp_runtime::DispatchResultWithInfo<Self::PostInfo> {
) -> pezsp_runtime::DispatchResultWithInfo<Self::PostInfo> {
unimplemented!()
}
}
@@ -453,11 +453,11 @@ mod tests {
pub struct FirstFilterCall;
impl FirstFilterCall {
fn post_dispatch_called_with(success: bool) {
frame_support::storage::unhashed::put(&[1], &success);
pezframe_support::storage::unhashed::put(&[1], &success);
}
fn verify_post_dispatch_called_with(success: bool) {
assert_eq!(frame_support::storage::unhashed::get::<bool>(&[1]), Some(success));
assert_eq!(pezframe_support::storage::unhashed::get::<bool>(&[1]), Some(success));
}
}
@@ -481,11 +481,11 @@ mod tests {
impl SecondFilterCall {
fn post_dispatch_called_with(success: bool) {
frame_support::storage::unhashed::put(&[2], &success);
pezframe_support::storage::unhashed::put(&[2], &success);
}
fn verify_post_dispatch_called_with(success: bool) {
assert_eq!(frame_support::storage::unhashed::get::<bool>(&[2]), Some(success));
assert_eq!(pezframe_support::storage::unhashed::get::<bool>(&[2]), Some(success));
}
}
@@ -532,11 +532,11 @@ mod tests {
) {
let authorities = test_keyring().into_iter().map(|(a, w)| (a.into(), w)).collect();
let best_relay_header = HeaderId(best_relay_header_number, BridgedChainHash::default());
pallet_bridge_grandpa::CurrentAuthoritySet::<TestRuntime>::put(
pezpallet_bridge_grandpa::CurrentAuthoritySet::<TestRuntime>::put(
StoredAuthoritySet::try_new(authorities, TEST_GRANDPA_SET_ID).unwrap(),
);
pallet_bridge_grandpa::BestFinalized::<TestRuntime>::put(best_relay_header);
pallet_bridge_grandpa::ImportedHeaders::<TestRuntime>::insert(
pezpallet_bridge_grandpa::BestFinalized::<TestRuntime>::put(best_relay_header);
pezpallet_bridge_grandpa::ImportedHeaders::<TestRuntime>::insert(
best_relay_header.hash(),
bp_test_utils::test_header::<BridgedChainHeader>(0).build(),
);
@@ -549,16 +549,16 @@ mod tests {
},
next_imported_hash_position: 0,
};
pallet_bridge_teyrchains::ParasInfo::<TestRuntime>::insert(para_id, para_info);
pezpallet_bridge_teyrchains::ParasInfo::<TestRuntime>::insert(para_id, para_info);
let lane_id = test_lane_id();
let in_lane_data =
InboundLaneData { last_confirmed_nonce: best_message, ..Default::default() };
pallet_bridge_messages::InboundLanes::<TestRuntime>::insert(lane_id, in_lane_data);
pezpallet_bridge_messages::InboundLanes::<TestRuntime>::insert(lane_id, in_lane_data);
let out_lane_data =
OutboundLaneData { latest_received_nonce: best_message, ..Default::default() };
pallet_bridge_messages::OutboundLanes::<TestRuntime>::insert(lane_id, out_lane_data);
pezpallet_bridge_messages::OutboundLanes::<TestRuntime>::insert(lane_id, out_lane_data);
Balances::mint_into(&delivery_rewards_account(), ExistentialDeposit::get()).unwrap();
Balances::mint_into(&confirmation_rewards_account(), ExistentialDeposit::get()).unwrap();
@@ -694,7 +694,7 @@ mod tests {
});
}
frame_support::parameter_types! {
pezframe_support::parameter_types! {
pub SlashDestination: ThisChainAccountId = 42;
}
+38 -38
View File
@@ -23,9 +23,9 @@ use bp_header_chain::ChainWithGrandpa;
use bp_messages::{ChainWithMessages, InboundLaneData, MessageNonce};
use bp_runtime::{AccountIdOf, Chain};
use codec::Encode;
use frame_support::{storage::generator::StorageValue, traits::Get, weights::Weight};
use frame_system::limits;
use pallet_bridge_messages::{ThisChainOf, WeightInfoExt as _};
use pezframe_support::{storage::generator::StorageValue, traits::Get, weights::Weight};
use pezframe_system::limits;
use pezpallet_bridge_messages::{ThisChainOf, WeightInfoExt as _};
// Re-export to avoid include all dependencies everywhere.
#[doc(hidden)]
@@ -39,7 +39,7 @@ pub mod __private {
macro_rules! assert_chain_types(
( runtime: $r:path, this_chain: $this:path ) => {
{
use frame_system::{Config as SystemConfig, pallet_prelude::{BlockNumberFor, HeaderFor}};
use pezframe_system::{Config as SystemConfig, pezpallet_prelude::{BlockNumberFor, HeaderFor}};
use $crate::integrity::__private::static_assertions::assert_type_eq_all;
// if one of asserts fail, then either bridge isn't configured properly (or alternatively - non-standard
@@ -71,7 +71,7 @@ macro_rules! assert_bridge_messages_pallet_types(
use $crate::integrity::__private::static_assertions::assert_type_eq_all;
use bp_messages::ChainWithMessages;
use bp_runtime::Chain;
use pallet_bridge_messages::Config as BridgeMessagesConfig;
use pezpallet_bridge_messages::Config as BridgeMessagesConfig;
// if one of asserts fail, then either bridge isn't configured properly (or alternatively - non-standard
// configuration is used), or something has broke existing configuration (meaning that all bridged chains
@@ -126,7 +126,7 @@ pub struct AssertChainConstants {
/// 2) block size limits are matching.
pub fn assert_chain_constants<R>(params: AssertChainConstants)
where
R: frame_system::Config,
R: pezframe_system::Config,
{
// we don't check runtime version here, because in our case we'll be building relay from one
// repo and runtime will live in another repo, along with outdated relay version. To avoid
@@ -157,7 +157,7 @@ where
/// Test that the constants, used in GRANDPA pallet configuration are valid.
pub fn assert_bridge_grandpa_pallet_constants<R, GI>()
where
R: pallet_bridge_grandpa::Config<GI>,
R: pezpallet_bridge_grandpa::Config<GI>,
GI: 'static,
{
assert!(
@@ -170,18 +170,18 @@ where
/// Test that the constants, used in messages pallet configuration are valid.
pub fn assert_bridge_messages_pallet_constants<R, MI>()
where
R: pallet_bridge_messages::Config<MI>,
R: pezpallet_bridge_messages::Config<MI>,
MI: 'static,
{
assert!(
pallet_bridge_messages::BridgedChainOf::<R, MI>::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX
<= pallet_bridge_messages::BridgedChainOf::<R, MI>::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
pezpallet_bridge_messages::BridgedChainOf::<R, MI>::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX
<= pezpallet_bridge_messages::BridgedChainOf::<R, MI>::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
"MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX ({}) of {:?} is larger than \
its MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX ({}). This makes \
no sense",
pallet_bridge_messages::BridgedChainOf::<R, MI>::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
pallet_bridge_messages::BridgedChainOf::<R, MI>::ID,
pallet_bridge_messages::BridgedChainOf::<R, MI>::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
pezpallet_bridge_messages::BridgedChainOf::<R, MI>::MAX_UNREWARDED_RELAYERS_IN_CONFIRMATION_TX,
pezpallet_bridge_messages::BridgedChainOf::<R, MI>::ID,
pezpallet_bridge_messages::BridgedChainOf::<R, MI>::MAX_UNCONFIRMED_MESSAGES_IN_CONFIRMATION_TX,
);
}
@@ -197,12 +197,12 @@ struct AssertBridgeGrandpaPalletNames<'a> {
/// from chain primitives crates.
fn assert_bridge_grandpa_pallet_names<R, GI>(params: AssertBridgeGrandpaPalletNames)
where
R: pallet_bridge_grandpa::Config<GI>,
R: pezpallet_bridge_grandpa::Config<GI>,
GI: 'static,
{
// check that the bridge GRANDPA pallet has required name
assert_eq!(
pallet_bridge_grandpa::PalletOwner::<R, GI>::storage_value_final_key().to_vec(),
pezpallet_bridge_grandpa::PalletOwner::<R, GI>::storage_value_final_key().to_vec(),
bp_runtime::storage_value_key(
params.with_bridged_chain_grandpa_pallet_name,
"PalletOwner",
@@ -210,7 +210,7 @@ where
.0,
);
assert_eq!(
pallet_bridge_grandpa::PalletOperatingMode::<R, GI>::storage_value_final_key().to_vec(),
pezpallet_bridge_grandpa::PalletOperatingMode::<R, GI>::storage_value_final_key().to_vec(),
bp_runtime::storage_value_key(
params.with_bridged_chain_grandpa_pallet_name,
"PalletOperatingMode",
@@ -231,12 +231,12 @@ struct AssertBridgeMessagesPalletNames<'a> {
/// from chain primitives crates.
fn assert_bridge_messages_pallet_names<R, MI>(params: AssertBridgeMessagesPalletNames)
where
R: pallet_bridge_messages::Config<MI>,
R: pezpallet_bridge_messages::Config<MI>,
MI: 'static,
{
// check that the bridge messages pallet has required name
assert_eq!(
pallet_bridge_messages::PalletOwner::<R, MI>::storage_value_final_key().to_vec(),
pezpallet_bridge_messages::PalletOwner::<R, MI>::storage_value_final_key().to_vec(),
bp_runtime::storage_value_key(
params.with_bridged_chain_messages_pallet_name,
"PalletOwner",
@@ -244,7 +244,7 @@ where
.0,
);
assert_eq!(
pallet_bridge_messages::PalletOperatingMode::<R, MI>::storage_value_final_key().to_vec(),
pezpallet_bridge_messages::PalletOperatingMode::<R, MI>::storage_value_final_key().to_vec(),
bp_runtime::storage_value_key(
params.with_bridged_chain_messages_pallet_name,
"PalletOperatingMode",
@@ -265,9 +265,9 @@ pub struct AssertCompleteBridgeConstants {
pub fn assert_complete_with_relay_chain_bridge_constants<R, GI, MI>(
params: AssertCompleteBridgeConstants,
) where
R: frame_system::Config
+ pallet_bridge_grandpa::Config<GI>
+ pallet_bridge_messages::Config<MI>,
R: pezframe_system::Config
+ pezpallet_bridge_grandpa::Config<GI>
+ pezpallet_bridge_messages::Config<MI>,
GI: 'static,
MI: 'static,
{
@@ -276,11 +276,11 @@ pub fn assert_complete_with_relay_chain_bridge_constants<R, GI, MI>(
assert_bridge_messages_pallet_constants::<R, MI>();
assert_bridge_grandpa_pallet_names::<R, GI>(AssertBridgeGrandpaPalletNames {
with_bridged_chain_grandpa_pallet_name:
<R as pallet_bridge_grandpa::Config<GI>>::BridgedChain::WITH_CHAIN_GRANDPA_PALLET_NAME,
<R as pezpallet_bridge_grandpa::Config<GI>>::BridgedChain::WITH_CHAIN_GRANDPA_PALLET_NAME,
});
assert_bridge_messages_pallet_names::<R, MI>(AssertBridgeMessagesPalletNames {
with_bridged_chain_messages_pallet_name:
<R as pallet_bridge_messages::Config<MI>>::BridgedChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
<R as pezpallet_bridge_messages::Config<MI>>::BridgedChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
});
}
@@ -289,10 +289,10 @@ pub fn assert_complete_with_relay_chain_bridge_constants<R, GI, MI>(
pub fn assert_complete_with_teyrchain_bridge_constants<R, PI, MI>(
params: AssertCompleteBridgeConstants,
) where
R: frame_system::Config
+ pallet_bridge_teyrchains::Config<PI>
+ pallet_bridge_messages::Config<MI>,
<R as pallet_bridge_teyrchains::BoundedBridgeGrandpaConfig<R::BridgesGrandpaPalletInstance>>::BridgedRelayChain: ChainWithGrandpa,
R: pezframe_system::Config
+ pezpallet_bridge_teyrchains::Config<PI>
+ pezpallet_bridge_messages::Config<MI>,
<R as pezpallet_bridge_teyrchains::BoundedBridgeGrandpaConfig<R::BridgesGrandpaPalletInstance>>::BridgedRelayChain: ChainWithGrandpa,
PI: 'static,
MI: 'static,
{
@@ -302,14 +302,14 @@ pub fn assert_complete_with_teyrchain_bridge_constants<R, PI, MI>(
assert_bridge_grandpa_pallet_names::<R, R::BridgesGrandpaPalletInstance>(
AssertBridgeGrandpaPalletNames {
with_bridged_chain_grandpa_pallet_name:
<<R as pallet_bridge_teyrchains::BoundedBridgeGrandpaConfig<
<<R as pezpallet_bridge_teyrchains::BoundedBridgeGrandpaConfig<
R::BridgesGrandpaPalletInstance,
>>::BridgedRelayChain>::WITH_CHAIN_GRANDPA_PALLET_NAME,
},
);
assert_bridge_messages_pallet_names::<R, MI>(AssertBridgeMessagesPalletNames {
with_bridged_chain_messages_pallet_name:
<R as pallet_bridge_messages::Config<MI>>::BridgedChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
<R as pezpallet_bridge_messages::Config<MI>>::BridgedChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
});
}
@@ -317,21 +317,21 @@ pub fn assert_complete_with_teyrchain_bridge_constants<R, PI, MI>(
/// messages pallets deployed).
pub fn assert_standalone_messages_bridge_constants<R, MI>(params: AssertCompleteBridgeConstants)
where
R: frame_system::Config + pallet_bridge_messages::Config<MI>,
R: pezframe_system::Config + pezpallet_bridge_messages::Config<MI>,
MI: 'static,
{
assert_chain_constants::<R>(params.this_chain_constants);
assert_bridge_messages_pallet_constants::<R, MI>();
assert_bridge_messages_pallet_names::<R, MI>(AssertBridgeMessagesPalletNames {
with_bridged_chain_messages_pallet_name:
<R as pallet_bridge_messages::Config<MI>>::BridgedChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
<R as pezpallet_bridge_messages::Config<MI>>::BridgedChain::WITH_CHAIN_MESSAGES_PALLET_NAME,
});
}
/// Check that the message lane weights are correct.
pub fn check_message_lane_weights<
C: ChainWithMessages,
T: frame_system::Config + pallet_bridge_messages::Config<MessagesPalletInstance>,
T: pezframe_system::Config + pezpallet_bridge_messages::Config<MessagesPalletInstance>,
MessagesPalletInstance: 'static,
>(
bridged_chain_extra_storage_proof_size: u32,
@@ -343,13 +343,13 @@ pub fn check_message_lane_weights<
// in other words: pass true for all known production chains
runtime_includes_refund_extension: bool,
) {
type Weights<T, MI> = <T as pallet_bridge_messages::Config<MI>>::WeightInfo;
type Weights<T, MI> = <T as pezpallet_bridge_messages::Config<MI>>::WeightInfo;
// check basic weight assumptions
pallet_bridge_messages::ensure_weights_are_correct::<Weights<T, MessagesPalletInstance>>();
pezpallet_bridge_messages::ensure_weights_are_correct::<Weights<T, MessagesPalletInstance>>();
// check that the maximal message dispatch weight is below hardcoded limit
pallet_bridge_messages::ensure_maximal_message_dispatch::<Weights<T, MessagesPalletInstance>>(
pezpallet_bridge_messages::ensure_maximal_message_dispatch::<Weights<T, MessagesPalletInstance>>(
C::maximal_incoming_message_size(),
C::maximal_incoming_message_dispatch_weight(),
);
@@ -357,7 +357,7 @@ pub fn check_message_lane_weights<
// check that weights allow us to receive messages
let max_incoming_message_proof_size =
bridged_chain_extra_storage_proof_size.saturating_add(C::maximal_incoming_message_size());
pallet_bridge_messages::ensure_able_to_receive_message::<Weights<T, MessagesPalletInstance>>(
pezpallet_bridge_messages::ensure_able_to_receive_message::<Weights<T, MessagesPalletInstance>>(
C::max_extrinsic_size(),
C::max_extrinsic_weight(),
max_incoming_message_proof_size,
@@ -370,7 +370,7 @@ pub fn check_message_lane_weights<
>::encoded_size_hint_u32(
this_chain_max_unrewarded_relayers as _
);
pallet_bridge_messages::ensure_able_to_receive_confirmation::<Weights<T, MessagesPalletInstance>>(
pezpallet_bridge_messages::ensure_able_to_receive_confirmation::<Weights<T, MessagesPalletInstance>>(
C::max_extrinsic_size(),
C::max_extrinsic_weight(),
max_incoming_inbound_lane_data_proof_size,
@@ -17,7 +17,7 @@
//! Helpers for implementing various message-related runtime API methods.
use bp_messages::{InboundMessageDetails, MessageNonce, MessagePayload, OutboundMessageDetails};
use sp_std::vec::Vec;
use pezsp_std::vec::Vec;
/// Implementation of the `To*OutboundLaneApi::message_details`.
pub fn outbound_message_details<Runtime, MessagesPalletInstance>(
@@ -26,18 +26,18 @@ pub fn outbound_message_details<Runtime, MessagesPalletInstance>(
end: MessageNonce,
) -> Vec<OutboundMessageDetails>
where
Runtime: pallet_bridge_messages::Config<MessagesPalletInstance>,
Runtime: pezpallet_bridge_messages::Config<MessagesPalletInstance>,
MessagesPalletInstance: 'static,
{
(begin..=end)
.filter_map(|nonce| {
let message_data =
pallet_bridge_messages::Pallet::<Runtime, MessagesPalletInstance>::outbound_message_data(lane, nonce)?;
pezpallet_bridge_messages::Pallet::<Runtime, MessagesPalletInstance>::outbound_message_data(lane, nonce)?;
Some(OutboundMessageDetails {
nonce,
// dispatch message weight is always zero at the source chain, since we're paying for
// dispatch at the target chain
dispatch_weight: frame_support::weights::Weight::zero(),
dispatch_weight: pezframe_support::weights::Weight::zero(),
size: message_data.len() as _,
})
})
@@ -50,13 +50,13 @@ pub fn inbound_message_details<Runtime, MessagesPalletInstance>(
messages: Vec<(MessagePayload, OutboundMessageDetails)>,
) -> Vec<InboundMessageDetails>
where
Runtime: pallet_bridge_messages::Config<MessagesPalletInstance>,
Runtime: pezpallet_bridge_messages::Config<MessagesPalletInstance>,
MessagesPalletInstance: 'static,
{
messages
.into_iter()
.map(|(payload, details)| {
pallet_bridge_messages::Pallet::<Runtime, MessagesPalletInstance>::inbound_message_data(
pezpallet_bridge_messages::Pallet::<Runtime, MessagesPalletInstance>::inbound_message_data(
lane, payload, details,
)
})
@@ -26,8 +26,8 @@ use bp_messages::{
use bp_pezkuwi_core::teyrchains::ParaHash;
use bp_runtime::{AccountIdOf, Chain, HashOf, Teyrchain};
use codec::Encode;
use frame_support::weights::Weight;
use pallet_bridge_messages::{
use pezframe_support::weights::Weight;
use pezpallet_bridge_messages::{
benchmarking::{MessageDeliveryProofParams, MessageProofParams},
messages_generation::{
encode_all_messages, encode_lane_data, prepare_message_delivery_storage_proof,
@@ -35,8 +35,8 @@ use pallet_bridge_messages::{
},
BridgedChainOf, LaneIdOf, ThisChainOf,
};
use sp_runtime::traits::{Header, Zero};
use sp_std::prelude::*;
use pezsp_runtime::traits::{Header, Zero};
use pezsp_std::prelude::*;
use xcm::latest::prelude::*;
/// Prepare inbound bridge message according to given message proof parameters.
@@ -75,10 +75,10 @@ pub fn prepare_message_proof_from_grandpa_chain<R, FI, MI>(
message_generator: impl Fn(usize) -> MessagePayload,
) -> (FromBridgedChainMessagesProof<HashOf<BridgedChainOf<R, MI>>, LaneIdOf<R, MI>>, Weight)
where
R: pallet_bridge_grandpa::Config<FI, BridgedChain = BridgedChainOf<R, MI>>
+ pallet_bridge_messages::Config<
R: pezpallet_bridge_grandpa::Config<FI, BridgedChain = BridgedChainOf<R, MI>>
+ pezpallet_bridge_messages::Config<
MI,
BridgedHeaderChain = pallet_bridge_grandpa::Pallet<R, FI>,
BridgedHeaderChain = pezpallet_bridge_grandpa::Pallet<R, FI>,
>,
FI: 'static,
MI: 'static,
@@ -128,7 +128,7 @@ pub fn prepare_message_proof_from_teyrchain<R, PI, MI>(
message_generator: impl Fn(usize) -> MessagePayload,
) -> (FromBridgedChainMessagesProof<HashOf<BridgedChainOf<R, MI>>, LaneIdOf<R, MI>>, Weight)
where
R: pallet_bridge_teyrchains::Config<PI> + pallet_bridge_messages::Config<MI>,
R: pezpallet_bridge_teyrchains::Config<PI> + pezpallet_bridge_messages::Config<MI>,
PI: 'static,
MI: 'static,
BridgedChainOf<R, MI>: Chain<Hash = ParaHash> + Teyrchain,
@@ -175,10 +175,10 @@ pub fn prepare_message_delivery_proof_from_grandpa_chain<R, FI, MI>(
params: MessageDeliveryProofParams<AccountIdOf<ThisChainOf<R, MI>>, LaneIdOf<R, MI>>,
) -> FromBridgedChainMessagesDeliveryProof<HashOf<BridgedChainOf<R, MI>>, LaneIdOf<R, MI>>
where
R: pallet_bridge_grandpa::Config<FI, BridgedChain = BridgedChainOf<R, MI>>
+ pallet_bridge_messages::Config<
R: pezpallet_bridge_grandpa::Config<FI, BridgedChain = BridgedChainOf<R, MI>>
+ pezpallet_bridge_messages::Config<
MI,
BridgedHeaderChain = pallet_bridge_grandpa::Pallet<R, FI>,
BridgedHeaderChain = pezpallet_bridge_grandpa::Pallet<R, FI>,
>,
FI: 'static,
MI: 'static,
@@ -210,7 +210,7 @@ pub fn prepare_message_delivery_proof_from_teyrchain<R, PI, MI>(
params: MessageDeliveryProofParams<AccountIdOf<ThisChainOf<R, MI>>, LaneIdOf<R, MI>>,
) -> FromBridgedChainMessagesDeliveryProof<HashOf<BridgedChainOf<R, MI>>, LaneIdOf<R, MI>>
where
R: pallet_bridge_teyrchains::Config<PI> + pallet_bridge_messages::Config<MI>,
R: pezpallet_bridge_teyrchains::Config<PI> + pezpallet_bridge_messages::Config<MI>,
PI: 'static,
MI: 'static,
BridgedChainOf<R, MI>: Chain<Hash = ParaHash> + Teyrchain,
@@ -239,7 +239,7 @@ pub(crate) fn insert_header_to_grandpa_pallet<R, GI>(
state_root: bp_runtime::HashOf<R::BridgedChain>,
) -> (bp_runtime::BlockNumberOf<R::BridgedChain>, bp_runtime::HashOf<R::BridgedChain>)
where
R: pallet_bridge_grandpa::Config<GI>,
R: pezpallet_bridge_grandpa::Config<GI>,
GI: 'static,
R::BridgedChain: bp_runtime::Chain,
{
@@ -252,7 +252,7 @@ where
Default::default(),
);
let bridged_header_hash = bridged_header.hash();
pallet_bridge_grandpa::initialize_for_benchmarks::<R, GI>(bridged_header);
pezpallet_bridge_grandpa::initialize_for_benchmarks::<R, GI>(bridged_header);
(bridged_block_number, bridged_header_hash)
}
@@ -261,7 +261,7 @@ pub(crate) fn insert_header_to_teyrchains_pallet<R, PI, PC>(
state_root: bp_runtime::HashOf<PC>,
) -> (bp_runtime::BlockNumberOf<PC>, bp_runtime::HashOf<PC>)
where
R: pallet_bridge_teyrchains::Config<PI>,
R: pezpallet_bridge_teyrchains::Config<PI>,
PI: 'static,
PC: Chain<Hash = ParaHash> + Teyrchain,
{
@@ -274,7 +274,7 @@ where
Default::default(),
);
let bridged_header_hash = bridged_header.hash();
pallet_bridge_teyrchains::initialize_for_benchmarks::<R, PI, PC>(bridged_header);
pezpallet_bridge_teyrchains::initialize_for_benchmarks::<R, PI, PC>(bridged_header);
(bridged_block_number, bridged_header_hash)
}
+42 -42
View File
@@ -27,12 +27,12 @@ use bp_relayers::{PayRewardFromAccount, RewardsAccountParams};
use bp_runtime::{messages::MessageDispatchResult, Chain, ChainId, Teyrchain};
use bp_teyrchains::SingleParaStoredHeaderDataBuilder;
use codec::Encode;
use frame_support::{
use pezframe_support::{
derive_impl, parameter_types,
weights::{ConstantMultiplier, IdentityFee, RuntimeDbWeight, Weight},
};
use pallet_transaction_payment::Multiplier;
use sp_runtime::{
use pezpallet_transaction_payment::Multiplier;
use pezsp_runtime::{
testing::H256,
traits::{BlakeTwo256, ConstU32, ConstU64, ConstU8},
FixedPointNumber, Perquintill, StateVersion,
@@ -51,9 +51,9 @@ pub type ThisChainHasher = BlakeTwo256;
/// Runtime call at `ThisChain`.
pub type ThisChainRuntimeCall = RuntimeCall;
/// Header of `ThisChain`.
pub type ThisChainHeader = sp_runtime::generic::Header<ThisChainBlockNumber, ThisChainHasher>;
pub type ThisChainHeader = pezsp_runtime::generic::Header<ThisChainBlockNumber, ThisChainHasher>;
/// Block of `ThisChain`.
pub type ThisChainBlock = frame_system::mocking::MockBlockU32<TestRuntime>;
pub type ThisChainBlock = pezframe_system::mocking::MockBlockU32<TestRuntime>;
/// Account identifier at the `BridgedChain`.
pub type BridgedChainAccountId = u128;
@@ -67,7 +67,7 @@ pub type BridgedChainHash = H256;
pub type BridgedChainHasher = BlakeTwo256;
/// Header of the `BridgedChain`.
pub type BridgedChainHeader =
sp_runtime::generic::Header<BridgedChainBlockNumber, BridgedChainHasher>;
pezsp_runtime::generic::Header<BridgedChainBlockNumber, BridgedChainHasher>;
/// Rewards payment procedure.
pub type TestPaymentProcedure =
@@ -75,7 +75,7 @@ pub type TestPaymentProcedure =
/// Stake that we are using in tests.
pub type TestStake = ConstU64<5_000>;
/// Stake and slash mechanism to use in tests.
pub type TestStakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed<
pub type TestStakeAndSlash = pezpallet_bridge_relayers::StakeAndSlashNamed<
ThisChainAccountId,
ThisChainBlockNumber,
Balances,
@@ -98,17 +98,17 @@ pub const TEST_BRIDGED_CHAIN_ID: ChainId = *b"brdg";
/// Maximal extrinsic size at the `BridgedChain`.
pub const BRIDGED_CHAIN_MAX_EXTRINSIC_SIZE: u32 = 1024;
frame_support::construct_runtime! {
pezframe_support::construct_runtime! {
pub enum TestRuntime
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Utility: pallet_utility,
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event<T>},
BridgeGrandpa: pallet_bridge_grandpa::{Pallet, Call, Storage, Event<T>},
BridgeTeyrchains: pallet_bridge_teyrchains::{Pallet, Call, Storage, Event<T>},
BridgeMessages: pallet_bridge_messages::{Pallet, Call, Storage, Event<T>, Config<T>},
System: pezframe_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Utility: pezpallet_utility,
Balances: pezpallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
TransactionPayment: pezpallet_transaction_payment::{Pallet, Storage, Event<T>},
BridgeRelayers: pezpallet_bridge_relayers::{Pallet, Call, Storage, Event<T>},
BridgeGrandpa: pezpallet_bridge_grandpa::{Pallet, Call, Storage, Event<T>},
BridgeTeyrchains: pezpallet_bridge_teyrchains::{Pallet, Call, Storage, Event<T>},
BridgeMessages: pezpallet_bridge_messages::{Pallet, Call, Storage, Event<T>, Config<T>},
}
}
@@ -126,39 +126,39 @@ parameter_types! {
pub const TransactionByteFee: ThisChainBalance = 1;
pub AdjustmentVariable: Multiplier = Multiplier::saturating_from_rational(3, 100_000);
pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000u128);
pub MaximumMultiplier: Multiplier = sp_runtime::traits::Bounded::max_value();
pub MaximumMultiplier: Multiplier = pezsp_runtime::traits::Bounded::max_value();
pub const ReserveId: [u8; 8] = *b"brdgrlrs";
}
#[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 Hash = ThisChainHash;
type Hashing = ThisChainHasher;
type AccountId = ThisChainAccountId;
type Block = ThisChainBlock;
type AccountData = pallet_balances::AccountData<ThisChainBalance>;
type AccountData = pezpallet_balances::AccountData<ThisChainBalance>;
}
impl pallet_utility::Config for TestRuntime {
impl pezpallet_utility::Config for TestRuntime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type PalletsOrigin = OriginCaller;
type WeightInfo = ();
}
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
impl pallet_balances::Config for TestRuntime {
#[derive_impl(pezpallet_balances::config_preludes::TestDefaultConfig)]
impl pezpallet_balances::Config for TestRuntime {
type ReserveIdentifier = [u8; 8];
type AccountStore = System;
}
#[derive_impl(pallet_transaction_payment::config_preludes::TestDefaultConfig)]
impl pallet_transaction_payment::Config for TestRuntime {
type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter<Balances, ()>;
#[derive_impl(pezpallet_transaction_payment::config_preludes::TestDefaultConfig)]
impl pezpallet_transaction_payment::Config for TestRuntime {
type OnChargeTransaction = pezpallet_transaction_payment::FungibleAdapter<Balances, ()>;
type OperationalFeeMultiplier = ConstU8<5>;
type WeightToFee = IdentityFee<ThisChainBalance>;
type LengthToFee = ConstantMultiplier<ThisChainBalance, TransactionByteFee>;
type FeeMultiplierUpdate = pallet_transaction_payment::TargetedFeeAdjustment<
type FeeMultiplierUpdate = pezpallet_transaction_payment::TargetedFeeAdjustment<
TestRuntime,
TargetBlockFullness,
AdjustmentVariable,
@@ -167,16 +167,16 @@ impl pallet_transaction_payment::Config for TestRuntime {
>;
}
impl pallet_bridge_grandpa::Config for TestRuntime {
impl pezpallet_bridge_grandpa::Config for TestRuntime {
type RuntimeEvent = RuntimeEvent;
type BridgedChain = BridgedUnderlyingChain;
type MaxFreeHeadersPerBlock = ConstU32<4>;
type FreeHeadersInterval = ConstU32<1_024>;
type HeadersToKeep = ConstU32<8>;
type WeightInfo = pallet_bridge_grandpa::weights::BridgeWeight<TestRuntime>;
type WeightInfo = pezpallet_bridge_grandpa::weights::BridgeWeight<TestRuntime>;
}
impl pallet_bridge_teyrchains::Config for TestRuntime {
impl pezpallet_bridge_teyrchains::Config for TestRuntime {
type RuntimeEvent = RuntimeEvent;
type BridgesGrandpaPalletInstance = ();
type ParasPalletName = BridgedParasPalletName;
@@ -184,20 +184,20 @@ impl pallet_bridge_teyrchains::Config for TestRuntime {
SingleParaStoredHeaderDataBuilder<BridgedUnderlyingTeyrchain>;
type HeadsToKeep = ConstU32<8>;
type MaxParaHeadDataSize = ConstU32<1024>;
type WeightInfo = pallet_bridge_teyrchains::weights::BridgeWeight<TestRuntime>;
type WeightInfo = pezpallet_bridge_teyrchains::weights::BridgeWeight<TestRuntime>;
type OnNewHead = ();
}
impl pallet_bridge_messages::Config for TestRuntime {
impl pezpallet_bridge_messages::Config for TestRuntime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_bridge_messages::weights::BridgeWeight<TestRuntime>;
type WeightInfo = pezpallet_bridge_messages::weights::BridgeWeight<TestRuntime>;
type OutboundPayload = Vec<u8>;
type InboundPayload = Vec<u8>;
type LaneId = TestLaneIdType;
type DeliveryPayments = ();
type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
type DeliveryConfirmationPayments = pezpallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
TestRuntime,
(),
(),
@@ -212,10 +212,10 @@ impl pallet_bridge_messages::Config for TestRuntime {
type BridgedHeaderChain = BridgeGrandpa;
}
impl pallet_bridge_relayers::Config for TestRuntime {
impl pezpallet_bridge_relayers::Config for TestRuntime {
type RuntimeEvent = RuntimeEvent;
type RewardBalance = RewardBalance;
type Reward = RewardsAccountParams<pallet_bridge_messages::LaneIdOf<TestRuntime, ()>>;
type Reward = RewardsAccountParams<pezpallet_bridge_messages::LaneIdOf<TestRuntime, ()>>;
type PaymentProcedure = TestPaymentProcedure;
type StakeAndSlash = TestStakeAndSlash;
type Balance = ThisChainBalance;
@@ -227,7 +227,7 @@ pub struct DummyMessageDispatch;
impl DummyMessageDispatch {
pub fn deactivate(lane: TestLaneIdType) {
frame_support::storage::unhashed::put(&(b"inactive", lane).encode()[..], &false);
pezframe_support::storage::unhashed::put(&(b"inactive", lane).encode()[..], &false);
}
}
@@ -237,7 +237,7 @@ impl MessageDispatch for DummyMessageDispatch {
type LaneId = TestLaneIdType;
fn is_active(lane: Self::LaneId) -> bool {
frame_support::storage::unhashed::take::<bool>(&(b"inactive", lane).encode()[..]) !=
pezframe_support::storage::unhashed::take::<bool>(&(b"inactive", lane).encode()[..]) !=
Some(false)
}
@@ -267,7 +267,7 @@ impl Chain for ThisUnderlyingChain {
type AccountId = ThisChainAccountId;
type Balance = ThisChainBalance;
type Nonce = u32;
type Signature = sp_runtime::MultiSignature;
type Signature = pezsp_runtime::MultiSignature;
const STATE_VERSION: StateVersion = StateVersion::V1;
@@ -302,7 +302,7 @@ impl Chain for BridgedUnderlyingChain {
type AccountId = BridgedChainAccountId;
type Balance = BridgedChainBalance;
type Nonce = u32;
type Signature = sp_runtime::MultiSignature;
type Signature = pezsp_runtime::MultiSignature;
const STATE_VERSION: StateVersion = StateVersion::V1;
@@ -338,7 +338,7 @@ impl Chain for BridgedUnderlyingTeyrchain {
type AccountId = BridgedChainAccountId;
type Balance = BridgedChainBalance;
type Nonce = u32;
type Signature = sp_runtime::MultiSignature;
type Signature = pezsp_runtime::MultiSignature;
const STATE_VERSION: StateVersion = StateVersion::V1;
@@ -357,5 +357,5 @@ impl Teyrchain for BridgedUnderlyingTeyrchain {
/// Run test within test externalities.
pub fn run_test(test: impl FnOnce()) {
sp_io::TestExternalities::new(Default::default()).execute_with(test)
pezsp_io::TestExternalities::new(Default::default()).execute_with(test)
}
@@ -26,9 +26,9 @@ use bp_teyrchains::{
teyrchain_head_storage_key_at_source, RelayBlockHash, RelayBlockHasher, RelayBlockNumber,
};
use codec::Encode;
use frame_support::traits::Get;
use sp_std::prelude::*;
use sp_trie::{trie_types::TrieDBMutBuilderV1, LayoutV1, MemoryDB, TrieMut};
use pezframe_support::traits::Get;
use pezsp_std::prelude::*;
use pezsp_trie::{trie_types::TrieDBMutBuilderV1, LayoutV1, MemoryDB, TrieMut};
/// Prepare proof of messages for the `receive_messages_proof` call.
///
@@ -40,10 +40,10 @@ pub fn prepare_teyrchain_heads_proof<R, PI>(
proof_params: UnverifiedStorageProofParams,
) -> (RelayBlockNumber, RelayBlockHash, ParaHeadsProof, Vec<(ParaId, ParaHash)>)
where
R: pallet_bridge_teyrchains::Config<PI>
+ pallet_bridge_grandpa::Config<R::BridgesGrandpaPalletInstance>,
R: pezpallet_bridge_teyrchains::Config<PI>
+ pezpallet_bridge_grandpa::Config<R::BridgesGrandpaPalletInstance>,
PI: 'static,
<R as pallet_bridge_grandpa::Config<R::BridgesGrandpaPalletInstance>>::BridgedChain:
<R as pezpallet_bridge_grandpa::Config<R::BridgesGrandpaPalletInstance>>::BridgedChain:
Chain<BlockNumber = RelayBlockNumber, Hash = RelayBlockHash>,
{
let teyrchain_head = ParaHead(vec![0u8; teyrchain_head_size as usize]);