0%
Overview page background
HomeOverviewsInfra
Solana Nodes - The Complete Guide (2023)

Solana Nodes - The Complete Guide (2023)

Alchemy headshot

Written by Alchemy

Brady Werkheiser headshot

Reviewed by Brady Werkheiser

Published on September 27, 20226 min read

Solana’s high performance blockchain is a network of computers (nodes) executing and validating transactions. Solana has two types of nodes: validator and RPC nodes. This article will explain what a Solana node is, provide step-by-step instructions for running your own Solana node, and provide options for Solana RPC node providers. By the end of this article, you will be able to run a node on Solana and select an RPC node provider.

A Solana node is any computer running the software needed to connect with the Solana cluster, a set of independently owned nodes. These nodes work together to verify the output of untrusted, user-submitted programs. Depending on the specific functionality, Solana nodes can either be RPC nodes or validator nodes.

Validator N\nodes (also known as Consensus Nodes) within Solana’s Proof-of-Stake (PoS) consensus model are the entities responsible for confirming if blocks are valid, and ultimately finalizing the transactions by voting on blocks produced by a leader node, or by being the leader. 

Solana’s Proof-of-History (PoH) protocol is a cryptographic way to reliably order transactions and events recorded on the decentralized ledger. Solana's architecture enables transactions to be ordered as they enter the network, rather than by block, which is done by the validator nodes. 

Solana uses a delegated Proof-of-Stake protocol. Anyone who owns SOL can delegate it to a validator, whereby the validator then earns influence on the network which leads to them being assigned as a leader for more slots, as well as earning more rewards for voting.

A Solana RPC (Remote Procedure Call) Node is a non-voting validator node, which performs all validator node functions except voting on the validity of blocks. Because of this, they also do not receive vote credits.

An RPC node responds to requests about the network and also allows users of the RPC node to submit new transactions. Fleets of RPC nodes usually exist to serve a specific dApp or service (e.g.: decentralized exchanges) for users who want to interact with the Solana blockchain. 

There are four main differences between Solana RPC nodes and consensus nodes, primarily cluster consensus, vote credits, transaction costs, and hardware requirements.

Consensus nodes participate in the cluster consensus by voting on the blocks produced by the leader whereas RPC nodes do not. If a voting validator has a staked account, it will earn vote credit for performing voting as long as it successfully votes on blocks that are added to the blockchain. 

Vote credits are given to all consensus validators that successfully vote on blocks that are added to the blockchain. Additionally, when the validator is the leader, it can earn transaction fees and storage rent fees for each block that it produces that is added to the blockchain. RPC nodes do not receive any vote credit.

Since all votes in Solana happen on the blockchain, a consensus validator node incurs a transaction cost for each vote that it makes. These transaction fees amount to approximately 1.1 SOL per day. RPC nodes do not incur any transaction cost other than the cost of running and maintaining the node.

To provide improved reliability, consensus validator nodes are expected to have higher computational and storage resource than RPC nodes.

Solana RPC node providers facilitate easy access for developers to send requests to and receive payloads from nodes on Solana's network instead of requiring Solana dApps to be responsible for their own node infrastructure, which is a heavy cost in terms of time and money.

There are varied use cases that require public and private RPC access depending on the application. For this reason, Solana RPC node providers offer a variety of benefits including developer tools, autoscaling access based on user demand, relaxed rate limits, and dedicated, highly available, reliable, and on-demand RPC services

Choosing the right node provider for your application’s user case is a tradeoff between reliability, scalability, data correctness, latency, advanced APIs, customer support, and price. For instance, Alchemy's free tier can support the large majority of startups, while GenesysGo is sunsetting their free tier.

Here’s a list of top Solana RPC node providers:

  1. Alchemy

  2. Quicknode

  3. Syndica

  4. Triton

  5. GenesysGo

  6. Chainstack

  7. Ankr

  8. Runnode

  9. Blockdaemon

  10. Figment

To run a Solana RPC node, you need a minimum reserve of SOL and also possess the minimum memory (128 GB/258GB), computational (12 or 16 cores) and storage requirements.

There is no strict minimum amount of SOL required to run a validator on Solana. However a vote account which has a rent-exempt reserve of 0.02685864 SOL is required to participate in consensus. Voting also requires sending a vote transaction for each block the validator agrees with, which can cost up to 1.1 SOL per day. This cost estimator can be used to calculate the unit economics of running your own validator

Here are the minimum hardware requirements for running a Solana node in terms of memory, compute, storage, and operating system.

  • 128GB, or more for consensus validator nodes

  • 258GB, or more for RPC nodes

  • 12 cores / 24 threads, or more @ minimum of 2.8GHz for consensus validator nodes

  • 16 cores / 32 threads, or more for RPC nodes

For consensus validators:

  • PCIe Gen3 x4 NVME SSD, or better

  • Accounts: 500GB, or larger. High TBW (Total Bytes Written)

  • Ledger: 1TB or larger. High TBW suggested

For RPC nodes:

  • A larger ledger disk if longer transaction history is required, Accounts and ledger should not be stored on the same disk

  • GPUs are not strictly necessary

  • Network: 1 GBPS up and down link speed,  must be unshaped and unmetered

Ubuntu 20.04, Windows 10 or later, macOS High Sierra or later.

With a proper machine, now we can set up the Solana node.

If your application requires a highly specific node configuration, running your own now may be preferable to using a Solana node provider. Running a node on the Solana network requires a few steps, including buying the aforementioned hardware, setting up the server, and creating an account and a Solana wallet.

First, create a `sol` user with this command from your terminal:

sudo adduser sol

Second, install Solana with this command:

sh -c "$(curl -sSfL https://release.solana.com/v1.8.0/install)"

Third, create a mount point for ledger (not required if you are just running as a RPC node)

sudo mkdir -p /mnt/ledger
sudo chown -R sol:sol /mnt/ledger
sudo mount /dev/nvme0n1 /mnt/ledger

Fourth, join the Solana Devnet cluster and test your connection:

solana config set --url devnet
solana gossip

Fifth, create the four necessary accounts: a system account, a validator identity account, a voting account, and a staking account.

A system account, which simulates the owners’ wallet, is also used to transfer voting funds to the validator and withdraw rewards from the vote account.

Copied
solana-keygen new --outfile ~/system-wallet-keypair.json #(create a new key pair that identifies the system account) solana airdrop 1 ~/system-wallet-keypair.json #(adding 1 SOL to wallet, only possible in devnet) solana balance ~/system-wallet-keypair.json

A validator identity account (also known as system account), where the validator’s identity is secured, and is used to securely sign transactions, and pay voting transaction fees.

Copied
solana-keygen new --outfile ~/validator-keypair.json #(create a new key pair that identifies the validator account) solana config set --keypair ~/validator-keypair.json solana transfer --allow-unfunded-recipient \ --fee-payer ~/system-wallet-keypair.json \ --from ~/system-wallet-keypair.json ~/validator-keypair.json 0.5 #(example transfer of 0.5 SOL from system account to validator account) solana balance #(check validator account balance)

A voting account is used for voting and receiving validator rewards.

Copied
solana-keygen new --outfile ~/vote-account-keypair.json solana create-vote-account \ ~/vote-account-keypair.json ~/validator-keypair.json ~/system-wallet-keypair.json #(associates system account to voting account)

A staking account is used to delegate tokens to validators on the network to potentially earn rewards for the owner of the stake account. Staking accounts are created and managed differently than system accounts.

Copied
solana-keygen new -o stake-account.json solana create-stake-account --from ~/system-wallet-keypair.json stake-account.json 0.5 (#Create a new staking account and transfer 0.5 SOL from system account)

Running your own node gives you more control over the resources that your hardware provides and often can be more economical than relying on a third party vendor. However, most RPC node providers have more updated hardware and higher bandwidth networking which reduces the need to maintain and update hardware on your own. 

Once you have the Solana node set up, participating in the network requires you to just start your node and keep your computer running.

You can start the validator node by running the following command:

Copied
#!/bin/bash exec solana-validator \ --entrypoint entrypoint.devnet.solana.com:8001 \ --entrypoint entrypoint2.devnet.solana.com:8001 \ --entrypoint entrypoint3.devnet.solana.com:8001 \ --entrypoint entrypoint4.devnet.solana.com:8001 \ --entrypoint entrypoint5.devnet.solana.com:8001 \ --known-validator dv1ZAGvdsz5hHLwWXsVnM94hWf1pjbKVau1QVkaMJ92 \ --known-validator dv2eQHeP4RFrJZ6UeiZWoc3XTtmtZCUKxxCApCDcRNV \ --known-validator dv4ACNkpYPcE3aKmYDqZm9G5EB3J4MRoeE7WNDRBVJB \ --known-validator dv3qDFk1DTF36Z62bNvrCXe9sKATA6xvVy6A798xxAS \ --expected-genesis-hash EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG \ --dynamic-port-range 8000-8020 \ --rpc-port 8899 \ --only-known-rpc \ --wal-recovery-mode skip_any_corrupted_record \ --identity ~/validator-keypair.json \ --vote-account ~/vote-account-keypair.json \ --log ~/log/validator.log \ --accounts /mnt/accounts \ --ledger /mnt/ledger \ --limit-ledger-size

You can also start an RPC node by running the following command:

Copied
#!/bin/bash exec solana-validator \ --identity ~/validator-keypair.json \ --known-validator 5D1fNXzvv5NjV1ysLjirC4WY92RNsVH18vjmcszZd8on \ --known-validator dDzy5SR3AXdYWVqbDEkVFdvSPCtS9ihF5kJkHCtXoFs \ --known-validator eoKpUABi59aT4rR9HGS3LcMecfut9x7zJyodWWP43YQ \ --known-validator 7XSY3MrYnK8vq693Rju17bbPkCN3Z7KvvfvJx4kdrsSY \ --known-validator Ft5fbkqNa76vnsjYNwjDZUXoTWpP7VYm3mtsaQckQADN \ --known-validator 9QxCLckBiJc783jnMvXZubK4wH86Eqqvashtrwvcsgkv \ --only-known-rpc \ --full-rpc-api \ --no-voting \ --ledger /mnt/ledger \ --accounts /mnt/accounts \ --log ~/log/solana-rpc.log \ --rpc-port 8899 \ --rpc-bind-address 0.0.0.0 \ --private-rpc \ --dynamic-port-range 8000-8020 \ --entrypoint entrypoint.testnet.solana.com:8001 \ --entrypoint entrypoint2.testnet.solana.com:8001 \ --entrypoint entrypoint3.testnet.solana.com:8001 \ --expected-genesis-hash 4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY \ --wal-recovery-mode skip_any_corrupted_record \ --limit-ledger-size

Notice the following options from the command above:

  • --no-voting: runs the validator as an RPC node without participating in consensus. 

  • ---private-rpc: does not publish the validator's open RPC port in the Solana gossip command

This article has explained what a Solana node provider is and how you can run a node on Solana. The following resources are available to deepen your understanding of Solana nodes:

  • https://docs.solana.com/running-validator

  • https://solana.com/validators

  • https://docs.solana.com/developing/test-validator

  • https://docs.solana.com/running-validator/vote-accounts

  • https://docs.solana.com/running-validator/validator-reqs

If you want to start building on the Solana blockchain without having to manage your own node infrastructure, sign up for a free Solana node account, the quickest and easiest way to get started.

Overview cards background graphic
Section background image

Build blockchain magic

Alchemy combines the most powerful web3 developer products and tools with resources, community and legendary support.

Get your API key