From 2b6b69641ccff4d7aa9c32051bbb2f1e775ef8cc Mon Sep 17 00:00:00 2001
From: Cyrill Leutwiler <cyrill@parity.io>
Date: Wed, 30 Oct 2024 22:56:40 +0100
Subject: [PATCH] [pallet-revive] implement the block hash API (#6246)

- Bound T::Hash to H256
- Implement the block hash API

---------

Signed-off-by: xermicus <cyrill@parity.io>
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
Co-authored-by: command-bot <>
Co-authored-by: GitHub Action <action@github.com>
---
 prdoc/pr_6246.prdoc                           |  13 +
 .../revive/fixtures/contracts/block_hash.rs   |  37 +
 .../revive/src/benchmarking/call_builder.rs   |   4 +-
 .../frame/revive/src/benchmarking/mod.rs      |  27 +
 substrate/frame/revive/src/evm/runtime.rs     |   4 +-
 substrate/frame/revive/src/exec.rs            |  86 +-
 substrate/frame/revive/src/lib.rs             |   3 +
 substrate/frame/revive/src/tests.rs           |  25 +
 substrate/frame/revive/src/wasm/mod.rs        |  15 +-
 substrate/frame/revive/src/wasm/runtime.rs    |  24 +
 substrate/frame/revive/src/weights.rs         | 825 +++++++++---------
 substrate/frame/revive/uapi/src/host.rs       |   8 +
 .../frame/revive/uapi/src/host/riscv32.rs     |   5 +
 13 files changed, 664 insertions(+), 412 deletions(-)
 create mode 100644 prdoc/pr_6246.prdoc
 create mode 100644 substrate/frame/revive/fixtures/contracts/block_hash.rs

diff --git a/prdoc/pr_6246.prdoc b/prdoc/pr_6246.prdoc
new file mode 100644
index 00000000000..3fc268749f3
--- /dev/null
+++ b/prdoc/pr_6246.prdoc
@@ -0,0 +1,13 @@
+title: '[pallet-revive] implement the block hash API'
+doc:
+- audience: Runtime Dev
+  description: |-
+    - Bound T::Hash to H256
+    - Implement the block hash API
+crates:
+- name: pallet-revive
+  bump: major
+- name: pallet-revive-fixtures
+  bump: major
+- name: pallet-revive-uapi
+  bump: major
diff --git a/substrate/frame/revive/fixtures/contracts/block_hash.rs b/substrate/frame/revive/fixtures/contracts/block_hash.rs
new file mode 100644
index 00000000000..1331c460146
--- /dev/null
+++ b/substrate/frame/revive/fixtures/contracts/block_hash.rs
@@ -0,0 +1,37 @@
+// This file is part of Substrate.
+
+// Copyright (C) Parity Technologies (UK) Ltd.
+// SPDX-License-Identifier: Apache-2.0
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 	http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#![no_std]
+#![no_main]
+
+use common::input;
+use uapi::{HostFn, HostFnImpl as api};
+
+#[no_mangle]
+#[polkavm_derive::polkavm_export]
+pub extern "C" fn deploy() {}
+
+#[no_mangle]
+#[polkavm_derive::polkavm_export]
+pub extern "C" fn call() {
+	input!(block_number: &[u8; 32], block_hash: &[u8; 32],);
+
+	let mut buf = [0; 32];
+	api::block_hash(block_number, &mut &mut buf);
+
+	assert_eq!(&buf[..], block_hash);
+}
diff --git a/substrate/frame/revive/src/benchmarking/call_builder.rs b/substrate/frame/revive/src/benchmarking/call_builder.rs
index 8a859a3a508..c666383abb2 100644
--- a/substrate/frame/revive/src/benchmarking/call_builder.rs
+++ b/substrate/frame/revive/src/benchmarking/call_builder.rs
@@ -26,7 +26,7 @@ use crate::{
 };
 use alloc::{vec, vec::Vec};
 use frame_benchmarking::benchmarking;
-use sp_core::U256;
+use sp_core::{H256, U256};
 
 type StackExt<'a, T> = Stack<'a, T, WasmBlob<T>>;
 
@@ -48,6 +48,7 @@ where
 	T: Config + pallet_balances::Config,
 	BalanceOf<T>: Into<U256> + TryFrom<U256>,
 	MomentOf<T>: Into<U256>,
+	T::Hash: frame_support::traits::IsType<H256>,
 {
 	fn default() -> Self {
 		Self::new(WasmModule::dummy())
@@ -59,6 +60,7 @@ where
 	T: Config + pallet_balances::Config,
 	BalanceOf<T>: Into<U256> + TryFrom<U256>,
 	MomentOf<T>: Into<U256>,
+	T::Hash: frame_support::traits::IsType<H256>,
 {
 	/// Setup a new call for the given module.
 	pub fn new(module: WasmModule) -> Self {
diff --git a/substrate/frame/revive/src/benchmarking/mod.rs b/substrate/frame/revive/src/benchmarking/mod.rs
index 1ca4f4e1fb8..dd7e52327b6 100644
--- a/substrate/frame/revive/src/benchmarking/mod.rs
+++ b/substrate/frame/revive/src/benchmarking/mod.rs
@@ -71,6 +71,7 @@ where
 	T: Config + pallet_balances::Config,
 	BalanceOf<T>: Into<U256> + TryFrom<U256>,
 	MomentOf<T>: Into<U256>,
+	T::Hash: frame_support::traits::IsType<H256>,
 {
 	/// Create new contract and use a default account id as instantiator.
 	fn new(module: WasmModule, data: Vec<u8>) -> Result<Contract<T>, &'static str> {
@@ -224,6 +225,7 @@ fn default_deposit_limit<T: Config>() -> BalanceOf<T> {
 		<T as frame_system::Config>::RuntimeEvent: From<pallet::Event<T>>,
 		<T as Config>::RuntimeCall: From<frame_system::Call<T>>,
 		<pallet_balances::Pallet<T> as Currency<T::AccountId>>::Balance: From<BalanceOf<T>>,
+		<T as frame_system::Config>::Hash: frame_support::traits::IsType<H256>,
 )]
 mod benchmarks {
 	use super::*;
@@ -783,6 +785,31 @@ mod benchmarks {
 		assert_eq!(U256::from_little_endian(&memory[..]), runtime.ext().block_number());
 	}
 
+	#[benchmark(pov_mode = Measured)]
+	fn seal_block_hash() {
+		let mut memory = vec![0u8; 64];
+		let mut setup = CallSetup::<T>::default();
+		let input = setup.data();
+		let (mut ext, _) = setup.ext();
+		ext.set_block_number(BlockNumberFor::<T>::from(1u32));
+
+		let mut runtime = crate::wasm::Runtime::<_, [u8]>::new(&mut ext, input);
+
+		let block_hash = H256::from([1; 32]);
+		frame_system::BlockHash::<T>::insert(
+			&BlockNumberFor::<T>::from(0u32),
+			T::Hash::from(block_hash),
+		);
+
+		let result;
+		#[block]
+		{
+			result = runtime.bench_block_hash(memory.as_mut_slice(), 32, 0);
+		}
+		assert_ok!(result);
+		assert_eq!(&memory[..32], &block_hash.0);
+	}
+
 	#[benchmark(pov_mode = Measured)]
 	fn seal_now() {
 		build_runtime!(runtime, memory: [[0u8;32], ]);
diff --git a/substrate/frame/revive/src/evm/runtime.rs b/substrate/frame/revive/src/evm/runtime.rs
index bb076da3b3a..6db3f43857e 100644
--- a/substrate/frame/revive/src/evm/runtime.rs
+++ b/substrate/frame/revive/src/evm/runtime.rs
@@ -27,7 +27,7 @@ use frame_support::{
 use pallet_transaction_payment::OnChargeTransaction;
 use scale_info::{StaticTypeInfo, TypeInfo};
 use sp_arithmetic::Percent;
-use sp_core::{Get, U256};
+use sp_core::{Get, H256, U256};
 use sp_runtime::{
 	generic::{self, CheckedExtrinsic, ExtrinsicFormat},
 	traits::{
@@ -121,6 +121,7 @@ where
 	BalanceOf<E::Config>: Into<U256> + TryFrom<U256>,
 	MomentOf<E::Config>: Into<U256>,
 	CallOf<E::Config>: From<crate::Call<E::Config>> + TryInto<crate::Call<E::Config>>,
+	<E::Config as frame_system::Config>::Hash: frame_support::traits::IsType<H256>,
 
 	// required by Checkable for `generic::UncheckedExtrinsic`
 	LookupSource: Member + MaybeDisplay,
@@ -290,6 +291,7 @@ pub trait EthExtra {
 		<Self::Config as frame_system::Config>::RuntimeCall: Dispatchable<Info = DispatchInfo>,
 		OnChargeTransactionBalanceOf<Self::Config>: Into<BalanceOf<Self::Config>>,
 		CallOf<Self::Config>: From<crate::Call<Self::Config>>,
+		<Self::Config as frame_system::Config>::Hash: frame_support::traits::IsType<H256>,
 	{
 		let tx = rlp::decode::<TransactionLegacySigned>(&payload).map_err(|err| {
 			log::debug!(target: LOG_TARGET, "Failed to decode transaction: {err:?}");
diff --git a/substrate/frame/revive/src/exec.rs b/substrate/frame/revive/src/exec.rs
index af11a6c43fb..4b7198d570c 100644
--- a/substrate/frame/revive/src/exec.rs
+++ b/substrate/frame/revive/src/exec.rs
@@ -53,7 +53,7 @@ use sp_core::{
 };
 use sp_io::{crypto::secp256k1_ecdsa_recover_compressed, hashing::blake2_256};
 use sp_runtime::{
-	traits::{BadOrigin, Convert, Dispatchable, Zero},
+	traits::{BadOrigin, Convert, Dispatchable, Saturating, Zero},
 	DispatchError, SaturatedConversion,
 };
 
@@ -356,6 +356,10 @@ pub trait Ext: sealing::Sealed {
 	/// Returns the current block number.
 	fn block_number(&self) -> U256;
 
+	/// Returns the block hash at the given `block_number` or `None` if
+	/// `block_number` isn't within the range of the previous 256 blocks.
+	fn block_hash(&self, block_number: U256) -> Option<H256>;
+
 	/// Returns the maximum allowed size of a storage item.
 	fn max_value_size(&self) -> u32;
 
@@ -739,6 +743,7 @@ where
 	BalanceOf<T>: Into<U256> + TryFrom<U256>,
 	MomentOf<T>: Into<U256>,
 	E: Executable<T>,
+	T::Hash: frame_support::traits::IsType<H256>,
 {
 	/// Create and run a new call stack by calling into `dest`.
 	///
@@ -1329,6 +1334,24 @@ where
 	pub(crate) fn override_export(&mut self, export: ExportedFunction) {
 		self.top_frame_mut().entry_point = export;
 	}
+
+	#[cfg(all(feature = "runtime-benchmarks", feature = "riscv"))]
+	pub(crate) fn set_block_number(&mut self, block_number: BlockNumberFor<T>) {
+		self.block_number = block_number;
+	}
+
+	fn block_hash(&self, block_number: U256) -> Option<H256> {
+		let Ok(block_number) = BlockNumberFor::<T>::try_from(block_number) else {
+			return None;
+		};
+		if block_number >= self.block_number {
+			return None;
+		}
+		if block_number < self.block_number.saturating_sub(256u32.into()) {
+			return None;
+		}
+		Some(System::<T>::block_hash(&block_number).into())
+	}
 }
 
 impl<'a, T, E> Ext for Stack<'a, T, E>
@@ -1337,6 +1360,7 @@ where
 	E: Executable<T>,
 	BalanceOf<T>: Into<U256> + TryFrom<U256>,
 	MomentOf<T>: Into<U256>,
+	T::Hash: frame_support::traits::IsType<H256>,
 {
 	type T = T;
 
@@ -1648,6 +1672,10 @@ where
 		self.block_number.into()
 	}
 
+	fn block_hash(&self, block_number: U256) -> Option<H256> {
+		self.block_hash(block_number)
+	}
+
 	fn max_value_size(&self) -> u32 {
 		limits::PAYLOAD_BYTES
 	}
@@ -4753,4 +4781,60 @@ mod tests {
 				.unwrap()
 			});
 	}
+
+	#[test]
+	fn block_hash_returns_proper_values() {
+		let bob_code_hash = MockLoader::insert(Call, |ctx, _| {
+			ctx.ext.block_number = 1u32.into();
+			assert_eq!(ctx.ext.block_hash(U256::from(1)), None);
+			assert_eq!(ctx.ext.block_hash(U256::from(0)), Some(H256::from([1; 32])));
+
+			ctx.ext.block_number = 300u32.into();
+			assert_eq!(ctx.ext.block_hash(U256::from(300)), None);
+			assert_eq!(ctx.ext.block_hash(U256::from(43)), None);
+			assert_eq!(ctx.ext.block_hash(U256::from(44)), Some(H256::from([2; 32])));
+
+			exec_success()
+		});
+
+		ExtBuilder::default().build().execute_with(|| {
+			frame_system::BlockHash::<Test>::insert(
+				&BlockNumberFor::<Test>::from(0u32),
+				<tests::Test as frame_system::Config>::Hash::from([1; 32]),
+			);
+			frame_system::BlockHash::<Test>::insert(
+				&BlockNumberFor::<Test>::from(1u32),
+				<tests::Test as frame_system::Config>::Hash::default(),
+			);
+			frame_system::BlockHash::<Test>::insert(
+				&BlockNumberFor::<Test>::from(43u32),
+				<tests::Test as frame_system::Config>::Hash::default(),
+			);
+			frame_system::BlockHash::<Test>::insert(
+				&BlockNumberFor::<Test>::from(44u32),
+				<tests::Test as frame_system::Config>::Hash::from([2; 32]),
+			);
+			frame_system::BlockHash::<Test>::insert(
+				&BlockNumberFor::<Test>::from(300u32),
+				<tests::Test as frame_system::Config>::Hash::default(),
+			);
+
+			place_contract(&BOB, bob_code_hash);
+
+			let origin = Origin::from_account_id(ALICE);
+			let mut storage_meter = storage::meter::Meter::new(&origin, 0, 0).unwrap();
+			assert_matches!(
+				MockStack::run_call(
+					origin,
+					BOB_ADDR,
+					&mut GasMeter::<Test>::new(GAS_LIMIT),
+					&mut storage_meter,
+					0,
+					vec![0],
+					None,
+				),
+				Ok(_)
+			);
+		});
+	}
 }
diff --git a/substrate/frame/revive/src/lib.rs b/substrate/frame/revive/src/lib.rs
index 164ffcf7a49..d50da45fc3a 100644
--- a/substrate/frame/revive/src/lib.rs
+++ b/substrate/frame/revive/src/lib.rs
@@ -755,6 +755,7 @@ pub mod pallet {
 	where
 		BalanceOf<T>: Into<U256> + TryFrom<U256>,
 		MomentOf<T>: Into<U256>,
+		T::Hash: frame_support::traits::IsType<H256>,
 	{
 		/// A raw EVM transaction, typically dispatched by an Ethereum JSON-RPC server.
 		///
@@ -1077,6 +1078,7 @@ impl<T: Config> Pallet<T>
 where
 	BalanceOf<T>: Into<U256> + TryFrom<U256>,
 	MomentOf<T>: Into<U256>,
+	T::Hash: frame_support::traits::IsType<H256>,
 {
 	/// A generalized version of [`Self::call`].
 	///
@@ -1236,6 +1238,7 @@ where
 		<T as Config>::RuntimeCall: Encode,
 		OnChargeTransactionBalanceOf<T>: Into<BalanceOf<T>>,
 		T::Nonce: Into<U256>,
+		T::Hash: frame_support::traits::IsType<H256>,
 	{
 		// Get the nonce to encode in the tx.
 		let nonce: T::Nonce = <System<T>>::account_nonce(&origin);
diff --git a/substrate/frame/revive/src/tests.rs b/substrate/frame/revive/src/tests.rs
index 47f1377f467..7ce2e3d9bf3 100644
--- a/substrate/frame/revive/src/tests.rs
+++ b/substrate/frame/revive/src/tests.rs
@@ -4624,4 +4624,29 @@ mod run_tests {
 			assert_eq!(<Test as Config>::Currency::total_balance(&EVE), 1_100);
 		});
 	}
+
+	#[test]
+	fn block_hash_works() {
+		let (code, _) = compile_module("block_hash").unwrap();
+
+		ExtBuilder::default().existential_deposit(1).build().execute_with(|| {
+			let _ = <Test as Config>::Currency::set_balance(&ALICE, 1_000_000);
+
+			let Contract { addr, .. } =
+				builder::bare_instantiate(Code::Upload(code)).build_and_unwrap_contract();
+
+			// The genesis config sets to the block number to 1
+			let block_hash = [1; 32];
+			frame_system::BlockHash::<Test>::insert(
+				&crate::BlockNumberFor::<Test>::from(0u32),
+				<Test as frame_system::Config>::Hash::from(&block_hash),
+			);
+			assert_ok!(builder::call(addr)
+				.data((U256::zero(), H256::from(block_hash)).encode())
+				.build());
+
+			// A block number out of range returns the zero value
+			assert_ok!(builder::call(addr).data((U256::from(1), H256::zero()).encode()).build());
+		});
+	}
 }
diff --git a/substrate/frame/revive/src/wasm/mod.rs b/substrate/frame/revive/src/wasm/mod.rs
index 66844dbf114..6779f551113 100644
--- a/substrate/frame/revive/src/wasm/mod.rs
+++ b/substrate/frame/revive/src/wasm/mod.rs
@@ -48,7 +48,7 @@ use frame_support::{
 	ensure,
 	traits::{fungible::MutateHold, tokens::Precision::BestEffort},
 };
-use sp_core::{Get, U256};
+use sp_core::{Get, H256, U256};
 use sp_runtime::DispatchError;
 
 /// Validated Wasm module ready for execution.
@@ -63,7 +63,7 @@ pub struct WasmBlob<T: Config> {
 	code_info: CodeInfo<T>,
 	// This is for not calculating the hash every time we need it.
 	#[codec(skip)]
-	code_hash: sp_core::H256,
+	code_hash: H256,
 }
 
 /// Contract code related data, such as:
@@ -147,14 +147,14 @@ where
 			api_version: API_VERSION,
 			behaviour_version: Default::default(),
 		};
-		let code_hash = sp_core::H256(sp_io::hashing::keccak_256(&code));
+		let code_hash = H256(sp_io::hashing::keccak_256(&code));
 		Ok(WasmBlob { code, code_info, code_hash })
 	}
 
 	/// Remove the code from storage and refund the deposit to its owner.
 	///
 	/// Applies all necessary checks before removing the code.
-	pub fn remove(origin: &T::AccountId, code_hash: sp_core::H256) -> DispatchResult {
+	pub fn remove(origin: &T::AccountId, code_hash: H256) -> DispatchResult {
 		<CodeInfoOf<T>>::try_mutate_exists(&code_hash, |existing| {
 			if let Some(code_info) = existing {
 				ensure!(code_info.refcount == 0, <Error<T>>::CodeInUse);
@@ -335,10 +335,7 @@ impl<T: Config> Executable<T> for WasmBlob<T>
 where
 	BalanceOf<T>: Into<U256> + TryFrom<U256>,
 {
-	fn from_storage(
-		code_hash: sp_core::H256,
-		gas_meter: &mut GasMeter<T>,
-	) -> Result<Self, DispatchError> {
+	fn from_storage(code_hash: H256, gas_meter: &mut GasMeter<T>) -> Result<Self, DispatchError> {
 		let code_info = <CodeInfoOf<T>>::get(code_hash).ok_or(Error::<T>::CodeNotFound)?;
 		gas_meter.charge(CodeLoadToken(code_info.code_len))?;
 		let code = <PristineCode<T>>::get(code_hash).ok_or(Error::<T>::CodeNotFound)?;
@@ -365,7 +362,7 @@ where
 		self.code.as_ref()
 	}
 
-	fn code_hash(&self) -> &sp_core::H256 {
+	fn code_hash(&self) -> &H256 {
 		&self.code_hash
 	}
 
diff --git a/substrate/frame/revive/src/wasm/runtime.rs b/substrate/frame/revive/src/wasm/runtime.rs
index d9e8c6ae9c3..95257bee1c6 100644
--- a/substrate/frame/revive/src/wasm/runtime.rs
+++ b/substrate/frame/revive/src/wasm/runtime.rs
@@ -326,6 +326,8 @@ pub enum RuntimeCosts {
 	MinimumBalance,
 	/// Weight of calling `seal_block_number`.
 	BlockNumber,
+	/// Weight of calling `seal_block_hash`.
+	BlockHash,
 	/// Weight of calling `seal_now`.
 	Now,
 	/// Weight of calling `seal_weight_to_fee`.
@@ -473,6 +475,7 @@ impl<T: Config> Token<T> for RuntimeCosts {
 			ValueTransferred => T::WeightInfo::seal_value_transferred(),
 			MinimumBalance => T::WeightInfo::seal_minimum_balance(),
 			BlockNumber => T::WeightInfo::seal_block_number(),
+			BlockHash => T::WeightInfo::seal_block_hash(),
 			Now => T::WeightInfo::seal_now(),
 			WeightToFee => T::WeightInfo::seal_weight_to_fee(),
 			Terminate(locked_dependencies) => T::WeightInfo::seal_terminate(locked_dependencies),
@@ -1713,6 +1716,27 @@ pub mod env {
 		)?)
 	}
 
+	/// Stores the block hash at given block height into the supplied buffer.
+	/// See [`pallet_revive_uapi::HostFn::block_hash`].
+	#[api_version(0)]
+	fn block_hash(
+		&mut self,
+		memory: &mut M,
+		block_number_ptr: u32,
+		out_ptr: u32,
+	) -> Result<(), TrapReason> {
+		self.charge_gas(RuntimeCosts::BlockHash)?;
+		let block_number = memory.read_u256(block_number_ptr)?;
+		let block_hash = self.ext.block_hash(block_number).unwrap_or(H256::zero());
+		Ok(self.write_fixed_sandbox_output(
+			memory,
+			out_ptr,
+			&block_hash.as_bytes(),
+			false,
+			already_charged,
+		)?)
+	}
+
 	/// Computes the SHA2 256-bit hash on the given input buffer.
 	/// See [`pallet_revive_uapi::HostFn::hash_sha2_256`].
 	#[api_version(0)]
diff --git a/substrate/frame/revive/src/weights.rs b/substrate/frame/revive/src/weights.rs
index 43927da8d2e..d1b1a63b4db 100644
--- a/substrate/frame/revive/src/weights.rs
+++ b/substrate/frame/revive/src/weights.rs
@@ -79,6 +79,7 @@ pub trait WeightInfo {
 	fn seal_value_transferred() -> Weight;
 	fn seal_minimum_balance() -> Weight;
 	fn seal_block_number() -> Weight;
+	fn seal_block_hash() -> Weight;
 	fn seal_now() -> Weight;
 	fn seal_weight_to_fee() -> Weight;
 	fn seal_input(n: u32, ) -> Weight;
@@ -131,8 +132,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `109`
 		//  Estimated: `1594`
-		// Minimum execution time: 3_055_000 picoseconds.
-		Weight::from_parts(3_377_000, 1594)
+		// Minimum execution time: 2_649_000 picoseconds.
+		Weight::from_parts(2_726_000, 1594)
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 	}
 	/// Storage: `Skipped::Metadata` (r:0 w:0)
@@ -142,10 +143,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `425 + k * (69 ±0)`
 		//  Estimated: `415 + k * (70 ±0)`
-		// Minimum execution time: 15_564_000 picoseconds.
-		Weight::from_parts(14_949_168, 415)
-			// Standard Error: 1_113
-			.saturating_add(Weight::from_parts(1_315_153, 0).saturating_mul(k.into()))
+		// Minimum execution time: 12_756_000 picoseconds.
+		Weight::from_parts(13_112_000, 415)
+			// Standard Error: 988
+			.saturating_add(Weight::from_parts(1_131_927, 0).saturating_mul(k.into()))
 			.saturating_add(T::DbWeight::get().reads(2_u64))
 			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into())))
 			.saturating_add(T::DbWeight::get().writes(2_u64))
@@ -169,8 +170,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `1465`
 		//  Estimated: `7405`
-		// Minimum execution time: 98_113_000 picoseconds.
-		Weight::from_parts(101_964_040, 7405)
+		// Minimum execution time: 86_553_000 picoseconds.
+		Weight::from_parts(89_689_079, 7405)
 			.saturating_add(T::DbWeight::get().reads(7_u64))
 			.saturating_add(T::DbWeight::get().writes(2_u64))
 	}
@@ -194,10 +195,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `416`
 		//  Estimated: `6333`
-		// Minimum execution time: 207_612_000 picoseconds.
-		Weight::from_parts(202_394_849, 6333)
-			// Standard Error: 12
-			.saturating_add(Weight::from_parts(4_108, 0).saturating_mul(i.into()))
+		// Minimum execution time: 180_721_000 picoseconds.
+		Weight::from_parts(155_866_981, 6333)
+			// Standard Error: 11
+			.saturating_add(Weight::from_parts(4_514, 0).saturating_mul(i.into()))
 			.saturating_add(T::DbWeight::get().reads(7_u64))
 			.saturating_add(T::DbWeight::get().writes(6_u64))
 	}
@@ -220,10 +221,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `1296`
 		//  Estimated: `4741`
-		// Minimum execution time: 172_403_000 picoseconds.
-		Weight::from_parts(151_999_812, 4741)
-			// Standard Error: 15
-			.saturating_add(Weight::from_parts(3_948, 0).saturating_mul(i.into()))
+		// Minimum execution time: 151_590_000 picoseconds.
+		Weight::from_parts(128_110_988, 4741)
+			// Standard Error: 16
+			.saturating_add(Weight::from_parts(4_453, 0).saturating_mul(i.into()))
 			.saturating_add(T::DbWeight::get().reads(7_u64))
 			.saturating_add(T::DbWeight::get().writes(4_u64))
 	}
@@ -243,8 +244,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `1465`
 		//  Estimated: `7405`
-		// Minimum execution time: 149_755_000 picoseconds.
-		Weight::from_parts(166_190_000, 7405)
+		// Minimum execution time: 136_371_000 picoseconds.
+		Weight::from_parts(140_508_000, 7405)
 			.saturating_add(T::DbWeight::get().reads(7_u64))
 			.saturating_add(T::DbWeight::get().writes(2_u64))
 	}
@@ -255,12 +256,14 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 	/// Storage: `Revive::PristineCode` (r:0 w:1)
 	/// Proof: `Revive::PristineCode` (`max_values`: None, `max_size`: Some(262180), added: 264655, mode: `Measured`)
 	/// The range of component `c` is `[0, 262144]`.
-	fn upload_code(_c: u32, ) -> Weight {
+	fn upload_code(c: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `109`
 		//  Estimated: `3574`
-		// Minimum execution time: 58_481_000 picoseconds.
-		Weight::from_parts(61_009_506, 3574)
+		// Minimum execution time: 51_255_000 picoseconds.
+		Weight::from_parts(52_668_809, 3574)
+			// Standard Error: 0
+			.saturating_add(Weight::from_parts(1, 0).saturating_mul(c.into()))
 			.saturating_add(T::DbWeight::get().reads(2_u64))
 			.saturating_add(T::DbWeight::get().writes(3_u64))
 	}
@@ -274,8 +277,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `285`
 		//  Estimated: `3750`
-		// Minimum execution time: 47_485_000 picoseconds.
-		Weight::from_parts(48_962_000, 3750)
+		// Minimum execution time: 41_664_000 picoseconds.
+		Weight::from_parts(42_981_000, 3750)
 			.saturating_add(T::DbWeight::get().reads(2_u64))
 			.saturating_add(T::DbWeight::get().writes(3_u64))
 	}
@@ -287,8 +290,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `529`
 		//  Estimated: `6469`
-		// Minimum execution time: 30_752_000 picoseconds.
-		Weight::from_parts(32_401_000, 6469)
+		// Minimum execution time: 27_020_000 picoseconds.
+		Weight::from_parts(27_973_000, 6469)
 			.saturating_add(T::DbWeight::get().reads(3_u64))
 			.saturating_add(T::DbWeight::get().writes(3_u64))
 	}
@@ -300,8 +303,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `109`
 		//  Estimated: `3574`
-		// Minimum execution time: 47_042_000 picoseconds.
-		Weight::from_parts(48_378_000, 3574)
+		// Minimum execution time: 42_342_000 picoseconds.
+		Weight::from_parts(43_210_000, 3574)
 			.saturating_add(T::DbWeight::get().reads(2_u64))
 			.saturating_add(T::DbWeight::get().writes(2_u64))
 	}
@@ -313,8 +316,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `56`
 		//  Estimated: `3521`
-		// Minimum execution time: 36_705_000 picoseconds.
-		Weight::from_parts(37_313_000, 3521)
+		// Minimum execution time: 31_881_000 picoseconds.
+		Weight::from_parts(32_340_000, 3521)
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 			.saturating_add(T::DbWeight::get().writes(2_u64))
 	}
@@ -326,8 +329,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `145`
 		//  Estimated: `3610`
-		// Minimum execution time: 13_275_000 picoseconds.
-		Weight::from_parts(13_593_000, 3610)
+		// Minimum execution time: 11_087_000 picoseconds.
+		Weight::from_parts(11_416_000, 3610)
 			.saturating_add(T::DbWeight::get().reads(2_u64))
 	}
 	/// The range of component `r` is `[0, 1600]`.
@@ -335,24 +338,24 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 6_708_000 picoseconds.
-		Weight::from_parts(7_740_679, 0)
-			// Standard Error: 133
-			.saturating_add(Weight::from_parts(175_535, 0).saturating_mul(r.into()))
+		// Minimum execution time: 6_403_000 picoseconds.
+		Weight::from_parts(7_751_101, 0)
+			// Standard Error: 99
+			.saturating_add(Weight::from_parts(179_467, 0).saturating_mul(r.into()))
 	}
 	fn seal_caller() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 277_000 picoseconds.
-		Weight::from_parts(326_000, 0)
+		// Minimum execution time: 272_000 picoseconds.
+		Weight::from_parts(306_000, 0)
 	}
 	fn seal_origin() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 260_000 picoseconds.
-		Weight::from_parts(273_000, 0)
+		// Minimum execution time: 226_000 picoseconds.
+		Weight::from_parts(261_000, 0)
 	}
 	/// Storage: `Revive::ContractInfoOf` (r:1 w:0)
 	/// Proof: `Revive::ContractInfoOf` (`max_values`: None, `max_size`: Some(1779), added: 4254, mode: `Measured`)
@@ -360,8 +363,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `306`
 		//  Estimated: `3771`
-		// Minimum execution time: 7_700_000 picoseconds.
-		Weight::from_parts(8_207_000, 3771)
+		// Minimum execution time: 6_727_000 picoseconds.
+		Weight::from_parts(7_122_000, 3771)
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 	}
 	/// Storage: `Revive::ContractInfoOf` (r:1 w:0)
@@ -370,16 +373,16 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `403`
 		//  Estimated: `3868`
-		// Minimum execution time: 8_719_000 picoseconds.
-		Weight::from_parts(9_077_000, 3868)
+		// Minimum execution time: 7_542_000 picoseconds.
+		Weight::from_parts(7_846_000, 3868)
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 	}
 	fn seal_own_code_hash() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 250_000 picoseconds.
-		Weight::from_parts(273_000, 0)
+		// Minimum execution time: 243_000 picoseconds.
+		Weight::from_parts(275_000, 0)
 	}
 	/// Storage: `Revive::ContractInfoOf` (r:1 w:0)
 	/// Proof: `Revive::ContractInfoOf` (`max_values`: None, `max_size`: Some(1779), added: 4254, mode: `Measured`)
@@ -389,44 +392,44 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `473`
 		//  Estimated: `3938`
-		// Minimum execution time: 13_910_000 picoseconds.
-		Weight::from_parts(14_687_000, 3938)
+		// Minimum execution time: 11_948_000 picoseconds.
+		Weight::from_parts(12_406_000, 3938)
 			.saturating_add(T::DbWeight::get().reads(2_u64))
 	}
 	fn seal_caller_is_origin() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 351_000 picoseconds.
-		Weight::from_parts(389_000, 0)
+		// Minimum execution time: 329_000 picoseconds.
+		Weight::from_parts(362_000, 0)
 	}
 	fn seal_caller_is_root() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 285_000 picoseconds.
-		Weight::from_parts(307_000, 0)
+		// Minimum execution time: 276_000 picoseconds.
+		Weight::from_parts(303_000, 0)
 	}
 	fn seal_address() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 264_000 picoseconds.
-		Weight::from_parts(292_000, 0)
+		// Minimum execution time: 251_000 picoseconds.
+		Weight::from_parts(286_000, 0)
 	}
 	fn seal_weight_left() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 631_000 picoseconds.
-		Weight::from_parts(684_000, 0)
+		// Minimum execution time: 611_000 picoseconds.
+		Weight::from_parts(669_000, 0)
 	}
 	fn seal_balance() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `103`
 		//  Estimated: `0`
-		// Minimum execution time: 4_754_000 picoseconds.
-		Weight::from_parts(5_107_000, 0)
+		// Minimum execution time: 4_439_000 picoseconds.
+		Weight::from_parts(4_572_000, 0)
 	}
 	/// Storage: `Revive::AddressSuffix` (r:1 w:0)
 	/// Proof: `Revive::AddressSuffix` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `Measured`)
@@ -436,8 +439,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `264`
 		//  Estimated: `3729`
-		// Minimum execution time: 11_156_000 picoseconds.
-		Weight::from_parts(11_558_000, 3729)
+		// Minimum execution time: 9_336_000 picoseconds.
+		Weight::from_parts(9_622_000, 3729)
 			.saturating_add(T::DbWeight::get().reads(2_u64))
 	}
 	/// Storage: `Revive::ImmutableDataOf` (r:1 w:0)
@@ -447,10 +450,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `238 + n * (1 ±0)`
 		//  Estimated: `3703 + n * (1 ±0)`
-		// Minimum execution time: 6_637_000 picoseconds.
-		Weight::from_parts(7_510_923, 3703)
-			// Standard Error: 12
-			.saturating_add(Weight::from_parts(955, 0).saturating_mul(n.into()))
+		// Minimum execution time: 5_660_000 picoseconds.
+		Weight::from_parts(6_291_437, 3703)
+			// Standard Error: 4
+			.saturating_add(Weight::from_parts(741, 0).saturating_mul(n.into()))
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
 	}
@@ -461,39 +464,49 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 2_717_000 picoseconds.
-		Weight::from_parts(3_109_103, 0)
-			// Standard Error: 3
-			.saturating_add(Weight::from_parts(666, 0).saturating_mul(n.into()))
+		// Minimum execution time: 1_909_000 picoseconds.
+		Weight::from_parts(2_154_705, 0)
+			// Standard Error: 2
+			.saturating_add(Weight::from_parts(643, 0).saturating_mul(n.into()))
 			.saturating_add(T::DbWeight::get().writes(1_u64))
 	}
 	fn seal_value_transferred() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 253_000 picoseconds.
-		Weight::from_parts(318_000, 0)
+		// Minimum execution time: 241_000 picoseconds.
+		Weight::from_parts(283_000, 0)
 	}
 	fn seal_minimum_balance() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
 		// Minimum execution time: 263_000 picoseconds.
-		Weight::from_parts(309_000, 0)
+		Weight::from_parts(294_000, 0)
 	}
 	fn seal_block_number() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 239_000 picoseconds.
-		Weight::from_parts(278_000, 0)
+		// Minimum execution time: 218_000 picoseconds.
+		Weight::from_parts(281_000, 0)
+	}
+	/// Storage: `System::BlockHash` (r:1 w:0)
+	/// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `Measured`)
+	fn seal_block_hash() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `30`
+		//  Estimated: `3495`
+		// Minimum execution time: 3_373_000 picoseconds.
+		Weight::from_parts(3_610_000, 3495)
+			.saturating_add(T::DbWeight::get().reads(1_u64))
 	}
 	fn seal_now() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 266_000 picoseconds.
-		Weight::from_parts(300_000, 0)
+		// Minimum execution time: 247_000 picoseconds.
+		Weight::from_parts(299_000, 0)
 	}
 	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
 	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `Measured`)
@@ -501,8 +514,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `67`
 		//  Estimated: `1552`
-		// Minimum execution time: 6_300_000 picoseconds.
-		Weight::from_parts(6_588_000, 1552)
+		// Minimum execution time: 5_523_000 picoseconds.
+		Weight::from_parts(5_757_000, 1552)
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 	}
 	/// The range of component `n` is `[0, 262140]`.
@@ -510,20 +523,20 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 457_000 picoseconds.
-		Weight::from_parts(533_616, 0)
+		// Minimum execution time: 450_000 picoseconds.
+		Weight::from_parts(584_658, 0)
 			// Standard Error: 0
-			.saturating_add(Weight::from_parts(148, 0).saturating_mul(n.into()))
+			.saturating_add(Weight::from_parts(147, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 262140]`.
 	fn seal_return(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 287_000 picoseconds.
-		Weight::from_parts(450_119, 0)
+		// Minimum execution time: 232_000 picoseconds.
+		Weight::from_parts(611_960, 0)
 			// Standard Error: 0
-			.saturating_add(Weight::from_parts(295, 0).saturating_mul(n.into()))
+			.saturating_add(Weight::from_parts(294, 0).saturating_mul(n.into()))
 	}
 	/// Storage: `Revive::AddressSuffix` (r:1 w:0)
 	/// Proof: `Revive::AddressSuffix` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `Measured`)
@@ -540,10 +553,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `321 + n * (88 ±0)`
 		//  Estimated: `3787 + n * (2563 ±0)`
-		// Minimum execution time: 22_885_000 picoseconds.
-		Weight::from_parts(25_158_434, 3787)
-			// Standard Error: 9_482
-			.saturating_add(Weight::from_parts(4_623_850, 0).saturating_mul(n.into()))
+		// Minimum execution time: 19_158_000 picoseconds.
+		Weight::from_parts(20_900_189, 3787)
+			// Standard Error: 9_648
+			.saturating_add(Weight::from_parts(4_239_910, 0).saturating_mul(n.into()))
 			.saturating_add(T::DbWeight::get().reads(3_u64))
 			.saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into())))
 			.saturating_add(T::DbWeight::get().writes(4_u64))
@@ -556,22 +569,22 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 5_172_000 picoseconds.
-		Weight::from_parts(5_112_915, 0)
-			// Standard Error: 3_042
-			.saturating_add(Weight::from_parts(220_337, 0).saturating_mul(t.into()))
-			// Standard Error: 27
-			.saturating_add(Weight::from_parts(1_077, 0).saturating_mul(n.into()))
+		// Minimum execution time: 4_097_000 picoseconds.
+		Weight::from_parts(3_956_608, 0)
+			// Standard Error: 2_678
+			.saturating_add(Weight::from_parts(178_555, 0).saturating_mul(t.into()))
+			// Standard Error: 23
+			.saturating_add(Weight::from_parts(1_127, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `i` is `[0, 262144]`.
 	fn seal_debug_message(i: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 332_000 picoseconds.
-		Weight::from_parts(830_275, 0)
+		// Minimum execution time: 277_000 picoseconds.
+		Weight::from_parts(1_044_051, 0)
 			// Standard Error: 0
-			.saturating_add(Weight::from_parts(803, 0).saturating_mul(i.into()))
+			.saturating_add(Weight::from_parts(794, 0).saturating_mul(i.into()))
 	}
 	/// Storage: `Skipped::Metadata` (r:0 w:0)
 	/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
@@ -579,8 +592,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `744`
 		//  Estimated: `744`
-		// Minimum execution time: 9_628_000 picoseconds.
-		Weight::from_parts(10_193_000, 744)
+		// Minimum execution time: 7_745_000 picoseconds.
+		Weight::from_parts(8_370_000, 744)
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 	}
 	/// Storage: `Skipped::Metadata` (r:0 w:0)
@@ -589,8 +602,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `10754`
 		//  Estimated: `10754`
-		// Minimum execution time: 45_621_000 picoseconds.
-		Weight::from_parts(46_237_000, 10754)
+		// Minimum execution time: 43_559_000 picoseconds.
+		Weight::from_parts(44_310_000, 10754)
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 	}
 	/// Storage: `Skipped::Metadata` (r:0 w:0)
@@ -599,8 +612,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `744`
 		//  Estimated: `744`
-		// Minimum execution time: 10_918_000 picoseconds.
-		Weight::from_parts(11_441_000, 744)
+		// Minimum execution time: 8_866_000 picoseconds.
+		Weight::from_parts(9_072_000, 744)
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 			.saturating_add(T::DbWeight::get().writes(1_u64))
 	}
@@ -610,8 +623,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `10754`
 		//  Estimated: `10754`
-		// Minimum execution time: 47_445_000 picoseconds.
-		Weight::from_parts(49_049_000, 10754)
+		// Minimum execution time: 44_481_000 picoseconds.
+		Weight::from_parts(45_157_000, 10754)
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 			.saturating_add(T::DbWeight::get().writes(1_u64))
 	}
@@ -623,12 +636,12 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `248 + o * (1 ±0)`
 		//  Estimated: `247 + o * (1 ±0)`
-		// Minimum execution time: 11_215_000 picoseconds.
-		Weight::from_parts(11_943_073, 247)
-			// Standard Error: 50
-			.saturating_add(Weight::from_parts(844, 0).saturating_mul(n.into()))
-			// Standard Error: 50
-			.saturating_add(Weight::from_parts(891, 0).saturating_mul(o.into()))
+		// Minimum execution time: 9_130_000 picoseconds.
+		Weight::from_parts(9_709_648, 247)
+			// Standard Error: 40
+			.saturating_add(Weight::from_parts(435, 0).saturating_mul(n.into()))
+			// Standard Error: 40
+			.saturating_add(Weight::from_parts(384, 0).saturating_mul(o.into()))
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 			.saturating_add(T::DbWeight::get().writes(1_u64))
 			.saturating_add(Weight::from_parts(0, 1).saturating_mul(o.into()))
@@ -640,10 +653,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `248 + n * (1 ±0)`
 		//  Estimated: `247 + n * (1 ±0)`
-		// Minimum execution time: 10_794_000 picoseconds.
-		Weight::from_parts(11_993_996, 247)
-			// Standard Error: 75
-			.saturating_add(Weight::from_parts(759, 0).saturating_mul(n.into()))
+		// Minimum execution time: 8_753_000 picoseconds.
+		Weight::from_parts(9_558_399, 247)
+			// Standard Error: 56
+			.saturating_add(Weight::from_parts(483, 0).saturating_mul(n.into()))
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 			.saturating_add(T::DbWeight::get().writes(1_u64))
 			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
@@ -655,10 +668,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `248 + n * (1 ±0)`
 		//  Estimated: `247 + n * (1 ±0)`
-		// Minimum execution time: 10_345_000 picoseconds.
-		Weight::from_parts(11_428_949, 247)
-			// Standard Error: 80
-			.saturating_add(Weight::from_parts(1_525, 0).saturating_mul(n.into()))
+		// Minimum execution time: 8_328_000 picoseconds.
+		Weight::from_parts(9_120_157, 247)
+			// Standard Error: 58
+			.saturating_add(Weight::from_parts(1_637, 0).saturating_mul(n.into()))
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
 	}
@@ -669,10 +682,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `248 + n * (1 ±0)`
 		//  Estimated: `247 + n * (1 ±0)`
-		// Minimum execution time: 9_858_000 picoseconds.
-		Weight::from_parts(10_787_656, 247)
-			// Standard Error: 64
-			.saturating_add(Weight::from_parts(789, 0).saturating_mul(n.into()))
+		// Minimum execution time: 7_977_000 picoseconds.
+		Weight::from_parts(8_582_869, 247)
+			// Standard Error: 52
+			.saturating_add(Weight::from_parts(854, 0).saturating_mul(n.into()))
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
 	}
@@ -683,10 +696,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `248 + n * (1 ±0)`
 		//  Estimated: `247 + n * (1 ±0)`
-		// Minimum execution time: 11_303_000 picoseconds.
-		Weight::from_parts(12_595_161, 247)
-			// Standard Error: 81
-			.saturating_add(Weight::from_parts(1_311, 0).saturating_mul(n.into()))
+		// Minimum execution time: 9_193_000 picoseconds.
+		Weight::from_parts(10_112_966, 247)
+			// Standard Error: 63
+			.saturating_add(Weight::from_parts(1_320, 0).saturating_mul(n.into()))
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 			.saturating_add(T::DbWeight::get().writes(1_u64))
 			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
@@ -695,36 +708,36 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_618_000 picoseconds.
-		Weight::from_parts(1_768_000, 0)
+		// Minimum execution time: 1_398_000 picoseconds.
+		Weight::from_parts(1_490_000, 0)
 	}
 	fn set_transient_storage_full() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_936_000 picoseconds.
-		Weight::from_parts(2_146_000, 0)
+		// Minimum execution time: 1_762_000 picoseconds.
+		Weight::from_parts(1_926_000, 0)
 	}
 	fn get_transient_storage_empty() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_616_000 picoseconds.
-		Weight::from_parts(1_816_000, 0)
+		// Minimum execution time: 1_413_000 picoseconds.
+		Weight::from_parts(1_494_000, 0)
 	}
 	fn get_transient_storage_full() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_716_000 picoseconds.
-		Weight::from_parts(1_928_000, 0)
+		// Minimum execution time: 1_606_000 picoseconds.
+		Weight::from_parts(1_659_000, 0)
 	}
 	fn rollback_transient_storage() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_070_000 picoseconds.
-		Weight::from_parts(1_201_000, 0)
+		// Minimum execution time: 1_010_000 picoseconds.
+		Weight::from_parts(1_117_000, 0)
 	}
 	/// The range of component `n` is `[0, 512]`.
 	/// The range of component `o` is `[0, 512]`.
@@ -732,50 +745,50 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 2_294_000 picoseconds.
-		Weight::from_parts(2_562_977, 0)
-			// Standard Error: 16
-			.saturating_add(Weight::from_parts(274, 0).saturating_mul(n.into()))
-			// Standard Error: 16
-			.saturating_add(Weight::from_parts(374, 0).saturating_mul(o.into()))
+		// Minimum execution time: 2_194_000 picoseconds.
+		Weight::from_parts(2_290_633, 0)
+			// Standard Error: 11
+			.saturating_add(Weight::from_parts(341, 0).saturating_mul(n.into()))
+			// Standard Error: 11
+			.saturating_add(Weight::from_parts(377, 0).saturating_mul(o.into()))
 	}
 	/// The range of component `n` is `[0, 512]`.
 	fn seal_clear_transient_storage(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 2_016_000 picoseconds.
-		Weight::from_parts(2_487_058, 0)
-			// Standard Error: 27
-			.saturating_add(Weight::from_parts(434, 0).saturating_mul(n.into()))
+		// Minimum execution time: 1_896_000 picoseconds.
+		Weight::from_parts(2_254_323, 0)
+			// Standard Error: 17
+			.saturating_add(Weight::from_parts(439, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 512]`.
 	fn seal_get_transient_storage(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_892_000 picoseconds.
-		Weight::from_parts(2_207_388, 0)
-			// Standard Error: 27
-			.saturating_add(Weight::from_parts(443, 0).saturating_mul(n.into()))
+		// Minimum execution time: 1_800_000 picoseconds.
+		Weight::from_parts(1_948_552, 0)
+			// Standard Error: 11
+			.saturating_add(Weight::from_parts(360, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 512]`.
 	fn seal_contains_transient_storage(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_709_000 picoseconds.
-		Weight::from_parts(2_050_395, 0)
-			// Standard Error: 19
-			.saturating_add(Weight::from_parts(184, 0).saturating_mul(n.into()))
+		// Minimum execution time: 1_615_000 picoseconds.
+		Weight::from_parts(1_812_731, 0)
+			// Standard Error: 11
+			.saturating_add(Weight::from_parts(177, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 512]`.
 	fn seal_take_transient_storage(_n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 2_516_000 picoseconds.
-		Weight::from_parts(2_873_575, 0)
+		// Minimum execution time: 2_430_000 picoseconds.
+		Weight::from_parts(2_669_757, 0)
 	}
 	/// Storage: `Revive::AddressSuffix` (r:1 w:0)
 	/// Proof: `Revive::AddressSuffix` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `Measured`)
@@ -783,8 +796,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `315`
 		//  Estimated: `3780`
-		// Minimum execution time: 17_252_000 picoseconds.
-		Weight::from_parts(17_661_000, 3780)
+		// Minimum execution time: 14_740_000 picoseconds.
+		Weight::from_parts(15_320_000, 3780)
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 	}
 	/// Storage: `Revive::AddressSuffix` (r:1 w:0)
@@ -801,10 +814,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `1292 + t * (103 ±0)`
 		//  Estimated: `4757 + t * (103 ±0)`
-		// Minimum execution time: 40_689_000 picoseconds.
-		Weight::from_parts(45_233_426, 4757)
+		// Minimum execution time: 37_280_000 picoseconds.
+		Weight::from_parts(41_639_379, 4757)
 			// Standard Error: 0
-			.saturating_add(Weight::from_parts(3, 0).saturating_mul(i.into()))
+			.saturating_add(Weight::from_parts(2, 0).saturating_mul(i.into()))
 			.saturating_add(T::DbWeight::get().reads(4_u64))
 			.saturating_add(T::DbWeight::get().writes(1_u64))
 			.saturating_add(Weight::from_parts(0, 103).saturating_mul(t.into()))
@@ -817,8 +830,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `1064`
 		//  Estimated: `4529`
-		// Minimum execution time: 31_110_000 picoseconds.
-		Weight::from_parts(32_044_000, 4529)
+		// Minimum execution time: 27_564_000 picoseconds.
+		Weight::from_parts(28_809_000, 4529)
 			.saturating_add(T::DbWeight::get().reads(2_u64))
 	}
 	/// Storage: `Revive::CodeInfoOf` (r:1 w:1)
@@ -834,10 +847,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `1273`
 		//  Estimated: `4732`
-		// Minimum execution time: 129_979_000 picoseconds.
-		Weight::from_parts(118_301_199, 4732)
-			// Standard Error: 10
-			.saturating_add(Weight::from_parts(3_697, 0).saturating_mul(i.into()))
+		// Minimum execution time: 115_581_000 picoseconds.
+		Weight::from_parts(105_196_218, 4732)
+			// Standard Error: 11
+			.saturating_add(Weight::from_parts(4_134, 0).saturating_mul(i.into()))
 			.saturating_add(T::DbWeight::get().reads(4_u64))
 			.saturating_add(T::DbWeight::get().writes(3_u64))
 	}
@@ -846,64 +859,64 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 696_000 picoseconds.
-		Weight::from_parts(1_036_915, 0)
-			// Standard Error: 0
-			.saturating_add(Weight::from_parts(1_117, 0).saturating_mul(n.into()))
+		// Minimum execution time: 605_000 picoseconds.
+		Weight::from_parts(3_425_431, 0)
+			// Standard Error: 2
+			.saturating_add(Weight::from_parts(1_461, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 262144]`.
 	fn seal_hash_keccak_256(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_117_000 picoseconds.
-		Weight::from_parts(631_314, 0)
-			// Standard Error: 1
-			.saturating_add(Weight::from_parts(3_318, 0).saturating_mul(n.into()))
+		// Minimum execution time: 1_113_000 picoseconds.
+		Weight::from_parts(4_611_854, 0)
+			// Standard Error: 3
+			.saturating_add(Weight::from_parts(3_652, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 262144]`.
 	fn seal_hash_blake2_256(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 686_000 picoseconds.
-		Weight::from_parts(427_696, 0)
-			// Standard Error: 0
-			.saturating_add(Weight::from_parts(1_244, 0).saturating_mul(n.into()))
+		// Minimum execution time: 610_000 picoseconds.
+		Weight::from_parts(3_872_321, 0)
+			// Standard Error: 2
+			.saturating_add(Weight::from_parts(1_584, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 262144]`.
 	fn seal_hash_blake2_128(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 663_000 picoseconds.
-		Weight::from_parts(440_191, 0)
-			// Standard Error: 0
-			.saturating_add(Weight::from_parts(1_243, 0).saturating_mul(n.into()))
+		// Minimum execution time: 559_000 picoseconds.
+		Weight::from_parts(4_721_584, 0)
+			// Standard Error: 3
+			.saturating_add(Weight::from_parts(1_570, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 261889]`.
 	fn seal_sr25519_verify(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 49_781_000 picoseconds.
-		Weight::from_parts(32_846_276, 0)
-			// Standard Error: 14
-			.saturating_add(Weight::from_parts(4_798, 0).saturating_mul(n.into()))
+		// Minimum execution time: 47_467_000 picoseconds.
+		Weight::from_parts(36_639_352, 0)
+			// Standard Error: 11
+			.saturating_add(Weight::from_parts(5_216, 0).saturating_mul(n.into()))
 	}
 	fn seal_ecdsa_recover() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 48_044_000 picoseconds.
-		Weight::from_parts(49_512_000, 0)
+		// Minimum execution time: 48_106_000 picoseconds.
+		Weight::from_parts(49_352_000, 0)
 	}
 	fn seal_ecdsa_to_eth_address() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 12_680_000 picoseconds.
-		Weight::from_parts(12_967_000, 0)
+		// Minimum execution time: 12_616_000 picoseconds.
+		Weight::from_parts(12_796_000, 0)
 	}
 	/// Storage: `Revive::CodeInfoOf` (r:1 w:1)
 	/// Proof: `Revive::CodeInfoOf` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `Measured`)
@@ -911,8 +924,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `300`
 		//  Estimated: `3765`
-		// Minimum execution time: 16_707_000 picoseconds.
-		Weight::from_parts(17_318_000, 3765)
+		// Minimum execution time: 14_055_000 picoseconds.
+		Weight::from_parts(14_526_000, 3765)
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 			.saturating_add(T::DbWeight::get().writes(1_u64))
 	}
@@ -922,8 +935,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `337`
 		//  Estimated: `3802`
-		// Minimum execution time: 11_962_000 picoseconds.
-		Weight::from_parts(12_283_000, 3802)
+		// Minimum execution time: 10_338_000 picoseconds.
+		Weight::from_parts(10_677_000, 3802)
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 			.saturating_add(T::DbWeight::get().writes(1_u64))
 	}
@@ -933,8 +946,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `337`
 		//  Estimated: `3561`
-		// Minimum execution time: 10_477_000 picoseconds.
-		Weight::from_parts(11_018_000, 3561)
+		// Minimum execution time: 8_740_000 picoseconds.
+		Weight::from_parts(9_329_000, 3561)
 			.saturating_add(T::DbWeight::get().reads(1_u64))
 			.saturating_add(T::DbWeight::get().writes(1_u64))
 	}
@@ -943,10 +956,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 8_136_000 picoseconds.
-		Weight::from_parts(9_712_463, 0)
-			// Standard Error: 42
-			.saturating_add(Weight::from_parts(71_916, 0).saturating_mul(r.into()))
+		// Minimum execution time: 7_846_000 picoseconds.
+		Weight::from_parts(9_717_991, 0)
+			// Standard Error: 49
+			.saturating_add(Weight::from_parts(72_062, 0).saturating_mul(r.into()))
 	}
 }
 
@@ -958,8 +971,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `109`
 		//  Estimated: `1594`
-		// Minimum execution time: 3_055_000 picoseconds.
-		Weight::from_parts(3_377_000, 1594)
+		// Minimum execution time: 2_649_000 picoseconds.
+		Weight::from_parts(2_726_000, 1594)
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 	}
 	/// Storage: `Skipped::Metadata` (r:0 w:0)
@@ -969,10 +982,10 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `425 + k * (69 ±0)`
 		//  Estimated: `415 + k * (70 ±0)`
-		// Minimum execution time: 15_564_000 picoseconds.
-		Weight::from_parts(14_949_168, 415)
-			// Standard Error: 1_113
-			.saturating_add(Weight::from_parts(1_315_153, 0).saturating_mul(k.into()))
+		// Minimum execution time: 12_756_000 picoseconds.
+		Weight::from_parts(13_112_000, 415)
+			// Standard Error: 988
+			.saturating_add(Weight::from_parts(1_131_927, 0).saturating_mul(k.into()))
 			.saturating_add(RocksDbWeight::get().reads(2_u64))
 			.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(k.into())))
 			.saturating_add(RocksDbWeight::get().writes(2_u64))
@@ -996,8 +1009,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `1465`
 		//  Estimated: `7405`
-		// Minimum execution time: 98_113_000 picoseconds.
-		Weight::from_parts(101_964_040, 7405)
+		// Minimum execution time: 86_553_000 picoseconds.
+		Weight::from_parts(89_689_079, 7405)
 			.saturating_add(RocksDbWeight::get().reads(7_u64))
 			.saturating_add(RocksDbWeight::get().writes(2_u64))
 	}
@@ -1021,10 +1034,10 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `416`
 		//  Estimated: `6333`
-		// Minimum execution time: 207_612_000 picoseconds.
-		Weight::from_parts(202_394_849, 6333)
-			// Standard Error: 12
-			.saturating_add(Weight::from_parts(4_108, 0).saturating_mul(i.into()))
+		// Minimum execution time: 180_721_000 picoseconds.
+		Weight::from_parts(155_866_981, 6333)
+			// Standard Error: 11
+			.saturating_add(Weight::from_parts(4_514, 0).saturating_mul(i.into()))
 			.saturating_add(RocksDbWeight::get().reads(7_u64))
 			.saturating_add(RocksDbWeight::get().writes(6_u64))
 	}
@@ -1047,10 +1060,10 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `1296`
 		//  Estimated: `4741`
-		// Minimum execution time: 172_403_000 picoseconds.
-		Weight::from_parts(151_999_812, 4741)
-			// Standard Error: 15
-			.saturating_add(Weight::from_parts(3_948, 0).saturating_mul(i.into()))
+		// Minimum execution time: 151_590_000 picoseconds.
+		Weight::from_parts(128_110_988, 4741)
+			// Standard Error: 16
+			.saturating_add(Weight::from_parts(4_453, 0).saturating_mul(i.into()))
 			.saturating_add(RocksDbWeight::get().reads(7_u64))
 			.saturating_add(RocksDbWeight::get().writes(4_u64))
 	}
@@ -1070,8 +1083,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `1465`
 		//  Estimated: `7405`
-		// Minimum execution time: 149_755_000 picoseconds.
-		Weight::from_parts(166_190_000, 7405)
+		// Minimum execution time: 136_371_000 picoseconds.
+		Weight::from_parts(140_508_000, 7405)
 			.saturating_add(RocksDbWeight::get().reads(7_u64))
 			.saturating_add(RocksDbWeight::get().writes(2_u64))
 	}
@@ -1082,12 +1095,14 @@ impl WeightInfo for () {
 	/// Storage: `Revive::PristineCode` (r:0 w:1)
 	/// Proof: `Revive::PristineCode` (`max_values`: None, `max_size`: Some(262180), added: 264655, mode: `Measured`)
 	/// The range of component `c` is `[0, 262144]`.
-	fn upload_code(_c: u32, ) -> Weight {
+	fn upload_code(c: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `109`
 		//  Estimated: `3574`
-		// Minimum execution time: 58_481_000 picoseconds.
-		Weight::from_parts(61_009_506, 3574)
+		// Minimum execution time: 51_255_000 picoseconds.
+		Weight::from_parts(52_668_809, 3574)
+			// Standard Error: 0
+			.saturating_add(Weight::from_parts(1, 0).saturating_mul(c.into()))
 			.saturating_add(RocksDbWeight::get().reads(2_u64))
 			.saturating_add(RocksDbWeight::get().writes(3_u64))
 	}
@@ -1101,8 +1116,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `285`
 		//  Estimated: `3750`
-		// Minimum execution time: 47_485_000 picoseconds.
-		Weight::from_parts(48_962_000, 3750)
+		// Minimum execution time: 41_664_000 picoseconds.
+		Weight::from_parts(42_981_000, 3750)
 			.saturating_add(RocksDbWeight::get().reads(2_u64))
 			.saturating_add(RocksDbWeight::get().writes(3_u64))
 	}
@@ -1114,8 +1129,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `529`
 		//  Estimated: `6469`
-		// Minimum execution time: 30_752_000 picoseconds.
-		Weight::from_parts(32_401_000, 6469)
+		// Minimum execution time: 27_020_000 picoseconds.
+		Weight::from_parts(27_973_000, 6469)
 			.saturating_add(RocksDbWeight::get().reads(3_u64))
 			.saturating_add(RocksDbWeight::get().writes(3_u64))
 	}
@@ -1127,8 +1142,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `109`
 		//  Estimated: `3574`
-		// Minimum execution time: 47_042_000 picoseconds.
-		Weight::from_parts(48_378_000, 3574)
+		// Minimum execution time: 42_342_000 picoseconds.
+		Weight::from_parts(43_210_000, 3574)
 			.saturating_add(RocksDbWeight::get().reads(2_u64))
 			.saturating_add(RocksDbWeight::get().writes(2_u64))
 	}
@@ -1140,8 +1155,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `56`
 		//  Estimated: `3521`
-		// Minimum execution time: 36_705_000 picoseconds.
-		Weight::from_parts(37_313_000, 3521)
+		// Minimum execution time: 31_881_000 picoseconds.
+		Weight::from_parts(32_340_000, 3521)
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 			.saturating_add(RocksDbWeight::get().writes(2_u64))
 	}
@@ -1153,8 +1168,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `145`
 		//  Estimated: `3610`
-		// Minimum execution time: 13_275_000 picoseconds.
-		Weight::from_parts(13_593_000, 3610)
+		// Minimum execution time: 11_087_000 picoseconds.
+		Weight::from_parts(11_416_000, 3610)
 			.saturating_add(RocksDbWeight::get().reads(2_u64))
 	}
 	/// The range of component `r` is `[0, 1600]`.
@@ -1162,24 +1177,24 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 6_708_000 picoseconds.
-		Weight::from_parts(7_740_679, 0)
-			// Standard Error: 133
-			.saturating_add(Weight::from_parts(175_535, 0).saturating_mul(r.into()))
+		// Minimum execution time: 6_403_000 picoseconds.
+		Weight::from_parts(7_751_101, 0)
+			// Standard Error: 99
+			.saturating_add(Weight::from_parts(179_467, 0).saturating_mul(r.into()))
 	}
 	fn seal_caller() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 277_000 picoseconds.
-		Weight::from_parts(326_000, 0)
+		// Minimum execution time: 272_000 picoseconds.
+		Weight::from_parts(306_000, 0)
 	}
 	fn seal_origin() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 260_000 picoseconds.
-		Weight::from_parts(273_000, 0)
+		// Minimum execution time: 226_000 picoseconds.
+		Weight::from_parts(261_000, 0)
 	}
 	/// Storage: `Revive::ContractInfoOf` (r:1 w:0)
 	/// Proof: `Revive::ContractInfoOf` (`max_values`: None, `max_size`: Some(1779), added: 4254, mode: `Measured`)
@@ -1187,8 +1202,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `306`
 		//  Estimated: `3771`
-		// Minimum execution time: 7_700_000 picoseconds.
-		Weight::from_parts(8_207_000, 3771)
+		// Minimum execution time: 6_727_000 picoseconds.
+		Weight::from_parts(7_122_000, 3771)
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 	}
 	/// Storage: `Revive::ContractInfoOf` (r:1 w:0)
@@ -1197,16 +1212,16 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `403`
 		//  Estimated: `3868`
-		// Minimum execution time: 8_719_000 picoseconds.
-		Weight::from_parts(9_077_000, 3868)
+		// Minimum execution time: 7_542_000 picoseconds.
+		Weight::from_parts(7_846_000, 3868)
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 	}
 	fn seal_own_code_hash() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 250_000 picoseconds.
-		Weight::from_parts(273_000, 0)
+		// Minimum execution time: 243_000 picoseconds.
+		Weight::from_parts(275_000, 0)
 	}
 	/// Storage: `Revive::ContractInfoOf` (r:1 w:0)
 	/// Proof: `Revive::ContractInfoOf` (`max_values`: None, `max_size`: Some(1779), added: 4254, mode: `Measured`)
@@ -1216,44 +1231,44 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `473`
 		//  Estimated: `3938`
-		// Minimum execution time: 13_910_000 picoseconds.
-		Weight::from_parts(14_687_000, 3938)
+		// Minimum execution time: 11_948_000 picoseconds.
+		Weight::from_parts(12_406_000, 3938)
 			.saturating_add(RocksDbWeight::get().reads(2_u64))
 	}
 	fn seal_caller_is_origin() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 351_000 picoseconds.
-		Weight::from_parts(389_000, 0)
+		// Minimum execution time: 329_000 picoseconds.
+		Weight::from_parts(362_000, 0)
 	}
 	fn seal_caller_is_root() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 285_000 picoseconds.
-		Weight::from_parts(307_000, 0)
+		// Minimum execution time: 276_000 picoseconds.
+		Weight::from_parts(303_000, 0)
 	}
 	fn seal_address() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 264_000 picoseconds.
-		Weight::from_parts(292_000, 0)
+		// Minimum execution time: 251_000 picoseconds.
+		Weight::from_parts(286_000, 0)
 	}
 	fn seal_weight_left() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 631_000 picoseconds.
-		Weight::from_parts(684_000, 0)
+		// Minimum execution time: 611_000 picoseconds.
+		Weight::from_parts(669_000, 0)
 	}
 	fn seal_balance() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `103`
 		//  Estimated: `0`
-		// Minimum execution time: 4_754_000 picoseconds.
-		Weight::from_parts(5_107_000, 0)
+		// Minimum execution time: 4_439_000 picoseconds.
+		Weight::from_parts(4_572_000, 0)
 	}
 	/// Storage: `Revive::AddressSuffix` (r:1 w:0)
 	/// Proof: `Revive::AddressSuffix` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `Measured`)
@@ -1263,8 +1278,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `264`
 		//  Estimated: `3729`
-		// Minimum execution time: 11_156_000 picoseconds.
-		Weight::from_parts(11_558_000, 3729)
+		// Minimum execution time: 9_336_000 picoseconds.
+		Weight::from_parts(9_622_000, 3729)
 			.saturating_add(RocksDbWeight::get().reads(2_u64))
 	}
 	/// Storage: `Revive::ImmutableDataOf` (r:1 w:0)
@@ -1274,10 +1289,10 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `238 + n * (1 ±0)`
 		//  Estimated: `3703 + n * (1 ±0)`
-		// Minimum execution time: 6_637_000 picoseconds.
-		Weight::from_parts(7_510_923, 3703)
-			// Standard Error: 12
-			.saturating_add(Weight::from_parts(955, 0).saturating_mul(n.into()))
+		// Minimum execution time: 5_660_000 picoseconds.
+		Weight::from_parts(6_291_437, 3703)
+			// Standard Error: 4
+			.saturating_add(Weight::from_parts(741, 0).saturating_mul(n.into()))
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
 	}
@@ -1288,39 +1303,49 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 2_717_000 picoseconds.
-		Weight::from_parts(3_109_103, 0)
-			// Standard Error: 3
-			.saturating_add(Weight::from_parts(666, 0).saturating_mul(n.into()))
+		// Minimum execution time: 1_909_000 picoseconds.
+		Weight::from_parts(2_154_705, 0)
+			// Standard Error: 2
+			.saturating_add(Weight::from_parts(643, 0).saturating_mul(n.into()))
 			.saturating_add(RocksDbWeight::get().writes(1_u64))
 	}
 	fn seal_value_transferred() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 253_000 picoseconds.
-		Weight::from_parts(318_000, 0)
+		// Minimum execution time: 241_000 picoseconds.
+		Weight::from_parts(283_000, 0)
 	}
 	fn seal_minimum_balance() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
 		// Minimum execution time: 263_000 picoseconds.
-		Weight::from_parts(309_000, 0)
+		Weight::from_parts(294_000, 0)
 	}
 	fn seal_block_number() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 239_000 picoseconds.
-		Weight::from_parts(278_000, 0)
+		// Minimum execution time: 218_000 picoseconds.
+		Weight::from_parts(281_000, 0)
+	}
+	/// Storage: `System::BlockHash` (r:1 w:0)
+	/// Proof: `System::BlockHash` (`max_values`: None, `max_size`: Some(44), added: 2519, mode: `Measured`)
+	fn seal_block_hash() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `30`
+		//  Estimated: `3495`
+		// Minimum execution time: 3_373_000 picoseconds.
+		Weight::from_parts(3_610_000, 3495)
+			.saturating_add(RocksDbWeight::get().reads(1_u64))
 	}
 	fn seal_now() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 266_000 picoseconds.
-		Weight::from_parts(300_000, 0)
+		// Minimum execution time: 247_000 picoseconds.
+		Weight::from_parts(299_000, 0)
 	}
 	/// Storage: `TransactionPayment::NextFeeMultiplier` (r:1 w:0)
 	/// Proof: `TransactionPayment::NextFeeMultiplier` (`max_values`: Some(1), `max_size`: Some(16), added: 511, mode: `Measured`)
@@ -1328,8 +1353,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `67`
 		//  Estimated: `1552`
-		// Minimum execution time: 6_300_000 picoseconds.
-		Weight::from_parts(6_588_000, 1552)
+		// Minimum execution time: 5_523_000 picoseconds.
+		Weight::from_parts(5_757_000, 1552)
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 	}
 	/// The range of component `n` is `[0, 262140]`.
@@ -1337,20 +1362,20 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 457_000 picoseconds.
-		Weight::from_parts(533_616, 0)
+		// Minimum execution time: 450_000 picoseconds.
+		Weight::from_parts(584_658, 0)
 			// Standard Error: 0
-			.saturating_add(Weight::from_parts(148, 0).saturating_mul(n.into()))
+			.saturating_add(Weight::from_parts(147, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 262140]`.
 	fn seal_return(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 287_000 picoseconds.
-		Weight::from_parts(450_119, 0)
+		// Minimum execution time: 232_000 picoseconds.
+		Weight::from_parts(611_960, 0)
 			// Standard Error: 0
-			.saturating_add(Weight::from_parts(295, 0).saturating_mul(n.into()))
+			.saturating_add(Weight::from_parts(294, 0).saturating_mul(n.into()))
 	}
 	/// Storage: `Revive::AddressSuffix` (r:1 w:0)
 	/// Proof: `Revive::AddressSuffix` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `Measured`)
@@ -1367,10 +1392,10 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `321 + n * (88 ±0)`
 		//  Estimated: `3787 + n * (2563 ±0)`
-		// Minimum execution time: 22_885_000 picoseconds.
-		Weight::from_parts(25_158_434, 3787)
-			// Standard Error: 9_482
-			.saturating_add(Weight::from_parts(4_623_850, 0).saturating_mul(n.into()))
+		// Minimum execution time: 19_158_000 picoseconds.
+		Weight::from_parts(20_900_189, 3787)
+			// Standard Error: 9_648
+			.saturating_add(Weight::from_parts(4_239_910, 0).saturating_mul(n.into()))
 			.saturating_add(RocksDbWeight::get().reads(3_u64))
 			.saturating_add(RocksDbWeight::get().reads((1_u64).saturating_mul(n.into())))
 			.saturating_add(RocksDbWeight::get().writes(4_u64))
@@ -1383,22 +1408,22 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 5_172_000 picoseconds.
-		Weight::from_parts(5_112_915, 0)
-			// Standard Error: 3_042
-			.saturating_add(Weight::from_parts(220_337, 0).saturating_mul(t.into()))
-			// Standard Error: 27
-			.saturating_add(Weight::from_parts(1_077, 0).saturating_mul(n.into()))
+		// Minimum execution time: 4_097_000 picoseconds.
+		Weight::from_parts(3_956_608, 0)
+			// Standard Error: 2_678
+			.saturating_add(Weight::from_parts(178_555, 0).saturating_mul(t.into()))
+			// Standard Error: 23
+			.saturating_add(Weight::from_parts(1_127, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `i` is `[0, 262144]`.
 	fn seal_debug_message(i: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 332_000 picoseconds.
-		Weight::from_parts(830_275, 0)
+		// Minimum execution time: 277_000 picoseconds.
+		Weight::from_parts(1_044_051, 0)
 			// Standard Error: 0
-			.saturating_add(Weight::from_parts(803, 0).saturating_mul(i.into()))
+			.saturating_add(Weight::from_parts(794, 0).saturating_mul(i.into()))
 	}
 	/// Storage: `Skipped::Metadata` (r:0 w:0)
 	/// Proof: `Skipped::Metadata` (`max_values`: None, `max_size`: None, mode: `Measured`)
@@ -1406,8 +1431,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `744`
 		//  Estimated: `744`
-		// Minimum execution time: 9_628_000 picoseconds.
-		Weight::from_parts(10_193_000, 744)
+		// Minimum execution time: 7_745_000 picoseconds.
+		Weight::from_parts(8_370_000, 744)
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 	}
 	/// Storage: `Skipped::Metadata` (r:0 w:0)
@@ -1416,8 +1441,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `10754`
 		//  Estimated: `10754`
-		// Minimum execution time: 45_621_000 picoseconds.
-		Weight::from_parts(46_237_000, 10754)
+		// Minimum execution time: 43_559_000 picoseconds.
+		Weight::from_parts(44_310_000, 10754)
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 	}
 	/// Storage: `Skipped::Metadata` (r:0 w:0)
@@ -1426,8 +1451,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `744`
 		//  Estimated: `744`
-		// Minimum execution time: 10_918_000 picoseconds.
-		Weight::from_parts(11_441_000, 744)
+		// Minimum execution time: 8_866_000 picoseconds.
+		Weight::from_parts(9_072_000, 744)
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 			.saturating_add(RocksDbWeight::get().writes(1_u64))
 	}
@@ -1437,8 +1462,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `10754`
 		//  Estimated: `10754`
-		// Minimum execution time: 47_445_000 picoseconds.
-		Weight::from_parts(49_049_000, 10754)
+		// Minimum execution time: 44_481_000 picoseconds.
+		Weight::from_parts(45_157_000, 10754)
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 			.saturating_add(RocksDbWeight::get().writes(1_u64))
 	}
@@ -1450,12 +1475,12 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `248 + o * (1 ±0)`
 		//  Estimated: `247 + o * (1 ±0)`
-		// Minimum execution time: 11_215_000 picoseconds.
-		Weight::from_parts(11_943_073, 247)
-			// Standard Error: 50
-			.saturating_add(Weight::from_parts(844, 0).saturating_mul(n.into()))
-			// Standard Error: 50
-			.saturating_add(Weight::from_parts(891, 0).saturating_mul(o.into()))
+		// Minimum execution time: 9_130_000 picoseconds.
+		Weight::from_parts(9_709_648, 247)
+			// Standard Error: 40
+			.saturating_add(Weight::from_parts(435, 0).saturating_mul(n.into()))
+			// Standard Error: 40
+			.saturating_add(Weight::from_parts(384, 0).saturating_mul(o.into()))
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 			.saturating_add(RocksDbWeight::get().writes(1_u64))
 			.saturating_add(Weight::from_parts(0, 1).saturating_mul(o.into()))
@@ -1467,10 +1492,10 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `248 + n * (1 ±0)`
 		//  Estimated: `247 + n * (1 ±0)`
-		// Minimum execution time: 10_794_000 picoseconds.
-		Weight::from_parts(11_993_996, 247)
-			// Standard Error: 75
-			.saturating_add(Weight::from_parts(759, 0).saturating_mul(n.into()))
+		// Minimum execution time: 8_753_000 picoseconds.
+		Weight::from_parts(9_558_399, 247)
+			// Standard Error: 56
+			.saturating_add(Weight::from_parts(483, 0).saturating_mul(n.into()))
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 			.saturating_add(RocksDbWeight::get().writes(1_u64))
 			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
@@ -1482,10 +1507,10 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `248 + n * (1 ±0)`
 		//  Estimated: `247 + n * (1 ±0)`
-		// Minimum execution time: 10_345_000 picoseconds.
-		Weight::from_parts(11_428_949, 247)
-			// Standard Error: 80
-			.saturating_add(Weight::from_parts(1_525, 0).saturating_mul(n.into()))
+		// Minimum execution time: 8_328_000 picoseconds.
+		Weight::from_parts(9_120_157, 247)
+			// Standard Error: 58
+			.saturating_add(Weight::from_parts(1_637, 0).saturating_mul(n.into()))
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
 	}
@@ -1496,10 +1521,10 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `248 + n * (1 ±0)`
 		//  Estimated: `247 + n * (1 ±0)`
-		// Minimum execution time: 9_858_000 picoseconds.
-		Weight::from_parts(10_787_656, 247)
-			// Standard Error: 64
-			.saturating_add(Weight::from_parts(789, 0).saturating_mul(n.into()))
+		// Minimum execution time: 7_977_000 picoseconds.
+		Weight::from_parts(8_582_869, 247)
+			// Standard Error: 52
+			.saturating_add(Weight::from_parts(854, 0).saturating_mul(n.into()))
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
 	}
@@ -1510,10 +1535,10 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `248 + n * (1 ±0)`
 		//  Estimated: `247 + n * (1 ±0)`
-		// Minimum execution time: 11_303_000 picoseconds.
-		Weight::from_parts(12_595_161, 247)
-			// Standard Error: 81
-			.saturating_add(Weight::from_parts(1_311, 0).saturating_mul(n.into()))
+		// Minimum execution time: 9_193_000 picoseconds.
+		Weight::from_parts(10_112_966, 247)
+			// Standard Error: 63
+			.saturating_add(Weight::from_parts(1_320, 0).saturating_mul(n.into()))
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 			.saturating_add(RocksDbWeight::get().writes(1_u64))
 			.saturating_add(Weight::from_parts(0, 1).saturating_mul(n.into()))
@@ -1522,36 +1547,36 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_618_000 picoseconds.
-		Weight::from_parts(1_768_000, 0)
+		// Minimum execution time: 1_398_000 picoseconds.
+		Weight::from_parts(1_490_000, 0)
 	}
 	fn set_transient_storage_full() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_936_000 picoseconds.
-		Weight::from_parts(2_146_000, 0)
+		// Minimum execution time: 1_762_000 picoseconds.
+		Weight::from_parts(1_926_000, 0)
 	}
 	fn get_transient_storage_empty() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_616_000 picoseconds.
-		Weight::from_parts(1_816_000, 0)
+		// Minimum execution time: 1_413_000 picoseconds.
+		Weight::from_parts(1_494_000, 0)
 	}
 	fn get_transient_storage_full() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_716_000 picoseconds.
-		Weight::from_parts(1_928_000, 0)
+		// Minimum execution time: 1_606_000 picoseconds.
+		Weight::from_parts(1_659_000, 0)
 	}
 	fn rollback_transient_storage() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_070_000 picoseconds.
-		Weight::from_parts(1_201_000, 0)
+		// Minimum execution time: 1_010_000 picoseconds.
+		Weight::from_parts(1_117_000, 0)
 	}
 	/// The range of component `n` is `[0, 512]`.
 	/// The range of component `o` is `[0, 512]`.
@@ -1559,50 +1584,50 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 2_294_000 picoseconds.
-		Weight::from_parts(2_562_977, 0)
-			// Standard Error: 16
-			.saturating_add(Weight::from_parts(274, 0).saturating_mul(n.into()))
-			// Standard Error: 16
-			.saturating_add(Weight::from_parts(374, 0).saturating_mul(o.into()))
+		// Minimum execution time: 2_194_000 picoseconds.
+		Weight::from_parts(2_290_633, 0)
+			// Standard Error: 11
+			.saturating_add(Weight::from_parts(341, 0).saturating_mul(n.into()))
+			// Standard Error: 11
+			.saturating_add(Weight::from_parts(377, 0).saturating_mul(o.into()))
 	}
 	/// The range of component `n` is `[0, 512]`.
 	fn seal_clear_transient_storage(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 2_016_000 picoseconds.
-		Weight::from_parts(2_487_058, 0)
-			// Standard Error: 27
-			.saturating_add(Weight::from_parts(434, 0).saturating_mul(n.into()))
+		// Minimum execution time: 1_896_000 picoseconds.
+		Weight::from_parts(2_254_323, 0)
+			// Standard Error: 17
+			.saturating_add(Weight::from_parts(439, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 512]`.
 	fn seal_get_transient_storage(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_892_000 picoseconds.
-		Weight::from_parts(2_207_388, 0)
-			// Standard Error: 27
-			.saturating_add(Weight::from_parts(443, 0).saturating_mul(n.into()))
+		// Minimum execution time: 1_800_000 picoseconds.
+		Weight::from_parts(1_948_552, 0)
+			// Standard Error: 11
+			.saturating_add(Weight::from_parts(360, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 512]`.
 	fn seal_contains_transient_storage(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_709_000 picoseconds.
-		Weight::from_parts(2_050_395, 0)
-			// Standard Error: 19
-			.saturating_add(Weight::from_parts(184, 0).saturating_mul(n.into()))
+		// Minimum execution time: 1_615_000 picoseconds.
+		Weight::from_parts(1_812_731, 0)
+			// Standard Error: 11
+			.saturating_add(Weight::from_parts(177, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 512]`.
 	fn seal_take_transient_storage(_n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 2_516_000 picoseconds.
-		Weight::from_parts(2_873_575, 0)
+		// Minimum execution time: 2_430_000 picoseconds.
+		Weight::from_parts(2_669_757, 0)
 	}
 	/// Storage: `Revive::AddressSuffix` (r:1 w:0)
 	/// Proof: `Revive::AddressSuffix` (`max_values`: None, `max_size`: Some(32), added: 2507, mode: `Measured`)
@@ -1610,8 +1635,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `315`
 		//  Estimated: `3780`
-		// Minimum execution time: 17_252_000 picoseconds.
-		Weight::from_parts(17_661_000, 3780)
+		// Minimum execution time: 14_740_000 picoseconds.
+		Weight::from_parts(15_320_000, 3780)
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 	}
 	/// Storage: `Revive::AddressSuffix` (r:1 w:0)
@@ -1628,10 +1653,10 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `1292 + t * (103 ±0)`
 		//  Estimated: `4757 + t * (103 ±0)`
-		// Minimum execution time: 40_689_000 picoseconds.
-		Weight::from_parts(45_233_426, 4757)
+		// Minimum execution time: 37_280_000 picoseconds.
+		Weight::from_parts(41_639_379, 4757)
 			// Standard Error: 0
-			.saturating_add(Weight::from_parts(3, 0).saturating_mul(i.into()))
+			.saturating_add(Weight::from_parts(2, 0).saturating_mul(i.into()))
 			.saturating_add(RocksDbWeight::get().reads(4_u64))
 			.saturating_add(RocksDbWeight::get().writes(1_u64))
 			.saturating_add(Weight::from_parts(0, 103).saturating_mul(t.into()))
@@ -1644,8 +1669,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `1064`
 		//  Estimated: `4529`
-		// Minimum execution time: 31_110_000 picoseconds.
-		Weight::from_parts(32_044_000, 4529)
+		// Minimum execution time: 27_564_000 picoseconds.
+		Weight::from_parts(28_809_000, 4529)
 			.saturating_add(RocksDbWeight::get().reads(2_u64))
 	}
 	/// Storage: `Revive::CodeInfoOf` (r:1 w:1)
@@ -1661,10 +1686,10 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `1273`
 		//  Estimated: `4732`
-		// Minimum execution time: 129_979_000 picoseconds.
-		Weight::from_parts(118_301_199, 4732)
-			// Standard Error: 10
-			.saturating_add(Weight::from_parts(3_697, 0).saturating_mul(i.into()))
+		// Minimum execution time: 115_581_000 picoseconds.
+		Weight::from_parts(105_196_218, 4732)
+			// Standard Error: 11
+			.saturating_add(Weight::from_parts(4_134, 0).saturating_mul(i.into()))
 			.saturating_add(RocksDbWeight::get().reads(4_u64))
 			.saturating_add(RocksDbWeight::get().writes(3_u64))
 	}
@@ -1673,64 +1698,64 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 696_000 picoseconds.
-		Weight::from_parts(1_036_915, 0)
-			// Standard Error: 0
-			.saturating_add(Weight::from_parts(1_117, 0).saturating_mul(n.into()))
+		// Minimum execution time: 605_000 picoseconds.
+		Weight::from_parts(3_425_431, 0)
+			// Standard Error: 2
+			.saturating_add(Weight::from_parts(1_461, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 262144]`.
 	fn seal_hash_keccak_256(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 1_117_000 picoseconds.
-		Weight::from_parts(631_314, 0)
-			// Standard Error: 1
-			.saturating_add(Weight::from_parts(3_318, 0).saturating_mul(n.into()))
+		// Minimum execution time: 1_113_000 picoseconds.
+		Weight::from_parts(4_611_854, 0)
+			// Standard Error: 3
+			.saturating_add(Weight::from_parts(3_652, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 262144]`.
 	fn seal_hash_blake2_256(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 686_000 picoseconds.
-		Weight::from_parts(427_696, 0)
-			// Standard Error: 0
-			.saturating_add(Weight::from_parts(1_244, 0).saturating_mul(n.into()))
+		// Minimum execution time: 610_000 picoseconds.
+		Weight::from_parts(3_872_321, 0)
+			// Standard Error: 2
+			.saturating_add(Weight::from_parts(1_584, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 262144]`.
 	fn seal_hash_blake2_128(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 663_000 picoseconds.
-		Weight::from_parts(440_191, 0)
-			// Standard Error: 0
-			.saturating_add(Weight::from_parts(1_243, 0).saturating_mul(n.into()))
+		// Minimum execution time: 559_000 picoseconds.
+		Weight::from_parts(4_721_584, 0)
+			// Standard Error: 3
+			.saturating_add(Weight::from_parts(1_570, 0).saturating_mul(n.into()))
 	}
 	/// The range of component `n` is `[0, 261889]`.
 	fn seal_sr25519_verify(n: u32, ) -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 49_781_000 picoseconds.
-		Weight::from_parts(32_846_276, 0)
-			// Standard Error: 14
-			.saturating_add(Weight::from_parts(4_798, 0).saturating_mul(n.into()))
+		// Minimum execution time: 47_467_000 picoseconds.
+		Weight::from_parts(36_639_352, 0)
+			// Standard Error: 11
+			.saturating_add(Weight::from_parts(5_216, 0).saturating_mul(n.into()))
 	}
 	fn seal_ecdsa_recover() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 48_044_000 picoseconds.
-		Weight::from_parts(49_512_000, 0)
+		// Minimum execution time: 48_106_000 picoseconds.
+		Weight::from_parts(49_352_000, 0)
 	}
 	fn seal_ecdsa_to_eth_address() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 12_680_000 picoseconds.
-		Weight::from_parts(12_967_000, 0)
+		// Minimum execution time: 12_616_000 picoseconds.
+		Weight::from_parts(12_796_000, 0)
 	}
 	/// Storage: `Revive::CodeInfoOf` (r:1 w:1)
 	/// Proof: `Revive::CodeInfoOf` (`max_values`: None, `max_size`: Some(96), added: 2571, mode: `Measured`)
@@ -1738,8 +1763,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `300`
 		//  Estimated: `3765`
-		// Minimum execution time: 16_707_000 picoseconds.
-		Weight::from_parts(17_318_000, 3765)
+		// Minimum execution time: 14_055_000 picoseconds.
+		Weight::from_parts(14_526_000, 3765)
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 			.saturating_add(RocksDbWeight::get().writes(1_u64))
 	}
@@ -1749,8 +1774,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `337`
 		//  Estimated: `3802`
-		// Minimum execution time: 11_962_000 picoseconds.
-		Weight::from_parts(12_283_000, 3802)
+		// Minimum execution time: 10_338_000 picoseconds.
+		Weight::from_parts(10_677_000, 3802)
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 			.saturating_add(RocksDbWeight::get().writes(1_u64))
 	}
@@ -1760,8 +1785,8 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `337`
 		//  Estimated: `3561`
-		// Minimum execution time: 10_477_000 picoseconds.
-		Weight::from_parts(11_018_000, 3561)
+		// Minimum execution time: 8_740_000 picoseconds.
+		Weight::from_parts(9_329_000, 3561)
 			.saturating_add(RocksDbWeight::get().reads(1_u64))
 			.saturating_add(RocksDbWeight::get().writes(1_u64))
 	}
@@ -1770,9 +1795,9 @@ impl WeightInfo for () {
 		// Proof Size summary in bytes:
 		//  Measured:  `0`
 		//  Estimated: `0`
-		// Minimum execution time: 8_136_000 picoseconds.
-		Weight::from_parts(9_712_463, 0)
-			// Standard Error: 42
-			.saturating_add(Weight::from_parts(71_916, 0).saturating_mul(r.into()))
+		// Minimum execution time: 7_846_000 picoseconds.
+		Weight::from_parts(9_717_991, 0)
+			// Standard Error: 49
+			.saturating_add(Weight::from_parts(72_062, 0).saturating_mul(r.into()))
 	}
 }
diff --git a/substrate/frame/revive/uapi/src/host.rs b/substrate/frame/revive/uapi/src/host.rs
index b1f1583bcdd..cf4cdeee0f2 100644
--- a/substrate/frame/revive/uapi/src/host.rs
+++ b/substrate/frame/revive/uapi/src/host.rs
@@ -105,6 +105,14 @@ pub trait HostFn: private::Sealed {
 	/// - `output`: A reference to the output data buffer to write the block number.
 	fn block_number(output: &mut [u8; 32]);
 
+	/// Stores the block hash of the given block number into the supplied buffer.
+	///
+	/// # Parameters
+	///
+	/// - `block_number`: A reference to the block number buffer.
+	/// - `output`: A reference to the output data buffer to write the block number.
+	fn block_hash(block_number: &[u8; 32], output: &mut [u8; 32]);
+
 	/// Call (possibly transferring some amount of funds) into the specified account.
 	///
 	/// # Parameters
diff --git a/substrate/frame/revive/uapi/src/host/riscv32.rs b/substrate/frame/revive/uapi/src/host/riscv32.rs
index dcdf3e92eea..fc55bfbde18 100644
--- a/substrate/frame/revive/uapi/src/host/riscv32.rs
+++ b/substrate/frame/revive/uapi/src/host/riscv32.rs
@@ -98,6 +98,7 @@ mod sys {
 			data_len: u32,
 		);
 		pub fn block_number(out_ptr: *mut u8);
+		pub fn block_hash(block_number_ptr: *const u8, out_ptr: *mut u8);
 		pub fn hash_sha2_256(input_ptr: *const u8, input_len: u32, out_ptr: *mut u8);
 		pub fn hash_keccak_256(input_ptr: *const u8, input_len: u32, out_ptr: *mut u8);
 		pub fn hash_blake2_256(input_ptr: *const u8, input_len: u32, out_ptr: *mut u8);
@@ -579,4 +580,8 @@ impl HostFn for HostFnImpl {
 		}
 		extract_from_slice(output, output_len as usize);
 	}
+
+	fn block_hash(block_number_ptr: &[u8; 32], output: &mut [u8; 32]) {
+		unsafe { sys::block_hash(block_number_ptr.as_ptr(), output.as_mut_ptr()) };
+	}
 }
-- 
GitLab