Docs
Submit an issue
Appchains on Polkadot
Appchains on Polkadot
  • WELCOME
    • Polkadot Appchains
    • Installing Pop CLI
    • How to contribute
  • GUIDES
    • Set up your development environment
    • Create a new parachain
      • Create an Assets parachain
      • Create a Contracts parachain
      • Create an EVM parachain
    • Benchmarking
    • Build your parachain
      • Build your runtime deterministically
    • Call a chain
    • Launch a Chain
      • Launch a Chain in Development
      • Launch a Chain to Paseo
        • Launch Paseo
        • Set up keys
        • Acquire Coretime
      • Deploy a chain with Polkadot Deployment Portal
      • Running a post-startup command
    • Securely Sign Transactions from CLI
    • Test runtime upgrades
  • POP CLI
    • welcome
    • install
    • new
    • bench
    • build
    • build spec
    • call
    • up
    • clean
    • test
Powered by GitBook
On this page
  • Build a deterministic runtime with Pop CLI
  • Resources

Was this helpful?

Edit on GitHub
  1. GUIDES
  2. Build your parachain

Build your runtime deterministically

The following guide shows how to build deterministic runtimes.

PreviousBuild your parachainNextCall a chain

Last updated 2 months ago

Was this helpful?

By default, the Rust compiler generates optimized Wasm binaries, but they aren't always deterministically reproducible. If the Wasm runtime isn't deterministic, each build might produce slightly different bytecode, This can be a problem for blockchain networks where every node must run the exact same runtime.

To ensure deterministic Substrate runtime builds, Pop CLI integrates . SRTool guarantees that every runtime build produces identical Wasm bytecode, making it reliable for production use. This build requires or to be installed and running. Pop CLI automatically invokes the SRTool image to generate a reproducible and verifiable runtime.

This guide provides a quick overview of the importance of deterministic builds and how to achieve them using Pop CLI:

Build a deterministic runtime with Pop CLI

While generating your chain spec with pop build spec, Pop CLI also gives you the option to build your runtime deterministically and inject it automatically.

Once you select the option to build deterministically, Pop CLI will prompt you to provide the runtime path (by default it's typically located in the runtime/ folder). After confirming, the deterministic build process will begin.

⏳ The build may take 10–15 minutes or more, depending on your setup, so be patient!

Once the build is complete, Pop CLI will automatically inject the resulting runtime code into your generated chain spec.

◇  Would you like to build the runtime deterministically? This requires a containerization solution (Docker/Podman) and is recommended for production builds.
│  Yes 
│
◆  Enter the directory path where the runtime is located:
│  ./runtime/mainnet 
└ 

◒  Building deterministic runtime...                    
│  ▲  WARNING: You are using docker. It is recommend to use podman instead.
│  
◓  NOTE: This process may take longer than 10-15 minutes. Please be patient...  

If you'd prefer not to be prompted interactively, you can specify everything up front via command line:

pop build spec --deterministic --runtime ./runtime/mainnet

Resources

Learning Resources

Technical Support

🧑‍🏫 in the Polkadot docs is a good starting point.

🧑‍🔧 For technical introduction, .

Create a question and tag it with ""

Share the StackExchange question in our

SRTool (Substrate Runtime Toolbox)
Docker
Podman
Build a Deterministic Runtime
srtool repository
Polkadot Stack Exchange
pop
Pop Support Telegram channel