I'm in a project where we need to fetch various account data and other information from the network. We expect that doing this over RPC is going to be a bottleneck eventually. I'd like to just have the blockchain data locally and read it directly, and it seems the most straightforward way to do this is to just run an RPC node, if I'm not mistaken. However, I'd like to do this without paying the exorbitant hardware requirements. Is there anything that could be done to the node to cut down on the requirements? All I need is to be able to access the current account data on the disk from a different process, and possibly add some hooks to send notifications over IPC when an account is modified.
2 Answers
Nowadays it doesn't make sense to rely on websockets or run your own validators with Geyser.
We're witnessing an advent of geyser-as-a-service type of services.
Pick your free API key at Helius or Shyft and you're good to go! Make sure to check out their docs on how to use webhooks/callbacks to get notified for account updates.
Helius: https://dev.helius.xyz/dashboard/app
Shyft: https://shyft.to/get-api-key
@jon-c answered correctly at the time of making his comment, things have changed for the better now đź‘Ź
There's no way to cut down on hardware requirements for the node, but there are many services that rent nodes out if you need.
In the longterm, the best option is to use a Geyser plugin, but the ecosystem is still in the process of adopting this. Node providers need to create a separate service to funnel network data into a database, then expose some API to access that data.
More information about Geyser plugins at https://docs.solana.com/developing/plugins/geyser-plugins