For the complete documentation index, see llms.txt. This page is also available as Markdown.

Build

Use pop build (alias: pop b) to build a chain node or runtime. If you need a chain spec or genesis artifacts, use pop build spec.

To build your chain using Pop CLI

cd my-chain
pop build
β”Œ   Pop CLI : Building a chain
β”‚
   Compiling parachain-template-runtime v0.1.0 (/Users/pop/src/my-chain/runtime)
   Compiling parachain-template-node v0.1.0 (/Users/pop/src/my-chain/node)
    Finished release [optimized] target(s) in 1m 20s

β””  Build Completed Successfully!

If you are outside the project's directory, you can specify the path

pop build -p ./my-chain

You can also pass the project directory positionally:

pop build ../my-chain

Build options

Most common flags:

Flag
Description

PATH / --path <path>

Project directory (defaults to the current directory).

-p, --package <name>

Build a specific workspace package.

-r, --release

Build in release mode. Conflicts with --profile.

`--profile <debug

release

--features <list>

Comma-separated feature list.

--benchmark

Adds the runtime-benchmarks feature.

--try-runtime

Adds the try-runtime feature.

--only-runtime

Build only the runtime.

--deterministic

Build the runtime deterministically (requires Docker/Podman). Implies --only-runtime.

--tag <image>

Use a specific srtool image tag (requires --deterministic).

JSON output

Use global --json for structured output in scripts and CI:

For build spec in JSON mode, prompts are disabled. Provide all required flags explicitly (for example --output, --profile, --type, --chain, --protocol-id, --genesis-state, --genesis-code, --deterministic, plus relay/para-id options for parachains).

[!NOTE] If your workspace has multiple runtime crates, Pop CLI prompts you to choose one.

If you are building the chain with the intent to onboard to a Polkadot Relay chain then you can run the following build command:

This command will build your chain and generate the chain spec, the WebAssembly runtime, and generate the chain genesis state needed for registering and onboarding onto the Relay chain.

If you need to generate chain specs and genesis artifacts directly, use pop build spec:

Learning Resources

  • πŸ§‘β€πŸ« To learn about Polkadot in general, Polkadot.network website is a good starting point.

    • β­• Learn more about Polkadot chains here.

  • πŸ§‘β€πŸ”§ For technical introduction, here are the Polkadot SDK documentation resources.

Technical Support

Last updated