Run Reth+Prometheus+Grafana locally via docker-compose
  • Dockerfile 74.6%
  • Shell 25.4%
Find a file
Loren Siebert 35877b059c
Merge pull request #4 from da-bao-jian/main
updated rust version to 1.70
History 2023-06-16 10:30:45 -07:00
grafana/provisioning update grafana dashboard 2023-03-13 17:21:26 +01:00
prometheus aye she's workin 2023-01-12 16:24:31 -08:00
reth updated rust version to 1.70 2023-06-15 14:06:21 -04:00
dashboard-screenshot.png Updated screenshot 2023-03-20 14:17:14 -07:00
docker-compose.yml aye she's workin 2023-01-12 16:24:31 -08:00
README.md updated readme 2023-01-12 16:32:10 -08:00
watch.sh Initial commit 2023-01-12 09:09:02 -08:00

Reth Quick Start

Run the latest Reth node locally and monitor it with a Prometheus-powered Grafana dashboard.

Starting up

  1. Install Docker and Docker Compose
  2. Clone this repository git clone git@github.com:loren/local_reth.git
  3. cd local_reth
  4. Run docker-compose up -d
  5. Verify the node has started up by running docker-compose logs -f reth
  6. Run ./watch.sh to see the stats that Prometheus is collecting
  7. Open "http://localhost:3000" in your browser and log into Grafana w/ user: "admin", pass: "admin" to view the "reth" dashboard

What's happening

By default, the docker-compose.yml file will run a Reth node that will sync up to Ethereum block 5,000,000. This is a good place to start if you want to test out Reth and don't want to wait for the full sync. You can override this by setting the RETH_TIP environment variable to a different block number hash.

The docker-compose.yml file also spins up a Prometheus server and a Grafana server. The Prometheus server will scrape the Reth node and the Grafana server will display the metrics in a dashboard.

dashboard

Interacting with the data

Once the Reth node has had a chance to sync up, you can interact with the data in the Reth node by using the db subcommand.

Logging into the Reth node

docker exec -it local_reth-reth-1 bash

Listing the tables

reth/target/release/reth db stats

Viewing some records

reth/target/release/reth db list --start=1 --len=2 Headers

Shutting down

  1. Run docker-compose down

The volumes will persist across restarts, so you can start and stop the node as needed.


Acknowledgements

The Reth repo / binary in use here is maintained at https://github.com/paradigmxyz/reth

The Prometheus + Grafana docker-compose stack is taken from https://github.com/vegasbrianc/prometheus