1
votes

I’m using BABE/GRANDPA consensus from the substrate-node-template to develop a Substrate chain. For local development (i.e. running just one node to develop a dapp) this setup has a couple of issues.

  • The node always needs to be recompiled with the --release flag or block execution exceeds the slot duration. This is expensive, especially on CI.
  • It is not possible to shut down a node and restart it later. Consensus will complain about the epoch being too far apart.
  • It takes at least the slot duration to receive feedback from submitted extrinsic.

Ideally, the consensus used for local development should behave like the InstantSeal consensus in Parity Ethereum. Is there a similar consensus for Substrate? What about Aura? Is it possible to tweak BABE/GRANDPA to mitigate the issues?

1
substrate node-template will very soon switch back to using Aura, which does not have some of these issues. You can see this PR on how to swap them, or wait for it to get merged. - kianenigma

1 Answers

0
votes

The substrate node template was switched back to AURA.

So, now it will be much easier for you to deploy local testnets.

Just fetch the latest master of the substrate repository and get a fresh node template and run

substrate-node  --chain local --alice

Or if you build your own chain specification, supply an aura authority:

"aura": {
  "authorities": [
    "5FZWmKa4ePFfoSRj83XiCnDrsnWcdbf7886yFSnFAmQCcUJ2"
  ]
},