IntersectMBO / IntersectMBO/ouroboros-consensus
Reconsider block production when system under heavy load
- Dominant language
- Haskell
- Stars
- 67
- Forks
- 43
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 43
Description
The first thing that happens in block production is a check to see if perhaps we already received a block for the very same slot from another node; this can happen (theoretically speaking) if there are multiple slot leaders and the other node manages to produce their block _and_ have it sent to and adopted by us before we manage to produce our own block.
So we check the current chain, and look at the block at the tip of the chain. If that block has the same slot number as the slot we're trying to produce a block for, we go back one block, basically rolling back one.
If however the block at the tip of the chain has a slot number _larger_ than the current slot number, it means the system must have been under such heavy load that one or more slots passed in between the start of the leadership check and the call to the chain DB. When this happens, we currently just give up and don't produce a block.
We may wish to reconsider this, though we should be a bit careful. See detailed comments in `prevPointAndBlockNo` in `forkBlockProduction`.
Contributor guide
Assessment
This issue has not been assessed yet.