Skip to content

Chopsticks

Chopsticks is a development tool that you can use to test runtimes.

Starting a new Solochain

By default if you start the Chopsticks Docker image, it will start a new chain using @acala-network/chopsticks npm package.

bash
docker run -e BLOCK_TIME=6000 -p 9945:9945 --platform=linux/amd64 europe-docker.pkg.dev/mosaicchain-general/docker-registry/chopsticks

Disable automatic block generation

You can set the BLOCK_TIME=0 to disable automatic block generation.

Forking existing chains

bash
# Fork Testnet
docker run -p 8000:8000 --platform=linux/amd64 europe-docker.pkg.dev/mosaicchain-general/docker-registry/chopsticks ./fork-testnet.sh

# Fork Devnet + Paseo + Asset Hub
docker run -p 8000:8000 -p 8001:8001 -p 8002:8002  --platform=linux/amd64 europe-docker.pkg.dev/mosaicchain-general/docker-registry/chopsticks ./fork-devnet.sh

# Fork Mainnet + Polkadot + Asset Hub
docker run -p 8000:8000 -p 8001:8001 -p 8002:8002 --platform=linux/amd64 europe-docker.pkg.dev/mosaicchain-general/docker-registry/chopsticks ./fork-mainnet.sh

Comparsion

Advantages:

  • Ability to fork an existing chain
  • Less battery intensive
  • Supports XCM emulation
  • Special development commands (e.g. manual block generation or storage override)

Disadvantages:

  • Some functionalities are missing (e.g. system.syncState and other RPC calls)
  • Might have additional differences compared to a "real" client