docs/src/implemented-proposals/leader-leader-transition.md
This design describes how leaders transition production of the PoH ledger between each other as each leader generates its own slot.
Current leader and the next leader are both racing to generate the final tick for the current slot. The next leader may arrive at that slot while still processing the current leader's entries.
The ideal scenario would be that the next leader generated its own slot right after it was able to vote for the current leader. It is very likely that the next leader will arrive at their PoH slot height before the current leader finishes broadcasting the entire block.
The next leader has to make the decision of attaching its own block to the last completed block, or wait to finalize the pending block. It is possible that the next leader will produce a block that proposes that the current leader failed, even though the rest of the network observes that block succeeding.
The current leader has incentives to start its slot as early as possible to capture economic rewards. Those incentives need to be balanced by the leader's need to attach its block to a block that has the most commitment from the rest of the network.
While a leader is actively receiving entries for the previous slot, the leader can delay broadcasting the start of its block in real time. The delay is locally configurable by each leader, and can be dynamically based on the previous leader's behavior. If the previous leader's block is confirmed by the leader's TVU before the timeout, the PoH is reset to the start of the slot and this leader produces its block immediately.
The downsides:
Leader delays its own slot, potentially allowing the next leader more time to
catch up.
The upsides compared to guards:
A leader does not produce entries in its block after the penultimate tick, which is the last tick before the first tick of the next slot. The network votes on the last tick, so the time difference between the penultimate tick and the last tick is the forced delay for the entire network, as well as the next leader before a new slot can be generated. The network can produce the last tick from the penultimate tick.
If the next leader receives the penultimate tick before it produces its own first tick, it will reset its PoH and produce the first tick from the previous leader's penultimate tick. The rest of the network will also reset its PoH to produce the last tick as the id to vote on.
The downsides:
The upsides compared to leader timeout: