From 4e03c62db4213028f19af4031de765ea2364a62e Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Thu, 17 Mar 2022 09:03:09 +0100 Subject: [PATCH 1/3] try to fix benchmarking --- Cargo.lock | 1 - runtime/Cargo.toml | 4 +-- runtime/src/lib.rs | 5 ++-- scripts/benchmark_all_pallets.sh | 51 ++------------------------------ 4 files changed, 7 insertions(+), 54 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 48a5f46c..4918274a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1602,7 +1602,6 @@ name = "cumulus-pallet-session-benchmarking" version = "3.0.0" source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.17#db11baacc325537be74ad34517fcb28ed9ded6c6" dependencies = [ - "frame-benchmarking", "frame-support", "frame-system", "pallet-session", diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 1daf8e84..2d2f4683 100755 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -153,13 +153,13 @@ runtime-benchmarks = [ 'frame-system-benchmarking', 'frame-support/runtime-benchmarks', 'frame-system/runtime-benchmarks', - 'cumulus-pallet-session-benchmarking/runtime-benchmarks', + # 'cumulus-pallet-session-benchmarking/runtime-benchmarks', 'pallet-utility/runtime-benchmarks', 'pallet-timestamp/runtime-benchmarks', 'pallet-indices/runtime-benchmarks', 'pallet-balances/runtime-benchmarks', 'pallet-collator-selection/runtime-benchmarks', - 'pallet-xcm/runtime-benchmarks', + # 'pallet-xcm/runtime-benchmarks', 'pallet-treasury/runtime-benchmarks', ] diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 8b7ba4e8..ccbecea2 100755 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -583,13 +583,14 @@ extern crate frame_benchmarking; mod benches { define_benchmarks!( [frame_system, SystemBench::] + // [cumulus_pallet_parachain_system, ParachainSystem] [pallet_utility, Utility] [pallet_timestamp, Timestamp] [pallet_indices, Indices] [pallet_balances, Balances] [pallet_collator_selection, CollatorSelection] - [pallet_aura, Aura] - [pallet_xcm, PolkadotXcm] + // [pallet_aura, Aura] + // [pallet_xcm, PolkadotXcm] [pallet_treasury, Treasury] ); } diff --git a/scripts/benchmark_all_pallets.sh b/scripts/benchmark_all_pallets.sh index 82280cf5..b78cebc4 100755 --- a/scripts/benchmark_all_pallets.sh +++ b/scripts/benchmark_all_pallets.sh @@ -9,61 +9,14 @@ mkdir -p $DATAHIGHWAY_RUNTIME_WEIGHT_DIR pallets=( "frame_system" \ - "cumulus_pallet_parachain_system" \ + # "cumulus_pallet_parachain_system" \ "pallet_utility" \ "pallet_timestamp" \ - "pallet_identity" \ - "pallet_scheduler" \ - "parachain_info" \ "pallet_indices" \ "pallet_balances" \ - "pallet_transaction_payment" \ "pallet_collator_selection" \ - "pallet_democracy" \ - "pallet_xcm" \ - "pallet_collective" \ - "pallet_elections_phragmen" \ - "pallet_membership" \ + # "pallet_xcm" \ "pallet_treasury" \ - "pallet_bounties" \ - "pallet_child_bounties" \ - "pallet_tips" \ - "pallet_preimage" \ - "pallet_proxy" \ - "pallet_multisig" \ - "pallet_referenda" \ - "pallet_conviction_voting" \ - "membership_supernodes" \ - "roaming_operators" \ - "roaming_networks" \ - "roaming_organizations" \ - "roaming_network_servers" \ - "roaming_devices" \ - "roaming_routing_profiles" \ - "roaming_service_profiles" \ - "roaming_accounting_policies" \ - "roaming_agreement_policies" \ - "roaming_network_profiles" \ - "roaming_device_profiles" \ - "roaming_sessions" \ - "roaming_billing_policies" \ - "roaming_charging_policies" \ - "roaming_packet_bundles" \ - "mining_setting_token" \ - "mining_setting_hardware" \ - "mining_rates_token" \ - "mining_rates_hardware" \ - "mining_sampling_token" \ - "mining_sampling_hardware" \ - "mining_eligibility_token" \ - "mining_eligibility_hardware" \ - "mining_eligibility_proxy" \ - "mining_lodgements_hardware" \ - "mining_claims_token" \ - "mining_claims_hardware" \ - "mining_execution_token" \ - "exchange_rate" \ - "treasury_dao" \ ) for pallet in ${pallets[*]}; do From 0feb49e6dc838ef3de98ec4ee436d52ff0e50e58 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Thu, 17 Mar 2022 09:12:13 +0100 Subject: [PATCH 2/3] remove comments --- runtime/Cargo.toml | 2 -- runtime/src/lib.rs | 3 --- scripts/benchmark_all_pallets.sh | 2 -- 3 files changed, 7 deletions(-) diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 2d2f4683..5c85e5f6 100755 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -153,13 +153,11 @@ runtime-benchmarks = [ 'frame-system-benchmarking', 'frame-support/runtime-benchmarks', 'frame-system/runtime-benchmarks', - # 'cumulus-pallet-session-benchmarking/runtime-benchmarks', 'pallet-utility/runtime-benchmarks', 'pallet-timestamp/runtime-benchmarks', 'pallet-indices/runtime-benchmarks', 'pallet-balances/runtime-benchmarks', 'pallet-collator-selection/runtime-benchmarks', - # 'pallet-xcm/runtime-benchmarks', 'pallet-treasury/runtime-benchmarks', ] diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index ccbecea2..bdc76357 100755 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -583,14 +583,11 @@ extern crate frame_benchmarking; mod benches { define_benchmarks!( [frame_system, SystemBench::] - // [cumulus_pallet_parachain_system, ParachainSystem] [pallet_utility, Utility] [pallet_timestamp, Timestamp] [pallet_indices, Indices] [pallet_balances, Balances] [pallet_collator_selection, CollatorSelection] - // [pallet_aura, Aura] - // [pallet_xcm, PolkadotXcm] [pallet_treasury, Treasury] ); } diff --git a/scripts/benchmark_all_pallets.sh b/scripts/benchmark_all_pallets.sh index b78cebc4..c5f605af 100755 --- a/scripts/benchmark_all_pallets.sh +++ b/scripts/benchmark_all_pallets.sh @@ -9,13 +9,11 @@ mkdir -p $DATAHIGHWAY_RUNTIME_WEIGHT_DIR pallets=( "frame_system" \ - # "cumulus_pallet_parachain_system" \ "pallet_utility" \ "pallet_timestamp" \ "pallet_indices" \ "pallet_balances" \ "pallet_collator_selection" \ - # "pallet_xcm" \ "pallet_treasury" \ ) From b0e55fb8e2d89f9f3bb0243d35750a742b01c9c1 Mon Sep 17 00:00:00 2001 From: Luke Schoen Date: Thu, 17 Mar 2022 09:24:39 +0100 Subject: [PATCH 3/3] match cumulus branch polkadot_v0.9.17 in this file --- Cargo.lock | 4 ---- node/Cargo.toml | 9 +-------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4918274a..71830afe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1845,8 +1845,6 @@ dependencies = [ "derive_more", "frame-benchmarking", "frame-benchmarking-cli", - "frame-try-runtime", - "futures 0.3.21", "hex", "hex-literal", "jsonrpc-core", @@ -1876,7 +1874,6 @@ dependencies = [ "serde", "serde_json", "sp-api", - "sp-authorship", "sp-block-builder", "sp-blockchain", "sp-consensus", @@ -1888,7 +1885,6 @@ dependencies = [ "sp-runtime", "sp-session", "sp-timestamp", - "sp-tracing", "sp-transaction-pool", "substrate-build-script-utils", "substrate-frame-rpc-system", diff --git a/node/Cargo.toml b/node/Cargo.toml index a4bc950c..300ac71b 100755 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -23,14 +23,13 @@ path = 'src/main.rs' runtime-benchmarks = [ 'datahighway-parachain-runtime/runtime-benchmarks', 'polkadot-cli/runtime-benchmarks', - 'try-runtime-cli', ] try-runtime = [ 'datahighway-parachain-runtime/try-runtime' ] [dependencies] derive_more = '0.99.2' log = '0.4.14' -codec = { version = '2.0.0', package = 'parity-scale-codec', default-features = false, features = ['derive', 'max-encoded-len'] } +codec = { version = '2.0.0', package = 'parity-scale-codec' } clap = { version = '3.1', features = ['derive'] } serde = { version = '1.0.136', features = ['derive'] } serde_json = '1.0.74' @@ -47,7 +46,6 @@ module-primitives = { version = '3.0.6', default-features = false, path = '../pa # Substrate Dependencies frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' } frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' } -frame-try-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17', optional = true } try-runtime-cli = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17', optional = true } pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' } @@ -72,7 +70,6 @@ sc-transaction-pool-api = { git = 'https://github.com/paritytech/substrate', bra sc-tracing = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' } ## Substrate Primitive Dependencies -sp-authorship = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' } sp-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' } sp-block-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' } sp-blockchain = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' } @@ -85,7 +82,6 @@ sp-offchain = { git = 'https://github.com/paritytech/substrate', branch = 'polka sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' } sp-session = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' } sp-timestamp = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' } -sp-tracing = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' } sp-transaction-pool = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.17' } # Cumulus dependencies @@ -106,6 +102,3 @@ polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = polkadot-primitives = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.17' } polkadot-service = { git = 'https://github.com/paritytech/polkadot', branch = 'release-v0.9.17' } xcm = { git = 'https://github.com/paritytech/polkadot', default-features = false, branch = 'release-v0.9.17' } - -[dev-dependencies] -futures = { version = '0.3.16' }