# ERPC > ERPC is a global edge blockchain infrastructure by ELSOUL LABO B.V., providing low-latency RPC for Ethereum and Solana, plus Solana's Geyser gRPC, Direct Shreds/ShredStream, and SWQoS-enabled transaction paths, along with VPS and dedicated bare metal infrastructure. Built for Solana performance. Expanding the edge across blockchains. --- title: "Point your app at ERPC" description: "Reach Solana and 15 other chains at edge.erpc.global. Stream with Solana Geyser gRPC and Solana Shreds, and send Solana transactions with SWQoS." canonical: "https://erpc.global/en/doc/" locale: "en" --- # Point your app at ERPC Reach Solana and 15 other chains at edge.erpc.global. Stream with Solana Geyser gRPC and Solana Shreds, and send Solana transactions with SWQoS. - [Get an RPC key](https://dashboard.erpc.global/en) - [Call a chain with Edge RPC](https://erpc.global/en/doc/rpc/edge/) - [Add the MCP server to Claude](https://erpc.global/en/doc/rpc/solana-mcp-server/) **Send a request** ```bash curl https://edge.erpc.global?api-key= \ --header 'Content-Type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"getBlockHeight"}' ``` **Switch chains** ```bash curl https://edge.erpc.global/polygon?api-key= \ --header 'Content-Type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber"}' ``` **Connect Claude** ```text https://mcp-solana-rpc-api.erpc.global/mcp ``` ## Use ERPC with your agent Connect Claude to read-only Solana RPC methods through the MCP server, or give your agent llms.txt, a compact map of ERPC. - [Solana MCP server](https://erpc.global/en/doc/rpc/solana-mcp-server/): Call read-only Solana RPC methods from Claude with natural-language prompts. - [llms.txt](https://erpc.global/llms.txt): A compact map of ERPC for AI assistants. ## RPC APIs - [Edge RPC](https://erpc.global/en/doc/rpc/edge/): Send requests to edge.erpc.global; the path after the host selects the chain. - [Unlimited](https://erpc.global/en/doc/rpc/unlimited-endpoint-supported-methods/): Call Solana, Ethereum and Avalanche C-Chain through a dedicated endpoint, where more calls do not cost more. - [x402](https://erpc.global/en/doc/x402/overview/): Pay for each RPC request on 18 chains in USDC or EURC, with no RPC key. ### Solana - [SWQoS](https://erpc.global/en/doc/rpc/swqos-endpoint/): Send transactions through dedicated lanes with a stake connection. - [Leader Slot API](https://erpc.global/en/doc/rpc/leader-slot-api/): getLeaderSlots returns the leader schedule with stake weight and estimated location. - [Validators Information API](https://erpc.global/en/doc/rpc/validators-information-api/): getValidatorsInformation returns one row per validator leading a slot in the current epoch. ## Data streams - [Solana Geyser gRPC](https://erpc.global/en/doc/geyser-grpc/quickstart/): Stream Solana slots, accounts and transactions over gRPC. - [Solana Shreds](https://erpc.global/en/doc/shredstream/quickstart/): Receive pre-block Solana shred data in your own client. ## Servers - [VPS](https://erpc.global/en/faq/vps/general/): Virtual servers for proxies and stream subscriptions, integrated with the Solana Shreds network. - [Bare Metal](https://erpc.global/en/faq/metal/general/): A physically dedicated server, recommended over a VPS for performance-oriented use. - [Global Storage](https://erpc.global/en/doc/storage/quickstart/): Globally distributed object storage for Solana node operators, from the command line. - [Backup](https://erpc.global/en/doc/backup/quickstart/): Incremental backups of your Solana node, encrypted client-side before upload. - [Migrate](https://erpc.global/en/doc/migrate/quickstart/): Move an entire Linux server, including its SLV node setup, to a new machine over SSH. ## AI & agents - [ERPC AI](https://erpc.global/en/doc/erpc-ai/quickstart/): Ask in your terminal: it answers from your account and acts on approval. - [ERPC CLI](https://erpc.global/en/doc/erpc-cli/overview/): Pre-release: run RPC nodes on 18 chains, validators on 13 and your apps. ## Learn - [FAQ](https://erpc.global/en/faq/): Questions and answers by topic, including how to start, latency, Solana RPC and Solana Geyser gRPC. - [News](https://erpc.global/en/news/): Updates from ERPC on Solana RPC, Solana Geyser gRPC, Solana Shreds, VPS and Bare Metal. - [API reference](https://erpc.global/en/api-doc/): Methods for Solana, Ethereum and Avalanche, each with a live try-it-out. --- title: "Call Solana and other chains with Edge RPC" description: "Edge RPC takes requests for 16 chains at edge.erpc.global, and the path after the host selects the chain." canonical: "https://erpc.global/en/doc/rpc/edge/" locale: "en" --- # Call Solana and other chains with Edge RPC Edge RPC takes requests for 16 chains at edge.erpc.global. The path after the host selects the chain: Solana at the root, Ethereum at /eth, Polygon at /polygon. [Get an RPC key](https://dashboard.erpc.global/en "button") [Choose a chain](https://erpc.global/en/doc/rpc/edge/#supported-chains "button") ```bash curl https://edge.erpc.global/eth?api-key= \ --header 'Content-Type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber"}' ``` ## What you can do with Edge RPC - Use the root of edge.erpc.global for Solana and a path for each other chain, such as /base, /sui or /tron. - Send JSON-RPC as an HTTP POST on every chain except Sui. Sui takes gRPC-web unary calls, one call per request, and TRON also takes its HTTP API under /tron/wallet and /tron/walletsolidity. - Open a WebSocket connection on Solana, Ethereum, Avalanche or Base. The other chains take HTTP requests. - Point a client at a chain's own host. Every chain except Solana also takes requests at its own host, such as eth.erpc.global for Ethereum and polygon.erpc.global for Polygon. ## Make a request You need an ERPC account and an RPC key. Copy the key from the RPC keys tab of the ERPC Web Dashboard. On the Free plan, requests start after you pay the one-time €5 verification fee in the dashboard. Send a JSON-RPC request to the chain's path, with your RPC key as the `api-key` query parameter. This asks Ethereum for its latest block number: ```bash curl https://edge.erpc.global/eth?api-key= \ --header 'Content-Type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber"}' ``` The result is the block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` To call another chain, use its path. This sends the same request to Polygon: ```bash entry=other-chain curl https://edge.erpc.global/polygon?api-key= \ --header 'Content-Type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber"}' ``` Solana is at the root of the host, so its request has no path. This asks for the current block height: ```bash entry=first-request curl https://edge.erpc.global?api-key= \ --header 'Content-Type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"getBlockHeight"}' ``` Each chain's quickstart, linked in the table below, walks through the request that suits that chain. ## How Edge RPC handles a request edge.erpc.global reads the path and passes the request to that chain's service. The service checks your RPC key and your plan, sends the request to the chain, and returns the chain's response. ### Authentication Use the same RPC key on every chain; the path selects the chain. - Pass the key as the `api-key` query parameter. Every chain reads it, and WebSocket connections take the key this way. - On HTTP requests, you can send `Authorization: Bearer ` instead. For Base, use the query parameter. ```bash curl https://edge.erpc.global/eth \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber"}' ``` ## Supported chains | Chain | Path on edge.erpc.global | Protocol | WebSocket | Bearer header | Quickstart | | --- | --- | --- | --- | --- | --- | | Solana | `/` | JSON-RPC | Yes | Yes | [Solana](https://erpc.global/en/doc/rpc/general/) | | Ethereum | `/eth` | JSON-RPC | Yes | Yes | [Ethereum](https://erpc.global/en/doc/ethereum-rpc/quickstart/) | | Avalanche | `/ava` | JSON-RPC | Yes | Yes | [Avalanche](https://erpc.global/en/doc/avalanche-rpc/quickstart/) | | Arbitrum | `/arbitrum` | JSON-RPC | No | Yes | [Arbitrum](https://erpc.global/en/doc/arbitrum-rpc/quickstart/) | | Base | `/base` | JSON-RPC | Yes | No | [Base](https://erpc.global/en/doc/base-rpc/quickstart/) | | Bitcoin | `/bitcoin` | JSON-RPC | No | Yes | [Bitcoin](https://erpc.global/en/doc/bitcoin-rpc/quickstart/) | | Hyperliquid | `/hyperliquid` | JSON-RPC | No | Yes | [Hyperliquid](https://erpc.global/en/doc/hyperliquid-rpc/quickstart/) | | Kaia | `/kaia` | JSON-RPC | No | Yes | [Kaia](https://erpc.global/en/doc/kaia-rpc/quickstart/) | | Monad | `/monad` | JSON-RPC | No | Yes | [Monad](https://erpc.global/en/doc/monad-rpc/quickstart/) | | NEAR | `/near` | JSON-RPC | No | Yes | [NEAR](https://erpc.global/en/doc/near-rpc/quickstart/) | | Optimism | `/optimism` | JSON-RPC | No | Yes | [Optimism](https://erpc.global/en/doc/optimism-rpc/quickstart/) | | Polygon | `/polygon` | JSON-RPC | No | Yes | [Polygon](https://erpc.global/en/doc/polygon-rpc/quickstart/) | | Robinhood Chain | `/robinhood` | JSON-RPC | No | Yes | [Robinhood Chain](https://erpc.global/en/doc/robinhood-rpc/quickstart/) | | Soneium | `/soneium` | JSON-RPC | No | Yes | [Soneium](https://erpc.global/en/doc/soneium-rpc/quickstart/) | | Sui | `/sui` | gRPC-web | No | Yes | [Sui](https://erpc.global/en/doc/sui-rpc/quickstart/) | | TRON | `/tron` | JSON-RPC and HTTP API | No | Yes | [TRON](https://erpc.global/en/doc/tron-rpc/quickstart/) | Each chain other than Solana has an endpoint page that covers its endpoints, supported methods, batch requests and response status codes. ## Pricing Usage is metered in tokens, and each call in a batch is metered on its own. See [RPC](https://erpc.global/en/rpc/) and [Pricing](https://erpc.global/en/price/) for plans. ## Explore Edge RPC - [API reference](https://erpc.global/en/api-doc/): Solana RPC methods, each with a live try-it-out. - [Unlimited](https://erpc.global/en/doc/rpc/unlimited-endpoint-supported-methods/): Call Solana, Ethereum and Avalanche C-Chain through a dedicated endpoint, where more calls do not cost more. - [SWQoS](https://erpc.global/en/doc/rpc/swqos-endpoint/): Send Solana transactions with stake-weighted quality of service. - [Solana RPC FAQ](https://erpc.global/en/faq/rpc/general/): Answers on token use, 401 and 429 errors, WebSocket and regions. --- title: "Solana RPC Endpoint Documentation" description: "Use ERPC as a low-latency Solana RPC endpoint for HTTP JSON-RPC requests and WebSocket subscriptions." canonical: "https://erpc.global/en/doc/rpc/general/" locale: "en" --- # Solana RPC Endpoint Documentation ## Solana RPC Endpoint Documentation Use ERPC as your Solana RPC endpoint for HTTP JSON-RPC requests and WebSocket subscriptions. The same Solana endpoint URL works for standard RPC methods, and the API key can be managed from the ERPC Web Dashboard. Please add your API key to the 'api-key' parameter. ```text https://edge.erpc.global?api-key= ``` ### Examples: Here is an HTTP request example. ```bash curl https://edge.erpc.global?api-key= --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"getBlockHeight" }' ``` Here is a WebSocket subscription example. The host is the same as HTTP. ```text wss://edge.erpc.global?api-key= ``` ```bash # Example: subscribe to slot updates wscat -c "wss://edge.erpc.global?api-key=" # After connected, send: {"jsonrpc":"2.0","id":1,"method":"slotSubscribe"} ``` You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) If you need lower latency than WebSocket, consider Geyser gRPC or ShredStream. You can discuss details with us through the ERPC Web Dashboard. ### History Access Add `history=true` to the `edge.erpc.global` URL of an HTTP request to look up older blocks and transactions; the value must be exactly `true`, in lowercase. Except for `getTransactionsForAddress`, a request without `history=true` is answered from the recent range each node holds; the option applies to these methods: - `getBlock` - `getBlockTime` - `getBlocks` - `getBlocksWithLimit` - `getTransaction`, including `getParsedTransaction` - `getSignaturesForAddress` - `getSignatureStatuses`, when `searchTransactionHistory` is `true` - `getTransactionsForAddress`, when `transactionDetails` is `"full"` (history access required) Put the API key and the option in the URL as query parameters: ```text https://edge.erpc.global?api-key=&history=true ``` Or send `Authorization: Bearer ` as a header, with the option in the URL: ```text https://edge.erpc.global?history=true ``` Here is an HTTP request example that uses history access. ```bash curl 'https://edge.erpc.global?history=true' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "jsonrpc":"2.0","id":1, "method":"getBlock", "params":[,{"maxSupportedTransactionVersion":1}] }' ``` For every method except `getTransactionsForAddress` in `"full"` mode: - Each call answered by history access costs 640 + 82 × N tokens in total, in place of its regular price. - For `getSignatureStatuses`, N is the number of signatures in `params[0]`: 10 signatures cost 640 + 82 × 10 = 1,460. For every other method, N is 1, so a call answered by history access costs 640 + 82 = 722 tokens. A `getBlock` call, for example, costs 722 when history access answers it and 420 when recent data answers it. - A `null`, empty or partial result from history access is charged at the history access price too. A failed lookup costs only its regular price. - A call answered from recent data keeps its regular price, even with `history=true`. - A batch counts each call on its own. - Leave `history=true` off polling for recent transactions: each `null` there is charged at the history access price. Free allowances, including the Free plan's, have a limit for history access. The Free plan is limited to one history access request per 10 seconds. A `getTransactionsForAddress` call with `transactionDetails` set to `"full"` is history access, whether the transactions are recent or old: - The call requires `history=true` in the `edge.erpc.global` URL. A request without it is refused with the history access error (code `-32011`) and carries no charge. - With `history=true`, the call costs 640 + 82 × N tokens, where N is the number of transactions fetched, recent or old: 100 transactions cost 640 + 82 × 100 = 8,840. A row without a transaction is not counted. - The call must be sent as a separate request. A batch that contains it is refused, with or without `history=true`: each call in the batch is answered with error `-32600` and the message `This request is not available in a mixed JSON-RPC batch. Please send it as a separate request.`, and none of them is sent. The default `signatures` mode needs no `history=true` and costs its regular 420 tokens. To poll an address for new transactions, use `signatures` mode and fetch the ones you need with `getTransaction`. A lookup for older blocks or transactions may take much longer than a regular request, in some cases seconds. History access is a separate option that keeps these lookups apart from regular requests, so that regular requests stay fast. Without `history=true`, a `getBlock` or `getBlockTime` request for an older slot may return this error: ```json { "jsonrpc": "2.0", "error": { "code": -32011, "message": "This request needs history access. Add history=true to the endpoint URL.", "data": { "erpcCode": "ERPC_HISTORY_OPTION_REQUIRED" } }, "id": 1 } ``` `getTransaction`, `getParsedTransaction` and `getSignatureStatuses` (with `searchTransactionHistory: true`) return `null` for a signature older than the node holds, while `getSignaturesForAddress`, `getBlocks` and `getBlocksWithLimit` return an empty or partial result. A request with `history=true` may return these messages: - `This plan has reached its limit for history access. Add a paid plan to use tokens for history access.` — shown when an allowance, such as the Free plan's, reaches its limit. - `History access is unavailable while your token balance is low. Add tokens.` — shown on a paid plan when the token balance is low. - `On the Free plan, history access is limited to one request per 10 seconds. Slow down or use a paid plan.` — shown on the Free plan when history access requests arrive too quickly. ### Unlimited Endpoint Supported Methods Unlimited Endpoints are dedicated HTTP endpoints optimized for low-latency standard Solana RPC calls. These are the supported standard Solana RPC methods: - `getSlot` - `getBlockHeight` - `getLatestBlockhash` - `getBalance` - `getAccountInfo` - `getMultipleAccounts` - `getTransaction` - `sendTransaction` - `simulateTransaction` - `getSignatureStatuses` - `getRecentPrioritizationFees` - `getHealth` - `getVersion` - `getEpochInfo` - `getBlock` For methods outside this supported set, use `https://edge.erpc.global?api-key=`. ### Solana RPC Methods and Documentation For the full list of methods, parameters, and subscription specifications, please refer to the official documentation. It covers both HTTP and WebSocket usage. [https://solana.com/docs/rpc](https://solana.com/docs/rpc) --- title: "Solana SWQoS Endpoint Documentation" description: "Overview and usage of the Solana SWQoS (Stake weighted Quality of Service) Endpoint" canonical: "https://erpc.global/en/doc/rpc/swqos-endpoint/" locale: "en" --- # Solana SWQoS Endpoint Documentation ## What is the SWQoS Endpoint? The **SWQoS Endpoint** provided by ERPC is a high-performance RPC service that allows users with stake connections to send transactions through dedicated lanes. It is available for both shared and dedicated plans, enabling faster and more reliable transaction delivery. The endpoint can be obtained by registering your elSOL holdings on the ERPC Web Dashboard. - ERPC Web Dashboard: https://dashboard.erpc.global/en ## What is SWQoS? **SWQoS (Stake weighted Quality of Service)** is a communication control mechanism that prioritizes validators with stake connections. Leaders allocate approximately **80% of total bandwidth to the priority lane** and **20% to the non-priority lane**. Traffic with stake connections can utilize the priority lane while also being sent through the non-priority lane at the same time. As a result, compared to traffic that relies solely on the non-priority lane, **the effective delivery capacity is significantly larger**. This control is applied **before Priority fee handling**, at the stage where traffic is accepted and routed toward the leader, meaning that whether a transaction reaches the priority lane directly affects downstream processing speed. ## Relationship with Priority Fee Priority fee plays an important role, but it is applied **after a transaction has reached the leader via SWQoS routing**. If a transaction cannot enter the SWQoS priority lane, the effectiveness of Priority fees becomes limited, and improving basic reachability is difficult. For optimal operation, it is most effective to **combine SWQoS-based reachability with appropriate Priority fee settings**. ## Shift in Cost Structure In conventional transaction submission services, users were required to attach **Tips** when sending transactions. With ERPC’s SWQoS Endpoint, Tips are not required. Instead, access to priority bandwidth is granted through **holding elSOL**. **elSOL** is a **Liquid Staking Token (LST)** on Solana, issued by staking SOL. Its exchange rate against SOL reflects accumulated staking rewards and is not fixed at a 1:1 ratio. elSOL can be converted back to SOL through the unstaking process, with settlement reflecting accumulated staking rewards. The SOL staked via elSOL is delegated to validators connected to ERPC. As elSOL holdings increase, the total SWQoS bandwidth available across ERPC expands. By holding elSOL, users contribute directly to strengthening the network and, in return, gain access to dedicated transmission lanes. - elSOL Official Site: https://elsol.app/en ## Bandwidth Allocation (TPS Structure) For shared SWQoS Endpoints, eligible users receive **1 TPS for every 4.2 elSOL held**, rounded down. For example, holding 10 elSOL in the connected wallet grants **2 TPS**. The actual available TPS is determined by the lower of the ERPC plan maximum and the elSOL-based allocation. Eligible ERPC shared plans, including Developer Plan+ and Bundle Plans, can use the shared SWQoS allocation after the dashboard verifies the wallet holding elSOL. For dedicated RPC nodes, SWQoS is available as a **+€100/month** option that assigns a **1,000 SOL staking allocation** to the dedicated node. Setup and verification are handled in the ERPC Dashboard: https://dashboard.erpc.global ## Connection Keep Warming (Keep Alive) With ERPC’s Solana SWQoS endpoint, sending a GET request to `/ping` allows you to **maintain the HTTPS connection between the client and the ERPC SWQoS endpoint**. When submitting a transaction, the first request incurs a small amount of time for HTTPS and TLS session establishment. By sending `/ping` in advance and keeping this connection active, you can **avoid initial connection latency and enter the transaction submission process immediately** when sending the actual transaction. Even if transactions are not sent continuously, this approach is effective for setups where transactions must be sent quickly at specific moments, helping to stabilize initial submission behavior. ## Ping Endpoint Keep Warming is performed by sending a GET request to `/ping` on the SWQoS endpoint. This request does not process any transactions and is used solely to maintain the connection state between the client and ERPC. ### Endpoint Format (HTTPS) ```text https:///ping ``` Replace `` with the SWQoS-specific domain provided by ERPC. ## Usage Example ### Periodic Keep Alive Example (JavaScript) ```ts async function keepWarm(endpoint: string) { try { await fetch(`${endpoint}/ping`, { method: 'GET' }) } catch { // Ignore failures } } setInterval(() => { keepWarm('https://') }, 30000) ``` By sending `/ping` at regular intervals, you can maintain a state where **transaction submission can begin immediately when required**. ## Notes ・`/ping` does not consume TPS or affect elSOL-based bandwidth calculations ・It is not a substitute for transaction submission ・It is a supplemental request used solely to maintain the client-to-ERPC connection The design of SWQoS (stake-based routing) and Priority fees remains unchanged. Use Keep Warming as a mechanism to **reduce latency at the moment transaction submission begins**. --- title: "Durable Nonce Fan-out for SWQoS" description: "Durable Nonce account setup and SWQoS fan-out sending with web3.js" canonical: "https://erpc.global/en/doc/rpc/durable-nonce-send-transaction/" locale: "en" --- # Durable Nonce Fan-out for SWQoS ## Background and usage scenario In Solana transaction sending, slot progression, leader placement, and network-path congestion constantly change which route reaches the leader fastest. This is not specific to any RPC provider or sending service; it is a structural characteristic of Solana's execution model. ERPC's SWQoS endpoint provides a sending path that injects transactions into the priority lane allocated by leaders based on Stake-weighted Quality of Service (SWQoS). This priority bandwidth is about 5× that of the non-priority lane and is applied before priority fee evaluation. For that reason, the SWQoS endpoint is an important option for transaction sending, but in production a single endpoint is not always the fastest. Even within the same slot, transient path differences or load skew can allow another fast endpoint to lead. Given these characteristics, an operational pattern of sending the same transaction to multiple fast paths in parallel and accepting the first one processed can be effective, rather than relying on a single route. However, when the same transaction is sent to multiple endpoints, you cannot guarantee that it will execute only once without additional control. Fan-out without this control can lead to unintended double execution or broken retry control. Solana provides Durable Nonce as the mechanism for this. Using Durable Nonce lets you send the same signed transaction across multiple routes while limiting on-chain execution to a single time. This page explains how to implement fan-out operations that combine ERPC's SWQoS endpoint with other fast RPC endpoints, assuming transaction sending with Durable Nonce. --- ## Scope and prerequisites This guide covers creating a Durable Nonce account with web3.js and using it for transaction sending and fan-out operations. Prerequisites to understand: - For Durable Nonce transactions, use the nonce value as `recentBlockhash` and place `nonceAdvance` as the first instruction - Once `nonceAdvance` executes, the nonce can be consumed even if later instructions fail. You cannot resend the same rawTx as-is. - Nonce account creation is a one-time setup and is typically reused --- ## Step 1: Prepare the nonce authority and connection The nonce authority is a Keypair that can advance the nonce. ```ts import { Connection, Keypair, SystemProgram, NONCE_ACCOUNT_LENGTH, } from '@solana/web3.js' const connection = new Connection('https://', 'confirmed') const nonceAuthority = Keypair.fromSecretKey(/* secret key */) ``` - The nonce authority can execute `nonceAdvance` - It can be the fee payer, or a separate keypair --- ## Step 2: Generate a nonce account Keypair A nonce account is a **System Account**. ```ts const nonceAccount = Keypair.generate() ``` This Keypair is used for: - Holding the nonce value (replacement for `recentBlockhash`) - Signing only at creation time - Safe storage afterward; it is not needed for daily sends --- ## Step 3: Calculate the rent-exempt minimum Nonce accounts must be rent-exempt. Do not hardcode values; fetch them from the RPC. ```ts const lamports = await connection.getMinimumBalanceForRentExemption(NONCE_ACCOUNT_LENGTH) ``` --- ## Step 4: Create and initialize the nonce account Create the nonce account with **createAccount + nonceInitialize** in a single transaction. ```ts import { Transaction } from '@solana/web3.js' const tx = new Transaction() tx.add( SystemProgram.createAccount({ fromPubkey: nonceAuthority.publicKey, newAccountPubkey: nonceAccount.publicKey, lamports, space: NONCE_ACCOUNT_LENGTH, programId: SystemProgram.programId, }), SystemProgram.nonceInitialize({ noncePubkey: nonceAccount.publicKey, authorizedPubkey: nonceAuthority.publicKey, }), ) // fee payer is the nonce authority tx.feePayer = nonceAuthority.publicKey // use a normal blockhash for initialization const { blockhash, lastValidBlockHeight } = await connection.getLatestBlockhash('confirmed') tx.recentBlockhash = blockhash // sign with both the new account and the authority tx.sign(nonceAccount, nonceAuthority) const signature = await connection.sendRawTransaction(tx.serialize()) await connection.confirmTransaction( { signature, blockhash, lastValidBlockHeight }, 'confirmed', ) ``` Use this `nonceAccount.publicKey` for subsequent sends. --- ## Step 5: Fetch the nonce before each send For every transaction, fetch the current nonce value. ```ts import { NonceAccount } from '@solana/web3.js' const { value, context } = await connection.getAccountInfoAndContext( nonceAccount.publicKey, 'confirmed', ) if (!value) { throw new Error('Nonce account not found') } const nonce = NonceAccount.fromAccountData(value.data).nonce const minContextSlot = context.slot ``` - Use `nonce` as `recentBlockhash` - `context.slot` is used in confirmation --- ## Step 6: Build the Durable Nonce transaction Durable Nonce transactions must satisfy the following conditions: - `recentBlockhash = nonce` - The first instruction is `nonceAdvance` ```ts import { TransactionMessage, VersionedTransaction } from '@solana/web3.js' const instructions = [ SystemProgram.nonceAdvance({ noncePubkey: nonceAccount.publicKey, authorizedPubkey: nonceAuthority.publicKey, }), // add your real instructions after this ] const message = new TransactionMessage({ payerKey: nonceAuthority.publicKey, recentBlockhash: nonce, instructions, }).compileToV0Message() const tx = new VersionedTransaction(message) tx.sign([nonceAuthority /* + other signers */]) const rawTx = tx.serialize() ``` Notes: - If you use ComputeBudget instructions, they must come **after** `nonceAdvance` - If `nonceAdvance` is not first, the transaction will be rejected --- ## Step 7: Fan out to multiple RPCs Send the same rawTx concurrently. ```ts const endpoints = [ 'https://swqos-fra2.erpc.global?api-key=YOUR_API_KEY', 'https://swqos-ams1.erpc.global?api-key=YOUR_API_KEY', 'https://', ] const results = await Promise.allSettled( endpoints.map((url) => new Connection(url, 'confirmed').sendRawTransaction(rawTx, { skipPreflight: true, minContextSlot, }), ), ) const success = results.find( (r): r is PromiseFulfilledResult => r.status === 'fulfilled', ) if (!success) { throw new Error('All sends failed') } const signature = success.value ``` - The signature is identical across endpoints - A successful send is **not** a confirmation --- ## Step 8: Confirm with Durable Nonce With Durable Nonce, include the nonce info in confirmation. ```ts await connection.confirmTransaction( { signature, nonceAccountPubkey: nonceAccount.publicKey, nonceValue: nonce, minContextSlot, }, 'confirmed', ) ``` If confirmation succeeds: - The nonce advances - Copies sent to other RPCs return `InvalidNonce` --- ## Next sends - After confirmation, fetch a fresh nonce - Do not reuse the same rawTx or nonce value - For parallel workflows, use separate nonce accounts For the next transaction, fetch the updated nonce and build the transaction using the same steps. --- title: "Leader Slot Information API Documentation" description: "Overview and usage of the Solana Leader Slot Information API (getLeaderSlots API)" canonical: "https://erpc.global/en/doc/rpc/leader-slot-api/" locale: "en" --- # Leader Slot Information API Documentation ## What is the Leader Slot Information (getLeaderSlots) API? `getLeaderSlots` is an extended Solana RPC method that returns upcoming leader slot records with validator identity, stake weight, network endpoint metadata, estimated leader location, and reference latency measurements. If you hold ERPC usage credits (API tokens), you can call it in the same format as a standard Solana RPC method. This API provides: - Leader validator schedule starting from the requested slot - `stakeWeight` for each leader validator - Estimated leader region, city, country, coordinates, ASN organization, and timezone - Reference ping measurements from ERPC observation regions through `pingToLeaders` ## Endpoint and Request Body Example ~~~text https://edge.erpc.global?api-key= ~~~ Specify the starting slot number in `params`. ~~~json { "jsonrpc": "2.0", "id": 1, "method": "getLeaderSlots", "params": [436946064] } ~~~ ## Example (HTTP) ~~~bash curl 'https://edge.erpc.global?api-key=' \ --header 'Content-Type: application/json' \ --data '{ "jsonrpc":"2.0", "id":1, "method":"getLeaderSlots", "params":[436946064] }' ~~~ ## Example Response (JSON) The current response wraps records in `result.data[]`. `result.total` shows how many records were returned. The `data[]` array below is abbreviated to three of the 100 records for this request. The first entry shows `pingToLeaders` from all seven ERPC observation regions; the remaining entries are trimmed to one region for readability. ~~~json { "jsonrpc": "2.0", "id": 1, "result": { "success": true, "message": "Leader schedule records retrieved successfully", "total": 100, "data": [ { "identity": "BXAxLMMMUNYfC1z166VjWHR3WjTmqzLxB837o5ghmRtH", "epoch": 1011, "slot": "436946064", "stakeWeight": 819031.365477103, "ipAddress": "202.8.10.164", "gossipPort": 8000, "tpuPort": null, "tpuQuicPort": 5010, "rpcAddress": null, "version": "4.1.2", "featureSet": "3345198602", "leaderRegion": "dublin", "leaderCity": "Crumlin", "leaderCountry": "IE", "leaderLat": 53.32154, "leaderLon": -6.31439, "leaderOrg": "AS20326 TeraSwitch Networks Inc.", "leaderTimezone": "Europe/Dublin", "pingToLeaders": [ { "city": "Frankfurt am Main", "region": "frankfurt", "ms": 18.438, "icmpReplied": true, "fromIp": "185.191.118.11", "country": "DE", "lat": 50.139, "lon": 8.6725, "org": "AS213896 UAB Cherry Servers", "postal": "60320", "timezone": "Europe/Berlin", "measuredAt": "2026-08-03T06:20:48.000Z" }, { "city": "Newark", "region": "ny", "ms": 74.981, "icmpReplied": true, "fromIp": "64.130.37.222", "country": "US", "lat": 40.73566, "lon": -74.17237, "org": "AS20326 TeraSwitch Networks Inc.", "postal": "07102", "timezone": "America/New_York", "measuredAt": "2026-08-03T06:22:21.000Z" }, { "city": "London", "region": "london", "ms": 10.978, "icmpReplied": true, "fromIp": "67.209.52.250", "country": "GB", "lat": 51.50853, "lon": -0.12574, "org": "AS20326 TeraSwitch Networks Inc.", "postal": "WC2N", "timezone": "Europe/London", "measuredAt": "2026-08-03T06:23:06.000Z" }, { "city": "Singapore", "region": "singapore", "ms": 166.379, "icmpReplied": true, "fromIp": "202.8.11.52", "country": "SG", "lat": 1.2959, "lon": 103.7907, "org": "AS20326 TeraSwitch Networks Inc.", "postal": "139963", "timezone": "Asia/Singapore", "measuredAt": "2026-08-03T06:24:52.000Z" }, { "city": "Amsterdam", "region": "amsterdam", "ms": 12.827, "icmpReplied": true, "fromIp": "84.32.103.245", "country": "NL", "lat": 52.37403, "lon": 4.88969, "org": "AS59642 UAB Cherry Servers", "postal": "1012", "timezone": "Europe/Amsterdam", "measuredAt": "2026-08-03T06:21:33.000Z" }, { "city": "Ebara", "region": "tokyo", "ms": 212.499, "icmpReplied": true, "fromIp": "198.13.133.88", "country": "JP", "lat": 35.617, "lon": 139.7486, "org": "AS20326 TeraSwitch Networks Inc.", "postal": "140-0002", "timezone": "Asia/Tokyo", "measuredAt": "2026-08-03T06:24:01.000Z" }, { "city": "Sydney", "region": "sydney", "ms": 274.379, "icmpReplied": true, "fromIp": "82.26.116.36", "country": "AU", "lat": -33.86785, "lon": 151.20732, "org": "AS29802 HIVELOCITY, Inc.", "postal": "1001", "timezone": "Australia/Sydney", "measuredAt": "2026-08-03T06:25:50.000Z" } ] }, { "identity": "BXAxLMMMUNYfC1z166VjWHR3WjTmqzLxB837o5ghmRtH", "epoch": 1011, "slot": "436946065", "stakeWeight": 819031.365477103, "ipAddress": "202.8.10.164", "gossipPort": 8000, "tpuPort": null, "tpuQuicPort": 5010, "rpcAddress": null, "version": "4.1.2", "featureSet": "3345198602", "leaderRegion": "dublin", "leaderCity": "Crumlin", "leaderCountry": "IE", "leaderLat": 53.32154, "leaderLon": -6.31439, "leaderOrg": "AS20326 TeraSwitch Networks Inc.", "leaderTimezone": "Europe/Dublin", "pingToLeaders": [ { "city": "Frankfurt am Main", "region": "frankfurt", "ms": 18.438, "icmpReplied": true, "fromIp": "185.191.118.11", "country": "DE", "lat": 50.139, "lon": 8.6725, "org": "AS213896 UAB Cherry Servers", "postal": "60320", "timezone": "Europe/Berlin", "measuredAt": "2026-08-03T06:20:48.000Z" } ] }, { "identity": "BXAxLMMMUNYfC1z166VjWHR3WjTmqzLxB837o5ghmRtH", "epoch": 1011, "slot": "436946066", "stakeWeight": 819031.365477103, "ipAddress": "202.8.10.164", "gossipPort": 8000, "tpuPort": null, "tpuQuicPort": 5010, "rpcAddress": null, "version": "4.1.2", "featureSet": "3345198602", "leaderRegion": "dublin", "leaderCity": "Crumlin", "leaderCountry": "IE", "leaderLat": 53.32154, "leaderLon": -6.31439, "leaderOrg": "AS20326 TeraSwitch Networks Inc.", "leaderTimezone": "Europe/Dublin", "pingToLeaders": [ { "city": "Frankfurt am Main", "region": "frankfurt", "ms": 18.438, "icmpReplied": true, "fromIp": "185.191.118.11", "country": "DE", "lat": 50.139, "lon": 8.6725, "org": "AS213896 UAB Cherry Servers", "postal": "60320", "timezone": "Europe/Berlin", "measuredAt": "2026-08-03T06:20:48.000Z" } ] } ] } } ~~~ ## Response Fields | Field | Meaning | | --- | --- | | `result.success` | Whether the request succeeded. | | `result.message` | Human-readable status message. | | `result.total` | Number of returned leader slot records. The API currently returns 100 records per request. | | `result.data[]` | Ordered leader slot records starting from the requested slot. | | `identity` | Leader validator identity public key. | | `epoch` | Solana epoch containing the slot. | | `slot` | Slot number. It is returned as a string, so clients should not assume a JSON number. | | `stakeWeight` | Stake delegated to the leader validator. Higher stake generally means the validator appears in leader schedules more often over time. | | `leaderRegion` | Normalized operational region label used for routing and analysis. It may group nearby cities or provider locations. | | `leaderCity`, `leaderCountry`, `leaderLat`, `leaderLon`, `leaderOrg`, `leaderTimezone` | Estimated geolocation and network organization for the leader validator. | | `pingToLeaders[]` | Reference latency from ERPC observation regions (`frankfurt`, `amsterdam`, `ny`, `london`, `tokyo`, `singapore`, `sydney`) to the leader, including region, city, ms, icmpReplied, fromIp, country, coordinates, ASN organization, postal code, timezone, and measuredAt. | | `pingToLeaders[].icmpReplied` | Whether the validator replied to the measurement. When it is `false`, `ms` holds a stored sentinel value rather than a latency and should not be read as one; treat `false` as unknown, not as distant or unusable, since some validators that do not answer ICMP still serve TPU and QUIC normally, and filtering them out can drop a healthy leader from your send path. Check `icmpReplied` before trusting `ms` as a latency — it decides whether the number is usable, not which validator to send to. | | `pingToLeaders[].measuredAt` | When the latency was last measured, in ISO-8601 UTC. Use it to judge how current a reading is. Each observation region measures independently, so entries in the same `pingToLeaders` array can carry different `measuredAt` values. An older `measuredAt` is not a broken reading: when a measurement run fails to complete, the stored value is left in place rather than overwritten with a fabricated one, so it still reflects a genuine past measurement. | ## Visualizing Leader Slots The same response can be viewed as a slot-by-slot operational timeline. This example uses Frankfurt as the observation point. | Slot window | Leader region | Leader location | Stake weight | Ping from Frankfurt | Operational reading | | --- | --- | --- | --- | --- | --- | | 436946064-436946066 | dublin | Crumlin, IE | 819,031.37 | 18.438 ms | One leader holds three consecutive slots. Frankfurt serves it at 18.4 ms, but London (11.0 ms) and Amsterdam (12.8 ms) are closer — for this window, London or Amsterdam capacity beats Frankfurt. | | 436946068 | frankfurt | Frankfurt am Main, DE | 166,438.25 | 0.062 ms | Same-metro leader. Frankfurt resources are strongly favored for this slot. | This view is useful because Solana is global. Unlike traditional HFT, where the main goal is often to sit near one matching engine, Solana leaders rotate across validators around the world. The fastest region changes as the leader schedule changes. ## Solana Network Data Website [![Validators Solutions - Solana network data](https://erpc.global/faq/ValidatorsSolutionsEN.jpg)](https://validators.solutions/) For a public view of validator and network distribution, use [Validators Solutions](https://validators.solutions/). Use it to understand the broader Solana network, then use `getLeaderSlots` for the slot-level schedule, stake weight, validator location, and measured latency data needed for operational routing. ## Token Usage The API retrieves 100 leader slot records starting from the specified slot. Each request consumes 420 tokens. If you need one entry per validator for the whole epoch instead of one entry per slot, use the [Validators Information API](https://erpc.global/en/doc/rpc/validators-information-api/), which is billed on the number of validators it returns. ## Why Leader Slot Information Matters - If the leader is geographically or network-path distant, direct transaction delivery becomes inefficient. - Stake weight helps estimate how often a validator is likely to appear in the leader schedule over time. - During global leader transitions, regional switching strategies are more important than a single global average latency. - Combining slot schedule, stake weight, leader location, and measured ping data allows optimized routing and validator placement. ## Background A single Solana epoch consists of approximately 432,000 slots. Continuously collecting leader schedules, validator metadata, geolocation, and latency measurements requires a dedicated data pipeline. ERPC maintains this data and exposes it as an immediately usable leader slot map through the RPC interface. ## Strategic Use Cases - Detection optimization: prioritize nearby, low-latency leader windows. - Multi-region deployment: deploy in FRA, AMS, NY, TY, SGP, and other strategic regions to reduce transition gaps. - Stake-aware planning: use `stakeWeight` to understand which leaders matter more frequently over longer windows. - Visualization and analytics: monitor leader ratios, stake distribution, and latency distribution by region. ## Availability `getLeaderSlots` is available to all ERPC users. API tokens and usage credits can be issued or verified on the ERPC Web Dashboard. - ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ## Transaction Success Rate and SWQoS Endpoint To further improve transaction success rate and execution speed, we recommend using the SWQoS Endpoint. SWQoS (Stake-weighted Quality of Service) prioritizes validators with stake connections. Leaders allocate approximately 80% of bandwidth to priority traffic and 20% to non-priority traffic, with the priority lane offering roughly 5x throughput. This scheduling takes place before Priority-fee evaluation, meaning getting into the SWQoS priority lane is the prerequisite for true low-latency performance. --- title: "Validators Information API Documentation" description: "Overview and usage of the Solana Validators Information API (getValidatorsInformation API)" canonical: "https://erpc.global/en/doc/rpc/validators-information-api/" locale: "en" --- # Validators Information API Documentation ## What is the Validators Information (getValidatorsInformation) API? `getValidatorsInformation` is an extended Solana RPC method that returns the validators leading at least one slot in the current epoch, with stake weight, network endpoint metadata, estimated leader location, and reference latency measurements folded into one row per validator. It does not return a list of every node on the network, and it does not return RPC nodes. If you hold ERPC usage credits (API tokens), you can call it in the same format as a standard Solana RPC method. This API provides: - One row per validator leading a slot in the current epoch, with `slotCount` showing how many slots it leads — unlike `getLeaderSlots`, which returns one row per slot - `stakeWeight` for each leader validator - Estimated leader region, city, country, coordinates, ASN organization, and timezone - Reference ping measurements from ERPC observation regions through `pingToLeaders` ## Endpoint and Request Body Example ~~~text https://edge.erpc.global?api-key= ~~~ Every parameter is optional; omitting `params`, or passing `params: []`, returns every validator leading a slot in the current epoch. ~~~json { "jsonrpc": "2.0", "id": 1, "method": "getValidatorsInformation", "params": [] } ~~~ To narrow the result, pass an object with `limit`, `country`, and `region`. This example asks for up to 5 validators in Germany, which also costs less than the unfiltered request above. ~~~json { "jsonrpc": "2.0", "id": 1, "method": "getValidatorsInformation", "params": [{ "limit": 5, "country": "DE" }] } ~~~ All three parameters are optional. `country` is matched against `leaderCountry` using ISO 3166-1 alpha-2 codes, case-insensitively. `region` is matched against `leaderRegion` exactly and case-sensitively — read `leaderRegion` from an unfiltered response to learn the valid values for your target validators. `limit` accepts 1 to 2000 and clamps to the actual number of validators in the epoch, so a `limit` above the real count never errors. ## Example (HTTP) ~~~bash curl 'https://edge.erpc.global?api-key=' \ --header 'Content-Type: application/json' \ --data '{ "jsonrpc":"2.0", "id":1, "method":"getValidatorsInformation", "params":[] }' ~~~ ## Example Response (JSON) `result.total` shows how many validators were returned by this request. The `data[]` array below is abbreviated to three of the 673 entries for this epoch. The first entry shows `pingToLeaders` from all seven ERPC observation regions; the remaining entries are trimmed to one region for readability. ~~~json { "jsonrpc": "2.0", "id": 1, "result": { "success": true, "message": "Validator information retrieved successfully", "epoch": 1011, "total": 673, "totalValidators": 673, "data": [ { "identity": "Fd7btgySsrjuo25CJCj7oE7VPMyezDhnx7pZkj2v69Nk", "gossipNodeId": 734, "slotCount": 16912, "stakeWeight": 16803592.923637684, "ipAddress": "141.95.45.24", "gossipPort": 8001, "tpuPort": null, "tpuQuicPort": 8022, "rpcAddress": null, "version": "4.1.1", "featureSet": "2220189554", "leaderRegion": "frankfurt", "leaderCity": "Frankfurt am Main", "leaderCountry": "DE", "leaderLat": 50.11552, "leaderLon": 8.68417, "leaderOrg": "AS16276 OVH SAS", "leaderTimezone": "Europe/Berlin", "pingToLeaders": [ { "city": "Frankfurt am Main", "region": "frankfurt", "ms": 1.374, "icmpReplied": true, "fromIp": "185.191.118.11", "country": "DE", "lat": 50.139, "lon": 8.6725, "org": "AS213896 UAB Cherry Servers", "postal": "60320", "timezone": "Europe/Berlin", "measuredAt": "2026-08-03T06:20:48.000Z" }, { "city": "London", "region": "london", "ms": 16.174, "icmpReplied": true, "fromIp": "67.209.52.250", "country": "GB", "lat": 51.50853, "lon": -0.12574, "org": "AS20326 TeraSwitch Networks Inc.", "postal": "WC2N", "timezone": "Europe/London", "measuredAt": "2026-08-03T06:23:06.000Z" }, { "city": "Ebara", "region": "tokyo", "ms": 234.25, "icmpReplied": true, "fromIp": "198.13.133.88", "country": "JP", "lat": 35.617, "lon": 139.7486, "org": "AS20326 TeraSwitch Networks Inc.", "postal": "140-0002", "timezone": "Asia/Tokyo", "measuredAt": "2026-08-03T06:24:01.000Z" }, { "city": "Amsterdam", "region": "amsterdam", "ms": 14.072, "icmpReplied": true, "fromIp": "84.32.103.245", "country": "NL", "lat": 52.37403, "lon": 4.88969, "org": "AS59642 UAB Cherry Servers", "postal": "1012", "timezone": "Europe/Amsterdam", "measuredAt": "2026-08-03T06:21:33.000Z" }, { "city": "Newark", "region": "ny", "ms": 87.983, "icmpReplied": true, "fromIp": "64.130.37.222", "country": "US", "lat": 40.73566, "lon": -74.17237, "org": "AS20326 TeraSwitch Networks Inc.", "postal": "07102", "timezone": "America/New_York", "measuredAt": "2026-08-03T06:22:21.000Z" }, { "city": "Singapore", "region": "singapore", "ms": 221.655, "icmpReplied": true, "fromIp": "202.8.11.52", "country": "SG", "lat": 1.2959, "lon": 103.7907, "org": "AS20326 TeraSwitch Networks Inc.", "postal": "139963", "timezone": "Asia/Singapore", "measuredAt": "2026-08-03T06:24:52.000Z" }, { "city": "Sydney", "region": "sydney", "ms": 270.79, "icmpReplied": true, "fromIp": "82.26.116.36", "country": "AU", "lat": -33.86785, "lon": 151.20732, "org": "AS29802 HIVELOCITY, Inc.", "postal": "1001", "timezone": "Australia/Sydney", "measuredAt": "2026-08-03T06:25:50.000Z" } ] }, { "identity": "HEL1USMZKAL2odpNBj2oCjffnFGaYwmbGmyewGv1e2TU", "gossipNodeId": 678, "slotCount": 15656, "stakeWeight": 16025294.32908543, "ipAddress": "207.241.184.11", "gossipPort": 8001, "tpuPort": null, "tpuQuicPort": 8002, "rpcAddress": null, "version": "4.1.0-rc.1", "featureSet": "3345198602", "leaderRegion": "london", "leaderCity": "London", "leaderCountry": "GB", "leaderLat": 51.50853, "leaderLon": -0.12574, "leaderOrg": "AS399460 Helius", "leaderTimezone": "Europe/London", "pingToLeaders": [ { "city": "Frankfurt am Main", "region": "frankfurt", "ms": 11.246, "icmpReplied": true, "fromIp": "185.191.118.11", "country": "DE", "lat": 50.139, "lon": 8.6725, "org": "AS213896 UAB Cherry Servers", "postal": "60320", "timezone": "Europe/Berlin", "measuredAt": "2026-08-03T06:20:48.000Z" } ] }, { "identity": "JUPiTERrZqgf1jUyR7dSkhMx4Kn2qJyekWsg3LT1h4b", "gossipNodeId": 273524, "slotCount": 12920, "stakeWeight": 12539698.447203109, "ipAddress": "88.216.36.133", "gossipPort": 8000, "tpuPort": null, "tpuQuicPort": 9007, "rpcAddress": null, "version": "4.2.0-rc.0", "featureSet": "4119855713", "leaderRegion": "frankfurt", "leaderCity": "Frankfurt am Main", "leaderCountry": "DE", "leaderLat": 50.139, "leaderLon": 8.6725, "leaderOrg": "AS213896 UAB \"Cherry Servers\"", "leaderTimezone": "Europe/Berlin", "pingToLeaders": [ { "city": "Frankfurt am Main", "region": "frankfurt", "ms": 0.061, "icmpReplied": true, "fromIp": "185.191.118.11", "country": "DE", "lat": 50.139, "lon": 8.6725, "org": "AS213896 UAB Cherry Servers", "postal": "60320", "timezone": "Europe/Berlin", "measuredAt": "2026-08-03T06:20:48.000Z" } ] } ] } } ~~~ ## Response Fields | Field | Meaning | | --- | --- | | `result.success` | Whether the request succeeded. | | `result.message` | Human-readable status message. | | `result.epoch` | Epoch the returned leader set belongs to. This is the current epoch, or the latest epoch present in the leader schedule if the current epoch's schedule has not been loaded yet. | | `result.total` | Number of validators in `data`. This is the quantity the call is billed on. | | `result.totalValidators` | Number of leader validators in that epoch before `country`, `region`, or `limit` were applied. Compare it with `result.total` to see how far a filter narrowed the set. | | `result.data[]` | One entry per validator, ordered by `slotCount` descending and then by `identity`, so a `limit` returns the validators leading the most slots. | | `identity` | Validator identity public key. | | `gossipNodeId` | Identifier of the gossip node record linked to this validator. It is `null` when no gossip node is linked, in which case the location, port, and ping fields are empty as well. Validators without a linked gossip node are returned in an unfiltered request but cannot match a `country` or `region` filter. | | `slotCount` | Number of slots this validator leads in the reported epoch. Each entry covers one validator, not one slot. | | `stakeWeight` | Activated stake of the validator identity, in SOL. Validators with no linked gossip node report `0`. | | `ipAddress`, `gossipPort`, `tpuPort`, `tpuQuicPort`, `rpcAddress` | Gossip network endpoint metadata for the validator. | | `version`, `featureSet` | Solana client version and feature set reported by the validator. | | `leaderRegion` | Normalized operational region label used for routing and analysis. It may group nearby cities or provider locations, and it is the value the `region` request parameter matches. | | `leaderCity`, `leaderCountry`, `leaderLat`, `leaderLon`, `leaderOrg`, `leaderTimezone` | Estimated geolocation and network organization for the validator. | | `pingToLeaders[]` | Reference latency to this validator from each ERPC observation region (`frankfurt`, `amsterdam`, `ny`, `london`, `tokyo`, `singapore`, `sydney`), including region, city, ms, icmpReplied, fromIp, country, coordinates, ASN organization, postal code, timezone, and measuredAt. | | `pingToLeaders[].icmpReplied` | Whether the validator replied to the measurement. When it is `false`, `ms` holds a stored sentinel value rather than a latency and should not be read as one; treat `false` as unknown, not as distant or unusable, since some validators that do not answer ICMP still serve TPU and QUIC normally, and filtering them out can drop a healthy leader from your send path. Check `icmpReplied` before trusting `ms` as a latency — it decides whether the number is usable, not which validator to send to. | | `pingToLeaders[].measuredAt` | When the latency was last measured, in ISO-8601 UTC. Use it to judge how current a reading is. Each observation region measures independently, so entries in the same `pingToLeaders` array can carry different `measuredAt` values. An older `measuredAt` is not a broken reading: when a measurement run fails to complete, the stored value is left in place rather than overwritten with a fabricated one, so it still reflects a genuine past measurement. | ## Visualizing Validator Coverage The same response can be read as an epoch-level coverage map instead of a slot-by-slot lookup. This example uses Frankfurt as the observation point. | Validator region | Location | Slots in epoch | Stake weight | Ping from Frankfurt | Operational reading | | --- | --- | --- | --- | --- | --- | | frankfurt | Frankfurt am Main, DE | 16,912 | 16,803,592.92 | 1.374 ms | The epoch's largest leader by slots, in the same metro. Frankfurt capacity serves this validator throughout the epoch, not only during one slot window. | | london | London, GB | 15,656 | 16,025,294.33 | 11.246 ms | The second-largest leader. Frankfurt serves it adequately, but London capacity would bring this path down to near-metro latency. | | frankfurt | Frankfurt am Main, DE | 12,920 | 12,539,698.45 | 0.061 ms | Another same-metro leader with about three-quarters of the top entry's slots. Same-region capacity covers it just as well. | [getLeaderSlots](https://erpc.global/en/doc/rpc/leader-slot-api/) answers which validators lead the next slots, so it fits routing a transaction now; this method answers which validators lead the epoch at all and how often, so it fits deciding where capacity should sit for the epoch. ## Solana Network Data Website [![Validators Solutions - Solana network data](https://erpc.global/faq/ValidatorsSolutionsEN.jpg)](https://validators.solutions/) Use [Validators Solutions](https://validators.solutions/) for the public view of network distribution, then use `getValidatorsInformation` for per-validator slot counts, stake, location, and measured latency. ## Token Usage This method is billed on the number of validators it returns, in units of 10: every 10 validators cost 100 tokens, and a partial unit counts as a full one. A response of 95 validators is therefore charged as 10 units, or 1,000 tokens. Because the charge follows what is returned rather than what is requested, narrowing the set with `country` or `region` costs proportionally less, and a request that matches no validators costs nothing. A `limit` above the number of validators in the epoch is clamped to the real count, so a request never pays for validators that do not exist. The size of the leader set changes from epoch to epoch. In the epoch shown above it was 673 validators, which puts a full read at roughly 6,800 tokens. ## Why Validator Information Matters - One row per validator answers who leads this epoch and how much, without aggregating hundreds of thousands of slot rows client-side. - `slotCount` shows how often a validator is leader in this epoch, so a short path to a high-`slotCount` validator pays off repeatedly. - `country` and `region` show where the epoch's leader capacity actually sits. - Ping combined with `measuredAt` separates a slow path from a stale reading. ## Background A Solana epoch consists of approximately 432,000 slots. Once the leader assignments for those slots are grouped by validator identity, they collapse into roughly 670 validator rows. ERPC maintains the leader schedule, validator metadata, geolocation, and latency collection, and exposes the result through the RPC interface. ## Strategic Use Cases - Epoch-level capacity planning: size infrastructure against the full set of validators leading the current epoch, not a rolling slot window. - Regional shortlists: use `country` and `region` to pull the validators leading slots in a target location. - Slot-count- and stake-aware prioritization: combine `slotCount` and `stakeWeight` to rank validators within a shortlist. - Cross-epoch monitoring: compare `leaderRegion` distribution between epochs to see how leader geography shifts. ## Availability `getValidatorsInformation` is available to all ERPC users. API tokens and usage credits can be issued or verified on the ERPC Web Dashboard. - ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ## Transaction Success Rate and SWQoS Endpoint To further improve transaction success rate and execution speed, we recommend using the SWQoS Endpoint. SWQoS (Stake-weighted Quality of Service) prioritizes validators with stake connections. Leaders allocate approximately 80% of bandwidth to priority traffic and 20% to non-priority traffic, with the priority lane offering roughly 5x throughput. This scheduling takes place before Priority-fee evaluation, meaning getting into the SWQoS priority lane is the prerequisite for true low-latency performance. --- title: "Solana RPC - Speed Comparison" description: "Compare Shredstream, gRPC, and RPC endpoints with slv check geyserbench" canonical: "https://erpc.global/en/doc/rpc/speed-comparison/" locale: "en" --- # Solana RPC - Speed Comparison `slv check geyserbench` is a Solana benchmark command for comparing Shredstream, gRPC, and RPC performance. Choose the connection kind, enter the endpoints you want to compare, and the CLI will show win rate, p50, p95, p99, ping, firsts, and backfill in one report. ![slv check geyserbench](https://erpc.global/doc/general/slv-check-geyserbench.jpg) ## Install first ```bash curl -fsSL https://storage.slv.dev/slv/install | sh ``` You can use the command immediately after installation. ## Basic usage ```bash slv check geyserbench --help Usage: slv check geyserbench Version: 2026.4.3.1321 Description: Run geyserbench with generated config Options: -h, --help - Show this help. --kind - Benchmark kind: shredstream | grpc | rpc --region - Benchmark region for region-aware measurement --endpoint - Endpoint URL to compare --transactions - Transaction sample size (Default: 10000) ``` Interactive mode is straightforward: ```bash slv check geyserbench ? Benchmark kind (shredstream / grpc / rpc): (shredstream) › ? Region (--region) for accurate measurement: (frankfurt) › ? First endpoint URL: › ``` Pick the transport first, choose the region, and then enter the endpoints you want to compare. ## Why region-aware measurement matters Solana is global, and leaders rotate while blocks are produced. Because data propagation speed depends on how close you are to the current leader, regions closer to leader slots can receive data faster. That means region-by-region comparison gives a more accurate view than looking only at global averages. This is especially useful for global apps and for very low-latency workloads such as high-frequency trading, where saving even 1 ms matters. --- title: "Ethereum RPC Quickstart" description: "Get an API key, make your first Ethereum JSON-RPC request over HTTP, and subscribe to events over WebSocket with ERPC." canonical: "https://erpc.global/en/doc/ethereum-rpc/quickstart/" locale: "en" --- # Ethereum RPC Quickstart ## Ethereum RPC Quickstart This guide takes you from zero to your first Ethereum JSON-RPC response with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana? You can use the same RPC key as Solana. ### 2. Make Your First Request Send a JSON-RPC 2.0 request as an HTTP POST, with your API key in the `api-key` parameter: ```bash curl https://edge.erpc.global/eth?api-key= --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` The response returns the latest block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` You can check which chain the endpoint serves with `eth_chainId`: ```bash curl https://edge.erpc.global/eth?api-key= --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_chainId" }' ``` ### 3. Subscribe over WebSocket The WebSocket endpoint accepts standard `eth_subscribe` subscriptions: ```bash wscat -c "wss://edge.erpc.global/eth?api-key=" # After connected, send: {"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]} ``` For the available subscription types, refer to the official Ethereum JSON-RPC documentation linked below. ### 4. Batch Requests You can send up to 256 JSON-RPC calls in a single HTTP request. Each call in a batch is metered as its own call. ```bash curl https://edge.erpc.global/eth?api-key= --header 'Content-Type: application/json' --data '[ {"jsonrpc":"2.0","id":1,"method":"eth_blockNumber"}, {"jsonrpc":"2.0","id":2,"method":"eth_gasPrice"} ]' ``` ### Next Steps - Endpoints, metering, and status codes: [Ethereum RPC Endpoint Documentation](https://erpc.global/en/doc/ethereum-rpc/general/) - Full method list with request and response shapes: [Ethereum RPC API Reference](https://erpc.global/en/api-doc/ethereum/) - Official Ethereum JSON-RPC documentation: [https://ethereum.org/en/developers/docs/apis/json-rpc/](https://ethereum.org/en/developers/docs/apis/json-rpc/) --- title: "Ethereum RPC Endpoint Documentation" description: "Use ERPC as a low-latency Ethereum RPC endpoint for HTTP JSON-RPC requests and WebSocket subscriptions." canonical: "https://erpc.global/en/doc/ethereum-rpc/general/" locale: "en" --- # Ethereum RPC Endpoint Documentation ## Ethereum RPC Endpoint Documentation Use ERPC as your Ethereum RPC endpoint for HTTP JSON-RPC requests and WebSocket subscriptions. Ethereum RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana. Please add your API key to the 'api-key' parameter. ### Endpoints Send JSON-RPC 2.0 requests as HTTP POST to: ```text https://edge.erpc.global/eth?api-key= ``` For subscriptions, connect over WebSocket to: ```text wss://edge.erpc.global/eth?api-key= ``` ### Examples Here is an HTTP request example. ```bash curl https://edge.erpc.global/eth?api-key= --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` Here is a WebSocket subscription example. ```bash wscat -c "wss://edge.erpc.global/eth?api-key=" # After connected, send: {"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]} ``` You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests JSON-RPC batches of up to 256 calls per HTTP request are supported, and JSON-RPC notifications are also accepted. Each call in a batch is metered as its own call. ### Usage Metering Each call uses a fixed number of tokens set by its method. A call inside an HTTP batch and a call sent over a WebSocket connection each count once. On WebSocket, each subscription notification you receive also uses tokens. The [API Usage](https://dashboard.erpc.global/en/user/api-usage) page of the dashboard shows each token as one credit. Calls over HTTP and WebSocket use these tokens per call: | Method | Tokens per call | | --- | --- | | The 46 methods listed below | 42 | | The 18 methods listed below | 81 | | `eth_getLogs`, `eth_getFilterLogs`, `eth_sendRawTransaction`, `eth_callMany`, `eth_simulateV1`, `txpool_status`, `txpool_inspect`, `txpool_contentFrom`, `debug_getRawReceipts` | 84 | | The 17 methods listed below | 162 | | `trace_callMany`, `txpool_content` | 168 | | `trace_replayBlockTransactions`, `trace_replayTransaction` | 324 | | Any method not in the rows above | 81, 162 or 324 | When you estimate, count a method in the "81, 162 or 324" row as 324, the highest of the three values. These methods use 42 tokens per call: - `eth_*` (41): `eth_accounts`, `eth_baseFee`, `eth_blobBaseFee`, `eth_blockNumber`, `eth_call`, `eth_capabilities`, `eth_chainId`, `eth_createAccessList`, `eth_estimateGas`, `eth_feeHistory`, `eth_gasPrice`, `eth_getAccount`, `eth_getBalance`, `eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getBlockReceipts`, `eth_getBlockTransactionCountByHash`, `eth_getBlockTransactionCountByNumber`, `eth_getCode`, `eth_getFilterChanges`, `eth_getProof`, `eth_getRawTransactionByHash`, `eth_getStorageAt`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionByHash`, `eth_getTransactionBySenderAndNonce`, `eth_getTransactionCount`, `eth_getTransactionReceipt`, `eth_getUncleCountByBlockHash`, `eth_getUncleCountByBlockNumber`, `eth_maxPriorityFeePerGas`, `eth_newBlockFilter`, `eth_newFilter`, `eth_newPendingTransactionFilter`, `eth_signTransaction`, `eth_submitWork`, `eth_subscribe`, `eth_syncing`, `eth_uninstallFilter`, `eth_unsubscribe` - `net_*` (3): `net_listening`, `net_peerCount`, `net_version` - `web3_*` (2): `web3_clientVersion`, `web3_sha3` These methods use 81 tokens per call: - `eth_*` (18): `eth_cancelPrivateTransaction`, `eth_coinbase`, `eth_getHeaderByNumber`, `eth_getRawTransactionByBlockHashAndIndex`, `eth_getRawTransactionByBlockNumberAndIndex`, `eth_getUncleByBlockHashAndIndex`, `eth_getUncleByBlockNumberAndIndex`, `eth_getUserOperationReceipt`, `eth_getWork`, `eth_hashrate`, `eth_mining`, `eth_pendingTransactions`, `eth_protocolVersion`, `eth_sendPrivateTransaction`, `eth_sendTransaction`, `eth_sign`, `eth_submitHashRate`, `eth_submitHashrate` These methods use 162 tokens per call: - `debug_*` (11): `debug_gcStats`, `debug_getBadBlocks`, `debug_getBlockReceipts`, `debug_getTrieFlushInterval`, `debug_storageRangeAt`, `debug_traceBlock`, `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceCallMany`, `debug_traceTransaction` - `trace_*` (6): `trace_block`, `trace_call`, `trace_filter`, `trace_get`, `trace_rawTransaction`, `trace_transaction` Each subscription notification you receive over WebSocket (`wss://edge.erpc.global/eth`) uses 42 tokens. A subscription notification is an `eth_subscription` message the server sends after you subscribe with `eth_subscribe`. Each message you send over the connection that cannot be read as a JSON-RPC call also uses 42 tokens. You can check the current per-call token rate in the [Ethereum RPC API Reference](https://erpc.global/en/api-doc/ethereum/). ### Supported Methods The endpoint covers the standard Ethereum JSON-RPC method families — `eth_*`, `net_*`, `txpool_*`, and `web3_*` — including account and block reads (`eth_getBalance`, `eth_getBlockByNumber`, `eth_getLogs`), transaction flow (`eth_sendRawTransaction`, `eth_getTransactionReceipt`), fee data (`eth_feeHistory`, `eth_maxPriorityFeePerGas`), call simulation (`eth_call`, `eth_callMany`, `eth_simulateV1`), state proofs (`eth_getProof`), filters (`eth_newFilter`, `eth_getFilterChanges`), txpool inspection (`txpool_status`, `txpool_content`), and WebSocket subscriptions (`eth_subscribe`, `eth_unsubscribe`). For the complete method list with request and response shapes, see the [Ethereum RPC API Reference](https://erpc.global/en/api-doc/ethereum/). ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Upstream JSON-RPC response. | | 400 | Invalid JSON-RPC request. | | 401 | Missing or unauthorized API key. | | 429 | Rate limited by the downstream RPC policy. | | 502 | Proxy unavailable. | | 503 | Downstream RPC service unavailable. | WebSocket connections use `101` (protocol upgrade accepted) and `426` (a WebSocket Upgrade handshake is required) in addition to the codes above. ### Ethereum RPC Methods and Documentation For the full list of standard methods, parameters, and subscription specifications, please refer to the official documentation. It covers both HTTP and WebSocket usage. [https://ethereum.org/en/developers/docs/apis/json-rpc/](https://ethereum.org/en/developers/docs/apis/json-rpc/) --- title: "Avalanche RPC Quickstart" description: "Get an API key, make your first Avalanche JSON-RPC request over HTTP, and subscribe to events over WebSocket with ERPC." canonical: "https://erpc.global/en/doc/avalanche-rpc/quickstart/" locale: "en" --- # Avalanche RPC Quickstart ## Avalanche RPC Quickstart This guide takes you from zero to your first Avalanche JSON-RPC response with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana or Ethereum? You can use the same RPC key. ### 2. Make Your First Request Send a JSON-RPC 2.0 request as an HTTP POST, with your API key in the `api-key` parameter: ```bash curl https://edge.erpc.global/ava?api-key= --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` The response returns the latest C-Chain block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` You can check which chain the endpoint serves with `eth_chainId`. The result is `0xa86a` — 43114, the Avalanche C-Chain mainnet chain ID: ```bash curl https://edge.erpc.global/ava?api-key= --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_chainId" }' ``` The same endpoint also serves the native Avalanche APIs. The upstream API is selected by the exact method name, so X-Chain (`avm.*`) and P-Chain (`platform.*`) calls need no extra path or host: ```bash curl https://edge.erpc.global/ava?api-key= --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"platform.getHeight", "params":{} }' ``` ### 3. Subscribe over WebSocket The WebSocket endpoint accepts standard C-Chain `eth_subscribe` subscriptions: ```bash wscat -c "wss://edge.erpc.global/ava?api-key=" # After connected, send: {"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]} ``` For the available subscription types, refer to the official Avalanche C-Chain documentation linked below. ### 4. Batch Requests You can send up to 256 JSON-RPC calls in a single HTTP request for C-Chain EVM methods. Each call in a batch is metered as its own call. ```bash curl https://edge.erpc.global/ava?api-key= --header 'Content-Type: application/json' --data '[ {"jsonrpc":"2.0","id":1,"method":"eth_blockNumber"}, {"jsonrpc":"2.0","id":2,"method":"eth_gasPrice"} ]' ``` ### Next Steps - Endpoints, metering, and status codes: [Avalanche RPC Endpoint Documentation](https://erpc.global/en/doc/avalanche-rpc/general/) - Full method list with request and response shapes: [Avalanche RPC API Reference](https://erpc.global/en/api-doc/avalanche/) - Official Avalanche C-Chain documentation: [https://build.avax.network/docs/rpcs/c-chain](https://build.avax.network/docs/rpcs/c-chain) --- title: "Avalanche RPC Endpoint Documentation" description: "Use ERPC as a low-latency Avalanche RPC endpoint for HTTP JSON-RPC requests and WebSocket subscriptions." canonical: "https://erpc.global/en/doc/avalanche-rpc/general/" locale: "en" --- # Avalanche RPC Endpoint Documentation ## Avalanche RPC Endpoint Documentation Use ERPC as your Avalanche RPC endpoint for HTTP JSON-RPC requests and WebSocket subscriptions. Avalanche RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana and Ethereum. Please add your API key to the 'api-key' parameter. ### Endpoints Send JSON-RPC 2.0 requests as HTTP POST to: ```text https://edge.erpc.global/ava?api-key= ``` For subscriptions, connect over WebSocket to: ```text wss://edge.erpc.global/ava?api-key= ``` The upstream API is selected by the exact JSON-RPC method name, so C-Chain, X-Chain, and P-Chain calls all go to the same endpoint. ### Examples Here is an HTTP request example. ```bash curl https://edge.erpc.global/ava?api-key= --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` Here is a WebSocket subscription example. ```bash wscat -c "wss://edge.erpc.global/ava?api-key=" # After connected, send: {"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]} ``` You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests JSON-RPC batches of up to 256 calls per HTTP request are supported for C-Chain EVM methods, and JSON-RPC notifications are also accepted. The native Avalanche namespaces — `avax.*`, `avm.*`, `platform.*`, `proposervm.*`, and `info.upgrades` — are single-call. Each call in a batch is metered as its own call. ### Usage Metering Each call uses a fixed number of tokens set by its method. A call inside an HTTP batch and a call sent over a WebSocket connection each count once. On WebSocket, each subscription notification you receive also uses tokens. The [API Usage](https://dashboard.erpc.global/en/user/api-usage) page of the dashboard shows each token as one credit. Calls over HTTP and WebSocket use these tokens per call: | Method | Tokens per call | | --- | --- | | The 81 methods listed below | 42 | | The 50 methods listed below | 81 | | `eth_getLogs`, `eth_getFilterLogs`, `eth_sendRawTransaction`, `txpool_status`, `debug_traceCallMany` | 84 | | `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction` | 162 | | `txpool_content` | 168 | | Any method not in the rows above | 81, 84, 168 or 324 | When you estimate, count a method in the "81, 84, 168 or 324" row as 324, the highest of the four values. These methods use 42 tokens per call: - `eth_*` (32): `eth_baseFee`, `eth_blockNumber`, `eth_call`, `eth_chainId`, `eth_estimateGas`, `eth_gasPrice`, `eth_getAssetBalance`, `eth_getBalance`, `eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getBlockReceipts`, `eth_getBlockTransactionCountByHash`, `eth_getBlockTransactionCountByNumber`, `eth_getCode`, `eth_getFilterChanges`, `eth_getStorageAt`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionByHash`, `eth_getTransactionCount`, `eth_getTransactionReceipt`, `eth_getUncleCountByBlockHash`, `eth_getUncleCountByBlockNumber`, `eth_maxPriorityFeePerGas`, `eth_newBlockFilter`, `eth_newFilter`, `eth_newPendingTransactionFilter`, `eth_signTransaction`, `eth_subscribe`, `eth_syncing`, `eth_uninstallFilter`, `eth_unsubscribe` - `net_*` (3): `net_listening`, `net_peerCount`, `net_version` - `web3_*` (2): `web3_clientVersion`, `web3_sha3` - `avax.*` (4): `avax.getAtomicTx`, `avax.getAtomicTxStatus`, `avax.getUTXOs`, `avax.issueTx` - `avm.*` (11): `avm.buildGenesis`, `avm.getAllBalances`, `avm.getAssetDescription`, `avm.getBalance`, `avm.getBlockByHeight`, `avm.getHeight`, `avm.getTx`, `avm.getTxFee`, `avm.getTxStatus`, `avm.getUTXOs`, `avm.issueTx` - `platform.*` (26): `platform.getAllValidatorsAt`, `platform.getBalance`, `platform.getBlockchainStatus`, `platform.getBlockchains`, `platform.getCurrentSupply`, `platform.getCurrentValidators`, `platform.getFeeConfig`, `platform.getFeeState`, `platform.getHeight`, `platform.getMinStake`, `platform.getRewardUTXOs`, `platform.getStake`, `platform.getStakingAssetID`, `platform.getSubnets`, `platform.getTimestamp`, `platform.getTotalStake`, `platform.getTx`, `platform.getTxStatus`, `platform.getUTXOs`, `platform.getValidatorFeeConfig`, `platform.getValidatorFeeState`, `platform.getValidatorsAt`, `platform.issueTx`, `platform.sampleValidators`, `platform.validatedBy`, `platform.validates` - `proposervm.*` (2): `proposervm.getCurrentEpoch`, `proposervm.getProposedHeight` - `info.*` (1): `info.upgrades` These methods use 81 tokens per call: - `eth_*` (5): `eth_accounts`, `eth_createAccessList`, `eth_feeHistory`, `eth_getProof`, `eth_getRawTransactionByHash` - `avax.*` (6): `avax.export`, `avax.exportAVAX`, `avax.exportKey`, `avax.import`, `avax.importAVAX`, `avax.importKey` - `avm.*` (16): `avm.createAddress`, `avm.createFixedCapAsset`, `avm.createNFTAsset`, `avm.createVariableCapAsset`, `avm.export`, `avm.exportKey`, `avm.getAddressTxs`, `avm.getBlock`, `avm.import`, `avm.importKey`, `avm.listAddresses`, `avm.mint`, `avm.mintNFT`, `avm.send`, `avm.sendMultiple`, `avm.sendNFT` - `platform.*` (14): `platform.addDelegator`, `platform.addSubnetValidator`, `platform.addValidator`, `platform.createAddress`, `platform.createBlockchain`, `platform.createSubnet`, `platform.exportAVAX`, `platform.exportKey`, `platform.getBlock`, `platform.getMaxStakeAmount`, `platform.getPendingValidators`, `platform.importAVAX`, `platform.importKey`, `platform.listAddresses` - `info.*` (3): `info.getBlockchainID`, `info.getNetworkID`, `info.getTxFee` - `index.*` (6): `index.getContainerByID`, `index.getContainerByIndex`, `index.getContainerRange`, `index.getIndex`, `index.getLastAccepted`, `index.isAccepted` Each subscription notification you receive over WebSocket (`wss://edge.erpc.global/ava`) uses 42 tokens. A subscription notification is an `eth_subscription` message the server sends after you subscribe with `eth_subscribe`. Each message you send over the connection that cannot be read as a JSON-RPC call also uses 42 tokens. You can check the current per-call token rate in the [Avalanche RPC API Reference](https://erpc.global/en/api-doc/avalanche/). ### Supported Methods The endpoint covers the C-Chain EVM JSON-RPC method families — `eth_*`, `net_*`, `txpool_*`, and `web3_*` — including account and block reads (`eth_getBalance`, `eth_getBlockByNumber`, `eth_getLogs`), transaction flow (`eth_sendRawTransaction`, `eth_getTransactionReceipt`), fee data (`eth_gasPrice`, `eth_maxPriorityFeePerGas`), call simulation (`eth_call`, `eth_estimateGas`), filters (`eth_newFilter`, `eth_getFilterChanges`), txpool inspection (`txpool_status`, `txpool_content`), the C-Chain extensions (`eth_getAssetBalance`, `eth_baseFee`), and WebSocket subscriptions (`eth_subscribe`, `eth_unsubscribe`). The native Avalanche APIs are served from the same endpoint: C-Chain atomic operations (`avax.getAtomicTx`, `avax.getUTXOs`, `avax.issueTx`), the X-Chain (`avm.getBalance`, `avm.getTx`, `avm.issueTx`), the P-Chain (`platform.getCurrentValidators`, `platform.getStake`, `platform.getHeight`, `platform.issueTx`, `proposervm.getProposedHeight`), and network upgrade timings (`info.upgrades`). For the complete method list with request and response shapes, see the [Avalanche RPC API Reference](https://erpc.global/en/api-doc/avalanche/). ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Upstream JSON-RPC response. | | 400 | Missing API key, or an invalid JSON-RPC request. | | 401 | Unauthorized API key. | | 429 | Rate limited. The `retry-after` header gives the wait in seconds. | | 502 | The upstream RPC request could not be completed. | | 503 | The service is temporarily unavailable. | A JSON-RPC method outside the published catalog is answered with HTTP `400` and JSON-RPC error `-32601` (Method not found), and a batch above 256 calls is answered with HTTP `400`. WebSocket connections use `101` (protocol upgrade accepted) and `426` (a WebSocket Upgrade handshake is required) in addition to the codes above. ### Avalanche RPC Methods and Documentation For the full list of standard methods, parameters, and subscription specifications, please refer to the official documentation. It covers both HTTP and WebSocket usage. - C-Chain (EVM JSON-RPC): [https://build.avax.network/docs/rpcs/c-chain](https://build.avax.network/docs/rpcs/c-chain) - X-Chain (`avm.*`): [https://build.avax.network/docs/rpcs/x-chain](https://build.avax.network/docs/rpcs/x-chain) - P-Chain (`platform.*`): [https://build.avax.network/docs/rpcs/p-chain](https://build.avax.network/docs/rpcs/p-chain) --- title: "Arbitrum RPC Quickstart" description: "Get an API key and make your first Arbitrum JSON-RPC request over HTTP with ERPC." canonical: "https://erpc.global/en/doc/arbitrum-rpc/quickstart/" locale: "en" --- # Arbitrum RPC Quickstart ## Arbitrum RPC Quickstart This guide takes you from zero to your first Arbitrum JSON-RPC response with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key. ### 2. Make Your First Request Send a JSON-RPC 2.0 request as an HTTP POST, with your API key in the `api-key` parameter: ```bash curl 'https://edge.erpc.global/arbitrum?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` The response returns the latest block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` On the Free plan, your account can send one request per 10 seconds, and a request to another chain can also count toward this limit. Wait 10 seconds before sending the next request. You can check which chain the endpoint serves with `eth_chainId`: ```bash curl 'https://edge.erpc.global/arbitrum?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_chainId" }' ``` You can also send your API key as `Authorization: Bearer `. When both are present, the query parameter is used. ### 3. Batch Requests You can send 1 to 100 JSON-RPC calls in a single HTTP request. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. On the Free plan, send one call per request: a request with two or more calls is answered with HTTP `429`. ### Next Steps - Endpoints, metering, and status codes: [Arbitrum RPC Endpoint Documentation](https://erpc.global/en/doc/arbitrum-rpc/general/) - Official Arbitrum documentation: [https://docs.arbitrum.io/arbitrum-essentials/reference/node-providers](https://docs.arbitrum.io/arbitrum-essentials/reference/node-providers) --- title: "Arbitrum RPC Endpoint Documentation" description: "Use ERPC as your Arbitrum RPC endpoint for HTTP JSON-RPC requests." canonical: "https://erpc.global/en/doc/arbitrum-rpc/general/" locale: "en" --- # Arbitrum RPC Endpoint Documentation ## Arbitrum RPC Endpoint Documentation Use ERPC as your Arbitrum RPC endpoint for HTTP JSON-RPC requests. Arbitrum RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana, Ethereum, and Avalanche. Pass your API key in the `api-key` query parameter, or send it as `Authorization: Bearer `. When both are present, the query parameter is used. ### Endpoints Send JSON-RPC 2.0 requests as HTTP POST to: ```text https://edge.erpc.global/arbitrum?api-key= ``` or the dedicated host: ```text https://arbitrum.erpc.global?api-key= ``` Requests are accepted at `/` only. ### Examples Here is an HTTP request example with the API key in the query parameter. ```bash curl 'https://edge.erpc.global/arbitrum?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` Here is the same request with the API key in the `Authorization` header. ```bash curl 'https://edge.erpc.global/arbitrum' --header 'Content-Type: application/json' --header 'Authorization: Bearer ' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests JSON-RPC batches of 1 to 100 calls per HTTP request are supported. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. The request body can be up to 1 MiB. ### Usage Metering Usage is metered in tokens, and the token rate can differ by method. Each call in an HTTP batch is metered separately. ### Free Plan Limits On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP `429`, and the `retry-after` header gives the wait in seconds. On the Free plan, a request that carries two or more JSON-RPC calls is answered with HTTP `429`, and none of its calls is sent: each call gets a JSON-RPC error with code `-32041`. Send these calls one at a time instead. ### Supported Methods The endpoint serves these 35 methods, grouped by namespace. - `eth_*` (24): `eth_blockNumber`, `eth_call`, `eth_chainId`, `eth_estimateGas`, `eth_feeHistory`, `eth_gasPrice`, `eth_getBalance`, `eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getBlockReceipts`, `eth_getBlockTransactionCountByHash`, `eth_getBlockTransactionCountByNumber`, `eth_getCode`, `eth_getLogs`, `eth_getProof`, `eth_getStorageAt`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionByHash`, `eth_getTransactionCount`, `eth_getTransactionReceipt`, `eth_maxPriorityFeePerGas`, `eth_sendRawTransaction`, `eth_syncing` - `net_*` (3): `net_listening`, `net_peerCount`, `net_version` - `web3_*` (2): `web3_clientVersion`, `web3_sha3` - `trace_*` (2): `trace_block`, `trace_transaction` - `debug_*` (4): `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction` A method or path that is not listed is answered with HTTP `400`. ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Upstream JSON-RPC response. A JSON-RPC error is also returned with HTTP `200`: it keeps the request `id` and `error.code`, its `error.message` is `ERPC upstream error`, and `error.data` is not returned. | | 400 | A method or path outside the Supported Methods list, an invalid JSON-RPC request, an empty batch or a batch over 100 calls, a duplicate `id` in a batch, or a body over 1 MiB. | | 401 | Missing or invalid API key, or an IP or Origin restriction on the key is not met. | | 405 | A request method other than POST. | | 426 | A WebSocket Upgrade was requested. The endpoint is HTTP only. | | 429 | Rate limited, including the Free plan limits above: more than one request per 10 seconds, or two or more calls in one request. If a `retry-after` header is present, wait that many seconds. | | 502 | The upstream request could not be completed: a failed upstream response, a response over 8 MiB, or no answer within 30 seconds. | | 503 | The service is temporarily unavailable. | ### Arbitrum RPC Methods and Documentation For the full list of standard methods, parameters, and specifications, please refer to the official documentation. [https://docs.arbitrum.io/arbitrum-essentials/reference/node-providers](https://docs.arbitrum.io/arbitrum-essentials/reference/node-providers) --- title: "Base RPC Quickstart" description: "Get an API key, make your first Base JSON-RPC request over HTTP, and subscribe to events over WebSocket with ERPC." canonical: "https://erpc.global/en/doc/base-rpc/quickstart/" locale: "en" --- # Base RPC Quickstart ## Base RPC Quickstart This guide takes you from zero to your first Base JSON-RPC response with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key. ### 2. Make Your First Request Send a JSON-RPC 2.0 request as an HTTP POST, with your API key in the `api-key` parameter: ```bash curl 'https://edge.erpc.global/base?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` The response returns the latest block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` On the Free plan, your account can send one request per 10 seconds, and a request to another chain can also count toward this limit. Wait 10 seconds before sending the next request. You can check which chain the endpoint serves with `eth_chainId`: ```bash curl 'https://edge.erpc.global/base?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_chainId" }' ``` ### 3. Subscribe over WebSocket For subscriptions, connect over WebSocket to: ```text wss://edge.erpc.global/base?api-key= ``` For the available subscription types, refer to the official Base documentation linked below. On the Free plan, WebSocket connections are not available and are answered with HTTP `403`. ### 4. Batch Requests You can send up to 256 JSON-RPC calls in a single HTTP request. Each call in a batch is metered as its own call. On the Free plan, send one call per request: a request with two or more calls is answered with HTTP `429`. ### Next Steps - Endpoints, metering, and status codes: [Base RPC Endpoint Documentation](https://erpc.global/en/doc/base-rpc/general/) - Official Base documentation: [https://docs.base.org/get-started/connect-to-base](https://docs.base.org/get-started/connect-to-base) --- title: "Base RPC Endpoint Documentation" description: "Use ERPC as your Base RPC endpoint for HTTP JSON-RPC requests and WebSocket subscriptions, with the tokens each method uses and worked examples." canonical: "https://erpc.global/en/doc/base-rpc/general/" locale: "en" --- # Base RPC Endpoint Documentation ## Base RPC Endpoint Documentation Use ERPC as your Base RPC endpoint for HTTP JSON-RPC requests and WebSocket subscriptions. Base RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana, Ethereum, and Avalanche. Please add your API key to the `api-key` parameter. ### Endpoints Send JSON-RPC 2.0 requests as HTTP POST to: ```text https://edge.erpc.global/base?api-key= ``` For subscriptions, connect over WebSocket to: ```text wss://edge.erpc.global/base?api-key= ``` The shared host `edge.erpc.global` accepts Base RPC requests at `/base` and `/base/`. The existing host `base.erpc.global` remains available at `/`, and you can connect to both hosts with the same RPC key. ### Examples Here is an HTTP request example. ```bash curl 'https://edge.erpc.global/base?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests JSON-RPC batches of up to 256 calls per HTTP request are supported. Each call in a batch is metered as its own call. ### Usage Metering Each call uses a fixed number of tokens set by its method. A call inside an HTTP batch and a call sent over a WebSocket connection each count once. On WebSocket, each connection and each subscription notification you receive also use tokens. The [API Usage](https://dashboard.erpc.global/en/user/api-usage) page of the dashboard shows each token as one credit. Calls over HTTP and WebSocket use these tokens per call: | Method | Tokens per call | | --- | --- | | The 49 methods listed below | 81 | | `eth_getLogs`, `eth_getFilterLogs`, `eth_callMany`, `eth_simulateV1`, `eth_sendRawTransactionSync`, `debug_getRawHeader`, `debug_getRawReceipts`, `debug_traceCall`, `trace_block`, `trace_call`, `trace_filter`, `trace_rawTransaction`, `trace_transaction` | 84 | | `eth_sendRawTransaction`, `debug_getBadBlocks`, `debug_storageRangeAt`, `debug_traceBlock`, `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceTransaction` | 162 | | `trace_callMany`, `trace_replayBlockTransactions`, `trace_replayTransaction` | 168 | | Any method not in the rows above | 81 or 324 | When you estimate, count a method in the "81 or 324" row as 324, the higher of the two values. These methods use 81 tokens per call: - `eth_*` (38): `eth_accounts`, `eth_blockNumber`, `eth_call`, `eth_chainId`, `eth_createAccessList`, `eth_estimateGas`, `eth_feeHistory`, `eth_gasPrice`, `eth_getBalance`, `eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getBlockReceipts`, `eth_getBlockTransactionCountByHash`, `eth_getBlockTransactionCountByNumber`, `eth_getCode`, `eth_getFilterChanges`, `eth_getProof`, `eth_getRawTransactionByHash`, `eth_getStorageAt`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionByHash`, `eth_getTransactionCount`, `eth_getTransactionReceipt`, `eth_getUncleCountByBlockHash`, `eth_getUncleCountByBlockNumber`, `eth_hashrate`, `eth_maxPriorityFeePerGas`, `eth_mining`, `eth_newBlockFilter`, `eth_newFilter`, `eth_newPendingTransactionFilter`, `eth_signTransaction`, `eth_submitWork`, `eth_subscribe`, `eth_syncing`, `eth_uninstallFilter`, `eth_unsubscribe` - `net_*` (3): `net_listening`, `net_peerCount`, `net_version` - `web3_*` (2): `web3_clientVersion`, `web3_sha3` - `optimism_*` (4): `optimism_outputAtBlock`, `optimism_rollupConfig`, `optimism_syncStatus`, `optimism_version` - `base_*` (2): `base_sendRawTransactionValidity`, `base_transactionStatus` The Base endpoint does not limit which methods you can send, so you can also call methods that are not listed. Whether such a method uses 81 or 324 tokens per call depends on the method. For the methods you called this calendar month (UTC), the Current rate column on the API Usage page shows the actual rate per call. Every call that ERPC accepts is counted, even if its response is an error, including one with HTTP status `400` or `429`, or if the request ends with HTTP `502`. A request that ERPC refuses before accepting it is not counted, for example HTTP `400` (a missing API key, an invalid JSON-RPC request, or a batch of more than 256 calls), `401`, and `429` returned by ERPC when a request goes over your plan's limits. On WebSocket (`wss://edge.erpc.global/base`), tokens are counted as follows: | What is counted | Tokens | | --- | --- | | Each connection, once it opens | 10 | | Each call you send over the connection, including `eth_subscribe` and `eth_unsubscribe` | Same as the table above (`eth_subscribe` is 81) | | Each subscription notification you receive | 81 | | Each message you send over the connection that cannot be read as a JSON-RPC call | 81 | | Replies to your calls, including the subscription ID returned by `eth_subscribe` | 0 | A subscription notification is an `eth_subscription` message the server sends after you subscribe with `eth_subscribe`. If one message carries several notifications, each one counts. The API Usage page shows the number of notifications in the `eth_subscription` row. Notifications are counted as they arrive, so one the server sent before it handled your `eth_unsubscribe` still counts if it arrives after the call. Once the connection is closed, no further notifications are counted. A WebSocket message is also counted when ERPC accepts it, so it counts even if no response comes back. A connection that does not open (HTTP `403` on the Free plan, or `502` when the connection cannot be completed) and a message refused by the per-minute limit are not counted. Ping and pong control frames are not counted. A ping your app sends as a text message is counted: as a message that cannot be read as a JSON-RPC call (81), or, if it is a JSON-RPC call such as `{"jsonrpc":"2.0","method":"ping"}`, by its method name; `ping` is not in the list and uses 324. How many notifications arrive depends on the subscription. Base produces a block every 0.2 seconds ([Base documentation](https://docs.base.org/base-chain/network-information/block-building)), so a `newHeads` subscription receives 5 notifications per second, or 432,000 per day. A `logs` subscription receives one notification for each log that matches its `address` and `topics` filter. WebSocket is not available on the Free plan (see Free Plan Limits below). To estimate the tokens you use in a day or a month, add up these four: - Calls × the tokens of each method, over HTTP and WebSocket - WebSocket connections × 10 - Notifications received × 81 - Messages you send over WebSocket that cannot be read as a JSON-RPC call × 81 Here are examples for one day. | One day of usage | Tokens | Calculation | | --- | ---: | --- | | 1,000,000 `eth_call` calls over HTTP | 81,000,000 | 1,000,000 × 81 | | 10,000 `eth_sendRawTransaction` calls over HTTP | 1,620,000 | 10,000 × 162 | | One `newHeads` subscription for a day (1 connection, 1 `eth_subscribe`, 432,000 notifications) | 34,992,091 | 10 + 81 + 432,000 × 81 | | One `logs` subscription for a day (1 connection, 1 `eth_subscribe`, 10,000 matching logs) | 810,091 | 10 + 81 + 10,000 × 81 | | `eth_blockNumber` over HTTP every 10 seconds (8,640 calls) | 699,840 | 8,640 × 81 | Kept open for 30 days, a `newHeads` subscription receives 12,960,000 notifications, which use 1,049,760,000 tokens on their own. Each reconnect adds 10 for the connection and 81 for `eth_subscribe`. If you do not need every block, reading the value over HTTP only when you need it uses fewer tokens. Polling `eth_blockNumber` every 10 seconds uses 699,840 tokens a day, about 1/50 of the 34,992,091 that a `newHeads` subscription uses. You can find the tokens included in each plan on the [Pricing](https://erpc.global/en/price/) page. ### Free Plan Limits On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP `429`, and the `retry-after` header gives the wait in seconds. On the Free plan, a request that carries two or more JSON-RPC calls is answered with HTTP `429`, and none of its calls is sent: each call gets a JSON-RPC error with code `-32041`. Send these calls one at a time instead. On the Free plan, WebSocket connections are not available and are answered with HTTP `403`. ### Supported Methods Base is EVM-compatible and uses the same JSON-RPC methods as Ethereum. ERPC does not apply a fixed method allowlist to the Base endpoint. For the Ethereum method families, see the [Ethereum RPC Endpoint Documentation](https://erpc.global/en/doc/ethereum-rpc/general/). ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Upstream JSON-RPC response. | | 400 | `Missing API key`, `Invalid JSON-RPC request`, or `JSON-RPC batch exceeds 256 calls`. | | 401 | `Unauthorized API KEY`. | | 403 | A WebSocket connection on the Free plan. | | 404 | Requests to paths not supported for Base RPC. | | 429 | Rate limited, including the Free plan limits above: more than one request per 10 seconds, or two or more calls in one request. The `retry-after` header gives the wait in seconds. | | 502 | The upstream RPC request could not be completed. | | 503 | The service is temporarily unavailable. | WebSocket connections use `101` (protocol upgrade accepted) in addition to the codes above. ### Base RPC Methods and Documentation For the full list of standard methods, parameters, and specifications, please refer to the official documentation. [https://docs.base.org/get-started/connect-to-base](https://docs.base.org/get-started/connect-to-base) --- title: "Bitcoin RPC Quickstart" description: "Get an API key and make your first Bitcoin JSON-RPC request over HTTP with ERPC." canonical: "https://erpc.global/en/doc/bitcoin-rpc/quickstart/" locale: "en" --- # Bitcoin RPC Quickstart ## Bitcoin RPC Quickstart This guide takes you from zero to your first Bitcoin JSON-RPC response with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key. ### 2. Make Your First Request Send a JSON-RPC request as an HTTP POST, with your API key in the `api-key` parameter: ```bash curl 'https://edge.erpc.global/bitcoin?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"1.0","id":1, "method":"getblockcount", "params":[] }' ``` The response returns the current block count in the `result` field. Bitcoin accepts `jsonrpc` set to `1.0` or `2.0`, or omitted, and every call needs an `id`. On the Free plan, your account can send one request per 10 seconds, and a request to another chain can also count toward this limit. Wait 10 seconds before sending the next request. You can check which chain the endpoint serves with `getblockchaininfo`: ```bash curl 'https://edge.erpc.global/bitcoin?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"1.0","id":1, "method":"getblockchaininfo", "params":[] }' ``` You can also send your API key as `Authorization: Bearer `. When both are present, the query parameter is used. ### 3. Batch Requests You can send 1 to 100 JSON-RPC calls in a single HTTP request. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. On the Free plan, send one call per request: a request with two or more calls is answered with HTTP `429`. ### Next Steps - Endpoints, metering, and status codes: [Bitcoin RPC Endpoint Documentation](https://erpc.global/en/doc/bitcoin-rpc/general/) - Official Bitcoin documentation: [https://developer.bitcoin.org/reference/rpc/](https://developer.bitcoin.org/reference/rpc/) --- title: "Bitcoin RPC Endpoint Documentation" description: "Use ERPC as your Bitcoin RPC endpoint for HTTP JSON-RPC requests." canonical: "https://erpc.global/en/doc/bitcoin-rpc/general/" locale: "en" --- # Bitcoin RPC Endpoint Documentation ## Bitcoin RPC Endpoint Documentation Use ERPC as your Bitcoin RPC endpoint for HTTP JSON-RPC requests. Bitcoin RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana, Ethereum, and Avalanche. Pass your API key in the `api-key` query parameter, or send it as `Authorization: Bearer `. When both are present, the query parameter is used. ### Endpoints Send JSON-RPC requests as HTTP POST to: ```text https://edge.erpc.global/bitcoin?api-key= ``` or the dedicated host: ```text https://bitcoin.erpc.global?api-key= ``` Requests are accepted at `/` only. ### Examples Here is an HTTP request example with the API key in the query parameter. ```bash curl 'https://edge.erpc.global/bitcoin?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"1.0","id":1, "method":"getblockcount", "params":[] }' ``` Here is the same request with the API key in the `Authorization` header. ```bash curl 'https://edge.erpc.global/bitcoin' --header 'Content-Type: application/json' --header 'Authorization: Bearer ' --data '{ "jsonrpc":"1.0","id":1, "method":"getblockcount", "params":[] }' ``` Bitcoin accepts `jsonrpc` set to `1.0` or `2.0`, or omitted, and every call needs an `id`. You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests JSON-RPC batches of 1 to 100 calls per HTTP request are supported. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. The request body can be up to 1 MiB. ### Usage Metering Usage is metered in tokens, and the token rate can differ by method. Each call in an HTTP batch is metered separately. ### Free Plan Limits On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP `429`, and the `retry-after` header gives the wait in seconds. On the Free plan, a request that carries two or more JSON-RPC calls is answered with HTTP `429`, and none of its calls is sent: each call gets a JSON-RPC error with code `-32041`. Send these calls one at a time instead. ### Supported Methods The endpoint serves these 32 Bitcoin Core JSON-RPC methods. `decoderawtransaction`, `decodescript`, `estimatesmartfee`, `getbestblockhash`, `getblock`, `getblockchaininfo`, `getblockcount`, `getblockfilter`, `getblockhash`, `getblockheader`, `getblockstats`, `getchaintips`, `getchaintxstats`, `getconnectioncount`, `getdifficulty`, `getmempoolancestors`, `getmempooldescendants`, `getmempoolinfo`, `getmininginfo`, `getnetworkinfo`, `getrawmempool`, `getrawtransaction`, `gettransaction`, `gettxout`, `gettxoutproof`, `gettxoutsetinfo`, `sendrawtransaction`, `testmempoolaccept`, `validateaddress`, `verifychain`, `verifymessage`, `verifytxoutproof` A method that is not listed is answered with HTTP `400`. ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Upstream JSON-RPC response. A JSON-RPC error is also returned with HTTP `200`: it keeps the request `id` and `error.code`, its `error.message` is `ERPC upstream error`, and `error.data` is not returned. | | 400 | A method or path outside the Supported Methods list, an invalid JSON-RPC request, an empty batch or a batch over 100 calls, a duplicate `id` in a batch, or a body over 1 MiB. | | 401 | Missing or invalid API key, or an IP or Origin restriction on the key is not met. | | 405 | A request method other than POST. | | 426 | A WebSocket Upgrade was requested. The endpoint is HTTP only. | | 429 | Rate limited, including the Free plan limits above: more than one request per 10 seconds, or two or more calls in one request. If a `retry-after` header is present, wait that many seconds. | | 502 | The upstream request could not be completed: a failed upstream response, a response over 8 MiB, or no answer within 30 seconds. | | 503 | The service is temporarily unavailable. | ### Bitcoin RPC Methods and Documentation For the full list of standard methods, parameters, and specifications, please refer to the official documentation. [https://developer.bitcoin.org/reference/rpc/](https://developer.bitcoin.org/reference/rpc/) --- title: "Hyperliquid RPC Quickstart" description: "Get an API key and make your first Hyperliquid JSON-RPC request over HTTP with ERPC." canonical: "https://erpc.global/en/doc/hyperliquid-rpc/quickstart/" locale: "en" --- # Hyperliquid RPC Quickstart ## Hyperliquid RPC Quickstart This guide takes you from zero to your first Hyperliquid JSON-RPC response with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key. ### 2. Make Your First Request Send a JSON-RPC 2.0 request as an HTTP POST, with your API key in the `api-key` parameter: ```bash curl 'https://edge.erpc.global/hyperliquid/evm?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` The response returns the latest block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` This request goes to `/hyperliquid/evm`. The bare `/hyperliquid` path is the same as `/hyperliquid/evm`, and `/hyperliquid/nanoreth` is also accepted. On the Free plan, your account can send one request per 10 seconds, and a request to another chain can also count toward this limit. Wait 10 seconds before sending the next request. You can check which chain the endpoint serves with `eth_chainId`: ```bash curl 'https://edge.erpc.global/hyperliquid/evm?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_chainId" }' ``` You can also send your API key as `Authorization: Bearer `. When both are present, the query parameter is used. ### 3. Batch Requests You can send 1 to 100 JSON-RPC calls in a single HTTP request. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. On the Free plan, send one call per request: a request with two or more calls is answered with HTTP `429`. ### Next Steps - Endpoints, metering, and status codes: [Hyperliquid RPC Endpoint Documentation](https://erpc.global/en/doc/hyperliquid-rpc/general/) - Official Hyperliquid documentation: [https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/hyperevm](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/hyperevm) --- title: "Hyperliquid RPC Endpoint Documentation" description: "Use ERPC as your Hyperliquid RPC endpoint for HTTP JSON-RPC requests." canonical: "https://erpc.global/en/doc/hyperliquid-rpc/general/" locale: "en" --- # Hyperliquid RPC Endpoint Documentation ## Hyperliquid RPC Endpoint Documentation Use ERPC as your Hyperliquid RPC endpoint for HTTP JSON-RPC requests. Hyperliquid RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana, Ethereum, and Avalanche. Pass your API key in the `api-key` query parameter, or send it as `Authorization: Bearer `. When both are present, the query parameter is used. ### Endpoints Send JSON-RPC 2.0 requests as HTTP POST to: ```text https://edge.erpc.global/hyperliquid?api-key= ``` or the dedicated host: ```text https://hyperliquid.erpc.global?api-key= ``` On the dedicated host, `/` and `/evm` reach the same endpoint, and `/nanoreth` is also accepted. On `edge.erpc.global`, the same paths follow the `/hyperliquid` prefix: `/hyperliquid`, `/hyperliquid/evm`, and `/hyperliquid/nanoreth`. Other paths are answered with HTTP `400`. ### Examples Here is an HTTP request example with the API key in the query parameter. ```bash curl 'https://edge.erpc.global/hyperliquid?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` Here is the same request with the API key in the `Authorization` header. ```bash curl 'https://edge.erpc.global/hyperliquid' --header 'Content-Type: application/json' --header 'Authorization: Bearer ' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests JSON-RPC batches of 1 to 100 calls per HTTP request are supported. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. The request body can be up to 1 MiB. ### Usage Metering Usage is metered in tokens, and the token rate can differ by method. Each call in an HTTP batch is metered separately. ### Free Plan Limits On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP `429`, and the `retry-after` header gives the wait in seconds. On the Free plan, a request that carries two or more JSON-RPC calls is answered with HTTP `429`, and none of its calls is sent: each call gets a JSON-RPC error with code `-32041`. Send these calls one at a time instead. ### Supported Methods The endpoint serves these 38 methods, grouped by namespace. - `net_*` (3): `net_listening`, `net_peerCount`, `net_version` - `web3_*` (2): `web3_clientVersion`, `web3_sha3` - `eth_*` (24): `eth_blockNumber`, `eth_call`, `eth_chainId`, `eth_estimateGas`, `eth_feeHistory`, `eth_gasPrice`, `eth_getBalance`, `eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getBlockReceipts`, `eth_getBlockTransactionCountByHash`, `eth_getBlockTransactionCountByNumber`, `eth_getCode`, `eth_getLogs`, `eth_getProof`, `eth_getStorageAt`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionByHash`, `eth_getTransactionCount`, `eth_getTransactionReceipt`, `eth_maxPriorityFeePerGas`, `eth_sendRawTransaction`, `eth_syncing` - `debug_*` (4): `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction` - `trace_*` (2): `trace_block`, `trace_transaction` - `hl_*` (3): `hl_getBlock`, `hl_getLatestBlockNumber`, `hl_portfolioState` A method or path that is not listed is answered with HTTP `400`. ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Upstream JSON-RPC response. A JSON-RPC error is also returned with HTTP `200`: it keeps the request `id` and `error.code`, its `error.message` is `ERPC upstream error`, and `error.data` is not returned. | | 400 | A method or path outside the Supported Methods list, an invalid JSON-RPC request, an empty batch or a batch over 100 calls, a duplicate `id` in a batch, or a body over 1 MiB. | | 401 | Missing or invalid API key, or an IP or Origin restriction on the key is not met. | | 405 | A request method other than POST. | | 426 | A WebSocket Upgrade was requested. The endpoint is HTTP only. | | 429 | Rate limited, including the Free plan limits above: more than one request per 10 seconds, or two or more calls in one request. If a `retry-after` header is present, wait that many seconds. | | 502 | The upstream request could not be completed: a failed upstream response, a response over 8 MiB, or no answer within 30 seconds. | | 503 | The service is temporarily unavailable. | ### Hyperliquid RPC Methods and Documentation For the full list of standard methods, parameters, and specifications, please refer to the official documentation. [https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/hyperevm](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/hyperevm) --- title: "Kaia RPC Quickstart" description: "Get an API key and make your first Kaia JSON-RPC request over HTTP with ERPC." canonical: "https://erpc.global/en/doc/kaia-rpc/quickstart/" locale: "en" --- # Kaia RPC Quickstart ## Kaia RPC Quickstart This guide takes you from zero to your first Kaia JSON-RPC response with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key. ### 2. Make Your First Request Send a JSON-RPC 2.0 request as an HTTP POST, with your API key in the `api-key` parameter: ```bash curl 'https://edge.erpc.global/kaia?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` The response returns the latest block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` On the Free plan, your account can send one request per 10 seconds, and a request to another chain can also count toward this limit. Wait 10 seconds before sending the next request. You can check which chain the endpoint serves with `eth_chainId`: ```bash curl 'https://edge.erpc.global/kaia?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_chainId" }' ``` You can also send your API key as `Authorization: Bearer `. When both are present, the query parameter is used. ### 3. Batch Requests You can send 1 to 100 JSON-RPC calls in a single HTTP request. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. On the Free plan, send one call per request: a request with two or more calls is answered with HTTP `429`. ### Next Steps - Endpoints, metering, and status codes: [Kaia RPC Endpoint Documentation](https://erpc.global/en/doc/kaia-rpc/general/) - Official Kaia documentation: [https://docs.kaia.io/references/json-rpc/](https://docs.kaia.io/references/json-rpc/) --- title: "Kaia RPC Endpoint Documentation" description: "Use ERPC as your Kaia RPC endpoint for HTTP JSON-RPC requests." canonical: "https://erpc.global/en/doc/kaia-rpc/general/" locale: "en" --- # Kaia RPC Endpoint Documentation ## Kaia RPC Endpoint Documentation Use ERPC as your Kaia RPC endpoint for HTTP JSON-RPC requests. Kaia RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana, Ethereum, and Avalanche. Pass your API key in the `api-key` query parameter, or send it as `Authorization: Bearer `. When both are present, the query parameter is used. ### Endpoints Send JSON-RPC 2.0 requests as HTTP POST to: ```text https://edge.erpc.global/kaia?api-key= ``` or the dedicated host: ```text https://kaia.erpc.global?api-key= ``` Requests are accepted at `/` only. ### Examples Here is an HTTP request example with the API key in the query parameter. ```bash curl 'https://edge.erpc.global/kaia?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` Here is the same request with the API key in the `Authorization` header. ```bash curl 'https://edge.erpc.global/kaia' --header 'Content-Type: application/json' --header 'Authorization: Bearer ' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests JSON-RPC batches of 1 to 100 calls per HTTP request are supported. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. The request body can be up to 1 MiB. ### Usage Metering Usage is metered in tokens, and the token rate can differ by method. Each call in an HTTP batch is metered separately. ### Free Plan Limits On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP `429`, and the `retry-after` header gives the wait in seconds. On the Free plan, a request that carries two or more JSON-RPC calls is answered with HTTP `429`, and none of its calls is sent: each call gets a JSON-RPC error with code `-32041`. Send these calls one at a time instead. ### Supported Methods The endpoint serves these 60 methods, grouped by namespace. - `eth_*` (24): `eth_blockNumber`, `eth_call`, `eth_chainId`, `eth_estimateGas`, `eth_feeHistory`, `eth_gasPrice`, `eth_getBalance`, `eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getBlockReceipts`, `eth_getBlockTransactionCountByHash`, `eth_getBlockTransactionCountByNumber`, `eth_getCode`, `eth_getLogs`, `eth_getProof`, `eth_getStorageAt`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionByHash`, `eth_getTransactionCount`, `eth_getTransactionReceipt`, `eth_maxPriorityFeePerGas`, `eth_sendRawTransaction`, `eth_syncing` - `kaia_*` (22): `kaia_blockNumber`, `kaia_call`, `kaia_chainId`, `kaia_estimateGas`, `kaia_feeHistory`, `kaia_gasPrice`, `kaia_getBalance`, `kaia_getBlockByHash`, `kaia_getBlockByNumber`, `kaia_getBlockTransactionCountByHash`, `kaia_getBlockTransactionCountByNumber`, `kaia_getCode`, `kaia_getProof`, `kaia_getStorageAt`, `kaia_getTransactionByBlockHashAndIndex`, `kaia_getTransactionByBlockNumberAndIndex`, `kaia_getTransactionByHash`, `kaia_getTransactionCount`, `kaia_getTransactionReceipt`, `kaia_maxPriorityFeePerGas`, `kaia_sendRawTransaction`, `kaia_syncing` - `trace_*` (2): `trace_block`, `trace_transaction` - `web3_*` (2): `web3_clientVersion`, `web3_sha3` - `net_*` (3): `net_listening`, `net_peerCount`, `net_version` - `debug_*` (4): `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction` - `txpool_*` (3): `txpool_content`, `txpool_inspect`, `txpool_status` A method or path that is not listed is answered with HTTP `400`. ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Upstream JSON-RPC response. A JSON-RPC error is also returned with HTTP `200`: it keeps the request `id` and `error.code`, its `error.message` is `ERPC upstream error`, and `error.data` is not returned. | | 400 | A method or path outside the Supported Methods list, an invalid JSON-RPC request, an empty batch or a batch over 100 calls, a duplicate `id` in a batch, or a body over 1 MiB. | | 401 | Missing or invalid API key, or an IP or Origin restriction on the key is not met. | | 405 | A request method other than POST. | | 426 | A WebSocket Upgrade was requested. The endpoint is HTTP only. | | 429 | Rate limited, including the Free plan limits above: more than one request per 10 seconds, or two or more calls in one request. If a `retry-after` header is present, wait that many seconds. | | 502 | The upstream request could not be completed: a failed upstream response, a response over 8 MiB, or no answer within 30 seconds. | | 503 | The service is temporarily unavailable. | ### Kaia RPC Methods and Documentation For the full list of standard methods, parameters, and specifications, please refer to the official documentation. [https://docs.kaia.io/references/json-rpc/](https://docs.kaia.io/references/json-rpc/) --- title: "Monad RPC Quickstart" description: "Get an API key and make your first Monad JSON-RPC request over HTTP with ERPC." canonical: "https://erpc.global/en/doc/monad-rpc/quickstart/" locale: "en" --- # Monad RPC Quickstart ## Monad RPC Quickstart This guide takes you from zero to your first Monad JSON-RPC response with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key. ### 2. Make Your First Request Send a JSON-RPC 2.0 request as an HTTP POST, with your API key in the `api-key` parameter: ```bash curl 'https://edge.erpc.global/monad?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` The response returns the latest block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` On the Free plan, your account can send one request per 10 seconds, and a request to another chain can also count toward this limit. Wait 10 seconds before sending the next request. You can check which chain the endpoint serves with `eth_chainId`: ```bash curl 'https://edge.erpc.global/monad?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_chainId" }' ``` You can also send your API key as `Authorization: Bearer `. When both are present, the query parameter is used. ### 3. Batch Requests You can send 1 to 100 JSON-RPC calls in a single HTTP request. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. On the Free plan, send one call per request: a request with two or more calls is answered with HTTP `429`. ### Next Steps - Endpoints, metering, and status codes: [Monad RPC Endpoint Documentation](https://erpc.global/en/doc/monad-rpc/general/) - Official Monad documentation: [https://docs.monad.xyz/reference/json-rpc/overview](https://docs.monad.xyz/reference/json-rpc/overview) --- title: "Monad RPC Endpoint Documentation" description: "Use ERPC as your Monad RPC endpoint for HTTP JSON-RPC requests." canonical: "https://erpc.global/en/doc/monad-rpc/general/" locale: "en" --- # Monad RPC Endpoint Documentation ## Monad RPC Endpoint Documentation Use ERPC as your Monad RPC endpoint for HTTP JSON-RPC requests. Monad RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana, Ethereum, and Avalanche. Pass your API key in the `api-key` query parameter, or send it as `Authorization: Bearer `. When both are present, the query parameter is used. ### Endpoints Send JSON-RPC 2.0 requests as HTTP POST to: ```text https://edge.erpc.global/monad?api-key= ``` or the dedicated host: ```text https://monad.erpc.global?api-key= ``` Requests are accepted at `/` only. ### Examples Here is an HTTP request example with the API key in the query parameter. ```bash curl 'https://edge.erpc.global/monad?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` Here is the same request with the API key in the `Authorization` header. ```bash curl 'https://edge.erpc.global/monad' --header 'Content-Type: application/json' --header 'Authorization: Bearer ' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests JSON-RPC batches of 1 to 100 calls per HTTP request are supported. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. The request body can be up to 1 MiB. ### Usage Metering Usage is metered in tokens, and the token rate can differ by method. Each call in an HTTP batch is metered separately. ### Free Plan Limits On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP `429`, and the `retry-after` header gives the wait in seconds. On the Free plan, a request that carries two or more JSON-RPC calls is answered with HTTP `429`, and none of its calls is sent: each call gets a JSON-RPC error with code `-32041`. Send these calls one at a time instead. ### Supported Methods The endpoint serves these 34 methods, grouped by namespace. - `web3_*` (2): `web3_clientVersion`, `web3_sha3` - `txpool_*` (3): `txpool_content`, `txpool_inspect`, `txpool_status` - `eth_*` (24): `eth_blockNumber`, `eth_call`, `eth_chainId`, `eth_estimateGas`, `eth_feeHistory`, `eth_gasPrice`, `eth_getBalance`, `eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getBlockReceipts`, `eth_getBlockTransactionCountByHash`, `eth_getBlockTransactionCountByNumber`, `eth_getCode`, `eth_getLogs`, `eth_getProof`, `eth_getStorageAt`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionByHash`, `eth_getTransactionCount`, `eth_getTransactionReceipt`, `eth_maxPriorityFeePerGas`, `eth_sendRawTransaction`, `eth_syncing` - `debug_*` (4): `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction` - `net_*` (1): `net_version` A method or path that is not listed is answered with HTTP `400`. ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Upstream JSON-RPC response. A JSON-RPC error is also returned with HTTP `200`: it keeps the request `id` and `error.code`, its `error.message` is `ERPC upstream error`, and `error.data` is not returned. | | 400 | A method or path outside the Supported Methods list, an invalid JSON-RPC request, an empty batch or a batch over 100 calls, a duplicate `id` in a batch, or a body over 1 MiB. | | 401 | Missing or invalid API key, or an IP or Origin restriction on the key is not met. | | 405 | A request method other than POST. | | 426 | A WebSocket Upgrade was requested. The endpoint is HTTP only. | | 429 | Rate limited, including the Free plan limits above: more than one request per 10 seconds, or two or more calls in one request. If a `retry-after` header is present, wait that many seconds. | | 502 | The upstream request could not be completed: a failed upstream response, a response over 8 MiB, or no answer within 30 seconds. | | 503 | The service is temporarily unavailable. | ### Monad RPC Methods and Documentation For the full list of standard methods, parameters, and specifications, please refer to the official documentation. [https://docs.monad.xyz/reference/json-rpc/overview](https://docs.monad.xyz/reference/json-rpc/overview) --- title: "NEAR RPC Quickstart" description: "Get an API key and make your first NEAR JSON-RPC request over HTTP with ERPC." canonical: "https://erpc.global/en/doc/near-rpc/quickstart/" locale: "en" --- # NEAR RPC Quickstart ## NEAR RPC Quickstart This guide takes you from zero to your first NEAR JSON-RPC response with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key. ### 2. Make Your First Request Send a JSON-RPC 2.0 request as an HTTP POST, with your API key in the `api-key` parameter: ```bash curl 'https://edge.erpc.global/near?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"block", "params":{"finality":"final"} }' ``` The response returns the latest finalized block in the `result` field. On the Free plan, your account can send one request per 10 seconds, and a request to another chain can also count toward this limit. Wait 10 seconds before sending the next request. You can check the node and its chain with `status`: ```bash curl 'https://edge.erpc.global/near?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"status", "params":[] }' ``` You can also send your API key as `Authorization: Bearer `. When both are present, the query parameter is used. ### 3. Batch Requests You can send 1 to 100 JSON-RPC calls in a single HTTP request. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. On the Free plan, send one call per request: a request with two or more calls is answered with HTTP `429`. ### Next Steps - Endpoints, metering, and status codes: [NEAR RPC Endpoint Documentation](https://erpc.global/en/doc/near-rpc/general/) - Official NEAR documentation: [https://docs.near.org/api/rpc/introduction](https://docs.near.org/api/rpc/introduction) --- title: "NEAR RPC Endpoint Documentation" description: "Use ERPC as your NEAR RPC endpoint for HTTP JSON-RPC requests." canonical: "https://erpc.global/en/doc/near-rpc/general/" locale: "en" --- # NEAR RPC Endpoint Documentation ## NEAR RPC Endpoint Documentation Use ERPC as your NEAR RPC endpoint for HTTP JSON-RPC requests. NEAR RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana, Ethereum, and Avalanche. Pass your API key in the `api-key` query parameter, or send it as `Authorization: Bearer `. When both are present, the query parameter is used. ### Endpoints Send JSON-RPC 2.0 requests as HTTP POST to: ```text https://edge.erpc.global/near?api-key= ``` or the dedicated host: ```text https://near.erpc.global?api-key= ``` Requests are accepted at `/` only. ### Examples Here is an HTTP request example with the API key in the query parameter. ```bash curl 'https://edge.erpc.global/near?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"block", "params":{"finality":"final"} }' ``` Here is the same request with the API key in the `Authorization` header. ```bash curl 'https://edge.erpc.global/near' --header 'Content-Type: application/json' --header 'Authorization: Bearer ' --data '{ "jsonrpc":"2.0","id":1, "method":"block", "params":{"finality":"final"} }' ``` You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests JSON-RPC batches of 1 to 100 calls per HTTP request are supported. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. The request body can be up to 1 MiB. ### Usage Metering Usage is metered in tokens, and the token rate can differ by method. Each call in an HTTP batch is metered separately. ### Free Plan Limits On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP `429`, and the `retry-after` header gives the wait in seconds. On the Free plan, a request that carries two or more JSON-RPC calls is answered with HTTP `429`, and none of its calls is sent: each call gets a JSON-RPC error with code `-32041`. Send these calls one at a time instead. ### Supported Methods The endpoint serves these NEAR JSON-RPC methods. The `EXPERIMENTAL_` methods are sent with the uppercase prefix. - Methods (17): `EXPERIMENTAL_changes_in_block`, `EXPERIMENTAL_genesis_config`, `EXPERIMENTAL_protocol_config`, `EXPERIMENTAL_receipt`, `EXPERIMENTAL_receipt_to_tx`, `EXPERIMENTAL_tx_status`, `EXPERIMENTAL_validators_ordered`, `block`, `broadcast_tx_async`, `broadcast_tx_commit`, `chunk`, `gas_price`, `network_info`, `send_tx`, `status`, `tx`, `validators` - `query` (6 `request_type` values): `call_function`, `view_access_key`, `view_access_key_list`, `view_account`, `view_code`, `view_state` - `EXPERIMENTAL_changes` (5 `changes_type` values): `account_changes`, `all_access_key_changes`, `contract_code_changes`, `data_changes`, `single_access_key_changes` `query` and `EXPERIMENTAL_changes` must be sent with `params` as an object that carries the `request_type` or `changes_type` value above. A method that is not listed is answered with HTTP `400`. ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Upstream JSON-RPC response. A JSON-RPC error is also returned with HTTP `200`: it keeps the request `id` and `error.code`, its `error.message` is `ERPC upstream error`, and `error.data` is not returned. | | 400 | A method or path outside the Supported Methods list, an invalid JSON-RPC request, an empty batch or a batch over 100 calls, a duplicate `id` in a batch, or a body over 1 MiB. | | 401 | Missing or invalid API key, or an IP or Origin restriction on the key is not met. | | 405 | A request method other than POST. | | 426 | A WebSocket Upgrade was requested. The endpoint is HTTP only. | | 429 | Rate limited, including the Free plan limits above: more than one request per 10 seconds, or two or more calls in one request. If a `retry-after` header is present, wait that many seconds. | | 502 | The upstream request could not be completed: a failed upstream response, a response over 8 MiB, or no answer within 30 seconds. | | 503 | The service is temporarily unavailable. | ### NEAR RPC Methods and Documentation For the full list of standard methods, parameters, and specifications, please refer to the official documentation. [https://docs.near.org/api/rpc/introduction](https://docs.near.org/api/rpc/introduction) --- title: "Optimism RPC Quickstart" description: "Get an API key and make your first Optimism JSON-RPC request over HTTP with ERPC." canonical: "https://erpc.global/en/doc/optimism-rpc/quickstart/" locale: "en" --- # Optimism RPC Quickstart ## Optimism RPC Quickstart This guide takes you from zero to your first Optimism JSON-RPC response with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key. ### 2. Make Your First Request Send a JSON-RPC 2.0 request as an HTTP POST, with your API key in the `api-key` parameter: ```bash curl 'https://edge.erpc.global/optimism?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` The response returns the latest block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` On the Free plan, your account can send one request per 10 seconds, and a request to another chain can also count toward this limit. Wait 10 seconds before sending the next request. You can check which chain the endpoint serves with `eth_chainId`: ```bash curl 'https://edge.erpc.global/optimism?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_chainId" }' ``` You can also send your API key as `Authorization: Bearer `. When both are present, the query parameter is used. ### 3. Batch Requests You can send 1 to 100 JSON-RPC calls in a single HTTP request. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. On the Free plan, send one call per request: a request with two or more calls is answered with HTTP `429`. ### Next Steps - Endpoints, metering, and status codes: [Optimism RPC Endpoint Documentation](https://erpc.global/en/doc/optimism-rpc/general/) - Official Optimism documentation: [https://docs.optimism.io/](https://docs.optimism.io/) --- title: "Optimism RPC Endpoint Documentation" description: "Use ERPC as your Optimism RPC endpoint for HTTP JSON-RPC requests." canonical: "https://erpc.global/en/doc/optimism-rpc/general/" locale: "en" --- # Optimism RPC Endpoint Documentation ## Optimism RPC Endpoint Documentation Use ERPC as your Optimism RPC endpoint for HTTP JSON-RPC requests. Optimism RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana, Ethereum, and Avalanche. Pass your API key in the `api-key` query parameter, or send it as `Authorization: Bearer `. When both are present, the query parameter is used. ### Endpoints Send JSON-RPC 2.0 requests as HTTP POST to: ```text https://edge.erpc.global/optimism?api-key= ``` or the dedicated host: ```text https://optimism.erpc.global?api-key= ``` Requests are accepted at `/` only. ### Examples Here is an HTTP request example with the API key in the query parameter. ```bash curl 'https://edge.erpc.global/optimism?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` Here is the same request with the API key in the `Authorization` header. ```bash curl 'https://edge.erpc.global/optimism' --header 'Content-Type: application/json' --header 'Authorization: Bearer ' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests JSON-RPC batches of 1 to 100 calls per HTTP request are supported. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. The request body can be up to 1 MiB. ### Usage Metering Usage is metered in tokens, and the token rate can differ by method. Each call in an HTTP batch is metered separately. ### Free Plan Limits On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP `429`, and the `retry-after` header gives the wait in seconds. On the Free plan, a request that carries two or more JSON-RPC calls is answered with HTTP `429`, and none of its calls is sent: each call gets a JSON-RPC error with code `-32041`. Send these calls one at a time instead. ### Supported Methods The endpoint serves these 35 methods, grouped by namespace. - `eth_*` (24): `eth_blockNumber`, `eth_call`, `eth_chainId`, `eth_estimateGas`, `eth_feeHistory`, `eth_gasPrice`, `eth_getBalance`, `eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getBlockReceipts`, `eth_getBlockTransactionCountByHash`, `eth_getBlockTransactionCountByNumber`, `eth_getCode`, `eth_getLogs`, `eth_getProof`, `eth_getStorageAt`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionByHash`, `eth_getTransactionCount`, `eth_getTransactionReceipt`, `eth_maxPriorityFeePerGas`, `eth_sendRawTransaction`, `eth_syncing` - `net_*` (3): `net_listening`, `net_peerCount`, `net_version` - `web3_*` (2): `web3_clientVersion`, `web3_sha3` - `trace_*` (2): `trace_block`, `trace_transaction` - `debug_*` (4): `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction` A method or path that is not listed is answered with HTTP `400`. ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Upstream JSON-RPC response. A JSON-RPC error is also returned with HTTP `200`: it keeps the request `id` and `error.code`, its `error.message` is `ERPC upstream error`, and `error.data` is not returned. | | 400 | A method or path outside the Supported Methods list, an invalid JSON-RPC request, an empty batch or a batch over 100 calls, a duplicate `id` in a batch, or a body over 1 MiB. | | 401 | Missing or invalid API key, or an IP or Origin restriction on the key is not met. | | 405 | A request method other than POST. | | 426 | A WebSocket Upgrade was requested. The endpoint is HTTP only. | | 429 | Rate limited, including the Free plan limits above: more than one request per 10 seconds, or two or more calls in one request. If a `retry-after` header is present, wait that many seconds. | | 502 | The upstream request could not be completed: a failed upstream response, a response over 8 MiB, or no answer within 30 seconds. | | 503 | The service is temporarily unavailable. | ### Optimism RPC Methods and Documentation For the full list of standard methods, parameters, and specifications, please refer to the official documentation. [https://docs.optimism.io/](https://docs.optimism.io/) --- title: "Polygon RPC Quickstart" description: "Get an API key and make your first Polygon JSON-RPC request over HTTP with ERPC." canonical: "https://erpc.global/en/doc/polygon-rpc/quickstart/" locale: "en" --- # Polygon RPC Quickstart ## Polygon RPC Quickstart This guide takes you from zero to your first Polygon JSON-RPC response with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key. ### 2. Make Your First Request Send a JSON-RPC 2.0 request as an HTTP POST, with your API key in the `api-key` parameter: ```bash curl 'https://edge.erpc.global/polygon?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` The response returns the latest block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` On the Free plan, your account can send one request per 10 seconds, and a request to another chain can also count toward this limit. Wait 10 seconds before sending the next request. You can check which chain the endpoint serves with `eth_chainId`: ```bash curl 'https://edge.erpc.global/polygon?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_chainId" }' ``` You can also send your API key as `Authorization: Bearer `. When both are present, the query parameter is used. ### 3. Batch Requests You can send 1 to 100 JSON-RPC calls in a single HTTP request. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. On the Free plan, send one call per request: a request with two or more calls is answered with HTTP `429`. ### Next Steps - Endpoints, metering, and status codes: [Polygon RPC Endpoint Documentation](https://erpc.global/en/doc/polygon-rpc/general/) - Official Polygon documentation: [https://docs.polygon.technology/pos/reference/rpc-endpoints](https://docs.polygon.technology/pos/reference/rpc-endpoints) --- title: "Polygon RPC Endpoint Documentation" description: "Use ERPC as your Polygon RPC endpoint for HTTP JSON-RPC requests." canonical: "https://erpc.global/en/doc/polygon-rpc/general/" locale: "en" --- # Polygon RPC Endpoint Documentation ## Polygon RPC Endpoint Documentation Use ERPC as your Polygon RPC endpoint for HTTP JSON-RPC requests. Polygon RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana, Ethereum, and Avalanche. Pass your API key in the `api-key` query parameter, or send it as `Authorization: Bearer `. When both are present, the query parameter is used. ### Endpoints Send JSON-RPC 2.0 requests as HTTP POST to: ```text https://edge.erpc.global/polygon?api-key= ``` or the dedicated host: ```text https://polygon.erpc.global?api-key= ``` Requests are accepted at `/` only. ### Examples Here is an HTTP request example with the API key in the query parameter. ```bash curl 'https://edge.erpc.global/polygon?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` Here is the same request with the API key in the `Authorization` header. ```bash curl 'https://edge.erpc.global/polygon' --header 'Content-Type: application/json' --header 'Authorization: Bearer ' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests JSON-RPC batches of 1 to 100 calls per HTTP request are supported. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. The request body can be up to 1 MiB. ### Usage Metering Usage is metered in tokens, and the token rate can differ by method. Each call in an HTTP batch is metered separately. ### Free Plan Limits On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP `429`, and the `retry-after` header gives the wait in seconds. On the Free plan, a request that carries two or more JSON-RPC calls is answered with HTTP `429`, and none of its calls is sent: each call gets a JSON-RPC error with code `-32041`. Send these calls one at a time instead. ### Supported Methods The endpoint serves these 38 methods, grouped by namespace. - `eth_*` (24): `eth_blockNumber`, `eth_call`, `eth_chainId`, `eth_estimateGas`, `eth_feeHistory`, `eth_gasPrice`, `eth_getBalance`, `eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getBlockReceipts`, `eth_getBlockTransactionCountByHash`, `eth_getBlockTransactionCountByNumber`, `eth_getCode`, `eth_getLogs`, `eth_getProof`, `eth_getStorageAt`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionByHash`, `eth_getTransactionCount`, `eth_getTransactionReceipt`, `eth_maxPriorityFeePerGas`, `eth_sendRawTransaction`, `eth_syncing` - `net_*` (3): `net_listening`, `net_peerCount`, `net_version` - `web3_*` (2): `web3_clientVersion`, `web3_sha3` - `txpool_*` (3): `txpool_content`, `txpool_inspect`, `txpool_status` - `debug_*` (4): `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction` - `trace_*` (2): `trace_block`, `trace_transaction` A method or path that is not listed is answered with HTTP `400`. ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Upstream JSON-RPC response. A JSON-RPC error is also returned with HTTP `200`: it keeps the request `id` and `error.code`, its `error.message` is `ERPC upstream error`, and `error.data` is not returned. | | 400 | A method or path outside the Supported Methods list, an invalid JSON-RPC request, an empty batch or a batch over 100 calls, a duplicate `id` in a batch, or a body over 1 MiB. | | 401 | Missing or invalid API key, or an IP or Origin restriction on the key is not met. | | 405 | A request method other than POST. | | 426 | A WebSocket Upgrade was requested. The endpoint is HTTP only. | | 429 | Rate limited, including the Free plan limits above: more than one request per 10 seconds, or two or more calls in one request. If a `retry-after` header is present, wait that many seconds. | | 502 | The upstream request could not be completed: a failed upstream response, a response over 8 MiB, or no answer within 30 seconds. | | 503 | The service is temporarily unavailable. | ### Polygon RPC Methods and Documentation For the full list of standard methods, parameters, and specifications, please refer to the official documentation. [https://docs.polygon.technology/pos/reference/rpc-endpoints](https://docs.polygon.technology/pos/reference/rpc-endpoints) --- title: "Robinhood Chain RPC Quickstart" description: "Get an API key and make your first Robinhood Chain JSON-RPC request over HTTP with ERPC." canonical: "https://erpc.global/en/doc/robinhood-rpc/quickstart/" locale: "en" --- # Robinhood Chain RPC Quickstart ## Robinhood Chain RPC Quickstart This guide takes you from zero to your first Robinhood Chain JSON-RPC response with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key. ### 2. Make Your First Request Send a JSON-RPC 2.0 request as an HTTP POST, with your API key in the `api-key` parameter: ```bash curl 'https://edge.erpc.global/robinhood?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` The response returns the latest block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` On the Free plan, your account can send one request per 10 seconds, and a request to another chain can also count toward this limit. Wait 10 seconds before sending the next request. You can check which chain the endpoint serves with `eth_chainId`: ```bash curl 'https://edge.erpc.global/robinhood?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_chainId" }' ``` You can also send your API key as `Authorization: Bearer `. When both are present, the query parameter is used. ### 3. Batch Requests You can send 1 to 100 JSON-RPC calls in a single HTTP request. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. On the Free plan, send one call per request: a request with two or more calls is answered with HTTP `429`. ### Next Steps - Endpoints, metering, and status codes: [Robinhood Chain RPC Endpoint Documentation](https://erpc.global/en/doc/robinhood-rpc/general/) - Official Robinhood Chain documentation: [https://docs.robinhood.com/chain/](https://docs.robinhood.com/chain/) --- title: "Robinhood Chain RPC Endpoint Documentation" description: "Use ERPC as your Robinhood Chain RPC endpoint for HTTP JSON-RPC requests." canonical: "https://erpc.global/en/doc/robinhood-rpc/general/" locale: "en" --- # Robinhood Chain RPC Endpoint Documentation ## Robinhood Chain RPC Endpoint Documentation Use ERPC as your Robinhood Chain RPC endpoint for HTTP JSON-RPC requests. Robinhood Chain RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana, Ethereum, and Avalanche. Pass your API key in the `api-key` query parameter, or send it as `Authorization: Bearer `. When both are present, the query parameter is used. ### Endpoints Send JSON-RPC 2.0 requests as HTTP POST to: ```text https://edge.erpc.global/robinhood?api-key= ``` or the dedicated host: ```text https://robinhood.erpc.global?api-key= ``` Requests are accepted at `/` only. ### Examples Here is an HTTP request example with the API key in the query parameter. ```bash curl 'https://edge.erpc.global/robinhood?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` Here is the same request with the API key in the `Authorization` header. ```bash curl 'https://edge.erpc.global/robinhood' --header 'Content-Type: application/json' --header 'Authorization: Bearer ' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests JSON-RPC batches of 1 to 100 calls per HTTP request are supported. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. The request body can be up to 1 MiB. ### Usage Metering Usage is metered in tokens, and the token rate can differ by method. Each call in an HTTP batch is metered separately. ### Free Plan Limits On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP `429`, and the `retry-after` header gives the wait in seconds. On the Free plan, a request that carries two or more JSON-RPC calls is answered with HTTP `429`, and none of its calls is sent: each call gets a JSON-RPC error with code `-32041`. Send these calls one at a time instead. ### Supported Methods The endpoint serves these 33 methods, grouped by namespace. - `debug_*` (4): `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction` - `eth_*` (24): `eth_blockNumber`, `eth_call`, `eth_chainId`, `eth_estimateGas`, `eth_feeHistory`, `eth_gasPrice`, `eth_getBalance`, `eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getBlockReceipts`, `eth_getBlockTransactionCountByHash`, `eth_getBlockTransactionCountByNumber`, `eth_getCode`, `eth_getLogs`, `eth_getProof`, `eth_getStorageAt`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionByHash`, `eth_getTransactionCount`, `eth_getTransactionReceipt`, `eth_maxPriorityFeePerGas`, `eth_sendRawTransaction`, `eth_syncing` - `net_*` (1): `net_version` - `web3_*` (2): `web3_clientVersion`, `web3_sha3` - `trace_*` (2): `trace_block`, `trace_transaction` A method or path that is not listed is answered with HTTP `400`. ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Upstream JSON-RPC response. A JSON-RPC error is also returned with HTTP `200`: it keeps the request `id` and `error.code`, its `error.message` is `ERPC upstream error`, and `error.data` is not returned. | | 400 | A method or path outside the Supported Methods list, an invalid JSON-RPC request, an empty batch or a batch over 100 calls, a duplicate `id` in a batch, or a body over 1 MiB. | | 401 | Missing or invalid API key, or an IP or Origin restriction on the key is not met. | | 405 | A request method other than POST. | | 426 | A WebSocket Upgrade was requested. The endpoint is HTTP only. | | 429 | Rate limited, including the Free plan limits above: more than one request per 10 seconds, or two or more calls in one request. If a `retry-after` header is present, wait that many seconds. | | 502 | The upstream request could not be completed: a failed upstream response, a response over 8 MiB, or no answer within 30 seconds. | | 503 | The service is temporarily unavailable. | ### Robinhood Chain RPC Methods and Documentation For the full list of standard methods, parameters, and specifications, please refer to the official documentation. [https://docs.robinhood.com/chain/](https://docs.robinhood.com/chain/) --- title: "Soneium RPC Quickstart" description: "Get an API key and make your first Soneium JSON-RPC request over HTTP with ERPC." canonical: "https://erpc.global/en/doc/soneium-rpc/quickstart/" locale: "en" --- # Soneium RPC Quickstart ## Soneium RPC Quickstart This guide takes you from zero to your first Soneium JSON-RPC response with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key. ### 2. Make Your First Request Send a JSON-RPC 2.0 request as an HTTP POST, with your API key in the `api-key` parameter: ```bash curl 'https://edge.erpc.global/soneium?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` The response returns the latest block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` On the Free plan, your account can send one request per 10 seconds, and a request to another chain can also count toward this limit. Wait 10 seconds before sending the next request. You can check which chain the endpoint serves with `eth_chainId`: ```bash curl 'https://edge.erpc.global/soneium?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_chainId" }' ``` You can also send your API key as `Authorization: Bearer `. When both are present, the query parameter is used. ### 3. Batch Requests You can send 1 to 100 JSON-RPC calls in a single HTTP request. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. On the Free plan, send one call per request: a request with two or more calls is answered with HTTP `429`. ### Next Steps - Endpoints, metering, and status codes: [Soneium RPC Endpoint Documentation](https://erpc.global/en/doc/soneium-rpc/general/) - Official Soneium documentation: [https://docs.soneium.org/docs/builders/overview](https://docs.soneium.org/docs/builders/overview) --- title: "Soneium RPC Endpoint Documentation" description: "Use ERPC as your Soneium RPC endpoint for HTTP JSON-RPC requests." canonical: "https://erpc.global/en/doc/soneium-rpc/general/" locale: "en" --- # Soneium RPC Endpoint Documentation ## Soneium RPC Endpoint Documentation Use ERPC as your Soneium RPC endpoint for HTTP JSON-RPC requests. Soneium RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana, Ethereum, and Avalanche. Pass your API key in the `api-key` query parameter, or send it as `Authorization: Bearer `. When both are present, the query parameter is used. ### Endpoints Send JSON-RPC 2.0 requests as HTTP POST to: ```text https://edge.erpc.global/soneium?api-key= ``` or the dedicated host: ```text https://soneium.erpc.global?api-key= ``` Requests are accepted at `/` only. ### Examples Here is an HTTP request example with the API key in the query parameter. ```bash curl 'https://edge.erpc.global/soneium?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` Here is the same request with the API key in the `Authorization` header. ```bash curl 'https://edge.erpc.global/soneium' --header 'Content-Type: application/json' --header 'Authorization: Bearer ' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests JSON-RPC batches of 1 to 100 calls per HTTP request are supported. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. The request body can be up to 1 MiB. ### Usage Metering Usage is metered in tokens, and the token rate can differ by method. Each call in an HTTP batch is metered separately. ### Free Plan Limits On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP `429`, and the `retry-after` header gives the wait in seconds. On the Free plan, a request that carries two or more JSON-RPC calls is answered with HTTP `429`, and none of its calls is sent: each call gets a JSON-RPC error with code `-32041`. Send these calls one at a time instead. ### Supported Methods The endpoint serves these 33 methods, grouped by namespace. - `eth_*` (24): `eth_blockNumber`, `eth_call`, `eth_chainId`, `eth_estimateGas`, `eth_feeHistory`, `eth_gasPrice`, `eth_getBalance`, `eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getBlockReceipts`, `eth_getBlockTransactionCountByHash`, `eth_getBlockTransactionCountByNumber`, `eth_getCode`, `eth_getLogs`, `eth_getProof`, `eth_getStorageAt`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionByHash`, `eth_getTransactionCount`, `eth_getTransactionReceipt`, `eth_maxPriorityFeePerGas`, `eth_sendRawTransaction`, `eth_syncing` - `web3_*` (2): `web3_clientVersion`, `web3_sha3` - `net_*` (3): `net_listening`, `net_peerCount`, `net_version` - `debug_*` (4): `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction` A method or path that is not listed is answered with HTTP `400`. ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Upstream JSON-RPC response. A JSON-RPC error is also returned with HTTP `200`: it keeps the request `id` and `error.code`, its `error.message` is `ERPC upstream error`, and `error.data` is not returned. | | 400 | A method or path outside the Supported Methods list, an invalid JSON-RPC request, an empty batch or a batch over 100 calls, a duplicate `id` in a batch, or a body over 1 MiB. | | 401 | Missing or invalid API key, or an IP or Origin restriction on the key is not met. | | 405 | A request method other than POST. | | 426 | A WebSocket Upgrade was requested. The endpoint is HTTP only. | | 429 | Rate limited, including the Free plan limits above: more than one request per 10 seconds, or two or more calls in one request. If a `retry-after` header is present, wait that many seconds. | | 502 | The upstream request could not be completed: a failed upstream response, a response over 8 MiB, or no answer within 30 seconds. | | 503 | The service is temporarily unavailable. | ### Soneium RPC Methods and Documentation For the full list of standard methods, parameters, and specifications, please refer to the official documentation. [https://docs.soneium.org/docs/builders/overview](https://docs.soneium.org/docs/builders/overview) --- title: "Sui RPC Quickstart" description: "Get an API key and configure the binary gRPC-web transport to call Sui with ERPC." canonical: "https://erpc.global/en/doc/sui-rpc/quickstart/" locale: "en" --- # Sui RPC Quickstart ## Sui RPC Quickstart This guide takes you from zero to a configured Sui gRPC-web transport with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key. ### 2. Configure the gRPC-web Transport Sui is served over binary gRPC-web (`application/grpc-web+proto`), one unary call per HTTP request. Configure a `GrpcWebFetchTransport` with the ERPC base URL and your API key as a Bearer token: ```ts import { GrpcWebFetchTransport } from '@protobuf-ts/grpcweb-transport' const transport = new GrpcWebFetchTransport({ baseUrl: 'https://sui.erpc.global', // or https://edge.erpc.global/sui format: 'binary', meta: { Authorization: 'Bearer ' }, }) ``` Pass this transport to the unary service client generated for the Sui gRPC API. The client appends `/sui.rpc.v2./` to `baseUrl`, for example `/sui.rpc.v2.LedgerService/GetServiceInfo`. Because the SDK appends the path to the base URL, the API key goes in the `Authorization` header instead of the `api-key` query parameter. Only unary calls over binary gRPC-web are supported. JSON-RPC requests, native gRPC, text-format gRPC-web, and streaming are not. ### Next Steps - Endpoints, metering, and status codes: [Sui RPC Endpoint Documentation](https://erpc.global/en/doc/sui-rpc/general/) - Official Sui documentation: [https://docs.sui.io/references/sui-api](https://docs.sui.io/references/sui-api) --- title: "Sui RPC Endpoint Documentation" description: "Use ERPC as your Sui RPC endpoint for unary gRPC-web requests." canonical: "https://erpc.global/en/doc/sui-rpc/general/" locale: "en" --- # Sui RPC Endpoint Documentation ## Sui RPC Endpoint Documentation Use ERPC as your Sui RPC endpoint for unary gRPC-web requests. Sui RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana, Ethereum, and Avalanche. Send your API key as `Authorization: Bearer `. The Sui SDK appends the service path to the base URL, so the key goes in the header rather than the `api-key` query parameter. ### Endpoints Use either base URL as the `baseUrl` of your gRPC-web transport: ```text https://edge.erpc.global/sui ``` ```text https://sui.erpc.global ``` Requests are binary gRPC-web (`application/grpc-web+proto`) POSTs to `/sui.rpc.v2./`, one uncompressed protobuf frame per unary call. ### Examples Here is a transport configuration example. ```ts import { GrpcWebFetchTransport } from '@protobuf-ts/grpcweb-transport' const transport = new GrpcWebFetchTransport({ baseUrl: 'https://sui.erpc.global', // or https://edge.erpc.global/sui format: 'binary', meta: { Authorization: 'Bearer ' }, }) ``` Pass the transport to the unary service client generated for the Sui gRPC API. You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests Sui has no batch requests. Each HTTP request carries one unary call and is metered as one call. The request body can be up to 1 MiB. ### Usage Metering Usage is metered in tokens, and the token rate can differ by method. Each unary call is metered as one call. ### Free Plan Limits On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP `429`, and the `retry-after` header gives the wait in seconds. ### Supported Methods The endpoint serves these 19 unary gRPC-web methods. Each is called at `/sui.rpc.v2./` and the capitalization must match exactly. - `LedgerService` (5): `GetServiceInfo`, `GetCheckpoint`, `GetObject`, `GetTransaction`, `GetEpoch` - `MovePackageService` (4): `GetPackage`, `GetDatatype`, `GetFunction`, `ListPackageVersions` - `NameService` (2): `LookupName`, `ReverseLookupName` - `SignatureVerificationService` (1): `VerifySignature` - `StateService` (5): `GetCoinInfo`, `GetBalance`, `ListBalances`, `ListDynamicFields`, `ListOwnedObjects` - `TransactionExecutionService` (2): `ExecuteTransaction`, `SimulateTransaction` A path that is not listed is answered with HTTP `400`. Native gRPC, text-format gRPC-web, streaming, and `BatchGet*` calls are not supported. ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Successful unary call. The body is `application/grpc-web+proto`. | | 400 | A path outside the Supported Methods list, a body that is not one uncompressed binary gRPC-web frame, or a body over 1 MiB. | | 401 | Missing or invalid API key, or an IP or Origin restriction on the key is not met. | | 405 | A request method other than POST. | | 426 | A WebSocket Upgrade was requested. The endpoint is HTTP only. | | 429 | Rate limited, including the Free plan limit of one request per 10 seconds. If a `retry-after` header is present, wait that many seconds. | | 502 | The upstream call could not be completed: a failed upstream response, a response over 8 MiB, no answer within 30 seconds, or a `grpc-status` other than `0`. | | 503 | The service is temporarily unavailable. | ### Sui RPC Methods and Documentation For the full list of standard methods, parameters, and specifications, please refer to the official documentation. [https://docs.sui.io/references/sui-api](https://docs.sui.io/references/sui-api) --- title: "TRON RPC Quickstart" description: "Get an API key and make your first TRON JSON-RPC and HTTP API requests with ERPC." canonical: "https://erpc.global/en/doc/tron-rpc/quickstart/" locale: "en" --- # TRON RPC Quickstart ## TRON RPC Quickstart This guide takes you from zero to your first TRON JSON-RPC response with ERPC. ### 1. Get Your API Key You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key. ### 2. Make Your First Request Send a JSON-RPC 2.0 request as an HTTP POST to `/jsonrpc`, with your API key in the `api-key` parameter: ```bash curl 'https://edge.erpc.global/tron/jsonrpc?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` The response returns the latest block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` On the Free plan, your account can send one request per 10 seconds, and a request to another chain can also count toward this limit. Wait 10 seconds before sending the next request. You can check which chain the endpoint serves with `eth_chainId`: ```bash curl 'https://edge.erpc.global/tron/jsonrpc?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_chainId" }' ``` You can also send your API key as `Authorization: Bearer `. When both are present, the query parameter is used. ### 3. Call the TRON HTTP API On the Free plan, your account can send one request per 10 seconds, and a request to another chain can also count toward this limit. Wait 10 seconds before sending the next request. The TRON HTTP API paths are served under `/wallet/` and `/walletsolidity/`. Send a JSON object as the POST body. This example reads the latest block with an empty object: ```bash curl 'https://edge.erpc.global/tron/wallet/getnowblock?api-key=' --header 'Content-Type: application/json' --data '{}' ``` Each HTTP API request is metered as one call. The paths that are available are listed in the [TRON RPC Endpoint Documentation](https://erpc.global/en/doc/tron-rpc/general/). ### 4. Batch Requests You can send 1 to 100 JSON-RPC calls in a single HTTP request to `/jsonrpc`. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. On the Free plan, send one call per request: a request with two or more calls is answered with HTTP `429`. ### Next Steps - Endpoints, metering, and status codes: [TRON RPC Endpoint Documentation](https://erpc.global/en/doc/tron-rpc/general/) - Official TRON documentation: [https://developers.tron.network/reference/full-node-api-overview](https://developers.tron.network/reference/full-node-api-overview) --- title: "TRON RPC Endpoint Documentation" description: "Use ERPC as your TRON RPC endpoint for HTTP JSON-RPC requests and the TRON HTTP API." canonical: "https://erpc.global/en/doc/tron-rpc/general/" locale: "en" --- # TRON RPC Endpoint Documentation ## TRON RPC Endpoint Documentation Use ERPC as your TRON RPC endpoint for HTTP JSON-RPC requests and the TRON HTTP API. TRON RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard. You can use the same RPC key as Solana, Ethereum, and Avalanche. Pass your API key in the `api-key` query parameter, or send it as `Authorization: Bearer `. When both are present, the query parameter is used. ### Endpoints Send JSON-RPC 2.0 requests as HTTP POST to: ```text https://edge.erpc.global/tron?api-key= ``` or the dedicated host: ```text https://tron.erpc.global?api-key= ``` On the dedicated host, `/` and `/jsonrpc` reach the same JSON-RPC endpoint, and the TRON HTTP API is served under `/wallet/` and `/walletsolidity/`. On `edge.erpc.global`, the same paths follow the `/tron` prefix: `/tron`, `/tron/jsonrpc`, `/tron/wallet/`, and `/tron/walletsolidity/`. The TRON HTTP API POST body must be a JSON object. Other paths are answered with HTTP `400`. ### Examples Here is an HTTP request example with the API key in the query parameter. ```bash curl 'https://edge.erpc.global/tron?api-key=' --header 'Content-Type: application/json' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` Here is the same request with the API key in the `Authorization` header. ```bash curl 'https://edge.erpc.global/tron' --header 'Content-Type: application/json' --header 'Authorization: Bearer ' --data '{ "jsonrpc":"2.0","id":1, "method":"eth_blockNumber" }' ``` Here is a TRON HTTP API example. ```bash curl 'https://edge.erpc.global/tron/wallet/getnowblock?api-key=' --header 'Content-Type: application/json' --data '{}' ``` You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Batch Requests JSON-RPC batches of 1 to 100 calls per HTTP request are supported. Every call needs its own `id`, and `id` values must not repeat within a batch. Each call in a batch is metered as its own call. The request body can be up to 1 MiB. Batches are sent to `/jsonrpc`. A TRON HTTP API request carries one call and is metered as one call. ### Usage Metering Usage is metered in tokens, and the token rate can differ by method. Each call in an HTTP batch is metered separately. Each TRON HTTP API request is metered as one call. ### Free Plan Limits On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP `429`, and the `retry-after` header gives the wait in seconds. On the Free plan, a request that carries two or more JSON-RPC calls is answered with HTTP `429`, and none of its calls is sent: each call gets a JSON-RPC error with code `-32041`. Send these calls one at a time instead. ### Supported Methods The endpoint serves these 38 methods. The `eth_*`, `net_*`, and `web3_*` methods are JSON-RPC calls sent to `/` or `/jsonrpc`. The `/wallet/*` and `/walletsolidity/*` entries are TRON HTTP API paths, called with a JSON object as the POST body. - `eth_*` (19): `eth_blockNumber`, `eth_call`, `eth_chainId`, `eth_estimateGas`, `eth_gasPrice`, `eth_getBalance`, `eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getBlockReceipts`, `eth_getBlockTransactionCountByHash`, `eth_getBlockTransactionCountByNumber`, `eth_getCode`, `eth_getLogs`, `eth_getStorageAt`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionByHash`, `eth_getTransactionReceipt`, `eth_syncing` - `net_*` (3): `net_listening`, `net_peerCount`, `net_version` - `web3_*` (2): `web3_clientVersion`, `web3_sha3` - `/wallet/*` (9): `/wallet/broadcasthex`, `/wallet/broadcasttransaction`, `/wallet/estimateenergy`, `/wallet/getaccount`, `/wallet/getblockbynum`, `/wallet/getnowblock`, `/wallet/gettransactionbyid`, `/wallet/gettransactioninfobyid`, `/wallet/triggerconstantcontract` - `/walletsolidity/*` (5): `/walletsolidity/getaccount`, `/walletsolidity/getblockbynum`, `/walletsolidity/getnowblock`, `/walletsolidity/gettransactionbyid`, `/walletsolidity/gettransactioninfobyid` A method or path that is not listed is answered with HTTP `400`. ### Response Status Codes | HTTP status | Meaning | | --- | --- | | 200 | Upstream JSON-RPC response. A JSON-RPC error is also returned with HTTP `200`: it keeps the request `id` and `error.code`, its `error.message` is `ERPC upstream error`, and `error.data` is not returned. | | 400 | A method or path outside the Supported Methods list, an invalid JSON-RPC request, an empty batch or a batch over 100 calls, a duplicate `id` in a batch, or a body over 1 MiB. | | 401 | Missing or invalid API key, or an IP or Origin restriction on the key is not met. | | 405 | A request method other than POST. | | 426 | A WebSocket Upgrade was requested. The endpoint is HTTP only. | | 429 | Rate limited, including the Free plan limits above: more than one request per 10 seconds, or two or more calls in one request. If a `retry-after` header is present, wait that many seconds. | | 502 | The upstream request could not be completed: a failed upstream response, a response over 8 MiB, or no answer within 30 seconds. A TRON HTTP API response that reports a failure is also answered with `502`. | | 503 | The service is temporarily unavailable. | ### TRON RPC Methods and Documentation For the full list of standard methods, parameters, and specifications, please refer to the official documentation. [https://developers.tron.network/reference/full-node-api-overview](https://developers.tron.network/reference/full-node-api-overview) --- title: "Call Solana on your Unlimited Endpoint" description: "Call 15 standard Solana methods on your Unlimited Endpoint, a dedicated endpoint in the region you choose. Calls are not metered, and there is no per-request rate limit." canonical: "https://erpc.global/en/doc/rpc/unlimited-endpoint-supported-methods/" locale: "en" --- # Call Solana on your Unlimited Endpoint ## Call Solana on your Unlimited Endpoint An Unlimited Endpoint is your own dedicated HTTP endpoint, on a server in the region you choose. Send Solana calls to its URL as it is, with no path. Calls are not metered, so the number you send does not change what you pay. Edge RPC draws each call from your ERPC token balance; calls to this endpoint draw nothing from it, and there is no per-request rate limit, monthly credit quota or burst throttling. The same endpoint also takes Ethereum requests at /eth and Avalanche C-Chain requests at /ava. See [Unlimited for Ethereum](https://erpc.global/en/doc/ethereum-rpc/unlimited/) and [Unlimited for Avalanche](https://erpc.global/en/doc/avalanche-rpc/unlimited/). ### Supported Methods On Solana, Unlimited supports these 15 methods. - `getSlot` - `getBlockHeight` - `getLatestBlockhash` - `getBalance` - `getAccountInfo` - `getMultipleAccounts` - `getTransaction` - `sendTransaction` - `simulateTransaction` - `getSignatureStatuses` - `getRecentPrioritizationFees` - `getHealth` - `getVersion` - `getEpochInfo` - `getBlock` The 15 were chosen for low-latency calls you make often and for sending transactions. For any other Solana method, use Edge RPC at edge.erpc.global, which takes an RPC key and counts each call in ERPC tokens. If you send Unlimited a method that only Edge RPC serves, such as `getProgramAccounts` or `getAsset`, it answers with a JSON-RPC error that points to edge.erpc.global. ```text https://edge.erpc.global?api-key= ``` To get an Unlimited Endpoint, choose a region and a plan in the ERPC Web Dashboard, and register the IP address of the server that sends requests. Your RPC keys for Edge RPC are there too. [ERPC Web Dashboard](https://dashboard.erpc.global/en) --- title: "Call Ethereum on your Unlimited Endpoint" description: "Add /eth to your Unlimited Endpoint, a dedicated endpoint in the region you choose, to call Ethereum. Calls are not metered, so the number you send does not change what you pay." canonical: "https://erpc.global/en/doc/ethereum-rpc/unlimited/" locale: "en" --- # Call Ethereum on your Unlimited Endpoint An Unlimited Endpoint is your own dedicated HTTP endpoint, on a server in the region you choose. Add /eth to its URL to call Ethereum. Calls are not metered, so the number you send does not change what you pay, and there is no per-request rate limit. ## What you can do with Unlimited - Call without using ERPC tokens. Edge RPC draws each call from your ERPC token balance; calls to this endpoint draw nothing from it, and there is no monthly credit quota or burst throttling. - Connect without an RPC key. The endpoint takes requests from the IP addresses you register. - Get the first answer on a new connection sooner. The endpoint is plain HTTP, so there is no TLS handshake to wait for. HTTP and WebSocket share one port. ## Make a request In the [ERPC Web Dashboard](https://dashboard.erpc.global/en), get an Unlimited Endpoint by choosing a region and a plan, and register the IP address of the server that sends requests. The dashboard shows your endpoint as a plain HTTP URL with an IP address and port 8899. Send Ethereum requests to the endpoint with /eth added: ```text http://:8899/eth ``` WebSocket is at /eth/ws, on the same port: ```text ws://:8899/eth/ws ``` This asks Ethereum for its latest block number: ```bash curl http://:8899/eth \ --header 'Content-Type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber"}' ``` The result is the block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` To receive new blocks as they arrive, connect over WebSocket and subscribe: ```bash wscat -c "ws://:8899/eth/ws" # After connected, send: {"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]} ``` ## Supported Methods For the Ethereum methods, see [Supported Methods](https://erpc.global/en/doc/ethereum-rpc/general/#supported-methods) in Edge RPC › Ethereum › Endpoints and RPC keys. ## Related pages - [Unlimited for Solana](https://erpc.global/en/doc/rpc/unlimited-endpoint-supported-methods/): the 15 Solana methods the same endpoint serves. - [Unlimited for Avalanche](https://erpc.global/en/doc/avalanche-rpc/unlimited/): C-Chain requests at /ava. - [Ethereum Quickstart](https://erpc.global/en/doc/ethereum-rpc/quickstart/): call Ethereum through Edge RPC with an RPC key. --- title: "Call Avalanche on your Unlimited Endpoint" description: "Add /ava to your Unlimited Endpoint, a dedicated endpoint in the region you choose, to call the Avalanche C-Chain. Calls are not metered, so the number you send does not change what you pay." canonical: "https://erpc.global/en/doc/avalanche-rpc/unlimited/" locale: "en" --- # Call Avalanche on your Unlimited Endpoint An Unlimited Endpoint is your own dedicated HTTP endpoint, on a server in the region you choose. Add /ava to its URL to call the Avalanche C-Chain. Calls are not metered, so the number you send does not change what you pay, and there is no per-request rate limit. ## What you can do with Unlimited - Call without using ERPC tokens. Edge RPC draws each call from your ERPC token balance; calls to this endpoint draw nothing from it, and there is no monthly credit quota or burst throttling. - Connect without an RPC key. The endpoint takes requests from the IP addresses you register. - Get the first answer on a new connection sooner. The endpoint is plain HTTP, so there is no TLS handshake to wait for. HTTP and WebSocket share one port. ## Make a request In the [ERPC Web Dashboard](https://dashboard.erpc.global/en), get an Unlimited Endpoint by choosing a region and a plan, and register the IP address of the server that sends requests. The dashboard shows your endpoint as a plain HTTP URL with an IP address and port 8899. Send C-Chain requests to the endpoint with /ava added: ```text http://:8899/ava ``` WebSocket is at /ava/ws, on the same port: ```text ws://:8899/ava/ws ``` This asks the C-Chain for its latest block number: ```bash curl http://:8899/ava \ --header 'Content-Type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber"}' ``` The result is the block number in hexadecimal: ```json { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` To receive new blocks as they arrive, connect over WebSocket and subscribe: ```bash wscat -c "ws://:8899/ava/ws" # After connected, send: {"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]} ``` ## Supported Methods Requests to /ava reach the C-Chain EVM JSON-RPC. For the C-Chain methods, see [Supported Methods](https://erpc.global/en/doc/avalanche-rpc/general/#supported-methods) in Edge RPC › Avalanche › Endpoints and RPC keys. The native Avalanche APIs on that page — `avax.*`, `avm.*`, `platform.*`, `proposervm.*` and `info.upgrades` — cannot be called at /ava. Call them through Edge RPC at edge.erpc.global/ava, which takes an RPC key and counts each call in ERPC tokens. ## Related pages - [Unlimited for Solana](https://erpc.global/en/doc/rpc/unlimited-endpoint-supported-methods/): the 15 Solana methods the same endpoint serves. - [Unlimited for Ethereum](https://erpc.global/en/doc/ethereum-rpc/unlimited/): Ethereum requests at /eth. - [Avalanche Quickstart](https://erpc.global/en/doc/avalanche-rpc/quickstart/): call Avalanche through Edge RPC with an RPC key. --- title: "x402 — Pay per Call" description: "Call RPC on 18 chains at x402.erpc.global and pay for each request in USDC or EURC, with no RPC key." canonical: "https://erpc.global/en/doc/x402/overview/" locale: "en" --- # x402 — Pay per Call Use RPC on 18 chains and pay for each request in USDC or EURC. You need no RPC key or monthly plan. Pay with - USDC on Solana - USDC on Base - EURC on Base Whichever chain you call, you pay with a stablecoin on Solana or Base. You need no SOL or ETH for network fees. [Make a paid request](https://erpc.global/en/doc/x402/quickstart/ "button") [See how requests are priced](https://erpc.global/en/doc/x402/pricing/ "button") ```bash curl -i https://x402.erpc.global/v1/solana-mainnet \ --header 'Content-Type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"getSlot"}' ``` ## What you can do with x402 - Call 18 chains at one host, each at its own route. - Pay for every chain's RPC with one stablecoin from one wallet. - See the price before you pay. The 402 response states it, and /pricing lists each route's method prices for free. - Pay nothing for a request x402.erpc.global refuses. It checks the method, the body and the batch size before it asks for payment. - Keep a settlement receipt. Every paid answer carries one in the X-Payment-Response header. ## How a paid request works 1. Send the RPC request as usual. x402.erpc.global answers 402 Payment Required, with the price and the payment options. 2. Your x402 client, the software that turns the 402 into a payment signed from your wallet, signs a payment for that price: a USDC transfer on Solana, or a USDC or EURC transfer authorization on Base. 3. Send the same request again, with the signed payment in the X-Payment header. 4. Once the payment is verified and settled, x402.erpc.global sends the request on to the chain and returns the answer with the receipt in the X-Payment-Response header. Whichever chain you call, the payment settles on Solana or Base. ## Chains and routes Every route takes HTTP POST at https://x402.erpc.global. JSON-RPC routes take a single call or a batch of up to 100 calls. | Chain | Route | Requests | | --- | --- | --- | | Solana | `/v1/solana-mainnet` | JSON-RPC | | Ethereum | `/v1/eth-mainnet` | JSON-RPC | | Avalanche | `/v1/ava-mainnet` | JSON-RPC (a batch holds C-Chain calls only), and the AvalancheGo APIs at `/v1/ava-mainnet/ext/…` | | Arbitrum | `/v1/arbitrum-mainnet` | JSON-RPC | | Arc | `/v1/arc-mainnet` | JSON-RPC | | Base | `/v1/base-mainnet` | JSON-RPC | | Bitcoin | `/v1/bitcoin-mainnet` | JSON-RPC | | BSC | `/v1/bsc-mainnet` | JSON-RPC | | Hyperliquid | `/v1/hyperliquid-mainnet` | JSON-RPC, also at `/v1/hyperliquid-mainnet/evm` and `…/nanoreth` | | Kaia | `/v1/kaia-mainnet` | JSON-RPC | | Monad | `/v1/monad-mainnet` | JSON-RPC | | NEAR | `/v1/near-mainnet` | JSON-RPC | | Optimism | `/v1/optimism-mainnet` | JSON-RPC | | Polygon | `/v1/polygon-mainnet` | JSON-RPC | | Robinhood Chain | `/v1/robinhood-mainnet` | JSON-RPC | | Soneium | `/v1/soneium-mainnet` | JSON-RPC | | Sui | `/v1/sui-mainnet/sui.rpc.v2./` | gRPC-web unary calls, one per request | | TRON | `/v1/tron-mainnet` | JSON-RPC, also at `/jsonrpc`, and the HTTP API at `/wallet/` and `/walletsolidity/`, one call per request | WebSocket subscriptions, such as `eth_subscribe`, are not sold. ## Payment options | Stablecoin | Network | Contract or mint address | | --- | --- | --- | | USDC | Solana | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` | | USDC | Base | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | | EURC | Base | `0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42` | Each 402 response also carries a `howToPay` block with the stablecoins that request accepts and their contract addresses, so an agent can pay from the response alone. ## Free endpoints | Endpoint | What it returns | | --- | --- | | `GET /pricing` | The price of every method on every route | | `GET /.well-known/x402` | The routes and the payment options, for x402 clients | | `GET /doc` | The OpenAPI document of every route | | `GET /scalar` | The same document as a browsable reference | ## Scope of use The paid routes on this page are for paying ERPC RPC usage fees through x402. They do not provide crypto asset exchange, brokerage, custody or wallet services. --- title: "Make your first paid request with x402" description: "Send a request to x402.erpc.global, read the price in the 402 response, pay it with an x402 client and get the RPC result with a settlement receipt." canonical: "https://erpc.global/en/doc/x402/quickstart/" locale: "en" --- # Make your first paid request with x402 This guide takes one Solana request through x402: read the price, pay it, and get the answer with a settlement receipt. Every chain is paid the same way. You need an x402 client and a wallet that can pay one of the three ways below. An x402 client is the software that reads the 402 response, signs a payment from your wallet and sends the request again with it. For x402 clients, see the x402 documentation at [x402.org](https://x402.org/). Pay with - USDC on Solana - USDC on Base - EURC on Base ## 1. Send the request Send the RPC request without a payment: ```bash curl -i https://x402.erpc.global/v1/solana-mainnet \ --header 'Content-Type: application/json' \ --data '{"jsonrpc":"2.0","id":1,"method":"getSlot"}' ``` The answer is 402 Payment Required. Its headers give the method and the price: ```http HTTP/2 402 x-payment-required: eyJ4NDAyVmVyc2lvbiI6Mi… x-rpc-methods: getSlot x-rpc-weight: 1000 x-rpc-price-usd: 0.001 ``` The body lists the payment options in `accepts`, one for each stablecoin the request can be paid with. `amount` is in the stablecoin's smallest unit, so 1000 is 0.001 USDC, or 0.001 EURC: ```json { "error": { "code": "payment_required", "message": "Payment required", "request_id": "…" }, "x402Version": 2, "accepts": [ { "scheme": "exact", "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", "amount": "1000", "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", … }, { "scheme": "exact", "network": "eip155:8453", "amount": "1000", "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", … }, { "scheme": "exact", "network": "eip155:8453", "amount": "1000", "asset": "0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42", … } ], "pricing": { "methods": ["getSlot"], …, "weight": 1000, "rawWeight": 42, …, "price": "$0.001", … }, … } ``` ## 2. Pay with an x402 client Give the 402 response to your x402 client. It picks an option your wallet can pay, signs a payment for that amount and encodes it for the X-Payment header. The payment needs no SOL or ETH for network fees. ## 3. Send the request again with the payment Send the same body again, with the payment in the X-Payment header: ```bash curl -i https://x402.erpc.global/v1/solana-mainnet \ --header 'Content-Type: application/json' \ --header 'X-Payment: ' \ --data '{"jsonrpc":"2.0","id":1,"method":"getSlot"}' ``` Keep the body unchanged. The price is worked out from the body, so if a changed body has a different price, the payment no longer matches it and is answered with `price_mismatch`. Once the payment is verified and settled, the RPC answer comes back with the settlement receipt in the X-Payment-Response header: ```http HTTP/2 200 x-payment-response: ``` ```json { "jsonrpc": "2.0", "id": 1, "result": … } ``` A payment pays for one request. If you send the same payment again, it is refused with 402 `payment_invalid` or 409 `duplicate_payment`, and the request is not forwarded again. ## Responses A request that x402.erpc.global answers with an error before it asks for payment costs nothing. | Status | `error.code` | What happened | | --- | --- | --- | | 402 | `payment_required` | No payment was sent. The body gives the price and the payment options. | | 402 | `payment_invalid` | The payment did not pass verification. Sign a new payment and send the request again. | | 402 | `price_mismatch` | The payment does not match an option this request's 402 offered, such as its price. | | 402 | `payment_amount_too_low` | The amount is below the smallest payment x402.erpc.global settles. | | 402 | `settlement_failed` | The settlement was reported as failed. The response offers the payment options again. | | 409 | `duplicate_payment` | The payment was already used. | | 400 | `method_not_supported`, `invalid_request` | The route does not sell the method, or does not take the body. Nothing is charged. | | 413 | `batch_too_large` | The batch has more than 100 calls. Nothing is charged. | | 500 | `configuration_error` | The route cannot serve requests right now. Nothing is charged. | | 503 | `payment_unavailable` | No payment option can be offered right now. Nothing is charged. Try again after the Retry-After seconds. | | 503 | `service_busy` | Too many requests at once. Nothing is charged. Try again after the Retry-After seconds. | | 502 | `settlement_failed` | The settlement result is unknown: the payment may have gone through, and no receipt is attached. Check on Solana or Base whether the payment you signed went through before you sign a new one. | | 502, 504 | `upstream_error`, `upstream_timeout` | The payment settled, but the chain did not answer, or did not answer in time. The receipt is still attached. Sending the request again takes a new payment. | On Solana, a call that would read too much, such as an unfiltered `getProgramAccounts` on a large program, is answered with HTTP 200 and a JSON-RPC error before any payment is asked for, so it costs nothing. ## Next steps - [How x402 prices a request](https://erpc.global/en/doc/x402/pricing/): the price of one call, the \$0.001 minimum and batches. - [x402 overview](https://erpc.global/en/doc/x402/overview/): every chain's route and the payment options. - [OpenAPI document](https://x402.erpc.global/doc): the request and response shape of every route. --- title: "How x402 prices a request" description: "A standard RPC call on x402.erpc.global costs $0.001. Heavier methods cost more by their weight, and a batch is priced as one request." canonical: "https://erpc.global/en/doc/x402/pricing/" locale: "en" --- # How x402 prices a request A standard call, such as `getSlot` or `eth_blockNumber`, costs \$0.001, the minimum for one request. Heavier calls, such as `eth_getLogs` or `getMultipleAccounts` for many accounts, cost more, by their weight. A batch is priced as one request, so the minimum is paid once for the whole batch. Every method's price is at [x402.erpc.global/pricing](https://x402.erpc.global/pricing), from the same tables that price your requests. ## How the price is worked out 1. Each method has a weight, counted in tokens. A token here is a unit of price, not a coin: one token is \$0.000001, so 1,000 tokens is \$0.001, paid as 0.001 USDC. 2. The weights of every call in the request are added up. 3. A total under 1,000 tokens is charged as 1,000 tokens, \$0.001: the smallest payment x402.erpc.global settles. A batch of `getSlot` and `getBlockHeight` weighs 42 + 42 = 84 tokens and costs \$0.001. A batch of `eth_blockNumber`, `eth_getLogs` and `eth_call` weighs 42 + 2,400 + 420 = 2,862 tokens and costs \$0.002862. ## Solana | Methods | Tokens | Price of one call | | --- | --- | --- | | Standard methods, such as `getBalance`, `getSlot` and `sendTransaction` | 42 | \$0.001 | | DAS methods, such as `getAsset`, and `getProgramAccounts` | 420 | \$0.001 | | `getMultipleAccounts` | 420 + 42 × N, where N is the number of accounts in the call | \$0.001 for up to 13 accounts, \$0.001008 for 14, up to \$0.00462 for 100 | | `getSignatureStatuses` | 42 + 42 × N, where N is the number of signatures in the call | \$0.001 for up to 22 signatures, \$0.001008 for 23, up to \$0.010794 for 256 | Every other method in /pricing weighs less than 1,000 tokens, so one call costs \$0.001; `getSignaturesForAddress`, for example, weighs 84. Unlike the other chains, Solana also takes a method /pricing does not list, at 42 tokens. The exceptions are the methods x402.erpc.global does not sell, such as `getLeaderSlots`, which are answered with an error and not charged. ## Ethereum and Base Base uses the Ethereum table. | Methods | Tokens | Price of one call | | --- | --- | --- | | Standard methods, such as `eth_blockNumber`, `eth_getBalance` and `eth_sendRawTransaction` | 42 | \$0.001 | | Calls that run code or build proofs, such as `eth_call`, `eth_estimateGas` and `eth_getProof` | 420 | \$0.001 | | Calls that return a lot of data, such as `eth_getLogs`, `eth_getBlockReceipts`, and `eth_getBlockByNumber` with full transactions | 2,400 | \$0.0024 | | `eth_simulateV1`, `eth_callMany` | 4,200 | \$0.0042 | A method outside the table, such as a `debug_*` or `trace_*` method, is answered with an error before payment. ## Avalanche `eth_*` methods use the Ethereum weights. Methods in the other namespaces, such as `avax.*`, `avm.*`, `platform.*` and `info.*`, weigh 42 tokens, so one call costs \$0.001. ## Chains with a flat price per call On Arbitrum, Arc, Bitcoin, BSC, Hyperliquid, Kaia, Monad, NEAR, Optimism, Polygon, Robinhood Chain, Soneium, Sui and TRON, every method weighs less than 1,000 tokens, so one call costs \$0.001. A method outside the chain's table is answered with an error before payment. ## Paying in EURC Pay with - USDC on Solana - USDC on Base - EURC on Base The price is set in US dollars. EURC is charged at par with USDC: the same number of units, with no exchange rate applied. A \$0.001 request is paid with 0.001 USDC or 0.001 EURC. ## Check the prices `GET https://x402.erpc.global/pricing` returns the table of every route, with each method's tokens and price. It is free. --- title: "Solana Yellowstone Geyser gRPC Quickstart" description: "Set up ERPC Solana Geyser gRPC streaming in TypeScript or Rust, configure your endpoint, and allow latency probes for region selection." canonical: "https://erpc.global/en/doc/geyser-grpc/quickstart/" locale: "en" --- # Solana Yellowstone Geyser gRPC Quickstart This guide shows how to connect a TypeScript or Rust application to an ERPC Solana Geyser gRPC endpoint using the open-source Solana Stream SDK. Use the endpoint assigned in your [ERPC Dashboard](https://dashboard.erpc.global/en) and allow ICMP probes so ERPC can measure network latency to your registered IP. For plan and service details, see [Solana Geyser gRPC](https://erpc.global/en/grpc/). ## Get your ERPC connection details 1. Open the [ERPC Dashboard](https://dashboard.erpc.global/en), select your Geyser gRPC service, and copy **your assigned streaming endpoint URL**, including its scheme. The hostname in the sample repository is illustrative and is not a working customer endpoint. 2. If you use the SDK samples below, provide an ERPC RPC API key for their `SOLANA_RPC_ENDPOINT` setting. That RPC URL supports the samples' auxiliary RPC/latency lookups; it does **not** replace the streaming endpoint. 3. Allow the ICMP sources in the next section so ERPC can measure latency to your registered IP for region selection. The SDK example templates contain a placeholder `X_TOKEN`: replace it only if your assigned endpoint requires token authentication; otherwise delete that line from the copied `.env` file. A token sent to a remote `http://` endpoint is unencrypted; use `https://` when transmitting a token. You can use the [Solana Stream SDK](https://github.com/ValidatorsDAO/solana-stream) in an existing application or run its TypeScript/Rust sample clients directly. Installing SLV is optional. ## Allow ICMP latency-probe sources For gRPC region selection, ERPC sends ICMP latency probes to your registered IP from the proxy hosts listed below. Allow inbound ICMP echo requests from every listed source IP. If they are blocked by a firewall (ufw, cloud firewall, security group, etc.), the measurement can become `9999ms` and a non-optimal region may be selected. Multiple IPs in one region are separate probe hosts; all of them are required. [ERPC_PING_SOURCES:grpc]: # | Region | ICMP source IPs | | --- | --- | | 🇳🇱 Amsterdam | `82.21.43.34`, `151.244.92.36` | | 🇺🇸 New York | `151.243.244.5` | | 🇩🇪 Frankfurt | `151.241.178.20`, `151.241.178.34`, `151.241.178.21` | | 🇬🇧 London | `151.241.65.4` | | 🇯🇵 Tokyo | `143.20.238.66` | | 🇸🇬 Singapore | `151.245.186.2` | | 🛰️ Far Point | `143.20.238.73` | ## Run a Solana Stream SDK sample The [Solana Stream SDK](https://github.com/ValidatorsDAO/solana-stream) provides standalone TypeScript starters under `temp-release/` that install the published SDK 4.0.0, plus Rust sample clients under `client/`. Clone once and choose **one** of the language-specific paths below. Each set of commands starts from the repository root immediately after cloning: ```bash git clone https://github.com/ValidatorsDAO/solana-stream.git cd solana-stream ``` ### TypeScript: Yellowstone Geyser gRPC Use the [standalone Geyser TypeScript starter](https://github.com/ValidatorsDAO/solana-stream/tree/main/temp-release/geyser-ts), Node.js 22 or 24 and pnpm. It depends on the **published** SDK rather than unbuilt native workspace packages. From the repository root, enter the starter and copy its `.env.example`: ```bash cd temp-release/geyser-ts cp .env.example .env ``` ```env GEYSER_ENDPOINT=YOUR_ASSIGNED_GEYSER_ENDPOINT_URL SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY" # X_TOKEN=YOUR_X_TOKEN # only if your endpoint requires a token ``` Run from inside the standalone starter directory: ```bash pnpm install pnpm dev ``` ![Geyser TypeScript sample in VSCode](https://erpc.global/doc/bot/GeyserTsStarter.jpg) ### Rust: Yellowstone Geyser gRPC **The Rust example uses `GRPC_ENDPOINT`, not `GEYSER_ENDPOINT`.** Its checked-in template is `.env.sample` (unlike the TypeScript example). Copy it and provide your actual values: ```bash cp client/geyser-rs/.env.sample client/geyser-rs/.env ``` ```env GRPC_ENDPOINT=YOUR_ASSIGNED_GEYSER_ENDPOINT_URL SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY" # X_TOKEN=YOUR_X_TOKEN # only if your endpoint requires a token ``` Review the example's `client/geyser-rs/config.jsonc` subscription filters, then run: ```bash cd client/geyser-rs RUST_LOG=info cargo run ``` ![Geyser Rust sample in VSCode](https://erpc.global/doc/bot/GeyserRsStarter.jpg) ## Optional: Generate a standalone starter with SLV If you prefer an interactive template generator instead of cloning the SDK repository, use SLV. It is **not required** to connect to ERPC. ```bash curl -fsSL https://storage.slv.dev/slv/install | sh slv b init ``` ![SLV client template selection](https://erpc.global/doc/bot/GeyserRustInit.jpg) Choose `geyser-ts` for TypeScript or `geyser-rust` for Rust. Configure the generated project's environment variables with the **assigned ERPC endpoint** and your own RPC key before running it. The CLI is a convenience for obtaining a starter, not an ERPC account setup step. ## Solana Stream SDK ![Solana Stream SDK](https://storage.validators.solutions/SolanaStreamSDK.jpg) The [open-source Solana Stream SDK](https://github.com/ValidatorsDAO/solana-stream) provides the Yellowstone Geyser gRPC client implementations used in these examples. Follow the sample repository's current README and its [SDK 4.0 migration guidance](https://github.com/ValidatorsDAO/solana-stream/blob/main/docs/migration-v4.md) when integrating the SDK into an existing application. For access, subscriptions and endpoint settings, return to the [ERPC Dashboard](https://dashboard.erpc.global/en). --- title: "Solana Geyser gRPC - gRPC Latency Test" description: "SLV - Solana Geyser gRPC - gRPC Latency Test" canonical: "https://erpc.global/en/doc/geyser-grpc/test/" locale: "en" --- # Solana Geyser gRPC - gRPC Latency Test This guide will show you how to test the latency of the Solana Geyser gRPC server. ## Prerequisites Install SLV CLI: ```bash curl -fsSL https://storage.slv.dev/slv/install | sh ``` ## Test gRPC Latency You can easily test the latency of the Solana Geyser gRPC server with the following command: ```bash slv check grpc --help Usage: slv check grpc Version: 0.9.0 Description: Check gRPC endpoint Options: -h, --help - Show this help. --endpoint - gRPC endpoint URL --token - Token for authentication ``` If you don't have a Geyser gRPC Access, please refer to the [Geyser gRPC Quickstart](https://erpc.global/en/doc/geyser-grpc/quickstart/) guide. ## Run the latency check To test a shared endpoint directly, run the following command with your own endpoint: ```bash slv check grpc --endpoint --token none ``` Example: ```bash ➜ ~ slv check grpc --endpoint http://grpc-ams1.erpc.global --token none Checking gRPC endpoint: http://grpc-ams1.erpc.global Current latency: 540 ms, slots: 0 Avg latency: 540 ms Current latency: 962 ms, slots: 1 Avg latency: 751 ms Current latency: 394 ms, slots: -1 Avg latency: 632 ms Current latency: 776 ms, slots: 0 Avg latency: 668 ms Current latency: 1157 ms, slots: 1 Avg latency: 765.8 ms Current latency: 529 ms, slots: 0 Avg latency: 726.3333333333334 ms Current latency: 891 ms, slots: 1 Avg latency: 749.8571428571429 ms Current latency: 249 ms, slots: -1 Avg latency: 687.25 ms ``` The test will then proceed to check the latency of the Geyser gRPC server. You can stop the test by pressing `Ctrl + C`. --- ## Reference: Understanding gRPC Latency When measuring gRPC latency, you might see values of over one second. This can initially feel "slow," but remember that Solana’s block time is only recorded at the second level—milliseconds are truncated. ### Connecting in the Same Region First, ensure your server is located in the same region as the gRPC endpoint. For instance, if you’re connecting to `grpc-ams1.erpc.global`, you should place your server in Amsterdam as well to minimize network latency. ### Why You Might See “Over 1 Second” Latency Consider a transaction that actually occurs at 07:46:46.900, but Solana records it as 07:46:46.000. If you receive it at 07:46:47.200, a straightforward calculation yields: ```text (Receive Time) - (Block Time) = 07:46:47.200 - 07:46:46.000 = 1.2 seconds ``` At first glance, this looks like 1.2 seconds of latency. However, because the transaction really happened at 07:46:46.900, the actual latency is only about 300ms: 07:46:47.200 - 07:46:46.900 = 0.3 seconds. ### Subtracting 500ms as an Approximation Because Solana rounds down to the nearest second, we don’t know exactly where in that second the transaction took place. A reasonable approximation is to assume a midpoint (500ms), so the formula becomes: ```text (Receive Time) - (Block Time + 0.5 seconds) ``` While not perfectly precise, this helps offset the missing millisecond data, providing a closer estimate of actual gRPC latency. By keeping these considerations in mind, you can more accurately gauge Solana Geyser gRPC latency. The second-level time recording on Solana necessitates factoring in potential rounding discrepancies, as well as ensuring proper server and endpoint placement to reflect real-world performance. --- title: "Geyser gRPC - Best Practices" description: "Essential tips for production-grade Geyser gRPC clients, including ping/pong, reconnection, and filters. Solana Stream SDK supports Geyser gRPC." canonical: "https://erpc.global/en/doc/geyser-grpc/best-practices/" locale: "en" --- # Geyser gRPC - Best Practices This guide covers essential patterns for building robust, production-ready applications with Geyser gRPC. Solana Stream SDK supports Geyser gRPC. ## Getting started - Start simple: begin with slot subscriptions to get familiar with streaming before adding complex filters. - Use filters wisely: subscribe only to what you need to reduce bandwidth/CPU. ```rust SubscribeRequestFilterTransactions { vote: Some(false), // Exclude vote txs failed: Some(false), // Exclude failed txs ..Default::default() } ``` ## Connection management - Automatic reconnection: expect network issues; reconnect with exponential backoff. - Ping/pong handling: Yellowstone gRPC servers send ping. Always respond with pong or the server can close the connection (common cause of ~30s disconnects). ```rust if matches!(update.update_oneof, Some(UpdateOneof::Ping(_))) { subscribe_tx.send(SubscribeRequest { ping: Some(SubscribeRequestPing { id: 1 }), ..Default::default() }).await?; } ``` - Gap recovery: use `from_slot` after reconnecting to avoid data loss (duplicates are acceptable). ```rust subscribe_request.from_slot = if tracked_slot > 0 { Some(tracked_slot) // Optionally subtract a small buffer to dodge reorgs } else { None }; ``` ## Architecture patterns - Separate ingress and processing with channels to decouple network IO from business logic and add backpressure. ```rust let (tx, rx) = mpsc::channel::(10_000); // ingress task reads stream and tx.send(...) // processing task consumes rx and does business logic ``` - Use bounded channels: choose capacity based on processing speed and data-loss tolerance (smaller = less memory, more drops; larger = more memory, fewer drops). ## Performance and resiliency - Monitor processing latency and log when thresholds are exceeded. - Batch DB writes; flush on batch size or interval. - Use async IO for external calls; offload heavy compute to worker tasks/threads. - Reuse subscription requests to reduce allocations. ## Error handling - Distinguish error types (stream vs processing vs channel). - Repair an invalid request before retrying it; use a pause-aware exponential backoff only when a response calls for retry. - Log/metric dropped updates to track slow-consumer conditions. ## Repair before retry and pause-aware backoff Keep the first gRPC error before a reconnect loop replaces it. Record its status and message, plus any `x-erpc-error-code`, `x-erpc-error-reason`, `x-erpc-doc-url`, `x-erpc-retry-after-seconds`, and `x-erpc-retry-at` metadata that are present. An early connection close can look like a generic transport error, so it may not include every trailer. Repair an invalid request, rejected filter shape, or IP-registration mismatch before retrying. For an ERPC pause, wait for the returned deadline; it is more specific than a local backoff. Use a bounded exponential backoff for availability failures and other retryable responses. Do not repeatedly retry an unchanged request merely because it returned a non-zero status. ## Resource use and processing capacity Shared protections keep one workload from consuming delivery capacity needed by other ERPC customers. A stream can become slow because of effective bandwidth, CPU, memory, the consumer queue, database writes, or external calls. Sufficient resources must match the workload; a slow receiver does not by itself identify which part is constrained. Measure the peak data rate at the consumer. Convert MB/s to Mbps with `MB/s × 8`, then leave headroom above the measured peak. There is no fixed unmeasured minimum. Keep receive work short, hand updates to a bounded queue, and scale or reduce the subscription if processing cannot keep up. A bounded queue limits memory use; it cannot resolve a sustained slow consumer. ## Data management - Handle duplicates when using `from_slot` (time-bounded cache or DB constraints). - Pick commitment per use case: - processed: fastest dashboards, may roll back - confirmed: good default for most apps/indexers - finalized: when absolute certainty is required ## Dynamic subscriptions Use the bidirectional stream to update subscriptions at runtime (hot-swap filters, expand coverage) without reconnecting. ## Production checklist - ✅ Auto reconnection with exponential backoff - ✅ Gap recovery using `from_slot` - ✅ Ping/pong handling (avoid 30s disconnects) - ✅ Separate ingress and processing with bounded channels/backpressure - ✅ Error logging and metrics/alerting - ✅ Processing latency tracking - ✅ Duplicate handling and filter optimization - ✅ Batch writes (if persisting) - ✅ Graceful shutdown and health checks ## Additional resources - Solana Stream SDK (Geyser gRPC support): https://github.com/ValidatorsDAO/solana-stream --- title: "Solana Geyser gRPC - Speed Comparison" description: "Compare Shredstream, gRPC, and RPC endpoints with slv check geyserbench" canonical: "https://erpc.global/en/doc/geyser-grpc/speed-comparison/" locale: "en" --- # Solana Geyser gRPC - Speed Comparison `slv check geyserbench` is a Solana benchmark command for comparing Shredstream, gRPC, and RPC performance. Choose the connection kind, enter the endpoints you want to compare, and the CLI will show win rate, p50, p95, p99, ping, firsts, and backfill in one report. ![slv check geyserbench](https://erpc.global/doc/general/slv-check-geyserbench.jpg) ## Install first ```bash curl -fsSL https://storage.slv.dev/slv/install | sh ``` You can use the command immediately after installation. ## Basic usage ```bash slv check geyserbench --help Usage: slv check geyserbench Version: 2026.4.3.1321 Description: Run geyserbench with generated config Options: -h, --help - Show this help. --kind - Benchmark kind: shredstream | grpc | rpc --region - Benchmark region for region-aware measurement --endpoint - Endpoint URL to compare --transactions - Transaction sample size (Default: 10000) ``` Interactive mode is straightforward: ```bash slv check geyserbench ? Benchmark kind (shredstream / grpc / rpc): (shredstream) › ? Region (--region) for accurate measurement: (frankfurt) › ? First endpoint URL: › ``` Pick the transport first, choose the region, and then enter the endpoints you want to compare. ## Why region-aware measurement matters Solana is global, and leaders rotate while blocks are produced. Because data propagation speed depends on how close you are to the current leader, regions closer to leader slots can receive data faster. That means region-by-region comparison gives a more accurate view than looking only at global averages. This is especially useful for global apps and for very low-latency workloads such as high-frequency trading, where saving even 1 ms matters. --- title: "Solana Geyser gRPC - Filters" description: "SLV - Solana Geyser gRPC - Filters" canonical: "https://erpc.global/en/doc/geyser-grpc/filter/" locale: "en" --- # Solana Geyser gRPC - Filters ![Solana Stream SDK](https://storage.validators.solutions/SolanaStreamSDK.jpg) The Solana Stream SDK is provided as open-source software. For more details, please visit the GitHub repository below. [https://github.com/ValidatorsDAO/solana-stream](https://github.com/ValidatorsDAO/solana-stream) ### Overview of gRPC Filters Solana Geyser gRPC uses filters to efficiently fetch only the data you are interested in, such as specific accounts, programs, transactions, slots, and blocks. Below, we provide TypeScript examples using the Solana Stream SDK, clearly explaining the specific roles of each filter. The structure and meaning of the filters are identical when using Rust. ## Current Shared filter rules On the current Shared plan, every non-empty `blocks` map is Dedicated-only, including a request narrowed with `accountInclude` or by excluding transactions. Use a transaction subscription or `blocksMeta` when it meets the requirement; neither is a full-block equivalent. A Dedicated Geyser gRPC stream is required for full blocks. Each account-filter entry must include `account`, `owner`, or a supported cuckoo filter. A `memcmp` or `dataSize` condition alone does not select a supported account shape. Narrow the request to one of those selectors, or use Dedicated Geyser gRPC when a full account stream is required. ## Roles and Examples of Each Filter ### Subscribe to an account Subscribe to real-time updates for a specific account. The following example subscribes to the SOL-USDC OpenBook account at the Confirmed commitment level: ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: { slots: {} }, accounts: { 'wsol/usdc': { account: ['8BnEgHoWFysVcuFFX7QztDmzuH8r5ZFvyP3sYwn1XTh6'], }, }, transactions: {}, blocks: {}, blocksMeta: {}, accountsDataSlice: [], commitment: CommitmentLevel.CONFIRMED, } ``` - `"wsol/usdc"` is a client-defined label. - Multiple filters for accounts, programs, blocks, and slots can be combined in a single JSON request. ### Subscribe to an account with `account_data_slice` This example demonstrates retrieving only a specific portion of account data. Instead of fetching the entire data (165 bytes) of a USDC token account, it retrieves 40 bytes starting from offset 32. This range includes information such as the owner and lamports balance. ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: {}, accounts: { usdc: { owner: ['TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'], filters: [ { tokenAccountState: true, }, { memcmp: { offset: 0, data: { base58: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', }, }, }, ], }, }, transactions: {}, blocks: {}, blocksMeta: {}, entry: {}, commitment: CommitmentLevel.CONFIRMED, accountsDataSlice: [{ offset: 32, length: 40 }], } ``` ### Subscribe to a program This example demonstrates subscribing to account updates associated with a specific program. Below, we subscribe to account updates for accounts owned by the Solend program at the `Processed` commitment level. ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: { slots: {}, }, accounts: { solend: { owner: ['So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo'], }, }, transactions: {}, blocks: {}, blocksMeta: {}, accountsDataSlice: [], commitment: CommitmentLevel.PROCESSED, } ``` - `"solend"` is a custom label that can be freely set by the client. - To subscribe to multiple programs, please refer to the next section titled "Subscribe to multiple programs." ### Subscribe to multiple programs This example demonstrates how to subscribe to account updates associated with multiple programs at once. The example below subscribes to updates for accounts owned by both Solend and Serum programs. ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: { slots: {}, }, accounts: { programs: { owner: [ 'So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo', '9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin', ], }, }, transactions: {}, blocks: {}, blocksMeta: {}, accountsDataSlice: [], commitment: CommitmentLevel.PROCESSED, } ``` If you prefer assigning individual labels to each program, use the following approach: ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: { slots: {}, }, accounts: { solend: { owner: ['So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo'], }, serum: { owner: ['9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin'], }, }, transactions: {}, blocks: {}, blocksMeta: {}, accountsDataSlice: [], commitment: CommitmentLevel.PROCESSED, } ``` ### Subscribe to all finalized non-vote and non-failed transactions This example demonstrates subscribing to all transactions at the `Finalized` commitment level, excluding vote transactions and failed transactions. ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: { slots: {}, }, accounts: {}, transactions: { alltxs: { vote: false, failed: false, }, }, blocks: {}, blocksMeta: {}, accountsDataSlice: [], commitment: CommitmentLevel.FINALIZED, } ``` - `vote: false` excludes vote transactions. - `failed: false` excludes failed transactions. - If fields are left empty, all transactions are retrieved. - When multiple fields are specified, they operate with an AND condition. ### Subscribe to non-vote transactions mentioning an account This example demonstrates subscribing to transactions involving a specific account but excluding vote transactions. The example below subscribes to non-vote transactions mentioning accounts associated with the Serum program. ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: { slots: {}, }, accounts: {}, transactions: { serum: { vote: false, accountInclude: ['9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin'], }, }, blocks: {}, blocksMeta: {}, accountsDataSlice: [], commitment: CommitmentLevel.PROCESSED, } ``` ### Subscribe to transactions excluding accounts This example demonstrates subscribing to transactions excluding those involving specific accounts. The example below retrieves transactions excluding any accounts owned by the Serum and Tokenkeg programs. ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: { slots: {}, }, accounts: {}, transactions: { serum: { accountExclude: [ '9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin', 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', ], }, }, blocks: {}, blocksMeta: {}, accountsDataSlice: [], commitment: CommitmentLevel.PROCESSED, } ``` ### Subscribe to transactions mentioning accounts & excluding certain accounts This example demonstrates subscribing to transactions involving certain accounts, while explicitly excluding other specified accounts. The example below subscribes to transactions mentioning Serum's account but excludes a specified account: ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: { slots: {}, }, accounts: {}, transactions: { serum: { accountInclude: ['9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin'], accountExclude: ['9wFFyRfZBsuAha4YcuxcXLKwMxJR43S7fPfQLusDBzvT'], }, }, blocks: {}, blocksMeta: {}, accountsDataSlice: [], commitment: CommitmentLevel.PROCESSED, } ``` ### Subscribe to a transaction signature This example demonstrates subscribing to real-time updates for a specific transaction signature, until it reaches the `Confirmed` or `Finalized` state. ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: {}, accounts: {}, transactions: { sign: { signature: '5rp2hL9b6kexex11Mugfs3vfU9GhieKruj4CkFFSnu52WLxiGn4VcLLwsB62XURhMmT1j4CZiXT6FFtYbXsLq2Zs', }, }, blocks: {}, blocksMeta: {}, accountsDataSlice: [], commitment: CommitmentLevel.PROCESSED, } ``` ### Subscribe to slots This example demonstrates subscribing to notifications of incoming slots. No additional details are required beyond assigning a custom tag name: ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: { incoming_slots: {}, }, accounts: {}, transactions: {}, blocks: {}, blocksMeta: {}, accountsDataSlice: [], commitment: CommitmentLevel.PROCESSED, } ``` ### Subscribe to blocks (Dedicated-only on the current Shared plan) Subscribe to real-time updates of all generated blocks. By default, all transactions within a block will be retrieved: ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: {}, accounts: {}, transactions: {}, blocks: { blocks: {}, }, blocksMeta: {}, accountsDataSlice: [], commitment: CommitmentLevel.PROCESSED, } ``` #### To exclude transactions and only retrieve updated account information (Dedicated-only on the current Shared plan): ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: {}, accounts: {}, transactions: {}, blocks: { blocks: { includeTransactions: false, includeAccounts: true, }, }, blocksMeta: {}, accountsDataSlice: [], commitment: CommitmentLevel.PROCESSED, } ``` #### To only retrieve transactions/accounts involving specific accounts (Dedicated-only on the current Shared plan): ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: {}, accounts: {}, transactions: {}, blocks: { blocks: { accountInclude: ['So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo'], }, }, blocksMeta: {}, accountsDataSlice: [], commitment: CommitmentLevel.PROCESSED, } ``` ### Subscribe to block metadata Subscribe only to block metadata notifications when blocks are processed. Detailed transaction data is not included. ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' const request = { slots: {}, accounts: {}, transactions: {}, blocks: {}, blocksMeta: { blockmetadata: {}, }, accountsDataSlice: [], commitment: CommitmentLevel.PROCESSED, } ``` ## Managing commitment levels The Solana Geyser gRPC stream defaults to the `Processed` commitment level. You can specify higher commitment levels such as `Confirmed` or `Finalized`. In these cases, Geyser buffers the data and sends notifications once the specified commitment level is reached. For maximum performance, it is recommended to handle commitment-level management on the client side. Here's how to specify commitment levels: ```typescript import { CommitmentLevel } from '@validators-dao/solana-stream-sdk' enum CommitmentLevel { PROCESSED = 0, CONFIRMED = 1, FINALIZED = 2, } ``` - **`PROCESSED`**: Immediate data after processing. Fast retrieval, but not yet confirmed. - **`CONFIRMED`**: Data confirmed by the cluster, providing increased certainty. - **`FINALIZED`**: Fully finalized data with no risk of reorganization. ### Benefits of working at `Processed` The main advantage of the `Processed` commitment level is immediate transaction retrieval, enabling rapid client-side processing. Clients can subsequently detect transitions to `Confirmed` or `Finalized`, offering quick responsiveness. ### How to manage `Confirmed` and `Finalized` When using `Confirmed` or `Finalized` levels, events (transactions or account updates) should be buffered per slot. Buffer events slot by slot, subscribe to slot notifications, and release events from the buffer once a specific slot reaches the desired commitment (`Confirmed` or `Finalized`). Events will initially be received before a slot reaches `Confirmed` or `Finalized`. ### The special thing about `Finalized` Due to Solana Geyser specifications, not all slots receive explicit finalized notifications. Therefore, when you receive a finalized notification for a slot, you must treat all ancestor slots as finalized, even if no notifications were received explicitly. Specifically, upon receiving a finalized notification, retroactively treat all ancestor slots as finalized. --- title: "Geyser gRPC - Code Examples" description: "Practical Rust examples for Geyser gRPC including durable clients, slots, accounts, transactions, and ping/pong. Solana Stream SDK supports Geyser gRPC." canonical: "https://erpc.global/en/doc/geyser-grpc/code-examples/" locale: "en" --- # Geyser gRPC - Code Examples Practical Rust examples for common Geyser gRPC use cases. Fill in your Geyser gRPC endpoint. Solana Stream SDK supports Geyser gRPC. ## Basic subscription: all non-vote, non-failed transactions This is intentionally a broad transaction subscription. Excluding failed transactions reduces traffic, but the remaining stream can still be substantial. Add the account, signature, or transaction filters that match the work your consumer actually needs, and keep processing outside the receive loop. ```rust use anyhow::Result; use futures::{sink::SinkExt, stream::StreamExt}; use solana_signature::Signature; use std::collections::HashMap; use solana_stream_sdk::{ GeyserCommitmentLevel as CommitmentLevel, GeyserGrpcClient, GeyserSubscribeRequest as SubscribeRequest, GeyserSubscribeRequestFilterTransactions as SubscribeRequestFilterTransactions, GeyserUpdateOneof as UpdateOneof, }; #[tokio::main] async fn main() -> Result<()> { let endpoint = "http://your-erpc-grpc-endpoint"; // Set your ERPC gRPC URL let mut client = GeyserGrpcClient::build_from_shared(endpoint)? .connect() .await?; let (mut tx, mut stream) = client.subscribe().await?; tx.send(SubscribeRequest { transactions: HashMap::from([( "all_transactions".to_string(), SubscribeRequestFilterTransactions { vote: Some(false), // Drop vote txs failed: Some(false), // Drop failed txs ..Default::default() }, )]), commitment: Some(CommitmentLevel::Confirmed as i32), ..Default::default() }) .await?; while let Some(Ok(msg)) = stream.next().await { if let Some(UpdateOneof::Transaction(tx)) = msg.update_oneof { let sig = tx .transaction .and_then(|t| Signature::try_from(t.signature.as_slice()).ok()) .unwrap_or_default(); println!("Slot: {} | Signature: {}", tx.slot, sig); } } Ok(()) } ``` ## Durable client with bounded reconnect after clean closure, gap recovery, ping/pong ```rust use anyhow::Result; use futures::stream::StreamExt; use std::{collections::HashMap, time::Duration}; use solana_stream_sdk::{ GeyserCommitmentLevel as CommitmentLevel, GeyserGrpcClient, GeyserSlotStatus as SlotStatus, GeyserSubscribeRequest as SubscribeRequest, GeyserSubscribeRequestFilterSlots as SubscribeRequestFilterSlots, GeyserUpdateOneof as UpdateOneof, }; #[tokio::main] async fn main() -> Result<()> { let endpoint = "http://your-erpc-grpc-endpoint"; let mut subscribe_request = SubscribeRequest { slots: HashMap::from([( "slots".to_string(), SubscribeRequestFilterSlots::default(), )]), commitment: Some(CommitmentLevel::Confirmed as i32), ..Default::default() }; let mut tracked_slot: u64 = 0; let mut retry_delay = Duration::from_secs(1); let max_retry_delay = Duration::from_secs(30); let mut first_diagnostic: Option = None; loop { let mut client = match GeyserGrpcClient::build_from_shared(endpoint)?.connect().await { Ok(client) => client, Err(error) => { let current_diagnostic = error.to_string(); first_diagnostic.get_or_insert_with(|| current_diagnostic.clone()); eprintln!("Connection error: {current_diagnostic}"); tokio::time::sleep(retry_delay).await; retry_delay = (retry_delay * 2).min(max_retry_delay); continue; } }; subscribe_request.from_slot = if tracked_slot > 0 { Some(tracked_slot) } else { None }; let (mut _sink, mut stream) = match client .subscribe_with_request(Some(subscribe_request.clone())) .await { Ok(subscription) => subscription, Err(error) => { let current_diagnostic = error.to_string(); first_diagnostic.get_or_insert_with(|| current_diagnostic.clone()); eprintln!("Subscribe error: {current_diagnostic}"); eprintln!("First diagnostic retained: {}", first_diagnostic.as_deref().unwrap()); return Err(error.into()); } }; loop { match stream.next().await { Some(Ok(msg)) => { retry_delay = Duration::from_secs(1); if let Some(UpdateOneof::Slot(slot)) = msg.update_oneof { tracked_slot = slot.slot; println!( "Slot: {} | Status: {:?}", slot.slot, SlotStatus::try_from(slot.status).unwrap() ); } } Some(Err(error)) => { let current_diagnostic = error.to_string(); first_diagnostic.get_or_insert_with(|| current_diagnostic.clone()); eprintln!("Stream error: {current_diagnostic}"); eprintln!("First diagnostic retained: {}", first_diagnostic.as_deref().unwrap()); return Err(error.into()); } None => break, } } tokio::time::sleep(retry_delay).await; retry_delay = (retry_delay * 2).min(max_retry_delay); } } ``` This conservative sample retries connection-establishment failures and clean stream closures only. It stops on a gRPC subscribe or stream error after logging the current diagnostic and retaining the first one. Examine the displayed ERPC correction and any server retry information before manually retrying. Production code may explicitly retry known transient failures, but it must honor a server pause and must not repeatedly send an unchanged rejected request. ## Stream accounts for a mint (token accounts) ```rust SubscribeRequest { accounts: HashMap::from([( "token_accounts_by_mint".to_string(), SubscribeRequestFilterAccounts { owner: vec!["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA".to_string()], filters: vec![ SubscribeRequestFilterAccountsFilter { filter: Some(Filter::TokenAccountState(true)), }, SubscribeRequestFilterAccountsFilter { filter: Some(Filter::Memcmp(SubscribeRequestFilterAccountsFilterMemcmp { offset: 0, data: Some(Data::Base58( "pumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn".to_string(), // replace with mint )), })), }, ], ..Default::default() }, )]), commitment: Some(CommitmentLevel::Confirmed as i32), ..Default::default() } ``` ## Stream transactions (successful, non-vote) ```rust SubscribeRequest { transactions: HashMap::from([( "all_transactions".to_string(), SubscribeRequestFilterTransactions { vote: Some(false), failed: Some(false), ..Default::default() }, )]), commitment: Some(CommitmentLevel::Confirmed as i32), ..Default::default() } ``` ## Production-grade client highlights - Durable client with reconnection and gap recovery (`from_slot`) - Ping/pong handling to keep the stream alive - Bounded channels/backpressure between ingress and processing - Dynamic subscription updates on the same bidi stream - Error handling, metrics, and logging for slow consumers/dropped updates ### Composed client pattern (gap recovery, ping/pong, dynamic subscriptions) This composition shows bounded ingress and dynamic subscriptions. Its ingress task waits and reconnects only after a connection-establishment failure or a clean end of stream. A gRPC subscription or stream error is reported and stops the task so its correction and retry information can be examined; it is not a generic retry policy. ```rust use futures::{SinkExt, stream::StreamExt}; use solana_signature::Signature; use std::{collections::HashMap, sync::Arc, time::Duration}; use tokio::sync::{RwLock, mpsc}; use solana_stream_sdk::{ GeyserCommitmentLevel as CommitmentLevel, GeyserGrpcClient, GeyserSlotStatus, GeyserSubscribeRequest as SubscribeRequest, GeyserSubscribeRequestFilterSlots as SubscribeRequestFilterSlots, GeyserSubscribeRequestFilterTransactions as SubscribeRequestFilterTransactions, GeyserSubscribeUpdate as SubscribeUpdate, GeyserUpdateOneof as UpdateOneof, }; use solana_stream_sdk::yellowstone_grpc_proto::geyser::SubscribeRequestPing; const UPDATE_CHANNEL_CAPACITY: usize = 10_000; #[tokio::main] async fn main() { let endpoint = "http://your-erpc-grpc-endpoint".to_string(); let subscribe_request = Arc::new(RwLock::new(SubscribeRequest { slots: HashMap::from([( "slots".to_string(), SubscribeRequestFilterSlots { ..Default::default() }, )]), transactions: HashMap::from([( "all_transactions".to_string(), SubscribeRequestFilterTransactions { vote: Some(false), failed: Some(false), ..Default::default() }, )]), commitment: Some(CommitmentLevel::Confirmed as i32), ..Default::default() })); let (updates_tx, updates_rx) = mpsc::channel::(UPDATE_CHANNEL_CAPACITY); let (subscribe_tx, subscribe_rx) = mpsc::unbounded_channel::(); let dispatcher_handle = tokio::spawn(async move { dispatcher_loop(updates_rx).await; }); let ingress_handle = tokio::spawn(async move { ingress_loop( updates_tx, subscribe_rx, endpoint, subscribe_request, ) .await; }); if let Err(e) = tokio::join!(dispatcher_handle, ingress_handle).0 { println!("Error: {:?}", e); } } async fn ingress_loop( updates_tx: mpsc::Sender, mut subscribe_rx: mpsc::UnboundedReceiver, endpoint: String, subscribe_request: Arc>, ) { let mut tracked_slot: u64 = 0; let mut retry_delay = Duration::from_secs(1); let max_retry_delay = Duration::from_secs(30); loop { let builder = match GeyserGrpcClient::build_from_shared(endpoint.clone()) { Ok(builder) => builder, Err(error) => { eprintln!("Client configuration error: {error}"); return; } }; let mut client = match builder.connect().await { Ok(client) => client, Err(error) => { eprintln!("Connection error: {error}"); tokio::time::sleep(retry_delay).await; retry_delay = (retry_delay * 2).min(max_retry_delay); continue; } }; subscribe_request.write().await.from_slot = if tracked_slot > 0 { Some(tracked_slot) } else { None }; match client .subscribe_with_request(Some(subscribe_request.read().await.clone())) .await { Ok((mut subscribe_tx, mut stream)) => { loop { tokio::select! { subscription = subscribe_rx.recv() => { match subscription { Some(subscribe_request) => { if let Err(error) = subscribe_tx.send(subscribe_request).await { eprintln!("Subscription update error: {error}"); return; } } None => return, } } result = stream.next() => { match result { Some(Ok(update)) => { retry_delay = Duration::from_secs(1); if matches!(update.update_oneof, Some(UpdateOneof::Ping(_))) { if let Err(error) = subscribe_tx .send(SubscribeRequest { ping: Some(SubscribeRequestPing { id: 1 }), ..Default::default() }) .await { eprintln!("Ping response error: {error}"); return; } } if matches!(update.update_oneof, Some(UpdateOneof::Ping(_)) | Some(UpdateOneof::Pong(_))) { continue; } if let Some(UpdateOneof::Slot(ref slot_update)) = update.update_oneof { tracked_slot = slot_update.slot; continue; } if let Err(error) = updates_tx.send(update.clone()).await { eprintln!("Update consumer stopped: {error}"); return; } } Some(Err(error)) => { eprintln!("Stream error: {error}"); return; } None => { println!("Stream ended cleanly"); break; } } } } } } Err(error) => { eprintln!("Subscribe error: {error}"); return; } }; println!("Disconnected; retrying after bounded backoff..."); tokio::time::sleep(retry_delay).await; retry_delay = (retry_delay * 2).min(max_retry_delay); } } async fn dispatcher_loop(mut updates_rx: mpsc::Receiver) { loop { if let Some(update) = updates_rx.recv().await { match update.update_oneof { Some(UpdateOneof::Transaction(tx)) => { let sig = tx .transaction .and_then(|t| Signature::try_from(t.signature.as_slice()).ok()) .unwrap_or_default(); println!("Slot: {} | Signature: {}", tx.slot, sig); } _ => { println!("Received update: {:?}", update); } } } } } ``` ## Contributing examples Found a useful pattern? Consider contributing it to these docs. Solana Stream SDK repository: https://github.com/ValidatorsDAO/solana-stream --- title: "Solana ShredStream Quickstart" description: "Connect a TypeScript or Rust client to ERPC Solana ShredStream, configure your assigned endpoint, and allow latency probes for region selection." canonical: "https://erpc.global/en/doc/shredstream/quickstart/" locale: "en" --- # Solana ShredStream Quickstart Use this guide to connect a TypeScript or Rust client to an ERPC Solana ShredStream endpoint using the open-source Solana Stream SDK. Configure the endpoint assigned in your [ERPC Dashboard](https://dashboard.erpc.global/en), then allow the ICMP latency probes used for region selection. To compare ShredStream and UDP Forwarding, see [Solana Shreds](https://erpc.global/en/shreds/). ## Get your ERPC connection details 1. Open the [ERPC Dashboard](https://dashboard.erpc.global/en), select your ShredStream service, and copy **your assigned streaming endpoint URL**, including its scheme. The hostname in the sample repository is illustrative and is not a working customer endpoint. 2. If you use the SDK samples below, provide an ERPC RPC API key for their `SOLANA_RPC_ENDPOINT` setting. That RPC URL supports the samples' auxiliary RPC/latency lookups; it does **not** replace the streaming endpoint. 3. Allow the ICMP sources in the next section so ERPC can measure latency to your registered IP for region selection. You can use the [Solana Stream SDK](https://github.com/ValidatorsDAO/solana-stream) in an existing application or run its TypeScript/Rust sample clients directly. Installing SLV is optional. ## Allow ICMP latency-probe sources For Shreds region selection, ERPC sends ICMP latency probes to your registered IP from the proxy hosts listed below. Allow inbound ICMP echo requests from every listed source IP. If they are blocked by a firewall (ufw, cloud firewall, security group, etc.), the measurement can become `9999ms` and a non-optimal region may be selected. Multiple IPs in one region are separate probe hosts; all of them are required. [ERPC_PING_SOURCES:shreds]: # | Region | ICMP source IPs | | --- | --- | | 🇳🇱 Amsterdam | `82.21.43.35` | | 🇺🇸 New York | `151.243.244.162` | | 🇩🇪 Frankfurt | `151.241.178.73` | | 🇯🇵 Tokyo | `143.20.238.88` | | 🇸🇬 Singapore | `151.245.186.3` | | 🇬🇧 London | `151.241.65.10` | [ERPC_FAR_POINT_GUIDANCE_START:shreds]: # ### Far Point selected Shared Shreds Far Point is a limited-capacity fallback. Each endpoint supports up to 32 concurrent proxied streams across all customers—not 32 slots per customer. Streaming is most effective when the subscriber runs near the selected Shreds endpoint; long-distance streams retain shared connections, flow-control windows, and egress capacity for longer. To help keep the shared environment responsive, allow every listed regional ICMP probe source and run region selection again. For ongoing use, consider an ERPC VPS near the selected endpoint. UDP Forwarding comes as Standard and Premium, and with either you choose its region in the ERPC Web Dashboard and receive raw Shreds over UDP at the public IPv4 address and port you configure. [Use an ERPC VPS near this endpoint](https://erpc.global/en/vps/) · [Compare UDP Forwarding options](https://erpc.global/en/shreds/) [ERPC_FAR_POINT_GUIDANCE_END:shreds]: # ## Run a Solana Stream SDK sample The [Solana Stream SDK](https://github.com/ValidatorsDAO/solana-stream) provides standalone TypeScript starters under `temp-release/` that install the published SDK 4.0.0, plus Rust sample clients under `client/`. Clone once and choose **one** of the language-specific paths below. Each set of commands starts from the repository root immediately after cloning: ```bash git clone https://github.com/ValidatorsDAO/solana-stream.git cd solana-stream ``` ### TypeScript: ShredStream Use the [standalone ShredStream TypeScript starter](https://github.com/ValidatorsDAO/solana-stream/tree/main/temp-release/shreds-ts), Node.js 22 or later and pnpm. It installs the **published** SDK instead of depending on locally unbuilt native workspace packages. From the repository root, enter the starter and copy its `.env.example`: ```bash cd temp-release/shreds-ts cp .env.example .env ``` ```env SHREDS_ENDPOINT=YOUR_ASSIGNED_SHREDSTREAM_ENDPOINT_URL SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY" ``` Run from inside the standalone starter directory: ```bash pnpm install pnpm dev ``` ![ShredStream TypeScript sample in VSCode](https://erpc.global/doc/bot/ShredsTsStarter.jpg) ### Rust: ShredStream Copy the Rust sample's `.env.example` file and configure the same two variables: ```bash cp client/shreds-rs/.env.example client/shreds-rs/.env ``` ```env SHREDS_ENDPOINT=YOUR_ASSIGNED_SHREDSTREAM_ENDPOINT_URL SOLANA_RPC_ENDPOINT="https://edge.erpc.global?api-key=YOUR_API_KEY" ``` Run the example: ```bash cd client/shreds-rs RUST_LOG=info cargo run ``` ![ShredStream Rust sample in VSCode](https://erpc.global/doc/bot/ShredsRsStarter.jpg) The shared ShredStream service in this guide streams over gRPC. **UDP Shreds Forwarding is a separate product and requires a UDP receiver.** See [Solana Shreds](https://erpc.global/en/shreds/) for the available options. SDK filtering in the Shreds sample is experimental; verify completeness for your use case. ## Optional: Generate a standalone starter with SLV If you prefer an interactive template generator instead of cloning the SDK repository, use SLV. It is **not required** to connect to ERPC. ```bash curl -fsSL https://storage.slv.dev/slv/install | sh slv b init ``` ![SLV client template selection](https://erpc.global/doc/bot/ShredsTsInit.jpg) Choose `shreds-ts` for TypeScript or `shreds-rust` for Rust. Configure the generated project's environment variables with the **assigned ERPC endpoint** and your own RPC key before running it. The CLI is a convenience for obtaining a starter, not an ERPC account setup step. ## Solana Stream SDK ![Solana Stream SDK](https://storage.validators.solutions/SolanaStreamSDK.jpg) The [open-source Solana Stream SDK](https://github.com/ValidatorsDAO/solana-stream) provides the ShredStream client implementations used in these examples. Follow the sample repository's current README and its [SDK 4.0 migration guidance](https://github.com/ValidatorsDAO/solana-stream/blob/main/docs/migration-v4.md) when integrating the SDK into an existing application. For access, subscriptions and endpoint settings, return to the [ERPC Dashboard](https://dashboard.erpc.global/en). --- title: "Solana Shreds - Connectivity Test" description: "SLV - Solana Shreds - Connectivity Test" canonical: "https://erpc.global/en/doc/shredstream/test/" locale: "en" --- # Solana Shreds - Connectivity Test ## Install SLV ```bash curl -fsSL https://storage.slv.dev/slv/install | sh ``` ## $ slv check shreds ```bash slv check shreds ``` ![slv check shreds](https://erpc.global/doc/shredstream/CheckShreds.jpg) This command tests the connectivity of your Shredstream endpoint. Once you enter the endpoint, the tool will check whether the connection is successful. ![slv check shreds](https://erpc.global/doc/shredstream/CheckShredsRunning.jpg) Open the dashboard: https://dashboard.erpc.global/en --- title: "Solana Shreds - Speed Comparison" description: "Compare Shredstream, gRPC, and RPC endpoints with slv check geyserbench" canonical: "https://erpc.global/en/doc/shredstream/speed-comparison/" locale: "en" --- # Solana Shreds - Speed Comparison `slv check geyserbench` is a Solana benchmark command for comparing Shredstream, gRPC, and RPC performance. Choose the connection kind, enter the endpoints you want to compare, and the CLI will show win rate, p50, p95, p99, ping, firsts, and backfill in one report. ![slv check geyserbench](https://erpc.global/doc/general/slv-check-geyserbench.jpg) ## Install first ```bash curl -fsSL https://storage.slv.dev/slv/install | sh ``` You can use the command immediately after installation. ## Basic usage ```bash slv check geyserbench --help Usage: slv check geyserbench Version: 2026.4.3.1321 Description: Run geyserbench with generated config Options: -h, --help - Show this help. --kind - Benchmark kind: shredstream | grpc | rpc --region - Benchmark region for region-aware measurement --endpoint - Endpoint URL to compare --transactions - Transaction sample size (Default: 10000) ``` Interactive mode is straightforward: ```bash slv check geyserbench ? Benchmark kind (shredstream / grpc / rpc): (shredstream) › ? Region (--region) for accurate measurement: (frankfurt) › ? First endpoint URL: › ``` Pick the transport first, choose the region, and then enter the endpoints you want to compare. ## Why region-aware measurement matters Solana is global, and leaders rotate while blocks are produced. Because data propagation speed depends on how close you are to the current leader, regions closer to leader slots can receive data faster. That means region-by-region comparison gives a more accurate view than looking only at global averages. This is especially useful for global apps and for very low-latency workloads such as high-frequency trading, where saving even 1 ms matters. --- title: "Solana Shreds - Filters" description: "A guide to Solana Shreds client development filters" canonical: "https://erpc.global/en/doc/shredstream/filter/" locale: "en" --- # Solana Shreds - Filters ![Solana Stream SDK](https://storage.validators.solutions/SolanaStreamSDK.jpg) The Solana Stream SDK is provided as open-source software. For more details, please refer to the following GitHub repository: [https://github.com/ValidatorsDAO/solana-stream](https://github.com/ValidatorsDAO/solana-stream) ## About Solana Shreds Filters Currently, the filter functionality in the Solana Shreds client is in the research and development stage and is not recommended for use in production environments. The specific details and stable release schedule for the filter feature will be updated as development progresses. Please use the ERPC Web Dashboard to stay updated on the latest information and development status. - [ERPC Web Dashboard](https://dashboard.erpc.global/en) ## Feedback and Contribution We always welcome your feedback, suggestions for improvement, and other inputs regarding the filter feature. Pull requests for development are also gladly accepted, so feel free to contribute. Detailed updates are shared through the ERPC Web Dashboard and the GitHub repository. We look forward to your active participation and collaboration. - GitHub pull requests: [https://github.com/ValidatorsDAO/solana-stream](https://github.com/ValidatorsDAO/solana-stream) - ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) --- title: "Direct Shreds - UDP Forwarding (Raw Shreds)" description: "UDP Forwarding delivers raw UDP Shreds to a configured public IPv4 address and port, as UDP Forwarding Standard or UDP Forwarding Premium." canonical: "https://erpc.global/en/doc/shredstream/udp-forwarding/" locale: "en" --- # Direct Shreds - UDP Forwarding (Raw Shreds) UDP Forwarding delivers raw Shreds over UDP to a single public IPv4 address and port that you configure. UDP Forwarding Standard and UDP Forwarding Premium differ in how the Shreds reach you from the region you choose: on Standard, ERPC forwards them from a node in that region, and on Premium, the mesh network delivers them. ## UDP Forwarding Standard **UDP Forwarding Standard** forwards raw Shreds over UDP to the public IPv4 address and port configured for your subscription. Select an available region during initial configuration, then save a non-empty valid public IPv4 address and port as the destination. You can update the destination later. ERPC applies the forwarding configuration on its 30-second refresh cycle, and no heartbeat activation is required. You can also change the region later in the dashboard, as often as you need. Changing the region changes the source IP, so your receiver's firewall needs to allow the new source IP. Delivery is briefly interrupted while the subscription moves to the new region. If the new region has no capacity at the moment, the change is not made, and neither the region nor the destination changes. - ERPC forwards raw Shreds over UDP to the configured destination from a node in the region you choose, so they reach you from a single source IP. ## UDP Forwarding Premium **UDP Forwarding Premium** delivers raw Shreds over UDP from the mesh network to the public IPv4 address and port configured for your subscription. The mesh network forwards the copy of each Shred that reaches it first; every source IP shown in the dashboard can be the sender. Premium Shreds often arrive 1–3 ms sooner than Standard. On 2026-10-30, an ERPC receiver in Frankfurt received Standard and Premium side by side in a single 120-second run and compared when each Shred that reached both first arrived on Standard and on Premium. Enter the public IPv4 address and port of your own receiving host, and select a region from the 7 available. After you save a destination, the status shows Applying, and delivery begins once the settings are applied. Allow every source IP shown in the dashboard in your receiver's firewall, one `/32` rule per IP. Changing the region changes the set of source IPs your firewall must allow. Delivery is interrupted until the new region is applied, and the new source IPs appear in the dashboard once it is. If the selected region cannot accept the change at the moment, the change is not saved, and your saved region and destination stay as they were. While an earlier change is still being applied, or right after one was accepted, further changes are not accepted. The source IPs can also change without a region change. When a change needs new firewall rules, you are notified by email or through Support. ## What to know about UDP - UDP does not provide connection setup, retransmission, or ordering; your receiver should handle the packets accordingly. Note: the shared Shreds gRPC endpoint runs over TCP, so it’s slower than UDP Shreds. ## Try it with Solana Stream SDK - Sample code (`shreds-udp-rs`, Rust): new-token detection is just a common example—swap in your own target. https://github.com/ValidatorsDAO/solana-stream/tree/main/temp-release/shreds-udp-rs - Configure your receiver with the destination `ip:port` saved for UDP Forwarding. - Not on UDP yet? Run it locally or on your own server to explore logs and customize hooks. ## UDP packets are not arriving First, capture traffic at the host network interface. ### UDP Forwarding Standard UDP forwarding starts automatically after the destination is configured. No heartbeat activation is required; an `UNIMPLEMENTED` heartbeat response does not mean forwarding is disabled. Replace the placeholders with the ERPC source IP shown for your stream and your configured destination port. Linux (`tcpdump`): ```bash sudo tcpdump -ni any 'udp dst port and src host ' ``` Windows (`Pktmon`, run as Administrator): ```powershell pktmon filter add ERPC-UDP -t UDP -i -p pktmon start --capture --comp nics --log-mode real-time ``` ### UDP Forwarding Premium Replace the source IP placeholders with the source IPs shown in the dashboard, and `` with your configured destination port. Linux (`tcpdump`): ```bash sudo tcpdump -ni any 'udp dst port and (src host or src host )' ``` Keep the parentheses: without them, the `udp dst port` filter applies only to the first source IP, and the capture picks up all traffic from every source IP after the first, on any protocol and port. Use one `src host` term for each source IP; with a single source IP, drop the `or` term and the parentheses. Windows (`Pktmon`, run as Administrator): ```powershell pktmon filter add ERPC-UDP-1 -t UDP -i -p pktmon filter add ERPC-UDP-2 -t UDP -i -p pktmon start --capture --comp nics --log-mode real-time ``` Add one `pktmon filter add` line for each source IP, numbering the filter names as shown; a single filter that lists several IPs matches traffic between those IPs instead. With a single source IP, keep only the first filter line. ### Firewall and receiver checks 1. If the capture remains at zero, check both the OS firewall and firewalls outside the OS. Hetzner may filter traffic in Cloud Firewall or the Robot firewall at the switch port. On AWS, check the Security Group and the subnet Network ACL. 2. Add the allow rule for your plan: - UDP Forwarding Standard: Allow inbound UDP from `/32` to destination port ``. Keep the source port unrestricted because ERPC uses dynamic UDP source ports. - UDP Forwarding Premium: Allow inbound UDP from each `/32` to destination port ``, one rule per source IP shown in the dashboard. Keep the source port unrestricted. 3. If packets appear in the capture but not in your application, bind the receiver to `0.0.0.0:` rather than localhost, then check the local firewall and socket/process settings. If no packets arrive after the rules are updated, send Support the capture duration, packet count, source IP, destination IP, and destination port. Provider references: [Hetzner Cloud Firewall](https://docs.hetzner.com/cloud/firewalls/overview/), [Hetzner Robot Firewall](https://docs.hetzner.com/robot/dedicated-server/firewall/), [AWS Security Groups](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security-groups.html), [AWS Network ACLs](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html), and [Microsoft Pktmon](https://learn.microsoft.com/en-us/windows-server/networking/technologies/pktmon/pktmon). ## Resources - All code and README docs are in the Solana Stream SDK repo: https://github.com/ValidatorsDAO/solana-stream --- title: "ERPC Global Storage - Quickstart" description: "Upload, download, list, and manage files in ERPC Global Storage." canonical: "https://erpc.global/en/doc/storage/quickstart/" locale: "en" --- # ERPC Global Storage - Quickstart ## ☁️ ERPC Global Storage ERPC Global Storage is a globally distributed object storage for Solana node operators. Upload backups, snapshots, config files, and more — right from the command line. **Regions:** eu (default), asia, us-east, us-west, oc ### Prerequisites - SLV CLI installed (`slv` command available) - Logged in with your API key (`slv login`) - An active storage subscription (`slv storage product` to browse plans) ## Check Usage View your current storage usage and quota: ```bash slv storage usage ``` ``` 📊 Storage Usage Used: 500 MB / 5 GB Files: 12 Region: eu ``` ## Upload a File Upload a file to ERPC Global Storage: ```bash slv storage upload ./my-file.json ``` You can also specify a remote path and region: ```bash slv storage upload ./my-file.json --path backups/my-file.json --region asia ``` | Option | Description | |---|---| | `-p, --path` | Remote path in storage (default: filename) | | `-r, --region` | Storage region (eu, asia, us-east, us-west, oc) | ``` √ Got presigned URL √ Upload complete Path: backups/my-file.json Region: asia Size: 1.2 KB ``` ## Download a File Download a file from ERPC Global Storage: ```bash slv storage download backups/my-file.json ``` Save to a specific local path: ```bash slv storage download backups/my-file.json --output ./restored-file.json ``` | Option | Description | |---|---| | `-o, --output` | Local output path (default: original filename) | | `-r, --region` | Storage region | ## List Files List files in your storage: ```bash slv storage list ``` Filter by prefix: ```bash slv storage list --prefix backups/ ``` | Option | Description | |---|---| | `-p, --prefix` | Filter by path prefix | | `-r, --region` | Storage region | | `-l, --limit` | Maximum number of files to return | ## Delete a File Delete a file from ERPC Global Storage: ```bash slv storage delete backups/old-backup.tar.zst ``` | Option | Description | |---|---| | `-r, --region` | Storage region | | `-y, --yes` | Skip confirmation prompt | ## Browse Storage Plans View available storage plans and purchase links: ```bash slv storage product ``` If you already have a subscription, this shows your current plan and upgrade options. ## Command Reference | Command | Alias | Description | |---|---|---| | `slv storage upload [file]` | | Upload a file | | `slv storage download [path]` | `slv storage dl` | Download a file | | `slv storage list` | `slv storage ls` | List files | | `slv storage delete [path]` | `slv storage rm` | Delete a file | | `slv storage usage` | | Show usage and quota | | `slv storage product` | | Browse storage plans | | `slv storage upgrade [quantity]` | | Change storage capacity | --- title: "ERPC Global Storage - Upgrade / Downgrade" description: "Change your ERPC Global Storage capacity with the slv storage upgrade command." canonical: "https://erpc.global/en/doc/storage/upgrade/" locale: "en" --- # ERPC Global Storage - Upgrade / Downgrade ## 📦 Storage Upgrade / Downgrade Change your storage capacity at any time. Stripe handles prorated billing automatically — you only pay the difference. ### Check Current Usage Before upgrading or downgrading, check your current usage: ```bash slv storage usage ``` ``` 📊 Storage Usage Used: 3.2 GB / 5 GB Files: 47 Region: eu ``` ### Upgrade Storage Increase your storage capacity (in GB): ```bash slv storage upgrade 50 ``` Or run interactively to choose a new capacity: ```bash slv storage upgrade ``` ``` 📦 Current Storage: 5 GB ? Enter new storage capacity in GB › 50 Previous: 5 GB New: 50 GB Billing: Prorated (you pay the difference for this billing cycle) √ Storage upgraded to 50 GB ``` ### Downgrade Storage You can also downgrade by specifying a smaller quantity: ```bash slv storage upgrade 5 ``` ⚠️ **Important:** You cannot downgrade below your current used storage. Delete files first if needed. ### Billing - **Upgrade:** You are charged the prorated difference immediately. - **Downgrade:** A prorated credit is applied to your next invoice. - Billing is handled by Stripe. View your invoices on the ERPC dashboard. ### Related Commands | Command | Description | |---|---| | `slv storage usage` | Check current usage and quota | | `slv storage product` | Browse available plans | | `slv storage rm [path]` | Delete files to free up space | --- title: "SLV Backup - Quickstart" description: "Create encrypted, incremental backups of your Solana node with SLV backup." canonical: "https://erpc.global/en/doc/backup/quickstart/" locale: "en" --- # SLV Backup - Quickstart ## 🗄️ SLV Backup SLV Backup creates **encrypted, incremental backups** of your node using [restic](https://restic.net/). All data is encrypted client-side with AES-256 before upload — the server never sees your plaintext data. > **Legacy mode**: SLV also supports unencrypted tar+zstd backups (without `--restic`). We strongly recommend using `--restic` for all new backups. ### Prerequisites - SLV CLI installed on the target node - `sudo` access (required for full-disk backup) - Logged in (`slv login`) with an active storage subscription - `restic` installed (`apt install restic`) ## Create an Encrypted Backup ```bash sudo slv backup create --restic --yes ``` ``` 🗄️ SLV Backup (restic mode) Region: default Retention: 7 days ⚠️ Restic encryption password generated and saved to: /home/solv/.slv/restic-password BACK UP THIS FILE — without it, backups cannot be restored. 🔧 Initializing restic repository (if needed)... 📦 Creating restic backup... Files: 151263 new, 0 changed, 0 unmodified Dirs: 22486 new, 0 changed, 0 unmodified Added to the repository: 4.107 GiB (1.837 GiB stored) processed 151263 files, 4.366 GiB in 0:50 snapshot b6925e6d saved ✅ Restic backup complete 🧹 Applying retention policy (keep within 7 days)... ✅ Backup complete. ``` ### What happens on first run 1. A random encryption password is generated and saved to `~/.slv/restic-password` (mode 0600) 2. A restic repository is initialized on ERPC Cloud Storage 3. Your entire disk is backed up (excluding system pseudo-filesystems) ### Subsequent runs Only changed files are uploaded (incremental). Deduplication keeps storage costs low. ## List Backups ```bash sudo slv backup list ``` Shows both restic snapshots and legacy tar backups in cloud storage. ## Restore from Backup Restore the latest snapshot: ```bash sudo slv backup restore latest ``` Restore a specific snapshot: ```bash sudo slv backup restore b6925e6d ``` Restore a legacy tar backup: ```bash sudo slv backup restore backup-mynode-20260318.tar.zst ``` ## Verify Backup Integrity To run `restic check` yourself, connect with a storage access key. RPC API keys are not accepted on this endpoint. 1. Open the [Storage page](https://dashboard.erpc.global/en/user/storage), go to **Storage access keys**, and click **Issue key**. **Read only** is enough for `check`. 2. Copy the **Restic repository URL** shown right after the key is created. It is shown only once: if you lose it, revoke the key and issue a new one. 3. Run `check` with that URL: ```bash sudo restic -r '' \ --password-file ~/.slv/restic-password check ``` ## Set Up Automated Backups (Cron) ```bash sudo slv backup create --restic --cron daily ``` | Interval | Description | |---|---| | `daily` | Run once a day | | `weekly` | Run once a week | | `monthly` | Run once a month | | `off` | Remove the cron job | ### Retention By default, snapshots older than 7 days are automatically pruned: ```bash sudo slv backup create --restic --retention 14 ``` ## Customize Excludes View the current exclude list: ```bash slv backup create --list-excludes ``` Add additional exclude paths: ```bash sudo slv backup create --restic --exclude /home/solv/ledger --exclude /home/solv/snapshots ``` ## Encryption & Security | Feature | Detail | |---|---| | **Encryption** | AES-256-CTR + Poly1305-AES (client-side) | | **Integrity** | SHA-256 content-addressable storage | | **Deduplication** | Content-defined chunking | | **Server-side visibility** | None — server only sees encrypted blobs | | **Password file** | `~/.slv/restic-password` (mode 0600) | | **Excluded from backup** | `~/.slv/restic-password`, `~/.slv/api.yml`, `~/.slv/backup.env` | > ⚠️ **IMPORTANT**: Back up your `~/.slv/restic-password` file separately. Without it, your backups are irrecoverably lost. ## Options Reference | Option | Description | |---|---| | `--restic` | Use restic for encrypted incremental backup (recommended) | | `-r, --region ` | Storage region (default: eu) | | `--exclude ` | Additional paths to exclude (repeatable) | | `--include ` | Remove from default excludes (repeatable) | | `--list-excludes` | Show current exclude list and exit | | `--retention ` | Prune snapshots older than N days (default: 7) | | `--cron ` | Set up cron job (daily/weekly/monthly/off) | | `-y, --yes` | Skip confirmation prompts | | `--upload` | Legacy: upload tar backup to cloud storage | | `-o, --output ` | Legacy: output file path for tar backup | ## Legacy Mode (tar+zstd) For backward compatibility, unencrypted tar backups are still supported: ```bash sudo slv backup create --upload --yes # Unencrypted tar backup ``` > **Note**: Legacy backups are not encrypted. We recommend migrating to `--restic` for all new backups. --- title: "SLV Backup - Restore" description: "Restore a node from a backup file or ERPC Global Storage with SLV backup restore." canonical: "https://erpc.global/en/doc/backup/restore/" locale: "en" --- # SLV Backup - Restore ## ♻️ Restore from Backup Restore your node environment from a local backup file or directly from ERPC Global Storage. ### Prerequisites - SLV CLI installed on the target node - `sudo` access (required for restoring system files) - For cloud restore: logged in (`slv login`) with an active storage subscription ## Restore from a Local File If you have a backup file on disk: ```bash sudo slv backup restore ./backup-mynode-20260318-120000.tar.zst ``` ``` ♻️ SLV Backup Restore Source: backup-mynode-20260318-120000.tar.zst Size: 2.1 GB ? Restore from this backup? This will overwrite existing files. › Yes √ Backup restored successfully ``` ## Restore from ERPC Global Storage If the backup was uploaded with `--upload`, you can restore by specifying the remote path: ```bash sudo slv backup restore backup-mynode-20260318-120000.tar.zst --region eu ``` When the file is not found locally, SLV automatically downloads it from ERPC Global Storage before restoring. ## Interactive Mode Run without arguments to select interactively: ```bash sudo slv backup restore ``` SLV will list available backup files (local and remote) for you to choose from. ## Options Reference | Option | Description | |---|---| | `-r, --region ` | Storage region for downloading remote backups | | `-y, --yes` | Skip confirmation prompts | ## ⚠️ Important Notes - **Restore overwrites existing files.** Make sure you are restoring to the correct node. - The backup is extracted to the root filesystem (`/`), restoring files to their original paths. - After restore, a reboot may be required for all changes to take effect. - System pseudo-filesystems (`/dev`, `/proc`, `/sys`) are excluded from backup and will not be affected. --- title: "SLV Migrate Linux - Quickstart" description: "Migrate your entire Linux server to a new machine with slv migrate linux." canonical: "https://erpc.global/en/doc/migrate/quickstart/" locale: "en" --- # SLV Migrate Linux - Quickstart ## 🚚 SLV Migrate Linux Migrate your entire Linux disk to a new server over SSH using rsync. This is a full-disk migration — everything from the source server is copied to the destination, including user data, configurations, installed packages, and SLV node setup. > **Note:** This is different from `slv v switch` (validator identity migration). `slv migrate linux` copies the entire filesystem, while `slv v switch` swaps validator identity between two already-running nodes. ### Prerequisites - SLV CLI installed on the **source** node - `sudo` / root access on both source and destination - SSH access from source to destination (password or key-based) - Destination server should be a fresh install (SLV will warn if it detects existing data) ## Basic Usage Run on the **source** server: ```bash sudo slv migrate linux --to root@new-server-ip ``` ``` 🚚 SLV Linux Migration Source: ubuntu (this machine) Destination: root@203.0.113.50 📋 Exclude list: • /dev/* • /proc/* • /sys/* • /tmp/* • /run/* • /mnt/* • /media/* • /lost+found • /swapfile • /snap/* • /var/log/* ? Start migration? This will overwrite data on the destination. › Yes Syncing... (this may take a while depending on disk size) √ Migration complete Rebooting destination... ``` ## Options | Option | Description | |---|---| | `-t, --to ` | SSH destination (e.g. `root@new-server`) | | `-p, --port ` | SSH port (default: 22) | | `--skip-reboot` | Skip automatic reboot after migration | | `--exclude ` | Additional rsync exclude pattern (repeatable) | | `--include ` | Remove from default excludes (repeatable) | | `--list-excludes` | Show current exclude list and exit | | `-y, --yes` | Skip confirmation prompt | ## Custom SSH Port If the destination uses a non-standard SSH port: ```bash sudo slv migrate linux --to root@new-server-ip --port 2222 ``` ## Customize Excludes View what will be excluded: ```bash slv migrate linux --list-excludes ``` Exclude additional paths (e.g., skip ledger data for faster migration): ```bash sudo slv migrate linux --to root@new-server-ip --exclude /home/solv/ledger ``` ## Non-Interactive Mode For scripting: ```bash sudo slv migrate linux --to root@new-server-ip --skip-reboot --yes ``` ## How It Works 1. **Pre-flight checks** — Verifies SSH connectivity, warns if destination has existing data 2. **rsync** — Copies entire filesystem (excluding system pseudo-filesystems) over SSH 3. **Post-migration** — Automatically reboots the destination server (unless `--skip-reboot`) The migration uses rsync with `--archive --hard-links --acls --xattrs` to preserve all file attributes, permissions, and special files. ## ⚠️ Important Notes - **Run as root** (or with `sudo`). Non-root migration will miss system files. - The destination should be a **fresh server**. Existing data will be overwritten. - rsync exit codes 23/24 (partial transfer) are treated as warnings, not errors. Some files (like active logs) may not transfer perfectly. - After migration, verify the node is working correctly before decommissioning the source. - For **validator identity migration** (zero-downtime swap between two running validators), use `slv v switch` instead. See [Mainnet Validator Migration](https://erpc.global/en/doc/mainnet-validator/migrate/). --- title: "ERPC AI" description: "Ask ERPC AI in your terminal with ERPC CLI, and it answers from ERPC's docs and your account. Its plans and token packs are on the ERPC Web Dashboard." canonical: "https://erpc.global/en/doc/erpc-ai/quickstart/" locale: "en" --- # ERPC AI ERPC AI is the assistant in ERPC CLI. Run `erpc ai`, and it answers from ERPC's documentation and your account and, with your approval, acts for you. ## Start ERPC AI ERPC AI needs an ERPC account. ERPC CLI is available as `v0.1.0-rc.4`, a pre-release. Install it: ```bash curl -fsSL https://install.erpc.global | sh ``` On Windows, install with `irm https://install.erpc.global/ps1 | iex` in PowerShell. Then sign this machine in with `erpc login`, and open a conversation: ```bash erpc ai ``` [ERPC AI in ERPC CLI](https://erpc.global/en/doc/erpc-cli/ai/) covers what it can do, what it asks before it acts, and the model sizes. ## Plans and token packs Plans and token packs for ERPC AI are sold on the ERPC Web Dashboard. Packs come in 1M and 10M tokens, never expire, and are spent after plan tokens. Paid plan tokens reset each billing cycle. ## Related links - [ERPC AI in ERPC CLI](https://erpc.global/en/doc/erpc-cli/ai/) - [ERPC CLI overview](https://erpc.global/en/doc/erpc-cli/overview/) - [ERPC AI Page](https://erpc.global/en/ai/) - [ERPC Web Dashboard](https://dashboard.erpc.global/en) --- title: "Run validators, RPC nodes and your own apps with ERPC CLI" description: "ERPC CLI runs RPC nodes on 18 chains, validators on 13 and your own apps from one command line, and ERPC AI runs it for you when you ask." canonical: "https://erpc.global/en/doc/erpc-cli/overview/" locale: "en" --- # Run validators, RPC nodes and your own apps with ERPC CLI ERPC CLI is one command line for RPC nodes on 18 chains, validators on 13, your own apps and your ERPC account. ERPC AI runs it for you when you ask. This page describes ERPC CLI `v0.1.0-rc.4`, a pre-release ([Status](https://erpc.global/en/doc/erpc-cli/overview/#status)). [Install ERPC CLI](https://erpc.global/en/doc/erpc-cli/overview/#install "button") [Deploy your first app](https://erpc.global/en/doc/erpc-cli/worker-quickstart/ "button") ```bash curl -fsSL https://install.erpc.global | sh ``` ## What you can do with ERPC CLI - **Run validators and RPC nodes.** `erpc rpc` runs RPC nodes on all 18 chains and `erpc validator` runs validators on 13 of them, with the same verbs on every chain. Their lifecycle commands are free and need no account. - **Run your own app on a server.** `erpc worker` compiles your app to a native Linux binary and runs it on an ERPC VPS or a server of your own, under a hardened systemd unit, with no Docker and no runtime in between. - **Keep an app's keys off the server's disk.** Its trading key and secrets go from 1Password, your keychain or erpc's encrypted keystore straight into the worker's memory. There is no `wallet.json` and no `.env`. - **Ask ERPC AI.** `erpc ai` answers from ERPC's documentation and your account. With your approval it can start an hourly VPS, install your SSH key, turn off password logins and allow SSH only from your address. - **Call RPC and receive webhooks.** `erpc rpc call` calls Solana or Ethereum mainnet with your signed-in account, or pays per call with x402. `erpc webhook` POSTs RPC events to your URL. - **Store and back up files.** `erpc storage` and `erpc backup` keep your files in ERPC Global Storage, encrypted on your machine before they leave it. ## Install On macOS and Linux: ```bash curl -fsSL https://install.erpc.global | sh ``` On Windows, in PowerShell: ```powershell irm https://install.erpc.global/ps1 | iex ``` These URLs select the latest stable release. While the project has only prereleases, they select the most recently published prerelease. To pin a version, use `https://install.erpc.global/v0.1.0-rc.4`, or `https://install.erpc.global/v0.1.0-rc.4/ps1` on Windows. Edge and client caches may delay what clients see after a release. The installer puts `erpc` in `~/.erpc/bin` and writes ERPC AI's skills to `~/.erpc/skills`. Builds are published for Linux (x86_64, arm64), macOS (Intel, Apple silicon) and Windows (x86_64). ### Install for a mainnet validator The installer above verifies nothing. The high-assurance path checks the signed release manifest before anything runs, and it is the only path that verifies anything today, so operators of mainnet validators should use it. Every release ships a signed `release-manifest.json` (minisign), a CycloneDX SBOM and GitHub build provenance attestations. The steps are in [Verifying a release](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/verify-release.md). ### Build from source ```bash git clone https://github.com/elsoul/erpc-cli cd erpc-cli cargo build --release ./target/release/erpc --help ``` ## Free to start Validator and RPC node lifecycle commands are free and need no account. An account at [dashboard.erpc.global](https://dashboard.erpc.global/en) unlocks the rest: | Command | No account | With an account | | --- | --- | --- | | Validator and RPC node lifecycle | Yes | Yes | | `erpc ai` | | Yes | | `erpc worker` | | Yes | | `erpc storage`, `erpc backup` | | Yes | ```bash erpc signup # opens the sign-up page erpc login # signs this machine in; the session goes to the keychain or 1Password erpc whoami ``` [Sign in and keys](https://erpc.global/en/doc/erpc-cli/sign-in-and-keys/) covers where the session and your keys are kept. ## How ERPC CLI keeps your keys ERPC CLI uses 1Password for node inventory and managed signing-key backups, and supports the operating system's keychain for operator credentials. API tokens and RPC keys are named in `erpc.toml` by reference, never by value, and the values reach the server over standard input, never on a command line. The node inventory lives in 1Password too. Share the vault, and everyone on your team manages the same nodes from their own machine. What stays on a node server depends on the chain: [Sign in and keys](https://erpc.global/en/doc/erpc-cli/sign-in-and-keys/#where-node-keys-are-kept) has the table. ## Status ERPC CLI is in pre-release, at `v0.1.0-rc.4`. Its commands exist and pass their offline checks. Acceptance on real hosts is still under way: [Where each chain stands](https://erpc.global/en/doc/erpc-cli/nodes/#where-each-chain-stands) and each chain's guide give the state of each chain. Only the latest release receives security fixes, and every release so far is a pre-release. Report a vulnerability privately through [GitHub private vulnerability reporting](https://github.com/elsoul/erpc-cli/security/advisories/new), not in a public issue. ERPC CLI is the Rust successor of [SLV](https://github.com/ValidatorsDAO/slv). Its source is at [elsoul/erpc-cli](https://github.com/elsoul/erpc-cli/tree/v0.1.0-rc.4) under the Apache-2.0 license. ## Explore ERPC CLI - [Sign in and keys](https://erpc.global/en/doc/erpc-cli/sign-in-and-keys/): Sign in, choose where the session is kept, and see where each key lives. - [erpc ai](https://erpc.global/en/doc/erpc-cli/ai/): Ask ERPC AI in your terminal, and choose what it may do. - [RPC and webhooks](https://erpc.global/en/doc/erpc-cli/rpc-call-and-webhooks/): Call Solana or Ethereum mainnet, pay per call with x402, and send events to your URL. - [erpc worker quickstart](https://erpc.global/en/doc/erpc-cli/worker-quickstart/): Make HelloWorld, run it here, and deploy it to a server. - [Import an app](https://erpc.global/en/doc/erpc-cli/worker-import/): Deploy an app you already have without changing its code. - [Keys and secrets](https://erpc.global/en/doc/erpc-cli/worker-secrets/): Keep an app's trading key and secrets in 1Password, the keychain or the keystore. - [Firewall and WAF](https://erpc.global/en/doc/erpc-cli/worker-firewall-and-waf/): Lock a server down and put a WAF in front of a public API. - [Status and billing](https://erpc.global/en/doc/erpc-cli/worker-status-and-billing/): Watch an app, see what it costs by the hour, and back up its state. - [When it fails](https://erpc.global/en/doc/erpc-cli/worker-troubleshooting/): Error messages and what to do, and how to recover a server. - [Nodes](https://erpc.global/en/doc/erpc-cli/nodes/): Run validators and RPC nodes, and find each chain's guide. - [Commands](https://erpc.global/en/doc/erpc-cli/commands/): Every command group, global options, exit codes, storage and backups. --- title: "Sign in to ERPC CLI and see where your keys are kept" description: "Sign this machine in to your ERPC account, choose where ERPC CLI keeps the session, and see where node keys and the files erpc writes are kept." canonical: "https://erpc.global/en/doc/erpc-cli/sign-in-and-keys/" locale: "en" --- # Sign in to ERPC CLI and see where your keys are kept Sign this machine in, and ERPC CLI keeps the session in your keychain or 1Password. This page also shows where node keys are kept and which files erpc keeps. This page describes ERPC CLI `v0.1.0-rc.4`, a pre-release. ## Sign in ```bash erpc signup # opens the sign-up page erpc login # signs this machine in; the session goes to the keychain or 1Password erpc whoami ``` `erpc login` gets the session through the OAuth device authorization grant. On a machine without a browser, `erpc login --no-browser` prints the URL and code instead of opening one, and `erpc signup --no-browser` prints the sign-up URL. `erpc whoami` shows who the stored session belongs to, and `erpc logout` signs out and removes the stored session. ## Choose where the session is kept At a terminal, `erpc login` asks which store to use: the operating system's keychain, which is the default, or 1Password when it answers. `--store` and `--vault` choose without asking, and the choice is recorded in `config.toml`, where the other commands read it. | `--store` | Where the session is kept | | --- | --- | | `keychain` | The operating system's keychain | | `1password-desktop` (also `1password`, `op`) | 1Password, through the desktop application | | `1password-service-account` | 1Password, through a service account token | | `file` | A file on disk. This leaves a secret on this machine | Without a choice, given or recorded, erpc uses a 1Password service account when `OP_SERVICE_ACCOUNT_TOKEN` is set, else the operating system's keychain when there is one, else a file in its state directory. `erpc doctor` reports which store is in use and why. With a service account, erpc passes `OP_SERVICE_ACCOUNT_TOKEN` only to the `op` processes it starts, and does not write that token anywhere. The 1Password item is titled with the machine's name, so that two machines never share one session. `ERPC_HOST_LABEL` overrides the name. ### On Linux The keychain is the Secret Service where one answers. Otherwise it is the kernel's persistent keyring for your user, which is in memory and never on disk: the session lasts until a reboot or a few days unused, and then `erpc login` is asked for again. A shell started without a login of its own (`su` without `-`, `sudo -E`) cannot use that keyring, and erpc refuses and says so. ### On macOS erpc reaches the keychain through `/usr/bin/security`. Any other program running as you can read the session by running `security` too, while the keychain still keeps the session encrypted at rest and away from other users. ### When the session is on disk erpc writes the session to its state directory in three cases: with the `file` store, for a parked session (a rotated refresh token that could not reach the store), and after an interrupted write. `erpc doctor` reports each such file for as long as it exists. On Unix these files are created with mode `0600`; on Windows erpc sets no permissions of its own. ## Where node keys are kept The node inventory, and the original-key backups each chain's guide names, are kept in 1Password. Not every key is in 1Password, and a node may hold a key it needs to run. Back up what is on a host yourself: rebuilding that host without a backup loses it. An active Sui validator or an elected TRON witness also refuses to move to a new host. | Node | In 1Password | On the host | | --- | --- | --- | | Solana validator (native) | The identity and the sync keypair you made. The vote account and withdraw authority are given to erpc as public keys only | The sync keypair, encrypted to that host, and from `--activate-validator` on the identity too. The vote account and withdrawal keys are never imported | | Solana validator (solv) | Staked identity, and the withdraw authority unless you give only its public key. The vote account key is deleted once the account is verified | A throwaway `unstaked-identity.json` in plain text. A deploy never copies the staked key or the withdraw authority to the node | | Solana RPC (native) | The identity you made | The same identity, encrypted to that host | | Solana RPC (solv) | The inventory | The identity, made there. It never leaves | | Ethereum validator | The inventory | Keystores, their unlock password and the slashing history. A backup's history stops at its snapshot, so restoring a key that signed after it can be slashed: move a signer with `erpc v --chain eth migrate` | | Arc RPC | The consensus key | The consensus key, encrypted | | Avalanche | A backup of the staking and BLS keys | The same keys, made there on the first deploy | | Sui validator | The protocol, network and worker keys, made on your own machine | The same three keys, encrypted with `systemd-creds` to that host. Never the account key | | Sui full node | The inventory | The network credential, encrypted to that host. There is no other copy | | TRON witness | The encrypted keystore and its password | The same, as encrypted systemd credentials | | Polygon validator | The signer key `init` generates. The staking owner's key is never asked for | The same key, encrypted to that host. While it only observes, the node runs under a separate identity | | BNB Chain validator | A backup of the signing material and the peer identity | The consensus key in an encrypted keystore, the vote key in an encrypted wallet, and their passwords encrypted to that host | | Kaia validator (consensus or proxy node) | A backup of the node identity | The node identity, made on the host and encrypted to it. The operator's wallets stay outside erpc | | Monad node (RPC or validator) | Both original keystores | The same keystores, encrypted to that host | | Hyperliquid validator | The hot consensus key. The cold account's key is never asked for | The hot key, encrypted to that host and loaded only by activated validator units | | Hyperliquid AQA publisher | Its dedicated API or agent key | The same key, encrypted to that host | | NEAR validator | The consensus key | The same key, encrypted to that host | | Arbitrum validator | The wallet `init` generates, and the provider credential | The provider credential, encrypted, and from `--activate-signer` on the wallet too, root-owned and encrypted | | Robinhood Chain validator | The wallet `init` generates, and the provider configuration | The provider configuration, encrypted, and from `--activate-signer` on the wallet too, root-owned and encrypted | | OP-family RPC | The inventory and provider values | Provider credential, engine JWT and peer identities, encrypted. Back up the owner record and the host's encryption secret | | Nitro RPC | The inventory and upstream credential | The upstream credential, encrypted | Other RPC nodes hold no signing key for a validator, but their hosts keep what the client makes for itself, such as an engine JWT, a peer identity or an RPC cookie. A key backup alone does not make validator recovery safe. Follow the chain's recovery procedure before you replace a server or restore its data; each chain's guide says how to restore its keys ([Nodes](https://erpc.global/en/doc/erpc-cli/nodes/#chains-and-guides)). One command writes node keys to disk on your machine: `erpc validator vote-account` writes the identity and vote keys to `0600` files under the state directory while the Solana CLI runs, and wipes them afterwards. A process that dies can leave a file until a later run sweeps it. An `erpc worker` app's trading key and secrets are kept apart from these: [Keys and secrets](https://erpc.global/en/doc/erpc-cli/worker-secrets/). ## Files erpc keeps | Path | What it holds | | --- | --- | | `~/.erpc/config.toml` | Public settings (`erpc config`) | | `~/.erpc/state/` | The session and locks (`erpc doctor` says how the session is stored) | | `~/.erpc/conversations/` | Saved ERPC AI conversations | | `~/.erpc/memory.json` | What ERPC AI remembers | | `~/.erpc/vps_hosts.json` | Host keys of VPSs ERPC AI logged in to | | `~/.erpc/skills/` | Skills written by `erpc skills install` | | `~/.erpc/storage-key` | The storage encryption key, when `erpc login` keeps the session in a file | | `~/.erpc/backup-password`, `~/.erpc/backup-admin-key` | The backup master password and `read_write` key, when `erpc login` keeps the session in a file | | `~/.erpc/keystore/` | The worker keystore: an app's secrets and trading key, each in a file encrypted under your passphrase, on a machine with neither 1Password nor a keychain that lasts | | `~/.erpc/workers.toml` | The list of `erpc worker` apps on this machine | | `~/.erpc/backup.env` | This machine's backup credentials (`0600`) | | `~/.erpc/bin/restic-0.19.1` | The pinned restic `erpc backup` installs | --- title: "Ask ERPC AI in your terminal and let it act with your approval" description: "erpc ai opens a conversation with ERPC AI in your terminal. It answers from ERPC's documentation and your account, and acts with your approval." canonical: "https://erpc.global/en/doc/erpc-cli/ai/" locale: "en" --- # Ask ERPC AI in your terminal and let it act with your approval `erpc ai` opens a conversation with ERPC AI in your terminal. It answers from ERPC's documentation and your account, and with your approval it can act for you. This page describes ERPC CLI `v0.1.0-rc.4`, a pre-release. ERPC AI needs an ERPC account; plans and token packs are on [ERPC AI](https://erpc.global/en/doc/erpc-ai/quickstart/). ## Start a conversation Sign this machine in with `erpc login` ([Sign in and keys](https://erpc.global/en/doc/erpc-cli/sign-in-and-keys/)), then open a conversation: ```bash erpc ai ``` `erpc` with no command opens the same console. `erpc ai -m` asks one question and prints the answer. `erpc ai -c` continues the last conversation, also with `-m` or a question piped in. `erpc resume` picks any saved conversation from a list, and `erpc resume ` continues the one with that id. Conversations are saved under `~/.erpc/conversations/`, readable by you alone. ## What ERPC AI can do with your approval - Start and end hourly products. - Buy ERPC Credit with EURC from your wallet. - Wait for a new VPS to come up, log in to it once with the password ERPC set, put your key in place and turn password logins off for good. - Allow SSH only from your address. ERPC AI drives the same erpc commands you would type, and prefers them to improvised scripts. You can also build and deploy an app by talking to it: see [erpc worker quickstart](https://erpc.global/en/doc/erpc-cli/worker-quickstart/). ## What ERPC AI asks before it acts When ERPC AI needs a decision, it offers choices to pick with the arrow keys and Enter. Its own actions in the list above ask you first, every time, with the cursor on **Stop**. Allowing every command does not change that. It can also run commands on your own computer. Commands that only look run at once. Any other command is shown word for word and asks each time: you may allow that exact command, or every command, scripts included, behind a second question. Once every command is allowed, nothing is asked before a command runs until `erpc ai` ends or `/new` (or `/clear`) starts a new conversation. A command given `--yes` that spends money or changes a server runs too, and a command that prints a key file or a password hands it to ERPC AI. ## What ERPC AI sees Everything a tool returns is sent to the model through the ERPC AI gateway, as part of the conversation. - **Commands on your computer:** what any command prints goes to ERPC AI, logs included. Only the values of `api-key=`, `api_key=`, `apikey=` and `token=` parameters are hidden. - **Your account:** the tools that read your account never pass on server passwords, IP whitelists, endpoints that carry a key, payment details, API keys or the session. For each of the account's VPSs, its IP and login user do reach the model, so you can ask where it is. - **A new VPS:** while ERPC AI sets one up, its IP and login user (never its password), its host key fingerprint, your own public address and the addresses SSH is allowed from reach the model too. [What the assistant reads](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/SECURITY.md) in SECURITY.md lists what each tool passes on. ## Choose the model size By default, each turn's words decide the model size: small for a greeting and large for the rest. To put every turn on one size, start with `--model` (also with `-m` or `-c`), or type `/model` in the console: ```bash erpc ai --model xlarge ``` The sizes are `small`, `medium`, `large` and `xlarge`, the most capable, which uses your tokens at 2x. `/model auto` goes back to letting each turn's words decide, and `/model` alone says which size is in use. - Changing the size in a conversation reads the whole conversation again at the new size, once. - The choice lasts until `erpc ai` ends, `/new` included, and the console names the size under each answer. - A size the service does not offer is answered at its default size, and the console says so. - The suggested next message and the summary of a long conversation stay on the small size. ## Commands inside a conversation | Command | What it does | | --- | --- | | `/new` (also `/clear`) | Starts a new conversation | | `/model` | Picks the model size (`/model xlarge`, `/model auto`), or alone says which is in use | | `/help` | Shows the keys and commands | | `/exit` (also `/quit`) | Leaves the console | After each answer, the box shows a dimmed suggestion for your next message. Tab puts it in the box for you to edit or send, and nothing is sent until you press Enter. Each suggestion is one extra small request, sent the words of the last two turns only, never tool results. Long conversations are summarised automatically to keep them affordable, and the summarised turns stay on disk. ## Memory ERPC AI can remember short facts about you, such as your hosts, chains and preferences, from one conversation to the next. They are kept in `~/.erpc/memory.json`, and nothing that looks like a secret is saved. `erpc memory list`, `forget ` and `clear` show and delete them. ## Give the skills to another AI agent Skills are what ERPC AI knows about each chain and service. `erpc skills install` (or `erpc skills sync`) writes them out for another AI agent to use. The skills ship inside erpc, checked against its commands, so they always match the version you run. After an upgrade, `erpc doctor` warns while the copies on disk are older. ## Pay from a wallet `erpc wallet create` sets up your one Base wallet. It uses the ERPC wallet already in 1Password if there is one, and makes a new one only when there is none. A new wallet's private key goes straight to 1Password and is never written to disk or shown. Fund the wallet with EURC, and ERPC AI can buy ERPC Credit from it after you approve each purchase. `erpc wallet create --no-ai` keeps ERPC AI from asking, and `--vault` takes the 1Password vault's id or name. `erpc wallet show` shows the wallet's address. --- title: "Call RPC methods and send events to your URL with ERPC CLI" description: "erpc rpc call sends one JSON-RPC request to Solana or Ethereum mainnet and can pay for it per call with x402. erpc webhook POSTs RPC events to your URL." canonical: "https://erpc.global/en/doc/erpc-cli/rpc-call-and-webhooks/" locale: "en" --- # Call RPC methods and send events to your URL with ERPC CLI `erpc rpc call` sends one JSON-RPC request from your terminal with your signed-in ERPC account, or pays per call with x402. `erpc webhook` POSTs RPC events to your URL. This page describes ERPC CLI `v0.1.0-rc.4`, a pre-release. ## Call an RPC method Use your signed-in ERPC account to call Solana or Ethereum mainnet. The CLI selects the shared endpoint from the method, or you can select the network. ```sh erpc login erpc rpc call getSlot erpc --json rpc call eth_getBlockByNumber '["latest", false]' --network ethereum-mainnet erpc rpc call eth_call --params-file params.json printf '%s' '["finalized", false]' | erpc rpc call eth_getBlockByNumber - erpc rpc call getHealth --endpoint-url http://127.0.0.1:8899 ``` - **Params** are a JSON array or object, a file with `--params-file`, or `-` for standard input. Without them, a call sends `[]`. - **Networks** are `solana-mainnet` and `ethereum-mainnet` (also `eth-mainnet`). `erpc rpc list-networks` lists the networks with ERPC shared and x402 RPC. - **Your own endpoint:** `--endpoint-url` uses only the credentials in that URL. It must be a secure URL or loopback, without user information. ### Which of the account's keys a call uses An account can have several RPC keys. `erpc rpc call` and `erpc webhook run` try them in order, the primary one first, with one `getHealth` call for each key before the call of their own. The key is judged at the shared Solana RPC, whatever chain is then called. When the RPC takes no key and could not be asked about one of them, the command goes on with the first key it could not be asked about, and its own call tells. When every key is refused, the command fails with `the shared RPC takes none of the account's API keys from this machine ( tried)`: see [When it fails](https://erpc.global/en/doc/erpc-cli/worker-troubleshooting/). ## Pay per call with x402 To see what a call costs before you pay, request an x402 quote. `--quote` prints the quote without reading a wallet or making a payment. To pay, run the command without `--quote` at a terminal. The CLI shows the amount, asks for confirmation, and signs the quoted Base EURC payment with the wallet `erpc wallet create` configured. Keep EURC on Base in that wallet ([Pay from a wallet](https://erpc.global/en/doc/erpc-cli/ai/#pay-from-a-wallet)). ```sh erpc rpc call getSlot --network solana-mainnet --x402 --quote erpc rpc call eth_blockNumber --x402 ``` ## Send events to your URL A local webhook subscribes to the RPC WebSocket and POSTs events to your URL. Start a receiver, create the subscription, then run the ID that `create` returns, in a terminal or under your process supervisor. ```sh erpc webhook create --name slots --network solana-mainnet \ --url http://127.0.0.1:8080/events --method slotSubscribe erpc webhook create --name heads --network ethereum-mainnet \ --url http://127.0.0.1:8080/events --method eth_subscribe --params '["newHeads"]' erpc webhook list erpc webhook run 1 ``` For wallet activity on Solana, use `--template solana-wallet --wallet ADDRESS` in place of `--method`. For Ethereum contract logs, use `--template evm-contract-events --address CONTRACT`. The callback URL is HTTPS or loopback HTTP, and the networks are the same as `erpc rpc call`'s. ### What your receiver gets - Each POST contains `webhook_id`, `network` and the original JSON-RPC `notification`. Return HTTP 2xx to accept it. - Delivery starts at the current live subscription. Restarting the runner subscribes to new events. - A disconnect or a failed callback ends the runner with a nonzero status. - `erpc webhook run` takes `--once` to test a single delivery, and `--endpoint-url` to use your own WebSocket RPC. ## Manage webhooks | Command | What it does | | --- | --- | | `erpc webhook list` | Lists the saved subscriptions | | `erpc webhook show ID` | Shows a subscription. Callback credentials are omitted | | `erpc webhook enabled-count` | Counts the subscriptions enabled on this machine | | `erpc webhook pause ID` | Disables delivery. A runner that is running exits | | `erpc webhook activate ID` | Enables a later `run` | | `erpc webhook delete ID` | Removes the definition | These inspect and change local configuration only. Pass `--yes` to `pause`, `activate` and `delete` in scripts. --- title: "Deploy your first app to a server with erpc worker" description: "Make the HelloWorld app with erpc worker, run it on your machine, and deploy it to an ERPC VPS or a server of your own." canonical: "https://erpc.global/en/doc/erpc-cli/worker-quickstart/" locale: "en" --- # Deploy your first app to a server with erpc worker Make a small HTTP API in Rust with `erpc worker`, run it on your machine, and deploy it to a server with four commands. This page describes ERPC CLI `v0.1.0-rc.4`, a pre-release. `erpc worker` (alias `erpc w`) compiles your app to a native Linux binary and runs it on an ERPC VPS, a new hourly one, or a server of your own, under a hardened systemd unit with no Docker and no runtime in between. A release that does not come up healthy is rolled back to the one before, and several apps can share one server, each on a port of its own. Everything about the app is in `erpc.toml` at its root, which holds no secret and can be committed. ## Prerequisites - **An ERPC account**, signed in on this machine with `erpc login` ([Sign in and keys](https://erpc.global/en/doc/erpc-cli/sign-in-and-keys/)). - **ERPC Credit**, for a new hourly VPS. An hourly product is paid from ERPC Credit, which is bought beforehand, and a start the credit does not cover is refused. Prices are on [Pricing](https://erpc.global/en/price/) and the [ERPC Web Dashboard](https://dashboard.erpc.global/en). - **An SSH key** on this machine: `ssh-keygen -t ed25519`, or `erpc config set ssh_key .pub` for a key you have. - **A way to build for Linux.** From a Mac or Windows, the Rust target for the server (`rustup target add x86_64-unknown-linux-gnu`), `zig` (`brew install zig` on macOS) and `cargo-zigbuild` (`cargo install cargo-zigbuild --locked`). From a Linux machine of the server's kind (x86-64 for every ERPC server), nothing more than cargo. Without the cross-build tools, the app is built with this machine's own toolchain, and the binary then needs the glibc it was linked against, which `build` and `deploy` name. With them, it is built for glibc 2.31 and up. ## Deploy HelloWorld HelloWorld is a small HTTP API in Rust that needs no key, no secret and no data line. It answers `GET /`, `GET /hello/{name}` and `GET /healthz`. ```bash erpc worker init --template helloworld # makes ./hello-world erpc worker run hello-world # here: curl http://127.0.0.1:3000/ erpc worker deploy hello-world # your VPS, or a new hourly one (price asked first) erpc worker api / --dir hello-world # {"message":"Hello, World!",…} from the server ``` 1. `init` makes the app in `./hello-world`, with its `erpc.toml`. 2. `run` builds the app and runs it on your machine, so you can call it with curl first. 3. `deploy` builds it for the server and deploys it. Anything that costs money is shown first with its hourly price, your balance and how long the credit lasts, and at a terminal it starts only after a yes. 4. `api` calls the deployed app's API from your machine, with the API still on the server's loopback. `erpc worker check` lists what the app is missing, and `deploy` refuses before it buys anything when something is. `erpc worker build` runs the build alone, the way to see a build fail before a server is bought. ## Choose a template `erpc worker init` asks one thing: what to make, picked with the arrow keys. - **HelloWorld** is the one to start from. - **HFT** and **pumpfun-bot** are both made from the pumpfun template for now: a pump.fun (PumpSwap) trading bot ported from ValidatorsDAO/solana-stream. `--template hft` (or `helloworld`, `pumpfun-bot`, or a template id) skips the picker, and `--name` names the app. Without a name, the app is named after the choice (`hello-world`, `hft-bot`, `pumpfun-bot`). When a directory of that name exists, a person picking gets `-2`, `-3` and so on, and a script (`--yes`, `--json`, no terminal) gets an error. With nobody to ask and no `--template`, HelloWorld is what is made. A trading bot needs a key and a few settings before it runs. Its order: ```bash erpc login # once per machine: the session in 1Password or the keychain erpc worker init # pick with the arrow keys; makes ./ with erpc.toml cd erpc worker key new # the trading key, in 1Password, the keychain or the keystore; prints the public key to fund erpc worker secret put API_TOKEN --generate # the bot's own API token, made for you and shown to nobody erpc worker secret put ERPC_API_KEY --from-account # the account's RPC key, read from your account (or SOLANA_RPC_ENDPOINT in [vars]) erpc worker check # what erpc.toml describes, and what is missing erpc worker run --grpc --ip # build and run here, with an hourly gRPC line letting this machine in erpc worker run --check --grpc --ip # the same, stopped once healthy erpc worker deploy --new-vps --grpc # a new hourly VPS and gRPC line, prices asked first ``` `init` prints this order for the app it made. [Keys and secrets](https://erpc.global/en/doc/erpc-cli/worker-secrets/) covers where the key and the secrets are kept. ## Choose the server `deploy` uses the first of these: 1. the server the app's `[env.]` already names; 2. `--vps `, an ERPC VPS of your account; 3. `--new-vps`, the cheapest hourly VPS in the region nearest this machine by its time zone (`--region` and `--plan` choose otherwise); 4. `--host
`, a server of your own: Ubuntu or Debian with systemd, nftables, `sudo` and Python 3 at `/usr/bin/python3`, reached as root or a user with passwordless sudo; 5. otherwise, at a terminal, a list of your account's running VPSs, with "start a new one" at the end. On a server of your own, the worker's firewall drops every inbound connection but SSH and the app's port, so a server that serves anything else is not the one to use. ## Deploy without a person at the terminal A script, or an agent such as `erpc ai`, has no terminal to answer at. Two flags let it do the work all the same: ```bash erpc worker deploy hello-world --new-vps --yes # no key: all the way, unattended erpc worker deploy pump-sniper --new-vps --grpc --yes --prepare # a bot: everything but its key erpc worker deploy pump-sniper # then you, at a terminal: the key, and the start ``` - **`--yes`** answers the price of each hourly product the command names (`--new-vps`, `--grpc`, `--shreds`, `--unlimited`). It also answers the first login to a server erpc has not made key-only yet, a new one or one named with `--vps `: erpc logs in once with the server's password, puts your key in and turns password logins off. Without `--yes` and without a terminal, a start is refused before anything is bought, with exit status 3. - **Choosing among your servers still needs a person.** Name the server with `--new-vps`, `--vps ` or `--host`. - **`--prepare`** does everything that needs neither the trading key nor a secret, and starts, stops and restarts nothing. The next `erpc worker deploy` at a terminal hands the key and the secrets over and starts the app. The trading key is read only for a person at a terminal. ## Connect your app to gRPC, Shreds and Unlimited RPC ERPC's hourly lines admit the server by its address and take no token. One flag on `deploy` starts each line for the server, and the app gets its endpoint as a setting: | Flag | Line | The app gets | | --- | --- | --- | | `--grpc` | Geyser gRPC | `GRPC_ENDPOINT` | | `--shreds` | Shreds (Shredstream gRPC) | `SHREDS_ENDPOINT` | | `--unlimited` | Unlimited RPC in the server's region | `SOLANA_SEND_RPC_ENDPOINT` | - Each line is the cheapest of its family unless `--grpc-plan`, `--shreds-plan` or `--unlimited-plan` names one. - The Unlimited RPC runs on a dedicated server that takes up to 45 minutes to set up. It serves `sendTransaction` and a short list of reads, not `getProgramAccounts` or `getTokenAccountsByOwner`. Its endpoint is plain HTTP (no TLS) and admits only the whitelisted address. ### Lines for a run on your machine `erpc worker run` takes `--grpc` and `--shreds` too, for trying the app here against real data before it goes to a server. - **The address:** the lines admit this machine's public IPv4 address, which you pass with `--ip`. erpc does not look it up itself. - **Buying:** a new line is bought only at a terminal, after its price is shown. `run` has no `--yes`. - **Ending:** when the run ends, each hourly line is ended after asking. `--keep-lines` keeps them, still charged. If the run ends any other way (the terminal closed, a second Ctrl-C), the lines stay and are charged. - **The numbers:** what the app measures here includes the distance from this machine to the line, so it is slower than the same app on a server near it. ## Next steps - [Import an app](https://erpc.global/en/doc/erpc-cli/worker-import/): Deploy an app you already have, in any language. - [Keys and secrets](https://erpc.global/en/doc/erpc-cli/worker-secrets/): Keep a trading key and secrets off the server's disk. - [Firewall and WAF](https://erpc.global/en/doc/erpc-cli/worker-firewall-and-waf/): Put a public API behind a WAF. - [Status and billing](https://erpc.global/en/doc/erpc-cli/worker-status-and-billing/): Watch the app and see what it costs by the hour. --- title: "Deploy an app you already have with erpc worker import" description: "erpc worker import reads an app's directory and writes its erpc.toml, so a Cargo package or a Linux binary in any language deploys without changing its code." canonical: "https://erpc.global/en/doc/erpc-cli/worker-import/" locale: "en" --- # Deploy an app you already have with erpc worker import `erpc worker import` takes in an app you already have, as it is. It writes the app's `erpc.toml` and changes none of its code. This page describes ERPC CLI `v0.1.0-rc.4`, a pre-release. ## Import and deploy The app can be a bot that runs under systemd or Docker today, or a service in another language. `import` reads the app's directory and writes the `erpc.toml` it describes. Nothing else is written in the app, nothing in it is run, and its code is not changed. erpc adds the app to its own list, as `init` does. ```bash cd my-bot # a Cargo package erpc worker import # writes erpc.toml from what is there erpc worker check # what it describes, and what is missing erpc worker deploy # your VPS, or a new hourly one cd my-go-service && make linux # any other toolchain: build the Linux binary your way erpc worker import --binary dist/service --port 8080 --health /healthz erpc worker deploy ``` - **A Cargo package** is built with `cargo build --release`, as an app made by `init` is. The app is named after the package unless `--name` says otherwise, and `--bin` picks the binary when the package has several. A workspace root is refused: point `import` at the package. - **A Linux binary built anywhere, in any language,** deploys the same way with `--binary `, shipped as it is. erpc reads its header and refuses one a server cannot run: a macOS or Windows binary, a script, a shared library, a file cut short, or another architecture than `build.target`. The binary must be static, or linked against glibc with its loader at the usual path. It is a file of the app: a link under that name that leads out of the app's directory is refused. A deploy stops on an unusable binary before a server is bought. Build the binary again before a deploy that should carry a change. ## What import reads | In the directory | What `import` does with it | | --- | --- | | `.env.example` and similar example files | Each name becomes a setting when it can be one: a name that is not capital letters, digits and `_` (starting with no digit), or one erpc or the server sets itself (`ERPC_WORKER_…`, `LD_…`), is left out. A plain one goes into `[vars]` with the example's value. One that looks like a secret by its name, or whose value carries a credential, is named with the command that keeps it, and its value is not copied | | `.env` | Only the names are read, except a port number | | `PORT`, `API_PORT`, a Dockerfile's `EXPOSE` | `run.port`, unless `--port` gives it. `--health ` adds the health check on that port | | `GRPC_ENDPOINT`, `SHREDS_ENDPOINT` and other settings a data line provides | Left out of `[vars]`: the line's flag on `deploy` sets them | | `wallet.json`, `id.json`, `*keypair.json` | Named, with `erpc worker key import --wipe`, which keeps the key where erpc worker reads it and wipes the file | | A compose file with Redis or PostgreSQL | `[services]`, so that `deploy` puts them on the server | | `Dockerfile`, the compose file itself | Not used to run the app: erpc worker runs the binary itself, under a hardened systemd unit | `import --chain` names the chain the app is for, `solana` by default. ## How import reads a directory The directory may be one you cloned a minute ago, so `import` reads it with care. - **`erpc.toml` is made new.** When anything is at that path, `import` refuses: it never writes over a file or through a link. - **It reads regular files inside the directory, up to 1 MiB each.** A link that leads out of the directory, a pipe, a device, a larger file and a file that is not UTF-8 are not read, and each is said. - **No value it takes for a secret is copied.** It looks for credentials by their shape, so the check is a net, not a proof: a secret in a shape it does not know is copied like any value. `erpc.toml` is yours to read before you commit it. - **`erpc worker check` warns of fewer kinds than `import` holds back.** It says nothing of an RPC URL with a key in its path, or of a recovery phrase, under `[vars]`: keep those with `erpc worker secret put`. ## What your app finds on the server - **Settings arrive as environment variables**, `[vars]` and `[secrets]` alike. There is no `.env` on the server, and an app that reads a `.env` file with a dotenv library keeps working. - **Its own directory is read-only.** Files it writes go under the directory `ERPC_WORKER_STATE_DIR` names (also its `HOME`), which a deploy keeps and `erpc worker backup` backs up. - **A trading key arrives on a pipe, not in a file:** 64 bytes on the file descriptor `ERPC_WORKER_KEY_FD` names, once, when the app starts, with the public key in `ERPC_WORKER_PUBKEY`. An app that reads a key file has that one read to change; the pumpfun template's `src/wallet.rs` shows it. - **It is one binary and the files `run.files` lists.** Anything else it opens at run time has to be in that list. ## Next steps - [Keys and secrets](https://erpc.global/en/doc/erpc-cli/worker-secrets/): Keep the settings `import` held back, and the trading key. - [Firewall and WAF](https://erpc.global/en/doc/erpc-cli/worker-firewall-and-waf/): Choose who may reach the app. - [The worker guide](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/worker.md): Every file `import` reads, and the credential shapes it looks for. --- title: "Keep an app's trading key and secrets off the server's disk" description: "erpc worker keeps an app's trading key and secrets in 1Password, the OS keychain or an encrypted keystore, and hands them to the app in memory." canonical: "https://erpc.global/en/doc/erpc-cli/worker-secrets/" locale: "en" --- # Keep an app's trading key and secrets off the server's disk `erpc worker` keeps an app's trading key and secrets in 1Password, your keychain or an encrypted keystore, and hands them to the app in memory, never to the server's disk. This page describes ERPC CLI `v0.1.0-rc.4`, a pre-release. ## How the trading key reaches the app An app with a wallet gets its key on a pipe when it starts. There is no `wallet.json`, no `.env` and no copy on the server. erpc writes the key to no disk unencrypted: the one file it puts it in is the keystore's, on your machine, encrypted under your passphrase. - **Where it is kept:** `erpc worker key new` makes the key in 1Password when `erpc login` keeps the session there, else in the keychain, else in the keystore. `erpc.toml` records the key's reference and its public key. - **On the server:** the erpc worker agent holds the key in memory only. It makes itself undumpable and locks its memory, and hands the key to the app on a file descriptor; the app wipes it after reading. - **After a reboot,** the worker comes back locked: the app does not run until `erpc worker start` sends the key again. An agent that fails or is killed is started again by systemd and comes back locked the same way. - **A package update does not restart a worker.** `deploy` tells `needrestart` to leave the worker units alone: in its automatic mode it defers them, and asked at a terminal its default answer for them is no, so an unattended security update does not restart the app. When that rule could not be written, the deploy says so and goes on, and the worker then runs without this protection. The trading key is named by `[wallet]` and by nothing else, and erpc reads it only for a person at a terminal: not for an AI tool, and not with a 1Password service account. A `[secrets]` line that names the `[wallet]` reference, or a `keychain:` or `keystore:` account ending in `.wallet`, is refused. In the keystore an entry kept as a key does not open as a secret. In 1Password, and under a keychain account of another name, nothing marks a key: an `erpc.toml` with no `[wallet]` that names such an item under `[secrets]` has it read as a secret. ## Choose where values are kept 1Password is optional. `erpc worker key new` and `erpc worker secret put` keep what they are given in the first of these that applies, unless `--store` names one (`--store 1password --vault `, `--store keychain`, `--store keystore`): 1. **1Password**, when `erpc login` keeps the session there or `--vault` is given. 2. **The OS keychain**, where it keeps a value past a reboot: macOS, Windows, and Linux with a desktop keyring in a logged-in session. 3. **erpc's keystore**, on a Linux machine with no such keyring: a headless server, WSL, an SSH login. `--store keychain` on such a machine is refused. In the keychain or the keystore, the key exists on that one machine only, with no copy and no sync, and another machine cannot read a `keychain:` or `keystore:` reference. A lost or wiped machine means the wallet is gone: keep little in it, or use 1Password, which every machine signed in to the vault can read. Sign in to 1Password with `erpc login --store 1password-desktop`, or through `op signin` where there is no desktop app. A 1Password service account can hold an app's secrets, but erpc does not read a trading key with one. With 1Password, every read may show an approval prompt in the app, and erpc shows a spinner while it waits. ## Keep a secret Secrets, such as API tokens and RPC keys, are kept the same way, but reach the app as environment variables, not on a pipe. `erpc worker secret put ` keeps the value, and `[secrets]` in `erpc.toml` holds only its reference. ```bash erpc worker secret put API_TOKEN --generate # the bot's own API token, made for you and shown to nobody erpc worker secret put ERPC_API_KEY --from-account # the account's RPC key, read from your account (or SOLANA_RPC_ENDPOINT in [vars]) ``` - **`--generate`** makes the value: 32 random bytes, as 64 hexadecimal characters. - **`--from-account`** keeps the first of your account's RPC keys that the shared RPC takes. Keys are tried in order, the primary one first, with one `getHealth` each, given 8 seconds to answer. A key answered 401 or 403 is refused and the next is tried, and only a key the RPC took is kept. The command says whether it is the account's primary key or another (`account_key` with `--json`). - Neither value is printed, with `--json` either. The first use of the keystore, or a locked one, needs a person at a terminal. - Keys are tried from this machine, so a key limited to the server's address is refused here though it works there. When every key is refused, `--from-account` keeps nothing, and you keep the key you mean by hand, typed unseen or piped in. When the RPC could not be asked, it keeps nothing and `erpc.toml` is as it was; run the same command again. To keep a key by hand: ```bash erpc worker secret put ERPC_API_KEY # asks for the value, unseen ``` - `--replace` keeps a new value for a name that is set already. `erpc worker secret list` lists the secret settings by name and where each is kept. - A setting a data line provides (`GRPC_ENDPOINT`, `SHREDS_ENDPOINT`, `SOLANA_SEND_RPC_ENDPOINT`) is never a secret: `--grpc`, `--shreds` and `--unlimited` set it. A reference in `[secrets]` or `[wallet]` is one of these: | Reference | Where the value is | | --- | --- | | `op:////` | 1Password, by vault and item id | | `keychain:/` | The OS keychain of the machine that kept it | | `keystore:/` | erpc's keystore on the machine that kept it | ## The keystore The keystore is the directory `~/.erpc/keystore` (`keystore` under `ERPC_HOME` when that is set). On Linux and macOS its directories are `0700` and its files `0600`; on Windows erpc sets no permissions of its own. - `master.json` holds a random 32-byte master key, sealed under a key that PBKDF2-HMAC-SHA256 (600,000 iterations) makes from your passphrase. Each entry holds one value, sealed with ChaCha20-Poly1305 under a key of its own. - **The passphrase:** the first `key new` or `secret put` that uses the keystore has you choose it, typed twice at a terminal, 12 characters or more. erpc takes it from that hidden prompt only, never from an argument, an environment variable or a pipe. - **Unlocking on Linux:** once the passphrase has opened the keystore, the unlock is kept in the kernel's persistent keyring, in memory, until the machine restarts, the keyring goes unused for its idle expiry (three days, unless the system says otherwise), or `erpc worker secret lock`. `erpc worker secret unlock` asks for the passphrase ahead of time and says until when. In a shell started without a login of its own (`su` without `-`, `sudo -E`), no unlock is kept and each command asks. - **With nobody at a terminal,** a command that needs the keystore uses the unlock when there is one, and otherwise fails, naming `erpc worker secret unlock`. An unlocked keystore hands over secrets, not the trading key. - **On macOS and Windows** (`--store keystore`), no unlock is kept: each command that needs the keystore asks for the passphrase once, and so needs a terminal. ### What the keystore protects, and what it does not - **Back up the `keystore` directory and remember the passphrase.** erpc can recover neither, and without both, what the keystore holds is gone. - Whoever has the keystore files and the passphrase has the key. PBKDF2 makes every guess slow, and does not make a guessable passphrase safe. - While the keystore is unlocked, any program running as you can read the master key from the kernel keyring (one whose session does not hold your keyring can link it in) and open every entry, a key's too. erpc's own rules (the key `[wallet]` names only for a person at a terminal, never for an AI tool; a key kept in the keystore never opened as a secret) are what erpc does; they do not bind other programs running as you. Run `erpc worker secret lock` when you are done. - Entry names are not hidden, and an entry's size shows how long the value is. - A changed file does not open; an older copy of the same entry put back in its place does. - `erpc worker secret rm` deletes a secret's keystore entry along with its line in `erpc.toml` (unless another setting of the app names the same entry), and leaves a value in 1Password or the keychain where it is. It does not scrub the disk, and copies in your backups stay. - erpc never deletes or writes over a trading key's entry. To replace a key, move the funds, then remove its file and `[wallet]` yourself. - A setting cannot be called `WALLET`, in any case, in the keystore or the keychain; `--store 1password` takes the name. ## Work with the trading key | Command | What it does | | --- | --- | | `erpc worker key new` | Makes the trading key and prints the public key to fund | | `erpc worker key import ` | Moves a key file into 1Password, the keychain or the keystore, then offers to wipe the file | | `erpc worker key show` | Shows the key's public key and where it is kept | | `erpc worker key balance` | Shows the key's balance, through the app's own RPC setting | | `erpc worker key send --to
--sol ` | Signs one transfer in memory after your yes at a terminal. `--all` sends everything but the fee | When erpc ends without knowing whether a transfer landed, look up its signature before you send again: a second send is a second transfer. --- title: "Lock down a server and put a WAF in front of your app" description: "erpc worker locks a server down from the first deploy, and one table in erpc.toml puts a WAF in front of a public API. What it does and what it does not." canonical: "https://erpc.global/en/doc/erpc-cli/worker-firewall-and-waf/" locale: "en" --- # Lock down a server and put a WAF in front of your app From the first deploy, `erpc worker` lets SSH in only from your address and drops every other inbound connection. A `[waf]` table puts a filtering proxy in front of your API. This page describes ERPC CLI `v0.1.0-rc.4`, a pre-release. ## The firewall A deploy sets the server's firewall before the app first starts: - SSH only from `firewall.ssh_allow` and the address the deploy comes from; - every other inbound connection dropped, except `run.port` from `firewall.app_allow`; for an app behind a WAF, the WAF's port in its place, and only where the WAF on the server already runs the rules `[waf]` now makes ([below](https://erpc.global/en/doc/erpc-cli/worker-firewall-and-waf/#put-a-waf-in-front-of-your-app)). Each change runs under a 120-second rollback timer and is kept only once a fresh connection gets in, so a mistaken change cannot lock you out. The allow list outlives the address it was made from, though: if your home address changes, the way back in is ERPC support for an ERPC server, or the provider's console for a server of your own. Keep a second address you can reach the server from (an office, a VPN exit) in `firewall.ssh_allow` before you trust a home one. If your address changes, add every fixed address your admins use: ```bash erpc worker firewall allow --to ssh 203.0.113.10 198.51.100.7 ``` | Command | What it does | | --- | --- | | `erpc worker firewall list` | Shows who may reach the server: `erpc.toml` beside the server's table | | `erpc worker firewall allow --to ssh\|app ` | Lets addresses in, and applies it. SSH is allowed from single addresses; a network is accepted only with `--to app` | | `erpc worker firewall deny --to ssh\|app ` | Stops letting them in | | `erpc worker firewall sync` | Makes the server's firewall what `erpc.toml` says again | ## Put a WAF in front of your app Add one table to `erpc.toml`: ```toml [waf] port = 8080 ``` `erpc worker deploy` then runs an HTTP reverse proxy on the server, in a systemd unit of its own (`erpc-waf--`): an unprivileged dynamic user with no key, no secret and nothing of the worker's, held to 1 GiB of memory. It listens on `waf.port`, reads each request before the app does, refuses what its rules name, and forwards the rest to the app on `127.0.0.1:`. - **The app stays on loopback.** Its own port is never opened from outside. `erpc worker api` and the health check reach the app on loopback, past the WAF. - **Who may connect is still the firewall's list**, and the WAF's port is the one place that list may say everyone: ```sh erpc worker firewall allow --to app 0.0.0.0/0 # and ::/0 ``` With nobody listed, the WAF listens and nobody is let in, and the deploy says so. - **The port is opened once the WAF listens on it**, never before. A deploy whose WAF does not come up fails and says why, with the app still running. - **When you change `[waf]`,** the port is not opened to anyone new until a deploy has put the new rules in place. - **Taking `[waf]` out** of `erpc.toml` and deploying removes the WAF from the server. ## WAF settings Only `port` is required. Every key, with its default: ```toml [waf] port = 8080 # the public port, 1024 or above; the app keeps [run] port methods = ["GET", "POST", "PUT", "DELETE"] allow_paths = [] # every path deny_paths = [] max_body_bytes = 1048576 max_header_bytes = 16384 rate = { per_second = 50, burst = 100 } max_connections_per_address = 32 ban = { after = 100, window_secs = 60, for_secs = 600 } block_probes = true header_timeout_secs = 10 body_timeout_secs = 30 upstream_timeout_secs = 30 new_connections = { per_second = 50, burst = 100 } ``` | Key | What it does | What is refused gets | | --- | --- | --- | | `methods` | The methods forwarded, in capitals (16 at most; never `CONNECT`) | 405, with `Allow` | | `allow_paths` | The paths forwarded; none listed is every path. A pattern is one path, or everything under a prefix when it ends in `*`: `/api/*` is `/api` and all below it. Compared with the path once percent-decoded, case-sensitive | 404 | | `deny_paths` | Paths refused, written the same way and checked first | 403 | | `max_body_bytes` | The largest request body, up to 64 MiB | 413 | | `max_header_bytes` | The largest request line and headers together, 1024 to 65536 | 431 | | `rate` | Requests a second from one address, and how many at once before the rate applies | 429, with `Retry-After` | | `max_connections_per_address` | Connections one address holds at once | The connection closed, unanswered | | `ban` | After `after` blocked requests within `window_secs`, the address is refused for `for_secs` (up to 30 days) | Its connections closed, unanswered | | `block_probes` | Refuses what scanners ask for (`/.env`, `/.git`, `/wp-login.php` and the like) | 403 | | `header_timeout_secs` | How long a client has to send a request's head, 1 to 120. Also how long a client that has stopped in the middle of a body, or stopped taking its answer, is waited for | 408 for the head; 400 for a body that stopped; the connection closed for an answer not taken | | `body_timeout_secs` | How long a request's body may take in all, 1 to 600, not counting the time the WAF waits on the app | 408 | | `upstream_timeout_secs` | How long the app has to take the connection and to start answering, 1 to 600 | 504; 502 when the app is not listening | | `new_connections` | The firewall's own limit on new TCP connections a second from one address to the WAF's port, dropped by nftables before the proxy sees them. While nftables' set of addresses is full, an address not in it is not counted, so this limit does not apply to it until the set has room again; the proxy's own limits (`rate`, `max_connections_per_address`, `ban`) still apply | The packet dropped | `rate`, `max_connections_per_address`, `ban` and `new_connections` are turned off with `false` (`ban = false`), and a key left out is its default. `erpc worker check` says what the `[waf]` table will do, and what is wrong with it, before any deploy. ## What the WAF does with no setting needed - A request that does not read as one unambiguous HTTP/1 request gets 400, and so does a path that is not in normal form. - A request to change protocol (`Upgrade`) gets 501. - Every refusal counts towards the ban, and each refusal ends its connection. - An address is an IPv4 address, or an IPv6 `/64`. - The WAF does not forward the headers of the client's connection to the proxy (`Connection` and the headers it names, `Keep-Alive`, `Proxy-Authenticate`, `Proxy-Authorization`, `Proxy-Connection`, `TE`, `Trailer`), `Expect`, headers whose name has an underscore, or the client's own `Forwarded`, `X-Real-IP` and `X-Forwarded-Proto`. It sets `X-Real-IP` to the address the connection came from and adds that address to the end of `X-Forwarded-For`; only the last entry of `X-Forwarded-For` is the proxy's word. ## See what the WAF does | Command | Shows | | --- | --- | | `erpc worker status` | The WAF's port, where it forwards, since when, and the counts since then | | `erpc worker firewall list` | Who may reach the WAF's port, and what was blocked, by rule | | `erpc worker logs --waf` | Each blocked request: the rule, the status, the client's address, the method and the first 200 bytes of the target | A forwarded request leaves no log line, and no header or body is ever logged; a blocked request's query is, as far as the 200 bytes reach. What a client sends cannot write on your terminal: the WAF writes its journal as printable ASCII. ## What the WAF does not do - **No TLS.** It speaks plain HTTP/1.1 on its port. - **No HTTP/2:** it answers 400 to it. - **No WebSocket**, nor any other `Upgrade`: 501. - **No look inside bodies.** A body is measured, never read. The probe list is short and a noise filter, not a guarantee: the app still checks its input. - **No authentication.** Who may call the app is the app's to decide, and the firewall's list. - **One address is one client.** Clients behind one NAT, proxy or CDN share a rate and a ban; a client with many addresses has as many rates. - **Bans and counts are forgotten** when the WAF restarts. - **It remembers at most 8192 addresses** and holds at most 1024 connections at once. - **It listens on IPv4 only,** so an IPv6 entry in `app_allow` reaches nothing yet. - **A path is compared as the bytes it decodes to.** An app that reads paths more loosely (ignoring case, `;` parameters, decoding twice) can be reached under a name `deny_paths` does not cover. `allow_paths` has no such gap: what is not listed is not forwarded. - **A slow reader is served to its end.** A client that keeps taking an answer, however slowly, is served to the end. - **A flood can cut off a large upload.** The WAF runs on one thread, so a flood can cut off a large upload with 408. An app that takes large bodies raises `body_timeout_secs` together with `max_body_bytes`. [The worker guide](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/worker.md) has every rule, including when a change to `app_allow` is held until the next deploy. --- title: "Run, watch and pay for an app with erpc worker" description: "See whether your app runs and what it costs by the hour, roll back a release, measure RPC latency from the server, back up its state and end its hourly charges." canonical: "https://erpc.global/en/doc/erpc-cli/worker-status-and-billing/" locale: "en" --- # Run, watch and pay for an app with erpc worker `erpc worker status` shows whether your app runs and what it costs by the hour. Every start shows its price first, and `erpc worker delete --release-server` ends the gRPC, Shreds and Unlimited RPC the app uses by the hour, then its hourly server. This page describes ERPC CLI `v0.1.0-rc.4`, a pre-release. ## Check an app ```text $ erpc worker status --env prod api-prod on 203.0.113.10: running, release 20261101T093000Z-1a2b3c4d, pid 4217, up 2h 14m current 20261101T093000Z-1a2b3c4d, previous 20261028T171500Z-9f8e7d6c, 2 releases kept WAF: listening on port 8080, forwarding to 127.0.0.1:3000, since 2026-11-01T09:30:12Z; requests 5120, forwarded 5043, blocked 71, connections refused 12, app errors 6, addresses banned now 1 `erpc worker delete --release-server --env prod` ends what this app is charged for. ``` `status` shows whether the app is locked or running, which release, and since when. When you are signed in, it also shows what the environment costs by the hour, each item with the price your account is charged for it, and your account's credit with how long it lasts. `--json` carries the same under `hourly.charged`. An item that is not among the account's charges is said to be not among them, not called ended, because that list can be a minute behind a start. Without a session, or when your account's charges cannot be read, `status` says what is on record. ## Control the app | Command | What it does | | --- | --- | | `erpc worker logs -n 200`, `logs -f` | The app's and the agent's log. A control character in a line is printed as `?` | | `erpc worker start` | Runs the app, sending the key when the worker is locked | | `erpc worker stop`, `stop --lock` | Stops it; `--lock` also drops the key from memory | | `erpc worker restart` | Stops and starts it again | | `erpc worker releases` | The releases kept on the server (`deploy.keep_releases`) | | `erpc worker rollback`, `rollback --to ` | Goes back to the previous release, or the one named. Refused, with the release in use left as it was, when that release's health-check port is now another running worker's | | `erpc worker api ` | Reads the app's API from this machine, with the API still on the server's loopback (`-X POST`, `-d '{...}'` for a change) | | `erpc worker trades [--profit]` | The app's trades on its server | | `erpc worker list` | The apps on this machine and where each is deployed; `--prune` drops those whose `erpc.toml` is gone | The app's `API_TOKEN` is read here and reaches the server on standard input, on no command line and in no journal. Every worker command takes `--env ` (default `default`) and `--json`, except that `secret unlock` and `secret lock`, which are about this machine's keystore and not an app, take no `--env`. Run from anywhere, a command finds its app by the name erpc knows it by; `secret put`, `secret rm`, `key import`, `firewall allow` and `firewall deny` take the app by `--dir` only. ## How hourly charges work - **Every start shows its price first.** At a terminal, a start happens only after a yes; with `--yes`, the command line that names what to start is the yes. - **An hourly product is paid from ERPC Credit**, which is bought beforehand, and a start the credit does not cover is refused. Prices are on [Pricing](https://erpc.global/en/price/) and the [ERPC Web Dashboard](https://dashboard.erpc.global/en). - **A new VPS goes on record as soon as it is named,** before it is ready. The next deploy takes it up instead of buying another. - **For `deploy`, a start that got no answer is sent again, never as a new one.** Its request key stays on record (`[env..starting]`), so running the same command again sends the same request. After some answers it stays until you remove it by hand ([A purchase that erpc cannot put on record](https://erpc.global/en/doc/erpc-cli/worker-troubleshooting/#a-purchase-that-erpc-cannot-put-on-record)). `erpc worker run` keeps no record, so its next run makes a new request. - **Deploy one environment at a time.** Two deploys of the same environment started together can buy two, and that is not supported. - **Whether a line still exists is decided by what the account is charged for.** A line not billed by the hour is never ended by erpc: end it in the dashboard. ## Remove an app `erpc worker delete` removes the worker. `erpc worker delete --release-server` also ends its lines, then its hourly server. What could not be ended stays on record, and a line not billed by the hour is named, to end in the dashboard. - A plain delete refuses a VPS bought and never reached, since it would forget it while charged. A plain delete of a reached hourly VPS takes it off the record while it is still charged, and warns of it. - `--forget` leaves a server that can no longer be reached unreached, and `--forget-line ` takes a line ended outside erpc off the record. ## Measure RPC latency from the server `erpc worker bench` times RPC calls from the environment's server: ERPC's shared RPC, its Unlimited RPC, and any other side by side. The agent on the server times each call, so the numbers are what the app gets. ```bash erpc worker bench # getSlot: shared RPC vs the Unlimited RPC erpc worker bench --rounds 300 --interval 150 # for a plan that limits calls per second erpc worker bench --url other=op:////url # another provider's RPC ``` - `--method` takes `getSlot`, `getBlockHeight`, `getLatestBlockhash` or `getHealth`. - `--no-shared` leaves the shared RPC out. A `--url` value may be the URL itself, an `op://…`, `keychain:…` or `keystore:…` reference (where a URL with a key in it is kept; never the trading key's entry, which is refused), or `-` (read from standard input, or asked for unseen). More than six endpoints are refused. - The bench prints p50, p90, p99, min and max, failures with the first reason, and how many slots each answer was behind the freshest in the same round. - Keys reach the server on standard input only, and the table shows scheme, host and port. ## Back up the app's state `erpc worker backup on` backs the app's state up every day to ERPC Global Storage, encrypted by restic, at `--at` in the server's time and within 30 minutes after. A storage plan is needed (`erpc storage buy 5`). - **What is backed up** is the app's state, `/var/lib/private/erpc-worker-`. The releases are not, since a deploy puts them back. Redis and PostgreSQL data are not covered. - **The server cannot delete snapshots.** It never holds the erpc session, the account's admin key or its master password. - **A server taken over can** read every machine's snapshots in the account, this machine's included; keep the repository's key, which restic never changes, after `off`; add snapshots under another machine's name, so check what `restore latest` picks after one; and fill the account's storage, which stops every machine's backups. `erpc worker backup off` revokes the server's access key first, whether or not the server answers. - **restic copies files as they are** while the worker runs, so a database may need its own dump to restore consistent. A run missed while the server was off runs when it is back. - `erpc worker backup off`, `status` and `now` stop, report on and run the backup. The snapshots stay after `off`, and `erpc backup prune --host` thins out old ones. Restore from this machine, after `erpc backup init` on it: ```bash erpc backup restore latest --from-host erpc-worker-- --path /var/lib/private/erpc-worker- --target ./restored ``` ## Several environments and machines - Several workers on one server each run as their own unit, share the server's firewall table, and each opens only its own port. - One app can have several environments (`[env.staging]`, `[env.prod]`), each with its own server and lines. - An environment can keep its server facts in 1Password instead of `erpc.toml`. Then any machine signed in to that vault, with the app's repository, can run every command; `keychain:` and `keystore:` references in such an app are warned about, since another machine cannot read them. A new environment keeps its facts in 1Password when `erpc login` keeps the session there; `deploy --vault ` names another vault, and `deploy --inline` keeps the facts in `erpc.toml`. --- title: "Fix an erpc worker failure" description: "The erpc worker error messages you meet most, what each means and what to do, how to recover a server that may have been taken over, and what erpc never does." canonical: "https://erpc.global/en/doc/erpc-cli/worker-troubleshooting/" locale: "en" --- # Fix an erpc worker failure Find the start of the message `erpc worker` printed, and do what its row says. This page describes ERPC CLI `v0.1.0-rc.4`, a pre-release. ## Error messages and what to do Worker failures use erpc's codes and exit statuses: see [Errors and exit codes](https://erpc.global/en/doc/erpc-cli/commands/#errors-and-exit-codes). | Message (start of it) | Why | What to do | | --- | --- | --- | | ` cannot start without ` | `run.requires` names a setting nothing sets | `erpc worker secret put `, set it in `[vars]`, or deploy with the line that sets it (`--grpc`, `--unlimited`) | | `your key was added but does not get in` | The SSH agent did not sign: 1Password locked, or its request not allowed | Unlock 1Password, allow the request, and run the same command again. It carries on | | `1Password could not …: authorization timeout` | 1Password asked for approval and nobody answered | Allow the request in 1Password, and run it again | | ` is empty; nothing was kept` | `secret put` read an empty standard input: the shell is not a terminal | Run it in a terminal, or pipe the value in | | `the keystore is locked, and nobody is at a terminal …` | A command without a terminal needs the keystore, and no unlock is kept | `erpc worker secret unlock` at a terminal, then the command again | | `nothing is kept under keystore:… on this machine` | The value was kept in another machine's keystore | `erpc worker secret put --replace` here; for the key, bring that machine's whole `keystore` directory and its passphrase | | `release failed: …; the server went back to ` | The new release did not pass its health check | See `erpc worker logs`. The previous release still runs | | `… is locked: the trading key has not been handed over` | The server rebooted, the agent failed or was killed and systemd started it again, or `stop --lock` | `erpc worker start` | | `port is taken: …` | Another worker that is kept running has the same health-check port, or another program listens on it | Give the app a port of its own in `erpc.toml`, then deploy again | | `release runs, and its WAF did not come up: …` | The WAF did not start listening. Most often, another program is on `waf.port` | `erpc worker logs --waf`, then free the port or change `waf.port`, and deploy again. The app runs meanwhile | | `waf. …` (from `check`, `deploy`) | A `[waf]` key is outside its bounds, or `waf.port` is below 1024, `run.port`'s, SSH's or the health check's | Fix `erpc.toml`. `erpc worker check` lists every problem at once | | `the WAF's port was not opened to …` (from `firewall allow`, `deny`, `sync`) | The change would let someone new in under WAF rules the server is not running yet | `erpc worker deploy`: it puts the new rules in place, then opens the port | | ` line did not become active in minutes` | The line is still being set up | Deploy again to wait more | | `OUT_OF_STOCK` | No server of that plan is free in that region | Deploy with `--region ` | | `the start may or may not have gone through: …` | The request left and no answer came back, or the answer was 5xx, 408 or 429 | Run the same command again: it sends the same request | | `this purchase, or another of the account's, is still being made …` | The first request is still at work, or another purchase of the account's holds its lock | Run the same command again shortly: it sends the same request | | `… changed in 1Password since this command read it` | Another machine wrote the inventory item meanwhile | Run the command again | | `the shared RPC takes none of the account's API keys from this machine ( tried)` (from `secret put --from-account`, `erpc rpc call`, `erpc webhook run`) | Each of the account's keys was refused from this machine: the keys have ended, the account has no active shared RPC plan, or the keys are limited to other addresses, such as a server's | The [ERPC Web Dashboard](https://dashboard.erpc.global/en) shows a key's end date and the plan, and makes a new key. For a key limited to the server's address: `erpc worker secret put ERPC_API_KEY`, typed or piped in | | `shared: … HTTP 401` (bench) | The shared RPC refused the key: no active shared RPC plan, or a wrong key | Check the plan on the dashboard, or set `ERPC_API_KEY` | | `shared: … HTTP 429` (bench) | The plan's rate limit | Use `--interval 150` or more | ### A purchase that erpc cannot put on record When a server or a line may have been started by an earlier request that erpc could not put on record, look at your account's servers and lines in the dashboard. Take a server up with `erpc worker deploy --vps `, or end what is not wanted. Then remove the entry from `[env..starting]` in `erpc.toml` by hand: erpc has no flag that drops it, and until then the same command sends the same request. ## If the server may have been taken over 1. Run `erpc worker backup off` first, to revoke the server's backup access key. `off` does not undo what the server already read. 2. Move funds off its trading key, and replace its secrets. 3. Rebuild the server from the [ERPC Web Dashboard](https://dashboard.erpc.global/en), and deploy again. If the rebuild changed the server's SSH host key, erpc refuses the server until you update the pinned key. A deploy brings back the code, not the app's state, which only a backup can restore ([Back up the app's state](https://erpc.global/en/doc/erpc-cli/worker-status-and-billing/#back-up-the-apps-state)). ## What erpc never does - Put a key, a secret, or a URL that carries one on a command line. - Write a trading key or an app's secret to a file, with one exception: its keystore on your machine, where each is encrypted under your passphrase. On a server, `erpc worker backup on` leaves the server's own backup keys in a root-only file. - Start anything without showing its price. - Leave a server open: the firewall is in force before the app first starts. - Reach a server whose host key does not match the pinned one. [The worker guide](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/worker.md) lists every message, including the WAF's. --- title: "Run validators and RPC nodes with erpc validator and erpc rpc" description: "erpc rpc runs RPC nodes on 18 chains and erpc validator runs validators on 13, with the same verbs on every chain and no ERPC account needed." canonical: "https://erpc.global/en/doc/erpc-cli/nodes/" locale: "en" --- # Run validators and RPC nodes with erpc validator and erpc rpc `erpc rpc` runs RPC nodes on 18 chains and `erpc validator` runs validators on 13 of them. Every chain uses the same verbs, and these node lifecycle commands are free and need no account. This page describes ERPC CLI `v0.1.0-rc.4`, a pre-release. Acceptance on real hosts is still under way: [Where each chain stands](https://erpc.global/en/doc/erpc-cli/nodes/#where-each-chain-stands) and each chain's guide give the state of each chain. ## Deploy a node `init` prepares a server and `deploy` installs and starts the node. An Ethereum RPC node starts from a bare Ubuntu server, 24.04 or later: ```bash # check the server, pin the client releases, store the node in 1Password erpc rpc --chain ethereum -n mainnet --name eth1 init --host
--vault --ssh-key ~/.ssh/id_ed25519.pub # install, fetch a snapshot, apply the firewall, start erpc rpc --chain ethereum -n mainnet --name eth1 deploy --ssh-key ~/.ssh/id_ed25519.pub # both layers, sync and head erpc rpc --chain ethereum -n mainnet --name eth1 status --ssh-key ~/.ssh/id_ed25519.pub ``` Some chains need more in place first, and each chain's guide says what. A new Solana validator or RPC node needs three filesystems mounted and its keys already in 1Password. ## Choose the chain, network and host Pick the chain with `--chain`, `ERPC_CHAIN` or the `default_chain` setting, the network with `-n`, and the host with `--name`. A change to mainnet needs `--chain` written on the command line. - `erpc validator` (alias `v`), `erpc rpc` (alias `r`) and `erpc node` (alias `n`, for Avalanche and Sui) run the node commands. - Run a command group without a verb (`erpc validator`) to list its verbs. - On node commands, `--json` has to go before the command: `erpc --json rpc …`. ## Commands that work on every chain | Verb | What it does | | --- | --- | | `init` | Checks the server, pins client releases, stores the node in 1Password and prepares the host | | `deploy` | Installs or builds the client, fetches a snapshot, applies the firewall where erpc has one for that node, and starts the node | | `list`, `status`, `logs` | Inventory, health and journal | | `start`, `stop`, `restart` | Service control, in the right order for nodes with several layers | | `update` | Moves to another client release; the rollback policy depends on the client | | `update-config` | Applies configuration and access changes using the chain's restart rules | | `plan` | Shows the chain's deployment or configuration plan | | `destroy` | Stops or retires owned services; data, key and firewall retention follow the chain's operations guide | A Solana validator recorded on the solv backend has only `init`, `deploy`, `list` and `status` of these. ## Chains and guides | Chain | RPC node | Validator | Networks | Guides | | --- | --- | --- | --- | --- | | Solana | `erpc rpc --chain solana` | `erpc validator --chain solana` | mainnet, testnet | [Operations](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/solana-native.md), [Registration](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/solana-registration.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/solana.md) | | Ethereum | `erpc rpc --chain eth` (mainnet, `--type full` or `archive`) | `erpc validator --chain eth` (Hoodi, mainnet) | mainnet, Hoodi | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/ethereum-rpc.md), [Validator](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/ethereum-validator.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/ethereum.md) | | Base | `erpc rpc --chain base` | | mainnet, sepolia | [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/base.md) | | Avalanche | `erpc rpc --chain avax` (also `erpc node`) | `erpc validator --chain avax` | mainnet, fuji | [Operations](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/avalanche.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/avalanche.md) | | Bitcoin | `erpc rpc --chain bitcoin` | | mainnet, testnet4, signet, regtest | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/bitcoin-rpc.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/bitcoin.md) | | Polygon | `erpc rpc --chain polygon` | `erpc validator --chain polygon` | mainnet, amoy | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/crates/erpc-chain-polygon/templates/README.md), [Validator](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/polygon-validator.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/polygon.md) | | BNB Chain | `erpc rpc --chain bsc` | `erpc validator --chain bsc` | mainnet, chapel | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/bsc-rpc.md), [Validator](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/bsc-validator.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/bsc.md) | | Kaia | `erpc rpc --chain kaia` | `erpc validator --chain kaia` | mainnet, kairos | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/kaia-rpc.md), [Core cell](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/kaia-core-cell.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/kaia.md) | | Arbitrum | `erpc rpc --chain arbitrum` (mainnet, nova, sepolia) | `erpc validator --chain arbitrum` (Arbitrum One mainnet only) | mainnet, nova, sepolia | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/nitro-rpc.md), [Validator](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/arbitrum-validator.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/arbitrum.md) | | Optimism | `erpc rpc --chain optimism` | | mainnet, sepolia | [Operations](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/op-follower-rpc.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/optimism.md) | | Hyperliquid | `erpc rpc --chain hyperliquid` | `erpc validator --chain hyperliquid` | mainnet, testnet | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/hyperliquid-rpc.md), [Validator](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/hyperliquid-validator.md), [AQA](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/hyperliquid-aqa.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/hyperliquid.md) | | Monad | `erpc rpc --chain monad` | `erpc validator --chain monad` | mainnet, testnet | [Operations](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/monad-node.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/monad.md) | | TRON | `erpc rpc --chain tron` | `erpc validator --chain tron` | mainnet, nile | [Operations](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/crates/erpc-chain-tron/templates/README.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/tron.md) | | Sui | `erpc rpc --chain sui` (also `erpc node`) | `erpc validator --chain sui` | mainnet, testnet | [Operations](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/crates/erpc-chain-sui/templates/README.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/sui.md) | | NEAR | `erpc rpc --chain near` | `erpc validator --chain near` | mainnet, testnet | [RPC](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/near-rpc.md), [Validator](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/near-validator.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/near.md) | | Arc | `erpc rpc --chain arc` | | mainnet, testnet | [RPC runtime](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/arc-runtime.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/arc.md) | | Robinhood Chain | `erpc rpc --chain robinhood` | `erpc validator --chain robinhood` | mainnet, testnet | [Admission](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/robinhood-admission.md), [Validator](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/robinhood-defensive-validator.md), [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/robinhood.md) | | Soneium | `erpc rpc --chain soneium` | | mainnet, minato | [Chain](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/soneium.md) | [Running nodes](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/nodes.md) has the clients for each chain. ## What erpc needs on the server - erpc logs in over SSH as a sudo user (`ubuntu` by default) with your key, from the 1Password SSH agent or `SSH_AUTH_SOCK`, and pins the host key the first time. - The server needs `/usr/bin/python3` and a login whose `sudo` asks for no password. - `/opt` must already be a real directory owned by root that neither its group nor others can write, as Ubuntu ships it; erpc does not create it. `/opt/erpc` and the `runs` and `uploads` directories erpc makes in it are held to the same rule, and none of these may be a symbolic link: to keep them on another volume, mount the volume at `/opt/erpc`. For a node, the filesystem that holds `/opt/erpc` must also keep POSIX ACLs (ext4 and XFS do by default), or erpc stops. - A new Solana host needs Ubuntu 24.04, systemd 255 and x86-64 with AVX2 and SHA CPU features. ERPC requires at least 32 logical threads and 480 GiB of usable memory for a Solana RPC node, 24 threads and 300 GiB for a mainnet validator, and 24 threads and 120 GiB for a testnet validator. ## How erpc runs a node - Most chains run the client as its own user that cannot log in, check each release against a pinned checksum before it is installed, and apply an nftables firewall with a timed rollback that a fresh management connection must confirm. Not all of them do: a new Solana node is built on the server from a pinned source commit, and a Solana node recorded on the solv backend runs as a login user with passwordless sudo and fetches some tools without a checksum. - erpc applies no firewall to Solana validators on the solv backend, Ethereum validators or Bitcoin nodes, so filtering those hosts is yours to do. - Keep an independent way to reach the host during network changes. - While a protected service's drop-in directory holds another file, such as an `override.conf` from `systemctl edit`, the firewall step refuses and changes nothing. Move your drop-in out of the directory and run the command again. - Secrets sent from your machine reach the server over standard input, never on a command line. - A new Solana validator syncs under a separate identity with voting disabled. `deploy --activate-validator` switches a healthy host to its original registered identity after public registration and native BLS checks. `--backend solv` resumes an existing solv host and cannot create a new one. - Do not restore an Ethereum validator's signer from a backup: move a signer with `erpc v --chain eth migrate`. [Sign in and keys](https://erpc.global/en/doc/erpc-cli/sign-in-and-keys/#where-node-keys-are-kept) shows which keys each node keeps in 1Password and on the host. ## Where each chain stands For every chain in the table, the implementation is checked offline, and live acceptance on real hosts is deferred. The RPC command-routing check exercises all twelve common verbs for all eighteen chains, and none of these checks runs a node on a real host. Each chain's page in the [chain source map](https://github.com/elsoul/erpc-cli/blob/v0.1.0-rc.4/docs/chains/README.md) says where it stands. --- title: "ERPC CLI commands" description: "Every ERPC CLI command group, the global options --json and --lang, the error format and exit codes, and the erpc storage and erpc backup commands." canonical: "https://erpc.global/en/doc/erpc-cli/commands/" locale: "en" --- # ERPC CLI commands Every ERPC CLI command group in one table, the options that work on every command, and the exit codes a script can rely on. This page describes ERPC CLI `v0.1.0-rc.4`, a pre-release. ## Command groups Run any command group without a verb, such as `erpc validator` or `erpc worker`, to list its verbs. | Command | What it does | | --- | --- | | `validator` (`v`), `rpc` (`r`), `node` (`n`) | [Validators and RPC nodes](https://erpc.global/en/doc/erpc-cli/nodes/) | | `rpc call` | Sends one JSON-RPC request to a shared, custom or x402 endpoint ([RPC calls and webhooks](https://erpc.global/en/doc/erpc-cli/rpc-call-and-webhooks/)) | | `webhook` | Manages local RPC subscriptions and delivers events to an HTTP callback | | `ai`, `resume`, `memory`, `skills` | [ERPC AI](https://erpc.global/en/doc/erpc-cli/ai/), its saved conversations, memory and skills | | `worker` (`w`) | [Your own apps](https://erpc.global/en/doc/erpc-cli/worker-quickstart/) on a server | | `storage` (`st`), `backup` | ERPC Global Storage and machine backups ([below](https://erpc.global/en/doc/erpc-cli/commands/#storage-and-backups)) | | `wallet` | The Base wallet that buys ERPC Credit with EURC ([Pay from a wallet](https://erpc.global/en/doc/erpc-cli/ai/#pay-from-a-wallet)) | | `signup`, `login`, `logout`, `whoami` | Your ERPC account ([Sign in and keys](https://erpc.global/en/doc/erpc-cli/sign-in-and-keys/)) | | `doctor` | Reports how this machine stores your session | | `config` | Reads and changes `~/.erpc/config.toml` (public settings only). `erpc config init` writes a commented starting file, unless there is one | | `version` | Version, build and component information | | `completions` | Generates shell completions: `erpc completions zsh`, and also bash, fish, powershell and elvish | ## Global options - **`--json`** gives machine-readable output: `erpc --json `. `ERPC_JSON=true` has the same effect. On node commands, `--json` has to go before the command. - **`--lang`** sets the language erpc speaks: `en`, `ja`, `zh` or `ru`. Without it, erpc uses the `locale` setting, else the system's language. ## Errors and exit codes A failure reads the same everywhere: an `error:` line saying what went wrong, and a `hint:` line saying what to do next when there is one. With `--json`, a failure is one object on standard output, `{"error": {"code", "exit", "message", "hint"}}`. Two cases print clap's own message and exit 2 instead: a command line clap cannot parse at a terminal, and an argument the verb of a node tree (`erpc validator`, `rpc`, `node`) does not take, even under `--json`. A `details` field appears only when a command has more to say to a script about what it did before it failed, and never at a terminal. | Exit | Code | Meaning | | --- | --- | --- | | 0 | | It worked | | 1 | `failed` | It could not do what was asked | | 2 | `usage` | The command line was not usable | | 3 | `needs_terminal` | A person must answer: pass `--yes` or run it in a terminal | | 4 | `not_signed_in` | Run `erpc login` | | 5 | `problems_found` | A check (`status`, `doctor`) found problems, and its report says which | | 6 | `declined` | You said no, and nothing was changed | | 7 | `network` | ERPC or another service could not be reached | Stopped by Ctrl-C (or SIGTERM, SIGHUP), erpc ends by the signal itself, so a loop in a script stops too. A published code keeps its name and its exit status, and a code is never reused. ## Storage and backups ```bash erpc storage buy 5 # an ERPC Global Storage plan erpc backup init # back this machine up with restic, on a schedule if you like ``` `erpc storage buy` buys an ERPC Global Storage plan, paid from ERPC Credit. Plans and prices are on [Pricing](https://erpc.global/en/price/). ### erpc storage - `erpc storage put` encrypts a file on this machine before any of it is sent, unless `--no-encrypt` is given. ERPC stores only the encrypted bytes and never holds the key. `erpc storage get` notices an encrypted file and decrypts it. - There is one storage key per account, kept in the store `erpc login` chose. erpc does not keep it in the Linux kernel keyring, which is lost on reboot: sign in with `--store 1password` or `--store file`, or use `--no-encrypt`. With the `file` store the key sits in `~/.erpc/storage-key` (mode 0600), not encrypted. `--no-encrypt` uploads the file you are sending as it is, unencrypted. - **Losing the storage key loses every file encrypted with it**, and ERPC cannot recover it. `erpc storage key export --show` prints the key so a copy can be kept away from the machine, and `erpc storage key import` takes it back on another machine. - The path a file is stored under, and its size, are visible to ERPC. - `erpc storage keys list` shows the storage access keys, and `erpc storage keys revoke ` revokes one. ### erpc backup `erpc backup` backs a machine up to ERPC Global Storage with restic. Files are encrypted on your machine before they leave it, and ERPC never holds a password that opens the backups. | Command | What it does | | --- | --- | | `erpc backup init` | Installs restic, makes the access keys and the repository, and gives this machine its own restic key | | `erpc backup run [paths]` | Backs up. On Linux, with no paths, `/` less pseudo-filesystems, mounts and volatile paths. Elsewhere, name the paths | | `erpc backup snapshots` | This machine's snapshots; `--all-hosts` for every machine's | | `erpc backup restore ` | Restores into a new directory unless `--target` names another. `--in-place` writes over this machine, after asking | | `erpc backup check` | Checks the repository and reads back 5% of the data | | `erpc backup prune` | Keeps 7 daily, 4 weekly and 6 monthly snapshots of one machine, after asking | | `erpc backup schedule daily\|weekly\|off [paths]` | Runs `run` on a timer, at `--at` (default 03:00) | | `erpc backup status` | The schedule, and how the last run ended | | `erpc backup password --show` | Prints the repository's master password, to keep a copy elsewhere | - **Each machine gets an append-only key** that cannot delete its own backups. The machine where you ran `erpc backup init` also holds the keys that can, so the protection holds only on a machine that keeps neither the erpc session nor the account's backup secrets. - **Keep a copy of `erpc backup password --show` away from the machines.** Losing the master password and every machine's `backup.env` loses the backups. - **A backup leaves out known key files and system secrets**, such as `.ssh/id_*`, `.config/solana/id.json`, erpc's session and the SSH host keys. Key material under another name or at another place is backed up like any other file: leave it out with `--exclude`. - erpc installs restic 0.19.1 and checks both the archive and the program against SHA-256 digests compiled into erpc. - **Scheduling:** on Linux, `sudo erpc backup init`, then `sudo erpc backup schedule daily`. On macOS, `erpc backup schedule daily ~/Documents`; the job runs as you, while you are signed in. - Backups go to the account's default region. `erpc backup` runs on the machine it backs up; a worker's server is set up with `erpc worker backup on` instead ([Back up the app's state](https://erpc.global/en/doc/erpc-cli/worker-status-and-billing/#back-up-the-apps-state)). --- title: "Solana MCP Server: Connect Solana RPC to Claude" description: "Set up the ERPC Solana RPC MCP Server in Claude with Google sign-in and use read-only RPC tools for wallets, transactions, and network health." canonical: "https://erpc.global/en/doc/rpc/solana-mcp-server/" locale: "en" --- # Solana MCP Server: Connect Solana RPC to Claude ## What is the ERPC Solana MCP Server? The ERPC Solana RPC MCP Server lets Claude access read-only Solana RPC methods through natural-language requests. With the ERPC Solana RPC MCP Server, you can ask questions like wallet checks, transaction investigation, and network health monitoring, and Claude can call the required Solana RPC tools for you. The tools are read-only Solana RPC methods and a check of your RPC token balance; `sendTransaction` and `requestAirdrop` are not included. ## Setup ### Step 0 - Sign in to ERPC with Google Sign in to the ERPC Web Dashboard with Google: choose `Google` under `Login with`. Your ERPC account also needs an RPC key, which you can see in the RPC keys tab of the dashboard. Tool calls are sent with this RPC key, and the Solana RPC tools use your RPC tokens. Before the one-time €5 verification fee is paid, or while no tokens remain, the Solana RPC tools return `Request failed (HTTP 500).`, even after your Google account is linked. To link Google to your ERPC account, sign in to the dashboard with a Google account that uses the same email address as your ERPC account. The MCP server then uses the ERPC account that your Google account is linked to. - ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) Use the same Google account later when you authorize in Claude. ### Step 1 - Add the MCP server in Claude Connectors In Claude, open `Settings` -> `Connectors` -> `Add custom connector` and set this server URL: ```text entry=agent-mcp https://mcp-solana-rpc-api.erpc.global/mcp ``` ### Step 2 - Authorize with the same Google account After adding the connector, start the connection. The `Connect to ERPC` screen appears first; select `Continue with Google` and choose the same Google account you used in Step 0. The connection expires 30 days after you authorize, or sooner once it goes unused for 7 days. Authorize again with the same Google account to reconnect. ### Step 3 - Verify with simple prompts After connection is complete, run simple prompts to verify tool calls. - Balance check (getBalance) - Cluster health / epoch info (getHealth, getEpochInfo, getSlot) - Block info (getBlockHeight, getLatestBlockhash) ## Reference Videos ### Use Cases Demo (Wallet, Transaction, Network Health) [https://www.youtube.com/watch?v=rHAtavYOoiQ](https://www.youtube.com/watch?v=rHAtavYOoiQ) ## 3 Use Cases ### Use Case 1 - Wallet Balance Check Prompt: ```text What's the SOL balance of wallet address EiwSTx1Z2uJATDut682U7xzzquFR4UpQJUij3wSxVoSV? ``` Tool called: `getBalance` Use this when you want to monitor wallets, verify transfers, or check holdings quickly. ### Use Case 2 - Transaction Investigation Prompt: ```text Look up Solana transaction 2qf1KikxxgqmtHFVMhaLSaAhDGJC2ob49mMbbShvDBTdtTN1rG6L98Jn4h9n1myKr5QQVptnYRMrUXqFhog4XH5g and explain what happened. ``` Tool called: `getTransaction` You can inspect instructions, signers, fees, and status, then get a natural-language explanation of what happened. ### Use Case 3 - Network Health Monitoring Prompt: ```text What's the current Solana epoch info, slot height, and cluster health? ``` Tools called: `getEpochInfo`, `getSlot`, `getHealth` This is useful for validator operation, RPC operation, and trading system monitoring. ## Why It's Useful When getting started on Solana, building the right RPC query for each goal can take time. With MCP, you describe what you want in natural language and Claude can map it to the right Solana RPC method for you. This lowers the barrier for both quick checks and deeper chain analysis. ## Get Started 1. Sign in to the ERPC Web Dashboard with Google and check that your account has an RPC key. 2. Add the MCP server URL in Claude Connectors. 3. Authorize with the same Google account. 4. Start with `getBalance`, `getTransaction`, and network health prompts. - MCP Server: [https://mcp-solana-rpc-api.erpc.global/mcp](https://mcp-solana-rpc-api.erpc.global/mcp) - ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) --- title: "FAQ" description: "The ERPC FAQ in two parts: questions not specific to a chain, such as getting started and latency, and questions for Solana, such as SWQoS and Geyser gRPC." canonical: "https://erpc.global/en/faq/" locale: "en" --- # FAQ Questions not specific to a chain, such as getting started, latency and regions, come first; answers that depend on how Solana works follow under Solana. ## Not specific to a chain - [How to start](https://erpc.global/en/faq/how-to-start/general/): Get started - [Latency and regions](https://erpc.global/en/faq/latency/general/): Get started - [VPS](https://erpc.global/en/faq/vps/general/): Servers - [Bare Metal](https://erpc.global/en/faq/metal/general/): Servers - [ERPC AI](https://erpc.global/en/faq/erpc-ai/general/): AI & agents ## Solana - [SWQoS](https://erpc.global/en/faq/qos/general/): RPC APIs › Edge RPC › Solana - [Edge RPC](https://erpc.global/en/faq/rpc/general/): RPC APIs › Solana - [Solana Geyser gRPC](https://erpc.global/en/faq/grpc/general/): Data streams - [Solana Shreds](https://erpc.global/en/faq/shreds/general/): Data streams › gRPC --- title: "FAQ - How to Start ERPC" description: "Frequently asked questions about getting started with ERPC: the ERPC Web Dashboard, the Free plan, charges, tokens, 401 and 429 errors, and paying with crypto." canonical: "https://erpc.global/en/faq/how-to-start/general/" locale: "en" --- # FAQ - How to Start ERPC Questions about distance, speed and regions are in [Latency and regions](https://erpc.global/en/faq/latency/general/). ## Start from the ERPC Web Dashboard You can easily begin using ERPC services via the ERPC Web Dashboard. [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Detailed Getting Started Guide in the ERPC Web Dashboard Detailed step-by-step instructions are available from the ERPC Web Dashboard: 🔗 [ERPC Web Dashboard](https://dashboard.erpc.global/en) Our support team is ready to assist you smoothly through your first steps, so please start from the dashboard when you are ready. ## Q. Will I be charged immediately? €5 is a one-time verification fee, charged immediately. It is not a subscription or ERPC Credit. Once verification is complete, the fee is not refunded or converted to credit, except where required by law. Eligible first-time users receive a 24-hour Bundle Standard trial automatically after verification. This benefit is available once per person, including across accounts, and ends automatically unless you choose to continue. ## Q. Is there a free plan? Eligible verified users receive 4,200,000 free RPC tokens each UTC month. Unused tokens do not carry over. The allowance is shared across supported chains. On Solana, the Free plan allows up to 5 requests per second. Other chains have their own limits: Base and Polygon, for example, allow one request per 10 seconds per account, and requests to other chains can count toward it. Follow each chain's quickstart to set the interval. ## Q. How many tokens does each method consume? Each RPC call uses tokens according to the chain and the method. Each call in a batch is counted on its own. The [API Usage](https://dashboard.erpc.global/en/user/api-usage) page of the dashboard shows each token as one credit. The values for each chain are below. ### Solana Calls to `https://edge.erpc.global` use these tokens per call: | Method | Tokens per call | | --- | --- | | Standard Solana JSON-RPC methods not in the rows below, such as `getAccountInfo`, `getBalance`, `getTokenLargestAccounts` and `sendTransaction`, plus `getProgramAccountsV2` and `getPriorityFeeEstimate` | 42 | | `getSignaturesForAddress` | 84 | | `getTransaction` | 124 | | `getBlock`, `getProgramAccounts`, `getLeaderSlots`, `getTransactionsForAddress`, `getTransfersByAddress`, `jetTopPrograms`, `jetSlotStats`, `jetTpsTimeseries`, `jetEpochSummary`, `jetProgramStats` | 420 | | DAS methods: `getAsset`, `getAssetBatch`, `getAssetProof`, `getAssetProofBatch`, `getAssetsByAuthority`, `getAssetsByCreator`, `getAssetsByGroup`, `getAssetsByOwner`, `getNftEditions`, `getSignaturesForAsset`, `getTokenAccounts`, `searchAssets`, `getTokensByOwner`, `getTokensByDelegate` | 420 | | `getMultipleAccounts` | 420 + 42 × N, where N is the number of pubkeys in `params[0]` | | `getSignatureStatuses` | 42 + 42 × N, where N is the number of signatures (up to 256) | | `getValidatorsInformation` | 100 per 10 validators | A `getMultipleAccounts` call for 100 pubkeys uses 420 + 42 × 100 = 4,620 tokens, and a `getSignatureStatuses` call for 10 signatures uses 42 + 42 × 10 = 462. The 100 in the `getValidatorsInformation` row is for every 10 validators returned, and a partial group of 10 counts as a full one: 1 validator uses 100 tokens, 11 use 200, and 95 use 1,000. A response with no validators uses none. With `history=true` in the URL, blocks and transactions older than the recent range each node holds are fetched by history access. A call that history access answers costs 640 + 82 × N tokens in total, in place of its regular value. N is 1 for every method except the two below, so a `getBlock` call answered this way costs 722 instead of its regular 420. For `getSignatureStatuses`, N is the number of signatures: 10 signatures cost 640 + 82 × 10 = 1,460. For `getTransactionsForAddress` in `"full"` mode, which always uses history access, N is the number of transactions fetched: 100 transactions cost 640 + 82 × 100 = 8,840. The details are in [History Access](https://erpc.global/en/doc/rpc/general/#history-access). On WebSocket (`wss://edge.erpc.global`), each connection uses 10 tokens, and subscription methods such as `accountSubscribe` use 42. Calls sent over the connection use the values in the table above, but nothing is counted per signature or per transaction: `getSignatureStatuses` uses 42 however many signatures it asks for, and `getTransactionsForAddress` uses 420 in `"full"` mode too, not 640 + 82 × N. `getMultipleAccounts` uses 42 for each pubkey, without the 420 for the call. For method details, see the [Solana RPC API Reference](https://erpc.global/en/api-doc/). ### Solana Devnet and Testnet | What is counted | Tokens | | --- | --- | | An HTTP call (except the methods in the next row) | 135 | | A `getLargestAccounts` or `getSupply` call | 540 | | A WebSocket subscribe or unsubscribe request | 135 | | Every 0.1 MB of data the server sends you over WebSocket | 68 | | Opening a WebSocket connection and keeping it open | 0 | Only the data in the messages the server sends you is counted, not control frames or frame headers. It is totaled per connection, and a fraction under 1 token rounds up. A Free plan RPC key cannot use Devnet or Testnet; add a paid plan to use them. ### Ethereum and Avalanche Ethereum and Avalanche use the values below. The per-method lists are in Usage Metering for [Ethereum RPC](https://erpc.global/en/doc/ethereum-rpc/general/#usage-metering) and [Avalanche RPC](https://erpc.global/en/doc/avalanche-rpc/general/#usage-metering). A call sent over a WebSocket connection uses the same value as an HTTP call. On Ethereum (`edge.erpc.global/eth`): | What is counted | Tokens | | --- | --- | | A call to one of the 46 methods listed at 42 tokens, such as `eth_call`, `eth_getBalance`, `eth_getBlockByNumber` and `eth_subscribe` | 42 | | A call to one of the 18 methods listed at 81 tokens, such as `eth_getHeaderByNumber`, `eth_pendingTransactions` and `eth_protocolVersion` | 81 | | A call to one of the 9 methods listed at 84 tokens, such as `eth_getLogs`, `eth_sendRawTransaction` and `eth_simulateV1` | 84 | | A call to one of the 17 methods listed at 162 tokens, such as `debug_traceTransaction` and `trace_block` | 162 | | A call to `trace_callMany` or `txpool_content` | 168 | | A call to `trace_replayBlockTransactions` or `trace_replayTransaction` | 324 | | A call to a method not listed in Usage Metering for Ethereum RPC | 81, 162 or 324 | | Each subscription notification received over WebSocket | 42 | When you estimate, count a call in the "81, 162 or 324" row as 324, the highest of the three values. On Avalanche (`edge.erpc.global/ava`): | What is counted | Tokens | | --- | --- | | A call to one of the 81 methods listed at 42 tokens, such as `eth_call`, `avax.getUTXOs` and `platform.getCurrentValidators` | 42 | | A call to one of the 50 methods listed at 81 tokens, such as `eth_feeHistory`, `platform.getBlock` and `index.getContainerByIndex` | 81 | | A call to `eth_getLogs`, `eth_getFilterLogs`, `eth_sendRawTransaction`, `txpool_status` or `debug_traceCallMany` | 84 | | A call to `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall` or `debug_traceTransaction` | 162 | | A call to `txpool_content` | 168 | | A call to a method not listed in Usage Metering for Avalanche RPC | 81, 84, 168 or 324 | | Each subscription notification received over WebSocket | 42 | When you estimate, count a call in the "81, 84, 168 or 324" row as 324, the highest of the four values. ### Base Base uses the values below. The per-method list, how subscription notifications are counted, and worked examples are in [Usage Metering for Base RPC](https://erpc.global/en/doc/base-rpc/general/#usage-metering). | What is counted | Tokens | | --- | --- | | A call to one of the 49 methods listed at 81 tokens in Usage Metering for Base RPC, such as `eth_call`, `eth_blockNumber` and `eth_subscribe` | 81 | | A call to one of the 13 methods listed at 84 tokens, such as `eth_getLogs`, `eth_simulateV1` and `trace_call` | 84 | | A call to `eth_sendRawTransaction`, `debug_getBadBlocks`, `debug_storageRangeAt`, `debug_traceBlock`, `debug_traceBlockByHash`, `debug_traceBlockByNumber` or `debug_traceTransaction` | 162 | | A call to `trace_callMany`, `trace_replayBlockTransactions` or `trace_replayTransaction` | 168 | | A call to a method not listed in Usage Metering for Base RPC | 81 or 324 | | Each WebSocket connection | 10 | | Each subscription notification received over WebSocket | 81 | When you estimate, count a call in the "81 or 324" row as 324, the higher of the two values. On the Free plan, Base is available over HTTP only: a WebSocket connection is answered with HTTP `403`. ### Other chains These chains accept the methods listed under Supported Methods in each chain's documentation, and no others. They use these tokens per call: | Chain | Tokens per call | Exceptions | | --- | --- | --- | | [Arbitrum](https://erpc.global/en/doc/arbitrum-rpc/general/) | 81 | 84: `eth_getLogs`, `trace_block`, `trace_transaction`. 162: `eth_sendRawTransaction`, `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction` | | [Bitcoin](https://erpc.global/en/doc/bitcoin-rpc/general/) | 42 | None | | [Hyperliquid](https://erpc.global/en/doc/hyperliquid-rpc/general/) | 81 | 84: `eth_getLogs`, `eth_sendRawTransaction`, `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction`, `trace_block`, `trace_transaction`. 162: `hl_portfolioState` | | [Kaia](https://erpc.global/en/doc/kaia-rpc/general/) | 81 | 84: `eth_getLogs`, `txpool_inspect`, `txpool_status`, `trace_block`, `trace_transaction`. 162: `eth_sendRawTransaction`, `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction`. 168: `txpool_content` | | [Monad](https://erpc.global/en/doc/monad-rpc/general/) | 122 | 243: `eth_sendRawTransaction`, `txpool_inspect`, `txpool_status`, `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction`. 485: `txpool_content` | | [NEAR](https://erpc.global/en/doc/near-rpc/general/) | 203 | None | | [Optimism](https://erpc.global/en/doc/optimism-rpc/general/) | 81 | 84: `eth_getLogs`, `trace_block`, `trace_transaction`. 162: `eth_sendRawTransaction`, `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction` | | [Polygon](https://erpc.global/en/doc/polygon-rpc/general/) | 81 | 84: `eth_getLogs`. 162: `eth_sendRawTransaction`, `txpool_inspect`, `txpool_status`, `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction`, `trace_block`, `trace_transaction`. 324: `txpool_content` | | [Robinhood Chain](https://erpc.global/en/doc/robinhood-rpc/general/) | 81 | 84: `eth_getLogs`, `trace_block`, `trace_transaction`. 162: `eth_sendRawTransaction`, `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction` | | [Soneium](https://erpc.global/en/doc/soneium-rpc/general/) | 81 | 84: `eth_getLogs`, `eth_sendRawTransaction`. 162: `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceTransaction` | | [Sui](https://erpc.global/en/doc/sui-rpc/general/) | 162 | None | | [TRON](https://erpc.global/en/doc/tron-rpc/general/) | 122 | 243: `/wallet/getnowblock`, `/wallet/gettransactionbyid` | You can find the tokens included in each plan on the [Pricing](https://erpc.global/en/price/) page, and your usage for this calendar month (UTC) in the [ERPC Web Dashboard](https://dashboard.erpc.global/en). ## Q. Why am I receiving a 401 error? A 401 error indicates an authentication issue. Please verify the following: - Whether your subscription has started - If you have remaining credits If you are out of credits, consider upgrading your plan. ## Q. Why am I receiving a 429 error? A 429 error means you have hit the rate limit. If this error occurs frequently and impacts your service, please consider upgrading your plan. ## Q. Will my price go up after I subscribe? While your subscription stays active, the price you locked in at signup remains in effect. Environments that hold up under Solana's real-time workload are globally scarce, and we plan to step up prices in line with growing hardware and network demand. Higher-spec configurations and high-demand regions sell through fastest, so locking in today's price is the most cost-efficient choice over the long run. ## Q. I want to pay with crypto Crypto payments are available from the ERPC Web Dashboard when your registered billing address country is one of the EU member countries. If every payment card registered on your account was issued outside the EU, crypto payments are not available. You can use SOL, USDC, or EURC to purchase ERPC Credits. Use those ERPC Credits to activate or continue ERPC plans. Open the dashboard, choose crypto payment, send the transfer from your wallet, and the dashboard will verify the transaction and apply the credits to your account. Supported countries: Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden. For countries not on the list, please pay by credit card. [ERPC Web Dashboard](https://dashboard.erpc.global/en) --- title: "FAQ - Latency and regions" description: "Frequently asked questions about latency and regions with ERPC, in two parts: questions not specific to a chain, then answers that depend on how Solana works." canonical: "https://erpc.global/en/faq/latency/general/" locale: "en" --- # FAQ - Latency and regions Questions about billing, the Free plan, payment and 401 or 429 errors are in [How to start](https://erpc.global/en/faq/how-to-start/general/). ## Not specific to a chain These questions cover how distance, region, server placement, shared or dedicated endpoints and your client's language affect latency. ### Q. Do I need to choose a region? With [Edge RPC](https://erpc.global/en/doc/rpc/edge/), you do not need to choose a region. An application that connects to edge.erpc.global is routed automatically to a nearby entry point on the network path. With Unlimited Endpoints for Solana, Ethereum and Avalanche C-Chain, you choose the region when you order, close to where your trading system or backend runs. Check the available regions in the [ERPC Web Dashboard](https://dashboard.erpc.global/en) when ordering. On Solana, no one region suits every strategy, because the leader role rotates across validators on the leader schedule; see the Solana section below. ### Q. I'm experiencing high latency. Why? Are you accessing the endpoint from a physically close location? Distance significantly affects latency. We recommend accessing from servers close to the provided endpoint. Our network theoretically provides the fastest connections through our [Bare-Metal servers](https://erpc.global/en/baremetal/) and [VPS services](https://erpc.global/en/vps/). ### Q. What is the latency like? Latency varies depending on the measurement method and your specific usage environment. Rather than focusing on exact numerical values, it's crucial to ensure that the latency meets your actual operational requirements. For Solana, you can measure latency with these open-source tools for TypeScript and Rust. - [Solana Stream SDK - ValidatorsDAO GitHub](https://github.com/ValidatorsDAO/solana-stream) - [SLV (English)](https://slv.dev/en) ### Q. Why are dedicated endpoints faster? Shared endpoints are used by multiple customers who share the same resources. As traffic increases, latency tends to occur. Server resources have physical limits, and the amount of work they can handle is finite. When too many requests arrive at the same time, they must be processed sequentially, which results in slower response times. Although we take various measures to optimize performance even on shared endpoints, with dedicated endpoints you are the sole user of the resource. This means you are completely unaffected by other users, ensuring consistently stable and fast responses. In addition, dedicated endpoints provide communication options without TLS, such as HTTP. By skipping the TLS handshake (around 20ms), communication becomes even faster compared to HTTPS. ### Q. Which plan offers the fastest performance? Generally, our highest-tier plan provides the fastest performance due to superior CPUs, higher memory capacities, and robust hardware configurations. We also offer customized solutions if you require even more powerful servers, but our standard plans are designed to deliver optimal price-to-performance ratios. We are confident in providing world-class performance at every price level. If you find a faster provider within the same price range, please let us know so we can investigate and make improvements. ### Q. Latency isn't what I expected. Performance can vary significantly depending on the programming language used. Typically, language speed comparisons rank as follows: **Rust > Go > TypeScript (JavaScript) > Python** For more detailed comparisons, please see the following resource: [Speed Comparison by Programming Language](https://niklas-heer.github.io/speed-comparison/) We strongly recommend using Rust if maximum performance is your goal. ## Solana These answers rely on how Solana works: the leader role rotates across validators on the leader schedule, so validator locations shape the region you pick. ### Q. Which region do you recommend? There is no single permanent best region. Solana is global, and the leader role rotates across validators on the leader schedule. Regions with more validators and higher stake see leader slots more often, which can help transactions land faster. The trade-off is that competing traffic also concentrates there, so a less crowded region can sometimes deliver better results depending on your strategy. As a practical starting point, choose a validator-dense region such as Frankfurt or the US East Coast when steady leader-slot supply matters most, or place yourself near a specific target validator when shortest-path execution is the priority. Use [Validators Solutions](https://validators.solutions/) to understand public Solana network distribution, then use the [ERPC Leader Slot API](https://erpc.global/en/doc/rpc/leader-slot-api/) and real measurements to decide whether single-region, dual-region, or global deployment is appropriate. [![Solana Mainnet Distribution Report](https://erpc.global/faq/SolanaMainnetReportEN.jpg)](https://validators.solutions/) ### Q. I need latency of at least ~400ms or better. To achieve latency within approximately 400ms, consider these essential points: - **Realistic Understanding of Ping Values**: Ping values indicate ideal conditions and do not reflect actual latency in streaming communications, which typically experience around 5 times the ping latency. For example, a ping of 100ms across continents realistically results in about 500ms of latency. Thus, infrastructure must be established within the same region to achieve ~400ms latency. - Typical Ping Value Reference: - Same network: ~0.1ms - Private Network Interconnect (PNI): ~0.2ms - Same data center: ~0.3ms - Same city: ~1ms - Neighboring country: ~5–10ms - Intercontinental: ~100–300ms - **Avoiding the Pitfall of Average Latency**: Solana validators are geographically dispersed globally, and the leader schedule changes randomly with each epoch. Relying on average latency to achieve ~400ms is impractical. Instead, you should precisely track validator schedules in your specific region to identify slots with the lowest latency. To consistently achieve minimal latency, infrastructure across all relevant regions is required. Within the same region, data acquisition can occur in tens of milliseconds, with transmission possible in just a few milliseconds. - **Tracking the Leader Schedule**: Monitor the leader validator schedule for your region using the **ERPC Leader Slot API (`getLeaderSlots`)**. It returns the upcoming leader schedule, stake weight for the current epoch, estimated validator geolocations, and reference ping values, so you can identify the lowest-latency slots to target before they arrive. Public map-style data and native RPC APIs are useful for broad network visibility, but they are not precise enough for execution timing. The Leader Slot API fills that gap with the granularity needed for routing and trading decisions. - [ERPC Leader Slot API Documentation](https://erpc.global/en/doc/rpc/leader-slot-api/) - [ERPC Web Dashboard](https://dashboard.erpc.global/en) [![Validators Solutions - Solana network data](https://erpc.global/faq/ValidatorsSolutionsEN.jpg)](https://validators.solutions/) Solana network data: [Validators Solutions](https://validators.solutions/) ### Q. How can I achieve zero-block (zero-slot) trading? Successfully achieving zero-block (zero-slot) trading requires more sophisticated strategies, as follows: - **Identifying Opportunity Zones**: Solana validators are distributed globally, and it is physically impossible to achieve optimal latency for every slot. Therefore, monitor validator leader schedules in the region where your infrastructure is located and identify the most favorable opportunity zones. Deploying infrastructure across multiple regions can also be advantageous. For example, Frankfurt is a key region due to its high validator density, resulting in more frequent leader selection and greater trading opportunities. Use the **ERPC Leader Slot API (`getLeaderSlots`)** to look up the upcoming leader schedule, stake weight for the current epoch, estimated validator geolocation data, and reference ping values with far greater precision than public map-style data sources or native RPC APIs. This lets you map opportunity zones before the slots arrive and execute near-zero-latency trades. - [ERPC Leader Slot API Documentation](https://erpc.global/en/doc/rpc/leader-slot-api/) - [ERPC Web Dashboard](https://dashboard.erpc.global/en) - **Implementing Dedicated Nodes**: If you struggle to compete, consider deploying dedicated nodes. Shared nodes experience latency due to traffic from other users, and thus are not recommended. Furthermore, placing your dedicated node within the same network as your application significantly reduces network latency and optimizes performance. ### Q. Which is the fastest: WebSockets, gRPC, or Shreds? Feedback from many customers is quite consistent, and the performance order is as follows: **Shreds > gRPC > WebSockets** If you discover different results or conditions, please let us know. ### Q. Is this RPC (gRPC, Shreds) faster than others? We build for speed at every tier, and we're glad to have that measured side-by-side with any other provider. Results can shift with region, whether you're on a shared or dedicated endpoint, the protocol you use (WebSockets, gRPC, or Shreds), and the programming language your client runs in. If you find our service slower, please let us know the specific conditions and competitors you've compared it against through the ERPC Web Dashboard. We will identify the cause and improve the speed further. [ERPC Web Dashboard](https://dashboard.erpc.global/en) --- title: "FAQ - SWQoS" description: "Frequently asked questions about SWQoS from ERPC, the stake-weighted QoS endpoint for Solana, for shared plans and dedicated RPC nodes." canonical: "https://erpc.global/en/faq/qos/general/" locale: "en" --- # FAQ - SWQoS Questions about billing, the Free plan, payment and 401 or 429 errors are in [How to start](https://erpc.global/en/faq/how-to-start/general/). Questions about distance, speed and regions are in [Latency and regions](https://erpc.global/en/faq/latency/general/). ## Q. How can I apply SWQoS to a dedicated RPC node? Dedicated RPC subscribers can add SWQoS as a monthly option. The option is +€100/month and assigns a 1,000 SOL staking allocation to the dedicated RPC node. For setup or plan details, please contact us through the ERPC Web Dashboard. [ERPC Web Dashboard](https://dashboard.erpc.global/en) ## Q. My dedicated RPC node transactions are having trouble going through Transaction success rate and speed are strongly influenced by a mechanism called QoS. We can provide QoS for dedicated nodes. Please see the page below or reach out to us on our ERPC Web Dashboard for more information. - [QoS for Dedicated Nodes (ERPC)](https://erpc.global/staked-connection/) - [Stake-weighted QoS Guide on Solana](https://solana.com/developers/guides/advanced/stake-weighted-qos) ## Q. How can I use the shared SWQoS endpoint? Use an eligible ERPC shared plan and connect the wallet that holds elSOL in the ERPC Web Dashboard. The shared SWQoS allocation is calculated from that verified elSOL balance. Eligible users receive 1 TPS for every 4.2 elSOL held. For example, holding 10 elSOL grants 2 TPS. The actual TPS you can use is capped at the lower of your plan maximum or the elSOL-based allocation. [ERPC Web Dashboard](https://dashboard.erpc.global/en) ## Q. In which regions are your nodes located? We currently operate nodes for shared endpoints in the following region: - Frankfurt (FRA) --- title: "Solana RPC Endpoint FAQ" description: "Learn what a Solana RPC endpoint is, how to get a Solana endpoint with ERPC, and how to troubleshoot RPC usage." canonical: "https://erpc.global/en/faq/rpc/general/" locale: "en" --- # Solana RPC Endpoint FAQ Questions about billing, the Free plan, payment and 401 or 429 errors are in [How to start](https://erpc.global/en/faq/how-to-start/general/). Questions about distance, speed and regions are in [Latency and regions](https://erpc.global/en/faq/latency/general/). ## Q. What is a Solana RPC endpoint, and how do I get one with ERPC? A Solana RPC endpoint is the URL your app, trading bot, wallet, or analytics system uses to send JSON-RPC requests to Solana and receive chain data. With ERPC, you get a managed Solana endpoint that supports HTTP and WebSocket access through the same global proxy network. To start, create or open your ERPC account in the [ERPC Web Dashboard](https://dashboard.erpc.global/en), copy your API key, and add it to the `api-key` parameter on the endpoint URL: ```text https://edge.erpc.global?api-key= ``` Use the same API key format for WebSocket subscriptions: ```text wss://edge.erpc.global?api-key= ``` ## Q. Can I use WebSocket? Yes, WebSocket is supported. It operates through the same endpoint, allowing you to efficiently receive real-time data updates. ## Q. In which regions are your nodes located? We currently operate nodes in the following regions: - Frankfurt (FRA) - Amsterdam (AMS) - London (LON) - New York (NY) - Tokyo (TY) - Singapore (SGP) ERPC’s RPC endpoints are powered by Cloudflare, leveraging a global network of over 300 edge servers. Requests are automatically routed through the nearest Cloudflare edge location and then forwarded to the optimal ERPC node, ensuring the shortest possible network path and consistently low latency from anywhere in the world. This architecture eliminates the impact of geographical distance or complex routing, providing always-optimized connectivity to Solana nodes with maximum stability and performance. ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en) ## Q. Why are older Solana blocks or transactions missing, or why do I see -32011? Except for `getTransactionsForAddress`, a request without `history=true` is answered from the recent range each node holds, so older blocks or transactions may return the error `This request needs history access. Add history=true to the endpoint URL.` (code `-32011`), `null`, or an empty result, depending on the method. Add `history=true` to the `https://edge.erpc.global` URL of an HTTP request to ask for them. Send the API key in the URL: ```text https://edge.erpc.global?api-key=&history=true ``` Or send it in the header `Authorization: Bearer ` and keep `history=true` in the URL: ```text https://edge.erpc.global?history=true ``` A lookup for older blocks or transactions may take much longer than a regular request, in some cases seconds. History access is a separate option that keeps these lookups apart from regular requests, so that regular requests stay fast. A call answered by history access costs 640 + 82 × N tokens in total, in place of its method's regular price. N is 1 for every method except two, so a `getBlock` call costs 722. N is the number of signatures for `getSignatureStatuses` and the number of transactions fetched for `getTransactionsForAddress` in `"full"` mode. History Access in the ERPC docs linked below has examples for both. Free allowances, including the Free plan's, have a limit for history access. The Free plan is limited to one history access request per 10 seconds. Without `history=true`, `getTransactionsForAddress` with `transactionDetails` set to `"full"` returns the same `-32011` error, whatever the age of the data; the ERPC docs give its price. [ERPC docs: RPC](https://erpc.global/en/doc/rpc/general/) ## Q. My Shreds / getBlock output suddenly looks broken or returns -32015 — what changed? Solana Transaction v1 (SIMD-0385) went live on Solana mainnet on September 15, 2026, at epoch 1035. A v1 transaction's wire layout starts with a version prefix byte `0x81`, signatures come after the message, and there is no legacy length prefix. If you decode ShredStream or UDP Forwarding entries yourself, a `bincode` or `solana-entry` decoder below version 4.2 misreads that `0x81` byte as a signature count, which shows up as an EOF error, a compact-length overflow, or an "invalid message version" error. Geyser gRPC users deserializing raw transactions with pre-4.2 crates hit the same problem. RPC calls to `getBlock` and `getTransaction` with `maxSupportedTransactionVersion: 0` return `-32015 Transaction version (1) is not supported by the requesting client`; `getTransactionsForAddress` in `full` mode reports the same error on each affected row. You are not affected if you already read ERPC's parsed JSON responses with version 1 set. Set `maxSupportedTransactionVersion` to `1` in the options object — the second parameter of `getBlock` and `getTransaction`, and the options of `getTransactionsForAddress` as well: ```json { "maxSupportedTransactionVersion": 1 } ``` Upgrade the Solana Stream SDK to `2.0.0`: Rust `solana-stream-sdk` on crates.io, or npm `@validators-dao/solana-stream-sdk` and `@validators-dao/solana-shreds-client`. Upgrade `@validators-dao/solana-entry-decoder` to `2.5.0` separately. `1.4.0` and entry-decoder `2.4.0` do not support v1. Own Rust decoders should move to `solana-entry` `4.2.x`. - [Migration guide](https://github.com/ValidatorsDAO/solana-stream/blob/main/docs/transaction-v1.md) - [SDK 2.0.0 release notes](https://github.com/ValidatorsDAO/solana-stream/releases/tag/v2.0.0) - [Solana Stream SDK repository](https://github.com/ValidatorsDAO/solana-stream) - [SIMD-0385: Transaction v1 (the proposal)](https://github.com/solana-foundation/solana-improvement-documents/blob/main/proposals/0385-transaction-v1.md) - [Solana upgrade: Larger Transaction Sizes](https://solana.com/upgrades/larger-transaction-sizes) - [Solana RPC docs: getBlock](https://solana.com/docs/rpc/http/getblock) - [Solana RPC docs: getTransaction](https://solana.com/docs/rpc/http/gettransaction) - [ERPC docs: ShredStream quickstart](https://erpc.global/en/doc/shredstream/quickstart/) - [ERPC docs: Geyser gRPC quickstart](https://erpc.global/en/doc/geyser-grpc/quickstart/) - [ERPC docs: RPC](https://erpc.global/en/doc/rpc/general/) ## Q. Which methods does Unlimited Endpoint support? Unlimited Endpoints are designed for low-latency standard Solana RPC calls. Supported methods are: - `getSlot` - `getBlockHeight` - `getLatestBlockhash` - `getBalance` - `getAccountInfo` - `getMultipleAccounts` - `getTransaction` - `sendTransaction` - `simulateTransaction` - `getSignatureStatuses` - `getRecentPrioritizationFees` - `getHealth` - `getVersion` - `getEpochInfo` - `getBlock` For other methods, use `https://edge.erpc.global?api-key=`. ## Q. Transactions on my dedicated node have a low success rate Transaction success rates and speed are significantly affected by a mechanism called QoS (Quality of Service). We offer QoS specifically for dedicated nodes. For more details, please refer to the pages below or inquire through our ERPC Web Dashboard. - [QoS for Dedicated Nodes (ERPC)](https://erpc.global/en/staked-connection/) - [A Guide to Stake-weighted Quality of Service on Solana](https://solana.com/developers/guides/advanced/stake-weighted-qos) ## Q. How can I achieve the lowest possible latency? The ideal setup for minimal latency is a dedicated RPC node combined with our [Bare-Metal servers](https://erpc.global/en/baremetal/). Both share the same network, enabling private, zero-distance communication with ping latencies around 0.1ms. Please contact us through the ERPC Web Dashboard for more details. [ERPC Web Dashboard](https://dashboard.erpc.global/en) --- title: "FAQ - Geyser gRPC Stream" description: "Frequently asked questions about the ERPC - Enhanced Solana RPC Geyser gRPC Stream" canonical: "https://erpc.global/en/faq/grpc/general/" locale: "en" --- # FAQ - Geyser gRPC Stream ## Q. In which regions are your nodes located? We currently operate nodes in the following regions: - Frankfurt (FRA) - Amsterdam (AMS) - London (LON) - New York (NY) - Tokyo (TY) - Singapore (SGP) - Sydney (SYD) ERPC measures actual network latency based on real routing paths, automatically selecting the region with the lowest latency rather than relying on straight-line distance. This approach not only improves latency for individual users but also enhances overall network efficiency and strengthens ERPC’s global resilience against potential attacks. If your environment does not automatically select the optimal region, please contact us through the ERPC Web Dashboard. ERPC Web Dashboard: https://dashboard.erpc.global/en ## Q. Latency shows 9999ms and a non-optimal region gets selected. What should I do? For gRPC region selection, ERPC sends ICMP latency probes to your registered IP from the proxy hosts listed below. Allow inbound ICMP echo requests from every listed source IP. If they are blocked by a firewall (ufw, cloud firewall, security group, etc.), the measurement can become `9999ms` and a non-optimal region may be selected. Multiple IPs in one region are separate probe hosts; all of them are required. [ERPC_PING_SOURCES:grpc]: # | Region | ICMP source IPs | | --- | --- | | 🇳🇱 Amsterdam | `82.21.43.34`, `151.244.92.36` | | 🇺🇸 New York | `151.243.244.5` | | 🇩🇪 Frankfurt | `151.241.178.20`, `151.241.178.34`, `151.241.178.21` | | 🇬🇧 London | `151.241.65.4` | | 🇯🇵 Tokyo | `143.20.238.66` | | 🇸🇬 Singapore | `151.245.186.2` | | 🛰️ Far Point | `143.20.238.73` | ## Q. I allowlisted my IP, but I still cannot connect. What should I check? Use the encrypted HTTPS endpoint selected in the Dashboard. HTTPS uses port 443; HTTP on port 80 remains the unencrypted low-latency option. Both transports use the same registered-IP allowlist. Use the endpoint selected in the Dashboard; HTTPS uses 443 and HTTP uses 80. - HTTPS endpoint: use the Dashboard-selected endpoint on port 443. - HTTP endpoint: use the Dashboard-selected endpoint on port 80. - Use the URL shown in the Dashboard with `https://` or `http://`. Authentication is based on your registered IP address. Do not add `x-token`, `token`, or `Authorization` headers unless a specific product page explicitly says to do so. ## Q. I've only used WebSocket before. Can I use gRPC? Do you have samples? Yes. You can quickly test and start developing with gRPC using SLV. For a shared endpoint that you can test without a token, run: ```bash slv check grpc --endpoint --token none ``` Check out our [gRPC Quickstart Guide](https://slv.dev/en/doc/geyser-grpc/quickstart/) for details. ## Q. Can I register two IP addresses? You can use one endpoint per subscription. If you wish to use two IP addresses, you must subscribe to two separate subscriptions. ## Q. Are there any filter limits? Shared Geyser gRPC has fair-use protections so one stream cannot consume the resources needed by other ERPC customers. Under the current Shared rule, every non-empty `blocks` map is rejected, including a narrow block request. Each account filter must include an `account`, an `owner`, or a supported cuckoo filter; `memcmp` or `dataSize` alone is not enough. Remove a rejected shape and subscribe only to the data your application needs. A transaction subscription or block metadata may fit the need without carrying a full block. Dedicated Geyser gRPC is appropriate when a legitimate workload exceeds the Shared shape or resource allowance; it does not make invalid parameters valid or repair a slow client. ## Q. How should I collect a gRPC error before reconnecting? Keep the first error before a reconnect loop replaces it. Record the gRPC status and message from initial metadata and trailers, together with `x-erpc-error-code`, `x-erpc-error-reason`, and `x-erpc-doc-url`. When ERPC supplies a pause, record `x-erpc-retry-after-seconds` and `x-erpc-retry-at` (Unix seconds) as well. An error can be displayed as `ERPC [STREAM_GUARD_SLOW_READER]: ...`. Paste the displayed error or its code into FAQ search. For the canonical explanation, use [ERPC gRPC FAQ](https://erpc.global/en/faq/grpc/general/). Do not assume a trailer is delivered when a connection ends early. You can also search by a symptom: slow receiver, disconnected, bandwidth, delivery lag, backlog, pause, retry, invalid argument, resource exhausted, permission denied, IP registration, too many streams, full blocks, or all accounts. ## Q. Which gRPC errors pause my connection, and when should my client stop reconnecting? A pause is a timed period that ERPC sets after certain errors. The client must not reconnect while it runs. **What is counted.** These errors are counted, and they share one set of steps: - Every Subscribe request that ERPC rejects with `ERPC_GRPC_INVALID_ARGUMENT`, `STREAM_GUARD_SHAPE_BLOCKS` or `STREAM_GUARD_SHAPE_ACCOUNTS_ALL`, the first one included. The first counted error is the warning, which starts no pause. - `STREAM_GUARD_SLOW_READER`, except when the delivery lag arises on ERPC's side: then ERPC closes the stream without counting it, and the error carries no retry time. These are not counted: reconnecting itself, the four `STREAM_ADMISSION_*` codes (`STREAM_ADMISSION_LIMIT_REACHED`, `STREAM_ADMISSION_IP_NOT_ADMITTED`, `STREAM_ADMISSION_SOURCE_UNAVAILABLE` and `STREAM_ADMISSION_SNAPSHOT_UNAVAILABLE`), and any counted error that happens while a pause is running. A counted error during a pause does not extend the pause and does not move to the next step. **The steps.** Each counted error moves one step along this order, beginning with the warning: - Warning: no pause. - Pause of 60 seconds. - Pause of 300 seconds. - Pause of 1800 seconds. - Pause of 86400 seconds (24 hours). This is the last step: at it, each counted error starts another pause of 86400 seconds. At the warning step, the next counted error moves to the pause of 60 seconds only when it comes within 1 hour of the warning. A counted error that comes more than 1 hour after the warning is another warning with no pause, and the 1-hour window then runs from that new warning. A counted error that comes less than 60 seconds after the last error that was counted counts as part of that error and moves no step. **When the steps go back to the warning.** Once the steps have started a pause, they go back to the warning only after 24 hours with no counted error and no pause, measured from the end of the last pause; the next counted error after that is a warning with no pause. Until then, the next counted error starts the next step immediately, with no warning. **The egress pause.** `STREAM_GUARD_EGRESS_BUDGET` starts its own fixed pause of 600 seconds. It does not advance the steps. **Where the end time is.** - The error that starts a pause carries `Retry after N seconds.` and the headers `x-erpc-retry-after-seconds` and `x-erpc-retry-at` (Unix seconds). The warning carries no retry time. - When a counted rejected request is the one that starts a pause, it comes back as `STREAM_GUARD_SHAPE_REJECT_PENALTY` with `ResourceExhausted (8)` instead of its own code. - During a slow-reader or egress pause, a reconnect gets `STREAM_GUARD_PENALTY_ACTIVE` with the remaining time. - During a pause started by a rejected request, a new connection is closed immediately with no gRPC status and no ERPC code. A request on a connection that is still open can be answered with `STREAM_GUARD_SHAPE_REJECT_PENALTY` and the remaining time again before that connection is closed. The client may never see the end time again, so it must save `x-erpc-retry-at` from the first error that carries it. | Code | gRPC status | Starts or advances a pause? | What the client must do | | --- | --- | --- | --- | | `ERPC_GRPC_INVALID_ARGUMENT` | `InvalidArgument (3)` | Yes, when it rejects a Subscribe request. It is then a counted error under the steps above. | Stop the loop and do not resend the same request. Its own entry below lists what to check. | | `STREAM_GUARD_SHAPE_BLOCKS` | `PermissionDenied (7)` | Yes. It is a counted error under the steps above. | Stop the loop and do not resend the same request. Its own entry below lists what to check. | | `STREAM_GUARD_SHAPE_ACCOUNTS_ALL` | `PermissionDenied (7)` | Yes. It is a counted error under the steps above. | Stop the loop and do not resend the same request. Its own entry below lists what to check. | | `STREAM_GUARD_SLOW_READER` | `ResourceExhausted (8)` | Yes, under the steps above, except when the delivery lag arises on ERPC's side: then ERPC closes the stream without counting it, and the error carries no retry time. | Stop the loop. Its own entry below lists what to check. If it started a pause, do not reconnect before the time in `x-erpc-retry-at`. | | `STREAM_GUARD_EGRESS_BUDGET` | `ResourceExhausted (8)` | Yes. It starts a fixed pause of 600 seconds outside the steps above. | Do not reconnect before the time in `x-erpc-retry-at`. Its own entry below lists what to check. | | `STREAM_GUARD_SHAPE_REJECT_PENALTY` | `ResourceExhausted (8)` | Yes. It is the counted rejected request that started a pause. It can come back again with the remaining time on a connection that is still open. | Do not reconnect before the time in `x-erpc-retry-at`. Fix the rejected request and do not resend it unchanged. | | `STREAM_GUARD_PENALTY_ACTIVE` | `ResourceExhausted (8)` | No. It reports a slow-reader or egress pause that is already running. | Do not reconnect before the time in `x-erpc-retry-at`. | | `STREAM_ADMISSION_LIMIT_REACHED` | `ResourceExhausted (8)` | No. It has no timed pause. | Close unused streams, then retry. | | `STREAM_ADMISSION_IP_NOT_ADMITTED` | `PermissionDenied (7)` | No. It has no timed pause. | Its own entry below lists what to check. | | `STREAM_ADMISSION_SOURCE_UNAVAILABLE` | `Unavailable (14)` | No. It has no timed pause. | Back off normally and try again after a delay. | | `STREAM_ADMISSION_SNAPSHOT_UNAVAILABLE` | `Unavailable (14)` | No. It has no timed pause. | Back off normally and try again after a delay. | **What the client must do.** On a counted error, stop the loop, do not resend the same request, and fix it. During a pause, do not reconnect before the time in `x-erpc-retry-at`. Rejected Subscribe requests are counted under the rules above; reconnecting is not. ## Q. What does `STREAM_GUARD_SLOW_READER` mean with `ResourceExhausted (8)` when a slow receiver is disconnected? ERPC observed insufficient write progress or delivery lag for this stream. Delivery lag alone cannot identify the cause. Check network loss, effective bandwidth, host hardware, and whether the application consumer is keeping up. Narrow the subscribed data and move processing out of the receive loop into a bounded queue. A bounded queue controls memory use but cannot fix a sustained slow consumer. If ERPC provides a retry deadline, wait for it before reconnecting. The question "Why does my gRPC stream stay at a flat speed and fall behind?" below explains the receive window and how to widen it in your client library. ## Q. Why does my gRPC stream stay at a flat speed and fall behind? A small receive window in your client, or in something between it and ERPC, can cause `STREAM_GUARD_SLOW_READER` cuts and the pauses after them. This answer explains what a receive window is, how to tell whether it limits your stream, and how to widen it per library. The question "Which gRPC errors pause my connection, and when should my client stop reconnecting?" above gives the steps and their lengths. **What a receive window is.** In HTTP/2, the receiver tells the sender how much data may be sent before the receiver confirms; that amount is the receive window (the HTTP/2 flow control window). One round trip carries at most one window, so speed tops out near the window divided by the round-trip time (the trip to the endpoint and back). **The other limits.** There are two windows, one per stream and one per connection (all streams on a connection share it), and the smaller one sets the limit. In the HTTP/2 specification, both windows start at 65,535 bytes. The TCP receive buffer (memory for incoming data) limits speed the same way. A proxy, load balancer, gateway, VPN or sidecar in between has its own windows and buffers. A small window or buffer there caps the stream even when your own client windows are large. **How it looks.** One stream levels off at nearly the same speed however busy the chain is, and its delivery lag grows steadily. ERPC measured from a place with a round-trip time of about 6 ms to the Frankfurt shared endpoint, changing only the window between runs: - 16 KiB stream window: flat near 2.7 MB/s (16 KiB divided by 6 ms); delivery lag grew about 0.6 seconds a second, reaching 26 seconds in 45 seconds. - Both 16 MiB: the maximum delivery lag was 14 ms. If the delivery lag arises on ERPC's side, ERPC closes the stream without counting it, and the error carries no retry time. **Check it.** 1. Compare the stream's speed and delivery lag with the pattern above. 2. Measure the round-trip time. Multiply the stream's speed by the round-trip time to estimate the window (2.7 MB/s times 6 ms is about 16 KB). 3. Check your client's two windows for a small value, or for automatic growth (the library widening the window) turned off. 4. Check the TCP receive buffer. On Linux, run `sysctl net.ipv4.tcp_rmem net.core.rmem_max`, and see whether your application sets `SO_RCVBUF`, which turns off automatic sizing. 5. Check the windows and buffers of anything in between. 6. If speed has no ceiling and only the lag grows, processing after receipt is slow. The question "What does `STREAM_GUARD_SLOW_READER` mean with `ResourceExhausted (8)` when a slow receiver is disconnected?" above explains keeping the receive loop to reading and moving heavy work into a bounded queue. **Settings by library.** The examples set both windows to 16 MiB, as in ERPC's measurement. For a library not listed, look for HTTP/2 initial window settings. **Rust, `yellowstone-grpc-client`.** Without window settings, `GeyserGrpcClient::build_from_shared` uses 2 MiB per stream, 5 MiB per connection. At a 6 ms round trip, these defaults allow more than 300 MB/s, so they do not cap the stream. To set the windows yourself, use the two builder methods and keep `http2_adaptive_window` off. With it on, the window starts at 65,535 bytes and grows itself up to 16 MiB, ignoring your values. ```rust // Both windows fixed at 16 MiB; keep http2_adaptive_window off. let client = GeyserGrpcClient::build_from_shared(endpoint)? .tls_config(ClientTlsConfig::new().with_native_roots())? .initial_stream_window_size(16 * 1024 * 1024) .initial_connection_window_size(16 * 1024 * 1024) .connect() .await?; ``` **TypeScript, `@triton-one/yellowstone-grpc` 5.0.1 or later.** Defaults: 4 MiB per stream, 8 MiB per connection, automatic growth on. The window starts at 64 KiB and grows up to 16 MiB, so the defaults rarely cap the stream. To fix the sizes, pass the third argument with `grpcHttp2AdaptiveWindow: false`. ```typescript // Adaptive window off, so these fixed sizes are used. const client = new Client(endpoint, undefined, { grpcInitialStreamWindowSize: 16 * 1024 * 1024, grpcInitialConnectionWindowSize: 16 * 1024 * 1024, grpcHttp2AdaptiveWindow: false, }) ``` **TypeScript, `@triton-one/yellowstone-grpc` 5.0.0 or earlier.** These versions use `@grpc/grpc-js`, whose default window is 65,535 bytes: about 11 MB/s at 6 ms, about 0.66 MB/s at 100 ms. `@grpc/grpc-js` 1.14 or later applies `'grpc-node.flow_control_window'` to both windows; 1.13 applies it to the stream window only, so the connection window stays at 65,535 bytes (about 11 MB/s at 6 ms). On `@grpc/grpc-js` older than 1.14, upgrading to `@triton-one/yellowstone-grpc` 5.0.1 or later is quicker. ```typescript // Needs @grpc/grpc-js 1.14 or later to widen both windows. const client = new Client(endpoint, undefined, { 'grpc-node.flow_control_window': 16 * 1024 * 1024, }) ``` **Go, `google.golang.org/grpc`.** By default the library grows the windows itself, up to 16 MiB. `grpc.WithInitialWindowSize` and `grpc.WithInitialConnWindowSize` fix them and turn automatic growth off; values below 64 KiB are ignored. Set both: one alone leaves the other at 64 KiB. ```go // Set both; this also turns off automatic window growth. conn, err := grpc.NewClient(target, grpc.WithTransportCredentials(creds), grpc.WithInitialWindowSize(16<<20), grpc.WithInitialConnWindowSize(16<<20), ) ``` **Python, `grpcio`.** `grpc.http2.bdp_probe` is on by default, so the windows grow themselves; if your code passes `("grpc.http2.bdp_probe", 0)`, remove it. `grpc.http2.lookahead_bytes` sets the read-ahead per stream (default 64 KB); larger values can help on a long round trip. ```python # If your options include ("grpc.http2.bdp_probe", 0), remove it. channel = grpc.secure_channel(target, creds, options=[ ("grpc.http2.lookahead_bytes", 16 * 1024 * 1024), ]) ``` **Receive closer.** A shorter round trip lets the same window deliver more, and ERPC's [VPS](https://erpc.global/en/vps/) and [Bare-Metal](https://erpc.global/en/baremetal/) put the client near the endpoint. **Split with care.** Standard allows 10 streams and Premium 50, per registered source IP. Each stream gets its own stream window, but streams on one connection share one connection window, so a small one still limits speed. When replacing a stream, close the old one first: open streams count toward the limit, and going over returns `STREAM_ADMISSION_LIMIT_REACHED` (its own question is below). Splitting does not speed up slow processing. ## Q. What does `STREAM_GUARD_EGRESS_BUDGET` mean with `ResourceExhausted (8)`? Aggregate traffic from the IP exceeded the Shared allowance, so related streams can close together. Reduce data volume and unnecessary parallel streams, then wait until the returned deadline. This egress pause is fixed at 600 seconds and does not advance the penalty ladder, although an existing longer pause can remain in effect. ## Q. What does `STREAM_GUARD_PENALTY_ACTIVE` mean with `ResourceExhausted (8)`? An earlier slow-reader or egress pause is still running, and this response carries the remaining time. Retain the first ERPC error, correct its cause, and do not reconnect before `x-erpc-retry-at`; do not reconnect early to test it. Reconnect attempts are not counted. The question "Which gRPC errors pause my connection, and when should my client stop reconnecting?" above gives the steps and their lengths. ## Q. What does `STREAM_GUARD_SHAPE_BLOCKS` mean with `PermissionDenied (7)`? The current Shared rule rejects every non-empty `blocks` map, even when the request is narrow. Remove the `blocks` map. Use transactions and/or block metadata when they meet the requirement, but neither is a full-block equivalent. Use Dedicated Geyser gRPC when full blocks are required; this does not imply that a selective-block Shared plan is available. ## Q. What does `STREAM_GUARD_SHAPE_ACCOUNTS_ALL` mean with `PermissionDenied (7)`? An account-filter entry must select data with `account`, `owner`, or a supported cuckoo filter. `memcmp` and `dataSize` on their own are not sufficient. Narrow the account request to one of those supported shapes, or use Dedicated Geyser gRPC when the full account stream is required. ## Q. What does `STREAM_GUARD_SHAPE_REJECT_PENALTY` mean with `ResourceExhausted (8)`? This code comes back instead of `ERPC_GRPC_INVALID_ARGUMENT`, `STREAM_GUARD_SHAPE_BLOCKS` or `STREAM_GUARD_SHAPE_ACCOUNTS_ALL` when that counted rejected request is the one that starts a pause; the question "Which gRPC errors pause my connection, and when should my client stop reconnecting?" above says when that happens. It carries `Retry after N seconds.`, `x-erpc-retry-after-seconds` and `x-erpc-retry-at`. During this pause, new connections are closed immediately with no gRPC status and no ERPC code, so the client may never see the end time again. Save `x-erpc-retry-at` from the first error that carries it. Rejected Subscribe requests are counted under the rules above; reconnecting is not. Fix the request and do not resend it unchanged. An early connection drop can look like a transport error, so preserve the first ERPC error before the reconnect loop hides it. ## Q. What does `STREAM_ADMISSION_LIMIT_REACHED` mean with `ResourceExhausted (8)`? The admission allowance is currently full. Close unused or duplicate streams, check the allowance for the connection, and retry after capacity is available. This response does not by itself mean a timed penalty is active. ## Q. What does `STREAM_ADMISSION_IP_NOT_ADMITTED` mean with `PermissionDenied (7)`? ERPC could not admit the connection, including after an IP-registration grace period expires. Compare the actual outbound IP with the registered IP and confirm the current access state. Allow a registration change to propagate, without assuming a fixed propagation time, and contact support if the condition persists. ## Q. What does `STREAM_ADMISSION_SOURCE_UNAVAILABLE` mean with `Unavailable (14)`? ERPC could not determine the source of this connection at that time. Back off and try again after a delay. If it persists, contact support with the first error and its metadata; the response does not establish a fault in the customer's network or server. ## Q. What does `STREAM_ADMISSION_SNAPSHOT_UNAVAILABLE` mean with `Unavailable (14)`? ERPC could not verify access at that time. Back off and try again after a delay, then contact support if it continues. Re-registering repeatedly, broadening filters, or purchasing Dedicated Geyser gRPC does not repair this availability response. ## Q. What does `ERPC_GRPC_INVALID_ARGUMENT` mean with `InvalidArgument (3)`? The request contains invalid parameters, options, field types, keys, or filter combinations. Repair the request before retrying, and do not resend the same request. Each Subscribe request rejected with this code is a counted error under the pause rules in the question "Which gRPC errors pause my connection, and when should my client stop reconnecting?" above, shared with `STREAM_GUARD_SHAPE_BLOCKS`, `STREAM_GUARD_SHAPE_ACCOUNTS_ALL` and `STREAM_GUARD_SLOW_READER`. When a request rejected with this code starts a pause, it comes back as `STREAM_GUARD_SHAPE_REJECT_PENALTY` with `ResourceExhausted (8)`. Dedicated Geyser gRPC does not make invalid parameters valid. The error message ends the code with `(reason: )`, and the same token is returned in the `x-erpc-error-reason` response header. Find the token below to see what to change. Where a limit applies, the error message states it. | Reason | What it means | What to change | | --- | --- | --- | | `too_many_filters` | The request carries more named filters or data slices than one request may. | Use fewer named filters (or data slices) of this type per request. | | `empty_filter` | A filter has no address, and an empty filter means everything. | Give every filter at least one address (accounts: an account or owner; transactions: an account list). Shared gRPC does not serve an empty filter. | | `too_many_addresses` | One filter field lists too many addresses. | Use fewer addresses in one filter field; split them across filters or narrow the list. | | `address_not_allowed` | A filter names an address that shared gRPC does not allow. | Remove that high-volume address from the filter. | | `filter_name_too_long` | A filter name is too long. | Use shorter filter names (the map keys). | | `invalid_commitment` | The commitment level is not valid. | Use `processed`, `confirmed` or `finalized`. | | `invalid_address` | A filter contains an address that is not valid. | Make every address a valid base58 Solana address (no empty strings, spaces or wrong length). | | `invalid_signature` | The transaction signature value is not valid. | Use a valid base58 transaction signature. | | `invalid_account_data_filter` | An accounts data filter is not valid. | Fix the `memcmp`, `datasize` and token-account data filters, and keep their number within the limit in the message. | | `invalid_data_slice` | The data slices are not valid. | Sort data slices by offset and keep them non-overlapping. | | `blocks_include_not_allowed` | The blocks subscription options are unavailable on shared gRPC. | Omit `blocks` and use a transaction or `blocks_meta` subscription instead. | | `invalid_token_accounts_mode` | The token accounts mode is not valid. | Use `ALL` (0) or `BALANCE_CHANGED` (1). | | `invalid_argument` | None of the reasons above applies. | Check the request filter and parameters before retrying. | ## Q. What does `ERPC_GRPC_REQUEST_FAILED` mean when gRPC returns another non-zero status? The request failed with a valid gRPC status that determines the next step. Repair a request for a status such as `OutOfRange (11)` when a history range is invalid; back off for an availability status such as `Unavailable (14)`. Do not classify every non-zero status as transient or retry every response unchanged. ## Q. Which region do you recommend? There is no single permanent best region. Solana is global, and the leader role rotates across validators on the leader schedule. Regions with more validators and higher stake see leader slots more often, which can help transactions land faster. The trade-off is that competing traffic also concentrates there, so a less crowded region can sometimes deliver better results depending on your strategy. As a practical starting point, choose a validator-dense region such as Frankfurt or the US East Coast when steady leader-slot supply matters most, or place yourself near a specific target validator when shortest-path execution is the priority. Use [Validators Solutions](https://validators.solutions/) to understand public Solana network distribution, then use the [ERPC Leader Slot API](https://erpc.global/en/doc/rpc/leader-slot-api/) and real measurements to decide whether single-region, dual-region, or global deployment is appropriate. [![Solana Mainnet Distribution Report](https://erpc.global/faq/SolanaMainnetReportEN.jpg)](https://validators.solutions/) ## Q. I need latency of at least ~400ms or better. To achieve latency within approximately 400ms, consider these essential points: - **Realistic Understanding of Ping Values**: Ping values indicate ideal conditions and do not reflect actual latency in streaming communications, which typically experience around 5 times the ping latency. For example, a ping of 100ms across continents realistically results in about 500ms of latency. Thus, infrastructure must be established within the same region to achieve ~400ms latency. - Typical Ping Value Reference: - Same network: ~0.1ms - Private Network Interconnect (PNI): ~0.2ms - Same data center: ~0.3ms - Same city: ~1ms - Neighboring country: ~5–10ms - Intercontinental: ~100–300ms - **Avoiding the Pitfall of Average Latency**: Solana validators are geographically dispersed globally, and the leader schedule changes randomly with each epoch. Relying on average latency to achieve ~400ms is impractical. Instead, you should precisely track validator schedules in your specific region to identify slots with the lowest latency. To consistently achieve minimal latency, infrastructure across all relevant regions is required. Within the same region, data acquisition can occur in tens of milliseconds, with transmission possible in just a few milliseconds. - **Tracking the Leader Schedule**: Monitor the leader validator schedule for your region using the **ERPC Leader Slot API (`getLeaderSlots`)**. It returns the upcoming leader schedule, stake weight for the current epoch, estimated validator geolocations, and reference ping values, so you can identify the lowest-latency slots to target before they arrive. Public map-style data and native RPC APIs are useful for broad network visibility, but they are not precise enough for execution timing. The Leader Slot API fills that gap with the granularity needed for routing and trading decisions. - [ERPC Leader Slot API Documentation](https://erpc.global/en/doc/rpc/leader-slot-api/) - [ERPC Web Dashboard](https://dashboard.erpc.global/en) [![Validators Solutions - Solana network data](https://erpc.global/faq/ValidatorsSolutionsEN.jpg)](https://validators.solutions/) Solana network data: [Validators Solutions](https://validators.solutions/) ## Q. How can I achieve zero-block (zero-slot) trading? Successfully achieving zero-block (zero-slot) trading requires more sophisticated strategies, as follows: - **Identifying Opportunity Zones**: Solana validators are distributed globally, and it is physically impossible to achieve optimal latency for every slot. Therefore, monitor validator leader schedules in the region where your infrastructure is located and identify the most favorable opportunity zones. Deploying infrastructure across multiple regions can also be advantageous. For example, Frankfurt is a key region due to its high validator density, resulting in more frequent leader selection and greater trading opportunities. Use the **ERPC Leader Slot API (`getLeaderSlots`)** to look up the upcoming leader schedule, stake weight for the current epoch, estimated validator geolocation data, and reference ping values with far greater precision than public map-style data sources or native RPC APIs. This lets you map opportunity zones before the slots arrive and execute near-zero-latency trades. - [ERPC Leader Slot API Documentation](https://erpc.global/en/doc/rpc/leader-slot-api/) - [ERPC Web Dashboard](https://dashboard.erpc.global/en) - **Implementing Dedicated Nodes**: If you struggle to compete, consider deploying dedicated nodes. Shared nodes experience latency due to traffic from other users, and thus are not recommended. Furthermore, placing your dedicated node within the same network as your application significantly reduces network latency and optimizes performance. ## Q. Can I use a specific endpoint? To maintain a low-latency environment, our system automatically selects the closest available node. If you wish to use a specific endpoint, we recommend renting a server located nearest to that endpoint. ## Q. I'm getting a 401 error. Why? To maintain a low-latency environment, we implement IP restrictions. If you don't have a subscription or your IP isn't registered, you'll receive a 401 error. Please double-check if your registered IP matches your current access IP. ## Q. I'm getting a 429 error. Why? You have reached your plan’s connection limit. If you encounter this error, consider upgrading your plan. If you require more connections than our premium plan provides, a dedicated gRPC node would be more suitable. ## Q. Why are dedicated endpoints faster? Shared endpoints are used by multiple customers who share the same resources. As traffic increases, latency tends to occur. Server resources have physical limits, and the amount of work they can handle is finite. When too many requests arrive at the same time, they must be processed sequentially, which results in slower response times. Although we take various measures to optimize performance even on shared endpoints, with dedicated endpoints you are the sole user of the resource. This means you are completely unaffected by other users, ensuring consistently stable and fast responses. In addition, dedicated endpoints provide communication options without TLS, such as HTTP. By skipping the TLS handshake (around 20ms), communication becomes even faster compared to HTTPS. ## Q. Will my price go up after I subscribe? While your subscription stays active, the price you locked in at signup remains in effect. Environments that hold up under Solana's real-time workload are globally scarce, and we plan to step up prices in line with growing hardware and network demand. Higher-spec configurations and high-demand regions sell through fastest, so locking in today's price is the most cost-efficient choice over the long run. ## Q. I want to pay with crypto Crypto payments are available from the ERPC Web Dashboard when your registered billing address country is one of the EU member countries. If every payment card registered on your account was issued outside the EU, crypto payments are not available. You can use SOL, USDC, or EURC to purchase ERPC Credits. Use those ERPC Credits to activate or continue ERPC plans. Open the dashboard, choose crypto payment, send the transfer from your wallet, and the dashboard will verify the transaction and apply the credits to your account. Supported countries: Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden. For countries not on the list, please pay by credit card. [ERPC Web Dashboard](https://dashboard.erpc.global/en) ## Q. How can I achieve the lowest possible latency? We highly recommend combining a dedicated gRPC node with our [Bare-Metal server](https://erpc.global/en/baremetal/). Both share the same network, allowing for private, zero-distance communication without traversing the internet. This setup achieves extremely low latency, typically around 0.1ms ping. Please contact us through the ERPC Web Dashboard for further details. [ERPC Web Dashboard](https://dashboard.erpc.global/en) 🔗 [ERPC Web Dashboard](https://dashboard.erpc.global/en) ## Q. What is the latency like? Latency varies depending on the measurement method and your specific usage environment. Rather than focusing on exact numerical values, it's crucial to ensure that the latency meets your actual operational requirements. We provide easy-to-use tools in TypeScript and Rust for measuring latency. - [Solana Stream SDK - ValidatorsDAO GitHub](https://github.com/ValidatorsDAO/solana-stream) - [SLV (English)](https://slv.dev/en) ## Q. Is this RPC (gRPC, Shreds) faster than others? We build for speed at every tier, and we're glad to have that measured side-by-side with any other provider. Results can shift with region, whether you're on a shared or dedicated endpoint, the protocol you use (WebSockets, gRPC, or Shreds), and the programming language your client runs in. If you find our service slower, please let us know the specific conditions and competitors you've compared it against through the ERPC Web Dashboard. We will identify the cause and improve the speed further. [ERPC Web Dashboard](https://dashboard.erpc.global/en) ## Q. Which plan offers the fastest performance? Generally, our highest-tier plan provides the fastest performance due to superior CPUs, higher memory capacities, and robust hardware configurations. We also offer customized solutions if you require even more powerful servers, but our standard plans are designed to deliver optimal price-to-performance ratios. We are confident in providing world-class performance at every price level. If you find a faster provider within the same price range, please let us know so we can investigate and make improvements. ## Q. I'm experiencing high latency. What can I do? Latency heavily depends on your proximity to the endpoint. We recommend accessing from a server near the provided endpoint. The fastest connections are achieved with our [Bare-Metal server](https://erpc.global/en/baremetal/) and [VPS service](https://erpc.global/en/vps/). ## Q. Which is the fastest: WebSockets, gRPC, or Shreds? Feedback from our customers consistently ranks speed as follows: **Shreds > gRPC > WebSockets** Please share your experience if you observe different results. ## Q. Latency isn't what I expected. Performance varies depending on the programming language used. Generally, language speed ranks: **Rust > Go > TypeScript (JavaScript) > Python** For detailed comparisons, see: [Programming Language Speed Comparison](https://niklas-heer.github.io/speed-comparison/) For maximum performance, we strongly recommend using Rust. --- title: "FAQ - Solana Shreds" description: "Frequently asked questions about ERPC Solana Shreds: regions, IP registration, what to check if you can't connect, UDP Forwarding, plans and payment." canonical: "https://erpc.global/en/faq/shreds/general/" locale: "en" --- # FAQ - Solana Shreds ## Q. My Shreds / getBlock output suddenly looks broken or returns -32015 — what changed? Solana Transaction v1 (SIMD-0385) went live on Solana mainnet on September 15, 2026, at epoch 1035. A v1 transaction's wire layout starts with a version prefix byte `0x81`, signatures come after the message, and there is no legacy length prefix. If you decode ShredStream or UDP Forwarding entries yourself, a `bincode` or `solana-entry` decoder below version 4.2 misreads that `0x81` byte as a signature count, which shows up as an EOF error, a compact-length overflow, or an "invalid message version" error. Geyser gRPC users deserializing raw transactions with pre-4.2 crates hit the same problem. RPC calls to `getBlock` and `getTransaction` with `maxSupportedTransactionVersion: 0` return `-32015 Transaction version (1) is not supported by the requesting client`; `getTransactionsForAddress` in `full` mode reports the same error on each affected row. You are not affected if you already read ERPC's parsed JSON responses with version 1 set. Set `maxSupportedTransactionVersion` to `1` in the options object — the second parameter of `getBlock` and `getTransaction`, and the options of `getTransactionsForAddress` as well: ```json { "maxSupportedTransactionVersion": 1 } ``` Upgrade the Solana Stream SDK to `2.0.0`: Rust `solana-stream-sdk` on crates.io, or npm `@validators-dao/solana-stream-sdk` and `@validators-dao/solana-shreds-client`. Upgrade `@validators-dao/solana-entry-decoder` to `2.5.0` separately. `1.4.0` and entry-decoder `2.4.0` do not support v1. Own Rust decoders should move to `solana-entry` `4.2.x`. - [Migration guide](https://github.com/ValidatorsDAO/solana-stream/blob/main/docs/transaction-v1.md) - [SDK 2.0.0 release notes](https://github.com/ValidatorsDAO/solana-stream/releases/tag/v2.0.0) - [Solana Stream SDK repository](https://github.com/ValidatorsDAO/solana-stream) - [SIMD-0385: Transaction v1 (the proposal)](https://github.com/solana-foundation/solana-improvement-documents/blob/main/proposals/0385-transaction-v1.md) - [Solana upgrade: Larger Transaction Sizes](https://solana.com/upgrades/larger-transaction-sizes) - [Solana RPC docs: getBlock](https://solana.com/docs/rpc/http/getblock) - [Solana RPC docs: getTransaction](https://solana.com/docs/rpc/http/gettransaction) - [ERPC docs: ShredStream quickstart](https://erpc.global/en/doc/shredstream/quickstart/) - [ERPC docs: Geyser gRPC quickstart](https://erpc.global/en/doc/geyser-grpc/quickstart/) - [ERPC docs: RPC](https://erpc.global/en/doc/rpc/general/) ## Q. In which regions are your nodes located? We currently operate nodes in the following regions: - Frankfurt (FRA) - Amsterdam (AMS) - London (LON) - Dublin (DUB) - New York (NY) - Chicago (CHI) - Salt Lake City (SLC) - Tokyo (TY) - Singapore (SGP) - Sydney (SYD) ERPC measures actual network latency based on real routing paths, automatically selecting the region with the lowest latency rather than relying on straight-line distance. This approach not only improves latency for individual users but also enhances overall network efficiency and strengthens ERPC’s global resilience against potential attacks. If your environment does not automatically select the optimal region, please contact us through the ERPC Web Dashboard. ERPC Web Dashboard: https://dashboard.erpc.global/en ## Q. Latency shows 9999ms and a non-optimal region gets selected. What should I do? For Shreds region selection, ERPC sends ICMP latency probes to your registered IP from the proxy hosts listed below. Allow inbound ICMP echo requests from every listed source IP. If they are blocked by a firewall (ufw, cloud firewall, security group, etc.), the measurement can become `9999ms` and a non-optimal region may be selected. Multiple IPs in one region are separate probe hosts; all of them are required. [ERPC_PING_SOURCES:shreds]: # | Region | ICMP source IPs | | --- | --- | | 🇳🇱 Amsterdam | `82.21.43.35` | | 🇺🇸 New York | `151.243.244.162` | | 🇩🇪 Frankfurt | `151.241.178.73` | | 🇯🇵 Tokyo | `143.20.238.88` | | 🇸🇬 Singapore | `151.245.186.3` | | 🇬🇧 London | `151.241.65.10` | [ERPC_FAR_POINT_GUIDANCE_START:shreds]: # ### Far Point selected Shared Shreds Far Point is a limited-capacity fallback. Each endpoint supports up to 32 concurrent proxied streams across all customers—not 32 slots per customer. Streaming is most effective when the subscriber runs near the selected Shreds endpoint; long-distance streams retain shared connections, flow-control windows, and egress capacity for longer. To help keep the shared environment responsive, allow every listed regional ICMP probe source and run region selection again. For ongoing use, consider an ERPC VPS near the selected endpoint. UDP Forwarding comes as Standard and Premium, and with either you choose its region in the ERPC Web Dashboard and receive raw Shreds over UDP at the public IPv4 address and port you configure. [Use an ERPC VPS near this endpoint](https://erpc.global/en/vps/) · [Compare UDP Forwarding options](https://erpc.global/en/shreds/) [Read the Solana Shreds quickstart](https://erpc.global/en/doc/shredstream/quickstart/) [ERPC_FAR_POINT_GUIDANCE_END:shreds]: # ## Q. I allowlisted my IP, but I still cannot connect. What should I check? Use the encrypted HTTPS endpoint selected in the Dashboard. HTTPS uses port 443; HTTP on port 80 remains the unencrypted low-latency option. Both transports use the same registered-IP allowlist. Use the endpoint selected in the Dashboard; HTTPS uses 443 and HTTP uses 80. - HTTPS endpoint: use the Dashboard-selected endpoint on port 443. - HTTP endpoint: use the Dashboard-selected endpoint on port 80. - Use the URL shown in the Dashboard with `https://` or `http://`. Authentication is based on your registered IP address. Do not add `x-token`, `token`, or `Authorization` headers unless a specific product page explicitly says to do so. ## Q. I've only used WebSocket or Geyser gRPC (YellowStone) before. Do you have samples? Yes. You can quickly begin testing Shreds connections and application development using SLV. Please refer to the following guide for details: - [Shreds Quickstart Guide](https://erpc.global/en/doc/shredstream/quickstart/) ## Q. Can I register two IP addresses? You can use one endpoint per subscription. If you wish to use two IP addresses, you must subscribe to two separate subscriptions. ## Q. Which region do you recommend? There is no single permanent best region. Solana is global, and the leader role rotates across validators on the leader schedule. Regions with more validators and higher stake see leader slots more often, which can help transactions land faster. The trade-off is that competing traffic also concentrates there, so a less crowded region can sometimes deliver better results depending on your strategy. As a practical starting point, choose a validator-dense region such as Frankfurt or the US East Coast when steady leader-slot supply matters most, or place yourself near a specific target validator when shortest-path execution is the priority. Use [Validators Solutions](https://validators.solutions/) to understand public Solana network distribution, then use the [ERPC Leader Slot API](https://erpc.global/en/doc/rpc/leader-slot-api/) and real measurements to decide whether single-region, dual-region, or global deployment is appropriate. [![Solana Mainnet Distribution Report](https://erpc.global/faq/SolanaMainnetReportEN.jpg)](https://validators.solutions/) ## Q. I need latency of at least ~400ms or better. To achieve latency within approximately 400ms, consider these essential points: - **Realistic Understanding of Ping Values**: Ping values indicate ideal conditions and do not reflect actual latency in streaming communications, which typically experience around 5 times the ping latency. For example, a ping of 100ms across continents realistically results in about 500ms of latency. Thus, infrastructure must be established within the same region to achieve ~400ms latency. - Typical Ping Value Reference: - Same network: ~0.1ms - Private Network Interconnect (PNI): ~0.2ms - Same data center: ~0.3ms - Same city: ~1ms - Neighboring country: ~5–10ms - Intercontinental: ~100–300ms - **Avoiding the Pitfall of Average Latency**: Solana validators are geographically dispersed globally, and the leader schedule changes randomly with each epoch. Relying on average latency to achieve ~400ms is impractical. Instead, you should precisely track validator schedules in your specific region to identify slots with the lowest latency. To consistently achieve minimal latency, infrastructure across all relevant regions is required. Within the same region, data acquisition can occur in tens of milliseconds, with transmission possible in just a few milliseconds. - **Tracking the Leader Schedule**: Monitor the leader validator schedule for your region using the **ERPC Leader Slot API (`getLeaderSlots`)**. It returns the upcoming leader schedule, stake weight for the current epoch, estimated validator geolocations, and reference ping values, so you can identify the lowest-latency slots to target before they arrive. Public map-style data and native RPC APIs are useful for broad network visibility, but they are not precise enough for execution timing. The Leader Slot API fills that gap with the granularity needed for routing and trading decisions. - [ERPC Leader Slot API Documentation](https://erpc.global/en/doc/rpc/leader-slot-api/) - [ERPC Web Dashboard](https://dashboard.erpc.global/en) [![Validators Solutions - Solana network data](https://erpc.global/faq/ValidatorsSolutionsEN.jpg)](https://validators.solutions/) Solana network data: [Validators Solutions](https://validators.solutions/) ## Q. How can I achieve zero-block (zero-slot) trading? Successfully achieving zero-block (zero-slot) trading requires more sophisticated strategies, as follows: - **Identifying Opportunity Zones**: Solana validators are distributed globally, and it is physically impossible to achieve optimal latency for every slot. Therefore, monitor validator leader schedules in the region where your infrastructure is located and identify the most favorable opportunity zones. Deploying infrastructure across multiple regions can also be advantageous. For example, Frankfurt is a key region due to its high validator density, resulting in more frequent leader selection and greater trading opportunities. Use the **ERPC Leader Slot API (`getLeaderSlots`)** to look up the upcoming leader schedule, stake weight for the current epoch, estimated validator geolocation data, and reference ping values with far greater precision than public map-style data sources or native RPC APIs. This lets you map opportunity zones before the slots arrive and execute near-zero-latency trades. - [ERPC Leader Slot API Documentation](https://erpc.global/en/doc/rpc/leader-slot-api/) - [ERPC Web Dashboard](https://dashboard.erpc.global/en) - **Implementing Dedicated Nodes**: If you struggle to compete, consider deploying dedicated nodes. Shared nodes experience latency due to traffic from other users, and thus are not recommended. Furthermore, placing your dedicated node within the same network as your application significantly reduces network latency and optimizes performance. ## Q. Can I use a specific endpoint? To maintain a low-latency environment, our system automatically selects the closest available node. If you wish to use a specific endpoint, we recommend renting a server located nearest to that endpoint. ## Q. Why are dedicated endpoints faster? Shared endpoints are used by multiple customers who share the same resources. As traffic increases, latency tends to occur. Server resources have physical limits, and the amount of work they can handle is finite. When too many requests arrive at the same time, they must be processed sequentially, which results in slower response times. Although we take various measures to optimize performance even on shared endpoints, with dedicated endpoints you are the sole user of the resource. This means you are completely unaffected by other users, ensuring consistently stable and fast responses. In addition, dedicated endpoints provide communication options without TLS, such as HTTP. By skipping the TLS handshake (around 20ms), communication becomes even faster compared to HTTPS. ## Q. Will my price go up after I subscribe? While your subscription stays active, the price you locked in at signup remains in effect. Environments that hold up under Solana's real-time workload are globally scarce, and we plan to step up prices in line with growing hardware and network demand. Higher-spec configurations and high-demand regions sell through fastest, so locking in today's price is the most cost-efficient choice over the long run. ## Q. I want to pay with crypto Crypto payments are available from the ERPC Web Dashboard when your registered billing address country is one of the EU member countries. If every payment card registered on your account was issued outside the EU, crypto payments are not available. You can use SOL, USDC, or EURC to purchase ERPC Credits. Use those ERPC Credits to activate or continue ERPC plans. Open the dashboard, choose crypto payment, send the transfer from your wallet, and the dashboard will verify the transaction and apply the credits to your account. Supported countries: Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden. For countries not on the list, please pay by credit card. [ERPC Web Dashboard](https://dashboard.erpc.global/en) ## Q. Why doesn't ShredStream include all transactions? By design, Shreds do not include every transaction on the Solana blockchain. Monitoring all transactions would require deploying numerous proxies globally and receiving Shreds from every validator, which is not practical. Typically, users operate with a subset of the available data, as this approach is sufficient for most real-world applications. If your use case demands complete data coverage without any loss, Shreds might not be suitable. For scenarios requiring more comprehensive monitoring, Geyser gRPC provides higher reliability compared to Shreds. However, achieving 100% data coverage on the Solana blockchain still requires deploying numerous edge servers, which may not be realistic in practice. Geyser gRPC offers reliability exceeding 99%, which is notably higher than Shreds, a fact confirmed by many users, including us. Shreds, however, typically provide over 90% reliability. While they do not capture every transaction, their key advantage is the ability to rapidly retrieve most transactions faster than Geyser gRPC. For a deeper understanding, we recommend exploring Solana's Turbine and Gulf Stream protocols: - [Gulf Stream: Solana’s Mempool-less Transaction Forwarding Protocol](https://medium.com/solana-labs/gulf-stream-solanas-mempool-less-transaction-forwarding-protocol-d342e72186ad) - [Turbine — Solana’s Block Propagation Protocol Solves the Scalability Trilemma](https://medium.com/solana-labs/turbine-solanas-block-propagation-protocol-solves-the-scalability-trilemma-2ddba46a51db) ## Q. I want the best possible environment. UDP Forwarding comes as Standard and Premium. Both reach your receiver from the region you choose. On Standard, ERPC forwards the Shreds from a node in that region, so they reach you from a single source IP. On Premium, the mesh network passes on the copy of each Shred that reaches it first. With either, choose your region in the ERPC Web Dashboard and set the public IPv4 address and port that should receive raw Shreds. Please contact us through the ERPC Web Dashboard for more details. [ERPC Web Dashboard](https://dashboard.erpc.global/en) 🔗 [ERPC Web Dashboard](https://dashboard.erpc.global/en) ## Q. What is the latency like? Latency varies depending on the measurement method and your specific usage environment. Rather than focusing on exact numerical values, it's crucial to ensure that the latency meets your actual operational requirements. We provide easy-to-use tools in TypeScript and Rust for measuring latency. - [Solana Stream SDK - ValidatorsDAO GitHub](https://github.com/ValidatorsDAO/solana-stream) - [SLV (English)](https://slv.dev/en) ## Q. Is this RPC (gRPC, Shreds) faster than others? We build for speed at every tier, and we're glad to have that measured side-by-side with any other provider. Results can shift with region, whether you're on a shared or dedicated endpoint, the protocol you use (WebSockets, gRPC, or Shreds), and the programming language your client runs in. If you find our service slower, please let us know the specific conditions and competitors you've compared it against through the ERPC Web Dashboard. We will identify the cause and improve the speed further. [ERPC Web Dashboard](https://dashboard.erpc.global/en) ## Q. Which plan offers the fastest performance? Generally, our highest-tier plan provides the fastest performance due to superior CPUs, higher memory capacities, and robust hardware configurations. We also offer customized solutions if you require even more powerful servers, but our standard plans are designed to deliver optimal price-to-performance ratios. We are confident in providing world-class performance at every price level. If you find a faster provider within the same price range, please let us know so we can investigate and make improvements. ## Q. I'm experiencing high latency. Why? Latency significantly increases with distance from the endpoint. We recommend accessing from a server located closer to the endpoint provided. The fastest environments are available via our [Bare-Metal servers](https://erpc.global/en/baremetal/) and [VPS services](https://erpc.global/en/vps/). ## Q. Which is the fastest: WebSockets, gRPC, or Shreds? Based on customer feedback, the performance order is: **Shreds > gRPC > WebSockets** If your experience differs, please inform us. ## Q. Latency isn't what I expected. Performance varies significantly depending on the programming language used. Generally, the performance order is: **Rust > Go > TypeScript (JavaScript) > Python** For detailed comparisons, please see: [Programming Language Speed Comparison](https://niklas-heer.github.io/speed-comparison/) We strongly recommend Rust for the highest performance. --- title: "FAQ - VPS" description: "Frequently asked questions about ERPC VPS: why it is fast, how it differs from bare metal, node regions and how to pick one for Solana, plans and payment." canonical: "https://erpc.global/en/faq/vps/general/" locale: "en" --- # FAQ - VPS ## Not specific to a chain ### Q. Why is your VPS so fast? Our VPS leverages the latest 4th-generation AMD EPYC CPUs, which are not yet commonly used by other providers. This CPU series is renowned for having a large number of cores coupled with extremely high clock speeds, maintaining exceptional performance even in virtualized environments. The primary reason we specifically utilize 4th-generation and newer CPUs is their compatibility with DDR5 RAM. DDR5 RAM, introduced with these CPUs, significantly outperforms traditional DDR4 RAM in speed and efficiency. Additionally, our storage infrastructure uses the fastest available SSDs—4th generation NVMe drives—and is backed by reliable partner providers offering large-capacity, unrestricted network bandwidth. Moreover, our platform fully integrates network sharing, effectively reducing the distance between your applications and the Solana network to zero. Since network speed typically represents the main performance bottleneck, we've constructed and provide a high-speed, optimized Solana network environment to ensure your applications achieve maximum performance. ### Q. What are the advantages of VPS? How is it different from a bare-metal server? Bare-metal servers are ideal for performance-critical usage but have a higher starting cost (minimum €298/month) and are typically available in larger server configurations. Conversely, VPS solutions start from €42/month and are well-suited for lightweight tasks such as proxies, stream subscriptions, and running lightweight scripts. Our VPS fully utilizes the cloud environment and integrates seamlessly with ERPC’s Solana Shreds network. - **For performance-critical use cases**: We recommend a bare-metal server. - **For cost-efficient and lightweight tasks**: We recommend VPS. ### Q. In which regions are your nodes located? We currently operate nodes in the following regions: - Frankfurt (FRA) - Amsterdam (AMS) - London (LON) - Dublin (DUB) - New York (NY) - Chicago (CHI) - Salt Lake City (SLC) - Tokyo (TY) - Singapore (SGP) - Sydney (SYD) ERPC Web Dashboard: https://dashboard.erpc.global/en ### Q. What is the latency like? Latency varies depending on the measurement method and your specific usage environment. Rather than focusing on exact numerical values, it's crucial to ensure that the latency meets your actual operational requirements. For Solana, you can measure latency with these open-source tools for TypeScript and Rust. - [Solana Stream SDK - ValidatorsDAO GitHub](https://github.com/ValidatorsDAO/solana-stream) - [SLV (English)](https://slv.dev/en) ### Q. Why are dedicated endpoints faster? Shared endpoints are used by multiple customers who share the same resources. As traffic increases, latency tends to occur. Server resources have physical limits, and the amount of work they can handle is finite. When too many requests arrive at the same time, they must be processed sequentially, which results in slower response times. Although we take various measures to optimize performance even on shared endpoints, with dedicated endpoints you are the sole user of the resource. This means you are completely unaffected by other users, ensuring consistently stable and fast responses. In addition, dedicated endpoints provide communication options without TLS, such as HTTP. By skipping the TLS handshake (around 20ms), communication becomes even faster compared to HTTPS. ### Q. Which plan offers the fastest performance? Generally, our highest-tier plan provides the fastest performance due to superior CPUs, higher memory capacities, and robust hardware configurations. We also offer customized solutions if you require even more powerful servers, but our standard plans are designed to deliver optimal price-to-performance ratios. We are confident in providing world-class performance at every price level. If you find a faster provider within the same price range, please let us know so we can investigate and make improvements. ### Q. Latency isn't what I expected. Performance differs significantly depending on the programming language used. Generally, language performance ranks as follows: **Rust > Go > TypeScript (JavaScript) > Python** For detailed comparisons, please refer to: [Programming Language Speed Comparison](https://niklas-heer.github.io/speed-comparison/) We strongly recommend Rust if maximum performance is your goal. ### Q. Will my price go up after I subscribe? While your subscription stays active, the price you locked in at signup remains in effect. Environments that hold up under Solana's real-time workload are globally scarce, and we plan to step up prices in line with growing hardware and network demand. Higher-spec configurations and high-demand regions sell through fastest, so locking in today's price is the most cost-efficient choice over the long run. ### Q. I want to pay with crypto Crypto payments are available from the ERPC Web Dashboard when your registered billing address country is one of the EU member countries. If every payment card registered on your account was issued outside the EU, crypto payments are not available. You can use SOL, USDC, or EURC to purchase ERPC Credits. Use those ERPC Credits to activate or continue ERPC plans. Open the dashboard, choose crypto payment, send the transfer from your wallet, and the dashboard will verify the transaction and apply the credits to your account. Supported countries: Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden. For countries not on the list, please pay by credit card. [ERPC Web Dashboard](https://dashboard.erpc.global/en) ## Solana These answers rely on how Solana works: the leader role rotates across validators on the leader schedule, so validator locations shape the region you pick. ### Q. Which region do you recommend? There is no single permanent best region. Solana is global, and the leader role rotates across validators on the leader schedule. Regions with more validators and higher stake see leader slots more often, which can help transactions land faster. The trade-off is that competing traffic also concentrates there, so a less crowded region can sometimes deliver better results depending on your strategy. As a practical starting point, choose a validator-dense region such as Frankfurt or the US East Coast when steady leader-slot supply matters most, or place yourself near a specific target validator when shortest-path execution is the priority. Use [Validators Solutions](https://validators.solutions/) to understand public Solana network distribution, then use the [ERPC Leader Slot API](https://erpc.global/en/doc/rpc/leader-slot-api/) and real measurements to decide whether single-region, dual-region, or global deployment is appropriate. [![Solana Mainnet Distribution Report](https://erpc.global/faq/SolanaMainnetReportEN.jpg)](https://validators.solutions/) ### Q. I need latency of at least ~400ms or better. To achieve latency within approximately 400ms, consider these essential points: - **Realistic Understanding of Ping Values**: Ping values indicate ideal conditions and do not reflect actual latency in streaming communications, which typically experience around 5 times the ping latency. For example, a ping of 100ms across continents realistically results in about 500ms of latency. Thus, infrastructure must be established within the same region to achieve ~400ms latency. - Typical Ping Value Reference: - Same network: ~0.1ms - Private Network Interconnect (PNI): ~0.2ms - Same data center: ~0.3ms - Same city: ~1ms - Neighboring country: ~5–10ms - Intercontinental: ~100–300ms - **Avoiding the Pitfall of Average Latency**: Solana validators are geographically dispersed globally, and the leader schedule changes randomly with each epoch. Relying on average latency to achieve ~400ms is impractical. Instead, you should precisely track validator schedules in your specific region to identify slots with the lowest latency. To consistently achieve minimal latency, infrastructure across all relevant regions is required. Within the same region, data acquisition can occur in tens of milliseconds, with transmission possible in just a few milliseconds. - **Tracking the Leader Schedule**: Monitor the leader validator schedule for your region using the **ERPC Leader Slot API (`getLeaderSlots`)**. It returns the upcoming leader schedule, stake weight for the current epoch, estimated validator geolocations, and reference ping values, so you can identify the lowest-latency slots to target before they arrive. Public map-style data and native RPC APIs are useful for broad network visibility, but they are not precise enough for execution timing. The Leader Slot API fills that gap with the granularity needed for routing and trading decisions. - [ERPC Leader Slot API Documentation](https://erpc.global/en/doc/rpc/leader-slot-api/) - [ERPC Web Dashboard](https://dashboard.erpc.global/en) [![Validators Solutions - Solana network data](https://erpc.global/faq/ValidatorsSolutionsEN.jpg)](https://validators.solutions/) Solana network data: [Validators Solutions](https://validators.solutions/) ### Q. How can I achieve zero-block (zero-slot) trading? Successfully achieving zero-block (zero-slot) trading requires more sophisticated strategies, as follows: - **Identifying Opportunity Zones**: Solana validators are distributed globally, and it is physically impossible to achieve optimal latency for every slot. Therefore, monitor validator leader schedules in the region where your infrastructure is located and identify the most favorable opportunity zones. Deploying infrastructure across multiple regions can also be advantageous. For example, Frankfurt is a key region due to its high validator density, resulting in more frequent leader selection and greater trading opportunities. Use the **ERPC Leader Slot API (`getLeaderSlots`)** to look up the upcoming leader schedule, stake weight for the current epoch, estimated validator geolocation data, and reference ping values with far greater precision than public map-style data sources or native RPC APIs. This lets you map opportunity zones before the slots arrive and execute near-zero-latency trades. - [ERPC Leader Slot API Documentation](https://erpc.global/en/doc/rpc/leader-slot-api/) - [ERPC Web Dashboard](https://dashboard.erpc.global/en) - **Implementing Dedicated Nodes**: If you struggle to compete, consider deploying dedicated nodes. Shared nodes experience latency due to traffic from other users, and thus are not recommended. Furthermore, placing your dedicated node within the same network as your application significantly reduces network latency and optimizes performance. ### Q. Which is the fastest: WebSockets, gRPC, or Shreds? Aggregated customer feedback consistently ranks the speed in this order: **Shreds > gRPC > WebSockets** If your experience differs, please let us know. ### Q. I want the best possible environment. [UDP Forwarding](https://erpc.global/en/doc/shredstream/udp-forwarding/) comes as Standard and Premium. Both reach your receiver from the region you choose. On Standard, ERPC forwards the Shreds from a node in that region, so they reach you from a single source IP. On Premium, the mesh network passes on the copy of each Shred that reaches it first. Premium Shreds often arrive 1–3 ms sooner than Standard. On 2026-10-30, an ERPC receiver in Frankfurt received Standard and Premium side by side in a single 120-second run and compared when each Shred that reached both first arrived on Standard and on Premium. Choose Premium if you need that speed difference, and Standard if you do not. In the ERPC Web Dashboard, choose your region and set your server's public IPv4 address and port as the destination for raw Shreds. Whichever you choose, allow every source IP shown in the dashboard in your receiver's firewall. For more details, please contact us on our ERPC Web Dashboard. [ERPC Web Dashboard](https://dashboard.erpc.global/en) 🔗 [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Q. Is this RPC (gRPC, Shreds) faster than others? We build for speed at every tier, and we're glad to have that measured side-by-side with any other provider. Results can shift with region, whether you're on a shared or dedicated endpoint, the protocol you use (WebSockets, gRPC, or Shreds), and the programming language your client runs in. If you find our service slower, please let us know the specific conditions and competitors you've compared it against through the ERPC Web Dashboard. We will identify the cause and improve the speed further. [ERPC Web Dashboard](https://dashboard.erpc.global/en) --- title: "FAQ - Bare-Metal Servers" description: "Frequently asked questions about ERPC Bare Metal: why it is fast, adding IPv4 addresses, node regions and how to pick one for Solana, plans and payment." canonical: "https://erpc.global/en/faq/metal/general/" locale: "en" --- # FAQ - Bare-Metal Servers ## Not specific to a chain ### Q. Why is your Bare Metal so fast? In addition to utilizing high-performance CPUs, RAM, and NVMe SSDs, we have carefully selected our partner providers based on extensive experience, ensuring consistently optimal performance even from hardware of the same specifications. Our trusted partner providers guarantee the highest quality in CPUs, RAM, SSDs, and network infrastructure, continuously improving their services by adding more Points of Presence (PoPs) and reducing latency to popular PoPs. Moreover, our platform fully integrates network sharing, effectively reducing the distance between your applications and the Solana network to zero. Since network speed typically represents the primary performance bottleneck, we've established a high-speed, optimized Solana network environment to eliminate this issue, ensuring your applications achieve maximum performance. ### Q. What are the advantages of bare-metal? How is it different from a VPS? Bare-metal servers provide a physically dedicated server exclusively for your use. VPS servers are virtual environments, dividing physical CPU cores into multiple virtual CPUs (vCPUs), allowing more vCPUs than actual physical cores. - **For performance-oriented use**: Bare-metal servers are recommended. - **For cost-performance optimization**: VPS servers are recommended. ### Q. Can I add a public IPv4 address to my bare metal server? Additional public IPv4 addresses are available only with an annual bare metal contract. For details, contact support through the [ERPC dashboard](https://dashboard.erpc.global/en). ### Q. In which regions are your nodes located? We currently operate nodes in the following regions: - Frankfurt (FRA) - Amsterdam (AMS) - London (LON) - Stockholm (STO) - New York (NY) - Chicago (CHI) - Salt Lake City (SLC) - Tokyo (TY) - Singapore (SGP) ERPC Web Dashboard: https://dashboard.erpc.global/en ### Q. What is the latency like? Latency varies depending on the measurement method and your specific usage environment. Rather than focusing on exact numerical values, it's crucial to ensure that the latency meets your actual operational requirements. For Solana, you can measure latency with these open-source tools for TypeScript and Rust. - [Solana Stream SDK - ValidatorsDAO GitHub](https://github.com/ValidatorsDAO/solana-stream) - [SLV (English)](https://slv.dev/en) ### Q. Why are dedicated endpoints faster? Shared endpoints are used by multiple customers who share the same resources. As traffic increases, latency tends to occur. Server resources have physical limits, and the amount of work they can handle is finite. When too many requests arrive at the same time, they must be processed sequentially, which results in slower response times. Although we take various measures to optimize performance even on shared endpoints, with dedicated endpoints you are the sole user of the resource. This means you are completely unaffected by other users, ensuring consistently stable and fast responses. In addition, dedicated endpoints provide communication options without TLS, such as HTTP. By skipping the TLS handshake (around 20ms), communication becomes even faster compared to HTTPS. ### Q. Which plan offers the fastest performance? Generally, our highest-tier plan provides the fastest performance due to superior CPUs, higher memory capacities, and robust hardware configurations. We also offer customized solutions if you require even more powerful servers, but our standard plans are designed to deliver optimal price-to-performance ratios. We are confident in providing world-class performance at every price level. If you find a faster provider within the same price range, please let us know so we can investigate and make improvements. ### Q. Latency isn't what I expected. Performance varies based on the programming language used. Typically, language performance ranks as follows: **Rust > Go > TypeScript (JavaScript) > Python** For detailed comparisons, see the following resource: [Programming Language Speed Comparison](https://niklas-heer.github.io/speed-comparison/) We strongly recommend using Rust for achieving the highest performance. ### Q. Will my price go up after I subscribe? While your subscription stays active, the price you locked in at signup remains in effect. Environments that hold up under Solana's real-time workload are globally scarce, and we plan to step up prices in line with growing hardware and network demand. Higher-spec configurations and high-demand regions sell through fastest, so locking in today's price is the most cost-efficient choice over the long run. ### Q. I want to pay with crypto Crypto payments are available from the ERPC Web Dashboard when your registered billing address country is one of the EU member countries. If every payment card registered on your account was issued outside the EU, crypto payments are not available. You can use SOL, USDC, or EURC to purchase ERPC Credits. Use those ERPC Credits to activate or continue ERPC plans. Open the dashboard, choose crypto payment, send the transfer from your wallet, and the dashboard will verify the transaction and apply the credits to your account. Supported countries: Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden. For countries not on the list, please pay by credit card. [ERPC Web Dashboard](https://dashboard.erpc.global/en) ## Solana These answers rely on how Solana works: the leader role rotates across validators on the leader schedule, so validator locations shape the region you pick. ### Q. Which region do you recommend? There is no single permanent best region. Solana is global, and the leader role rotates across validators on the leader schedule. Regions with more validators and higher stake see leader slots more often, which can help transactions land faster. The trade-off is that competing traffic also concentrates there, so a less crowded region can sometimes deliver better results depending on your strategy. As a practical starting point, choose a validator-dense region such as Frankfurt or the US East Coast when steady leader-slot supply matters most, or place yourself near a specific target validator when shortest-path execution is the priority. Use [Validators Solutions](https://validators.solutions/) to understand public Solana network distribution, then use the [ERPC Leader Slot API](https://erpc.global/en/doc/rpc/leader-slot-api/) and real measurements to decide whether single-region, dual-region, or global deployment is appropriate. [![Solana Mainnet Distribution Report](https://erpc.global/faq/SolanaMainnetReportEN.jpg)](https://validators.solutions/) ### Q. I need latency of at least ~400ms or better. To achieve latency within approximately 400ms, consider these essential points: - **Realistic Understanding of Ping Values**: Ping values indicate ideal conditions and do not reflect actual latency in streaming communications, which typically experience around 5 times the ping latency. For example, a ping of 100ms across continents realistically results in about 500ms of latency. Thus, infrastructure must be established within the same region to achieve ~400ms latency. - Typical Ping Value Reference: - Same network: ~0.1ms - Private Network Interconnect (PNI): ~0.2ms - Same data center: ~0.3ms - Same city: ~1ms - Neighboring country: ~5–10ms - Intercontinental: ~100–300ms - **Avoiding the Pitfall of Average Latency**: Solana validators are geographically dispersed globally, and the leader schedule changes randomly with each epoch. Relying on average latency to achieve ~400ms is impractical. Instead, you should precisely track validator schedules in your specific region to identify slots with the lowest latency. To consistently achieve minimal latency, infrastructure across all relevant regions is required. Within the same region, data acquisition can occur in tens of milliseconds, with transmission possible in just a few milliseconds. - **Tracking the Leader Schedule**: Monitor the leader validator schedule for your region using the **ERPC Leader Slot API (`getLeaderSlots`)**. It returns the upcoming leader schedule, stake weight for the current epoch, estimated validator geolocations, and reference ping values, so you can identify the lowest-latency slots to target before they arrive. Public map-style data and native RPC APIs are useful for broad network visibility, but they are not precise enough for execution timing. The Leader Slot API fills that gap with the granularity needed for routing and trading decisions. - [ERPC Leader Slot API Documentation](https://erpc.global/en/doc/rpc/leader-slot-api/) - [ERPC Web Dashboard](https://dashboard.erpc.global/en) [![Validators Solutions - Solana network data](https://erpc.global/faq/ValidatorsSolutionsEN.jpg)](https://validators.solutions/) Solana network data: [Validators Solutions](https://validators.solutions/) ### Q. How can I achieve zero-block (zero-slot) trading? Successfully achieving zero-block (zero-slot) trading requires more sophisticated strategies, as follows: - **Identifying Opportunity Zones**: Solana validators are distributed globally, and it is physically impossible to achieve optimal latency for every slot. Therefore, monitor validator leader schedules in the region where your infrastructure is located and identify the most favorable opportunity zones. Deploying infrastructure across multiple regions can also be advantageous. For example, Frankfurt is a key region due to its high validator density, resulting in more frequent leader selection and greater trading opportunities. Use the **ERPC Leader Slot API (`getLeaderSlots`)** to look up the upcoming leader schedule, stake weight for the current epoch, estimated validator geolocation data, and reference ping values with far greater precision than public map-style data sources or native RPC APIs. This lets you map opportunity zones before the slots arrive and execute near-zero-latency trades. - [ERPC Leader Slot API Documentation](https://erpc.global/en/doc/rpc/leader-slot-api/) - [ERPC Web Dashboard](https://dashboard.erpc.global/en) - **Implementing Dedicated Nodes**: If you struggle to compete, consider deploying dedicated nodes. Shared nodes experience latency due to traffic from other users, and thus are not recommended. Furthermore, placing your dedicated node within the same network as your application significantly reduces network latency and optimizes performance. ### Q. Which is the fastest: WebSockets, gRPC, or Shreds? According to aggregated customer feedback, the performance order is: **Shreds > gRPC > WebSockets** Please inform us if you observe different results. ### Q. I want the best possible environment. [UDP Forwarding](https://erpc.global/en/doc/shredstream/udp-forwarding/) comes as Standard and Premium. Both reach your receiver from the region you choose. On Standard, ERPC forwards the Shreds from a node in that region, so they reach you from a single source IP. On Premium, the mesh network passes on the copy of each Shred that reaches it first. Premium Shreds often arrive 1–3 ms sooner than Standard. On 2026-10-30, an ERPC receiver in Frankfurt received Standard and Premium side by side in a single 120-second run and compared when each Shred that reached both first arrived on Standard and on Premium. Choose Premium if you need that speed difference, and Standard if you do not. In the ERPC Web Dashboard, choose your region and set your server's public IPv4 address and port as the destination for raw Shreds. Whichever you choose, allow every source IP shown in the dashboard in your receiver's firewall. For details, please contact us via the ERPC Web Dashboard. [ERPC Web Dashboard](https://dashboard.erpc.global/en) 🔗 [ERPC Web Dashboard](https://dashboard.erpc.global/en) ### Q. Is this RPC (gRPC, Shreds) faster than others? We build for speed at every tier, and we're glad to have that measured side-by-side with any other provider. Results can shift with region, whether you're on a shared or dedicated endpoint, the protocol you use (WebSockets, gRPC, or Shreds), and the programming language your client runs in. If you find our service slower, please let us know the specific conditions and competitors you've compared it against through the ERPC Web Dashboard. We will identify the cause and improve the speed further. [ERPC Web Dashboard](https://dashboard.erpc.global/en) --- title: "FAQ - ERPC AI" description: "Frequently asked questions about ERPC AI" canonical: "https://erpc.global/en/faq/erpc-ai/general/" locale: "en" --- # FAQ - ERPC AI ## Q. What is ERPC AI? ERPC AI is the assistant you ask in your terminal with `erpc ai`. It answers from ERPC's documentation and your account, and with your approval it can start an hourly VPS, install your SSH key on it, turn off password logins, allow SSH only from your address and buy ERPC Credit. It needs an ERPC account. ERPC CLI is available as `v0.1.0-rc.4`, a pre-release. [ERPC AI in ERPC CLI](https://erpc.global/en/doc/erpc-cli/ai/) ## Q. How do ERPC AI plans and token packs work? Plans and token packs for ERPC AI are sold on the ERPC Web Dashboard. Packs come in 1M and 10M tokens, never expire, and are spent after plan tokens. Paid plan tokens reset each billing cycle. [ERPC Web Dashboard](https://dashboard.erpc.global/en)