16

On the following blog, at very last paragraph, Vitalik Buterin mentioned that:

Hence, a 3-second target block time (and 5s actual block time) may be quite viable. As usual, we’ll be more conservative at first and not take things that far, but a block time of 12s does nevertheless seem to be very much achievable.

I am not sure that does this statement holds on Proof-of-Authority consensus. Please see my example CustomGenesis.json file.

On the Proof-of-work consensus block time is dynamically changes based on the network, but on the Proof-of-Authority consensus, block time is fixed and we cannot change it after block-time is defined on the genesis block.

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

For example Rinkeby Ethereum testnet uses Proof-of-Authority and its block time is 15 seconds.

By following this tutorial, I have created a private chain based on Proof-of-Authority by using clique consensus engine - proof-of-authority. By default, blocks also recommended is 15 seconds. The problem is after, when we decide the block time on the genesis file, in future we cannot change it.

$ puppeth
...
How many seconds should blocks take? (default = 15)
> 15

Assume that we have a private ethereum-network with good network connectivity.

[Q] What might be the safest minimum block time to use without having any problem on Proof-of-Authority consensus?

For example, could I use 12 seconds or even less (such as 5 seconds) for block time without having any problem? If no, what kind of problems will I face with?

Thank you for your valuable time and help.

1
  • 1
    There are many answers and comments on the question which blocktime is best. What about period:0 in a permissioned network with known nodes. Would it be a viable option to set the blocktime to zero (block on transaction)?
    – heinob
    Commented Oct 19, 2019 at 6:31

2 Answers 2

15
+50

PoA in Aura consensus engine of parity defaults to 5s, which has been tested to run with good stability. PoA network runs one such infrastructure.

I have tested for a 1 sec PoA using aura running across 4 different geographical regions. This is the minimum possible and one that I have successfully tested :) Stability testing across more regions is still in progress. Will update with more info.

Update

Stability testing was successful. Only problems that were faced were regarding timings, the servers have to be synchronised with same time. After resolving this issue, there were no more problems.

The main thing being that they all need to have a synchronised time.

Possible problems that you might face:

  • Whichever server goes out of sync in time, fails to verify blocks from other ones. So the one which is out of sync, will follow its own chain if it is one of the validator node, or remain stuck if it is a normal sync node.
  • If one validator stops for some reason, other will continue the chain, and at that time, there will be a slight instability in average block time. But everything will come back to normal when all validators come back online.

Personally, I think 5s is a decent time for PoA and runs smoothly without any problems. If you wanna read about Aura, see Aura Consensus Protocol Audit.

10
  • 2
    What is the difference beteeen Aura and Clique engine? Could I also use 5 seconds for the PoA in Clique setup? @Ayushya
    – alper
    Commented Feb 1, 2018 at 17:18
  • 2
    Yes! You can use 5s in Clique too. Difference in clique and aura is very broad, main one is geth supports clique and parity supports aura.
    – Ayushya
    Commented Feb 1, 2018 at 18:15
  • 2
    I'm running a 5s clique private blockchain without issue across multiple servers but all UK based (for now). One thing to be aware of is block gas limits - it's far easier to stay in sync with small blocks than large ones!
    – TC8
    Commented Feb 2, 2018 at 8:50
  • 1
    At clique, how can you change the block gas limit in order to use smaller blocks? are we require to define it on genesis block? How much block size limit do you use on your private chain? @TC8
    – alper
    Commented Feb 7, 2018 at 8:21
  • 3
    We use the default block size (4.7 million) for now, though it is possible that will change. We set the initial block gas limit in genesis.json but you can also manipulate the block size post-genesis through ` --targetgaslimit <value>` (default: 4712388) via geth. This is a gradual process as the rate of change is limited (no big jumps from one block to the next), but if enough of your miners are all aiming towards the same limit they'll get there eventually.
    – TC8
    Commented Feb 7, 2018 at 9:48
4

be it a PoA, PoW or PoS chain you want to build, the main point about the timing is for your nodes to be able to synchronize.

If your network is private and you can ensure your network to have nodes with huge broadband and resources then you can decrease largely the blocktime.

It all depends on the infrastructure your network relies on. If your different nodes communicates through the worldwide network you'll have to ensure a blocktime long enough to be sure that the different nodes have time to synchronize beetween each block.

If nodes can't handle that it can ends having differents networks as the nodes will conflict and might reject each other.

2
  • 1
    Well in PoA there will be many sealers. I am not sure upcoming sealers’ resources. There can be one on Asia and one in US so its hard to guess from now. But its said 12 seconds but why default time is extended to 15 seconds? @Asone
    – alper
    Commented Jan 30, 2018 at 17:12
  • 3
    The 15/12 second block times are about the public PoW blockchain. PoA consensus is easier because there isn't an arms race over who is going to seal a block. You already know who it'll be.
    – natewelch_
    Commented Feb 1, 2018 at 16:43

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.