Slots, Blocks & Epochs
Solana organizes time into slots (production windows), blocks (confirmed transaction batches), and epochs (stake schedule periods). These units drive leader rotation, staking rewards, and client confirmation timing.
Search across all documentation pages
Solana organizes time into slots (production windows), blocks (confirmed transaction batches), and epochs (stake schedule periods). These units drive leader rotation, staking rewards, and client confirmation timing.
Quick-reference recipe card - copy-paste ready.
solana slot
solana epoch
solana epoch-info
solana block-time $(solana slot)import { createSolanaRpc } from "@solana/kit";
const rpc = createSolanaRpc("https://api.devnet.solana.com");
const slot = await rpc.getSlot().send();
const epochInfo = await rpc.getEpochInfo().send();
console.log({ slot, epoch: epochInfo.epoch, slotIndex: epochInfo.slotIndex });When to reach for this:
import { createSolanaRpc } from "@solana/kit";
const rpc = createSolanaRpc("https://api.mainnet-beta.solana.com");
const epochInfo = await rpc.getEpochInfo().send();
const epochSchedule = await rpc.getEpochSchedule().send();
const slotsPerEpoch = epochSchedule.slotsPerEpoch;
const slotsRemaining = slotsPerEpoch - epochInfo.slotIndex;
const msPerSlot = 400; // target, not guaranteed
const estimatedMsRemaining = slotsRemaining * msPerSlot;
console.log({
currentEpoch: epochInfo.epoch,
slotInEpoch: epochInfo.slotIndex,
slotsPerEpoch,
slotsRemaining,
estimatedMinutesToNextEpoch: Math.round(estimatedMsRemaining / 60_000),
});What this demonstrates:
getEpochInfo returns the current epoch and position within itgetEpochSchedule provides slotsPerEpoch (typically 432,000)| Concept | Typical Value | Notes |
|---|---|---|
| Slot time | ~400 ms | Target; actual varies with skips |
| Slots per epoch | 432,000 | ~2 days at 400 ms/slot |
| Block time | 400 ms - 1 s+ | Depends on congestion and leader |
| Finality (TowerBFT) | ~12-13 s | ~32 confirmed slots |
// Programs generally do not read slot/epoch directly unless using sysvars
use anchor_lang::prelude::*;
pub fn log_clock(ctx: Context<LogClock>) -> Result<()> {
let clock = Clock::get()?;
msg!("slot: {}, epoch: {}", clock.slot, clock.epoch);
Ok(())
}Clock sysvar provides slot, epoch, unix_timestampgetBlockHeight vs getSlot appropriately.Clock::unix_timestamp sysvar in programs.confirmTransaction with a commitment level.| Alternative | Use When | Don't Use When |
|---|---|---|
getSlot polling | Debugging timing issues | User-facing confirmation UX |
Commitment levels (confirmed, finalized) | Application confirmation | Measuring block production health |
getBlockTime | Correlating slot to UTC | Real-time countdown timers |
| Clock sysvar in programs | On-chain time locks | Sub-second precision requirements |
A slot is a time window (~400 ms target) during which one validator is designated leader and may produce a block.
Approximately 2 days. An epoch contains ~432,000 slots at the target 400 ms slot time.
No block is produced for that slot. The slot number still advances. Transactions wait for the next available leader.
No. Slot increments every ~400 ms regardless of blocks. Block height increments only when a block is actually produced.
const info = await rpc.getEpochInfo().send();
console.log(info.epoch);TowerBFT requires a supermajority of stake to vote on a fork. This typically takes ~32 slots of voting.
Yes, via the Clock sysvar: Clock::get()?.slot.
At each epoch boundary. The new schedule is computed from the stake distribution at that point.
Same target (400 ms), but devnet has fewer validators and more skips. Do not use devnet for timing benchmarks.
Rewards are credited per epoch based on stake weight and inflation rate. New delegations have a warmup period measured in epochs.
The number of slots elapsed since the current epoch started. Range: 0 to slotsPerEpoch - 1.
Only for rough estimates. Use confirmed/finalized commitment for user-facing "transaction complete" states.
solana slot CLI usageStack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.
Reviewed by Chris St. John·Last updated Jul 16, 2026