Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Bridge benchmarks for bridge hub rococo/wococo #2107

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
post-merge fixes
  • Loading branch information
svyatonik committed Jan 19, 2023
commit b8dfb61797d5518b9d6210f278e1da1b25c0066a
20 changes: 20 additions & 0 deletions parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,11 @@ impl_runtime_apis! {
fn endow_account(_: &AccountId) {}
fn is_message_dispatched(_: bp_messages::MessageNonce) -> bool { true }

fn is_relayer_rewarded(_: &Self::AccountId) -> bool {
// TODO: implement me properly
true
}

fn prepare_message_proof(
params: MessageProofParams,
) -> (bridge_hub_rococo_config::FromWococoBridgeHubMessagesProof, Weight) {
Expand Down Expand Up @@ -984,6 +989,11 @@ impl_runtime_apis! {
fn endow_account(_: &AccountId) {}
fn is_message_dispatched(_: bp_messages::MessageNonce) -> bool { true }

fn is_relayer_rewarded(_: &Self::AccountId) -> bool {
// TODO: implement me properly
true
}

fn prepare_message_proof(
params: MessageProofParams,
) -> (bridge_hub_wococo_config::FromRococoBridgeHubMessagesProof, Weight) {
Expand Down Expand Up @@ -1017,6 +1027,11 @@ impl_runtime_apis! {
};

impl BridgeParachainsConfig<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)]
}

fn prepare_parachain_heads_proof(
parachains: &[bp_polkadot_core::parachains::ParaId],
parachain_head_size: u32,
Expand All @@ -1036,6 +1051,11 @@ impl_runtime_apis! {
}

impl BridgeParachainsConfig<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)]
}

fn prepare_parachain_heads_proof(
parachains: &[bp_polkadot_core::parachains::ParaId],
parachain_head_size: u32,
Expand Down