mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
Bridge hub kusama fine-tuning before release (#1999)
* Fix benchmarks-ci.sh - missing pallet_utility/pallet_multisig * Missing ParentAsSuperuser for bridge-hubs * Fixed missing stuff in benchmarks.yml * Added MigrateToTrackInactive + CheckingAccount (for completness as other runtimes) * Measured xcm weights for bridge-hubs * Fix for fungible benchmarks * ".git/.scripts/bench-bot.sh" xcm bridge-hub-kusama bridge-hubs pallet_xcm_benchmarks::fungible * ".git/.scripts/bench-bot.sh" xcm bridge-hub-rococo bridge-hubs pallet_xcm_benchmarks::generic * ".git/.scripts/bench-bot.sh" xcm bridge-hub-rococo bridge-hubs pallet_xcm_benchmarks::fungible * ".git/.scripts/bench-bot.sh" xcm bridge-hub-kusama bridge-hubs pallet_xcm_benchmarks::generic * Reverting migrations - no need for them * script for generate genesis spec/head/wasm * Adding invulnerables and session.keys to the script (https://github.com/paritytech/devops/issues/2196) * update chainspec with cmd: ./scripts/create_bridge_hub_kusama_spec.sh ./target/release/wbuild/bridge-hub-kusama-runtime/bridge_hub_kusama_runtime.compact.compressed.wasm 1003 * para_id 1003 -> 1002, cmd: ./scripts/create_bridge_hub_kusama_spec.sh ./target/release/wbuild/bridge-hub-kusama-runtime/bridge_hub_kusama_runtime.compact.compressed.wasm 1002 Co-authored-by: command-bot <>
This commit is contained in:
@@ -43,10 +43,14 @@ elif [[ $runtimeName == "bridge-hub-rococo" ]] || [[ $runtimeName == "bridge-hub
|
||||
pallets=(
|
||||
frame_system
|
||||
pallet_balances
|
||||
pallet_collator_selection
|
||||
pallet_multisig
|
||||
pallet_session
|
||||
pallet_timestamp
|
||||
pallet_collator_selection
|
||||
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"
|
||||
|
||||
@@ -57,3 +57,24 @@ benchmarks-collectives:
|
||||
tags:
|
||||
- weights
|
||||
|
||||
benchmarks-bridge-hubs:
|
||||
stage: benchmarks-run
|
||||
extends:
|
||||
- .collect-artifacts
|
||||
- .benchmarks-refs
|
||||
before_script:
|
||||
- !reference [.docker-env, before_script]
|
||||
timeout: 1d
|
||||
script:
|
||||
- ./scripts/benchmarks-ci.sh bridge-hubs bridge-hub-kusama ./artifacts
|
||||
- ./scripts/benchmarks-ci.sh bridge-hubs bridge-hub-rococo ./artifacts
|
||||
- export CURRENT_TIME=$(date '+%s')
|
||||
- export BRANCHNAME="weights-bridge-hubs-${CI_COMMIT_BRANCH}-${CURRENT_TIME}"
|
||||
- !reference [.git-commit-push, script]
|
||||
- ./scripts/ci/create-benchmark-pr.sh "[benchmarks] Update weights for bridge-hubs" "$BRANCHNAME"
|
||||
- rm -f ./artifacts/polkadot-parachain
|
||||
- rm -f ./artifacts/test-parachain
|
||||
after_script:
|
||||
- rm -rf .git/config
|
||||
tags:
|
||||
- weights
|
||||
|
||||
Executable
+106
@@ -0,0 +1,106 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
usage() {
|
||||
echo Usage:
|
||||
echo "$1 <srtool compressed runtime path>"
|
||||
echo "$2 <para_id>"
|
||||
echo "e.g.: ./scripts/create_bridge_hub_kusama_spec.sh ./target/release/wbuild/bridge-hub-kusama-runtime/bridge_hub_kusama_runtime.compact.compressed.wasm 1003"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ -z "$2" ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rt_path=$1
|
||||
para_id=$2
|
||||
|
||||
echo "Generating chain spec for runtime: $rt_path and para_id: $para_id"
|
||||
|
||||
binary="./target/release/polkadot-parachain"
|
||||
|
||||
# build the chain spec we'll manipulate
|
||||
$binary build-spec --chain bridge-hub-kusama-dev > chain-spec-plain.json
|
||||
|
||||
# convert runtime to hex
|
||||
cat $rt_path | od -A n -v -t x1 | tr -d ' \n' > rt-hex.txt
|
||||
|
||||
# replace the runtime in the spec with the given runtime and set some values to production
|
||||
cat chain-spec-plain.json | jq --rawfile code rt-hex.txt '.genesis.runtime.system.code = ("0x" + $code)' \
|
||||
| jq '.name = "Kusama BridgeHub"' \
|
||||
| jq '.id = "bridge-hub-kusama"' \
|
||||
| jq '.chainType = "Live"' \
|
||||
| jq '.bootNodes = [
|
||||
"/dns/kusama-bridge-hub-collator-ew1-0.polkadot.io/tcp/30334/p2p/12D3KooWP2Gngt4tt2sz5BgDaAbMTxasPWk3V2Z99bQTmFcAorqa",
|
||||
"/dns/kusama-bridge-hub-collator-ew1-1.polkadot.io/tcp/30334/p2p/12D3KooWMmL3FQuYmruBui1sbY4MwNmvicinrePi1Yq4QMRSYHoR",
|
||||
"/dns/kusama-bridge-hub-collator-ue4-0.polkadot.io/tcp/30334/p2p/12D3KooWQpTocTck1tNBzMNTHJ3kSv4vzv8Yf9FpVkfGnungbez4",
|
||||
"/dns/kusama-bridge-hub-collator-ue4-1.polkadot.io/tcp/30334/p2p/12D3KooWRgtJqKEaMi7hkU4VMiGhpHTJeL8N7JgL7d9gwooPv4eW",
|
||||
|
||||
"/dns/kusama-bridge-hub-connect-ew1-0.polkadot.io/tcp/30334/p2p/12D3KooWPQQPivrqQ51kRTDc2R1mtqwKT4GGtk2rapkY4FrwHrEp",
|
||||
"/dns/kusama-bridge-hub-connect-ew1-1.polkadot.io/tcp/30334/p2p/12D3KooWPcF9Yk4gYrMju9CyWCV69hAFXbYsnxCLogwLGu9QFTRn",
|
||||
"/dns/kusama-bridge-hub-connect-ue4-0.polkadot.io/tcp/30334/p2p/12D3KooWMf1sVnJDTkKWtaThqvrgcSPLbfGXttSqbwhM2DJp9BUG",
|
||||
"/dns/kusama-bridge-hub-connect-ue4-1.polkadot.io/tcp/30334/p2p/12D3KooWQaV7wMfNVKy2aMz4Lds3TTxgSDyZAUEnbAZMfD8rW3ow",
|
||||
|
||||
"/dns/kusama-bridge-hub-connect-ew1-0.polkadot.io/tcp/443/wss/p2p/12D3KooWPQQPivrqQ51kRTDc2R1mtqwKT4GGtk2rapkY4FrwHrEp",
|
||||
"/dns/kusama-bridge-hub-connect-ew1-1.polkadot.io/tcp/443/wss/p2p/12D3KooWPcF9Yk4gYrMju9CyWCV69hAFXbYsnxCLogwLGu9QFTRn",
|
||||
"/dns/kusama-bridge-hub-connect-ue4-0.polkadot.io/tcp/443/wss/p2p/12D3KooWMf1sVnJDTkKWtaThqvrgcSPLbfGXttSqbwhM2DJp9BUG",
|
||||
"/dns/kusama-bridge-hub-connect-ue4-1.polkadot.io/tcp/443/wss/p2p/12D3KooWQaV7wMfNVKy2aMz4Lds3TTxgSDyZAUEnbAZMfD8rW3ow"
|
||||
|
||||
]' \
|
||||
| jq '.relay_chain = "kusama"' \
|
||||
| jq --argjson para_id $para_id '.para_id = $para_id' \
|
||||
| jq --argjson para_id $para_id '.genesis.runtime.parachainInfo.parachainId = $para_id' \
|
||||
| jq '.genesis.runtime.balances.balances = []' \
|
||||
| jq '.genesis.runtime.collatorSelection.invulnerables = [
|
||||
"DQkekNBt8g6D7bPUEqhgfujADxzzfivr1qQZJkeGzAqnEzF",
|
||||
"HbUc5qrLtKAZvasioiTSf1CunaN2SyEwvfsgMuYQjXA5sfk",
|
||||
"JEe4NcVyuWFEwZe4WLfRtynDswyKgvLS8H8r4Wo9d3t61g1",
|
||||
"FAe4DGhQHKTm35n5MgBFNBZvyEJcm7QAwgnVNQU8KXP2ixn"
|
||||
]' \
|
||||
| jq '.genesis.runtime.session.keys = [
|
||||
[
|
||||
"DQkekNBt8g6D7bPUEqhgfujADxzzfivr1qQZJkeGzAqnEzF",
|
||||
"DQkekNBt8g6D7bPUEqhgfujADxzzfivr1qQZJkeGzAqnEzF",
|
||||
{
|
||||
"aura": "5E7AiV9ygGUcfdK3XVoJsew7fsu18uvKQHYhksE5PXDNfRL9"
|
||||
}
|
||||
],
|
||||
[
|
||||
"HbUc5qrLtKAZvasioiTSf1CunaN2SyEwvfsgMuYQjXA5sfk",
|
||||
"HbUc5qrLtKAZvasioiTSf1CunaN2SyEwvfsgMuYQjXA5sfk",
|
||||
{
|
||||
"aura": "5CyXoMh8cA2MSk55JASpCfhCg44iSG5fBwmhvSfXUUS3uhPR"
|
||||
}
|
||||
],
|
||||
[
|
||||
"JEe4NcVyuWFEwZe4WLfRtynDswyKgvLS8H8r4Wo9d3t61g1",
|
||||
"JEe4NcVyuWFEwZe4WLfRtynDswyKgvLS8H8r4Wo9d3t61g1",
|
||||
{
|
||||
"aura": "5Grj5pN52kKU61qK9qP5cf9ADuyowe2WVvYWxMNK1QqAM8qf"
|
||||
}
|
||||
],
|
||||
[
|
||||
"FAe4DGhQHKTm35n5MgBFNBZvyEJcm7QAwgnVNQU8KXP2ixn",
|
||||
"FAe4DGhQHKTm35n5MgBFNBZvyEJcm7QAwgnVNQU8KXP2ixn",
|
||||
{
|
||||
"aura": "5EHTyftGjcHfe71VVuZqCeLbHNf4ptYzgdAMMyqpTNbs5Rrp"
|
||||
}
|
||||
]
|
||||
]' \
|
||||
> edited-chain-spec-plain.json
|
||||
|
||||
# build a raw spec
|
||||
$binary build-spec --chain edited-chain-spec-plain.json --raw > chain-spec-raw.json
|
||||
cp chain-spec-raw.json ./parachains/chain-specs/bridge-hub-kusama.json
|
||||
|
||||
# build genesis data
|
||||
$binary export-genesis-state --chain chain-spec-raw.json > bridge-hub-kusama-genesis-head-data
|
||||
|
||||
# build genesis wasm
|
||||
$binary export-genesis-wasm --chain chain-spec-raw.json > bridge-hub-kusama-wasm
|
||||
Reference in New Issue
Block a user