#### Moving from Triton



The stock Yellowstone clients work on the carbon stream with a new endpoint and key. Your client library stays, and most Subscribe requests carry over as they are; the shapes refused here are listed below.

| what | what you have | what to paste |
|---|---|---|
| url clients | https://\<your-endpoint>.mainnet.rpcpool.com | https://services.carbium.sh:9443 |
| host:port clients | \<your-endpoint>.mainnet.rpcpool.com:443 | services.carbium.sh:9443, TLS |
| token | x-token: \<your-token> | x-token: \<YOUR_KEY>, or authorization: Bearer |

> One domain, no region to pick. Send the whole key: the short prefix the dashboard lists is a label and is refused as `unknown api key`. The stream reads `x-token` or `authorization: Bearer`; `x-api-key`, `?api-key=` and a key in the path work on RPC and WebSocket only.

##### your client

```
// node: @triton-one/yellowstone-grpc. the client stays; only the
// endpoint and the key change. before:
//   new Client("https://<your-endpoint>.mainnet.rpcpool.com",
//              "<your-token>", { ... })
import Client from "@triton-one/yellowstone-grpc";
const client = new Client("https://services.carbium.sh:9443", "<YOUR_KEY>", {
  grpcMaxDecodingMessageSize: 64 * 1024 * 1024,
});
await client.connect();

// rust: yellowstone-grpc-client. before:
//   build_from_shared("https://<your-endpoint>.mainnet.rpcpool.com")
//     .x_token(Some("<your-token>"))
let mut client = GeyserGrpcClient::build_from_shared("https://services.carbium.sh:9443")?
    .x_token(Some("<YOUR_KEY>"))?
    .tls_config(ClientTlsConfig::new().with_native_roots())?
    .max_decoding_message_size(64 * 1024 * 1024)
    .connect()
    .await?;
```

> Set the receive limit to 64 MiB or more, as above: block and transaction frames can be several MiB. On the grpc-js releases (5.0.0 and older) the channel option is `grpc.max_receive_message_length`.

##### rules to check in your code

| rule | what to do |
|---|---|
| 1 first request | It fixes the stream for its life: filters, `commitment`, `accountsDataSlice` and `fromSlot`. Send it at once: a stream with no request for 10 s ends with `DEADLINE_EXCEEDED` (a request with no filter, ping, `fromSlot` or `accountsDataSlice` counts as none). With `client.subscribe()` and then `stream.write(request)`, the write is the first request. |
| 2 later requests | A later request that changes a filter is ignored, with no error. For new filters open a new Subscribe, then close the old one. Only a ping is applied. |
| 3 size | Keep each request under 4 MiB. |
| 4 compression | Frames arrive uncompressed. Compressed requests (gzip, zstd) are accepted on Subscribe only, so send the unary calls uncompressed. |
| 5 ping | Ping every 10 s (`ping: { id }`) and a `pong` answers. Ping no more often: a ping that finds the control queue full (8 messages) ends the stream with `RESOURCE_EXHAUSTED`. The server's own `ping` frame comes every 15 s; ignore it. |
| 6 slow reader | A reader that stops taking frames is cut once the stream's send buffer is full and no frame is taken for 10 s. A reader that takes frames more slowly than they arrive is cut once it falls behind the feed's ring. Either way the stream ends with `RESOURCE_EXHAUSTED` `consumer_lagged`. Hand frames to a queue and keep the `data` handler non-blocking. |

##### where moved clients trip

> No startup snapshot, and `x-request-snapshot` does nothing here: seed state with RPC `getMultipleAccounts`, then apply updates, keeping the highest `(slot, writeVersion)` per pubkey.

> An `account` list delivers only writes the feed carries, so a plain SOL wallet stays silent. Follow a wallet with `transactions` and `accountInclude: [wallet]`, reading `meta.preBalances` and `meta.postBalances`.

> An `owner` filter with no `account` list is refused when it names an owner outside the covered ones; Stake and Vote are outside. A `blocks` frame carries only the transactions of 9 liquidity programs: for full blocks use RPC `getBlock` with `maxSupportedTransactionVersion: 1`.

> Refused before any charge: a bare transaction filter (`{}`), `tokenAccounts`, cuckoo filters (the client's `CompressedAccountFilterSet` emits one: send explicit `account` lists), a non-empty `blockFooter` and `entry[*].includeUpdateParent`. `SubscribeDeshred` and server reflection answer `UNIMPLEMENTED`.

> Credit costs, heavy shapes, limits and the covered owners: [carbon stream](https://carbium.sh/docs/stream.md), [rate limits](https://carbium.sh/docs/limits.md) and the [SKILL.md](https://carbium.sh/docs/agents.md).

##### plan and key

> Subscribe needs DEV, BUSINESS or PRO; FREE is refused. The key needs the GRPC scope: on [KEYS](https://carbium.sh/), press SCOPE on the key, select GRPC and Save. The starter key, and a key made on KEYS while on FREE, lack it and do not gain it on an upgrade. A key's IP allowlist applies to the stream too.

##### reconnect and replay

> `fromSlot` works only in the first request (else `INVALID_ARGUMENT` `from_slot is only supported on the initial subscribe request`) and only at processed commitment (else `PERMISSION_DENIED` `from_slot replay is available only at processed commitment`).

> The replay floor moves with traffic: use `fromSlot >= firstAvailable` from `SubscribeReplayInfo`. Below it the stream ends with `OUT_OF_RANGE` `gap: re-seed required`: re-seed over RPC and subscribe without `fromSlot`. A resume overlaps what you already have: dedupe transactions on `(slot, signature)` and accounts on `(pubkey, slot, writeVersion)`.

> The client's reconnect is off unless you turn it on (the fourth constructor argument in 5.x, `subscribeWithReconnect()` from 8.0.0, `subscribe_with_reconnect` from crate 14.0.0). It resubscribes with `fromSlot`, so these rules apply; we checked 5.0.9 only. The node admits 128 resumes in any 10 s: one past that is refused `too many streams are resuming from a past slot; retry shortly`. Retry with backoff, or re-seed over RPC and subscribe without `fromSlot`.

##### check the switch

```
# Carbon Stream  gRPC. No server reflection: pass geyser.proto and
# solana-storage.proto from rpcpool/yellowstone-grpc (yellowstone-grpc-proto/proto) in ./proto
grpcurl -import-path ./proto -proto geyser.proto -H 'x-token: <YOUR_KEY>' \
  -d '{"slots":{"s":{}},"accounts":{},"transactions":{}}' \
  services.carbium.sh:9443 \
  geyser.Geyser/Subscribe
# -> stream: slot updates, and a ping every 15 s
# authorization: Bearer <YOUR_KEY> also accepted
```

> Slot updates arrive, with the server's `ping` every 15 s. The response metadata carries `x-subscription-id` (32 hex characters): log it, and quote it when you report a problem.

##### if your consumer is refused

| status | message | fix |
|---|---|---|
| UNAUTHENTICATED | unknown api key | send the full key as x-token or authorization: Bearer |
| UNAUTHENTICATED | api key is not enabled for grpc | turn on GRPC for the key |
| PERMISSION_DENIED | streaming is not included in this tier; upgrade the plan | move to DEV, BUSINESS or PRO |
| PERMISSION_DENIED | heavy streams are not included in this plan; upgrade to BUSINESS | use a narrow shape (an account list, a narrowed transaction filter, blocksMeta in place of blocks), or upgrade |
| PERMISSION_DENIED | filter not in v1 coverage; request provisioning | an owner filter on an uncovered owner with no account list, a bare transaction filter, or a request with a ping, fromSlot or accountsDataSlice but no filter: fix the filter |
| RESOURCE_EXHAUSTED | max subscription limit exceeded | close idle streams, merge filters into fewer Subscribes, or upgrade |
