SOL RPC Canister

The SOL RPC canister is a canister that enables the communication between canisters on the Internet Computer and smart contracts on the Solana blockchains.

Canisters can send requests to the SOL RPC Canister, which forwards the request to multiple JSON-RPC services using HTTPS outcalls and returns a response to the canister that sent the request.

Architecture

The following figure depicts the involved components and their interactions at a high level.

The SOL RPC Canister accepts requests from canisters and interacts with JSON-RPC providers via HTTPS outcalls to obtain data from and submit data to Solana. Multiple JSON-RPC providers are queried to ensure that the response does not come from a single centralized party. At the same time, this mechanism guarantees that there is no single point of failure. Currently, the following JSON-RPC providers are supported: Alchemy, Ankr, Chainstack, dRPC, Helius, and PublicNode.

The SOL RPC is controlled by the Network Nervous System DAO, i.e., its functionality cannot be changed by a single entity. Together, these mechanisms ensure that no trust in additional parties (bridges or oracles) are necessary for the caller canister to send transactions and to condition executions on Solana state.

A code sample showing how to use the SOL RPC canister can be found in the SOL RPC canister repository.