I get a different set of behaviors when running my node with --dev
than when I run my node with my own custom setup.
What is happening in the background?
Substrate and Polkadot Stack Exchange is a question and answer site for developers building blockchains with the Substrate SDK. It only takes a minute to sign up.
Sign up to join this communityWhen launching a chain with --dev
, you are in the background enabling a specific set of CLI flags.
From the code comments:
/// This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`,
/// `--alice`, and `--tmp` flags, unless explicitly overridden.
So, if you want to have a similar behavior to --dev
, but using your own setup, keep in mind the flags above.
--help
on the substrate node might be a better way to access this and all the other flag definitions for the node. It has the same description for --dev
given in your answer.
The --dev
flag ensures that the chain starts from genesis each time the process starts (This is what the --tmp
flag does).
The other thing that can be handy is the compile time feature --feature fast-runtime
which speeds up things like democracy so you don't have to wait the standard times (obviously this is only designed for test networks).
fast-runtime
feature is a custom Polkadot feature. This is nothing from Substrate. Any Substrate builder needs to create such a feature or just provide a different way to do this.