How do I run Substrate in a way so that transactions get validated instantly for development pauperises?

501 Views Asked by At

How do I run Substrate in fake validating mode for development purposes (is there anything similar to --dev in geth where transactions are mined instantly)?

1

There are 1 best solutions below

1
On

Actually, substrate recently integrated two new consensus (or "block authoring" --whichever you prefer to call them) algorithms that might be exactly what you need:

1- Manual seal: Where there is one author and it authors a block whenever you tell it via an RPC call.

2- Instant seal: Where there is one author and it attempts to author a block as soon as it sees a transaction in the pool, most often leading to one transaction per block

This is pretty recent work and perhaps has not be reflected in the docs yet. But you can find an in-depth intro to it here. Check out the video description for code examples.