Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd, consensus, core, miner: instatx clique for --dev #15323
Since forever we've had
This PR attempts to fix the
Note: the PR also supports the
Possibly worth delaying until a future PR, but it would be nice to be able to configure dev mode to mine blocks on a fixed schedule as well. Depending on the type of test I'm running, I sometimes want to mine blocks every time a transaction comes in, and other times I want to have regular blocks (e.g., 1 per second).
The primary reason for having regular block intervals in testing is to ensure that the dApp/scripts work in an environment where there may be a delay between transaction submission and transaction mining (receipt available).
Instant seal on the other hand is really useful for running unit tests, where you aren't testing the dApp->Ethereum Node interaction, but instead testing Solidity contracts or general features and you don't want to sit around waiting forever (second) for blocks to arrive to burn through your test suite.
From the PR description, it sounds like this fulfills one of the two needs (instant blocks on transaction), but still requires mining and 15 second block times for the latter.
Perhaps fixed block time is already possible by running a single-node clique chain? If so, then that half of the problem is already solved and this PR finishes it. :)