> ## Documentation Index
> Fetch the complete documentation index at: https://goldrush.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Solana RPC concepts

> Commitment levels, slots vs blocks, lamports, encodings, and versioned transactions: what EVM developers need to know to use Solana JSON-RPC.

If you're coming from an EVM chain, Solana's JSON-RPC looks familiar on the surface (same `{"jsonrpc":"2.0","method":...,"params":[...]}` envelope) but uses different primitives. This page covers the concepts that show up across almost every Solana method.

## Slots vs blocks

A **slot** is a \~400ms window in which a designated leader may produce a block. Not every slot produces a block (leaders can skip), so **block height ≤ slot height**. When EVM code reaches for `eth_blockNumber`, the Solana equivalent is usually [`getSlot`](/api-reference/json-rpc/solana/getslot); use [`getBlockHeight`](/api-reference/json-rpc/solana/getblockheight) only when you specifically need produced-block count.

## Commitment levels

Most read methods accept a `commitment` field that controls how finalized the data must be:

| Commitment  | Meaning                                                              | Use when                                                  |
| ----------- | -------------------------------------------------------------------- | --------------------------------------------------------- |
| `processed` | The node has processed the slot; may be skipped or rolled back.      | Lowest latency, optimistic UIs.                           |
| `confirmed` | A supermajority of the cluster has voted on the block.               | The sensible default for most apps.                       |
| `finalized` | The block has 31+ confirmed blocks on top; effectively irreversible. | Accounting, settlement, anything that must not roll back. |

```json theme={null}
{ "commitment": "confirmed" }
```

## Lamports

SOL balances are denominated in **lamports**: `1 SOL = 1,000,000,000 lamports` (10⁹). [`getBalance`](/api-reference/json-rpc/solana/getbalance) returns lamports; divide by `1e9` to display SOL. This is the analogue of wei on EVM chains, but with 9 decimals instead of 18.

## Accounts, programs, and PDAs

Everything on Solana is an **account**: wallets, token balances, and program (smart contract) state all live in accounts identified by a base-58 **pubkey**. Accounts are owned by a **program**; [`getProgramAccounts`](/api-reference/json-rpc/solana/getprogramaccounts) enumerates every account a program owns. SPL token balances live in dedicated token accounts; list a wallet's holdings with [`getTokenAccountsByOwner`](/api-reference/json-rpc/solana/gettokenaccountsbyowner).

## Encodings

Account and transaction data can be returned in several encodings, selected via the `encoding` config field:

| Encoding      | Returns                                                                                                       |
| ------------- | ------------------------------------------------------------------------------------------------------------- |
| `base58`      | Raw bytes, base-58 (small data only).                                                                         |
| `base64`      | Raw bytes, base-64.                                                                                           |
| `base64+zstd` | Raw bytes, zstd-compressed then base-64 (large accounts).                                                     |
| `jsonParsed`  | Program-decoded, human-readable JSON where a parser exists (e.g. SPL token accounts). Falls back to `base64`. |

Prefer `jsonParsed` for readability; use `base64`/`base64+zstd` when you'll decode the bytes yourself. The `dataSlice: { offset, length }` option limits how many bytes are returned for large accounts.

## Versioned transactions

Solana supports **versioned transactions** (with Address Lookup Tables). Methods that return transactions ([`getTransaction`](/api-reference/json-rpc/solana/gettransaction), [`getBlock`](/api-reference/json-rpc/solana/getblock), [`blockSubscribe`](/api-reference/json-rpc/solana/blocksubscribe)) require you to opt in by setting `maxSupportedTransactionVersion: 0`, otherwise a versioned transaction returns an error. Always set it unless you specifically want legacy-only transactions.

## Sending a transaction

The typical send flow:

1. [`getLatestBlockhash`](/api-reference/json-rpc/solana/getlatestblockhash): fetch a recent blockhash and its `lastValidBlockHeight`.
2. Build, sign, and (optionally) [`simulateTransaction`](/api-reference/json-rpc/solana/simulatetransaction) to preview the result.
3. [`sendTransaction`](/api-reference/json-rpc/solana/sendtransaction): broadcast; returns the signature immediately.
4. [`getSignatureStatuses`](/api-reference/json-rpc/solana/getsignaturestatuses) (poll) or [`signatureSubscribe`](/api-reference/json-rpc/solana/signaturesubscribe) (push): confirm.

Under congestion, add a priority fee informed by [`getRecentPrioritizationFees`](/api-reference/json-rpc/solana/getrecentprioritizationfees), and re-send with a fresh blockhash once `lastValidBlockHeight` is exceeded.

## WebSocket subscriptions

Real-time updates use a separate WebSocket endpoint:

```
wss://rpc.goldrushdata.com/v1/solana-mainnet
```

Subscriptions return a numeric id; cancel with the matching `*Unsubscribe` method (or, with `@solana/kit`, by aborting the subscription's `AbortController`). See [`accountSubscribe`](/api-reference/json-rpc/solana/accountsubscribe), [`logsSubscribe`](/api-reference/json-rpc/solana/logssubscribe), and [`programSubscribe`](/api-reference/json-rpc/solana/programsubscribe).

<CardGroup cols={2}>
  <Card title="Solana method reference" href="/api-reference/json-rpc/chains/solana" icon="book-open">
    Every Solana method, grouped by category.
  </Card>

  <Card title="Quickstart" href="/goldrush-json-rpc/quickstart" icon="rocket">
    Your first Solana call in under a minute.
  </Card>
</CardGroup>
