Skip to content
Snippets Groups Projects
  1. Oct 30, 2024
    • Sebastian Kunert's avatar
      Add overhead benchmark to frame-omni-bencher (#5891) · 40547f9f
      Sebastian Kunert authored
      
      # Benchmark Overhead Command for Parachains
      
      This implements the `benchmark overhead` command for parachains. Full
      context is available at:
      https://github.com/paritytech/polkadot-sdk/issues/5303. Previous attempt
      was this https://github.com/paritytech/polkadot-sdk/pull/5283, but here
      we have integration into frame-omni-bencher and improved tooling.
      
      ## Changes Overview
      
      Users are now able to use `frame-omni-bencher` to generate
      `extrinsic_weight.rs` and `block_weight.rs` files for their runtime. The
      core logic for generating these remains untouched; this PR provides
      mostly machinery to make it work for parachains at all.
      
      Similar to the pallet benchmarks, we gain the option to benchmark based
      on just a runtime:
      
      ```
      frame-omni-bencher v1 benchmark overhead --runtime {{runtime}}
      ```
      
      or with a spec:
      
      ```
      frame-omni-bencher v1 benchmark overhead --chain {{spec}} --genesis-builder spec
      ```
      
      In this case, the genesis state is generated from the runtime presets.
      However, it is also possible to use `--chain` and genesis builder `spec`
      to generate the genesis state from the chain spec.
      
      Additionally, we use metadata to perform some checks based on the
      pallets the runtime exposes:
      
      - If we see the `ParaInherent` pallet, we assume that we are dealing
      with a relay chain. This means that we don't need proof recording during
      import (since there is no storage weight).
      - If we detect the `ParachainSystem` pallet, we assume that we are
      dealing with a parachain and take corresponding actions like patching a
      para id into the genesis state.
      
      On the inherent side, I am currently supplying the standard inherents
      every parachain needs.
      
      In the current state, `frame-omni-bencher` supports all system chains.
      In follow-up PRs, we could add additional inherents to increase
      compatibility.
      
      Since we are building a block during the benchmark, we also need to
      build an extrinsic. By default, I am leveraging subxt to build the xt
      dynamically. If a chain is not compatible with the `SubstrateConfig`
      that comes with `subxt`, it can provide a custom extrinsic builder to
      benchmarking-cli. This requires either a custom bencher implementation
      or an integration into the parachains node.
      
      Also cumulus-test-runtime has been migrated to provide genesis configs.
      
      ## Chain Compatibility
      The current version here is compatible with the system chains and common
      substrate chains. The way to go for others would be to customize the
      frame-omni-bencher by providing a custom extrinsicbuilder. I did an
      example implementation that works for mythical:
      https://github.com/skunert/mythical-bencher
      
      ## Follow-Ups
      - After #6040 is finished, we should integrate this here to make the
      tooling truly useful. In the current form, the state is fairly small and
      not representative.
      
      ## How to Review
      I recommend starting from
      [here](https://github.com/paritytech/polkadot-sdk/pull/5891/files#diff-50830ff756b3ac3403b7739d66c9e3a5185dbea550669ca71b28d19c7a2a54ecR264),
      this method is the main entry point for omni-bencher and `polkadot`
      binary.
      
      TBD:
      - [x] PRDoc
      
      ---------
      
      Co-authored-by: default avatarMichal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
      40547f9f
  2. Nov 29, 2023
    • Dónal Murray's avatar
      Remove system parachains Polkadot and Kusama runtimes (#1737) · 63ac2471
      Dónal Murray authored
      Since the Polkadot and Kusama runtimes are no longer in the repo, the
      relevant systems parachains runtimes also need to be removed. More
      context [here](https://github.com/paritytech/polkadot-sdk/issues/603)
      and [here](https://github.com/paritytech/polkadot-sdk/pull/1731).
      
      Removes the following:
      - `asset-hub-kusama` and `asset-hub-polkadot`
      - `bridge-hub-kusama` and `bridge-hub-polkadot`
      - `collectives-polkadot`
      - `glutton-kusama`
      
      Partially solves #603 and adds to #1731.
      63ac2471
  3. Jun 02, 2023
    • joe petrowski's avatar
      Rename Statemint to Asset Hub (#2633) · 60075495
      joe petrowski authored
      
      * change dir names
      
      * cargo toml updates
      
      * fix crate imports for build
      
      * change chain spec names and PR review rule
      
      * update cli to accept asset-hub
      
      * find/replace benchmark commands
      
      * integration tests
      
      * bridges docs
      
      * more integration tests
      
      * AuraId
      
      * other statemint tidying
      
      * rename statemint mod
      
      * chain spec mod
      
      * rename e2e test dirs
      
      * one more Runtime::Statemine
      
      * benchmark westmint
      
      * rename chain spec name and id
      
      * rename chain spec files
      
      * more tidying in scripts/docs/tests
      
      * rename old dir if exists
      
      * Force people to manually do the move.
      
      (Safer as there could be additional considerations with their setup)
      
      * review touchups
      
      * more renaming
      
      * Update polkadot-parachain/src/command.rs
      
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      
      * better error message
      
      * do not break on-chain spec_name
      
      * log info message that path has been renamed
      
      * better penpal docs
      
      ---------
      
      Co-authored-by: default avatargilescope <gilescope@gmail.com>
      Co-authored-by: default avatarBastian Köcher <git@kchr.de>
      Co-authored-by: parity-processbot <>
      60075495
  4. Nov 08, 2022
  5. Aug 18, 2022
    • Javier Viola's avatar
      Zombienet add tests (#1321) · 807db6ff
      Javier Viola authored
      
      * changes to read json spec in test binary
      
      * add zombienet tests
      
      * fmt
      
      * use {{COL_IMAGE}} and clean config
      
      * add comment and use relay image from env
      
      * use test-parachain image from pr
      
      * fix warns
      
      * fix warns
      
      * fmt
      
      * typo
      
      * fix ci to use zombienet image
      
      * fix spawn nodes for test
      
      * reorg test
      
      * add within to test
      
      * remove check for full node collators is up
      
      * add tests for pov, mirate solo to para, sync blocks
      
      * bump zombienet image
      
      * add job dep with artifacts
      
      * add sleep for test
      
      * fix after merge
      
      * fmt
      
      * bump zombienet version
      
      * changes from clap
      
      * use base/shared params
      
      * fmt
      
      * debug ci
      
      * add upgrade test
      
      * update js test for debug
      
      * less debug in test
      
      * print assertion
      
      * fix upgrade test
      
      * Collator key only needed if we run as collator
      
      * [Fix] Benchmark build artifact folder creation (#1518)
      
      * Trivial networking changes for Substrate PR #11940 (#1486)
      
      * Trivial networking changes for Substrate PR https://github.com/paritytech/substrate/pull/11940
      
      * Apply formatting rules
      
      * update lockfile for {"polkadot", "substrate"}
      
      Co-authored-by: parity-processbot <>
      
      * bump zombienet version
      
      * update network def for test
      
      * typo
      
      Co-authored-by: default avatarSebastian Kunert <skunert49@gmail.com>
      Co-authored-by: default avatarRoman Useinov <roman.useinov@gmail.com>
      Co-authored-by: default avatarNazar Mokrynskyi <nazar@mokrynskyi.com>
      807db6ff