I'm trying to run some rpc tests for staking. I'm using the polkadot binary with --dev, which works reasonably well, except that the epoch/bonding timings are way too long for testing/development. I can't seem to set these via the command line parameters. I also tried polkadot build-spec --dev, but the resulting json doesn't seem to have these parameters, or at least that I can recognize.

Is there an easy way to configure the chain parameters (most of the things found here: https://wiki.polkadot.network/docs/maintain-polkadot-parameters) for a dev node?

1 Answer 1

cargo build --release --features fast-runtime
  • 1
    Thanks. I compiled with the fast-runtime feature and it created a binary with faster epoch/era/etc times. Then I looked in the code and the values for various parameters can be configured at compile time with environment variables. I don't believe these are documented anywhere. They can be found in runtime/src/polkadot/lib.rs by searching for prod_or_fast. For example, DOT_EPOCH_DURATION sets the epoch duration.
    – Moh Rezaei
    Apr 16, 2022 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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