parity-ethereum icon indicating copy to clipboard operation
parity-ethereum copied to clipboard

Feature Request: Authority Round step duration customisation

Open zemse opened this issue 4 years ago • 0 comments

We can definitely set a step duration in the config file, such that the validators set in the config file or from validator set smart contract take turns to author blocks.

Let's consider this set:

validatorSet = [ 
    address1, address1, address1, address1, address1,
    address2, address2, address2, address2, address2,
    address3, address3, address3, address3, address3
 ]

The address1 would author 5 blocks continuously, after that address2 would follow authoring the next 5 blocks and so on.

Considering that I am keeping max block gas very high in my private chain, which would result into a high block size (maybe in MBs). address1 authors first 4 blocks (which gets relayed to network in some time), but relaying the 5th block to the network (more importantly to address2) takes time. If that time is comparable to or more than the step duration, address2 might consider that address1 didn't author the last block and would author the 5th block by self and fork out. But, if a delay is possible between this (in this example for every 5 blocks), then this issue can be minimized.

By delay I mean that: consider a step duration of 1 second:

[t = 0, blockheight = 0, author=address(0)],
[t = 1, blockheight = 1, author=address1],
[t = 2, blockheight = 2, author=address1],
[t = 3, blockheight = 3, author=address1],
[t = 4, blockheight = 4, author=address1],
[t = 5, blockheight = 5, author=address1],
// delay of 3 seconds (you can take it as step duration * 3)
[t = 8, blockheight = 6, author=address2],
[t = 9, blockheight = 7, author=address2],

For example, we can add an indicator for delay in the validator set:

validatorSet = [ 
    address1, address1, address1, address1, address1, address(0), address(0), address(0)
    address2, address2, address2, address2, address2, address(0), address(0), address(0)
    address3, address3, address3, address3, address3, address(0), address(0), address(0)
 ]

If it is possible to have such a delay in the validator set, then large max block gas can be set along with continuous block authoring. If it makes sense, this feature can be used by many blockchains (for example layer 2 solutions) coming in future and can help to scale their dApps more.

zemse avatar May 21 '20 12:05 zemse