From eecd634d9abab69c3efa133d8897c342b210d34a Mon Sep 17 00:00:00 2001 From: bap2pecs Date: Sun, 1 Dec 2024 11:35:57 +0800 Subject: [PATCH 1/5] init --- sepolia/docker-compose.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sepolia/docker-compose.yml b/sepolia/docker-compose.yml index 7a2f302..eaa0411 100644 --- a/sepolia/docker-compose.yml +++ b/sepolia/docker-compose.yml @@ -21,6 +21,19 @@ services: configs: - jwt.hex + # TODO: + # - add the diagnostics container + # - replace hardcoded IP address and session pin + erigon-support: + image: erigontech/erigon:v2.60.10 + container_name: erigon-support-sepolia + command: | + support --debug.addrs localhost:6060 + --diagnostics.addr 152.42.185.70:8080 + --diagnostics.sessions 91128582 + --insecure + restart: unless-stopped + prysm: image: gcr.io/prysmaticlabs/prysm/beacon-chain:v5.1.2 container_name: prysm-sepolia From 748a61bcf60b353c6183ff5dda8416459bc06ee2 Mon Sep 17 00:00:00 2001 From: bap2pecs Date: Sun, 1 Dec 2024 14:56:18 +0800 Subject: [PATCH 2/5] add erigon-diagnostics container --- sepolia/.env.example | 1 + sepolia/docker-compose.yml | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/sepolia/.env.example b/sepolia/.env.example index 475a945..ebac34f 100644 --- a/sepolia/.env.example +++ b/sepolia/.env.example @@ -1,2 +1,3 @@ ERIGON_DATA_DIR=/mnt/volume_sgp1_01/erigon/data PRYSM_DATA_DIR=/mnt/volume_sgp1_01/prysm/data +DIAGNOSTICS_SESSION= diff --git a/sepolia/docker-compose.yml b/sepolia/docker-compose.yml index eaa0411..172bdef 100644 --- a/sepolia/docker-compose.yml +++ b/sepolia/docker-compose.yml @@ -15,25 +15,32 @@ services: - "8546:8546" - "8551:8551" - "30303:30303" + - "6060:6060" volumes: - ${ERIGON_DATA_DIR}:/home/erigon/.local/share/erigon restart: unless-stopped configs: - jwt.hex - # TODO: - # - add the diagnostics container - # - replace hardcoded IP address and session pin erigon-support: image: erigontech/erigon:v2.60.10 container_name: erigon-support-sepolia command: | - support --debug.addrs localhost:6060 - --diagnostics.addr 152.42.185.70:8080 - --diagnostics.sessions 91128582 + support --debug.addrs erigon:6060 + --diagnostics.addr erigon-diagnostics:8080 + --diagnostics.sessions ${DIAGNOSTICS_SESSION} --insecure restart: unless-stopped + erigon-diagnostics: + image: diagnostics + container_name: erigon-diagnostics-sepolia + command: | + /diagnostics --addr 0.0.0.0:8080 + ports: + - "8080:8080" + restart: unless-stopped + prysm: image: gcr.io/prysmaticlabs/prysm/beacon-chain:v5.1.2 container_name: prysm-sepolia From 99f2cbc47db568ec124e778b68a79cea53a8b5d6 Mon Sep 17 00:00:00 2001 From: bap2pecs Date: Sun, 1 Dec 2024 14:58:35 +0800 Subject: [PATCH 3/5] add deps --- sepolia/docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sepolia/docker-compose.yml b/sepolia/docker-compose.yml index 172bdef..82e0e2c 100644 --- a/sepolia/docker-compose.yml +++ b/sepolia/docker-compose.yml @@ -30,6 +30,9 @@ services: --diagnostics.addr erigon-diagnostics:8080 --diagnostics.sessions ${DIAGNOSTICS_SESSION} --insecure + depends_on: + - "erigon" + - "erigon-diagnostics" restart: unless-stopped erigon-diagnostics: From dc6624f3b7c2dd4e667e7b1cebd0baea3a3be748 Mon Sep 17 00:00:00 2001 From: bap2pecs Date: Sun, 1 Dec 2024 15:16:45 +0800 Subject: [PATCH 4/5] fix --- sepolia/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sepolia/docker-compose.yml b/sepolia/docker-compose.yml index 82e0e2c..4abb4f3 100644 --- a/sepolia/docker-compose.yml +++ b/sepolia/docker-compose.yml @@ -39,7 +39,7 @@ services: image: diagnostics container_name: erigon-diagnostics-sepolia command: | - /diagnostics --addr 0.0.0.0:8080 + /diagnostics --addr="0.0.0.0" ports: - "8080:8080" restart: unless-stopped From 8c26fe2f8eb8f4cadecc2297a0e158847c8dc03d Mon Sep 17 00:00:00 2001 From: bap2pecs Date: Sun, 1 Dec 2024 15:27:07 +0800 Subject: [PATCH 5/5] add instructions --- README.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 354b40f..747325c 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ sudo chown 100:1000 ## Launch L1 node ``` -docker compose up -d +docker compose up -d erigon prysm ``` To check logs: @@ -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` + +## 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://: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.