1

It seems Solana has some default RPC endpoints such as https://api.mainnet-beta.solana.com. There are also specialized (mostly paid) RPC nodes out there, such as QuickNode.

In that case, the RPC endpoint is a computer that is different (and most likely in a different location) than the validator(s).

My question is: Is each and every validator required to act as an RPC endpoint in itself? Or at least have an "associated" RPC endpoint?

Put it another way: Do I have guarantee that each validator will accept my RPC requests DIRECTLY, without requiring me to go through a SEPARATE RPC endpoint that is separate from the validator?

3 Answers 3

5

Most validator operators either totally disable or strictly firewall off the RPC service as a security measure. It is not considered sufficiently hardened to expose to the open internet when stake is at risk.

1
  • Good to know - very helpful. That's what I suspected. Just wondering how things like censorship resistance can be maintained when accepting requests is delegated to separate RPC nodes that are not part of the consensus mechanism. But I posted that as a separate question. Commented Jul 27, 2022 at 6:25
1

An RPC endpoint is an access point to the Solana blockchain. A bit like a wifi access point gives you access to the internet.

Is each and every validator required to act as an ROC endpoint in itself?

A node operator can choose to run its node as vote-only, RPC-only, or both simultaneously. This can be configured in the Solana runtime.

If so, can I just pick a "favorite" validator and send all my RPC traffic there?

You not only "can", but "need" to select an RPC endpoint, or it would be akin to want to access a wifi network without providing its SSID. What might have confused you is that most Dapps hide this choice away from you by setting a default RPC for their app to work. Some give you a set of RPCs you can use, some let you input an arbitrary one (generally developer-oriented, like Solana and SolanaFM explorers for instance).

As a side note, the https://api.mainnet-beta.solana.com/ endpoint is a default endpoint yes, and the distinction to make between these and a paid one comes to rate-limiting. The public, free ones (there are others, from GenesysGo or Serum for instance) will typically severely limit your requests/second, while paid ones will allow you higher or unbounded rates. Selecting a free endpoint or subscribing to a paid one ultimately depends on what you are doing, the expected usage, and robustness required.

3
  • My question is not about what an RPC endpoint is. It is about whether each validator must also offer its own RPC service (on the same hardware). It is usually separated: E.g. my RPC endpoint can be a QuickNode node, and QuickNode will forward the requests to a validator: Validator and RPC endpoint are two different computers in different locations. My question is: Does EVERY validator need have its own RPC endpoint that I can use to access the VALIDATOR directly, without going through a SEPARATE RPC endpoint? Commented Jul 27, 2022 at 5:46
  • Now I see you wrote ...choose to run its node vote-only.... So that means validators can choose to not accept RPC requests? Commented Jul 27, 2022 at 5:56
  • Yes. Your original question was phrased in a way that communicated confusing knowledge of what a RPC endpoint is, so I chose to give some background on top of the straightforward answer to your question. Edit is much better, and trent's details are useful, though.
    – man0s
    Commented Jul 27, 2022 at 8:55
0

RPC is the first layer of the transaction. Once you send a transaction through Solana wallet, that request goes to an RPC server. RPC servers check the incoming request, if it is a valid Solana transaction then it forwards it to the validators. Think about RPC servers like load balancers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.