Skip to content
paseo-networkPublic

About

Runtimes for Polkadot community testnet

Resources

Stars

39 stars

Watchers

5 watching

Forks

Repository files navigation

Runtimes

Runtimes for Polkadot's community testnet.

Structure

├── relay
│   ├── paseo
└── system-parachains
    ├── asset-hub-paseo
    │    ├── bp-asset-hub-paseo
    ├── bridge-hub-paseo
    │    ├── bp-bridge-hub-paseo
    ├── people-paseo
    ├── coretime-paseo

Benchmarks

Runtime weights are regenerated by the Benchmarks workflow, which runs on the self-hosted benchmark runner gh-runner-03 (labels self-hosted, ubuntu-latest, benchmarks). Weights measured on a GitHub-hosted runner are not comparable between runs, so this is the only supported way to update them.

Four runtimes are in scope: paseo (relay), asset-hub-paseo, people-paseo and bulletin-paseo. The remaining system parachains are not benchmarked here and keep the weights they ship with.

From a pull request — comment on the PR (members of the paseo-core team only):

/bench                                                # every pallet of all four runtimes (hours)
/bench --runtime paseo                                # one runtime, every pallet
/bench --runtime people-paseo --pallet pallet_proxy   # one runtime, one pallet
/bench --pallet pallet_balances --continue-on-fail    # keep going when a pallet fails
/bench --runtime people-paseo --exclude-pallets indiv_pallet_coinage   # every pallet but one
/bench --runtime people-paseo --jobs 4                # 4 pallets at a time
/bench --help

The workflow builds the affected runtimes with --features runtime-benchmarks, runs frame-omni-bencher per pallet, pushes the regenerated weights back to the PR branch as one commit per pallet, and posts a subweight diff against main as a comment.

A failed pallet costs as little as possible:

  • Before the real run, every pallet is run once at --steps 2 --repeat 1. That takes minutes and catches benchmarks that cannot run at all; those pallets are reported and skipped.
  • A sweep without --pallet keeps going past a failed pallet. With --pallet, the first failure stops the run unless --continue-on-fail is given.
  • Every pallet that completed is pushed, even when the run fails, is cancelled or times out.

--jobs N benchmarks N pallets at the same time. frame-omni-bencher is single-threaded, so without it a run uses one core of the runner. Pallets running side by side compete for caches and memory bandwidth and come out somewhat heavier, so use --jobs to iterate and a plain run for the weights that ship.

Without a PR — run the workflow manually from Actions → Benchmarks → Run workflow against any branch.

Because issue_comment events always execute the workflow file as it exists on main, changes to the workflow itself only take effect once merged. The same goes for the tooling it drives: cmd.py and runtimes-matrix.json are always taken from main, never from the PR branch, so a PR branch does not need to be rebased to pick up a tooling fix.

Adding or changing a runtime

.github/workflows/runtimes-matrix.json is the source of truth — a runtime absent from it is never benchmarked. Per runtime:

Field Meaning
name / package / path --runtime value, cargo package, and where src/weights lives
genesis_builder_preset Genesis preset built for benchmarking (local_testnet everywhere today)
build_extra_features Extra cargo features on top of runtime-benchmarks (e.g. paseo-ahm)
benchmarks_templates Per-pallet weight template; XCM pallets need .maintain/xcm-bench-template.hbs
benchmarks_exclude_pallets Pallets skipped in a full sweep; still run if named with --pallet
benchmarks_exclude_extrinsics Individual extrinsics to skip, as {"pallet": ["extrinsic"]}

When adding a runtime, also add it to the runtime dropdown in the workflow's workflow_dispatch inputs.

Authorization

/bench is gated on active paseo-core team membership. The check uses the PASEO_BENCH_PAT organisation secret, which must be a valid, unexpired token with read:org (classic) or organisation Members: read (fine-grained) — the team is closed, so a token without that scope cannot see it at all and every lookup returns 404.

If the token is broken, the workflow fails loudly and says so on the PR rather than reporting "you are not a member".

Runner provisioning

The workflow installs what it needs, so a freshly re-registered or rebuilt machine needs no manual preparation. Four steps ahead of the benchmark do it, all no-ops once the runner is warm:

  • apt packages — build-essential clang cmake protobuf-compiler pkg-config libssl-dev libclang-dev python3. libssl-dev and libclang-dev ship only headers, so they are easy to leave out of a list and surface much later as a link error.

  • frame-omni-bencher — not an apt package. Downloaded from the polkadot-sdk release pinned by FRAME_OMNI_BENCHER_RELEASE_VERSION in .github/env, re-fetched each run so it always matches the pin. Bump that variable to move versions.

  • subweight — cargo installed only when absent. The first install takes a few minutes; after that it is a command -v check.

  • solc and resolc — pallet-revive-fixtures compiles its Solidity fixtures by shelling out to both, and every runtime reaches that crate through system-parachains-constants, so the build needs them even for runtimes that never instantiate pallet_revive. Asset hub benchmarks pallet_revive itself, which needs the real fixtures, so the workflow does not set SKIP_PALLET_REVIVE_FIXTURES. Pinned by SOLC_VERSION and RESOLC_VERSION in .github/env and downloaded only when the installed version differs; keep RESOLC_VERSION in step with what polkadot-sdk pins for the release named by FRAME_OMNI_BENCHER_RELEASE_VERSION.

The pins are read from main's .github/env first and then from the benchmarked branch's, so a branch can override a pin but one that predates it still gets main's value.

Installing apt packages needs passwordless sudo on the runner.

If you would rather prepare a host by hand, the same list works directly:

sudo apt-get update && sudo apt-get install -y \
  build-essential clang cmake protobuf-compiler pkg-config libssl-dev libclang-dev python3

Testnet vs Production

The following section presents the differences between testnet and production runtimes. By showing users the variations in available features and operational costs, users can better adjust their expectations when transitioning from testnet to production environments.

Features

Feature Paseo Kusama Polkadot
Agile Coretime ✅ ✅ ✅
Async Backing ✅ ✅ ✅
Elastic Scaling ✅ ✅ ✅
Asset Hub Migration ✅ ✅ ✅
PolkaVM Contracts ✅ ✅ ✅
Contracts: ERC-20 Precompile ✅ ✅ ✅
Contracts: XCM Precompile ✅ ✅ ✅
Coretime interlude period 2 days 7 days 7 days

Costs

Feature Paseo (PAS) Kusama (KSM) Polkadot (DOT)
Parachain Id Reservation 100 4 100
Parachain Registration ~3,200 ~105 ~3,200
Asset Creation ~0.0017 + 0.4 Deposit ~0.00012 + 0.013 Deposit ~0.0018 + 0.4 Deposit
Identity Creation ~0.002 + 0.2 Deposit ~0.00009 + 0.006 Deposit ~0.002 + 0.2 Deposit
Contract Instantiation (12K polkavm blob) ~0.12 + 0.6 Deposit ~0.004 + 0.02 Deposit -

About

Runtimes for Polkadot community testnet

Resources

Stars

39 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages