Sign in

The leader schedule and block production

Suggest an edit

The leader schedule is stake-weighted, assigns each leader four consecutive slots, and is fixed two days ahead. It determines which validator can include your transaction in any given slot, and that validator also chooses the order of transactions in its block.

One validator at a time decides what goes into a block

At any moment, exactly one validator on the network is the leader. The leader takes incoming transactions, runs them through PoH, and produces a block. While they're leading, no other validator produces blocks.

As the previous lesson showed, the leader also chooses which transactions go into its block and in what order, so your program cannot control where its transaction lands relative to the others. The standard validator client ranks transactions by priority fee per compute unit, but a leader running custom software could pick differently. Jito's client lets leaders accept bundles with tips in exchange for a guaranteed order, as the Jito lesson describes.

The randomness lesson showed another consequence of one validator producing the block: anything visible inside the block is visible to whoever is producing it, and the leader chooses what to publish.

The schedule is computed an epoch ahead

Other chains pick the block producer differently. Bitcoin runs a global race: every miner tries to find a valid block, and whoever finds one first wins the right to extend the chain. Ethereum after the Merge has random validator selection: at the start of each slot, a deterministic shuffle picks one validator to propose, and that validator has the slot for themselves.

Solana takes the random-selection idea and extends it. Instead of picking one validator per slot at the start of each slot, the entire schedule for an epoch is computed up front. An epoch on Solana mainnet is 432,000 slots, which at 400ms per slot is about 2 days.

The schedule is generated by a deterministic algorithm using two inputs: the on-chain stake distribution at the start of the previous epoch, and a hash from the previous epoch used as a random seed. A validator holding 1% of the total stake gets approximately 1% of the slot windows in the epoch, and a validator with no stake gets zero. Given the same inputs, every node computes the same schedule, so the schedule is never broadcast or negotiated, and anyone can look up who the leader is for any slot in the next ~2 days.

An RPC node that receives a transaction looks up the upcoming leaders and sends it straight to them, with no mempool in between. This is Gulf Stream from the previous lesson, and it works only because the leaders are known ahead.

A leader keeps the role for four slots in a row

The schedule doesn't assign individual slots to individual validators. It assigns leader windows of 4 consecutive slots, 1.6 seconds in total. The validator chosen for a window is the leader for all four slots, and then the next validator takes the next four.

Leader schedule: 16 slots split into 4-slot windows for validators A-DA timeline of slots 100 to 115 is grouped into four consecutive windows of 4 slots each, one window per validator: A, B, C, and D. A second panel shows a skipped slot, where validator B misses slot 104 but the schedule still hands off to validator C on time. The leader schedule: slots, windows, and stake-weighted assignment A 16-slot stretch of the schedule. Each slot is 400ms. Validators get 4 consecutive slots at a time. 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 Validator A's window Validator B's window Validator C's window Validator D's window 1.6 sec total → validator stays leader for 4 slots, then hands off to the next validator Stake-weighted assignment A validator with 1% of total stake gets ~1% of the leader windows in an epoch. The full schedule for the entire 432,000-slot epoch is computed at the START of the previous epoch, deterministically from on-chain stake data plus a previous-epoch hash as the random seed. Result: every node knows exactly who's leader for any upcoming slot, ~2 days in advance. A skipped slot If a leader is offline or slow during one of their slots, the slot just doesn't produce a block. The PoH chain keeps advancing. The next leader picks up where the previous block left off. Validator B has the next 4 slots. If they're offline for slot 104, slot 104 stays empty, and B may or may not produce slots 105-107. If they don't, validator C starts at slot 108 as scheduled. The schedule doesn't shift. Each validator's window is theirs, used or skipped.

The validator has already been receiving transactions via Gulf Stream before its window opens, so by the time its first slot starts there's a queue of pending transactions. It picks transactions from the queue, executes them in parallel based on their declared accounts, and weaves them into the PoH stream. While producing, the leader is also broadcasting: Turbine sends the block out in pieces, and the other validators receive and replay them in parallel with the leader's production.

There are two reasons the window is 4 slots and not 1.

First, vote propagation latency. When a validator produces a block, other validators need time to receive it, verify it, and broadcast their vote. If leadership were changing every 400ms, the new leader's first block would have to start before the previous leader's last block had finished gathering votes. Bundling slots into 4-slot windows means a validator can build on their own previous block from the same window without waiting for external confirmations.

Second, startup cost. When a validator becomes leader, the other validators have to start sending transactions to them via Gulf Stream, and the new leader has to set up their pipeline. Having a new leader every slot rather than every four would amplify that startup cost by 4x.

The trade-off is censorship: a malicious leader who wants to block a specific transaction has 1.6 seconds of guaranteed leadership to drop it, compared to 400ms if every slot had a fresh leader. Gulf Stream sends the transaction to multiple upcoming leaders simultaneously, so the next leader can still include it, but only after the window ends. For those 1.6 seconds, whether a transaction reaches your program is up to one validator. So if an auction or a deadline in your program closes at a given slot, the leader whose window contains that slot decides which of the pending transactions land before the close.

A skipped slot has no block, and the schedule does not shift

A slot can end without a block: the leader might be offline, their hardware might be too slow, their network might be congested, or they might be running buggy software.

The PoH chain keeps advancing. Validators still record that slot N existed, and that no block was produced for it. The schedule doesn't shift to accommodate the missing block. Validator B's window is still slots 104 to 107 even if B is offline for all four slots, and the next validator's window starts at slot 108 as scheduled. In that case there is no block between slot 103 and slot 108, so a slot number counts positions in the schedule, not blocks.

A small percentage of slots get skipped on mainnet under normal conditions, usually a few percent. During congestion events or after major software updates, the skip rate can jump for a few hours.

For your transaction, a skipped slot means the leader didn't include it in the block it would have made, so the transaction is still pending. The next leader will see it via Gulf Stream and might include it in their slot, or might not. If it has not landed by the time its blockhash expires, the client signs a new one, as the previous lesson described.