Skip to content

Commit

Permalink
remove politest
Browse files Browse the repository at this point in the history
  • Loading branch information
JuaniRios committed Jun 24, 2024
1 parent 6a746b3 commit ac3f194
Show file tree
Hide file tree
Showing 23 changed files with 29 additions and 3,349 deletions.
85 changes: 0 additions & 85 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ substrate-build-script-utils = { version = "11.0.0" }
cumulus-pallet-session-benchmarking = { version = "9.0.0", default-features = false }

# Runtimes
politest-runtime = { path = "runtimes/politest" }
polimec-runtime = { path = "runtimes/polimec" }
asset-hub-polkadot-runtime = { git = 'https://github.com/polkadot-fellows/runtimes', default-features = false, rev = '59172d5fb8feea2646490618bead3b2b4fb06220' }
polkadot-runtime-constants = { git = 'https://github.com/polkadot-fellows/runtimes', default-features = false, rev = '59172d5fb8feea2646490618bead3b2b4fb06220' }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Polimec is a blockchain platform built on Substrate, designed for robustness and
authorizeUpgrade : 0xe8d26589c2c5257c3f52e21ba420eb0c6fd25fa5cee0878bc183ca0256dee9bc
IPFS : Qmbi9ymmCdJVJCLsBAmYKWGYgYjGuHJLRdCPj9fvXQ3X9U
BLAKE2_256 : 0x7ac6016ddf9179bb2d6d0284df4d60323519f20016647ba887057756d131b51e
Wasm : runtimes/testnet/target/srtool/release/wbuild/politest-runtime/politest_runtime.compact.wasm
Wasm : runtimes/testnet/target/srtool/release/wbuild/polimec-runtime/polimec_runtime.compact.wasm
== Compressed
Version : polimec-mainnet-2 (polimec-mainnet-0.tx1.au1)
Expand All @@ -70,7 +70,7 @@ Polimec is a blockchain platform built on Substrate, designed for robustness and
authorizeUpgrade : 0x8dcd2827b4c86be23da13a93a8d63a38ad4952c1450738ed8471982bcb4fc714
IPFS : QmPFr7QRFKM5jSuYfBNAg21dfiKEpvMxXMydLDZuW9yLFH
BLAKE2_256 : 0x7341cc921de52eaea99af5865c3e36562cf49158dcb961daef3c2e06f531ae00
Wasm : runtimes/testnet/target/srtool/release/wbuild/politest-runtime/politest_runtime.compact.compressed.wasm
Wasm : runtimes/testnet/target/srtool/release/wbuild/polimec-runtime/polimec_runtime.compact.compressed.wasm
```
- **Utility Scripts**: Check the `scripts` directory for useful scripts. Use [just](https://github.com/casey/just) for executing scripts, e.g., `$ just build-parachain-node`.

Expand Down
258 changes: 0 additions & 258 deletions chain-specs/politest/plain-politest.json

This file was deleted.

1 change: 0 additions & 1 deletion chain-specs/politest/politest-4392.state

This file was deleted.

1 change: 0 additions & 1 deletion chain-specs/politest/politest-4392.wasm

This file was deleted.

131 changes: 0 additions & 131 deletions chain-specs/politest/raw-politest.json

This file was deleted.

37 changes: 15 additions & 22 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@ default:
@just --list

# Build the "Base" Runtime using srtool
build-polimec-srtool:
build-polimec-polkadot-srtool:
srtool build --root -p polimec-runtime --profile production --runtime-dir runtimes/polimec --build-opts="--features=on-chain-release-build" --no-wasm-std

build-rolimec-srtool:
build-polimec-paseo-srtool:
srtool build --root -p polimec-runtime --profile production --runtime-dir runtimes/polimec --build-opts="--features=on-chain-release-build,fast-mode" --no-wasm-std

# Build the "Testnet" Runtime using srtool
build-politest-srtool:
srtool build --root -p politest-runtime --profile production --runtime-dir runtimes/politest --build-opts="--features=on-chain-release-build,fast-mode" --no-wasm-std

# Test the runtimes features
test-runtime-features runtime="polimec-runtime":
cargo test --features runtime-benchmarks -p {{ runtime }}
Expand All @@ -21,37 +17,34 @@ test-runtime-features runtime="polimec-runtime":
test-integration:
cargo test -p integration-tests

dry-run-benchmarks mode="fast-mode" runtime="politest,polimec" pallet="*" extrinsic="*" :
dry-run-benchmarks mode="fast-mode" pallet="*" extrinsic="*" :
#!/bin/bash
# Set the internal field separator for splitting the runtime variable
IFS=','
# Read the runtime variable into an array
read -ra runtimes <<< "{{runtime}}"
read -ra modes <<< "{{mode}}"

# Build the project with each mode
for mode in "${modes[@]}"; do \
echo -e "\033[34mBuilding runtime with mode: \033[92m$mode\033[34m\033[0m"
cargo build --features runtime-benchmarks,$mode --release
# Loop over each runtime and run the benchmark
for runtime in "${runtimes[@]}"; do \
echo -e "\033[34mRunning benchmarks for runtime: \033[92m$runtime\033[34m\033[0m"

./target/release/polimec-node benchmark pallet \
--chain=${runtime}-local \
--steps=2 \
--repeat=1 \
--pallet={{ pallet }} \
--extrinsic={{ extrinsic }} \
--wasm-execution=compiled \
--heap-pages=4096
done
echo -e "\033[34mRunning benchmarks"

./target/release/polimec-node benchmark pallet \
--chain=polimec-paseo-local \
--steps=2 \
--repeat=1 \
--pallet={{ pallet }} \
--extrinsic={{ extrinsic }} \
--wasm-execution=compiled \
--heap-pages=4096
done

# src: https://github.com/polkadot-fellows/runtimes/blob/48ccfae6141d2924f579d81e8b1877efd208693f/system-parachains/asset-hubs/asset-hub-polkadot/src/weights/cumulus_pallet_xcmp_queue.rs
# Benchmark a specific pallet on the "Polimec" Runtime
# Use mode="production" to generate production weights.
benchmark-runtime chain="polimec-local" pallet="pallet-elections-phragmen" mode="release":
benchmark-runtime chain="polimec-paseo-local" pallet="pallet-elections-phragmen" mode="release":
cargo run --features runtime-benchmarks --profile {{mode}} -p polimec-node benchmark pallet \
--chain={{ chain }} \
--steps=50 \
Expand All @@ -64,7 +57,7 @@ benchmark-runtime chain="polimec-local" pallet="pallet-elections-phragmen" mode=

# src: https://github.com/paritytech/polkadot-sdk/blob/bc2e5e1fe26e2c2c8ee766ff9fe7be7e212a0c62/substrate/frame/nfts/src/weights.rs
# Run the Runtime benchmarks for a specific pallet
benchmark-pallet chain="politest-local" pallet="pallet-dispenser":
benchmark-pallet chain="polimec-paseo-local" pallet="pallet-dispenser":
cargo run --features runtime-benchmarks --release -p polimec-node benchmark pallet \
--chain={{ chain }} \
--steps=50 \
Expand Down
7 changes: 1 addition & 6 deletions nodes/parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ color-print = "0.3.5"
futures.workspace = true

# Local
politest-runtime.workspace = true
polimec-runtime.workspace = true
pallet-funding.workspace = true
macros = { workspace = true }
Expand Down Expand Up @@ -81,10 +80,9 @@ substrate-build-script-utils.workspace = true

[features]
default = []
fast-mode = [ "polimec-runtime/fast-mode", "politest-runtime/fast-mode" ]
fast-mode = [ "polimec-runtime/fast-mode" ]
instant-mode = [
"polimec-runtime/instant-mode",
"politest-runtime/instant-mode",
]
runtime-benchmarks = [
"cumulus-primitives-core/runtime-benchmarks",
Expand All @@ -94,7 +92,6 @@ runtime-benchmarks = [
"pallet-funding/runtime-benchmarks",
"polimec-common/runtime-benchmarks",
"polimec-runtime/runtime-benchmarks",
"politest-runtime/runtime-benchmarks",
"polkadot-cli/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
"sc-service/runtime-benchmarks",
Expand All @@ -105,7 +102,6 @@ try-runtime = [
"pallet-funding/try-runtime",
"polimec-common/try-runtime",
"polimec-runtime/try-runtime",
"politest-runtime/try-runtime",
"polkadot-cli/try-runtime",
"sp-runtime/try-runtime",
]
Expand All @@ -130,6 +126,5 @@ std = [
]
on-chain-release-build = [
"polimec-runtime/on-chain-release-build",
"politest-runtime/on-chain-release-build",
]
development-settings = [ "polimec-runtime/development-settings" ]
1 change: 0 additions & 1 deletion nodes/parachain/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use sp_runtime::traits::{IdentifyAccount, Verify};

pub mod common;
pub mod polimec_paseo;
pub mod polimec_rococo;

const DEFAULT_PARA_ID: ParaId = LOWEST_PUBLIC_ID;

Expand Down
Loading

0 comments on commit ac3f194

Please sign in to comment.