From 2d379e17a7e3885242dd6da75de87ffb0214cc2c Mon Sep 17 00:00:00 2001 From: ron Date: Sat, 8 Apr 2023 12:32:56 +0800 Subject: [PATCH 1/8] Sync with upstream --- parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 83ef4caad29..01c92afe80f 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -581,7 +581,9 @@ parameter_types! { pub const MaxSignatureSize: u32 = 96; pub const MaxSlotsPerHistoricalRoot: u64 = 64; pub const MaxFinalizedHeaderSlotArray: u32 = 1000; - pub const WeakSubjectivityPeriodSeconds: u32 = 97200; + // accordingly to https://notes.ethereum.org/@adiasg/weak-subjectvity-eth2 + // Epochs required is 3277 as 1258368 seconds about 2 weeks + pub const WeakSubjectivityPeriodSeconds: u32 = 1258368; pub const ChainForkVersions: ForkVersions = ForkVersions{ genesis: Fork { version: [0, 0, 0, 1], // 0x00000001 From 4fd28341ba43b39ac95df5dbc5e7a958984c9df6 Mon Sep 17 00:00:00 2001 From: ron Date: Sat, 8 Apr 2023 13:30:31 +0800 Subject: [PATCH 2/8] Weight workaround --- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 2 +- .../bridge-hub-rococo/src/weights/mod.rs | 1 - .../snowbridge_ethereum_beacon_client.rs | 128 ------------------ 3 files changed, 1 insertion(+), 130 deletions(-) delete mode 100644 parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 01c92afe80f..ef6f22aa556 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -618,7 +618,7 @@ impl snowbridge_ethereum_beacon_client::Config for Runtime { type MaxFinalizedHeaderSlotArray = MaxFinalizedHeaderSlotArray; type ForkVersions = ChainForkVersions; type WeakSubjectivityPeriodSeconds = WeakSubjectivityPeriodSeconds; - type WeightInfo = weights::snowbridge_ethereum_beacon_client::WeightInfo; + type WeightInfo = (); } // Create the runtime by composing the FRAME pallets that were previously configured. diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs index 3ddb50c7a5e..59f3932ad2b 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs @@ -37,7 +37,6 @@ pub mod pallet_utility; pub mod pallet_xcm; pub mod paritydb_weights; pub mod rocksdb_weights; -pub mod snowbridge_ethereum_beacon_client; pub mod xcm; pub use block_weights::constants::BlockExecutionWeight; diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs deleted file mode 100644 index 823cdb9f35e..00000000000 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright Parity Technologies (UK) Ltd. -// This file is part of Cumulus. - -// Cumulus is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Cumulus is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Cumulus. If not, see . - -//! Autogenerated weights for `snowbridge_ethereum_beacon_client` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-172-31-4-183`, CPU: `Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 - -// Executed Command: -// ./artifacts/polkadot-parachain -// benchmark -// pallet -// --chain=bridge-hub-rococo-dev -// --execution=wasm -// --wasm-execution=compiled -// --pallet=snowbridge_ethereum_beacon_client -// --extrinsic=* -// --steps=50 -// --repeat=20 -// --json -// --header=./file_header.txt -// --output=./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] - -use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; - -/// Weight functions for `snowbridge_ethereum_beacon_client`. -pub struct WeightInfo(PhantomData); -impl snowbridge_ethereum_beacon_client::WeightInfo for WeightInfo { - /// Storage: EthereumBeaconClient Blocked (r:1 w:0) - /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestSyncCommitteePeriod (r:1 w:1) - /// Proof: EthereumBeaconClient LatestSyncCommitteePeriod (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient SyncCommittees (r:2 w:1) - /// Proof: EthereumBeaconClient SyncCommittees (max_values: None, max_size: Some(1593), added: 4068, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconHeaderSlots (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconHeaderSlots (max_values: Some(1), max_size: Some(8002), added: 8497, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestFinalizedHeaderState (r:1 w:1) - /// Proof: EthereumBeaconClient LatestFinalizedHeaderState (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconHeaders (r:0 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconHeaders (max_values: None, max_size: Some(144), added: 2619, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (r:0 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - fn sync_committee_period_update() -> Weight { - // Proof Size summary in bytes: - // Measured: `1921` - // Estimated: `26135` - // Minimum execution time: 47_657_897_000 picoseconds. - Weight::from_parts(47_722_703_000, 0) - .saturating_add(Weight::from_parts(0, 26135)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(6)) - } - /// Storage: EthereumBeaconClient Blocked (r:1 w:0) - /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestFinalizedHeaderState (r:1 w:1) - /// Proof: EthereumBeaconClient LatestFinalizedHeaderState (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) - /// Storage: Timestamp Now (r:1 w:0) - /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient SyncCommittees (r:1 w:0) - /// Proof: EthereumBeaconClient SyncCommittees (max_values: None, max_size: Some(1593), added: 4068, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconHeaderSlots (r:1 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconHeaderSlots (max_values: Some(1), max_size: Some(8002), added: 8497, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconHeaders (r:0 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconHeaders (max_values: None, max_size: Some(144), added: 2619, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (r:0 w:1) - /// Proof: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - fn import_finalized_header() -> Weight { - // Proof Size summary in bytes: - // Measured: `1921` - // Estimated: `20574` - // Minimum execution time: 47_461_268_000 picoseconds. - Weight::from_parts(47_502_607_000, 0) - .saturating_add(Weight::from_parts(0, 20574)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: EthereumBeaconClient Blocked (r:1 w:0) - /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestFinalizedHeaderState (r:1 w:0) - /// Proof: EthereumBeaconClient LatestFinalizedHeaderState (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient LatestExecutionHeaderState (r:1 w:1) - /// Proof: EthereumBeaconClient LatestExecutionHeaderState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (r:1 w:0) - /// Proof: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient SyncCommittees (r:1 w:0) - /// Proof: EthereumBeaconClient SyncCommittees (max_values: None, max_size: Some(1593), added: 4068, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) - /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) - /// Storage: EthereumBeaconClient ExecutionHeaders (r:0 w:1) - /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(188), added: 2663, mode: MaxEncodedLen) - fn import_execution_header() -> Weight { - // Proof Size summary in bytes: - // Measured: `1965` - // Estimated: `14688` - // Minimum execution time: 47_535_909_000 picoseconds. - Weight::from_parts(47_607_054_000, 0) - .saturating_add(Weight::from_parts(0, 14688)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(2)) - } -} From 550b9358aa82bdaf2c1646f7de43d881225ecac8 Mon Sep 17 00:00:00 2001 From: ron Date: Wed, 12 Apr 2023 08:16:02 +0800 Subject: [PATCH 3/8] Benchmark beacon with mainnet spec --- .../bridge-hubs/bridge-hub-rococo/Cargo.toml | 5 ++- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 41 +++++++++++++++++-- polkadot-parachain/Cargo.toml | 1 + 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml index e4b0577dde6..6f1a9fd174e 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml @@ -93,7 +93,7 @@ snowbridge-beacon-primitives = { path = "../../../../../parachain/primitives/bea snowbridge-router-primitives = { path = "../../../../../parachain/primitives/router", default-features = false } snowbridge-inbound-queue = { path = "../../../../../parachain/pallets/inbound-queue", default-features = false } snowbridge-outbound-queue = { path = "../../../../../parachain/pallets/outbound-queue", default-features = false } -snowbridge-ethereum-beacon-client = { path = "../../../../../parachain/pallets/ethereum-beacon-client", default-features = false, features=["minimal"]} +snowbridge-ethereum-beacon-client = { path = "../../../../../parachain/pallets/ethereum-beacon-client", default-features = false } [dev-dependencies] static_assertions = "1.1" @@ -229,3 +229,6 @@ try-runtime = [ "pallet-xcm/try-runtime", "parachain-info/try-runtime", ] +minimal = [ + "snowbridge-ethereum-beacon-client/minimal", +] diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 3f6718be8e4..95f032c5a13 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -579,6 +579,7 @@ impl snowbridge_outbound_queue::Config for Runtime { type WeightInfo = (); } +#[cfg(feature = "minimal")] parameter_types! { pub const MaxSyncCommitteeSize: u32 = 32; pub const MaxProofBranchSize: u32 = 20; @@ -589,9 +590,7 @@ parameter_types! { pub const MaxSignatureSize: u32 = 96; pub const MaxSlotsPerHistoricalRoot: u64 = 64; pub const MaxFinalizedHeaderSlotArray: u32 = 1000; - // accordingly to https://notes.ethereum.org/@adiasg/weak-subjectvity-eth2 - // Epochs required is 3277 as 1258368 seconds about 2 weeks - pub const WeakSubjectivityPeriodSeconds: u32 = 1258368; + pub const WeakSubjectivityPeriodSeconds: u32 = 97200; pub const ChainForkVersions: ForkVersions = ForkVersions{ genesis: Fork { version: [0, 0, 0, 1], // 0x00000001 @@ -612,6 +611,40 @@ parameter_types! { }; } +#[cfg(not(feature = "minimal"))] +parameter_types! { + pub const MaxSyncCommitteeSize: u32 = 512; + pub const MaxProofBranchSize: u32 = 20; + pub const MaxExtraDataSize: u32 = 32; + pub const MaxLogsBloomSize: u32 = 256; + pub const MaxFeeRecipientSize: u32 = 20; + pub const MaxPublicKeySize: u32 = 48; + pub const MaxSignatureSize: u32 = 96; + pub const MaxSlotsPerHistoricalRoot: u64 = 8192; + pub const MaxFinalizedHeaderSlotArray: u32 = 1000; + // accordingly to https://notes.ethereum.org/@adiasg/weak-subjectvity-eth2 + // Epochs required is 3277 as 1258368 seconds about 2 weeks + pub const WeakSubjectivityPeriodSeconds: u32 = 1258368; + pub const ChainForkVersions: ForkVersions = ForkVersions{ + genesis: Fork { + version: [0, 0, 16, 32], // 0x00001020 + epoch: 0, + }, + altair: Fork { + version: [1, 0, 16, 32], // 0x01001020 + epoch: 36660, + }, + bellatrix: Fork { + version: [2, 0, 16, 32], // 0x02001020 + epoch: 112260, + }, + capella: Fork { + version: [3, 0, 16, 32], // 0x03001020 + epoch: 162304, + }, + }; +} + impl snowbridge_ethereum_beacon_client::Config for Runtime { type RuntimeEvent = RuntimeEvent; type TimeProvider = pallet_timestamp::Pallet; @@ -732,7 +765,7 @@ mod benches { [pallet_bridge_relayers, BridgeRelayersBench::] // Ethereum Bridge //[snowbridge_basic_channel::inbound, BasicInboundChannel] - [snowbridge_outbound_queue, EthereumOutboundChannel] + // [snowbridge_outbound_queue, EthereumOutboundChannel] //[snowbridge_dispatch, Dispatch] [snowbridge_ethereum_beacon_client, EthereumBeaconClient] ); diff --git a/polkadot-parachain/Cargo.toml b/polkadot-parachain/Cargo.toml index 3f3798e3d2e..5a77d334ab1 100644 --- a/polkadot-parachain/Cargo.toml +++ b/polkadot-parachain/Cargo.toml @@ -127,3 +127,4 @@ try-runtime = [ "shell-runtime/try-runtime", "try-runtime-cli/try-runtime", ] +minimal = [] From 9282a49f769c29598055ea80b9b8f57ee7b8ef5e Mon Sep 17 00:00:00 2001 From: ron Date: Fri, 14 Apr 2023 08:09:39 +0800 Subject: [PATCH 4/8] Move WeightInfo back to runtime --- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 2 +- .../bridge-hub-rococo/src/weights/mod.rs | 1 + .../snowbridge_ethereum_beacon_client.rs | 176 ++++++++++++++++++ 3 files changed, 178 insertions(+), 1 deletion(-) create mode 100644 parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 3ab30618119..b9f2392c2e4 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -659,7 +659,7 @@ impl snowbridge_ethereum_beacon_client::Config for Runtime { type MaxFinalizedHeaderSlotArray = MaxFinalizedHeaderSlotArray; type ForkVersions = ChainForkVersions; type WeakSubjectivityPeriodSeconds = WeakSubjectivityPeriodSeconds; - type WeightInfo = (); + type WeightInfo = weights::snowbridge_ethereum_beacon_client::WeightInfo; } // Create the runtime by composing the FRAME pallets that were previously configured. diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs index 59f3932ad2b..3ddb50c7a5e 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/mod.rs @@ -37,6 +37,7 @@ pub mod pallet_utility; pub mod pallet_xcm; pub mod paritydb_weights; pub mod rocksdb_weights; +pub mod snowbridge_ethereum_beacon_client; pub mod xcm; pub use block_weights::constants::BlockExecutionWeight; diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs new file mode 100644 index 00000000000..f6bcdbd25cb --- /dev/null +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs @@ -0,0 +1,176 @@ + +//! Autogenerated weights for `snowbridge_ethereum_beacon_client` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-04-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `192.168.0.127`, CPU: `` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/polkadot-parachain +// benchmark +// pallet +// --chain=bridge-hub-rococo-dev +// --pallet=snowbridge_ethereum_beacon_client +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --steps +// 50 +// --repeat +// 20 +// --output +// ./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `snowbridge_ethereum_beacon_client`. +pub struct WeightInfo(PhantomData); +impl snowbridge_ethereum_beacon_client::WeightInfo for WeightInfo { + /// Storage: EthereumBeaconClient Blocked (r:1 w:0) + /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestSyncCommitteePeriod (r:1 w:1) + /// Proof: EthereumBeaconClient LatestSyncCommitteePeriod (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient SyncCommittees (r:2 w:1) + /// Proof: EthereumBeaconClient SyncCommittees (max_values: None, max_size: Some(24634), added: 27109, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconHeaderSlots (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconHeaderSlots (max_values: Some(1), max_size: Some(8002), added: 8497, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestFinalizedHeaderState (r:1 w:1) + /// Proof: EthereumBeaconClient LatestFinalizedHeaderState (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) + /// Storage: Timestamp Now (r:1 w:0) + /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconHeaders (r:0 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconHeaders (max_values: None, max_size: Some(144), added: 2619, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (r:0 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + fn sync_committee_period_update() -> Weight { + // Proof Size summary in bytes: + // Measured: `24964` + // Estimated: `72217` + // Minimum execution time: 76_072_000_000 picoseconds. + Weight::from_parts(76_300_000_000, 0) + .saturating_add(Weight::from_parts(0, 72217)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: EthereumBeaconClient Blocked (r:1 w:0) + /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestFinalizedHeaderState (r:1 w:1) + /// Proof: EthereumBeaconClient LatestFinalizedHeaderState (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) + /// Storage: Timestamp Now (r:1 w:0) + /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient SyncCommittees (r:1 w:0) + /// Proof: EthereumBeaconClient SyncCommittees (max_values: None, max_size: Some(24634), added: 27109, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconHeaderSlots (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconHeaderSlots (max_values: Some(1), max_size: Some(8002), added: 8497, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconHeaders (r:0 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconHeaders (max_values: None, max_size: Some(144), added: 2619, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (r:0 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + fn import_finalized_header() -> Weight { + // Proof Size summary in bytes: + // Measured: `24964` + // Estimated: `43615` + // Minimum execution time: 72_650_000_000 picoseconds. + Weight::from_parts(72_836_000_000, 0) + .saturating_add(Weight::from_parts(0, 43615)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: EthereumBeaconClient Blocked (r:1 w:0) + /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestFinalizedHeaderState (r:1 w:0) + /// Proof: EthereumBeaconClient LatestFinalizedHeaderState (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionHeaderState (r:1 w:1) + /// Proof: EthereumBeaconClient LatestExecutionHeaderState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (r:1 w:0) + /// Proof: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient SyncCommittees (r:1 w:0) + /// Proof: EthereumBeaconClient SyncCommittees (max_values: None, max_size: Some(24634), added: 27109, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaders (r:0 w:1) + /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(188), added: 2663, mode: MaxEncodedLen) + fn import_execution_header() -> Weight { + // Proof Size summary in bytes: + // Measured: `25008` + // Estimated: `37729` + // Minimum execution time: 72_487_000_000 picoseconds. + Weight::from_parts(72_632_000_000, 0) + .saturating_add(Weight::from_parts(0, 37729)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: EthereumBeaconClient Blocked (r:0 w:1) + /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + fn block_bridge() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EthereumBeaconClient Blocked (r:0 w:1) + /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + fn unblock_bridge() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn verify_signed_header() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 75_617_000_000 picoseconds. + Weight::from_parts(76_367_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn bls_aggregate_signature() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 360_000_000 picoseconds. + Weight::from_parts(375_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn bls_aggregate_pubkey() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 57_056_000_000 picoseconds. + Weight::from_parts(57_572_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn bls_verify_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 17_718_000_000 picoseconds. + Weight::from_parts(17_922_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn bls_fast_aggregate_verify() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 75_719_000_000 picoseconds. + Weight::from_parts(75_982_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} From f750ec94dfe1208bc508edb0082f25b25cff14a8 Mon Sep 17 00:00:00 2001 From: ron Date: Fri, 14 Apr 2023 02:57:25 +0000 Subject: [PATCH 5/8] Update weight with benchmark in EC2 instance --- .../snowbridge_ethereum_beacon_client.rs | 178 ++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs new file mode 100644 index 00000000000..394bfeedc90 --- /dev/null +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs @@ -0,0 +1,178 @@ + +//! Autogenerated weights for `snowbridge_ethereum_beacon_client` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-04-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `ip-172-31-8-124`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("bridge-hub-rococo-dev"), DB CACHE: 1024 + +// Executed Command: +// target/release/polkadot-parachain +// benchmark +// pallet +// --base-path +// /mnt/scratch/benchmark +// --chain=bridge-hub-rococo-dev +// --pallet=snowbridge_ethereum_beacon_client +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --steps +// 50 +// --repeat +// 20 +// --output +// ./parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; + +/// Weight functions for `snowbridge_ethereum_beacon_client`. +pub struct WeightInfo(PhantomData); +impl snowbridge_ethereum_beacon_client::WeightInfo for WeightInfo { + /// Storage: EthereumBeaconClient Blocked (r:1 w:0) + /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestSyncCommitteePeriod (r:1 w:1) + /// Proof: EthereumBeaconClient LatestSyncCommitteePeriod (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient SyncCommittees (r:2 w:1) + /// Proof: EthereumBeaconClient SyncCommittees (max_values: None, max_size: Some(24634), added: 27109, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconHeaderSlots (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconHeaderSlots (max_values: Some(1), max_size: Some(8002), added: 8497, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestFinalizedHeaderState (r:1 w:1) + /// Proof: EthereumBeaconClient LatestFinalizedHeaderState (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) + /// Storage: Timestamp Now (r:1 w:0) + /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconHeaders (r:0 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconHeaders (max_values: None, max_size: Some(144), added: 2619, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (r:0 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + fn sync_committee_period_update() -> Weight { + // Proof Size summary in bytes: + // Measured: `24964` + // Estimated: `72217` + // Minimum execution time: 125_394_127_000 picoseconds. + Weight::from_parts(125_431_125_000, 0) + .saturating_add(Weight::from_parts(0, 72217)) + .saturating_add(T::DbWeight::get().reads(8)) + .saturating_add(T::DbWeight::get().writes(6)) + } + /// Storage: EthereumBeaconClient Blocked (r:1 w:0) + /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestFinalizedHeaderState (r:1 w:1) + /// Proof: EthereumBeaconClient LatestFinalizedHeaderState (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) + /// Storage: Timestamp Now (r:1 w:0) + /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient SyncCommittees (r:1 w:0) + /// Proof: EthereumBeaconClient SyncCommittees (max_values: None, max_size: Some(24634), added: 27109, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconHeaderSlots (r:1 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconHeaderSlots (max_values: Some(1), max_size: Some(8002), added: 8497, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconHeaders (r:0 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconHeaders (max_values: None, max_size: Some(144), added: 2619, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (r:0 w:1) + /// Proof: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + fn import_finalized_header() -> Weight { + // Proof Size summary in bytes: + // Measured: `24964` + // Estimated: `43615` + // Minimum execution time: 119_688_074_000 picoseconds. + Weight::from_parts(119_733_837_000, 0) + .saturating_add(Weight::from_parts(0, 43615)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: EthereumBeaconClient Blocked (r:1 w:0) + /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestFinalizedHeaderState (r:1 w:0) + /// Proof: EthereumBeaconClient LatestFinalizedHeaderState (max_values: Some(1), max_size: Some(48), added: 543, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient LatestExecutionHeaderState (r:1 w:1) + /// Proof: EthereumBeaconClient LatestExecutionHeaderState (max_values: Some(1), max_size: Some(80), added: 575, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (r:1 w:0) + /// Proof: EthereumBeaconClient FinalizedBeaconHeadersBlockRoot (max_values: None, max_size: Some(64), added: 2539, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient SyncCommittees (r:1 w:0) + /// Proof: EthereumBeaconClient SyncCommittees (max_values: None, max_size: Some(24634), added: 27109, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ValidatorsRoot (r:1 w:0) + /// Proof: EthereumBeaconClient ValidatorsRoot (max_values: Some(1), max_size: Some(32), added: 527, mode: MaxEncodedLen) + /// Storage: EthereumBeaconClient ExecutionHeaders (r:0 w:1) + /// Proof: EthereumBeaconClient ExecutionHeaders (max_values: None, max_size: Some(188), added: 2663, mode: MaxEncodedLen) + fn import_execution_header() -> Weight { + // Proof Size summary in bytes: + // Measured: `25008` + // Estimated: `37729` + // Minimum execution time: 119_457_513_000 picoseconds. + Weight::from_parts(119_497_745_000, 0) + .saturating_add(Weight::from_parts(0, 37729)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: EthereumBeaconClient Blocked (r:0 w:1) + /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + fn block_bridge() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 13_671_000 picoseconds. + Weight::from_parts(14_126_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: EthereumBeaconClient Blocked (r:0 w:1) + /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) + fn unblock_bridge() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 13_651_000 picoseconds. + Weight::from_parts(13_941_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(1)) + } + fn verify_signed_header() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 123_398_487_000 picoseconds. + Weight::from_parts(123_442_750_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn bls_aggregate_signature() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 602_970_000 picoseconds. + Weight::from_parts(604_848_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn bls_aggregate_pubkey() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 94_456_150_000 picoseconds. + Weight::from_parts(94_487_034_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn bls_verify_message() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 28_358_076_000 picoseconds. + Weight::from_parts(28_368_043_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + fn bls_fast_aggregate_verify() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 123_429_381_000 picoseconds. + Weight::from_parts(123_459_134_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } +} From 0c3fae2434177b861b29e00e83a5ecf5ed3ef2dd Mon Sep 17 00:00:00 2001 From: ron Date: Sat, 15 Apr 2023 09:18:17 +0800 Subject: [PATCH 6/8] Update lock file --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 36ef50f1713..3f4121fa5b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -167,7 +167,6 @@ checksum = "fbf688625d06217d5b1bb0ea9d9c44a1635fd0ee3534466388d18203174f4d11" [[package]] name = "amcl" version = "0.3.0" -source = "git+https://github.com/Snowfork/milagro_bls#bc2b5b5e8d48b7e2e1bfaa56dc2d93e13cb32095" [[package]] name = "anes" @@ -5859,7 +5858,6 @@ dependencies = [ [[package]] name = "milagro_bls" version = "1.5.0" -source = "git+https://github.com/Snowfork/milagro_bls#bc2b5b5e8d48b7e2e1bfaa56dc2d93e13cb32095" dependencies = [ "amcl", "hex", @@ -12347,9 +12345,11 @@ dependencies = [ name = "snowbridge-beacon-primitives" version = "0.0.1" dependencies = [ + "amcl", "frame-support", "frame-system", "hex", + "milagro_bls", "parity-scale-codec", "rlp", "scale-info", From 2270391c95bfe138bd576e1a114564946894825c Mon Sep 17 00:00:00 2001 From: ron Date: Sat, 15 Apr 2023 14:43:21 +0800 Subject: [PATCH 7/8] Update milagro --- Cargo.lock | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 3f4121fa5b4..1ec137af38d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -167,6 +167,7 @@ checksum = "fbf688625d06217d5b1bb0ea9d9c44a1635fd0ee3534466388d18203174f4d11" [[package]] name = "amcl" version = "0.3.0" +source = "git+https://github.com/yrong/milagro_bls?rev=0b00351522096560d8cf1563ad4a0e5df9e3826e#0b00351522096560d8cf1563ad4a0e5df9e3826e" [[package]] name = "anes" @@ -5858,6 +5859,7 @@ dependencies = [ [[package]] name = "milagro_bls" version = "1.5.0" +source = "git+https://github.com/yrong/milagro_bls?rev=0b00351522096560d8cf1563ad4a0e5df9e3826e#0b00351522096560d8cf1563ad4a0e5df9e3826e" dependencies = [ "amcl", "hex", @@ -12345,7 +12347,6 @@ dependencies = [ name = "snowbridge-beacon-primitives" version = "0.0.1" dependencies = [ - "amcl", "frame-support", "frame-system", "hex", From 8d4536a7ddc7005f5fba7b3b10a9366aa82ee3ab Mon Sep 17 00:00:00 2001 From: ron Date: Sat, 15 Apr 2023 20:12:34 +0800 Subject: [PATCH 8/8] Update weights --- Cargo.lock | 5 ++-- .../snowbridge_ethereum_beacon_client.rs | 27 ------------------- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1ec137af38d..36ef50f1713 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -167,7 +167,7 @@ checksum = "fbf688625d06217d5b1bb0ea9d9c44a1635fd0ee3534466388d18203174f4d11" [[package]] name = "amcl" version = "0.3.0" -source = "git+https://github.com/yrong/milagro_bls?rev=0b00351522096560d8cf1563ad4a0e5df9e3826e#0b00351522096560d8cf1563ad4a0e5df9e3826e" +source = "git+https://github.com/Snowfork/milagro_bls#bc2b5b5e8d48b7e2e1bfaa56dc2d93e13cb32095" [[package]] name = "anes" @@ -5859,7 +5859,7 @@ dependencies = [ [[package]] name = "milagro_bls" version = "1.5.0" -source = "git+https://github.com/yrong/milagro_bls?rev=0b00351522096560d8cf1563ad4a0e5df9e3826e#0b00351522096560d8cf1563ad4a0e5df9e3826e" +source = "git+https://github.com/Snowfork/milagro_bls#bc2b5b5e8d48b7e2e1bfaa56dc2d93e13cb32095" dependencies = [ "amcl", "hex", @@ -12350,7 +12350,6 @@ dependencies = [ "frame-support", "frame-system", "hex", - "milagro_bls", "parity-scale-codec", "rlp", "scale-info", diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs index 394bfeedc90..2fa8c874f8d 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/snowbridge_ethereum_beacon_client.rs @@ -115,17 +115,6 @@ impl snowbridge_ethereum_beacon_client::WeightInfo for } /// Storage: EthereumBeaconClient Blocked (r:0 w:1) /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) - fn block_bridge() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 13_671_000 picoseconds. - Weight::from_parts(14_126_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: EthereumBeaconClient Blocked (r:0 w:1) - /// Proof: EthereumBeaconClient Blocked (max_values: Some(1), max_size: Some(1), added: 496, mode: MaxEncodedLen) fn unblock_bridge() -> Weight { // Proof Size summary in bytes: // Measured: `0` @@ -135,22 +124,6 @@ impl snowbridge_ethereum_beacon_client::WeightInfo for .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - fn verify_signed_header() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 123_398_487_000 picoseconds. - Weight::from_parts(123_442_750_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } - fn bls_aggregate_signature() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 602_970_000 picoseconds. - Weight::from_parts(604_848_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - } fn bls_aggregate_pubkey() -> Weight { // Proof Size summary in bytes: // Measured: `0`