Description
The default configuration of Substrate and Cumulus is to make blocks at all times. This is useful for pallets which autonomously use blockspace. The blobs runtime is purely reactive, so we can be more efficient by producing blocks only when there are transactions or events to respond to. We should alter the collator implementation to (by default) make blocks only when at least one of the following is true:
- There is least one transaction in the block
- There is an incoming downward message from the relay chain
- It has been at least 10 minutes since the previous block
The other approach would be to bake these rules into the runtime directly. However, rejecting blocks as invalid under such circumstances is quite dangerous in case there is an error. Later on, if there are unaligned collators, we might consider making these runtime rules. Given that there is no implicit reward for creating blocks, collators are not incentivized to diverge from the behavior of making empty blocks.
Note that this does not specifically account for runtime upgrades, which will most likely fall under rule (3) without some kind of special-casing that would require digging into the guts of Cumulus.