mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
add weights that need to be generated for rococo (#5052)
* add weights that need to be generated for rococo * remove frame_system * touch balances weight file * add empty im-online weight file * add empty pallet indices weight file * add empty pallet multisig weight file * add empty pallet proxy weight file * add empty pallet session weight file * add empty pallet timestamp weight file * add empty pallet utility weight file * add empty para pallets weight files * remove utility for now * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=pallet-balances --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/ * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=pallet-im-online --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/ * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=pallet-multisig --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/ * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=pallet-proxy --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/ * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=pallet-timestamp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/ * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_common::auctions --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_common_auctions.rs * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=pallet-indices --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/ * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_common::paras_registrar --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_common_paras_registrar.rs * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_common::slots --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_common_slots.rs * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::configuration --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_configuration.rs * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::hrmp --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_hrmp.rs * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::initializer --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_initializer.rs * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::paras --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_paras.rs * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_ump.rs * update ump for weights sink_process_upward_message -> process_upward_message (#5103) * update ump for weights sink_process_upward_message -> process_upward_message * update autogen files * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::ump --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_ump.rs * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=runtime_parachains::disputes --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/runtime_parachains_disputes.rs * add frame_system weights for Rococo * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/ * add pallet-utility runtime benchmarks * add utility benchmark * add utility pallet * cargo run --quiet --profile=production --features=runtime-benchmarks -- benchmark --chain=rococo-dev --steps=50 --repeat=20 --pallet=pallet-utility --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/rococo/src/weights/ * fix cargo format issues * add pallet_session weights - since pallet session benchmarking is coupled with pallet staking, for the time being we will use the weights from westend https://github.com/paritytech/polkadot/pull/5052#issuecomment-1072903719 * remove newline * use some of the new weights * add pallet-utility/std * add collective and membership benchmarks * add WeightInfo * copy weights from Polkadot for now, needs to be updated with relevant weights * add weights * copy weights from Polkadot pallet session * remove newline Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Dan Shields <35669742+NukeManDan@users.noreply.github.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -285,7 +285,7 @@ impl frame_system::Config for Runtime {
|
||||
type AccountData = pallet_balances::AccountData<Balance>;
|
||||
type OnNewAccount = ();
|
||||
type OnKilledAccount = ();
|
||||
type SystemWeightInfo = ();
|
||||
type SystemWeightInfo = weights::frame_system::WeightInfo<Runtime>;
|
||||
type SS58Prefix = SS58Prefix;
|
||||
type OnSetCode = ();
|
||||
type MaxConsumers = frame_support::traits::ConstU32<16>;
|
||||
@@ -388,7 +388,7 @@ impl pallet_im_online::Config for Runtime {
|
||||
type NextSessionRotation = Babe;
|
||||
type ReportUnresponsiveness = Offences;
|
||||
type UnsignedPriority = ImOnlineUnsignedPriority;
|
||||
type WeightInfo = ();
|
||||
type WeightInfo = weights::pallet_im_online::WeightInfo<Runtime>;
|
||||
type MaxKeys = MaxKeys;
|
||||
type MaxPeerInHeartbeats = MaxPeerInHeartbeats;
|
||||
type MaxPeerDataEncodingSize = MaxPeerDataEncodingSize;
|
||||
@@ -409,7 +409,7 @@ impl pallet_balances::Config for Runtime {
|
||||
type MaxLocks = MaxLocks;
|
||||
type MaxReserves = MaxReserves;
|
||||
type ReserveIdentifier = [u8; 8];
|
||||
type WeightInfo = ();
|
||||
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
impl<C> frame_system::offchain::SendTransactionTypes<C> for Runtime
|
||||
@@ -442,7 +442,7 @@ impl pallet_timestamp::Config for Runtime {
|
||||
type Moment = u64;
|
||||
type OnTimestampSet = Babe;
|
||||
type MinimumPeriod = MinimumPeriod;
|
||||
type WeightInfo = ();
|
||||
type WeightInfo = weights::pallet_timestamp::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -523,7 +523,7 @@ impl pallet_indices::Config for Runtime {
|
||||
type Currency = Balances;
|
||||
type Deposit = IndexDeposit;
|
||||
type Event = Event;
|
||||
type WeightInfo = ();
|
||||
type WeightInfo = weights::pallet_indices::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -568,7 +568,7 @@ impl pallet_authorship::Config for Runtime {
|
||||
impl parachains_origin::Config for Runtime {}
|
||||
|
||||
impl parachains_configuration::Config for Runtime {
|
||||
type WeightInfo = parachains_configuration::TestWeightInfo;
|
||||
type WeightInfo = weights::runtime_parachains_configuration::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
impl parachains_shared::Config for Runtime {}
|
||||
@@ -618,7 +618,7 @@ impl parachains_hrmp::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Origin = Origin;
|
||||
type Currency = Balances;
|
||||
type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo<Self>;
|
||||
type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
impl parachains_paras_inherent::Config for Runtime {
|
||||
@@ -630,7 +630,7 @@ impl parachains_scheduler::Config for Runtime {}
|
||||
impl parachains_initializer::Config for Runtime {
|
||||
type Randomness = pallet_babe::RandomnessFromOneEpochAgo<Runtime>;
|
||||
type ForceOrigin = EnsureRoot<AccountId>;
|
||||
type WeightInfo = ();
|
||||
type WeightInfo = weights::runtime_parachains_initializer::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
impl paras_sudo_wrapper::Config for Runtime {}
|
||||
@@ -666,7 +666,7 @@ impl paras_registrar::Config for Runtime {
|
||||
type OnSwap = (Crowdloan, Slots);
|
||||
type ParaDeposit = ParaDeposit;
|
||||
type DataDepositPerByte = DataDepositPerByte;
|
||||
type WeightInfo = paras_registrar::TestWeightInfo;
|
||||
type WeightInfo = weights::runtime_common_paras_registrar::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
impl pallet_beefy::Config for Runtime {
|
||||
@@ -873,7 +873,7 @@ impl auctions::Config for Runtime {
|
||||
type SampleLength = SampleLength;
|
||||
type Randomness = pallet_babe::RandomnessFromOneEpochAgo<Runtime>;
|
||||
type InitiateOrigin = EnsureRoot<AccountId>;
|
||||
type WeightInfo = auctions::TestWeightInfo;
|
||||
type WeightInfo = weights::runtime_common_auctions::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -887,7 +887,7 @@ impl slots::Config for Runtime {
|
||||
type LeasePeriod = LeasePeriod;
|
||||
type LeaseOffset = ();
|
||||
type ForceOrigin = EnsureRoot<AccountId>;
|
||||
type WeightInfo = slots::TestWeightInfo;
|
||||
type WeightInfo = weights::runtime_common_slots::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -908,7 +908,7 @@ impl crowdloan::Config for Runtime {
|
||||
type Registrar = Registrar;
|
||||
type Auctioneer = Auctions;
|
||||
type MaxMemoLength = MaxMemoLength;
|
||||
type WeightInfo = crowdloan::TestWeightInfo;
|
||||
type WeightInfo = weights::runtime_common_crowdloan::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
impl pallet_sudo::Config for Runtime {
|
||||
@@ -925,7 +925,7 @@ impl pallet_utility::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
type PalletsOrigin = OriginCaller;
|
||||
type WeightInfo = ();
|
||||
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -995,7 +995,7 @@ impl pallet_proxy::Config for Runtime {
|
||||
type ProxyDepositBase = ProxyDepositBase;
|
||||
type ProxyDepositFactor = ProxyDepositFactor;
|
||||
type MaxProxies = MaxProxies;
|
||||
type WeightInfo = ();
|
||||
type WeightInfo = weights::pallet_proxy::WeightInfo<Runtime>;
|
||||
type MaxPending = MaxPending;
|
||||
type CallHasher = BlakeTwo256;
|
||||
type AnnouncementDepositBase = AnnouncementDepositBase;
|
||||
@@ -1016,7 +1016,7 @@ impl pallet_collective::Config for Runtime {
|
||||
type MaxProposals = MaxProposals;
|
||||
type DefaultVote = pallet_collective::PrimeDefaultVote;
|
||||
type MaxMembers = MaxMembers;
|
||||
type WeightInfo = ();
|
||||
type WeightInfo = weights::pallet_collective::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
impl pallet_membership::Config for Runtime {
|
||||
@@ -1029,7 +1029,7 @@ impl pallet_membership::Config for Runtime {
|
||||
type MembershipInitialized = Collective;
|
||||
type MembershipChanged = Collective;
|
||||
type MaxMembers = MaxMembers;
|
||||
type WeightInfo = ();
|
||||
type WeightInfo = weights::pallet_membership::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -1047,7 +1047,7 @@ impl pallet_multisig::Config for Runtime {
|
||||
type DepositBase = DepositBase;
|
||||
type DepositFactor = DepositFactor;
|
||||
type MaxSignatories = MaxSignatories;
|
||||
type WeightInfo = ();
|
||||
type WeightInfo = weights::pallet_multisig::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
@@ -1057,11 +1057,32 @@ extern crate frame_benchmarking;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
mod benches {
|
||||
define_benchmarks!(
|
||||
// Polkadot
|
||||
// NOTE: Make sure to prefix these with `runtime_common::` so
|
||||
// the that path resolves correctly in the generated file.
|
||||
[runtime_common::auctions, Auctions]
|
||||
[runtime_common::crowdloan, Crowdloan]
|
||||
[runtime_common::paras_registrar, Registrar]
|
||||
[runtime_common::slots, Slots]
|
||||
[runtime_parachains::configuration, Configuration]
|
||||
[runtime_parachains::hrmp, Hrmp]
|
||||
[runtime_parachains::initializer, Initializer]
|
||||
[runtime_parachains::paras, Paras]
|
||||
[runtime_parachains::disputes, ParasDisputes]
|
||||
[runtime_parachains::paras_inherent, ParaInherent]
|
||||
[runtime_parachains::paras, Paras]
|
||||
[runtime_parachains::ump, Ump]
|
||||
// Substrate
|
||||
[frame_benchmarking::baseline, Baseline::<Runtime>]
|
||||
[pallet_balances, Balances]
|
||||
[pallet_collective, Collective]
|
||||
[pallet_im_online, ImOnline]
|
||||
[pallet_indices, Indices]
|
||||
[pallet_membership, Membership]
|
||||
[pallet_multisig, Multisig]
|
||||
[pallet_proxy, Proxy]
|
||||
[frame_system, SystemBench::<Runtime>]
|
||||
[pallet_timestamp, Timestamp]
|
||||
[pallet_utility, Utility]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1477,6 +1498,9 @@ sp_api::impl_runtime_apis! {
|
||||
use frame_benchmarking::{Benchmarking, BenchmarkList};
|
||||
use frame_support::traits::StorageInfoTrait;
|
||||
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use frame_benchmarking::baseline::Pallet as Baseline;
|
||||
|
||||
let mut list = Vec::<BenchmarkList>::new();
|
||||
list_benchmarks!(list, extra);
|
||||
|
||||
@@ -1491,6 +1515,11 @@ sp_api::impl_runtime_apis! {
|
||||
sp_runtime::RuntimeString,
|
||||
> {
|
||||
use frame_benchmarking::{Benchmarking, BenchmarkBatch, TrackedStorageKey};
|
||||
use frame_system_benchmarking::Pallet as SystemBench;
|
||||
use frame_benchmarking::baseline::Pallet as Baseline;
|
||||
|
||||
impl frame_system_benchmarking::Config for Runtime {}
|
||||
impl frame_benchmarking::baseline::Config for Runtime {}
|
||||
|
||||
let mut batches = Vec::<BenchmarkBatch>::new();
|
||||
let whitelist: Vec<TrackedStorageKey> = vec![
|
||||
|
||||
Reference in New Issue
Block a user