Solana data pipelines and indexers
Seed state over RPC, follow Carbon Stream, resume from a past slot and page an address's history. One key and one host, on hardware Carbium owns in Switzerland.
Free to start. Carbon Stream from $20 a month; heavy streams from Business.
Four jobs every indexer does
Seed, follow, resume, page. Carbium has a surface for each, on one key and one host: services.carbium.sh.
getMultipleAccountsSeed state over RPC
The stream sends no snapshot, so load the current state first: getMultipleAccounts for known accounts, getProgramAccounts from Carbium's own index for provisioned programs.
RPC referenceservices.carbium.sh:9443Follow Carbon Stream
Carbium's Yellowstone gRPC stream, filtered on the server. Follow wallets and programs with transactions.accountInclude: every transaction is carried, failed ones included.
Carbon Stream: Solana gRPCfromSlotResume from a past slot
After a drop, read the replay floor with subscribeReplayInfo and resubscribe with fromSlot at or above it, at processed commitment. Dedupe the overlap on slot and signature.
Replay in the stream referencegetTransactionsForAddressPage history
getTransactionsForAddress, in the shape Helius uses, pages signatures or full transactions with filters for slot, time, status and token transfers, back to the ledger floor.
History methods
Light streams and heavy streams
A stream's filter sets what it costs to open and the plan it opens on. Narrow filters are light and open on every paid plan. A whole program's accounts, blocks, entries and every transaction are heavy, from Business.
| To follow | Filter | Credits to open | Opens on |
|---|---|---|---|
| Wallets or a program's transactions | transactions with accountInclude | 25 | Dev and up |
| Transaction status only | transactionsStatus with accountInclude | 25 | Dev and up |
| A list of accounts | accounts with an account list | 25 | Dev and up |
| Slots | slots | 5 | Dev and up |
| Block metadata | blocksMeta | 200 | Dev and up |
| Every account of a program | accounts with an owner | 200 | Business and up |
| Every transaction | transactions with vote or failed set, nothing named | 200 | Business and up |
| Blocks | blocks | 200 | Business and up |
| Entries | entry | 200 | Business and up |
Before a stream goes long-lived
- Seed over RPC first: the stream sends no snapshot
- Put every filter in the first request: later ones are ignored
- Ping every 10 seconds and raise the receive limit to 64 MiB
- Hand frames to a queue: a reader that takes none for 10 seconds is cut
Per account: Dev opens 5 streams, none heavy; Business 25 streams, 1 heavy; Pro 100 streams, 2 heavy. Free has no stream. Every stream also spends 20 credits per MiB it delivers. A month of Dev credits carries about 488 GiB of frames, Business about 2,441 GiB and Pro about 9,765 GiB, if they paid for nothing else.
Filters, coverage and limitsFollow, backfill, resume
Open the stream first, backfill behind it over RPC, and resume from the last slot after a drop, so the index has no gap.
Follow first
Open the stream with the whole filter in the first request, and queue what it sends. Anything that lands during the backfill is already on its way.
Backfill behind it
Page getTransactionsForAddress newest first until paginationToken is null. One call examines at most 25,000 signatures, so a short page is not the end.
Dedupe the overlap
The stream and the backfill meet, and a replay can start one slot early. Store transactions by slot and signature, accounts by pubkey, slot and writeVersion.
Resume after a drop
Ask subscribeReplayInfo for firstAvailable. If your last slot is at or above it, resubscribe with fromSlot; if not, backfill from your last slot again.
// Index a program: follow it on Carbon Stream, backfill over RPC, resume after a drop
import Client, { CommitmentLevel } from "@triton-one/yellowstone-grpc";
const KEY = process.env.CARBIUM_KEY;
const PROGRAM = "YOUR_PROGRAM_ID";
const START_SLOT = BigInt(process.env.START_SLOT); // the slot your index begins at
const EMPTY = { accounts: {}, slots: {}, transactions: {}, transactionsStatus: {}, blocks: {},
blocksMeta: {}, entry: {}, accountsDataSlice: [], blockFooter: {} };
const rpc = (method, params) => fetch("https://services.carbium.sh", { method: "POST",
headers: { "content-type": "application/json", "x-api-key": KEY },
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method, params }) }).then((r) => r.json());
let lastSlot = 0n;
const queue = []; // hand these to your store
// Follow: narrowed to one program, so a light stream; resume from lastSlot while it is still kept
async function follow() {
const client = new Client("https://services.carbium.sh:9443", KEY, { grpcMaxDecodingMessageSize: 64 * 1024 * 1024 });
await client.connect();
const { firstAvailable } = await client.subscribeReplayInfo();
const resume = lastSlot > 0n && lastSlot >= BigInt(firstAvailable);
const stream = await client.subscribe({ ...EMPTY,
commitment: CommitmentLevel.PROCESSED, // replay is served at processed only
...(resume ? { fromSlot: String(lastSlot) } : {}),
transactions: { program: { vote: false, failed: false, accountInclude: [PROGRAM],
accountExclude: [], accountRequired: [] } } });
const pinger = setInterval(() => stream.write({ ...EMPTY, ping: { id: 1 } }), 10_000);
stream.on("data", (u) => {
if (!u.transaction) return;
lastSlot = BigInt(u.transaction.slot);
queue.push(u.transaction); // keep the handler fast; the store dedupes on (slot, signature)
});
const again = () => { clearInterval(pinger); setTimeout(start, 2000); };
stream.on("error", again);
stream.on("end", again); // a clean end can hide a gap: start over, which checks the floor again
return resume;
}
// Backfill: full transactions, newest first, down to fromSlot
async function backfill(fromSlot) {
let token;
do {
const { result, error } = await rpc("getTransactionsForAddress", [PROGRAM, {
transactionDetails: "full", limit: 100, maxSupportedTransactionVersion: 1,
filters: { slot: { gte: Number(fromSlot) } }, ...(token ? { paginationToken: token } : {}) }]);
if (error) throw new Error(error.message);
for (const row of result.data) queue.push(row);
token = result.paginationToken; // null when the walk is done
} while (token);
}
async function start() {
const from = lastSlot || START_SLOT;
if (!(await follow())) await backfill(from); // the stream first, so nothing falls between
}
await start();
Where history ends
getSignaturesForAddress pages come from Carbium's address index, which keeps up to 30 days. getTransaction and getBlock end at the validator's ledger floor, which moves: read it with getFirstAvailableBlock. There is no archive behind it.
History methodsWhich plan for which pipeline
A pipeline's plan is set by the stream shapes it needs and the bytes it reads. Light streams open on every paid plan; a whole program's accounts, blocks or entries need a heavy stream, from Business.
Free
$0a month
Build the seed and backfill
RPC and WebSocket with 500K credits once. No Carbon Stream on Free.
- Streams on Carbon Stream
- None
- Heavy streams
- None
- Requests a second, account reads
- 0.5
- Credits, granted once
- 500K
Dev
$20a month
A narrow pipeline
5 light streams: wallets, a program's transactions, account lists. No heavy streams.
- Streams on Carbon Stream
- 5
- Heavy streams
- None
- Requests a second, account reads
- 15
- Credits a month
- 10M
Business
Fits an indexer$250a month
An indexer
25 streams, 1 heavy for a whole program's accounts or blocks, and 50M credits a month.
- Streams on Carbon Stream
- 25
- Heavy streams
- 1
- Requests a second, account reads
- 50
- Credits a month
- 50M
Pro
$500a month
Several indexers
100 streams, 2 heavy, and 200M credits a month.
- Streams on Carbon Stream
- 100
- Heavy streams
- 2
- Requests a second, account reads
- 400
- Credits a month
- 200M
Plans are bought on carbium.sh. Prices are in US dollars; card through Stripe is the main way to pay. You can also pay in USDC or USDT from your own wallet. Streams bill 20 credits per MiB read, from the same credits as RPC calls.
What breaks in a pipeline
Indexers usually fail quietly: a gap nobody noticed, a filter that never changed, a reader that fell behind.
Seed before you stream
An account stream sends only writes made after it opens. Load state with getMultipleAccounts, then keep the highest slot and writeVersion per pubkey.
Coverage in the stream referenceRe-seed after a gap
OUT_OF_RANGE gap: re-seed required, or a WebSocket close 1012 stream_gap_reseed_required, means updates were lost. Reload state over RPC before trusting the stream.
Stream errorsRead fast
A reader that takes no frame for 10 seconds is cut, and a slow one gets consumer_lagged. Hand frames to a queue and never block the handler.
Stream errorsOne request, fixed filters
Filters in a later write are ignored, with no error. To change them, open a new stream, then close the old one.
The Subscribe requestWallets are transactions
System-owned wallets do not stream as account updates. Follow them with transactions.accountInclude and read preBalances and postBalances.
Coverage in the stream referenceAsk for version 1
getTransaction and getBlock need maxSupportedTransactionVersion 1, or a version-1 transaction answers -32015. The stream carries every version.
History methods
Build from the references
Three references a pipeline team keeps open: the stream, the history methods and the product page.
Carbon Stream reference
Filters, coverage, replay, keepalive, billing and every error with the action to take.
History methods
getTransactionsForAddress params, how walks are billed, the 30-day address index and the ledger floor.
Carbon Stream: Solana gRPC
The stream on Carbium: plans, endpoint and a first Yellowstone client.
Questions
carbium.sh's reference covers every method and limit. For anything else, talk to the team on the Carbium Discord.
Technical reference, on carbium.shCan I build a Solana indexer on Yellowstone gRPC without running Geyser myself?
Yes. Carbon Stream is a Yellowstone (Dragon's Mouth) compatible Geyser gRPC stream at https://services.carbium.sh:9443, filtered on the server, with your key in the x-token metadata. Existing Yellowstone clients work with the endpoint and the token changed. The key needs the gRPC scope: a key made while the account was on Free has none, so turn it on after you upgrade. It opens on Dev, Business and Pro.
Carbon Stream: Solana gRPCDoes Carbium serve historical Solana data?
Up to a point. getSignaturesForAddress pages come from Carbium's address index, which keeps up to 30 days. getTransaction and getBlock end at the validator's ledger floor, which moves; read it with getFirstAvailableBlock. There is no archive behind it, so a listed signature can be older than any transaction you can fetch.
History methodsHow do I backfill Solana transactions for an address?
Page getTransactionsForAddress, in the shape Helius uses, until paginationToken is null. One descending page of signatures with no filter costs 55 credits. A full, ascending or filtered call is a walk: 55 credits plus 50 for each upstream call after the first, with its worst case held before it starts.
History methodsCan I replay Carbon Stream from a past slot?
Yes, with fromSlot in the first request, at processed commitment only. The kept window is set by bytes, not slots, so call subscribeReplayInfo first and resume at or above its firstAvailable. Below it the stream ends with OUT_OF_RANGE gap: re-seed required. Dedupe the overlap on slot and signature.
Replay in the stream referenceDoes the gRPC stream send a snapshot of current state?
No. An account stream sends only writes made after it opens. Load the current state with getMultipleAccounts first, up to 100 keys a call and 300 on Pro, then apply stream updates, keeping the highest slot and writeVersion per pubkey.
Coverage in the stream referenceWhat makes a Carbon Stream heavy?
A blocks or entry filter, a transaction firehose (vote or failed set with nothing named), or an accounts filter that names an owner and no account. Heavy streams start on Business: Business holds 1 heavy, Pro 2 heavy. Slots, block metadata, transaction status and narrowed filters are never heavy.
Filters servedHow much does streaming cost in credits?
Opening a stream costs 5, 25 or 200 credits, by its heaviest filter, and every MiB it delivers costs 20. Sustained, 10 MiB a second is about 720,000 credits an hour. A stream that delivers no data frame books nothing, except a fromSlot probe below the replay floor, which keeps its opening charge. A refused Subscribe is never charged.
Stream billingCan I stream every Solana block?
Not whole. A blocks frame on Carbon Stream carries only the transactions that touch nine on-chain liquidity programs, and its executedTransactionCount still states the full count. For whole blocks, read getBlock over RPC with maxSupportedTransactionVersion 1, or follow the transactions you need.
Coverage in the stream referenceMore use cases
The same key and host, put to other jobs.
Automated apps
Read the chain, listen on Carbon Stream, quote a route and send: the always-on loop on one key.
See the use case
Wallets
Balances, history, live updates, in-app swaps and sends for a Solana wallet, on one host.
See the use case
dApps and web apps
Reads, priority fees, sends and swaps for a Solana app in the browser, with the key kept server-side.
See the use case
AI agents
A Solana API an agent can sign up for with a keypair, read in one file and call as JSON-RPC.
See the use case
Write the backfill free, then index on Business
Build the seed and the backfill on the Free plan. Dev adds Carbon Stream with 5 light streams. Business adds 1 heavy stream for a whole program's accounts or blocks, 25 streams in all and 50M credits a month.
Carbon Stream: Solana gRPC