mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Add Collectives Parachain (#1346)
* add new runtime and remove unnecessary pallets * make runtime build * add collectives to collator node * sketch alliance config in runtime * Slash handler was supposed to be commented out (for now) * correct signature * move to impls * add alliance to runtime * rustfmt * IsReserve, remove Ping, update fn deposit * add transaction_payment event * Update parachains/runtimes/collectives/collectives-polkadot/src/lib.rs Co-authored-by: Squirrel <gilescope@gmail.com> * fmt * add genesis config to chain spec * fix merge * local and dev configs only (for now) * remove duplicate imports * Collectives polkadot runtime to cargo workspace members (#1397) * Collectives polkadot runtime: use unit type impl for identity verifier (#1398) * apply fn rename * fmt * one less todo * Less code in magic macros (#1407) * Less code in magic macros * cargo fmt * Bench alliance (#1427) * add benchmarks * call one script from the other * shebang changes so works on nixos too. * bench in parallel as separate jobs * hyphens can turn into underscores * remove workaround to trigger bench Co-authored-by: alvicsam <alvicsam@gmail.com> Co-authored-by: paritytech-ci <paritytech-ci@parity.io> * enable ci jobs * fix publish bench results jobs * chainspecs for collectives-westend (#1441) * initial chainspecs for collections relay chain * plumb in the collectives-westend chainspec * add Runtime::CollectivesWestend * lock * Collectives: teleport slashed assets (#1433) * Collectives: teleport slashed assets * fmt * Cargo.lock > polkadot-parachain 0.9.25 * create temp account for imbalance * treasury acc id from pallet id * move accounts into constants, use here junction for assets * assets location is relay chain, accounts as parameters * fix typos * fix typo * Update parachains/runtimes/collectives/collectives-polkadot/src/constants.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Move alliance proposal provider to impls.rs (#1464) * Move to impls alliance proposal provider * rustfmt * Bumping spec version (so that we can redeploy with slashing change.) * cargo lock * slurp collectives digest to make appear in release notes (#1473) * add slurp * Slurp better :) * Bring some order Co-authored-by: Chevdor <chevdor@users.noreply.github.com> Co-authored-by: Wilfried Kopp <wilfried@parity.io> * reorder barrier * Update parachains/runtimes/collectives/collectives-polkadot/src/xcm_config.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> * address review * clean construct runtime * fmt * looks pretty but brings in too much Co-authored-by: Squirrel <gilescope@gmail.com> Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> Co-authored-by: alvicsam <alvicsam@gmail.com> Co-authored-by: paritytech-ci <paritytech-ci@parity.io> Co-authored-by: Chevdor <chevdor@users.noreply.github.com> Co-authored-by: Wilfried Kopp <wilfried@parity.io> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
+37
-16
@@ -1,30 +1,50 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
steps=50
|
||||
repeat=20
|
||||
category=$1
|
||||
runtimeName=$2
|
||||
artifactsDir=$3
|
||||
|
||||
benchmarkOutput=./parachains/runtimes/$category/$runtimeName/src/weights
|
||||
benchmarkRuntimeName="$runtimeName-dev"
|
||||
|
||||
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
|
||||
)
|
||||
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
|
||||
)
|
||||
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
|
||||
)
|
||||
else
|
||||
echo "$runtimeName pallet list not found in benchmarks-ci.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for pallet in ${pallets[@]}
|
||||
do
|
||||
./artifacts/polkadot-parachain benchmark pallet \
|
||||
$artifactsDir/polkadot-parachain benchmark pallet \
|
||||
--chain=$benchmarkRuntimeName \
|
||||
--execution=wasm \
|
||||
--wasm-execution=compiled \
|
||||
@@ -34,5 +54,6 @@ do
|
||||
--repeat=$repeat \
|
||||
--json \
|
||||
--header=./file_header.txt \
|
||||
--output=$benchmarkOutput >> ./artifacts/${pallet}_benchmark.json
|
||||
--output=$benchmarkOutput >> $artifactsDir/${pallet}_benchmark.json
|
||||
|
||||
done
|
||||
|
||||
+6
-62
@@ -1,65 +1,9 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
steps=50
|
||||
repeat=20
|
||||
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
statemineOutput=./parachains/runtimes/assets/statemine/src/weights
|
||||
statemintOutput=./parachains/runtimes/assets/statemint/src/weights
|
||||
westmintOutput=./parachains/runtimes/assets/westmint/src/weights
|
||||
${__dir}/benchmarks-ci.sh collectives collectives-polkadot target/production
|
||||
|
||||
statemineChain=statemine-dev
|
||||
statemintChain=statemint-dev
|
||||
westmintChain=westmint-dev
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
for p in ${pallets[@]}
|
||||
do
|
||||
./target/production/polkadot-parachain benchmark pallet \
|
||||
--chain=$statemineChain \
|
||||
--execution=wasm \
|
||||
--wasm-execution=compiled \
|
||||
--pallet=$p \
|
||||
--extrinsic='*' \
|
||||
--steps=$steps \
|
||||
--repeat=$repeat \
|
||||
--json-file=./bench-statemine.json \
|
||||
--header=./file_header.txt \
|
||||
--output=$statemineOutput
|
||||
|
||||
./target/production/polkadot-parachain benchmark pallet \
|
||||
--chain=$statemintChain \
|
||||
--execution=wasm \
|
||||
--wasm-execution=compiled \
|
||||
--pallet=$p \
|
||||
--extrinsic='*' \
|
||||
--steps=$steps \
|
||||
--repeat=$repeat \
|
||||
--json-file=./bench-statemint.json \
|
||||
--header=./file_header.txt \
|
||||
--output=$statemintOutput
|
||||
|
||||
./target/production/polkadot-parachain benchmark pallet \
|
||||
--chain=$westmintChain \
|
||||
--execution=wasm \
|
||||
--wasm-execution=compiled \
|
||||
--pallet=$p \
|
||||
--extrinsic='*' \
|
||||
--steps=$steps \
|
||||
--repeat=$repeat \
|
||||
--json-file=./bench-westmint.json \
|
||||
--header=./file_header.txt \
|
||||
--output=$westmintOutput
|
||||
done
|
||||
${__dir}/benchmarks-ci.sh assets statemine target/production
|
||||
${__dir}/benchmarks-ci.sh assets statemint target/production
|
||||
${__dir}/benchmarks-ci.sh assets westmint target/production
|
||||
|
||||
@@ -76,6 +76,7 @@ else
|
||||
logger.debug("Re-using:#{substrate_data}")
|
||||
end
|
||||
|
||||
POLKADOT_COLLECTIVES_DIGEST = ENV['SHELL_DIGEST'] || 'digests/polkadot-collectives-srtool-digest.json'
|
||||
SHELL_DIGEST = ENV['SHELL_DIGEST'] || 'digests/shell-srtool-digest.json'
|
||||
WESTMINT_DIGEST = ENV['WESTMINT_DIGEST'] || 'digests/westmint-srtool-digest.json'
|
||||
STATEMINE_DIGEST = ENV['STATEMINE_DIGEST'] || 'digests/statemine-srtool-digest.json'
|
||||
@@ -112,24 +113,31 @@ else
|
||||
--slurpfile srtool_statemint %s \
|
||||
--slurpfile srtool_rococo_parachain %s \
|
||||
--slurpfile srtool_contracts_rococo %s \
|
||||
--slurpfile srtool_polkadot_collectives %s \
|
||||
-n \'{
|
||||
cumulus: $cumulus[0],
|
||||
substrate: $substrate[0],
|
||||
polkadot: $polkadot[0],
|
||||
cumulus: $cumulus[0],
|
||||
substrate: $substrate[0],
|
||||
polkadot: $polkadot[0],
|
||||
srtool: [
|
||||
{ name: "rococo", data: $srtool_rococo_parachain[0] },
|
||||
{ name: "shell", data: $srtool_shell[0] },
|
||||
{ name: "westmint", data: $srtool_westmint[0] },
|
||||
{ name: "statemint", data: $srtool_statemint[0] },
|
||||
{ name: "statemine", data: $srtool_statemine[0] },
|
||||
{ name: "contracts", data: $srtool_contracts_rococo[0] }
|
||||
] }\' > context.json', cumulus_data, substrate_data, polkadot_data,
|
||||
SHELL_DIGEST,
|
||||
WESTMINT_DIGEST,
|
||||
STATEMINE_DIGEST,
|
||||
STATEMINT_DIGEST,
|
||||
ROCOCO_PARA_DIGEST,
|
||||
CANVAS_KUSAMA_DIGEST)
|
||||
{ name: "shell", data: $srtool_shell[0] },
|
||||
{ name: "westmint", data: $srtool_westmint[0] },
|
||||
{ name: "statemine", data: $srtool_statemine[0] },
|
||||
{ name: "statemint", data: $srtool_statemint[0] },
|
||||
{ name: "rococo", data: $srtool_rococo_parachain[0] },
|
||||
{ name: "contracts", data: $srtool_contracts_rococo[0] }
|
||||
{ name: "polkadot-collectives", data: $srtool_polkadot_collectives[0] },
|
||||
] }\' > context.json',
|
||||
cumulus_data,
|
||||
substrate_data,
|
||||
polkadot_data,
|
||||
SHELL_DIGEST,
|
||||
WESTMINT_DIGEST,
|
||||
STATEMINE_DIGEST,
|
||||
STATEMINT_DIGEST,
|
||||
ROCOCO_PARA_DIGEST,
|
||||
CANVAS_KUSAMA_DIGEST,
|
||||
POLKADOT_COLLECTIVES_DIGEST
|
||||
)
|
||||
end
|
||||
system(cmd)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user