chore: regenerate umbrella crate, fix feature propagation

This commit is contained in:
2025-12-16 11:28:32 +03:00
parent dd6d48f528
commit 620b0e3aa0
1358 changed files with 9464 additions and 7656 deletions
@@ -21,10 +21,10 @@
pub use bp_bridge_hub_pezcumulus::*;
use bp_messages::*;
use codec::{Decode, Encode};
use pezbp_runtime::{
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Teyrchain,
};
use codec::{Decode, Encode};
use pezframe_support::{
dispatch::DispatchClass,
pezsp_runtime::{MultiAddress, MultiSigner, RuntimeDebug, StateVersion},
@@ -35,12 +35,12 @@ use pezframe_support::{
traits::{Equals, PalletInfoAccess},
};
use pezframe_system::{EnsureNever, EnsureRoot};
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use pezpallet_bridge_messages::LaneIdOf;
use pezpallet_bridge_relayers::extension::{
BridgeRelayersTransactionExtension, WithMessagesExtensionConfig,
};
use pezpallet_xcm_bridge_hub::XcmAsPlainPayload;
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use testnet_teyrchains_constants::pezkuwichain::currency::UNITS as TYR;
use xcm::{
latest::prelude::*,
@@ -115,7 +115,9 @@ pub type WithPezkuwichainBulletinMessagesInstance = pezpallet_bridge_messages::I
impl pezpallet_bridge_messages::Config<WithPezkuwichainBulletinMessagesInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo =
weights::pezpallet_bridge_messages_pezkuwichain_to_pezkuwichain_bulletin::WeightInfo<Runtime>;
weights::pezpallet_bridge_messages_pezkuwichain_to_pezkuwichain_bulletin::WeightInfo<
Runtime,
>;
type ThisChain = bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain;
type BridgedChain = bp_pezkuwi_bulletin::PezkuwiBulletin;
@@ -38,8 +38,8 @@ use crate::xcm_config::RelayNetwork;
#[cfg(feature = "runtime-benchmarks")]
use benchmark_helpers::DoNothingRouter;
use bp_asset_hub_pezkuwichain::CreateForeignAssetDeposit;
use pezframe_support::{parameter_types, weights::ConstantMultiplier};
use hex_literal::hex;
use pezframe_support::{parameter_types, weights::ConstantMultiplier};
use pezpallet_xcm::EnsureXcm;
use pezsp_runtime::{
traits::{ConstU32, ConstU8, Keccak256},
@@ -186,7 +186,8 @@ parameter_types! {
};
}
pub const SLOTS_PER_EPOCH: u32 = pezsnowbridge_pezpallet_ethereum_client::config::SLOTS_PER_EPOCH as u32;
pub const SLOTS_PER_EPOCH: u32 =
pezsnowbridge_pezpallet_ethereum_client::config::SLOTS_PER_EPOCH as u32;
impl pezsnowbridge_pezpallet_ethereum_client::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
@@ -35,11 +35,11 @@ use pezpallet_xcm_bridge_hub::{BridgeId, XcmAsPlainPayload};
use pezframe_support::{parameter_types, traits::PalletInfoAccess};
use pezframe_system::{EnsureNever, EnsureRoot};
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use pezpallet_bridge_messages::LaneIdOf;
use pezpallet_bridge_relayers::extension::{
BridgeRelayersTransactionExtension, WithMessagesExtensionConfig,
};
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use testnet_teyrchains_constants::pezkuwichain::currency::UNITS as TYR;
use teyrchains_common::xcm_config::{AllSiblingSystemTeyrchains, RelayOrOtherSystemTeyrchains};
use xcm::{
@@ -105,7 +105,8 @@ pezbp_runtime::generate_static_str_provider!(OnBridgeHubPezkuwichainRefundBridge
pub type WithBridgeHubZagrosMessagesInstance = pezpallet_bridge_messages::Instance3;
impl pezpallet_bridge_messages::Config<WithBridgeHubZagrosMessagesInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pezpallet_bridge_messages_pezkuwichain_to_zagros::WeightInfo<Runtime>;
type WeightInfo =
weights::pezpallet_bridge_messages_pezkuwichain_to_zagros::WeightInfo<Runtime>;
type ThisChain = bp_bridge_hub_pezkuwichain::BridgeHubPezkuwichain;
type BridgedChain = bp_bridge_hub_zagros::BridgeHubZagros;
@@ -120,12 +121,13 @@ impl pezpallet_bridge_messages::Config<WithBridgeHubZagrosMessagesInstance> for
type LaneId = LegacyLaneId;
type DeliveryPayments = ();
type DeliveryConfirmationPayments = pezpallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
Runtime,
WithBridgeHubZagrosMessagesInstance,
RelayersForLegacyLaneIdsMessagesInstance,
DeliveryRewardInBalance,
>;
type DeliveryConfirmationPayments =
pezpallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
Runtime,
WithBridgeHubZagrosMessagesInstance,
RelayersForLegacyLaneIdsMessagesInstance,
DeliveryRewardInBalance,
>;
type MessageDispatch = XcmOverBridgeHubZagros;
type OnMessagesDelivered = XcmOverBridgeHubZagros;
@@ -363,8 +365,8 @@ pub mod migration {
mod v1_wrong {
use bp_messages::{LaneState, MessageNonce, UnrewardedRelayer};
use pezbp_runtime::AccountIdOf;
use codec::{Decode, Encode};
use pezbp_runtime::AccountIdOf;
use pezpallet_bridge_messages::BridgedChainOf;
use pezsp_std::collections::vec_deque::VecDeque;
@@ -396,8 +398,8 @@ pub mod migration {
/// for Pezkuwichain/Zagros).
pub struct FixMessagesV1Migration<T, I>(pezsp_std::marker::PhantomData<(T, I)>);
impl<T: pezpallet_bridge_messages::Config<I>, I: 'static> pezframe_support::traits::OnRuntimeUpgrade
for FixMessagesV1Migration<T, I>
impl<T: pezpallet_bridge_messages::Config<I>, I: 'static>
pezframe_support::traits::OnRuntimeUpgrade for FixMessagesV1Migration<T, I>
{
fn on_runtime_upgrade() -> Weight {
use pezsp_core::Get;
@@ -75,11 +75,11 @@ use testnet_teyrchains_constants::pezkuwichain::{
consensus::*, currency::*, fee::WeightToFee, time::*,
};
use pezbp_runtime::HeaderId;
use bridge_hub_common::{
message_queue::{NarrowOriginToSibling, ParaIdToSibling},
AggregateMessageOrigin,
};
use pezbp_runtime::HeaderId;
pub use pezsp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use pezsp_runtime::{MultiAddress, Perbill, Permill};
@@ -501,7 +501,8 @@ impl pezpallet_session::Config for Runtime {
// we don't have stash and controller, thus we don't need the convert as well.
type ValidatorIdOf = pezpallet_collator_selection::IdentityCollator;
type ShouldEndSession = pezpallet_session::PeriodicSessions<ConstU32<PERIOD>, ConstU32<OFFSET>>;
type NextSessionRotation = pezpallet_session::PeriodicSessions<ConstU32<PERIOD>, ConstU32<OFFSET>>;
type NextSessionRotation =
pezpallet_session::PeriodicSessions<ConstU32<PERIOD>, ConstU32<OFFSET>>;
type SessionManager = CollatorSelection;
// Essentially just Aura, but let's be pedantic.
type SessionHandler = <SessionKeys as pezsp_runtime::traits::OpaqueKeys>::KeyTypeIdProviders;
@@ -23,10 +23,11 @@ use ::pezpallet_bridge_relayers::WeightInfo as _;
use ::pezpallet_bridge_teyrchains::WeightInfoExt as TeyrchainsWeightInfoExt;
pub mod block_weights;
pub mod extrinsic_weights;
pub mod paritydb_weights;
pub mod pezcumulus_pezpallet_teyrchain_system;
pub mod pezcumulus_pezpallet_weight_reclaim;
pub mod pezcumulus_pezpallet_xcmp_queue;
pub mod extrinsic_weights;
pub mod pezframe_system;
pub mod pezframe_system_extensions;
pub mod pezpallet_balances;
@@ -44,12 +45,11 @@ pub mod pezpallet_timestamp;
pub mod pezpallet_transaction_payment;
pub mod pezpallet_utility;
pub mod pezpallet_xcm;
pub mod paritydb_weights;
pub mod rocksdb_weights;
pub mod pezsnowbridge_pezpallet_ethereum_client;
pub mod pezsnowbridge_pezpallet_inbound_queue;
pub mod pezsnowbridge_pezpallet_outbound_queue;
pub mod pezsnowbridge_pezpallet_system;
pub mod rocksdb_weights;
pub mod xcm;
pub use block_weights::constants::BlockExecutionWeight;
@@ -30,10 +30,10 @@ use pezframe_support::{
},
};
use pezframe_system::EnsureRoot;
use pezpallet_collator_selection::StakingPotAccountId;
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
use pezkuwi_runtime_common::xcm_sender::ExponentialPrice;
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use pezpallet_collator_selection::StakingPotAccountId;
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
use pezsp_runtime::traits::AccountIdConversion;
use testnet_teyrchains_constants::pezkuwichain::snowbridge::EthereumNetwork;
use teyrchains_common::{
@@ -17,13 +17,13 @@
#![cfg(test)]
use bp_pezkuwi_core::Signature;
use codec::{Decode, Encode};
use pezbridge_hub_pezkuwichain_runtime::{
bridge_to_zagros_config::OnBridgeHubPezkuwichainRefundBridgeHubZagrosMessages,
xcm_config::XcmConfig, AllPalletsWithoutSystem, BridgeRejectObsoleteHeadersAndMessages,
Executive, MessageQueueServiceWeight, Runtime, RuntimeCall, RuntimeEvent, SessionKeys,
TxExtension, UncheckedExtrinsic,
};
use codec::{Decode, Encode};
use pezcumulus_primitives_core::XcmError::FailedToTransactAsset;
use pezframe_support::parameter_types;
use pezsnowbridge_pezpallet_ethereum_client::WeightInfo;
@@ -97,7 +97,8 @@ pub fn transfer_token_to_ethereum_insufficient_fund() {
fn max_message_queue_service_weight_is_more_than_beacon_extrinsic_weights() {
let max_message_queue_weight = MessageQueueServiceWeight::get();
let force_checkpoint =
<Runtime as pezsnowbridge_pezpallet_ethereum_client::Config>::WeightInfo::force_checkpoint();
<Runtime as pezsnowbridge_pezpallet_ethereum_client::Config>::WeightInfo::force_checkpoint(
);
let submit_checkpoint =
<Runtime as pezsnowbridge_pezpallet_ethereum_client::Config>::WeightInfo::submit();
max_message_queue_weight.all_gt(force_checkpoint);
@@ -123,9 +124,9 @@ fn ethereum_to_pezkuwi_message_extrinsics_work() {
}
/// Tests that the digest items are as expected when a Ethereum Outbound message is received.
/// If the MessageQueue pezpallet is configured before (i.e. the MessageQueue pezpallet is listed before
/// the EthereumOutboundQueue in the construct_runtime macro) the EthereumOutboundQueue, this test
/// will fail.
/// If the MessageQueue pezpallet is configured before (i.e. the MessageQueue pezpallet is listed
/// before the EthereumOutboundQueue in the construct_runtime macro) the EthereumOutboundQueue, this
/// test will fail.
#[test]
pub fn ethereum_outbound_queue_processes_messages_before_message_queue_works() {
pezsnowbridge_runtime_test_common::ethereum_outbound_queue_processes_messages_before_message_queue_works::<
@@ -17,6 +17,8 @@
#![cfg(test)]
use bp_pezkuwi_core::Signature;
use codec::{Decode, Encode};
use hex_literal::hex;
use pezbridge_hub_pezkuwichain_runtime::{
bridge_common_config, bridge_to_bulletin_config, bridge_to_zagros_config,
xcm_config::{RelayNetwork, TokenLocation, XcmConfig},
@@ -25,9 +27,7 @@ use pezbridge_hub_pezkuwichain_runtime::{
TeyrchainSystem, TransactionPayment, TxExtension, UncheckedExtrinsic,
};
use pezbridge_hub_test_utils::{GovernanceOrigin, SlotDurations};
use codec::{Decode, Encode};
use pezframe_support::{dispatch::GetDispatchInfo, parameter_types, traits::ConstU8};
use hex_literal::hex;
use pezsnowbridge_core::ChannelId;
use pezsp_consensus_aura::SlotDuration;
use pezsp_core::{crypto::Ss58Codec, H160};
@@ -131,14 +131,14 @@ mod bridge_hub_zagros_tests {
BridgeGrandpaZagrosInstance, BridgeTeyrchainZagrosInstance, DeliveryRewardInBalance,
RelayersForLegacyLaneIdsMessagesInstance,
};
use pezbridge_hub_pezkuwichain_runtime::{
bridge_to_ethereum_config::EthereumGatewayAddress, xcm_config::LocationToAccountId,
};
use pezbridge_hub_test_utils::test_cases::from_teyrchain;
use bridge_to_zagros_config::{
BridgeHubZagrosLocation, WithBridgeHubZagrosMessagesInstance,
XcmOverBridgeHubZagrosInstance, ZagrosGlobalConsensusNetwork,
};
use pezbridge_hub_pezkuwichain_runtime::{
bridge_to_ethereum_config::EthereumGatewayAddress, xcm_config::LocationToAccountId,
};
use pezbridge_hub_test_utils::test_cases::from_teyrchain;
use pezcumulus_primitives_core::UpwardMessageSender;
// Random para id of sibling chain used in tests.
@@ -240,14 +240,20 @@ mod bridge_hub_zagros_tests {
bp_bridge_hub_pezkuwichain::BRIDGE_HUB_PEZKUWICHAIN_TEYRCHAIN_ID,
Governance::get(),
vec![
(pezsnowbridge_pezpallet_outbound_queue::Nonce::<Runtime>::hashed_key_for::<ChannelId>(
channel_id_one,
)
.to_vec(), 0u64.encode()),
(pezsnowbridge_pezpallet_inbound_queue::Nonce::<Runtime>::hashed_key_for::<ChannelId>(
channel_id_one,
)
.to_vec(), 0u64.encode()),
(
pezsnowbridge_pezpallet_outbound_queue::Nonce::<Runtime>::hashed_key_for::<
ChannelId,
>(channel_id_one)
.to_vec(),
0u64.encode(),
),
(
pezsnowbridge_pezpallet_inbound_queue::Nonce::<Runtime>::hashed_key_for::<
ChannelId,
>(channel_id_one)
.to_vec(),
0u64.encode(),
),
],
|| {
// Outbound
@@ -521,16 +527,16 @@ mod bridge_hub_bulletin_tests {
use super::*;
use bp_messages::LegacyLaneId;
use bridge_common_config::BridgeGrandpaPezkuwichainBulletinInstance;
use pezbridge_hub_pezkuwichain_runtime::{
bridge_common_config::RelayersForLegacyLaneIdsMessagesInstance,
xcm_config::LocationToAccountId,
};
use pezbridge_hub_test_utils::test_cases::from_grandpa_chain;
use bridge_to_bulletin_config::{
PezkuwichainBulletinGlobalConsensusNetwork,
PezkuwichainBulletinGlobalConsensusNetworkLocation,
WithPezkuwichainBulletinMessagesInstance, XcmOverPezkuwiBulletinInstance,
};
use pezbridge_hub_pezkuwichain_runtime::{
bridge_common_config::RelayersForLegacyLaneIdsMessagesInstance,
xcm_config::LocationToAccountId,
};
use pezbridge_hub_test_utils::test_cases::from_grandpa_chain;
use pezcumulus_primitives_core::UpwardMessageSender;
// Random para id of sibling chain used in tests.
@@ -20,10 +20,10 @@
pub use bp_bridge_hub_pezcumulus::*;
use bp_messages::*;
use codec::{Decode, Encode};
use pezbp_runtime::{
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain, ChainId, Teyrchain,
};
use codec::{Decode, Encode};
use pezframe_support::dispatch::DispatchClass;
use pezsp_runtime::{RuntimeDebug, StateVersion};
@@ -24,9 +24,9 @@ use crate::{
};
use bp_asset_hub_zagros::CreateForeignAssetDeposit;
use bridge_hub_common::AggregateMessageOrigin;
use hex_literal::hex;
use pezframe_support::{parameter_types, traits::Contains, weights::ConstantMultiplier};
use pezframe_system::EnsureRootWithSuccess;
use hex_literal::hex;
use pezpallet_xcm::EnsureXcm;
use pezsnowbridge_beacon_primitives::{Fork, ForkVersions};
use pezsnowbridge_core::{gwei, meth, AllowSiblingsOnly, PricingParameters, Rewards};
@@ -53,7 +53,8 @@ use xcm::prelude::{GlobalConsensus, InteriorLocation, Location, PalletInstance,
use xcm_executor::XcmExecutor;
use zagros_runtime_constants::system_teyrchain::ASSET_HUB_ID;
pub const SLOTS_PER_EPOCH: u32 = pezsnowbridge_pezpallet_ethereum_client::config::SLOTS_PER_EPOCH as u32;
pub const SLOTS_PER_EPOCH: u32 =
pezsnowbridge_pezpallet_ethereum_client::config::SLOTS_PER_EPOCH as u32;
/// Exports message to the Ethereum Gateway contract.
pub type SnowbridgeExporter = EthereumBlobExporter<
@@ -194,7 +195,8 @@ impl pezsnowbridge_pezpallet_outbound_queue_v2::Config for Runtime {
type WeightToFee = WeightToFee;
type Verifier = EthereumBeaconClient;
type GatewayAddress = EthereumGatewayAddress;
type WeightInfo = crate::weights::pezsnowbridge_pezpallet_outbound_queue_v2::WeightInfo<Runtime>;
type WeightInfo =
crate::weights::pezsnowbridge_pezpallet_outbound_queue_v2::WeightInfo<Runtime>;
type EthereumNetwork = EthereumNetwork;
type RewardKind = BridgeReward;
type DefaultRewardKind = SnowbridgeReward;
@@ -325,8 +327,8 @@ pub mod benchmark_helpers {
RuntimeOrigin, System,
};
use codec::Encode;
use pezframe_support::assert_ok;
use hex_literal::hex;
use pezframe_support::assert_ok;
use pezsnowbridge_beacon_primitives::BeaconHeader;
use pezsnowbridge_inbound_queue_primitives::EventFixture;
use pezsnowbridge_pezpallet_inbound_queue::BenchmarkHelper;
@@ -357,7 +359,9 @@ pub mod benchmark_helpers {
}
}
impl<T: pezsnowbridge_pezpallet_inbound_queue_v2::Config> InboundQueueBenchmarkHelperV2<T> for Runtime {
impl<T: pezsnowbridge_pezpallet_inbound_queue_v2::Config> InboundQueueBenchmarkHelperV2<T>
for Runtime
{
fn initialize_storage() -> EventFixture {
let message = make_register_token_message_v2();
@@ -370,7 +374,9 @@ pub mod benchmark_helpers {
}
}
impl<T: pezsnowbridge_pezpallet_outbound_queue_v2::Config> OutboundQueueBenchmarkHelperV2<T> for Runtime {
impl<T: pezsnowbridge_pezpallet_outbound_queue_v2::Config> OutboundQueueBenchmarkHelperV2<T>
for Runtime
{
fn initialize_storage(beacon_header: BeaconHeader, block_roots_root: H256) {
EthereumBeaconClient::store_finalized_header(beacon_header, block_roots_root).unwrap();
}
@@ -440,7 +446,9 @@ pub(crate) mod migrations {
>;
/// One shot migration for NetworkId::Zagros to NetworkId::ByGenesis(ZAGROS_GENESIS_HASH)
pub struct MigrationForXcmV5<T: pezsnowbridge_pezpallet_system::Config>(core::marker::PhantomData<T>);
pub struct MigrationForXcmV5<T: pezsnowbridge_pezpallet_system::Config>(
core::marker::PhantomData<T>,
);
impl<T: pezsnowbridge_pezpallet_system::Config> pezframe_support::traits::OnRuntimeUpgrade
for MigrationForXcmV5<T>
{
@@ -451,7 +459,9 @@ pub(crate) mod migrations {
weight.saturating_accrue(T::DbWeight::get().reads_writes(1, 1));
Some(xcm::v5::Location::try_from(pre).expect("valid location"))
};
pezsnowbridge_pezpallet_system::ForeignToNativeId::<T>::translate_values(translate_zagros);
pezsnowbridge_pezpallet_system::ForeignToNativeId::<T>::translate_values(
translate_zagros,
);
weight
}
@@ -34,11 +34,11 @@ use pezframe_support::{
traits::{ConstU32, PalletInfoAccess},
};
use pezframe_system::{EnsureNever, EnsureRoot};
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use pezpallet_bridge_messages::LaneIdOf;
use pezpallet_bridge_relayers::extension::{
BridgeRelayersTransactionExtension, WithMessagesExtensionConfig,
};
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use testnet_teyrchains_constants::zagros::currency::UNITS as ZGR;
use teyrchains_common::xcm_config::{AllSiblingSystemTeyrchains, RelayOrOtherSystemTeyrchains};
use xcm::{
@@ -151,12 +151,13 @@ impl pezpallet_bridge_messages::Config<WithBridgeHubPezkuwichainMessagesInstance
type LaneId = LegacyLaneId;
type DeliveryPayments = ();
type DeliveryConfirmationPayments = pezpallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
Runtime,
WithBridgeHubPezkuwichainMessagesInstance,
BridgeRelayersInstance,
DeliveryRewardInBalance,
>;
type DeliveryConfirmationPayments =
pezpallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
Runtime,
WithBridgeHubPezkuwichainMessagesInstance,
BridgeRelayersInstance,
DeliveryRewardInBalance,
>;
type MessageDispatch = XcmOverBridgeHubPezkuwichain;
type OnMessagesDelivered = XcmOverBridgeHubPezkuwichain;
@@ -381,8 +382,8 @@ pub mod migration {
mod v1_wrong {
use bp_messages::{LaneState, MessageNonce, UnrewardedRelayer};
use pezbp_runtime::AccountIdOf;
use codec::{Decode, Encode};
use pezbp_runtime::AccountIdOf;
use pezpallet_bridge_messages::BridgedChainOf;
use pezsp_std::collections::vec_deque::VecDeque;
@@ -414,8 +415,8 @@ pub mod migration {
/// for Pezkuwichain/Zagros).
pub struct FixMessagesV1Migration<T, I>(pezsp_std::marker::PhantomData<(T, I)>);
impl<T: pezpallet_bridge_messages::Config<I>, I: 'static> pezframe_support::traits::OnRuntimeUpgrade
for FixMessagesV1Migration<T, I>
impl<T: pezpallet_bridge_messages::Config<I>, I: 'static>
pezframe_support::traits::OnRuntimeUpgrade for FixMessagesV1Migration<T, I>
{
fn on_runtime_upgrade() -> Weight {
use pezsp_core::Get;
@@ -485,7 +485,8 @@ impl pezpallet_session::Config for Runtime {
// we don't have stash and controller, thus we don't need the convert as well.
type ValidatorIdOf = pezpallet_collator_selection::IdentityCollator;
type ShouldEndSession = pezpallet_session::PeriodicSessions<ConstU32<PERIOD>, ConstU32<OFFSET>>;
type NextSessionRotation = pezpallet_session::PeriodicSessions<ConstU32<PERIOD>, ConstU32<OFFSET>>;
type NextSessionRotation =
pezpallet_session::PeriodicSessions<ConstU32<PERIOD>, ConstU32<OFFSET>>;
type SessionManager = CollatorSelection;
// Essentially just Aura, but let's be pedantic.
type SessionHandler = <SessionKeys as pezsp_runtime::traits::OpaqueKeys>::KeyTypeIdProviders;
@@ -23,10 +23,11 @@ use ::pezpallet_bridge_relayers::WeightInfo as _;
use ::pezpallet_bridge_teyrchains::WeightInfoExt as TeyrchainsWeightInfoExt;
pub mod block_weights;
pub mod extrinsic_weights;
pub mod paritydb_weights;
pub mod pezcumulus_pezpallet_teyrchain_system;
pub mod pezcumulus_pezpallet_weight_reclaim;
pub mod pezcumulus_pezpallet_xcmp_queue;
pub mod extrinsic_weights;
pub mod pezframe_system;
pub mod pezframe_system_extensions;
pub mod pezpallet_balances;
@@ -42,7 +43,6 @@ pub mod pezpallet_timestamp;
pub mod pezpallet_transaction_payment;
pub mod pezpallet_utility;
pub mod pezpallet_xcm;
pub mod paritydb_weights;
pub mod rocksdb_weights;
pub mod xcm;
@@ -29,10 +29,10 @@ use pezframe_support::{
},
};
use pezframe_system::EnsureRoot;
use pezpallet_collator_selection::StakingPotAccountId;
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
use pezkuwi_runtime_common::xcm_sender::ExponentialPrice;
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use pezpallet_collator_selection::StakingPotAccountId;
use pezpallet_xcm::{AuthorizedAliasers, XcmPassthrough};
use pezsp_runtime::traits::AccountIdConversion;
use testnet_teyrchains_constants::zagros::{
locations::AssetHubLocation, snowbridge::EthereumNetwork,
@@ -161,8 +161,8 @@ pub type Barrier = TrailingSetTopicAsId<
// If the message is one that immediately attempts to pay for execution, then
// allow it.
AllowTopLevelPaidExecutionFrom<Everything>,
// Parent, its pluralities (i.e. governance bodies) and relay treasury pezpallet
// get free execution.
// Parent, its pluralities (i.e. governance bodies) and relay treasury
// pezpallet get free execution.
AllowExplicitUnpaidExecutionFrom<(
ParentOrParentsPlurality,
Equals<RelayTreasuryLocation>,
@@ -19,12 +19,12 @@
use bp_asset_hub_zagros::ASSET_HUB_ZAGROS_TEYRCHAIN_ID;
use bp_bridge_hub_zagros::BRIDGE_HUB_ZAGROS_TEYRCHAIN_ID;
use bp_pezkuwi_core::Signature;
use codec::{Decode, Encode};
use pezbridge_hub_zagros_runtime::{
bridge_to_pezkuwichain_config, xcm_config::XcmConfig, AllPalletsWithoutSystem,
BridgeRejectObsoleteHeadersAndMessages, Executive, MessageQueueServiceWeight, Runtime,
RuntimeCall, RuntimeEvent, SessionKeys, TxExtension, UncheckedExtrinsic,
};
use codec::{Decode, Encode};
use pezcumulus_primitives_core::XcmError::FailedToTransactAsset;
use pezframe_support::parameter_types;
use pezsnowbridge_pezpallet_ethereum_client::WeightInfo;
@@ -98,7 +98,8 @@ pub fn transfer_token_to_ethereum_insufficient_fund() {
fn max_message_queue_service_weight_is_more_than_beacon_extrinsic_weights() {
let max_message_queue_weight = MessageQueueServiceWeight::get();
let force_checkpoint =
<Runtime as pezsnowbridge_pezpallet_ethereum_client::Config>::WeightInfo::force_checkpoint();
<Runtime as pezsnowbridge_pezpallet_ethereum_client::Config>::WeightInfo::force_checkpoint(
);
let submit_checkpoint =
<Runtime as pezsnowbridge_pezpallet_ethereum_client::Config>::WeightInfo::submit();
max_message_queue_weight.all_gt(force_checkpoint);
@@ -124,9 +125,9 @@ fn ethereum_to_pezkuwi_message_extrinsics_work() {
}
/// Tests that the digest items are as expected when a Ethereum Outbound message is received.
/// If the MessageQueue pezpallet is configured before (i.e. the MessageQueue pezpallet is listed before
/// the EthereumOutboundQueue in the construct_runtime macro) the EthereumOutboundQueue, this test
/// will fail.
/// If the MessageQueue pezpallet is configured before (i.e. the MessageQueue pezpallet is listed
/// before the EthereumOutboundQueue in the construct_runtime macro) the EthereumOutboundQueue, this
/// test will fail.
#[test]
pub fn ethereum_outbound_queue_processes_messages_before_message_queue_works() {
pezsnowbridge_runtime_test_common::ethereum_outbound_queue_processes_messages_before_message_queue_works::<
@@ -21,6 +21,13 @@ use bp_messages::LegacyLaneId;
use bp_pezkuwi_core::Signature;
use bp_relayers::{PayRewardFromAccount, RewardsAccountOwner, RewardsAccountParams};
use bridge_common_config::{BridgeRelayersInstance, BridgeReward, RequiredStakeForStakeAndSlash};
use bridge_to_pezkuwichain_config::{
BridgeGrandpaPezkuwichainInstance, BridgeHubPezkuwichainLocation,
BridgeTeyrchainPezkuwichainInstance, DeliveryRewardInBalance,
WithBridgeHubPezkuwichainMessagesInstance, XcmOverBridgeHubPezkuwichainInstance,
};
use codec::{Decode, Encode};
use hex_literal::hex;
use pezbridge_hub_test_utils::{
test_cases::{from_teyrchain, run_test},
GovernanceOrigin, SlotDurations,
@@ -36,12 +43,6 @@ use pezbridge_hub_zagros_runtime::{
RuntimeOrigin, SessionKeys, TeyrchainSystem, TransactionPayment, TxExtension,
UncheckedExtrinsic,
};
use bridge_to_pezkuwichain_config::{
BridgeGrandpaPezkuwichainInstance, BridgeHubPezkuwichainLocation,
BridgeTeyrchainPezkuwichainInstance, DeliveryRewardInBalance,
WithBridgeHubPezkuwichainMessagesInstance, XcmOverBridgeHubPezkuwichainInstance,
};
use codec::{Decode, Encode};
use pezcumulus_primitives_core::UpwardMessageSender;
use pezframe_support::{
assert_err, assert_ok,
@@ -52,7 +53,6 @@ use pezframe_support::{
ConstU8,
},
};
use hex_literal::hex;
use pezsp_consensus_aura::SlotDuration;
use pezsp_core::crypto::Ss58Codec;
use pezsp_keyring::Sr25519Keyring::{Alice, Bob};
@@ -21,9 +21,9 @@ use pezframe_support::{
weights::WeightMeter,
};
use pezpallet_message_queue::OnQueueChanged;
use scale_info::TypeInfo;
use pezsnowbridge_core::ChannelId;
use pezsp_core::H256;
use scale_info::TypeInfo;
use xcm::latest::prelude::{Junction, Location};
/// The aggregate origin of an inbound message.
@@ -129,7 +129,8 @@ pub fn relayed_incoming_message_works<RuntimeHelper>(
+ From<BridgeMessagesCall<RuntimeHelper::Runtime, RuntimeHelper::MPI>>,
BridgedChainOf<RuntimeHelper::Runtime, RuntimeHelper::MPI>: Chain<Hash = ParaHash> + Teyrchain,
<RuntimeHelper::Runtime as BridgeGrandpaConfig<RuntimeHelper::GPI>>::BridgedChain:
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
+ ChainWithGrandpa,
{
helpers::relayed_incoming_message_works::<
RuntimeHelper::Runtime,
@@ -264,7 +265,8 @@ pub fn free_relay_extrinsic_works<RuntimeHelper>(
+ From<BridgeMessagesCall<RuntimeHelper::Runtime, RuntimeHelper::MPI>>,
BridgedChainOf<RuntimeHelper::Runtime, RuntimeHelper::MPI>: Chain<Hash = ParaHash> + Teyrchain,
<RuntimeHelper::Runtime as BridgeGrandpaConfig<RuntimeHelper::GPI>>::BridgedChain:
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
+ ChainWithGrandpa,
{
// ensure that the runtime allows free header submissions
let free_headers_interval = <RuntimeHelper::Runtime as BridgeGrandpaConfig<
@@ -433,7 +435,8 @@ pub fn complex_relay_extrinsic_works<RuntimeHelper>(
+ From<pezpallet_utility::Call<RuntimeHelper::Runtime>>,
BridgedChainOf<RuntimeHelper::Runtime, RuntimeHelper::MPI>: Chain<Hash = ParaHash> + Teyrchain,
<RuntimeHelper::Runtime as BridgeGrandpaConfig<RuntimeHelper::GPI>>::BridgedChain:
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
+ ChainWithGrandpa,
{
helpers::relayed_incoming_message_works::<
RuntimeHelper::Runtime,
@@ -560,7 +563,8 @@ where
+ From<BridgeMessagesCall<RuntimeHelper::Runtime, RuntimeHelper::MPI>>,
BridgedChainOf<RuntimeHelper::Runtime, RuntimeHelper::MPI>: Chain<Hash = ParaHash> + Teyrchain,
<RuntimeHelper::Runtime as BridgeGrandpaConfig<RuntimeHelper::GPI>>::BridgedChain:
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
+ ChainWithGrandpa,
{
run_test::<RuntimeHelper::Runtime, _>(collator_session_key, 1000, vec![], || {
// generate bridged relay chain finality, teyrchain heads and message proofs,
@@ -630,7 +634,8 @@ where
+ From<BridgeMessagesCall<RuntimeHelper::Runtime, RuntimeHelper::MPI>>,
BridgedChainOf<RuntimeHelper::Runtime, RuntimeHelper::MPI>: Chain<Hash = ParaHash> + Teyrchain,
<RuntimeHelper::Runtime as BridgeGrandpaConfig<RuntimeHelper::GPI>>::BridgedChain:
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
+ ChainWithGrandpa,
{
run_test::<RuntimeHelper::Runtime, _>(collator_session_key, 1000, vec![], || {
// generate bridged relay chain finality, teyrchain heads and message proofs,
@@ -694,7 +699,8 @@ where
From<BridgeMessagesCall<RuntimeHelper::Runtime, RuntimeHelper::MPI>>,
BridgedChainOf<RuntimeHelper::Runtime, RuntimeHelper::MPI>: Chain<Hash = ParaHash> + Teyrchain,
<RuntimeHelper::Runtime as BridgeGrandpaConfig<RuntimeHelper::GPI>>::BridgedChain:
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
+ ChainWithGrandpa,
{
run_test::<RuntimeHelper::Runtime, _>(collator_session_key, 1000, vec![], || {
// generate bridged relay chain finality, teyrchain heads and message proofs,
@@ -755,7 +761,8 @@ where
From<BridgeMessagesCall<RuntimeHelper::Runtime, RuntimeHelper::MPI>>,
BridgedChainOf<RuntimeHelper::Runtime, RuntimeHelper::MPI>: Chain<Hash = ParaHash> + Teyrchain,
<RuntimeHelper::Runtime as BridgeGrandpaConfig<RuntimeHelper::GPI>>::BridgedChain:
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
+ ChainWithGrandpa,
{
run_test::<RuntimeHelper::Runtime, _>(collator_session_key, 1000, vec![], || {
// generate bridged relay chain finality, teyrchain heads and message proofs,
@@ -21,9 +21,9 @@ use crate::test_cases::{bridges_prelude::*, run_test, RuntimeHelper};
use asset_test_pezutils::BasicTeyrchainRuntime;
use bp_messages::MessageNonce;
use bp_pezkuwi_core::teyrchains::{ParaHash, ParaId};
use pezbp_runtime::Chain;
use codec::Decode;
use core::marker::PhantomData;
use pezbp_runtime::Chain;
use pezframe_support::{
assert_ok,
dispatch::GetDispatchInfo,
@@ -93,7 +93,8 @@ where
}
}
/// Checks that the best teyrchain header hash in the bridge teyrchains pezpallet equals to given one.
/// Checks that the best teyrchain header hash in the bridge teyrchains pezpallet equals to given
/// one.
pub struct VerifySubmitTeyrchainHeaderProofOutcome<Runtime, PPI> {
bridged_para_id: u32,
expected_best_hash: ParaHash,
@@ -122,8 +123,10 @@ where
{
fn verify_outcome(&self) {
assert_eq!(
pezpallet_bridge_teyrchains::ParasInfo::<Runtime, PPI>::get(ParaId(self.bridged_para_id))
.map(|info| info.best_head_hash.head_hash),
pezpallet_bridge_teyrchains::ParasInfo::<Runtime, PPI>::get(ParaId(
self.bridged_para_id
))
.map(|info| info.best_head_hash.head_hash),
Some(self.expected_best_hash),
);
}
@@ -222,7 +225,10 @@ where
Runtime: pezpallet_balances::Config,
{
fn verify_outcome(&self) {
assert_eq!(pezpallet_balances::Pezpallet::<Runtime>::free_balance(&self.relayer), self.balance,);
assert_eq!(
pezpallet_balances::Pezpallet::<Runtime>::free_balance(&self.relayer),
self.balance,
);
}
}
@@ -274,7 +280,8 @@ pub fn relayed_incoming_message_works<Runtime, AllPalletsWithoutSystem, MPI>(
pezbp_runtime::ChainId,
) -> CallsAndVerifiers<Runtime>,
) where
Runtime: BasicTeyrchainRuntime + pezcumulus_pezpallet_xcmp_queue::Config + BridgeMessagesConfig<MPI>,
Runtime:
BasicTeyrchainRuntime + pezcumulus_pezpallet_xcmp_queue::Config + BridgeMessagesConfig<MPI>,
AllPalletsWithoutSystem:
OnInitialize<BlockNumberFor<Runtime>> + OnFinalize<BlockNumberFor<Runtime>>,
MPI: 'static,
@@ -307,7 +314,10 @@ pub fn relayed_incoming_message_works<Runtime, AllPalletsWithoutSystem, MPI>(
2,
AccountId::from(alice).into(),
);
mock_open_hrmp_channel::<Runtime, pezcumulus_pezpallet_teyrchain_system::Pezpallet<Runtime>>(
mock_open_hrmp_channel::<
Runtime,
pezcumulus_pezpallet_teyrchain_system::Pezpallet<Runtime>,
>(
runtime_para_id.into(),
sibling_teyrchain_id.into(),
included_head,
@@ -439,9 +449,11 @@ pub(crate) mod for_pallet_xcm_bridge_hub {
buy_execution_fee_amount.into();
let source_account_id =
LocationToAccountId::convert_location(&source).expect("valid location");
let _ =
<pezpallet_balances::Pezpallet<Runtime>>::mint_into(&source_account_id, balance_needed)
.expect("mint_into passes");
let _ = <pezpallet_balances::Pezpallet<Runtime>>::mint_into(
&source_account_id,
balance_needed,
)
.expect("mint_into passes");
Some(buy_execution_fee)
} else {
None
@@ -451,10 +463,11 @@ pub(crate) mod for_pallet_xcm_bridge_hub {
bridge_opener(*locations.clone(), maybe_paid_execution);
// check opened bridge
let bridge = pezpallet_xcm_bridge_hub::Bridges::<Runtime, XcmOverBridgePalletInstance>::get(
locations.bridge_id(),
)
.expect("opened bridge");
let bridge =
pezpallet_xcm_bridge_hub::Bridges::<Runtime, XcmOverBridgePalletInstance>::get(
locations.bridge_id(),
)
.expect("opened bridge");
// check state
assert_ok!(
@@ -498,8 +511,8 @@ pub(crate) mod for_pallet_xcm_bridge_hub {
.ensure_complete());
}
/// Utility for opening bridge directly inserting data to the `pezpallet_xcm_bridge_hub`'s storage
/// (used only for legacy purposes).
/// Utility for opening bridge directly inserting data to the `pezpallet_xcm_bridge_hub`'s
/// storage (used only for legacy purposes).
pub fn open_bridge_with_storage<Runtime, XcmOverBridgePalletInstance>(
locations: pezpallet_xcm_bridge_hub::BridgeLocations,
lane_id: pezpallet_xcm_bridge_hub::LaneIdOf<Runtime, XcmOverBridgePalletInstance>,
@@ -554,9 +567,11 @@ pub(crate) mod for_pallet_xcm_bridge_hub {
buy_execution_fee_amount.into();
let source_account_id =
LocationToAccountId::convert_location(&expected_source).expect("valid location");
let _ =
<pezpallet_balances::Pezpallet<Runtime>>::mint_into(&source_account_id, balance_needed)
.expect("mint_into passes");
let _ = <pezpallet_balances::Pezpallet<Runtime>>::mint_into(
&source_account_id,
balance_needed,
)
.expect("mint_into passes");
Some(buy_execution_fee)
} else {
None
@@ -31,8 +31,8 @@ use bp_messages::{
target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch},
LaneState, MessageKey, MessagesOperatingMode, OutboundLaneData,
};
use pezbp_runtime::BasicOperatingMode;
use codec::Encode;
use pezbp_runtime::BasicOperatingMode;
use pezframe_support::{
assert_ok,
dispatch::GetDispatchInfo,
@@ -320,7 +320,9 @@ pub fn handle_export_message_from_system_teyrchain_to_outbound_queue_works<
runtime_para_id: u32,
sibling_teyrchain_id: u32,
unwrap_pallet_bridge_messages_event: Box<
dyn Fn(Vec<u8>) -> Option<pezpallet_bridge_messages::Event<Runtime, MessagesPalletInstance>>,
dyn Fn(
Vec<u8>,
) -> Option<pezpallet_bridge_messages::Event<Runtime, MessagesPalletInstance>>,
>,
export_message_instruction: fn() -> Instruction<XcmConfig::RuntimeCall>,
existential_deposit: Option<Asset>,
@@ -409,7 +411,9 @@ pub fn handle_export_message_from_system_teyrchain_to_outbound_queue_works<
let mut events = <pezframe_system::Pezpallet<Runtime>>::events()
.into_iter()
.filter_map(|e| unwrap_pallet_bridge_messages_event(e.event.encode()));
assert!(events.any(|e| matches!(e, pezpallet_bridge_messages::Event::MessageAccepted { .. })));
assert!(
events.any(|e| matches!(e, pezpallet_bridge_messages::Event::MessageAccepted { .. }))
);
})
}
@@ -565,9 +569,8 @@ pub fn message_dispatch_routing_works<
let mut events = <pezframe_system::Pezpallet<Runtime>>::events()
.into_iter()
.filter_map(|e| unwrap_pezcumulus_pezpallet_xcmp_queue_event(e.event.encode()));
assert!(
events.any(|e| matches!(e, pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }))
);
assert!(events
.any(|e| matches!(e, pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. })));
})
}
@@ -689,10 +692,13 @@ pub(crate) mod for_pallet_xcm_bridge_hub {
{
run_test::<Runtime, _>(collator_session_key, runtime_para_id, vec![], || {
// construct expected bridge configuration
let locations = pezpallet_xcm_bridge_hub::Pezpallet::<Runtime, XcmOverBridgePalletInstance>::bridge_locations(
expected_source.clone().into(),
destination.clone().into(),
).expect("valid bridge locations");
let locations = pezpallet_xcm_bridge_hub::Pezpallet::<
Runtime,
XcmOverBridgePalletInstance,
>::bridge_locations(
expected_source.clone().into(), destination.clone().into()
)
.expect("valid bridge locations");
let expected_lane_id =
locations.calculate_lane_id(xcm::latest::VERSION).expect("valid laneId");
let lanes_manager = LanesManagerOf::<Runtime, XcmOverBridgePalletInstance>::new();
@@ -23,9 +23,9 @@ use bp_messages::{
target_chain::FromBridgedChainMessagesProof, ChainWithMessages, LaneState, MessageNonce,
UnrewardedRelayersState,
};
use pezbp_runtime::{AccountIdOf, BlockNumberOf, Chain, HeaderOf, UnverifiedStorageProofParams};
use bp_test_utils::make_default_justification;
use codec::Encode;
use pezbp_runtime::{AccountIdOf, BlockNumberOf, Chain, HeaderOf, UnverifiedStorageProofParams};
use pezpallet_bridge_grandpa::{BridgedChain, BridgedHeader};
use pezsp_runtime::traits::Header as HeaderT;
use xcm::latest::prelude::*;
@@ -26,12 +26,12 @@ use bp_messages::{
target_chain::FromBridgedChainMessagesProof, ChainWithMessages, LaneState,
UnrewardedRelayersState, Weight,
};
use pezbp_runtime::{
AccountIdOf, BlockNumberOf, Chain, HeaderOf, Teyrchain, UnverifiedStorageProofParams,
};
use bp_test_utils::prepare_teyrchain_heads_proof;
use bp_teyrchains::{RelayBlockHash, RelayBlockNumber};
use codec::Encode;
use pezbp_runtime::{
AccountIdOf, BlockNumberOf, Chain, HeaderOf, Teyrchain, UnverifiedStorageProofParams,
};
use pezpallet_bridge_grandpa::BridgedHeader;
use pezsp_runtime::traits::Header as HeaderT;
use xcm::latest::prelude::*;
@@ -82,14 +82,15 @@ where
finality_target: Box::new(relay_chain_header),
justification: grandpa_justification,
};
let submit_para_head = pezpallet_bridge_teyrchains::Call::<Runtime, PPI>::submit_teyrchain_heads {
at_relay_block: (
relay_chain_header_number.saturated_into(),
relay_chain_header_hash.into(),
),
teyrchains: teyrchain_heads,
teyrchain_heads_proof: para_heads_proof,
};
let submit_para_head =
pezpallet_bridge_teyrchains::Call::<Runtime, PPI>::submit_teyrchain_heads {
at_relay_block: (
relay_chain_header_number.saturated_into(),
relay_chain_header_hash.into(),
),
teyrchains: teyrchain_heads,
teyrchain_heads_proof: para_heads_proof,
};
let submit_message = pezpallet_bridge_messages::Call::<Runtime, MPI>::receive_messages_proof {
relayer_id_at_bridged_chain: relayer_id_at_bridged_chain.into(),
proof: Box::new(message_proof),
@@ -119,8 +120,8 @@ where
GPI: 'static,
PPI: 'static,
MPI: 'static,
<Runtime as pezpallet_bridge_grandpa::Config<GPI>>::BridgedChain:
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
<Runtime as pezpallet_bridge_grandpa::Config<GPI>>::BridgedChain: pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
+ ChainWithGrandpa,
BridgedChainOf<Runtime, MPI>: Chain<Hash = ParaHash> + Teyrchain,
<Runtime as pezpallet_utility::Config>::RuntimeCall: From<pezpallet_bridge_grandpa::Call<Runtime, GPI>>
+ From<pezpallet_bridge_teyrchains::Call<Runtime, PPI>>
@@ -132,14 +133,15 @@ where
finality_target: Box::new(relay_chain_header),
justification: grandpa_justification,
};
let submit_para_head = pezpallet_bridge_teyrchains::Call::<Runtime, PPI>::submit_teyrchain_heads {
at_relay_block: (
relay_chain_header_number.saturated_into(),
relay_chain_header_hash.into(),
),
teyrchains: teyrchain_heads,
teyrchain_heads_proof: para_heads_proof,
};
let submit_para_head =
pezpallet_bridge_teyrchains::Call::<Runtime, PPI>::submit_teyrchain_heads {
at_relay_block: (
relay_chain_header_number.saturated_into(),
relay_chain_header_hash.into(),
),
teyrchains: teyrchain_heads,
teyrchain_heads_proof: para_heads_proof,
};
let submit_message_delivery_proof =
pezpallet_bridge_messages::Call::<Runtime, MPI>::receive_messages_delivery_proof {
proof: message_delivery_proof,
@@ -216,8 +218,8 @@ pub fn make_complex_relayer_delivery_proofs<
FromBridgedChainMessagesProof<ParaHash, LaneId>,
)
where
BridgedRelayChain:
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
BridgedRelayChain: pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
+ ChainWithGrandpa,
BridgedTeyrchain: pezbp_runtime::Chain<Hash = ParaHash> + Teyrchain,
ThisChainWithMessages: ChainWithMessages,
LaneId: Copy + Encode,
@@ -287,8 +289,8 @@ pub fn make_complex_relayer_confirmation_proofs<
FromBridgedChainMessagesDeliveryProof<ParaHash, LaneId>,
)
where
BridgedRelayChain:
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
BridgedRelayChain: pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
+ ChainWithGrandpa,
BridgedTeyrchain: pezbp_runtime::Chain<Hash = ParaHash> + Teyrchain,
ThisChainWithMessages: ChainWithMessages,
LaneId: Copy + Encode,
@@ -352,8 +354,8 @@ pub fn make_complex_bridged_teyrchain_heads_proof<BridgedRelayChain, BridgedTeyr
ParaHeadsProof,
)
where
BridgedRelayChain:
pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber> + ChainWithGrandpa,
BridgedRelayChain: pezbp_runtime::Chain<Hash = RelayBlockHash, BlockNumber = RelayBlockNumber>
+ ChainWithGrandpa,
BridgedTeyrchain: pezbp_runtime::Chain<Hash = ParaHash> + Teyrchain,
{
let bridged_para_head = ParaHead(
@@ -29,8 +29,8 @@ use pezpallet_bridge_grandpa::BridgedHeader;
use xcm::latest::prelude::*;
use bp_messages::MessageNonce;
use pezbp_runtime::BasicOperatingMode;
use bp_test_utils::authority_list;
use pezbp_runtime::BasicOperatingMode;
use xcm::GetVersion;
use xcm_builder::{BridgeMessage, HaulBlob, HaulBlobError, HaulBlobExporter};
use xcm_executor::traits::{validate_export, ExportXcm};