mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-25 15:17:57 +00:00
445f9277ab
* Added new empty shell runtime for `BridgeHubPolkadot` (without bridging stuff) for onboarding parachain on Polkadot * Fix benchmarks/try-runtime * ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs frame_system * ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs pallet_balances * ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs pallet_multisig * ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs pallet_xcm * Fixes * ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs pallet_session * ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs pallet_utility * ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs pallet_timestamp * ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs pallet_collator_selection * ".git/.scripts/commands/bench/bench.sh" pallet bridge-hub-polkadot bridge-hubs cumulus_pallet_xcmp_queue * PR fixes * Rebase fix * Fix new runtime api * ".git/.scripts/commands/bench/bench.sh" xcm bridge-hub-polkadot bridge-hubs pallet_xcm_benchmarks::fungible * ".git/.scripts/commands/bench/bench.sh" xcm bridge-hub-polkadot bridge-hubs pallet_xcm_benchmarks::generic * Updated aura/bootNodes in `create_bridge_hub_polkadot_spec.sh` --------- Co-authored-by: command-bot <>
95 lines
2.6 KiB
Bash
Executable File
95 lines
2.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
steps=50
|
|
repeat=20
|
|
category=$1
|
|
runtimeName=$2
|
|
artifactsDir=$3
|
|
|
|
benchmarkOutput=./parachains/runtimes/$category/$runtimeName/src/weights
|
|
benchmarkRuntimeName="$runtimeName-dev"
|
|
|
|
if [[ $runtimeName == "statemint" ]] || [[ $runtimeName == "statemine" ]] || [[ $runtimeName == "westmint" ]]; then
|
|
pallets=(
|
|
pallet_assets
|
|
pallet_balances
|
|
pallet_collator_selection
|
|
pallet_multisig
|
|
pallet_proxy
|
|
pallet_session
|
|
pallet_timestamp
|
|
pallet_utility
|
|
pallet_uniques
|
|
cumulus_pallet_xcmp_queue
|
|
frame_system
|
|
pallet_xcm_benchmarks::generic
|
|
pallet_xcm_benchmarks::fungible
|
|
)
|
|
elif [[ $runtimeName == "collectives-polkadot" ]]; then
|
|
pallets=(
|
|
pallet_alliance
|
|
pallet_balances
|
|
pallet_collator_selection
|
|
pallet_collective
|
|
pallet_multisig
|
|
pallet_proxy
|
|
pallet_session
|
|
pallet_timestamp
|
|
pallet_utility
|
|
cumulus_pallet_xcmp_queue
|
|
frame_system
|
|
)
|
|
elif [[ $runtimeName == "bridge-hub-kusama" ]] || [[ $runtimeName == "bridge-hub-polkadot" ]]; then
|
|
pallets=(
|
|
frame_system
|
|
pallet_balances
|
|
pallet_collator_selection
|
|
pallet_multisig
|
|
pallet_session
|
|
pallet_timestamp
|
|
pallet_utility
|
|
cumulus_pallet_xcmp_queue
|
|
pallet_xcm_benchmarks::generic
|
|
pallet_xcm_benchmarks::fungible
|
|
)
|
|
elif [[ $runtimeName == "bridge-hub-rococo" ]]; then
|
|
pallets=(
|
|
frame_system
|
|
pallet_balances
|
|
pallet_collator_selection
|
|
pallet_multisig
|
|
pallet_session
|
|
pallet_timestamp
|
|
pallet_utility
|
|
cumulus_pallet_xcmp_queue
|
|
pallet_xcm_benchmarks::generic
|
|
pallet_xcm_benchmarks::fungible
|
|
)
|
|
else
|
|
echo "$runtimeName pallet list not found in benchmarks-ci.sh"
|
|
exit 1
|
|
fi
|
|
|
|
for pallet in ${pallets[@]}
|
|
do
|
|
output_file="${pallet//::/_}"
|
|
extra_args=""
|
|
# a little hack for pallet_xcm_benchmarks - we want to force custom implementation for XcmWeightInfo
|
|
if [[ "$pallet" == "pallet_xcm_benchmarks::generic" ]] || [[ "$pallet" == "pallet_xcm_benchmarks::fungible" ]]; then
|
|
output_file="xcm/$output_file"
|
|
extra_args="--template=./templates/xcm-bench-template.hbs"
|
|
fi
|
|
$artifactsDir/polkadot-parachain benchmark pallet \
|
|
$extra_args \
|
|
--chain=$benchmarkRuntimeName \
|
|
--execution=wasm \
|
|
--wasm-execution=compiled \
|
|
--pallet=$pallet \
|
|
--extrinsic='*' \
|
|
--steps=$steps \
|
|
--repeat=$repeat \
|
|
--json \
|
|
--header=./file_header.txt \
|
|
--output="${benchmarkOutput}/${output_file}.rs" >> $artifactsDir/${pallet}_benchmark.json
|
|
done
|