SOL RPC Canister

Hi everyone :waving_hand:

Summary

As announced in the Global R&D of January 2025, DFINITY is working on a Solana RPC canister that will leverage HTTPs outcalls to interact with the Solana blockchain. This canister will be managed as a service (under NNS control) and will extend the Chain Fusion capabilities of ICP. Together with the already available support for threshold EdDSA signatures, the Helium milestone will be complete.

What to expect

You can expect a similar experience in terms of features and API as offered by the EVM RPC canister for EVM chains. In particular:

  • The canister will be under NNS control, where API keys will be managed by DFINITY.
  • Developers can pay for their requests with cycles and do not need to manage API keys or JSON RPC providers.
  • No single point of failure: by default, multiple providers are queried and their responses aggregated.
  • To make it easy to use, we plan on building a client to facilitate the interaction with the SOL RPC canister and also provide various examples.

Supported RPC methods

The list of methods that we plan to support at launch is not set in stone but would currently include the following:

Remarks:

  • Do chime in :loudspeaker: if you have a use case in your dapp for a method that is not in the list. As for the EVM RPC canister, we also plan to have a generic method to forward any JSON payload so that the lack of support for some specific method at launch does not constitute a blocker.

Related projects

Special thanks :bouquet: to ic-solana which paved the way to interact with Solana via HTTPs outcalls. As far as we are aware of, the developers of that project do not intend to run it as a service. How much code will be shared between both canisters is yet to be defined, but it should not impact users of the SOL RPC canister (this is a pure implementation detail).

10 Likes

Hi everyone :waving_hand:

It’s with great pleasure that I can announce that we released today the first version of the SOL RPC canister :rocket: .

v0.1.0

  • This is a pre-release, currently deployed on a staging canister (titvo-eiaaa-aaaar-qaogq-cai) on the fiduciary subnet (pzp6e). The only difference with the upcoming production canister is that the staging canister is controlled by our team, while the production canister will be controlled by the NNS. In particular, the production canister will also be deployed on the fiduciary subnet, meaning that latency and cycles cost should remain the same.
  • It comes with examples and a Rust client library to hopefully make it as easy as possible to build right away :building_construction: . Check out the repository for more details.

Supported Methods

:information_source: A Solana RPC method is not supported? There is an endpoint (jsonRequest) to send any JSON-RPC request.

Supported Providers

  • Alchemy (Mainnet and Devnet)
  • Ankr (Mainnet and Devnet)
  • dRPC (Mainnet and Devnet). Note that this provider does not offer archive nodes for Solana.
  • Helius (Mainnet and Devnet)
  • PublicNode (only Mainnet)

Looking ahead

What’s missing for the first production release? We would like to add support for a few more methods (as listed in the first post) and maybe a few more providers but the most important part is actually your feedback :loudspeaker: . We would be very grateful for community projects to be willing to try out that first pre-release and let us know what they think :folded_hands: .

22 Likes

I remember the mention of a difficulty with Solona RPC being that the hash needed to write a transaction was difficult to get through the RPC due to response times and the 13 nodes getting different responses.

Was this issue resolved and/or what is the best way to mediate it? Is there a suggested strategy for pulling the required info and then writing a transaction when there is not a user involved(in which case I’d assume your dapp code could get this more quickly and feed it in).

Hi @skilesare ! Your questions should be answered by the README and the basic_solana example but feel free to follow-up if that’s not the case.

3 Likes

Question: Will the slot passed away already after we getSlot and then send out the transaction?

  1. There are therefore two options to send a transaction on Solana using the SOL RPC canister.
  1. Use a durable nonce instead of a blockhash.
  1. Retrieve a recent blockhash by first retrieving a recent slot with getSlot and then getting the block (which includes the blockhash) with getBlock.

Hi @0xkookoo! Could you clarify what you mean with

Will the slot passed away

?