Skip to Content
Bolt Low LatencyHTTPAdditional Optimizations

Bolt Performance Optimizations

Performance tips to get the most out of Raiden

Connection Keep-Alive

Avoid reconnecting by periodically pinging the server:

GET https://fra.bolt.raiden.wtf/ping

Send a /ping request every 60 seconds to keep your connection active.

import time import requests session = requests.Session() while True: session.get("https://fra.bolt.raiden.wtf/ping") time.sleep(60)

This prevents idle disconnects. Avoid pinging more often than needed — every 60s is enough.

HTTP Keep-Alive

Reuse connections to avoid TLS handshake overhead on every request:

import requests session = requests.Session() session.headers.update({ "Content-Type": "application/json", "api-x-token": "YOUR_API_KEY", }) # Reuse session for all requests for tx in transactions: response = session.post("http://fra.bolt.raiden.wtf/api/v1/sendTransaction", json={ "jsonrpc": "2.0", "id": 1, "method": "sendTransaction", "params": [tx], })

Use sendRawTransaction

The binary endpoint skips JSON-RPC parsing and base64 decoding — your bytes go straight into the routing pipeline. See Send Binary Transaction.

QUIC 0-RTT Session Resumption

After your first QUIC connection, subsequent connections skip the full handshake. Enable a TLS session cache:

tlsConf := &tls.Config{ // ... certificate config ... ClientSessionCache: tls.NewLRUClientSessionCache(10), }

This enables sending data on the very first packet of a reconnection.

Multi-Region Redundancy

Send the same transaction to 2+ regions for higher landing probability. All regions route to the same validator network independently.

Higher Tips = Higher Priority

Your tip amount directly affects routing priority. Higher tips get processed before lower tips during congestion.

Error Handling with Backoff

import time def send_transaction(tx_data, max_retries=3): for attempt in range(max_retries): response = session.post(ENDPOINT, json={ "jsonrpc": "2.0", "id": 1, "method": "sendTransaction", "params": [tx_data], }) result = response.json() if "error" in result: code = result["error"]["code"] if code == -32005: # Rate limited time.sleep(0.1 * (attempt + 1)) continue elif code == -32603: # Internal error time.sleep(0.5) continue else: raise Exception(f"API error: {result['error']['message']}") return result["result"] raise Exception("Max retries exceeded")
Last updated on