8

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?

2 Answers 2

9

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.

1
  • 1
    You mentioned code comments, but running --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.
    – tarrball
    Mar 17 at 19:23
3

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

2
  • 1
    The 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.
    – bkchr
    Mar 17 at 9:42
  • Good point. Important to make the distinction.
    – Squirrel
    Mar 18 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.