diff --git a/commands/bench-all/bench-all.cmd.json b/commands/bench-all/bench-all.cmd.json index fb8fdfa..035a1a8 100644 --- a/commands/bench-all/bench-all.cmd.json +++ b/commands/bench-all/bench-all.cmd.json @@ -24,7 +24,7 @@ "description": "Pallet + Overhead Benchmark for Polkadot", "repos": ["polkadot-sdk"], "args": { - "runtime": { "label": "Runtime", "type_one_of": ["kusama", "polkadot", "rococo", "westend"] }, + "runtime": { "label": "Runtime", "type_one_of": ["rococo", "westend"] }, "target_dir": { "label": "Target Directory", "type_string":"polkadot" } } }, diff --git a/commands/bench-overhead/bench-overhead.cmd.json b/commands/bench-overhead/bench-overhead.cmd.json index a83cb14..bcfb85c 100644 --- a/commands/bench-overhead/bench-overhead.cmd.json +++ b/commands/bench-overhead/bench-overhead.cmd.json @@ -17,7 +17,7 @@ "description": "Runs `benchmark overhead` and commits back to PR the updated `extrinsic_weights.rs` files", "repos": ["polkadot-sdk"], "args": { - "runtime": { "label": "Runtime", "type_one_of": ["polkadot", "kusama", "rococo", "westend"] }, + "runtime": { "label": "Runtime", "type_one_of": ["rococo", "westend"] }, "target_dir": { "label": "Target Directory", "type_string": "polkadot" } } }, @@ -32,7 +32,7 @@ "description": "Runs `benchmark overhead` and commits back to PR the updated `extrinsic_weights.rs` files", "repos": ["polkadot-sdk"], "args": { - "runtime": { "label": "Runtime", "type_one_of": ["asset-hub-polkadot", "asset-hub-kusama", "asset-hub-westend", "asset-hub-rococo"] }, + "runtime": { "label": "Runtime", "type_one_of": ["asset-hub-westend", "asset-hub-rococo"] }, "target_dir": { "label": "Target Directory", "type_string": "cumulus" } } }, diff --git a/commands/bench/bench.cmd.json b/commands/bench/bench.cmd.json index b508bdc..59d783a 100644 --- a/commands/bench/bench.cmd.json +++ b/commands/bench/bench.cmd.json @@ -26,7 +26,7 @@ "repos": ["command-bot-test", "polkadot-sdk"], "args": { "subcommand": { "label": "Subcommand", "type_one_of": ["runtime", "xcm"] }, - "runtime": { "label": "Runtime", "type_one_of": ["polkadot", "kusama", "rococo", "westend"] }, + "runtime": { "label": "Runtime", "type_one_of": ["rococo", "westend"] }, "pallet": { "label": "Pallet", "type_rule": "^([a-z_]+)([:]{2}[a-z_]+)?$", "example": "pallet_name" }, "target_dir": { "label": "Target Directory", "type_string": "polkadot" } } @@ -36,7 +36,7 @@ "repos": ["polkadot-sdk"], "args": { "subcommand": { "label": "Subcommand", "type_one_of": ["pallet", "xcm"] }, - "runtime": { "label": "Runtime", "type_one_of": ["asset-hub-polkadot", "asset-hub-kusama", "asset-hub-westend", "asset-hub-rococo"] }, + "runtime": { "label": "Runtime", "type_one_of": ["asset-hub-westend", "asset-hub-rococo"] }, "pallet": { "label": "Pallet", "type_rule": "^([a-z_]+)([:]{2}[a-z_]+)?$", "example": "pallet_name" }, "runtime_dir": { "label": "Runtime Dir", "type_string": "assets" }, "target_dir": { "label": "Target Directory", "type_string": "cumulus" } @@ -47,7 +47,7 @@ "repos": ["polkadot-sdk"], "args": { "subcommand": { "label": "Subcommand", "type_one_of": ["pallet", "xcm"] }, - "runtime": { "label": "Runtime", "type_one_of": ["collectives-polkadot", "collectives-westend"] }, + "runtime": { "label": "Runtime", "type_one_of": ["collectives-westend"] }, "pallet": { "label": "Pallet", "type_rule": "^([a-z_]+)([:]{2}[a-z_]+)?$", "example": "pallet_name" }, "runtime_dir": { "label": "Runtime Dir", "type_string": "collectives" }, "target_dir": { "label": "Target Directory", "type_string": "cumulus" } @@ -69,7 +69,7 @@ "repos": ["polkadot-sdk"], "args": { "subcommand": { "label": "Subcommand", "type_one_of": ["pallet", "xcm"] }, - "runtime": { "label": "Runtime", "type_one_of": ["bridge-hub-polkadot", "bridge-hub-kusama", "bridge-hub-rococo"] }, + "runtime": { "label": "Runtime", "type_one_of": ["bridge-hub-rococo", "bridge-hub-westend"] }, "pallet": { "label": "Pallet", "type_rule": "^([a-z_]+)([:]{2}[a-z_]+)?$", "example": "pallet_name" }, "runtime_dir": { "label": "Runtime Dir", "type_string": "bridge-hubs" }, "target_dir": { "label": "Target Directory", "type_string": "cumulus" } @@ -91,7 +91,7 @@ "repos": ["polkadot-sdk"], "args": { "subcommand": { "label": "Subcommand", "type_one_of": ["pallet"] }, - "runtime": { "label": "Runtime", "type_one_of": ["glutton-kusama", "glutton-kusama-dev-1300", "glutton-westend", "glutton-westend-dev-1300"] }, + "runtime": { "label": "Runtime", "type_one_of": ["glutton-westend", "glutton-westend-dev-1300"] }, "pallet": { "label": "Pallet", "type_rule": "^([a-z_]+)([:]{2}[a-z_]+)?$", "example": "pallet_name" }, "runtime_dir": { "label": "Runtime Dir", "type_string": "glutton" }, "target_dir": { "label": "Target Directory", "type_string": "cumulus" } diff --git a/commands/bench/bench.sh b/commands/bench/bench.sh index 6f5c635..e9ced0e 100755 --- a/commands/bench/bench.sh +++ b/commands/bench/bench.sh @@ -127,7 +127,18 @@ main() { git remote add \ github \ "https://token:${GITHUB_TOKEN}@github.com/${GH_CONTRIBUTOR}/${GH_CONTRIBUTOR_REPO}.git" - git push github "HEAD:${GH_CONTRIBUTOR_BRANCH}" + + push_changes() { + git push github "HEAD:${GH_CONTRIBUTOR_BRANCH}" + } + + # Attempt to push changes + if ! push_changes; then + echo "Push failed, trying to rebase..." + git pull --rebase github "${GH_CONTRIBUTOR_BRANCH}" + # After successful rebase, try pushing again + push_changes + fi } main "$@" diff --git a/commands/bench/lib/bench-all-cumulus.sh b/commands/bench/lib/bench-all-cumulus.sh index 55f16f2..cd458b0 100755 --- a/commands/bench/lib/bench-all-cumulus.sh +++ b/commands/bench/lib/bench-all-cumulus.sh @@ -75,13 +75,10 @@ echo "[+] Compiling benchmarks..." cargo build --profile $profile --locked --features=runtime-benchmarks -p polkadot-parachain-bin # Assets -run_cumulus_bench assets asset-hub-kusama -run_cumulus_bench assets asset-hub-polkadot run_cumulus_bench assets asset-hub-westend run_cumulus_bench assets asset-hub-rococo # Collectives -run_cumulus_bench collectives collectives-polkadot run_cumulus_bench collectives collectives-westend # Coretime @@ -89,10 +86,8 @@ run_cumulus_bench coretime coretime-rococo run_cumulus_bench coretime coretime-westend # Bridge Hubs -run_cumulus_bench bridge-hubs bridge-hub-polkadot -run_cumulus_bench bridge-hubs bridge-hub-kusama run_cumulus_bench bridge-hubs bridge-hub-rococo +run_cumulus_bench bridge-hubs bridge-hub-westend # Glutton -run_cumulus_bench glutton glutton-kusama 1300 run_cumulus_bench glutton glutton-westend 1300 diff --git a/commands/bench/lib/bench-all-substrate.sh b/commands/bench/lib/bench-all-substrate.sh index 3379f53..9d3522d 100644 --- a/commands/bench/lib/bench-all-substrate.sh +++ b/commands/bench/lib/bench-all-substrate.sh @@ -37,10 +37,10 @@ set -E export RUST_LOG="${RUST_LOG:-error}" echo "[+] Compiling Substrate benchmarks..." -cargo build --profile=$profile --locked --features=runtime-benchmarks -p node-cli +cargo build --profile=$profile --locked --features=runtime-benchmarks -p staging-node-cli # The executable to use. -SUBSTRATE="./target/$profile/substrate" +SUBSTRATE="./target/$profile/substrate-node" # Manually exclude some pallets. EXCLUDED_PALLETS=( diff --git a/commands/bench/lib/bench-pallet.sh b/commands/bench/lib/bench-pallet.sh index 11631a7..df05a7b 100644 --- a/commands/bench/lib/bench-pallet.sh +++ b/commands/bench/lib/bench-pallet.sh @@ -104,7 +104,7 @@ bench_pallet() { local runtime_dir="${out:-""}" local chain="$runtime" - # to support specifying parachain id from runtime name (e.g. ["glutton-kusama", "glutton-kusama-dev-1300"]) + # to support specifying parachain id from runtime name (e.g. ["glutton-westend", "glutton-westend-dev-1300"]) # If runtime ends with "-dev" or "-dev-\d+", leave as it is, otherwise concat "-dev" at the end of $chain if [[ ! "$runtime" =~ -dev(-[0-9]+)?$ ]]; then chain="${runtime}-dev" diff --git a/commands/fmt/fmt.cmd.json b/commands/fmt/fmt.cmd.json index e22eb25..bd2e805 100644 --- a/commands/fmt/fmt.cmd.json +++ b/commands/fmt/fmt.cmd.json @@ -1,7 +1,7 @@ { "$schema": "../../node_modules/command-bot/src/schema/schema.cmd.json", "command": { - "description": "RustFMT. Formatting Rust code according to style guidelines and commits to your PR.", + "description": "FMT. Formatting Rust code + Toml according to style guidelines and commits to your PR.", "configuration": { "gitlab": { "job": { diff --git a/commands/fmt/fmt.sh b/commands/fmt/fmt.sh index 84368eb..26beca5 100755 --- a/commands/fmt/fmt.sh +++ b/commands/fmt/fmt.sh @@ -9,9 +9,13 @@ main() { # setup. cmd_runner_setup - # format. + # format rust code. cargo +nightly fmt + # format toml. + # since paritytech/ci-unified:bullseye-1.73.0-2023-11-01-v20231204 includes taplo-cli + taplo format --config .config/taplo.toml + # commit. git add . git commit -m "$COMMIT_MESSAGE" diff --git a/commands/try-runtime/try-runtime.cmd.json b/commands/try-runtime/try-runtime.cmd.json index 5c8ffab..4d7a645 100644 --- a/commands/try-runtime/try-runtime.cmd.json +++ b/commands/try-runtime/try-runtime.cmd.json @@ -8,7 +8,7 @@ "description": "Run try-runtime with specified runtime for monorepo Polkadot SDK", "repos": ["polkadot-sdk"], "args": { - "chain": { "label": "Chain", "type_one_of": ["polkadot", "kusama", "westend", "rococo"] }, + "chain": { "label": "Chain", "type_one_of": ["westend", "rococo"] }, "chain_node": { "label": "Chain Node", "type_string": "polkadot" } } },