Getting started | Solana

🚧

The full Solana API reference is WIP

What is the Solana protocol

Solana is a permissionless network protocol with the parallel smart contract processing functionality. For consensus, Solana uses a combination of proof-of-stake to secure the network and the proof-of-history mechanism to synchronize the network state.

Validators on the network stake SOL to get the right to confirm blocks in assigned time slots.

To get an assigned time slot, validator nodes use the sequence of hashed events that each of them maintains, which is called proof of history.

What is the Solana API

The Solana API allows developers to communicate with the Solana blockchain to build applications.

To read data from and send transactions to the Solana blockchain, an application must connect to a Solana RPC node.

When communicating with a Solana RPC node, the Solana client implements a JSON-RPC specification, a communication protocol allowing one to make remote calls and execute them as if they were made locally.

Temporary limitations

  • For the getBlocks method, the allowed range is currently 500,000 slots.

  • For the getBlock and getBlocks methods, on Solana nodes deployed in the Amsterdam region (ams1), there is a rate limit of 40 requests per second and 20 requests per second respectively.

  • For the getProgramAccounts method, on elastic Solana Mainnet nodes, there is a rate limit of 2 requests per second, and on elastic Solana Devnet nodes, there is a limit of 3 requests per second. If the rate limit is exceeded, you will get the following response:

    {
       "jsonrpc":"2.0",
       "error":{
          "code":-32005,
          "message":"method request rate exceed",
          "data":{
             "method_name":"getProgramAccounts",
             "try_again_in":"315.794147ms"
          }
       },
       "id":1
    }
    

How to start using the Solana API

To use the Solana API, you need access to a Solana RPC node.

Follow these steps to sign up on Chainstack, deploy a Solana RPC node, and find your endpoint credentials:

  1. Sign up with Chainstack.
  2. Deploy a node.
  3. View node access and credentials.

Now you are ready to connect to the Solana blockchain and use the Solana API to build.

πŸ“˜

See also

Build better with Solana