Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set up erigon diagnostics tool #3

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sudo chown 100:1000 <ERIGON_DATA_DIR>
## Launch L1 node

```
docker compose up -d
docker compose up -d erigon prysm
```

To check logs:
Expand Down Expand Up @@ -70,3 +70,35 @@ curl -H "Content-Type: application/json" http://127.0.0.1:3500/eth/v1/beacon/hea
```

To convert hex number in the result to decimal, we can do `printf "%d\n" 0x<xxx>`

## Set up diagnostics

First you need to build the diagnostics image:

```
git clone https://github.com/erigontech/diagnostics.git
cd diagnostics

# Note: https://github.com/erigontech/diagnostics/pull/99 is needed to fix the build
make build-docker
```

Then start the diagnostics container:

```
docker compose up -d erigon-diagnostics
```

Now you can see the diagnostics page at `http://<your-server-ip>:8080`

Follow the instructions [here](https://erigon.gitbook.io/erigon/diagnostic-tool/setup#id-3.-create-a-new-session-in-the-diagnostic-tool) to create a new session and copy the session pin

Then set `DIAGNOSTICS_SESSION` in `.env`

Now start the erigon-support container to connect the diagnostics session to the erigon node:

```
docker compose up -d erigon-support
```

Once the diagnostics tool is successfully connected to the Erigon node, return to your web browser and reload the page.
1 change: 1 addition & 0 deletions sepolia/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ERIGON_DATA_DIR=/mnt/volume_sgp1_01/erigon/data
PRYSM_DATA_DIR=/mnt/volume_sgp1_01/prysm/data
DIAGNOSTICS_SESSION=
23 changes: 23 additions & 0 deletions sepolia/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,35 @@ services:
- "8546:8546"
- "8551:8551"
- "30303:30303"
- "6060:6060"
volumes:
- ${ERIGON_DATA_DIR}:/home/erigon/.local/share/erigon
restart: unless-stopped
configs:
- jwt.hex

erigon-support:
image: erigontech/erigon:v2.60.10
container_name: erigon-support-sepolia
command: |
support --debug.addrs erigon:6060
--diagnostics.addr erigon-diagnostics:8080
--diagnostics.sessions ${DIAGNOSTICS_SESSION}
--insecure
depends_on:
- "erigon"
- "erigon-diagnostics"
restart: unless-stopped

erigon-diagnostics:
image: diagnostics
container_name: erigon-diagnostics-sepolia
command: |
/diagnostics --addr="0.0.0.0"
ports:
- "8080:8080"
restart: unless-stopped

prysm:
image: gcr.io/prysmaticlabs/prysm/beacon-chain:v5.1.2
container_name: prysm-sepolia
Expand Down