-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
It would be nice if Tendermint didn't spam us with empty blocks,
but changing the protocol to support this is non-trivial. If we simply prevoted nil on empty blocks, or didn't propose them at all, and went to the next round, the TimeoutPropose would increase, so we'd be risking downtime if a proposer at a high round is down and we have to wait a while to skip him.
Instead, we might be able to do this by adding two new fields to the block header:
- emptyBlockNum (int64)
- lastNonEmptyBlockHash ([]byte)
Thus a block would be indexed by the pair (height, emptyBlockNum), and we would only display blocks for users with (height, 0), as those would be the only ones with transactions. Blocks which increment the emptyBlockNum are like virtual blocks that ensure we have consensus on moving to the next proposer and not increasing the timeout, despite not wanting to tell the user about a block.
By including the lastNonEmptyBlockHash, clients doing fast sync (verifying chain of headers) can skip all the empty blocks for catching up.
Related: #230