[testnet] BridgeHubRococo nits (#1972)

This PR does not introduce any functional changes to the existing code,
it merely addresses several minor refactors:
- Moving bridging pallets to separate files.
- Improving the readability and naming of weight files for bridging
pallets and bridging pallet instances.

The reason for this refactor is to facilitate easier plugin integration
for the upcoming bridge between Rococo and Westend.

---------

Co-authored-by: command-bot <>
This commit is contained in:
Branislav Kontur
2023-10-23 13:41:20 +02:00
committed by GitHub
parent c284a9312a
commit e0620fd9c0
22 changed files with 547 additions and 481 deletions
@@ -30,6 +30,7 @@
#[cfg(feature = "std")]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
pub mod bridge_common_config;
pub mod bridge_hub_rococo_config;
pub mod bridge_hub_wococo_config;
mod weights;
@@ -68,7 +69,6 @@ pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use sp_runtime::{MultiAddress, Perbill, Permill};
use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin};
use bp_parachains::SingleParaStoredHeaderDataBuilder;
use bp_runtime::HeaderId;
#[cfg(any(feature = "std", test))]
@@ -80,19 +80,8 @@ use xcm::latest::prelude::*;
use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
use crate::{
bridge_hub_rococo_config::{
BridgeRefundBridgeHubWococoMessages, OnBridgeHubRococoBlobDispatcher,
WithBridgeHubWococoMessageBridge,
},
bridge_hub_wococo_config::{
BridgeRefundBridgeHubRococoMessages, OnBridgeHubWococoBlobDispatcher,
WithBridgeHubRococoMessageBridge,
},
xcm_config::XcmRouter,
};
use bridge_runtime_common::{
messages::{source::TargetHeaderChainAdapter, target::SourceHeaderChainAdapter},
messages_xcm_extension::{XcmAsPlainPayload, XcmBlobMessageDispatch},
bridge_hub_rococo_config::BridgeRefundBridgeHubWococoMessages,
bridge_hub_wococo_config::BridgeRefundBridgeHubRococoMessages, xcm_config::XcmRouter,
};
use parachains_common::{
impls::DealWithFees,
@@ -468,167 +457,6 @@ impl pallet_utility::Config for Runtime {
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
}
// Add bridge pallets (GPA)
/// Add GRANDPA bridge pallet to track Wococo relay chain on Rococo BridgeHub
pub type BridgeGrandpaWococoInstance = pallet_bridge_grandpa::Instance1;
impl pallet_bridge_grandpa::Config<BridgeGrandpaWococoInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type BridgedChain = bp_wococo::Wococo;
type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>;
type HeadersToKeep = RelayChainHeadersToKeep;
type WeightInfo = weights::pallet_bridge_grandpa_bridge_wococo_grandpa::WeightInfo<Runtime>;
}
/// Add GRANDPA bridge pallet to track Rococo relay chain on Wococo BridgeHub
pub type BridgeGrandpaRococoInstance = pallet_bridge_grandpa::Instance2;
impl pallet_bridge_grandpa::Config<BridgeGrandpaRococoInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type BridgedChain = bp_rococo::Rococo;
type MaxFreeMandatoryHeadersPerBlock = ConstU32<4>;
type HeadersToKeep = RelayChainHeadersToKeep;
type WeightInfo = weights::pallet_bridge_grandpa_bridge_rococo_grandpa::WeightInfo<Runtime>;
}
parameter_types! {
pub const RelayChainHeadersToKeep: u32 = 1024;
pub const ParachainHeadsToKeep: u32 = 64;
pub const RelayerStakeLease: u32 = 8;
pub const RococoBridgeParachainPalletName: &'static str = "Paras";
pub const WococoBridgeParachainPalletName: &'static str = "Paras";
pub const MaxRococoParaHeadDataSize: u32 = bp_rococo::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE;
pub const MaxWococoParaHeadDataSize: u32 = bp_wococo::MAX_NESTED_PARACHAIN_HEAD_DATA_SIZE;
pub storage DeliveryRewardInBalance: u64 = 1_000_000;
pub storage RequiredStakeForStakeAndSlash: Balance = 1_000_000;
pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs";
}
/// Add parachain bridge pallet to track Wococo BridgeHub parachain
pub type BridgeParachainWococoInstance = pallet_bridge_parachains::Instance1;
impl pallet_bridge_parachains::Config<BridgeParachainWococoInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pallet_bridge_parachains_bridge_parachains_bench_runtime_bridge_parachain_wococo_instance::WeightInfo<Runtime>;
type BridgesGrandpaPalletInstance = BridgeGrandpaWococoInstance;
type ParasPalletName = WococoBridgeParachainPalletName;
type ParaStoredHeaderDataBuilder =
SingleParaStoredHeaderDataBuilder<bp_bridge_hub_wococo::BridgeHubWococo>;
type HeadsToKeep = ParachainHeadsToKeep;
type MaxParaHeadDataSize = MaxWococoParaHeadDataSize;
}
/// Add parachain bridge pallet to track Rococo BridgeHub parachain
pub type BridgeParachainRococoInstance = pallet_bridge_parachains::Instance2;
impl pallet_bridge_parachains::Config<BridgeParachainRococoInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pallet_bridge_parachains_bridge_parachains_bench_runtime_bridge_parachain_rococo_instance::WeightInfo<Runtime>;
type BridgesGrandpaPalletInstance = BridgeGrandpaRococoInstance;
type ParasPalletName = RococoBridgeParachainPalletName;
type ParaStoredHeaderDataBuilder =
SingleParaStoredHeaderDataBuilder<bp_bridge_hub_rococo::BridgeHubRococo>;
type HeadsToKeep = ParachainHeadsToKeep;
type MaxParaHeadDataSize = MaxRococoParaHeadDataSize;
}
/// Add XCM messages support for BridgeHubRococo to support Rococo->Wococo XCM messages
pub type WithBridgeHubWococoMessagesInstance = pallet_bridge_messages::Instance1;
impl pallet_bridge_messages::Config<WithBridgeHubWococoMessagesInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pallet_bridge_messages_bridge_messages_bench_runtime_with_bridge_hub_wococo_messages_instance::WeightInfo<Runtime>;
type BridgedChainId = bridge_hub_rococo_config::BridgeHubWococoChainId;
type ActiveOutboundLanes = bridge_hub_rococo_config::ActiveOutboundLanesToBridgeHubWococo;
type MaxUnrewardedRelayerEntriesAtInboundLane =
bridge_hub_rococo_config::MaxUnrewardedRelayerEntriesAtInboundLane;
type MaxUnconfirmedMessagesAtInboundLane =
bridge_hub_rococo_config::MaxUnconfirmedMessagesAtInboundLane;
type MaximalOutboundPayloadSize =
bridge_hub_rococo_config::ToBridgeHubWococoMaximalOutboundPayloadSize;
type OutboundPayload = XcmAsPlainPayload;
type InboundPayload = XcmAsPlainPayload;
type InboundRelayer = AccountId;
type DeliveryPayments = ();
type TargetHeaderChain = TargetHeaderChainAdapter<WithBridgeHubWococoMessageBridge>;
type LaneMessageVerifier = bridge_hub_rococo_config::ToBridgeHubWococoMessageVerifier;
type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
Runtime,
WithBridgeHubWococoMessagesInstance,
DeliveryRewardInBalance,
>;
type SourceHeaderChain = SourceHeaderChainAdapter<WithBridgeHubWococoMessageBridge>;
type MessageDispatch = XcmBlobMessageDispatch<
OnBridgeHubRococoBlobDispatcher,
Self::WeightInfo,
cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider<
bridge_hub_rococo_config::AssetHubRococoParaId,
Runtime,
>,
>;
type OnMessagesDelivered = bridge_hub_rococo_config::OnMessagesDelivered;
}
/// Add XCM messages support for BridgeHubWococo to support Wococo->Rococo XCM messages
pub type WithBridgeHubRococoMessagesInstance = pallet_bridge_messages::Instance2;
impl pallet_bridge_messages::Config<WithBridgeHubRococoMessagesInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pallet_bridge_messages_bridge_messages_bench_runtime_with_bridge_hub_rococo_messages_instance::WeightInfo<Runtime>;
type BridgedChainId = bridge_hub_wococo_config::BridgeHubRococoChainId;
type ActiveOutboundLanes = bridge_hub_wococo_config::ActiveOutboundLanesToBridgeHubRococo;
type MaxUnrewardedRelayerEntriesAtInboundLane =
bridge_hub_wococo_config::MaxUnrewardedRelayerEntriesAtInboundLane;
type MaxUnconfirmedMessagesAtInboundLane =
bridge_hub_wococo_config::MaxUnconfirmedMessagesAtInboundLane;
type MaximalOutboundPayloadSize =
bridge_hub_wococo_config::ToBridgeHubRococoMaximalOutboundPayloadSize;
type OutboundPayload = XcmAsPlainPayload;
type InboundPayload = XcmAsPlainPayload;
type InboundRelayer = AccountId;
type DeliveryPayments = ();
type TargetHeaderChain = TargetHeaderChainAdapter<WithBridgeHubRococoMessageBridge>;
type LaneMessageVerifier = bridge_hub_wococo_config::ToBridgeHubRococoMessageVerifier;
type DeliveryConfirmationPayments = pallet_bridge_relayers::DeliveryConfirmationPaymentsAdapter<
Runtime,
WithBridgeHubRococoMessagesInstance,
DeliveryRewardInBalance,
>;
type SourceHeaderChain = SourceHeaderChainAdapter<WithBridgeHubRococoMessageBridge>;
type MessageDispatch = XcmBlobMessageDispatch<
OnBridgeHubWococoBlobDispatcher,
Self::WeightInfo,
cumulus_pallet_xcmp_queue::bridging::OutXcmpChannelStatusProvider<
bridge_hub_wococo_config::AssetHubWococoParaId,
Runtime,
>,
>;
type OnMessagesDelivered = bridge_hub_wococo_config::OnMessagesDelivered;
}
/// Allows collect and claim rewards for relayers
impl pallet_bridge_relayers::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Reward = Balance;
type PaymentProcedure =
bp_relayers::PayRewardFromAccount<pallet_balances::Pallet<Runtime>, AccountId>;
type StakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed<
AccountId,
BlockNumber,
Balances,
RelayerStakeReserveId,
RequiredStakeForStakeAndSlash,
RelayerStakeLease,
>;
type WeightInfo = weights::pallet_bridge_relayers::WeightInfo<Runtime>;
}
// Create the runtime by composing the FRAME pallets that were previously configured.
construct_runtime!(
pub enum Runtime
@@ -669,12 +497,12 @@ construct_runtime!(
// With-Wococo bridge modules that are active (used) at Rococo BridgeHub runtime.
BridgeWococoGrandpa: pallet_bridge_grandpa::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 41,
BridgeWococoParachain: pallet_bridge_parachains::<Instance1>::{Pallet, Call, Storage, Event<T>} = 42,
BridgeWococoMessages: pallet_bridge_messages::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 46,
BridgeRococoToWococoMessages: pallet_bridge_messages::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>} = 46,
// With-Rococo bridge modules that are active (used) at Wococo BridgeHub runtime.
BridgeRococoGrandpa: pallet_bridge_grandpa::<Instance2>::{Pallet, Call, Storage, Event<T>, Config<T>} = 43,
BridgeRococoParachain: pallet_bridge_parachains::<Instance2>::{Pallet, Call, Storage, Event<T>} = 44,
BridgeRococoMessages: pallet_bridge_messages::<Instance2>::{Pallet, Call, Storage, Event<T>, Config<T>} = 45,
BridgeWococoToRococoMessages: pallet_bridge_messages::<Instance2>::{Pallet, Call, Storage, Event<T>, Config<T>} = 45,
BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event<T>} = 47,
}
@@ -687,7 +515,7 @@ bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! {
// Parachains
BridgeRococoParachain, BridgeWococoParachain,
// Messages
BridgeRococoMessages, BridgeWococoMessages
BridgeWococoToRococoMessages, BridgeRococoToWococoMessages
}
#[cfg(feature = "runtime-benchmarks")]
@@ -711,13 +539,13 @@ mod benches {
[pallet_xcm_benchmarks::fungible, XcmBalances]
[pallet_xcm_benchmarks::generic, XcmGeneric]
// Bridge pallets at Rococo
[pallet_bridge_grandpa, BridgeWococoGrandpa]
[pallet_bridge_parachains, BridgeParachainsBench::<Runtime, BridgeParachainWococoInstance>]
[pallet_bridge_messages, BridgeMessagesBench::<Runtime, WithBridgeHubWococoMessagesInstance>]
[pallet_bridge_grandpa, WococoFinality]
[pallet_bridge_parachains, WithinWococo]
[pallet_bridge_messages, RococoToWococo]
// Bridge pallets at Wococo
[pallet_bridge_grandpa, BridgeRococoGrandpa]
[pallet_bridge_parachains, BridgeParachainsBench::<Runtime, BridgeParachainRococoInstance>]
[pallet_bridge_messages, BridgeMessagesBench::<Runtime, WithBridgeHubRococoMessagesInstance>]
[pallet_bridge_grandpa, RococoFinality]
[pallet_bridge_parachains, WithinRococo]
[pallet_bridge_messages, WococoToRococo]
// Bridge relayer pallets
[pallet_bridge_relayers, BridgeRelayersBench::<Runtime>]
);
@@ -904,7 +732,7 @@ impl_runtime_apis! {
}
}
// This exposed by BridgeHubRococo
// This is exposed by BridgeHubRococo
impl bp_bridge_hub_wococo::FromBridgeHubWococoInboundLaneApi<Block> for Runtime {
fn message_details(
lane: bp_messages::LaneId,
@@ -912,12 +740,12 @@ impl_runtime_apis! {
) -> Vec<bp_messages::InboundMessageDetails> {
bridge_runtime_common::messages_api::inbound_message_details::<
Runtime,
WithBridgeHubWococoMessagesInstance,
bridge_hub_rococo_config::WithBridgeHubWococoMessagesInstance,
>(lane, messages)
}
}
// This exposed by BridgeHubRococo
// This is exposed by BridgeHubRococo
impl bp_bridge_hub_wococo::ToBridgeHubWococoOutboundLaneApi<Block> for Runtime {
fn message_details(
lane: bp_messages::LaneId,
@@ -926,7 +754,7 @@ impl_runtime_apis! {
) -> Vec<bp_messages::OutboundMessageDetails> {
bridge_runtime_common::messages_api::outbound_message_details::<
Runtime,
WithBridgeHubWococoMessagesInstance,
bridge_hub_rococo_config::WithBridgeHubWococoMessagesInstance,
>(lane, begin, end)
}
}
@@ -939,7 +767,7 @@ impl_runtime_apis! {
) -> Vec<bp_messages::InboundMessageDetails> {
bridge_runtime_common::messages_api::inbound_message_details::<
Runtime,
WithBridgeHubRococoMessagesInstance,
bridge_hub_wococo_config::WithBridgeHubRococoMessagesInstance,
>(lane, messages)
}
}
@@ -953,7 +781,7 @@ impl_runtime_apis! {
) -> Vec<bp_messages::OutboundMessageDetails> {
bridge_runtime_common::messages_api::outbound_message_details::<
Runtime,
WithBridgeHubRococoMessagesInstance,
bridge_hub_wococo_config::WithBridgeHubRococoMessagesInstance,
>(lane, begin, end)
}
}
@@ -994,9 +822,14 @@ impl_runtime_apis! {
type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::<Runtime>;
use pallet_bridge_parachains::benchmarking::Pallet as BridgeParachainsBench;
use pallet_bridge_messages::benchmarking::Pallet as BridgeMessagesBench;
use pallet_bridge_relayers::benchmarking::Pallet as BridgeRelayersBench;
// Change weight file names.
type WococoFinality = BridgeWococoGrandpa;
type RococoFinality = BridgeRococoGrandpa;
type WithinWococo = pallet_bridge_parachains::benchmarking::Pallet::<Runtime, bridge_common_config::BridgeParachainWococoInstance>;
type WithinRococo = pallet_bridge_parachains::benchmarking::Pallet::<Runtime, bridge_common_config::BridgeParachainRococoInstance>;
type RococoToWococo = pallet_bridge_messages::benchmarking::Pallet ::<Runtime, bridge_hub_rococo_config::WithBridgeHubWococoMessagesInstance>;
type WococoToRococo = pallet_bridge_messages::benchmarking::Pallet ::<Runtime, bridge_hub_wococo_config::WithBridgeHubRococoMessagesInstance>;
let mut list = Vec::<BenchmarkList>::new();
list_benchmarks!(list, extra);
@@ -1131,6 +964,13 @@ impl_runtime_apis! {
type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::<Runtime>;
type WococoFinality = BridgeWococoGrandpa;
type RococoFinality = BridgeRococoGrandpa;
type WithinWococo = pallet_bridge_parachains::benchmarking::Pallet::<Runtime, bridge_common_config::BridgeParachainWococoInstance>;
type WithinRococo = pallet_bridge_parachains::benchmarking::Pallet::<Runtime, bridge_common_config::BridgeParachainRococoInstance>;
type RococoToWococo = pallet_bridge_messages::benchmarking::Pallet ::<Runtime, bridge_hub_rococo_config::WithBridgeHubWococoMessagesInstance>;
type WococoToRococo = pallet_bridge_messages::benchmarking::Pallet ::<Runtime, bridge_hub_wococo_config::WithBridgeHubRococoMessagesInstance>;
use bridge_runtime_common::messages_benchmarking::{
prepare_message_delivery_proof_from_parachain,
prepare_message_proof_from_parachain,
@@ -1138,14 +978,13 @@ impl_runtime_apis! {
};
use pallet_bridge_messages::benchmarking::{
Config as BridgeMessagesConfig,
Pallet as BridgeMessagesBench,
MessageDeliveryProofParams,
MessageProofParams,
};
impl BridgeMessagesConfig<WithBridgeHubWococoMessagesInstance> for Runtime {
impl BridgeMessagesConfig<bridge_hub_rococo_config::WithBridgeHubWococoMessagesInstance> for Runtime {
fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool {
let bench_lane_id = <Self as BridgeMessagesConfig<WithBridgeHubWococoMessagesInstance>>::bench_lane_id();
let bench_lane_id = <Self as BridgeMessagesConfig<bridge_hub_rococo_config::WithBridgeHubWococoMessagesInstance>>::bench_lane_id();
let bridged_chain_id = bp_runtime::BRIDGE_HUB_WOCOCO_CHAIN_ID;
pallet_bridge_relayers::Pallet::<Runtime>::relayer_reward(
relayer,
@@ -1165,7 +1004,7 @@ impl_runtime_apis! {
ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(42.into());
prepare_message_proof_from_parachain::<
Runtime,
BridgeGrandpaWococoInstance,
bridge_common_config::BridgeGrandpaWococoInstance,
bridge_hub_rococo_config::WithBridgeHubWococoMessageBridge,
>(params, generate_xcm_builder_bridge_message_sample(X2(GlobalConsensus(Rococo), Parachain(42))))
}
@@ -1175,7 +1014,7 @@ impl_runtime_apis! {
) -> bridge_hub_rococo_config::ToWococoBridgeHubMessagesDeliveryProof {
prepare_message_delivery_proof_from_parachain::<
Runtime,
BridgeGrandpaWococoInstance,
bridge_common_config::BridgeGrandpaWococoInstance,
bridge_hub_rococo_config::WithBridgeHubWococoMessageBridge,
>(params)
}
@@ -1186,9 +1025,9 @@ impl_runtime_apis! {
}
}
impl BridgeMessagesConfig<WithBridgeHubRococoMessagesInstance> for Runtime {
impl BridgeMessagesConfig<bridge_hub_wococo_config::WithBridgeHubRococoMessagesInstance> for Runtime {
fn is_relayer_rewarded(relayer: &Self::AccountId) -> bool {
let bench_lane_id = <Self as BridgeMessagesConfig<WithBridgeHubRococoMessagesInstance>>::bench_lane_id();
let bench_lane_id = <Self as BridgeMessagesConfig<bridge_hub_wococo_config::WithBridgeHubRococoMessagesInstance>>::bench_lane_id();
let bridged_chain_id = bp_runtime::BRIDGE_HUB_ROCOCO_CHAIN_ID;
pallet_bridge_relayers::Pallet::<Runtime>::relayer_reward(
relayer,
@@ -1208,7 +1047,7 @@ impl_runtime_apis! {
ParachainSystem::open_outbound_hrmp_channel_for_benchmarks_or_tests(42.into());
prepare_message_proof_from_parachain::<
Runtime,
BridgeGrandpaRococoInstance,
bridge_common_config::BridgeGrandpaRococoInstance,
bridge_hub_wococo_config::WithBridgeHubRococoMessageBridge,
>(params, generate_xcm_builder_bridge_message_sample(X2(GlobalConsensus(Wococo), Parachain(42))))
}
@@ -1218,7 +1057,7 @@ impl_runtime_apis! {
) -> bridge_hub_wococo_config::ToRococoBridgeHubMessagesDeliveryProof {
prepare_message_delivery_proof_from_parachain::<
Runtime,
BridgeGrandpaRococoInstance,
bridge_common_config::BridgeGrandpaRococoInstance,
bridge_hub_wococo_config::WithBridgeHubRococoMessageBridge,
>(params)
}
@@ -1230,16 +1069,13 @@ impl_runtime_apis! {
}
use bridge_runtime_common::parachains_benchmarking::prepare_parachain_heads_proof;
use pallet_bridge_parachains::benchmarking::{
Config as BridgeParachainsConfig,
Pallet as BridgeParachainsBench,
};
use pallet_bridge_parachains::benchmarking::Config as BridgeParachainsConfig;
use pallet_bridge_relayers::benchmarking::{
Pallet as BridgeRelayersBench,
Config as BridgeRelayersConfig,
};
impl BridgeParachainsConfig<BridgeParachainWococoInstance> for Runtime {
impl BridgeParachainsConfig<bridge_common_config::BridgeParachainWococoInstance> for Runtime {
fn parachains() -> Vec<bp_polkadot_core::parachains::ParaId> {
use bp_runtime::Parachain;
vec![bp_polkadot_core::parachains::ParaId(bp_bridge_hub_wococo::BridgeHubWococo::PARACHAIN_ID)]
@@ -1255,7 +1091,7 @@ impl_runtime_apis! {
bp_polkadot_core::parachains::ParaHeadsProof,
Vec<(bp_polkadot_core::parachains::ParaId, bp_polkadot_core::parachains::ParaHash)>,
) {
prepare_parachain_heads_proof::<Runtime, BridgeParachainWococoInstance>(
prepare_parachain_heads_proof::<Runtime, bridge_common_config::BridgeParachainWococoInstance>(
parachains,
parachain_head_size,
proof_size,
@@ -1263,7 +1099,7 @@ impl_runtime_apis! {
}
}
impl BridgeParachainsConfig<BridgeParachainRococoInstance> for Runtime {
impl BridgeParachainsConfig<bridge_common_config::BridgeParachainRococoInstance> for Runtime {
fn parachains() -> Vec<bp_polkadot_core::parachains::ParaId> {
use bp_runtime::Parachain;
vec![bp_polkadot_core::parachains::ParaId(bp_bridge_hub_rococo::BridgeHubRococo::PARACHAIN_ID)]
@@ -1279,7 +1115,7 @@ impl_runtime_apis! {
bp_polkadot_core::parachains::ParaHeadsProof,
Vec<(bp_polkadot_core::parachains::ParaId, bp_polkadot_core::parachains::ParaHash)>,
) {
prepare_parachain_heads_proof::<Runtime, BridgeParachainRococoInstance>(
prepare_parachain_heads_proof::<Runtime, bridge_common_config::BridgeParachainRococoInstance>(
parachains,
parachain_head_size,
proof_size,