Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Dragon's Mouth gRPC

Dragon's Mouth is Triton's Yellowstone gRPC stream, with Subscribe filters, replay, and reconnect for Solana account, transaction, slot, and block updates.

Dragon's Mouth (or Yellowstone gRPC) taps the validator's Geyser plugin directly, so you get account, transaction, slot, and block updates as the validator processes them, ahead of JSON-RPC polling.

Use cases

Dragon's Mouth is the gRPC stream for backend services that need low-latency processed updates.

  • Trading, MEV, market making, and bots. Low-latency reads of pool state, oracles, AMM accounts, and price-impacting transactions.

  • DeFi backends. Live pool, order-book, and account state for services that react to the chain in real time.

  • Real-time UIs (backend). Live balances, transaction feeds, and account state for backends that proxy to wallets and explorers.

When not to use it:

  • Browsers and frontends cannot speak gRPC. Use WebSocket instead.

  • If your pipeline cannot miss a block (indexing, analytics, compliance), use Fumarole, which guarantees at-least-once delivery and auto-backfills up to 4 days of data on reconnect.

Features and benefits

Sub-slot latency

Intra-slot updates arrive ahead of JSON-RPC polling. You receive multiple account updates within the current slot.

Server-side filtering

Filter by pubkey, program owner, signature, memcmp, datasize, lamports, or token-account state, all server-side.

Bi-directional streams

Modify subscriptions on the fly without reconnecting. Send a new request, server swaps your filter set.

Compact Protobuf payloads

Binary serialization cuts bandwidth and CPU.

Compressed account filters

Track millions of accounts with a Cuckoo-filter set instead of a raw pubkey list, cutting subscription payloads ~10x.

Reconnect with bank recovery

The Rust and TS clients can reconnect a stream for you, replay from the last confirmed slot seen, and flag partly delivered banks to discard.

How it works

You open a gRPC stream, send a SubscribeRequest describing the accounts, transactions, slots, blocks, or entries you want, and matching updates arrive as protobuf messages at your chosen commitment level (processed, confirmed, or finalized).

The same stream accepts updated requests, the service answers one-shot unary calls, and on reconnect you can replay from a recent slot (from_slot) within the server's replay window.

Supported methods

Stream
What you receive

Account writes

Updates whenever a matching account's data, lamports, or owner changes

Transactions

Every transaction matching your filter, with full meta (logs, status, balance deltas)

Deshred Transactions gRPC

Transactions reconstructed from shreds before execution. Separate SubscribeDeshred method. See Deshred Transactions gRPC.

Entries

Solana ledger entries (low-level, rare use case)

Block notifications

Full blocks as they're produced, optionally with their transactions and accounts

Block metadata

Block headers only, without the transaction payload

Slot notifications

Slot-status events (processed/confirmed/finalized plus intra-slot lifecycle)

Method
Returns

getLatestBlockhash

The latest blockhash + last valid block height at a commitment level

getBlockHeight

The current block height at a commitment level

getSlot

The current slot at a commitment level

isBlockhashValid

Whether a given blockhash is still valid

subscribeReplayInfo

Earliest slot still available for stream replay

getVersion

The Geyser gRPC plugin and Solana version

ping

Liveness check; the server replies with a pong

Subscribe request

Every stream subscription is a single SubscribeRequest message. It has fields that apply across all stream types, as well as a per-stream filter map.

You send it once when you open the stream; then you can send it again at any time to modify it (the new request fully replaces the old one).

Commitment level for buffering. Optional. Defaults to processed.

Value
Meaning

PROCESSED (0)

Highest slot seen, possibly on a fork. Lowest latency.

CONFIRMED (1)

Same state as FINALIZED on Alpenglow.

FINALIZED (2)

On Alpenglow there are no vote towers or lockouts: a slot is finalized by certificates of aggregated votes.

Alpenglow has been active on Solana mainnet since epoch 1064 (21 Oct 2026). CONFIRMED and FINALIZED updates arrive together.

Stream at processed and track confirmed and finalized yourself, rather than asking the server to buffer by commitment. The pattern:

  1. Subscribe to slot notifications alongside your data stream, and leave filter_by_commitment unset so all three statuses arrive.

  2. Buffer incoming events by slot and bank_id.

  3. When you see a slot status change to confirmed or finalized, release the buffer with the same slot and bank_id. On finalized, also drop the buffered events of the slot's other banks.

  4. A bank's events always arrive before its commitment update. See event order per bank.

The server fills in missing commitment updates. The validator does not send a commitment status for every slot. When a slot reaches confirmed or finalized, Dragon's Mouth also sends that status for each ancestor slot that has not reached it yet.

Sends a periodic keepalive to prevent idle-stream drops by upstream cloud providers (e.g. Cloudflare). Server replies with pong. Optional but recommended for long-running streams.

See pings.

Truncates account data payloads to a byte range, reducing bandwidth. Optional. Empty array means full payload.

Example: [{ "offset": 32, "length": 40 }] returns 40 bytes starting at byte 32.

Replay buffered updates starting from this slot, then continue live on the same stream. Optional. Used for reconnection after short disconnections.

See replay from a slot.

Multiplexing in one connection

Several named filters in one SubscribeRequest share one stream. The warning above is about opening several streams on one connection.

A single gRPC connection can carry many subscriptions. Add multiple named entries to any filter map (for example accounts, transactions, slots, blocks, blocksMeta, entry) and they all stream over the same connection. Each match is tagged with the filter name(s) that produced it, so you can route updates downstream.

The canonical multiplex example is the Multiple programs Accounts subscription, two named owner filters under accounts, one connection. The same pattern works across stream types: subscribe to accounts AND transactions AND slots in one request.

Filter configuration

Each SubscribeRequest has a map per stream type. The key is a label you choose (returned with each match so you can route it); the value is the filter spec.

Account filters
Parameter
Type
Required
Description

account

string[]

-

List of pubkeys to subscribe to directly. Each must be a base58-encoded address.

owner

string[]

-

List of program owners. Subscribes to every account owned by these programs.

filters

AccountsFilter[]

-

Content-based filters on the account data. Each filter is one of: memcmp, datasize, tokenAccountState, or lamports. Combined as logical AND.

Transaction filters
Parameter
Type
Required
Description

vote

bool

-

Include or exclude vote transactions. false excludes votes. Alpenglow blocks have none.

failed

bool

-

Include or exclude failed transactions. false excludes failures.

signature

string

-

Match one transaction by its signature.

account_include

string[]

-

Accounts mentioned anywhere in the transaction.

account_exclude

string[]

-

Exclude transactions mentioning these accounts.

account_required

string[]

-

Accounts that MUST all be mentioned (every one of them).

Block filters
Parameter
Type
Required
Description

account_include

string[]

-

Only deliver transactions and accounts in the block that mention these.

include_transactions

bool

-

Include the block's transactions.

include_accounts

bool

-

Include accounts updated during the block.

include_entries

bool

-

Include the block's entries.

Slot filters
Parameter
Type
Required
Description

filter_by_commitment

bool

-

If true, only receive updates matching the request's commitment. If false, receive processed, confirmed, and finalized updates.

interslot_updates

bool

-

If true, also receive the intra-slot statuses. Has no effect when filter_by_commitment is true. See intra-slot updates.

Filter logic

Within a single filter category (e.g. one transaction filter), values are combined as follows:

  • Within an array, OR, except account_required. account_include: [A, B] matches transactions mentioning A or B.

  • account_required needs every listed account. account_required: [A, B] matches transactions mentioning both A and B.

  • Across fields, AND. vote: false, account_include: [A] matches non-vote transactions mentioning A.

For transactions specifically:

Across multiple named filters in the same category (e.g. two transaction filters), you receive matches from any of them. Each match comes tagged with the filter name(s) that produced it, so you can route updates downstream.

Excluded programs

Account updates owned by Light Protocol / ZK Compression (compr6CUsB5m2jS4Y3831ztGSTnDpnKJTKS95d64XVq) are not delivered on any Dragon's Mouth stream. To consume that data, use the Photon indexer.

Subscribing to each stream type

The examples below use gRPC JSON for the request body and TypeScript for the client. Other languages use the same shape. Each example assumes you've already created and connected a Client (see clients and SDKs).

The latest protobuf files live in the yellowstone-grpc repo. For Rust, use the yellowstone-grpc-proto crate.

Accounts

Subscribe to one or more specific accounts. The label wsol/usdc is yours, it comes back on each match for routing.

Subscribe to every account owned by a program. The example tracks all Solend accounts.

Combine multiple programs in one filter, or use separate filters for different routing tags.

Both programs in one filter:

Separate filters with different tags:

Filter by content (memcmp, token account state) and trim the returned payload to save bandwidth. The example tracks USDC token accounts and returns only 40 bytes starting at offset 32 (owner + amount).

For subscriptions tracking thousands of accounts, the explicit pubkey list dominates the payload (1M pubkeys = ~44 MB per resend). Compressed account filters carry your tracked set as a Cuckoo filter, a probabilistic data structure storing small fingerprints instead of full 32-byte pubkeys, cutting payload size ~10x.

Tracked accounts
Compressed filter
Explicit pubkey list

1,000

~4 KiB

~44 KB

10,000

~32 KiB

~440 KB

100,000

~256 KiB

~4.4 MB

1,000,000

~4 MiB

~44 MB

2,000,000

~8 MiB

~84 MB

Inserts and removes on the filter are O(1), so account-set mutations skip a full filter rebuild. And because it uses SipHash-2-4, a TypeScript client and a Rust client emit identical filter bytes for the same pubkey set, so one tracked set works across languages and Rust compiler versions.

Tradeoffs:

  • False positives stay under 1%. Your client should keep an exact tracked set and drop incoming updates whose pubkey isn't in it. A HashSet check is the standard pattern; the probabilistic part lives only on the wire.

  • One-time build cost. A 2M-account filter takes ~390 ms on a release build. Every subsequent insert, remove, and resend is cheap.

  • Request size limit on shared mainnet endpoints. The server rejects a SubscribeRequest larger than 8 MiB (8,388,608 bytes). A filter built for 2,000,000 accounts is exactly 8 MiB before the rest of the request, so it is rejected. A filter built for about 1.99 million accounts or fewer is 4 MiB or smaller and fits.

Available in the Rust and TypeScript clients (TypeScript from @triton-one/yellowstone-grpc v5.0.9). The Rust API builds a CompressedAccountFilterSet and attaches it to your SubscribeRequest:

Mutate and resend when the set changes:

Drop false positives against your local exact set:

Full deep-dive: Compressed filters for Yellowstone gRPC.

Transactions

Use the transactions subscription to receive executed transactions at your chosen commitment level; processed delivers them as soon as the node processes them, while confirmed and finalized add latency. To receive transactions before the node executes them, use Deshred Transactions gRPC, a separate gRPC method on the same service. It delivers transactions reconstructed from shreds.

Subscribe to every successful, non-vote transaction at processed commitment.

Subscribe to non-vote transactions that mention a specific account anywhere.

Drop transactions that mention any of the listed accounts.

Combine include + exclude in one filter. The example matches transactions mentioning a Serum program but excludes any that also touch a specific account.

Subscribe to one transaction by its signature.

For the wire format of each transaction update, see geyser.proto (search for SubscribeUpdateTransaction).

Slots

Subscribe to slot status changes. No filter parameters needed beyond a label.

Each update carries a SlotStatus enum. See intra-slot updates for all statuses and event order per bank.

Blocks

Receive every block as it's produced, with full transaction payload.

Trim the block payload by toggling include_transactions / include_accounts.

Restrict the block's transactions and accounts to those mentioning specific addresses.

Get block headers without the transaction payload (much smaller messages).

Entries

Subscribe to ledger entries (groups of transactions that make up a slot). No filter parameters are required; subscribe by adding any named entry filter.

Modifying and unsubscribing

The subscribe stream is bi-directional. Send a new SubscribeRequest at any time to update filters. It fully replaces the previous subscription, so your client must keep a local copy of the full config it wants.

To unsubscribe from everything but keep the connection open:

Sending pings

Some cloud providers (e.g. Cloudflare) close idle streams. To avoid this, you need to keep sending pings to the server. The server sends its own ping every 10 seconds; when you send a ping with an id, it replies with a pong carrying the same id.

A maintained Rust example that sends pings and handles the server's ping and pong updates: subscribe-ping.rs in rpcpool/yellowstone-grpc.

Replay from a slot

Dragon's Mouth can replay recently buffered updates by setting from_slot on SubscribeRequest. The server replays buffered updates from that slot, then continues live on the same stream.

Use it for short-disconnection recovery:

  1. Track the latest slot your application has processed.

  2. On disconnect, reconnect and resubscribe with from_slot set to that slot.

  3. If the slot is no longer available, fall back to a fresh live subscription or your own backfill path.

To discover the earliest replayable slot, call the unary subscribeReplayInfo RPC:

  • Replay only covers the server's retained replay window: about 1,000 slots on shared mainnet endpoints and about 300 slots on shared devnet. On dedicated nodes the window varies, so contact support for yours.

  • If from_slot is older than the earliest available, the request fails. Retry with a newer slot.

  • Replay uses the same filters and commitment level as the live subscription.

  • Replay starts at a slot boundary, so you may receive duplicate updates from your last-processed slot. Dedupe them.

For teams self-hosting a Yellowstone gRPC server, replay is on by default (replay_stored_slots defaults to 150); set it to 0 to disable replay.

Reconnect with bank recovery

Ordinary subscriptions don't reconnect. The Rust methods subscribe, subscribe_with_request, and subscribe_once, and the TypeScript methods subscribe() and subscribeDeshred(), end at the first disconnect, even if you set a reconnect config.

To have the client reconnect for you, open the stream with subscribe_with_reconnect (Rust, yellowstone-grpc-client 17.0.0 and later) or subscribeWithReconnect() (TypeScript, @triton-one/yellowstone-grpc 10.0.0 and later). Earlier versions have a different reconnect API.

The request:

  • can use any commitment level;

  • can set from_slot: the first connection replays from it, and the server ignores from_slot in later requests;

  • must not name a filter __reconn (RECONNECT_FILTER_KEY). The client adds its own block meta and slot filters under that name and hides updates that only they match. The Rust client overwrites a filter with that name; the TypeScript client rejects the request.

The client must not request a startup snapshot (x-request-snapshot); otherwise opening the stream fails with FAILED_PRECONDITION.

To change the filters, send a new SubscribeRequest on the sink (Rust) or write it to the stream (TypeScript). The change applies to the current connection and to every reconnect.

When the connection fails with a retryable status (UNAVAILABLE, INTERNAL, UNKNOWN, CANCELLED, DEADLINE_EXCEEDED, RESOURCE_EXHAUSTED, ABORTED, or DATA_LOSS), or the server ends it, the stream:

  1. Emits one Disconnected event that lists the banks you received only in part.

  2. Waits the backoff delay, then resubscribes with the latest request and the from_slot the reconnect policy picks.

  3. Drops whatever a later connection sends of a listed bank that the replay doesn't resend.

The reconnect policy (ReconnectConfig::policy in Rust, policy in TypeScript) picks where the new connection starts:

  • Replay (the default) replays from slots_behind slots before the last confirmed slot the stream saw. slots_behind defaults to 0.

    • Before the stream sees a confirmed slot, it replays from the first request's from_slot, or resumes at the live tip if there is none.

    • The replay resends banks you already received whole. Skip those duplicates.

    • A replayed bank carries only the latest write of each account, so it can have fewer account updates than the same bank delivered live. The final state of each account is the same.

    • The replay slot must be inside the server's replay window; otherwise the reconnect fails and the stream ends with an error.

  • NoReplay resumes at the live tip. Updates sent during the outage are lost.

The backoff (ReconnectConfig::backoff in Rust, backoff in TypeScript) is a retry budget:

  • The default is 10 ms, doubling, with 3 retries.

  • Each reconnect spends one retry and waits first: the initial interval for the first reconnect, multiplied by the multiplier for each next one.

  • A connection that delivers a Block, block footer, or block meta, including one from the client's own __reconn filter, refills the budget. A ping or a slot status alone doesn't.

  • With the budget spent, the next disconnect ends the stream with its error. With 0 retries, the stream never reconnects.

  • Within one reconnect, the client retries a failed connect up to the same number of times, with the same delays.

The stream returns an error and ends when the status isn't retryable, a reconnect fails, or the retry budget is spent. Open a new subscription.

Your code handles two event types:

  • Update carries a SubscribeUpdate, as an ordinary subscription delivers it.

  • Disconnected marks a dropped connection. Every update after it comes from the new connection.

    • partial_banks (partialBanks in TypeScript) lists, in slot order and by slot and bank_id, the banks you received content of (account writes, transactions, transaction statuses, entries, or CreatedBank) but not their Block, block footer, or block meta. Discard their state.

    • A replay resends the listed banks at or above replay_from_slot whole.

    • replay_from_slot (replayFromSlot) is the slot the new connection replays from, or None (null) when it resumes at the live tip.

slot, bankId, and replayFromSlot are decimal strings. The fourth constructor argument takes backoff (initialIntervalMs, multiplier, maxRetries), policy ("Replay" or "NoReplay"), and slotsBehind. The client rejects slotsBehind with "NoReplay", and rejects enabled and slotRetention.

For a startup snapshot, use an ordinary subscription and resume it yourself: track the last slot you processed, and resubscribe with from_slot as described in Replay from a slot.

Intra-slot updates

Subscribers can listen for "intra-slot" lifecycle events that show what's happening inside a slot, from the first shred received to a fully replayed bank.

These statuses are only delivered when your slots filter sets interslot_updates: true. Without it, a slots subscription receives only the processed, confirmed, and finalized statuses.

Status
What it means

SLOT_FIRST_SHRED_RECEIVED

The RPC node has received the first shred of this slot. Not yet replayed. Occurs in the retransmit stage.

SLOT_CREATED_BANK

A bank for this slot has been created on the node. Banks are isolated execution contexts in a fork graph. A slot can have several competing banks.

SLOT_COMPLETED

All shreds for this slot received. Not necessarily replayed yet.

SLOT_DEAD

The slot was rejected (invalid signature, bad PoH, wrong entry count). It's discarded by the network. Can happen at any point, even after SLOT_COMPLETED.

Event order per bank

Every block is produced by a bank, identified by a bank_id. A slot usually has one bank, but it can have several competing ones.

Order within one bank on a processed stream:

  1. Content, in any order: the SLOT_CREATED_BANK status (CreatedBank), entries (SubscribeUpdateEntry), transactions (SubscribeUpdateTransaction), and account updates (SubscribeUpdateAccount), including the sysvars Clock, SlotHashes, SlotHistory, and RecentBlockhashes. Clock and SlotHashes can arrive before SLOT_CREATED_BANK.

  2. Block footer (SubscribeUpdateBlockFooter): at most one per bank, on Alpenglow clusters only.

  3. BlockMeta (SubscribeUpdateBlockMeta): marks the end of the bank's block.

  4. Commitment updates (SubscribeUpdateSlot): SLOT_PROCESSED, then SLOT_CONFIRMED, then SLOT_FINALIZED. On Alpenglow clusters, SLOT_CONFIRMED and SLOT_FINALIZED arrive back to back.

On a processed subscription, nothing about a bank's content arrives after its BlockMeta, and no commitment update for that bank arrives before it. Besides the server's own ping updates, you receive only the update types your request subscribes to.

Clients and SDKs

We provide SDKs in Rust and TypeScript, plus example clients in Go and Python. Sample clients for each live in the yellowstone-grpc/examples directory; match your client to the current proto version.

The repo's yellowstone-grpc/examples/rust directory ships a client binary that exercises the subscribe and unary methods against any endpoint.

Subscribe to account updates:

Subscribe to slots (with commitment override):

Subscribe to non-vote, non-failed transactions touching an account:

Subscribe to deshred transactions:

Unary calls (ping, get-latest-blockhash, get-block-height, get-slot, is-blockhash-valid, get-version):

Triton endpoints serve subscribe-deshred. Self-hosted, it needs yellowstone-grpc-geyser 14.1.1 or later on a validator that emits deshred transaction notifications. Versions before 14.0.0 return UNIMPLEMENTED. Versions 14.0.0 and 14.1.0 do not resolve ALT addresses.

Since 5.0.1, the TypeScript SDK runs on a Rust NAPI backend. Triton's benchmark measured about 400% more data throughput than the grpc-js version. More on the NAPI rewrite.

Install:

The examples use top-level await. Set up the project as in the streaming quickstart (type=module, moduleResolution bundler).

Initialize:

Open a subscription stream:

Full example: yellowstone-grpc/examples/typescript.

grpcurl is good for testing. You need the corresponding Protobuf .proto files (starting with geyser.proto and its dependencies) so grpcurl can describe the protocol.

Self-hosters can drop the x-token header.

Requires Go 1.24. Clone the repo and run the sample client from examples/golang:

Updating proto files needs protoc plus the Go plugins:

Run make in examples/golang to regenerate. Full source: yellowstone-grpc/examples/golang.

The Go example may lag the latest stable proto version. For production-ready code, the Rust client is the reference implementation.

The repo's yellowstone-grpc/examples/python directory ships helloworld_geyser.py. It sends the x-token as call metadata over TLS, then calls a unary method:

Install grpcio, grpcio-tools, and protobuf, and generate geyser_pb2 from the proto files first.

If you're experiencing errors, you can sanity-check your endpoint with Triton's prebuilt client-linux-amd64 test binary (x86-64 Linux), no code required. See Verify your gRPC endpoint.

Pricing

On shared infrastructure, Dragon's Mouth is billed by the bandwidth you stream. See pricing.

What's next


Contact support by clicking the chat icon in your customer dashboard Sales questions? Contact us AI agent? Read llms.txt Follow updates: Blog · X · YouTube · Telegram · GitHub

Last updated