Quick start

Introducing eRPC

eRPC is a fault-tolerant EVM RPC proxy and permanent caching solution. It is built with read-heavy use-cases in mind such as data indexing and high-load frontend usage.


End User
If data is already cached
5 RPS
500 RPS
0 RPS
eRPC
RPC
Request
Indexers
Services
k8s, docker, etc
Storage
Weak
Upstream
A
Strong
Upstream
B
Offline
Upstream
C
Monthly, daily rate-limits
Archive/Full node auto-routing
Auto-split+batch for getLogs limits

Quick start

Create configuration

Create your erpc.yaml configuration file based on the erpc.yaml.dist file:

cp erpc.yaml.dist erpc.yaml
code erpc.yaml

See a complete config example for inspiration.

Run with Docker

Use the Docker image:

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

Test the setup

Send your first request:

curl --location 'http://localhost:4000/main/evm/42161' \
--header 'Content-Type: application/json' \
--data '{
    "method": "eth_getBlockByNumber",
    "params": [
        "0x1203319",
        false
    ],
    "id": 9199,
    "jsonrpc": "2.0"
}'

Setup monitoring (optional)

Bring up monitoring stack (Prometheus, Grafana) using docker-compose:

# clone the repo if you haven't
git clone https://github.com/erpc/erpc.git
cd erpc
 
# bring up the monitoring stack
docker-compose up -d

Access Grafana

Open Grafana at http://localhost:3000 (opens in a new tab) and login with the following credentials:

  • username: admin
  • password: admin

Monitor metrics

Send more requests and watch the metrics being collected and visualized in Grafana.

eRPC Grafana Dashboard