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 community
When 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.
--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).