Upgrade polkadot sdk v1.13.0 (#298)

* generic template updated to v1.13.0

* evm dependency upgrades

* evm dependency upgrades after moonbeam

* importing frontier updates 

* upgrade fuzzer to v1.11.0 

* upgrade fuzzer to v1.12.0

* generic template fuzzer updated

* evm fuzzer

---------

Co-authored-by: Nikita Khateev <nikita.khateev@openzeppelin.com>
This commit is contained in:
Özgün Özerk
2024-09-13 12:18:35 +03:00
committed by GitHub
parent a4b7acf9bd
commit ba730fab22
31 changed files with 4973 additions and 4319 deletions
+9 -5
View File
@@ -1,5 +1,5 @@
use frame_support::{
genesis_builder_helper::{build_config, create_default_config},
genesis_builder_helper::{build_state, get_preset},
weights::Weight,
};
use sp_api::impl_runtime_apis;
@@ -316,12 +316,16 @@ impl_runtime_apis! {
}
impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn create_default_config() -> Vec<u8> {
create_default_config::<RuntimeGenesisConfig>()
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
build_state::<RuntimeGenesisConfig>(config)
}
fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result {
build_config::<RuntimeGenesisConfig>(config)
fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
get_preset::<RuntimeGenesisConfig>(id, |_| None)
}
fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
Default::default()
}
}
}
+4 -5
View File
@@ -48,7 +48,7 @@ use crate::{
constants::{
currency::{deposit, CENTS, EXISTENTIAL_DEPOSIT, GRAND, MICROCENTS},
AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, MAX_BLOCK_LENGTH,
NORMAL_DISPATCH_RATIO, SLOT_DURATION, VERSION,
NORMAL_DISPATCH_RATIO, VERSION,
},
types::{
AccountId, AssetKind, Balance, Beneficiary, Block, BlockNumber,
@@ -200,10 +200,7 @@ impl pallet_preimage::Config for Runtime {
}
impl pallet_timestamp::Config for Runtime {
#[cfg(feature = "experimental")]
type MinimumPeriod = ConstU64<0>;
#[cfg(not(feature = "experimental"))]
type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>;
/// A timestamp: milliseconds since the unix epoch.
type Moment = u64;
type OnTimestampSet = Aura;
@@ -359,7 +356,7 @@ impl pallet_transaction_payment::Config for Runtime {
/// With fast adjusting fees change rapidly, but fixed for all users at each block (no tipping)
type FeeMultiplierUpdate = SlowAdjustingFeeUpdate<Self>;
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter<Balances, ()>;
type OperationalFeeMultiplier = OperationalFeeMultiplier;
type RuntimeEvent = RuntimeEvent;
type WeightToFee = WeightToFee;
@@ -442,7 +439,9 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type ChannelInfo = ParachainSystem;
type ControllerOrigin = EnsureRoot<AccountId>;
type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin;
type MaxActiveOutboundChannels = ConstU32<128>;
type MaxInboundSuspended = MaxInboundSuspended;
type MaxPageSize = ConstU32<{ 1 << 16 }>;
/// Ensure that this value is not set to null (or NoPriceForMessageDelivery) to prevent spamming
type PriceForSiblingDelivery = PriceForSiblingParachainDelivery;
type RuntimeEvent = RuntimeEvent;
@@ -182,6 +182,7 @@ impl xcm_executor::Config for XcmConfig {
// Teleporting is disabled.
type UniversalLocation = UniversalLocation;
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
type XcmRecorder = PolkadotXcm;
type XcmSender = XcmRouter;
}
@@ -68,6 +68,28 @@ impl<T: frame_system::Config> pallet_balances::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// TODO: below is random
fn burn_allow_death() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 25_741_000 picoseconds.
Weight::from_parts(26_321_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// TODO: below is random
fn burn_keep_alive() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `3593`
// Minimum execution time: 25_741_000 picoseconds.
Weight::from_parts(26_321_000, 0)
.saturating_add(Weight::from_parts(0, 3593))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
fn force_set_balance_killing() -> Weight {
@@ -46,20 +46,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
/// Proof: `ParachainSystem::PendingUpwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn send_blob() -> Weight {
// Proof Size summary in bytes:
// Measured: `42`
// Estimated: `1527`
// Minimum execution time: 18_744_000 picoseconds.
Weight::from_parts(19_226_000, 0)
.saturating_add(Weight::from_parts(0, 1527))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn teleport_assets() -> Weight {
@@ -100,16 +86,6 @@ impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
Weight::from_parts(18_446_744_073_709_551_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `Benchmark::Override` (r:0 w:0)
/// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn execute_blob() -> Weight {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds.
Weight::from_parts(18_446_744_073_709_551_000, 0)
.saturating_add(Weight::from_parts(0, 0))
}
/// Storage: `PolkadotXcm::SupportedVersion` (r:0 w:1)
/// Proof: `PolkadotXcm::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn force_xcm_version() -> Weight {