Skip to content

5.) Creating WASM runtimes with Tracing Enabled

Andrew Plaza edited this page Jun 25, 2021 · 7 revisions
  • checkout commit of chain version to compile with WASM traces

    • For Polkadot you can checkout the version with git tags. EX: For version v0.9.3, git checkout v0.9.3
  • navigate to the runtime folder/package of the chain

  • add feature with-tracing = ["frame-executive/with-tracing", "sp-io/with-tracing"] under [features] to the runtime packages' Cargo.toml

  • compile the runtime with cargo build --release --features with-tracing

  • Tracing-enabled WASM runtime should be found in ./target/release/wbuild/{{chain}}-runtime and be called something like {{your_chain}}_runtime.compact.wasm. This can be renamed/modified however you like, as long as it retains the .wasm extension.

  • run it with overrides by placing this folder with all your other runtimes, and passing the path of this folder to your chain.

    • ./target/release/polkadot --wasm-runtime-overrides /home/user/my-custom-wasm-runtimes
Clone this wiki locally