Replay
The Kaldera replay window, the fromSlot parameter, and resuming a stream after a disconnect.
Kaldera keeps recent history, so a reconnecting client can replay what it missed.
Replay window
Kaldera answers fromSlot from two places.
| Source | Covers |
|---|---|
| The recent-slot buffer in your region | The last 1,000 slots or so: about 3.5 minutes of chain time at the current slot time of about 213 ms (measured 16 November 2026) |
| The replay store | Up to 24 hours, in the Blade Runner and Nexus plans |
Not every region keeps its own replay store. A region without one is served from a region that has one, so the replayed part of the stream carries extra round-trip latency until it catches up. If no store is reachable, the region falls back to its recent-slot buffer.
24 hours is a span, not a promise
The replay store spans up to 24 hours, but a break in the feed or a restart leaves a hole inside that span. A hard-coded window is unsafe: the server reports the oldest slot it can serve, and nothing earlier can be requested.
The available span
SubscribeReplayInfo is a single request and response, not a stream. It uses the same endpoint and API key as Subscribe, and returns firstAvailable: the oldest slot that region can replay from. On reconnect, the slot to use is the larger of your own last slot and firstAvailable.
const client = new Client(ENDPOINT, process.env.CK_API_KEY, undefined);
await client.connect();
const info = await client.subscribeReplayInfo(); // { firstAvailable?: string }
const oldest = info.firstAvailable === undefined ? undefined : BigInt(info.firstAvailable);
// Never ask for a slot the server cannot serve
const from = lastSlot !== undefined && oldest !== undefined && lastSlot < oldest ? oldest : lastSlot;Resuming a stream
fromSlot on a SubscribeRequest starts the stream at that slot. Kaldera first sends the matching updates from there, then continues with live data on the same stream. If the server loses its own source in the middle of a replay, it resumes at the last slot it sent you, not at your original fromSlot, so you do not receive the replay twice.
Only the first request on a stream can carry fromSlot. On a later request on the same stream, fromSlot is ignored: open a new stream to replay.
- Record the highest
slotyou have handled. - Resume from that slot, not the next one. A slot's updates can be split across the moment you disconnected.
- Deduplicate by a stable key. Replay can resend updates you already handled.
| Update | Key |
|---|---|
| Transaction | Signature |
| Account | Pubkey, slot and writeVersion |
| Slot | Slot and status |
Commitment levels in replay
Replay from the replay store (a fromSlot older than the recent-slot buffer) is served at PROCESSED and CONFIRMED only.
| Level | Replay from the recent-slot buffer | Replay from the store |
|---|---|---|
PROCESSED | Yes | Yes |
CONFIRMED | Yes | Yes |
FINALIZED | Yes | No (INVALID_ARGUMENT) |
A FINALIZED fromSlot older than the recent-slot buffer fails on the stream with gRPC status INVALID_ARGUMENT and this message:
extended replay supports processed/confirmed commitment only; finalized from_slot is limited to Yellowstone's native windowA FINALIZED fromSlot inside the recent-slot buffer works.
Replay at CONFIRMED sends only slots that reached confirmed. A slot that died on a fork, or did not reach the requested commitment, is withheld, exactly as live delivery withholds it. The replay is a strict subset of what the chain confirmed, with nothing added.
Since Alpenglow (21 October 2026), a slot is finalized well under a second after it is confirmed. Before Alpenglow, finalized lagged by about 32 slots. CONFIRMED is the level for replay.
What replay covers
| Updates | Replay |
|---|---|
| Transactions and transaction status | Verified against block history, with nothing missing and nothing repeated |
| Slot status | Verified |
| Block meta | Verified |
Full blocks (blocks filter) | Recent-slot buffer: the full block, as the live stream sends it. Replay store: the same block the validator sends: block fields and transactions in block order. Blocks never carry accounts or entries, live or replayed; a blocks filter with includeAccounts or includeEntries is refused. See Filter limits. |
Separate accounts and entry updates | Not verified. Replay is not a source of record for these. |
| Vote transactions | Since Alpenglow (21 October 2026), blocks carry no vote transactions, so there are none to stream or replay; vote: true adds nothing for slots from that date. Slots before it are not replayed from the store, even with vote: true. |
| Block footers | Replayed for slots from 22 October 2026, 02:05 UTC onward. Earlier slots carry no footer updates. |
Replay is not available on Turbo Kaldera: a request that carries fromSlot is rejected with INVALID_ARGUMENT. Standard Kaldera covers the gap instead.
Recovering a missed block
- A
fromSlotreconnect returns full blocks for up to 24 hours (PROCESSEDandCONFIRMEDonly from the store). getBlockreturns any block back to genesis on Blade Runner and Nexus. Recent blocks come from the region's ledger (in Frankfurt, about the last 3.5 days); older ones from long-term storage through Cube Runner.getBlockrate limits are on Plans & Limits.getBlockreturns the block's transactions but not the separate account updates a streamed block carries.
Throughput of a deep replay
Since 9 November 2026, a replay paces itself to your client: Kaldera sends replayed updates as fast as you read them, so a slow reader gets a longer replay, not a hole. Your plan's bandwidth allowance applies to a replay as it does to a live stream.
- A general-purpose command-line client drains roughly 440 messages a second. That is not enough for a transaction filter over a few thousand slots.
- The socket belongs on its own task or thread, with decoding and business logic elsewhere.
- The narrowest filter that closes the gap replays faster than a full production filter.
- Hours of history rather than minutes are paged: a few hundred slots, a checkpoint, then the next range.
A stream that survives disconnects
This subscriber reconnects with exponential backoff, resumes from the last slot it saw, and skips duplicates.
import Client, {
CommitmentLevel,
type SubscribeRequest,
type SubscribeUpdate,
} from "@triton-one/yellowstone-grpc";
import bs58 from "bs58";
const ENDPOINT = "https://kaldera-newyork.constant-k.com:8443";
const request: SubscribeRequest = {
commitment: CommitmentLevel.CONFIRMED,
transactions: {
pumpfun: {
vote: false,
accountInclude: ["6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"],
accountExclude: [],
accountRequired: [],
},
},
accounts: {},
slots: {},
transactionsStatus: {},
blocks: {},
blocksMeta: {},
entry: {},
blockFooter: {},
accountsDataSlice: [],
};
let lastSlot: bigint | undefined; // highest slot seen so far
const seen = new Map<string, bigint>(); // signature -> slot, to drop replayed duplicates
function handleTransaction(signature: string, slot: bigint) {
console.log(slot, signature);
}
async function runStream(): Promise<void> {
const client = new Client(ENDPOINT, process.env.CK_API_KEY, undefined);
await client.connect();
// Resume from the last slot you saw. fromSlot is a decimal string.
const stream = await client.subscribe(
lastSlot === undefined ? request : { ...request, fromSlot: lastSlot.toString() },
);
await new Promise<void>((resolve) => {
stream.on("data", (update: SubscribeUpdate) => {
const tx = update.transaction;
if (!tx?.transaction) return;
const slot = BigInt(tx.slot);
const signature = bs58.encode(tx.transaction.signature);
if (seen.has(signature)) return; // already handled before the reconnect
seen.set(signature, slot);
handleTransaction(signature, slot);
if (lastSlot === undefined || slot > lastSlot) lastSlot = slot;
// Keep memory bounded: forget signatures from old slots
if (seen.size > 200_000) {
for (const [sig, s] of seen) if (s + 1_000n < slot) seen.delete(sig);
}
});
stream.on("error", (err) => console.error("stream error:", err.message));
stream.on("close", () => resolve());
});
}
// Reconnect forever, with capped exponential backoff
for (let attempt = 0; ; attempt++) {
const started = Date.now();
await runStream().catch((err) => console.error("connect failed:", err.message));
if (Date.now() - started > 60_000) attempt = 0; // it ran for a while: reset the backoff
const delay = Math.min(500 * 2 ** attempt, 30_000);
await new Promise((resolve) => setTimeout(resolve, delay));
}Built-in reconnect in the TypeScript client
@triton-one/yellowstone-grpc 8.0.0 and later have a built-in reconnect layer, subscribeWithReconnect(). Plain subscribe() never reconnects. The rules below are for 10.0.0 and later.
import Client, { CommitmentLevel, type ReconnectEvent } from "@triton-one/yellowstone-grpc";
const client = new Client(
"https://kaldera-newyork.constant-k.com:8443",
process.env.CK_API_KEY,
undefined,
{ backoff: { initialIntervalMs: 100, multiplier: 2, maxRetries: 10 } }, // policy: "Replay" (default) or "NoReplay"; slotsBehind defaults to 0
);
await client.connect();
// any commitment; a fromSlot here is where the first connection starts
const stream = await client.subscribeWithReconnect({ ...request, commitment: CommitmentLevel.PROCESSED });
stream.on("data", (event: ReconnectEvent) => {
if (event.type === "Update") {
handleUpdate(event.update);
} else {
// Disconnected: undo what you stored for these banks; replacement updates follow
for (const bank of event.partialBanks) dropBank(bank.slot, bank.bankId);
}
});
stream.on("error", (err) => console.error("recovery failed:", err.message));| Rule | Detail |
|---|---|
| Request | Any commitment. A fromSlot in the first request is where the stream starts; a later request's fromSlot is ignored. No startup snapshot. |
| Fourth constructor argument | backoff, policy ("Replay" or "NoReplay") and slotsBehind. connect() rejects removed options such as enabled and slotRetention. |
| Resume point | "Replay" (the default): slotsBehind slots before the last confirmed slot seen. "NoReplay": the live tip; updates sent during the outage are lost. |
| Events | Update (update) or Disconnected (partialBanks to undo, replayFromSlot), then the updates of the new connection |
| Retry budget | Up to maxRetries reconnects in a row. A connection that delivers a bank's block, block footer or block meta refills it. |
| Extra filters | A slots and a blocksMeta filter, both named __reconn (RECONNECT_FILTER_KEY). They use one of your 4 slot filters and one of your 4 block meta filters. See Filter limits. |
| End of stream | OUT_OF_RANGE or a spent retry budget ends the stream with an error |
| Duplicates | A replay resends banks you already hold. A replayed bank carries only the latest write of each account, so it can have fewer account updates than the same bank sent live, with the same final state. |
The layer does not remove duplicates: a replay resends banks you already have, so skip what you have already handled. Your own idempotency matters most where a repeated update would cost money.
If the slot is too old
A fromSlot outside the window cannot be served. The stream fails with gRPC status OUT_OF_RANGE (11) and a message that names the oldest slot you can ask for:
broadcast from 447000000 is not available, last available: 447700000That second number is the oldest available slot, not the newest. It is the same value SubscribeReplayInfo returns, and a client that retries the same too-old fromSlot gets the same error every time.
- Resubscribe from the oldest available slot, or without
fromSlotto go straight to live data. - Fill the gap from Solana RPC if you need it, for example with
getSignaturesForAddressandgetTransactionfor the accounts you track.
Replay limits per key
A replay that starts before the recent-slot buffer is limited per API key. A fromSlot inside the recent-slot buffer, and a live stream with no fromSlot, are never limited or counted. A stream always starts exactly at the fromSlot you ask for, or fails at once with one of the errors below. Nothing is moved or skipped.
| Limit | What happens |
|---|---|
| One such replay at a time per key in each region, up to 3 per key | A second replay in the same region waits up to 5 seconds for the first to catch up to the live slot. If it has not, the request fails with RESOURCE_EXHAUSTED. |
| 24 hours of replay per rolling 24 hours, per key | Usage is the span of chain time actually sent while the replay catches up: a short gap fill costs only its own slots, and the live part after catch-up is free. The replay used in an hour becomes available again 24 hours later. A fromSlot further back than what is left fails at once with OUT_OF_RANGE. |
replay limit: this API key already has a replay catching up in this region (one per region at a time); retry when it has caught upbroadcast from 447000000 is not available, last available: 447700000The OUT_OF_RANGE message names the oldest fromSlot you can use right now. With no replay left in the window, it is the start of the recent-slot buffer. A fromSlot older than the 24-hour window still fails as in If the slot is too old.
Gap filling works within these limits: a fill stream replays from the first missing slot, and a second fill in the same region opens once the first has caught up. See Catching and filling gaps.
Catching and filling gaps
A live stream can leave a gap: after a disconnect, or when a stream falls behind or goes over its key's bandwidth limit. Each stream keeps up to 64 MB of queued updates, then drops its oldest ones. See Plans & Limits. For complete data, gap handling belongs in the client logic: detect the gap, then fill it with a second stream that replays from the first missing slot. Replays that start before the recent-slot buffer are subject to Replay limits per key.
Detecting a gap
Add blocksMeta: {} to the request. Each block meta update carries slot and parentSlot (parent_slot in Rust). A skipped slot never produces a block, so it is never a gap.
- If a block's
parentSlotis not the last block slot you received, the blocks in between were missed. - After a disconnect, the gap starts after the last slot you handled.
A full block (blocks filter) always arrives whole and also carries parentSlot, so this check catches every missed block. For transaction and account streams, block meta shows a missed block, but not a block whose updates were only partly dropped; for those, run redundant streams (see Other ways to avoid gaps) or check the slots that matter with getBlock.
Filling a gap
- Open a second stream with
fromSlotset to the first missing slot. A replay only works on the first request of a stream, so the fill is its own stream. See Changing filters on an open stream. - Keep the live stream running.
- Use the narrowest filter that covers what you missed. See Throughput of a deep replay.
- Skip duplicates: by signature for transactions, by slot for blocks.
- Close the fill stream once it reaches the slot where the live stream picked up again.
Both streams share the key's bandwidth limit. A fill stream left open after it catches up spends that limit on data you already have.
The fill works up to 24 hours back, the replay window. Older slots: see Recovering a missed block and If the slot is too old.
Other ways to avoid gaps
- Redundant streams. The same filters in more than one region, or twice in one region, with deduplication.
- Consumer speed. In the Blade Runner plan, a client that falls far behind loses the oldest queued updates. See Plans & Limits.