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

# Protocols

> All supported protocols for submitting transactions to the relay

## Protocols

The Raze Solana RPC relay accepts transactions over three protocols. Choose based on your latency and integration requirements.

| Protocol | Port   | Format                 | Response                          | Best for                           |
| -------- | ------ | ---------------------- | --------------------------------- | ---------------------------------- |
| **HTTP** | 80/443 | JSON-RPC               | Transaction signature / bundle ID | Easiest integration, full feedback |
| **QUIC** | 8009   | Solana TPU wire format | None (fire-and-forget)            | Low latency, Solana-native clients |
| **UDP**  | 8010   | Raw bincode bytes      | None (fire-and-forget)            | Lowest latency, high throughput    |

### Servers

| Endpoint                     | HTTP           | QUIC                | UDP                 |
| ---------------------------- | -------------- | ------------------- | ------------------- |
| Global (GeoDNS auto-nearest) | `rpc.raze.bot` | `rpc.raze.bot:8009` | `rpc.raze.bot:8010` |

***

## HTTP (JSON-RPC)

Standard HTTP POST with JSON-RPC 2.0. Returns transaction signature or bundle ID. See [sendTransaction](/api-reference/solana-rpc/send-transaction) and [sendBundle](/api-reference/solana-rpc/send-bundle) for full details.

**Public RPC endpoint:** `https://rpc.raze.bot/` — CORS-enabled, used by web3.js and browser clients. You can pass a Helius-style API key in the query string: `?apikey=`, `?api-key=`, or `?api_key=` (header wins if both are set).

Any other Solana JSON-RPC method (`getBalance`, `getAccountInfo`, `getLatestBlockhash`, etc.) is transparently proxied to a load-balanced upstream pool. The gateway also serves [Helius-compatible DAS methods](/api-reference/solana-rpc/helius-das) (`getAsset`, `getAssetsByOwner`, …) locally from Raze History.

```bash theme={null}
curl -X POST https://rpc.raze.bot/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sendTransaction",
    "params": ["<base64_signed_tx>", {"encoding": "base64"}]
  }'
```

***

## QUIC (Solana TPU)

Native Solana TPU protocol over QUIC. Compatible with `solana-tpu-client` and any client using ALPN `solana-tpu`. Fire-and-forget — no response is returned.

**Connection details:**

* TLS with self-signed certificate (verification skipped by Solana clients)
* ALPN protocol: `solana-tpu`
* Max transaction size: 1232 bytes
* Open a unidirectional stream, write the raw transaction bytes, close the stream

<Tabs>
  <Tab title="Rust (solana-tpu-client)">
    ```rust theme={null}
    use solana_tpu_client::tpu_client::TpuClient;
    use solana_client::rpc_client::RpcClient;
    use solana_sdk::transaction::Transaction;

    // The relay acts as a TPU endpoint
    let rpc = RpcClient::new("https://api.mainnet-beta.solana.com");
    let tpu_addr = "rpc.raze.bot:8009".parse().unwrap();

    // Send raw wire transaction
    let tx_bytes = bincode::serialize(&transaction)?;
    // Send via QUIC unidirectional stream to tpu_addr
    ```
  </Tab>

  <Tab title="Node.js">
    ```javascript theme={null}
    // QUIC requires a native QUIC library (e.g. @aspect-build/quic)
    // Most Node.js users should use the HTTP JSON-RPC endpoint instead.
    //
    // For QUIC, serialize the transaction to bincode format and send
    // as a unidirectional stream with ALPN "solana-tpu".

    import { serialize } from "@solana/web3.js";

    const txBytes = transaction.serialize();
    // Send txBytes via QUIC to rpc.raze.bot:8009
    ```
  </Tab>
</Tabs>

***

## UDP (Raw Bincode)

Lowest latency option. Send raw bincode-serialized Solana transactions as UDP datagrams. Fire-and-forget — no response, no connection overhead.

**Details:**

* Max transaction size: 1232 bytes per datagram
* No handshake, no connection state
* Processed on a dedicated OS thread with `recvmmsg()` batch processing (32 packets per syscall)

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    import socket
    from solders.transaction import Transaction

    tx_bytes = bytes(transaction)

    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    sock.sendto(tx_bytes, ("rpc.raze.bot", 8010))
    sock.close()
    ```
  </Tab>

  <Tab title="Rust">
    ```rust theme={null}
    use std::net::UdpSocket;

    let tx_bytes = bincode::serialize(&transaction)?;

    let socket = UdpSocket::bind("0.0.0.0:0")?;
    socket.send_to(&tx_bytes, "rpc.raze.bot:8010")?;
    ```
  </Tab>

  <Tab title="Node.js">
    ```javascript theme={null}
    import dgram from "node:dgram";

    const txBytes = transaction.serialize();

    const client = dgram.createSocket("udp4");
    client.send(txBytes, 8010, "rpc.raze.bot", (err) => {
      client.close();
    });
    ```
  </Tab>

  <Tab title="bash (netcat)">
    ```bash theme={null}
    # Send raw transaction bytes via UDP
    echo -n '<binary_tx_data>' | nc -u -w0 rpc.raze.bot 8010
    ```
  </Tab>
</Tabs>

***

## Tip-based routing

All protocols use the same tip-based routing. The relay extracts tip amounts from transaction instructions (zero-copy, no full deserialization) and forwards accordingly:

| Tip                | Channels                                                              |
| ------------------ | --------------------------------------------------------------------- |
| \< 0.0001 SOL      | **Rejected** (HTTP returns error `-32003`, QUIC/UDP silently dropped) |
| 0.0001 – 0.001 SOL | QUIC TPU                                                              |
| 0.001 – 0.01 SOL   | QUIC TPU + RPC                                                        |
| ≥ 0.01 SOL         | QUIC TPU + RPC + SWQoS + Jito                                         |
