Skip to content

Commit

Permalink
Fix inbound benchmark and regenerate it.
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden authored and claravanstaden committed Sep 21, 2023
1 parent 9e25316 commit 5b0ffb9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ use snowbridge_inbound_queue::BenchmarkHelper;
use snowbridge_beacon_primitives::CompactExecutionHeader;
#[cfg(feature = "runtime-benchmarks")]
use sp_core::H256;
#[cfg(feature = "runtime-benchmarks")]
use crate::xcm_config::benchmark_helper::DoNothingRouter;

use frame_support::{
construct_runtime,
Expand Down Expand Up @@ -605,7 +607,10 @@ impl snowbridge_inbound_queue::Config for Runtime {
type Verifier = snowbridge_ethereum_beacon_client::Pallet<Runtime>;
type Token = Balances;
type Reward = Reward;
#[cfg(not(feature = "runtime-benchmarks"))]
type XcmSender = XcmRouter;
#[cfg(feature = "runtime-benchmarks")]
type XcmSender = DoNothingRouter;
type WeightInfo = weights::snowbridge_inbound_queue::WeightInfo<Runtime>;
type GatewayAddress = GatewayAddress;
#[cfg(feature = "runtime-benchmarks")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@

//! Autogenerated weights for `snowbridge_inbound_queue`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-09-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-09-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `macbook pro 14 m2`, CPU: `m2-arm64`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024
//! HOSTNAME: `macbook pro m1`, CPU: `m1-arm64`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("bridge-hub-rococo-dev")`, DB CACHE: 1024

// Executed Command:
// target/release/polkadot-parachain
Expand All @@ -13,14 +14,13 @@
// --chain=bridge-hub-rococo-dev
// --pallet=snowbridge_inbound_queue
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --steps
// 50
// --repeat
// 20
// --output
// ./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_inbound_queue.rs
// ./cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_inbound_queue.rs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -33,20 +33,20 @@ use core::marker::PhantomData;
/// Weight functions for `snowbridge_inbound_queue`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> snowbridge_inbound_queue::WeightInfo for WeightInfo<T> {
/// Storage: EthereumInboundQueue PalletOperatingMode (r:1 w:0)
/// Proof: EthereumInboundQueue PalletOperatingMode (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen)
/// Storage: EthereumBeaconClient ExecutionHeaders (r:1 w:0)
/// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(136), added: 2611, mode: MaxEncodedLen)
/// Storage: EthereumInboundQueue Nonce (r:1 w:1)
/// Proof: EthereumInboundQueue Nonce (max_values: None, max_size: Some(20), added: 2495, mode: MaxEncodedLen)
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: `EthereumInboundQueue::PalletOperatingMode` (r:1 w:0)
/// Proof: `EthereumInboundQueue::PalletOperatingMode` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`)
/// Storage: `EthereumBeaconClient::ExecutionHeaders` (r:1 w:0)
/// Proof: `EthereumBeaconClient::ExecutionHeaders` (`max_values`: None, `max_size`: Some(136), added: 2611, mode: `MaxEncodedLen`)
/// Storage: `EthereumInboundQueue::Nonce` (r:1 w:1)
/// Proof: `EthereumInboundQueue::Nonce` (`max_values`: None, `max_size`: Some(20), added: 2495, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn submit() -> Weight {
// Proof Size summary in bytes:
// Measured: `457`
// Estimated: `3601`
// Minimum execution time: 69_000_000 picoseconds.
Weight::from_parts(70_000_000, 0)
// Minimum execution time: 76_000_000 picoseconds.
Weight::from_parts(77_000_000, 0)
.saturating_add(Weight::from_parts(0, 3601))
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(2))
Expand Down

0 comments on commit 5b0ffb9

Please sign in to comment.