Corvus Labs

Limits & operations

Run Omen in production: connection and filter limits, heartbeats, lag policy, HTTP/2 flow control, Resume retention and every refusal.

Omen has no plan RPS/TPS threshold and doesn't meter bandwidth. What it does limit is listed here, with the status or ack you get when you cross the line.

Connections

LimitValueOver it
Concurrent connections per IP, per metro50gRPC RESOURCE_EXHAUSTED (8), reason connection_limit
New connections per IP50 per second, burst 70gRPC RESOURCE_EXHAUSTED (8), reason rate_limit
Subscribe streams per connection1gRPC FAILED_PRECONDITION (9) on the second
Time to open Subscribe after connecting5 secondsThe connection is closed
Request compressionIdentity onlygRPC UNIMPLEMENTED (12) for gzip or zstd

One stream per connection means one connection per stream. In @grpc/grpc-js, clients to the same host share a connection unless you set 'grpc.use_local_subchannel_pool': 1.

Filters and messages

LimitValueOver it
Subscriptions per connection64 (sub_id 0–63)ACK_REASON_INVALID_SUB_ID / ACK_REASON_MAX_SUBS_PER_CONN
Keys per subscription100,000ACK_REASON_MAX_KEYS_PER_SUB
Keys per connection200,000ACK_REASON_MAX_KEYS_PER_CONN
Client message sizeNormally up to 64 KiB (about 1,900 keys)See below
Cuckoo filter data2 MiBgRPC INVALID_ARGUMENT (3), stream closed
Cuckoo subscriptions per connection4ACK_REASON_CUCKOO_FILTER_LIMIT

A client message larger than 64 KiB (up to about 5.5 MB with a cuckoo filter) is admitted when the server has capacity for it. Otherwise the stream closes with gRPC RESOURCE_EXHAUSTED (8); that's transient, so retry with backoff. To stay under 64 KiB, split a big key list across several subscriptions, or send a cuckoo filter.

Capacity-limited requests

Unfiltered firehose subscriptions and Resume replays share server capacity with everyone else. When it's short you get one of:

RefusalFor
ACK_REASON_FILTER_TOO_BROADA transaction subscription with no account_include and no cuckoo filter
ACK_REASON_SERVER_RESOURCESAny subscription, when the server is short of resources
StreamError ERROR_CODE_RESOURCE_EXHAUSTEDA replay, or alongside a capacity ack refusal

Each carries (or follows) a retry_after_ms between 0.5 and 5 seconds. Wait at least that long before you retry. A filtered subscription is never refused as too broad.

Heartbeats

  • After 10 seconds with no other frame, the server sends a Heartbeat{slot} carrying the newest slot it has observed.
  • A Ping{id} from you is answered with Pong{id}; use it to measure round trip.
  • The server closes a stream whose server side has been silent for 45 seconds. Heartbeats prevent that while the server is healthy.

Set your own liveness deadline as a comfortable multiple of 10 s (for example 30 s): if nothing at all has arrived by then, drop the connection and reconnect with Resume.

Lag

A reader that falls too far behind is handled by the connection's OnLag policy (ConnectionConfig):

PolicyResult
ON_LAG_CLOSE (default)The stream closes with gRPC DATA_LOSS (15), message lagged. Reconnect with Resume from your last slot to pick up what you missed
ON_LAG_SKIP_TO_LIVEThe stream jumps to the live head and sends a GapNotice{from_seq, to_seq}
ON_LAG_CONFLATESlot statuses keep only the latest per slot; data subscriptions skip to live as above

SKIP_TO_LIVE and CONFLATE are opt-in. Lag usually means the client isn't reading fast enough: read on a dedicated task, hand messages off to a queue, and keep your HTTP/2 window large.

Flow control

@grpc/grpc-js starts every stream with a 64 KiB HTTP/2 window, which can starve a high-rate stream. When the server sees your window holding it back, it sends the advisory StreamError ERROR_CODE_FLOW_CONTROL_LIMITED; the stream continues, but you'll fall behind. Raise the window:

// Requires @grpc/grpc-js 1.13 or newer.
const client = new omen.aRPC(host, grpc.credentials.createInsecure(), {
  'grpc-node.flow_control_window': 8 * 1024 * 1024,
});
let channel = Channel::from_static("http://omen.fra.corvus-labs.io:30303")
    .initial_stream_window_size(8u32 << 20)
    .initial_connection_window_size(8u32 << 20)
    .connect()
    .await?;
// grpc-go sizes its window dynamically by default; set these only if you
// still see ERROR_CODE_FLOW_CONTROL_LIMITED.
conn, err := grpc.NewClient("omen.fra.corvus-labs.io:30303",
	grpc.WithTransportCredentials(insecure.NewCredentials()),
	grpc.WithInitialWindowSize(8<<20),
	grpc.WithInitialConnWindowSize(8<<20))

Resume retention

Resume{from_slot} replays from a short window: about two minutes at full-chain volume. Older than that, you get ERROR_CODE_OUT_OF_RANGE; reconnect without Resume and backfill the gap through Solana RPC. Resume as soon as you can after a disconnect, from the last slot you handled.

conn_seq

conn_seq rises by exactly 1 on every frame of a connection, control frames included. It never has a gap: if you observe one, it's a transport bug. Reconnect with Resume and tell us on Discord. It restarts with every connection.

seq is different: a global frame id with gaps on any filtered stream. Use it to de-duplicate, never to detect loss (seq vs conn_seq).

Refusals

Connection-level refusals arrive as a gRPC status on the stream. The grpc-message is JSON:

{
  "reason": "permission_denied",
  "detail": "identity is not scoped to the requested service. Please contact support at discord.gg/corvus-labs"
}

It may also carry retry_after_ms; wait at least that long before you reconnect. Match on the status and reason, not the whole string.

SituationgRPC statusreason / detailBefore reconnecting
Your IP isn't known in this metroUNAUTHENTICATED (16)detail no authenticated identity for connectionRegister the IP your traffic actually leaves from
Known account, but no Omen access for this IP in this metroPERMISSION_DENIED (7)reason permission_denied, detail identity is not scoped to the requested serviceBuy Omen for this metro and IP, or use a pass IP in a holder metro (access)
Over the per-IP connection capRESOURCE_EXHAUSTED (8)reason connection_limitClose connections you don't use
Over the new-connection rateRESOURCE_EXHAUSTED (8)reason rate_limitBack off
Your order ended while streamingConnection closes; the reconnect gets one of the above—Extend the order or turn on auto-renew
No healthy backendUNAVAILABLE (14)—Back off and retry
A second Subscribe on one connectionFAILED_PRECONDITION (9)—One connection per stream
gzip or zstd request compressionUNIMPLEMENTED (12)—Turn compression off
Reader too slow under ON_LAG_CLOSEDATA_LOSS (15)message laggedReconnect with Resume
Bad cuckoo dataINVALID_ARGUMENT (3)—Fix the filter
Oversized message with no capacity for itRESOURCE_EXHAUSTED (8)—Retry with backoff

Per-subscription refusals don't close the stream: they arrive as a SubscribeAck with accepted = false and an AckReason.

Pre-execution data

Observation, not execution

Omen shows you what it saw on the network before any of it executed. SLOT_STATUS_COMPLETE only means the slot's last entry was observed: not confirmed, not rooted, not finalized. Confirm by signature through Solana RPC before you do anything irreversible.

On this page