1

I am creating a private network based on Clique (PoA) and I have a certain problem with the amount of blocks mined by my two nodes. The number of blocks is very high I quickly reached hundreds of blocks even if there is no transactions being sent throughout the network.

I know this is probably due to specifying BlockTime to 1 in the genesis file, but can't we stop the mining if no transactions are present ?

having a million empty block is not appropriate.

6

Set BlockTime to 0. With that, mining will be done only when needed. For example :

  "clique": {
    "period": 0,
    "epoch": 30000
  }

PR that enabled this behavior :

https://github.com/ethereum/go-ethereum/pull/15323

For 0-period clique miners, commit new mining work whenever a transaction arrives

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.