From 25c32b82b8e03b50a5b6a9519901e5f517fedb50 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Wed, 8 Jan 2025 16:13:00 +0200 Subject: [PATCH] cleanup --- .../pallets/ethereum-client/src/mock.rs | 10 +- .../snowbridge/primitives/beacon/src/types.rs | 2 +- .../templates/beacon-fixtures.mustache | 270 ------------------ .../templates/inbound-fixtures.mustache | 95 ------ .../templates/module-weight-template.hbs | 74 ----- .../bridges/bridge-hub-westend/src/genesis.rs | 5 - 6 files changed, 5 insertions(+), 451 deletions(-) delete mode 100644 bridges/snowbridge/templates/beacon-fixtures.mustache delete mode 100644 bridges/snowbridge/templates/inbound-fixtures.mustache delete mode 100644 bridges/snowbridge/templates/module-weight-template.hbs diff --git a/bridges/snowbridge/pallets/ethereum-client/src/mock.rs b/bridges/snowbridge/pallets/ethereum-client/src/mock.rs index db376b42a4665..b8b8ec651ebd7 100644 --- a/bridges/snowbridge/pallets/ethereum-client/src/mock.rs +++ b/bridges/snowbridge/pallets/ethereum-client/src/mock.rs @@ -2,9 +2,7 @@ // SPDX-FileCopyrightText: 2023 Snowfork use crate as ethereum_beacon_client; use crate::config; -use frame_support::{ - derive_impl, dispatch::DispatchResult, pallet_prelude::Weight, parameter_types, -}; +use frame_support::{derive_impl, dispatch::DispatchResult, parameter_types}; use pallet_timestamp; use snowbridge_beacon_primitives::{Fork, ForkVersions}; use snowbridge_core::inbound::{Log, Proof}; @@ -95,9 +93,9 @@ pub fn get_message_verification_payload() -> (Log, Proof) { frame_support::construct_runtime!( pub enum Test { - System: frame_system, - EthereumBeaconClient: crate, - Timestamp: pallet_timestamp, + System: frame_system::{Pallet, Call, Storage, Event}, + Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, + EthereumBeaconClient: ethereum_beacon_client::{Pallet, Call, Storage, Event}, } ); diff --git a/bridges/snowbridge/primitives/beacon/src/types.rs b/bridges/snowbridge/primitives/beacon/src/types.rs index e3e33a5274f14..46100e622b233 100644 --- a/bridges/snowbridge/primitives/beacon/src/types.rs +++ b/bridges/snowbridge/primitives/beacon/src/types.rs @@ -576,7 +576,7 @@ pub mod deneb { use sp_std::prelude::*; /// ExecutionPayloadHeader - /// https://github.com/ethereum/consensus-specs/blob/dev/specs/deneb/beacon-chain.md#executionpayloadheader + /// #[derive( Default, Encode, Decode, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound, TypeInfo, )] diff --git a/bridges/snowbridge/templates/beacon-fixtures.mustache b/bridges/snowbridge/templates/beacon-fixtures.mustache deleted file mode 100644 index 5942be056321d..0000000000000 --- a/bridges/snowbridge/templates/beacon-fixtures.mustache +++ /dev/null @@ -1,270 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2023 Snowfork -// Generated, do not edit! -// See README.md for instructions to generate -#![cfg_attr(not(feature = "std"), no_std)] - -use hex_literal::hex; -use snowbridge_beacon_primitives::{ - types::deneb, AncestryProof, BeaconHeader, ExecutionProof, NextSyncCommitteeUpdate, - SyncAggregate, SyncCommittee, VersionedExecutionPayloadHeader, -}; -use snowbridge_core::inbound::{InboundQueueFixture, Log, Message, Proof}; -use sp_core::U256; -use sp_std::{boxed::Box, vec}; - -const SC_SIZE: usize = 512; -const SC_BITS_SIZE: usize = 64; -type CheckpointUpdate = snowbridge_beacon_primitives::CheckpointUpdate; -type Update = snowbridge_beacon_primitives::Update; - - -pub fn make_checkpoint() -> Box { - Box::new(CheckpointUpdate { - header: BeaconHeader { - slot: {{CheckpointUpdate.Header.Slot}}, - proposer_index: {{CheckpointUpdate.Header.ProposerIndex}}, - parent_root: hex!("{{CheckpointUpdate.Header.ParentRoot}}").into(), - state_root: hex!("{{CheckpointUpdate.Header.StateRoot}}").into(), - body_root: hex!("{{CheckpointUpdate.Header.BodyRoot}}").into(), - }, - current_sync_committee: SyncCommittee { - pubkeys: [ - {{#CheckpointUpdate.CurrentSyncCommittee.Pubkeys}} - hex!("{{.}}").into(), - {{/CheckpointUpdate.CurrentSyncCommittee.Pubkeys}} - ], - aggregate_pubkey: hex!("{{CheckpointUpdate.CurrentSyncCommittee.AggregatePubkey}}").into(), - }, - current_sync_committee_branch: vec![ - {{#CheckpointUpdate.CurrentSyncCommitteeBranch}} - hex!("{{.}}").into(), - {{/CheckpointUpdate.CurrentSyncCommitteeBranch}} - ], - validators_root: hex!("{{CheckpointUpdate.ValidatorsRoot}}").into(), - block_roots_root: hex!("{{CheckpointUpdate.BlockRootsRoot}}").into(), - block_roots_branch: vec![ - {{#CheckpointUpdate.BlockRootsBranch}} - hex!("{{.}}").into(), - {{/CheckpointUpdate.BlockRootsBranch}} - ], - }) -} - -pub fn make_sync_committee_update() -> Box { - Box::new(Update { - attested_header: BeaconHeader { - slot: {{SyncCommitteeUpdate.AttestedHeader.Slot}}, - proposer_index: {{SyncCommitteeUpdate.AttestedHeader.ProposerIndex}}, - parent_root: hex!("{{SyncCommitteeUpdate.AttestedHeader.ParentRoot}}").into(), - state_root: hex!("{{SyncCommitteeUpdate.AttestedHeader.StateRoot}}").into(), - body_root: hex!("{{SyncCommitteeUpdate.AttestedHeader.BodyRoot}}").into(), - }, - sync_aggregate: SyncAggregate{ - sync_committee_bits: hex!("{{SyncCommitteeUpdate.SyncAggregate.SyncCommitteeBits}}"), - sync_committee_signature: hex!("{{SyncCommitteeUpdate.SyncAggregate.SyncCommitteeSignature}}").into(), - }, - signature_slot: {{SyncCommitteeUpdate.SignatureSlot}}, - next_sync_committee_update: Some(NextSyncCommitteeUpdate { - next_sync_committee: SyncCommittee { - pubkeys: [ - {{#SyncCommitteeUpdate.NextSyncCommitteeUpdate.NextSyncCommittee.Pubkeys}} - hex!("{{.}}").into(), - {{/SyncCommitteeUpdate.NextSyncCommitteeUpdate.NextSyncCommittee.Pubkeys}} - ], - aggregate_pubkey: hex!("{{SyncCommitteeUpdate.NextSyncCommitteeUpdate.NextSyncCommittee.AggregatePubkey}}").into(), - }, - next_sync_committee_branch: vec![ - {{#SyncCommitteeUpdate.NextSyncCommitteeUpdate.NextSyncCommitteeBranch}} - hex!("{{.}}").into(), - {{/SyncCommitteeUpdate.NextSyncCommitteeUpdate.NextSyncCommitteeBranch}} - ], - }), - finalized_header: BeaconHeader{ - slot: {{SyncCommitteeUpdate.FinalizedHeader.Slot}}, - proposer_index: {{SyncCommitteeUpdate.FinalizedHeader.ProposerIndex}}, - parent_root: hex!("{{SyncCommitteeUpdate.FinalizedHeader.ParentRoot}}").into(), - state_root: hex!("{{SyncCommitteeUpdate.FinalizedHeader.StateRoot}}").into(), - body_root: hex!("{{SyncCommitteeUpdate.FinalizedHeader.BodyRoot}}").into(), - }, - finality_branch: vec![ - {{#SyncCommitteeUpdate.FinalityBranch}} - hex!("{{.}}").into(), - {{/SyncCommitteeUpdate.FinalityBranch}} - ], - block_roots_root: hex!("{{SyncCommitteeUpdate.BlockRootsRoot}}").into(), - block_roots_branch: vec![ - {{#SyncCommitteeUpdate.BlockRootsBranch}} - hex!("{{.}}").into(), - {{/SyncCommitteeUpdate.BlockRootsBranch}} - ], - }) -} - -pub fn make_finalized_header_update() -> Box { - Box::new(Update { - attested_header: BeaconHeader { - slot: {{FinalizedHeaderUpdate.AttestedHeader.Slot}}, - proposer_index: {{FinalizedHeaderUpdate.AttestedHeader.ProposerIndex}}, - parent_root: hex!("{{FinalizedHeaderUpdate.AttestedHeader.ParentRoot}}").into(), - state_root: hex!("{{FinalizedHeaderUpdate.AttestedHeader.StateRoot}}").into(), - body_root: hex!("{{FinalizedHeaderUpdate.AttestedHeader.BodyRoot}}").into(), - }, - sync_aggregate: SyncAggregate{ - sync_committee_bits: hex!("{{FinalizedHeaderUpdate.SyncAggregate.SyncCommitteeBits}}"), - sync_committee_signature: hex!("{{FinalizedHeaderUpdate.SyncAggregate.SyncCommitteeSignature}}").into(), - }, - signature_slot: {{FinalizedHeaderUpdate.SignatureSlot}}, - next_sync_committee_update: None, - finalized_header: BeaconHeader { - slot: {{FinalizedHeaderUpdate.FinalizedHeader.Slot}}, - proposer_index: {{FinalizedHeaderUpdate.FinalizedHeader.ProposerIndex}}, - parent_root: hex!("{{FinalizedHeaderUpdate.FinalizedHeader.ParentRoot}}").into(), - state_root: hex!("{{FinalizedHeaderUpdate.FinalizedHeader.StateRoot}}").into(), - body_root: hex!("{{FinalizedHeaderUpdate.FinalizedHeader.BodyRoot}}").into(), - }, - finality_branch: vec![ - {{#FinalizedHeaderUpdate.FinalityBranch}} - hex!("{{.}}").into(), - {{/FinalizedHeaderUpdate.FinalityBranch}} - ], - block_roots_root: hex!("{{FinalizedHeaderUpdate.BlockRootsRoot}}").into(), - block_roots_branch: vec![ - {{#FinalizedHeaderUpdate.BlockRootsBranch}} - hex!("{{.}}").into(), - {{/FinalizedHeaderUpdate.BlockRootsBranch}} - ] - }) -} - -pub fn make_execution_proof() -> Box { - Box::new(ExecutionProof { - header: BeaconHeader { - slot: {{HeaderUpdate.Header.Slot}}, - proposer_index: {{HeaderUpdate.Header.ProposerIndex}}, - parent_root: hex!("{{HeaderUpdate.Header.ParentRoot}}").into(), - state_root: hex!("{{HeaderUpdate.Header.StateRoot}}").into(), - body_root: hex!("{{HeaderUpdate.Header.BodyRoot}}").into(), - }, - {{#HeaderUpdate.AncestryProof}} - ancestry_proof: Some(AncestryProof { - header_branch: vec![ - {{#HeaderUpdate.AncestryProof.HeaderBranch}} - hex!("{{.}}").into(), - {{/HeaderUpdate.AncestryProof.HeaderBranch}} - ], - finalized_block_root: hex!("{{HeaderUpdate.AncestryProof.FinalizedBlockRoot}}").into(), - }), - {{/HeaderUpdate.AncestryProof}} - {{^HeaderUpdate.AncestryProof}} - ancestry_proof: None, - {{/HeaderUpdate.AncestryProof}} - execution_header: VersionedExecutionPayloadHeader::Deneb(deneb::ExecutionPayloadHeader { - parent_hash: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.ParentHash}}").into(), - fee_recipient: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.FeeRecipient}}").into(), - state_root: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.StateRoot}}").into(), - receipts_root: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.ReceiptsRoot}}").into(), - logs_bloom: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.LogsBloom}}").into(), - prev_randao: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.PrevRandao}}").into(), - block_number: {{HeaderUpdate.ExecutionHeader.Deneb.BlockNumber}}, - gas_limit: {{HeaderUpdate.ExecutionHeader.Deneb.GasLimit}}, - gas_used: {{HeaderUpdate.ExecutionHeader.Deneb.GasUsed}}, - timestamp: {{HeaderUpdate.ExecutionHeader.Deneb.Timestamp}}, - extra_data: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.ExtraData}}").into(), - base_fee_per_gas: U256::from({{HeaderUpdate.ExecutionHeader.Deneb.BaseFeePerGas}}u64), - block_hash: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.BlockHash}}").into(), - transactions_root: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.TransactionsRoot}}").into(), - withdrawals_root: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.WithdrawalsRoot}}").into(), - blob_gas_used: {{HeaderUpdate.ExecutionHeader.Deneb.BlobGasUsed}}, - excess_blob_gas: {{HeaderUpdate.ExecutionHeader.Deneb.ExcessBlobGas}}, - }), - execution_branch: vec![ - {{#HeaderUpdate.ExecutionBranch}} - hex!("{{.}}").into(), - {{/HeaderUpdate.ExecutionBranch}} - ], - }) -} - -pub fn make_inbound_fixture() -> InboundQueueFixture { - InboundQueueFixture { - message: Message { - event_log: Log { - address: hex!("{{InboundMessage.EventLog.Address}}").into(), - topics: vec![ - {{#InboundMessage.EventLog.Topics}} - hex!("{{.}}").into(), - {{/InboundMessage.EventLog.Topics}} - ], - data: hex!("{{InboundMessage.EventLog.Data}}").into(), - }, - proof: Proof { - block_hash: hex!("{{InboundMessage.Proof.BlockHash}}").into(), - tx_index: {{InboundMessage.Proof.TxIndex}}, - receipt_proof: (vec![ - {{#InboundMessage.Proof.ReceiptProof.Keys}} - hex!("{{.}}").to_vec(), - {{/InboundMessage.Proof.ReceiptProof.Keys}} - ], vec![ - {{#InboundMessage.Proof.ReceiptProof.Values}} - hex!("{{.}}").to_vec(), - {{/InboundMessage.Proof.ReceiptProof.Values}} - ]), - execution_proof: ExecutionProof { - header: BeaconHeader { - slot: {{HeaderUpdate.Header.Slot}}, - proposer_index: {{HeaderUpdate.Header.ProposerIndex}}, - parent_root: hex!("{{HeaderUpdate.Header.ParentRoot}}").into(), - state_root: hex!("{{HeaderUpdate.Header.StateRoot}}").into(), - body_root: hex!("{{HeaderUpdate.Header.BodyRoot}}").into(), - }, - {{#HeaderUpdate.AncestryProof}} - ancestry_proof: Some(AncestryProof { - header_branch: vec![ - {{#HeaderUpdate.AncestryProof.HeaderBranch}} - hex!("{{.}}").into(), - {{/HeaderUpdate.AncestryProof.HeaderBranch}} - ], - finalized_block_root: hex!("{{HeaderUpdate.AncestryProof.FinalizedBlockRoot}}").into(), - }), - {{/HeaderUpdate.AncestryProof}} - {{^HeaderUpdate.AncestryProof}} - ancestry_proof: None, - {{/HeaderUpdate.AncestryProof}} - execution_header: VersionedExecutionPayloadHeader::Deneb(deneb::ExecutionPayloadHeader { - parent_hash: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.ParentHash}}").into(), - fee_recipient: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.FeeRecipient}}").into(), - state_root: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.StateRoot}}").into(), - receipts_root: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.ReceiptsRoot}}").into(), - logs_bloom: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.LogsBloom}}").into(), - prev_randao: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.PrevRandao}}").into(), - block_number: {{HeaderUpdate.ExecutionHeader.Deneb.BlockNumber}}, - gas_limit: {{HeaderUpdate.ExecutionHeader.Deneb.GasLimit}}, - gas_used: {{HeaderUpdate.ExecutionHeader.Deneb.GasUsed}}, - timestamp: {{HeaderUpdate.ExecutionHeader.Deneb.Timestamp}}, - extra_data: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.ExtraData}}").into(), - base_fee_per_gas: U256::from({{HeaderUpdate.ExecutionHeader.Deneb.BaseFeePerGas}}u64), - block_hash: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.BlockHash}}").into(), - transactions_root: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.TransactionsRoot}}").into(), - withdrawals_root: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.WithdrawalsRoot}}").into(), - blob_gas_used: {{HeaderUpdate.ExecutionHeader.Deneb.BlobGasUsed}}, - excess_blob_gas: {{HeaderUpdate.ExecutionHeader.Deneb.ExcessBlobGas}}, - }), - execution_branch: vec![ - {{#HeaderUpdate.ExecutionBranch}} - hex!("{{.}}").into(), - {{/HeaderUpdate.ExecutionBranch}} - ], - } - }, - }, - finalized_header: BeaconHeader { - slot: {{FinalizedHeaderUpdate.FinalizedHeader.Slot}}, - proposer_index: {{FinalizedHeaderUpdate.FinalizedHeader.ProposerIndex}}, - parent_root: hex!("{{FinalizedHeaderUpdate.FinalizedHeader.ParentRoot}}").into(), - state_root: hex!("{{FinalizedHeaderUpdate.FinalizedHeader.StateRoot}}").into(), - body_root: hex!("{{FinalizedHeaderUpdate.FinalizedHeader.BodyRoot}}").into(), - }, - block_roots_root: hex!("{{FinalizedHeaderUpdate.BlockRootsRoot}}").into(), - } -} diff --git a/bridges/snowbridge/templates/inbound-fixtures.mustache b/bridges/snowbridge/templates/inbound-fixtures.mustache deleted file mode 100644 index b35a263fda02e..0000000000000 --- a/bridges/snowbridge/templates/inbound-fixtures.mustache +++ /dev/null @@ -1,95 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2023 Snowfork -// Generated, do not edit! -// See ethereum client README.md for instructions to generate - -use hex_literal::hex; -use snowbridge_beacon_primitives::{ -types::deneb, AncestryProof, BeaconHeader, ExecutionProof, VersionedExecutionPayloadHeader, -}; -use snowbridge_core::inbound::{InboundQueueFixture, Log, Message, Proof}; -use sp_core::U256; -use sp_std::vec; - -pub fn make_{{TestCase}}_message() -> InboundQueueFixture { - InboundQueueFixture { - message: Message { - event_log: Log { - address: hex!("{{InboundMessage.EventLog.Address}}").into(), - topics: vec![ - {{#InboundMessage.EventLog.Topics}} - hex!("{{.}}").into(), - {{/InboundMessage.EventLog.Topics}} - ], - data: hex!("{{InboundMessage.EventLog.Data}}").into(), - }, - proof: Proof { - block_hash: hex!("{{InboundMessage.Proof.BlockHash}}").into(), - tx_index: {{InboundMessage.Proof.TxIndex}}, - receipt_proof: (vec![ - {{#InboundMessage.Proof.ReceiptProof.Keys}} - hex!("{{.}}").to_vec(), - {{/InboundMessage.Proof.ReceiptProof.Keys}} - ], vec![ - {{#InboundMessage.Proof.ReceiptProof.Values}} - hex!("{{.}}").to_vec(), - {{/InboundMessage.Proof.ReceiptProof.Values}} - ]), - execution_proof: ExecutionProof { - header: BeaconHeader { - slot: {{HeaderUpdate.Header.Slot}}, - proposer_index: {{HeaderUpdate.Header.ProposerIndex}}, - parent_root: hex!("{{HeaderUpdate.Header.ParentRoot}}").into(), - state_root: hex!("{{HeaderUpdate.Header.StateRoot}}").into(), - body_root: hex!("{{HeaderUpdate.Header.BodyRoot}}").into(), - }, - {{#HeaderUpdate.AncestryProof}} - ancestry_proof: Some(AncestryProof { - header_branch: vec![ - {{#HeaderUpdate.AncestryProof.HeaderBranch}} - hex!("{{.}}").into(), - {{/HeaderUpdate.AncestryProof.HeaderBranch}} - ], - finalized_block_root: hex!("{{HeaderUpdate.AncestryProof.FinalizedBlockRoot}}").into(), - }), - {{/HeaderUpdate.AncestryProof}} - {{^HeaderUpdate.AncestryProof}} - ancestry_proof: None, - {{/HeaderUpdate.AncestryProof}} - execution_header: VersionedExecutionPayloadHeader::Deneb(deneb::ExecutionPayloadHeader { - parent_hash: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.ParentHash}}").into(), - fee_recipient: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.FeeRecipient}}").into(), - state_root: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.StateRoot}}").into(), - receipts_root: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.ReceiptsRoot}}").into(), - logs_bloom: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.LogsBloom}}").into(), - prev_randao: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.PrevRandao}}").into(), - block_number: {{HeaderUpdate.ExecutionHeader.Deneb.BlockNumber}}, - gas_limit: {{HeaderUpdate.ExecutionHeader.Deneb.GasLimit}}, - gas_used: {{HeaderUpdate.ExecutionHeader.Deneb.GasUsed}}, - timestamp: {{HeaderUpdate.ExecutionHeader.Deneb.Timestamp}}, - extra_data: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.ExtraData}}").into(), - base_fee_per_gas: U256::from({{HeaderUpdate.ExecutionHeader.Deneb.BaseFeePerGas}}u64), - block_hash: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.BlockHash}}").into(), - transactions_root: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.TransactionsRoot}}").into(), - withdrawals_root: hex!("{{HeaderUpdate.ExecutionHeader.Deneb.WithdrawalsRoot}}").into(), - blob_gas_used: {{HeaderUpdate.ExecutionHeader.Deneb.BlobGasUsed}}, - excess_blob_gas: {{HeaderUpdate.ExecutionHeader.Deneb.ExcessBlobGas}}, - }), - execution_branch: vec![ - {{#HeaderUpdate.ExecutionBranch}} - hex!("{{.}}").into(), - {{/HeaderUpdate.ExecutionBranch}} - ], - } - }, - }, - finalized_header: BeaconHeader { - slot: {{FinalizedHeaderUpdate.FinalizedHeader.Slot}}, - proposer_index: {{FinalizedHeaderUpdate.FinalizedHeader.ProposerIndex}}, - parent_root: hex!("{{FinalizedHeaderUpdate.FinalizedHeader.ParentRoot}}").into(), - state_root: hex!("{{FinalizedHeaderUpdate.FinalizedHeader.StateRoot}}").into(), - body_root: hex!("{{FinalizedHeaderUpdate.FinalizedHeader.BodyRoot}}").into(), - }, - block_roots_root: hex!("{{FinalizedHeaderUpdate.BlockRootsRoot}}").into(), - } -} diff --git a/bridges/snowbridge/templates/module-weight-template.hbs b/bridges/snowbridge/templates/module-weight-template.hbs deleted file mode 100644 index 5919a7cc7c148..0000000000000 --- a/bridges/snowbridge/templates/module-weight-template.hbs +++ /dev/null @@ -1,74 +0,0 @@ -{{header}} -//! Autogenerated weights for `{{pallet}}` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}} -//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: `{{cmd.repeat}}`, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}` -//! WORST CASE MAP SIZE: `{{cmd.worst_case_map_values}}` -//! HOSTNAME: `{{hostname}}`, CPU: `{{cpuname}}` -//! WASM-EXECUTION: `{{cmd.wasm_execution}}`, CHAIN: `{{cmd.chain}}`, DB CACHE: `{{cmd.db_cache}}` - -// Executed Command: -{{#each args as |arg|}} -// {{arg}} -{{/each}} - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; -use core::marker::PhantomData; - -/// Weight functions needed for `{{pallet}}`. -pub trait WeightInfo { - {{#each benchmarks as |benchmark|}} - fn {{benchmark.name~}} - ( - {{~#each benchmark.components as |c| ~}} - {{c.name}}: u32, {{/each~}} - ) -> Weight; - {{/each}} -} - -// For backwards compatibility and tests. -impl WeightInfo for () { - {{#each benchmarks as |benchmark|}} - {{#each benchmark.comments as |comment|}} - /// {{comment}} - {{/each}} - {{#each benchmark.component_ranges as |range|}} - /// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`. - {{/each}} - fn {{benchmark.name~}} - ( - {{~#each benchmark.components as |c| ~}} - {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} - ) -> Weight { - // Proof Size summary in bytes: - // Measured: `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}` - // Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}` - // Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds. - Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}}) - {{#each benchmark.component_weight as |cw|}} - // Standard Error: {{underscore cw.error}} - .saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into())) - {{/each}} - {{#if (ne benchmark.base_reads "0")}} - .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}_u64)) - {{/if}} - {{#each benchmark.component_reads as |cr|}} - .saturating_add(RocksDbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into()))) - {{/each}} - {{#if (ne benchmark.base_writes "0")}} - .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}}_u64)) - {{/if}} - {{#each benchmark.component_writes as |cw|}} - .saturating_add(RocksDbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into()))) - {{/each}} - {{#each benchmark.component_calculated_proof_size as |cp|}} - .saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into())) - {{/each}} - } - {{/each}} -} diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/src/genesis.rs b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/src/genesis.rs index 7d384097e9712..eb4623084f85e 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/src/genesis.rs +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/src/genesis.rs @@ -87,11 +87,6 @@ pub fn genesis() -> Storage { asset_hub_para_id: ASSETHUB_PARA_ID.into(), ..Default::default() }, - ethereum_system: bridge_hub_westend_runtime::EthereumSystemConfig { - para_id: PARA_ID.into(), - asset_hub_para_id: ASSETHUB_PARA_ID.into(), - ..Default::default() - }, ..Default::default() };