Validator Block Time Performance Considerations

This topic is to discuss validator block time performance considerations. It continues a discussion related to this governance proposal to adjust the blocks_per-year parameter.

Topics to discuss include -

1 - What factors impact a validator’s block time?

2 - What’s an acceptable validator block time?

3 - What’s the impact of validator block time on performance, e.g. missed pre-commits?

4 - What steps can a validator take to improve performance and decrease block times?

2 Likes

Hi chirs, thanks for opening this discussion.

First of all I don’t think blocks_per_year can achieve the goal it is initially proposed for. blocks_per_year would be affected by various of factors. It is not only affected by the block time, but may also related to any downtime of the blockchain. Even if block time is the only concern it is still out of our control.

1 - What factors impact a validator’s block time?

The main factor which affects the block time is the timeout settings. The timeout settings is defined in .toml file which is not part of consensus state and any validators can change it easily.

Besides we find out that the transactions per block will also affect block time. Once a block contains too many transactions the block time will exceed the timeout set by validators. Though we can prevent such situation by the constrain like block size but it is still hard to maintain a stable block time due to various types of transactions.

Finally the validator set size may also affect the block time. A larger validator set means more validators to talk to for each block. This factor is much easier to control and it is usually quite stable but every time when we increase the validator set size a new proposal should be made if needed.

What’s an acceptable validator block time?

Basically the block time should be enough for the validator set to reach a consensus. For current validator set and tps it seems that 5 seconds is acceptable.

3 - What’s the impact of validator block time on performance, e.g. missed pre-commits?

A long block time can make sure validators have enough time to reach consensus and also long block time means less blocks generated per year which can keep blockchain data size small. But long block time doesn’t guarantee high tps and it will also affect the time for transaction to be confirmed.

4 - What steps can a validator take to improve performance and decrease block times?

Based on the discussion above I don’t think decrease block time is our final goal and a proper block time should be decided by the community. To improve performance I think it deserves a separate topic :smiley: