Ir al contenido principal
Time to read: 1 min
Para el índice completo de documentación, consulte llms.txt

eRPC

eRPC is an open-source, self-hosted RPC proxy. It is not a node provider: it sits in front of the providers in this section, retries a failed request on the next upstream, and caches responses.

Why use eRPC?​

  • Failover: If one provider fails or rate-limits, the request goes to the next one.
  • Caching: Repeated reads for finalized blocks are served from cache.
  • One endpoint: Your app uses one URL for all providers.

Getting Started​

Create erpc.yaml

List the public Rootstock node and any provider endpoints you have:

projects:
- id: main
upstreams:
- endpoint: https://rpc.mainnet.rootstock.io/<your-apikey>
- endpoint: https://go.getblock.io/<ACCESS_TOKEN>

Run eRPC

docker run -v $(pwd)/erpc.yaml:/erpc.yaml -p 4000:4000 ghcr.io/erpc/erpc:latest

Send a request

curl -X POST http://localhost:4000/main/evm/30 \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

See the eRPC documentation for retry, rate-limit and cache settings.

Última actualización en por Kasra Khosravi