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
@@ -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};