# Premium RPC Overview (USERS OF THE RPC) ## What is a Premium RPC Account? Premium accounts have access to add-on services from GenesysGo to further enhance their Premium RPC capabilities. This includes global server load balancing (geo-DNS), archival access and enhanced handling of network transaction requests*. These add-on services are integrated into the independent Shadow Operator network thus maintaining their web3 credibility. Give your project or application the web3 credibility without sacrificing performance and reliability. **Reserve your Premium RPC account [here](https://dev-portal.genesysgo.net/premium/reserve).** ## Benefits - Global cluster of servers that has no single point of failure. - No data caps - All Solana historical ledger data back to the Genesys block - **Rates up to:** - 200 RPS global (including txns) + 200 burst (per JWT) - 5 RPS gPA - 10 RPS gMA + 10 burst (per JWT) - 50 RPS getTrans + 50 burst (per JWT) - Up to 250 mbps data limit ## Premium RPC Tiers ## Pricing and Payment - Pricing is a flat monthly cost in **USDC** - Payment is made monthly up front, and then depited from the wallet-account on a monthly cycle - Reservation payments are held in escrow and cannot be withdrawn within the cycle. For the next reservation cycle to properly begin (and avoid causing errors), the next month’s reservation payment must be deposited to the account before cycle expiration. - The price is a reflection of the average independent operator cost to run a Shadow Node - Reservation payment received passes **directly** to Shadow Operators, making Shadow RPCs the **first-ever decentralization of compute and payment on Solana**. ## Regions - You can choose from our list of available regions - Region expansion may occur as independent Shadow Node operators continue to join the network and expand global footprint ## How it works | Tech Stack | | ----------- | ## Simple QuickStart Guide ## Using JSON Web Tokens (JWT) to access the network - JSON Web Tokens (JWT) are a standard way to guard the access to your API endpoint and securely share information between entities. - Once you reserve a Shadow RPC, you will find an automatically generated JWT. Including this token in your RPC request is required for interacting with the Premium RPC network. - Insert the token into an authorization header within the RPC call using ```Bearer: Token``` Here is an example: ```bash curl --location --request POST "https://rpc.genesysgo.net/rpc/<UUID>" --header "Authorization: Bearer <TOKEN>" --header 'Content-Type: application/json' --data-raw '{ "jsonrpc": "2.0", "method": "getBlocks", "params": ["latest", false], "id": "xyz" }' ``` - As a security best practice, your token will expire/renew automatically after 24 hours and you will need to account for this change in your backend server setup. Your application should incorporate back-end code that handles this token refresh. You can find resources on this here. ### Load Balancing If you have reserved more than one Premium RPC node then you will need to set up a backend server that runs any commonly used proxy (such as nginx, HAproxy, etc.). - You may also choose a cloud based proxy solution or run containerized solutions (such as Traefik via Kubernetes). Guides on setting these up are abundantly available online. You can then mask your Premium RPC endpoint behind this proxy server. If you reserve both a New York region and a Frankfurt region then you will need a proxy server in both of those regions. ### Integrations and Requests For supported methods, please review the Solana Docs here: https://docs.solana.com/ru/developing/clients/jsonrpc-api ### Security Practices - Generate a new JWT if you think your endpoint has been compromised. - Obscure your endpoint, your UUID, and your JWT as much as possible through back-end best practices. ### Common Errors - **Status 403**: you may have malformed your request or violated the network limitation (such as batching requests on the free network). It could be you are calling a deprecated method. - **Status 429**: you are exceeding the rate limits or data limits imposed by your account tier. Add additional nodes, or upgrade to a higher tier to avoid limits. - **Connection Refused**: validator instability or machine resets are common on blockchains. This often means you are connected to a recovering RPC, and need to add retry logic into your code to add resiliency during network storms. Even the best validator operators have a non-zero “block skip rate,” and the same is true for the best RPCs operators. - **Blockhash not found**: a common cause of the high TPS Solana is capable of. If a blockhash is greater than 150 slots behind the tip of the chain it will be invalid when used. This can happen during epoch boundaries, curing network storms, or when TPS throughput is being taxed. All voting and non-voting validators are subjected to temporary slippages in slot-distance behind any given leader. Although infrequently, you should have retry logic and error handling in your front-end to help overcome this. - **Additional Guidance**: The best place to seek help and learn more about error handling is the GenesysGo RPC FAQ channel located here https://discord.gg/PGsdDzCx ### Proxying (deprecated) - You will have to enable proxing yourself ## Using API/SDK