Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
feat: use chain specific sub dir for prysm and erigon data
Browse files Browse the repository at this point in the history
Will allow us to run against multiple chains without losing any data.
  • Loading branch information
brianmcgee committed Sep 1, 2022
1 parent ffc3ec6 commit 7bfe578
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
18 changes: 12 additions & 6 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,24 @@ HOST_UID=$(id -u)
HOST_GID=$(id -g)
export HOST_UID HOST_GID

# Used by geth setup in docker-compose
export GETH_NETWORK_ID=1214
export GETH_ACCOUNT_PASSWORD=!Pa55word

# used by docker-compose to define data paths
export DOCKER_CONFIGS=${PRJ_ROOT}/docker/configs
export DOCKER_LOCAL_DATA=${PRJ_ROOT}/.local/docker/data

export PRYSM_CHECKPOINT=${DOCKER_CONFIGS}/prysm/checkpoints
export PRYSM_DATA=${DOCKER_LOCAL_DATA}/prysm
# used by geth setup in docker-compose
export GETH_NETWORK_ID=1214
export GETH_ACCOUNT_PASSWORD=!Pa55word

# erigon
export ERIGON_DATA=${DOCKER_LOCAL_DATA}/erigon

# prysm
export PRYSM_CHECKPOINT=${DOCKER_CONFIGS}/prysm/checkpoints
export PRYSM_DATA=${DOCKER_LOCAL_DATA}/prysm

# allow local .envrc overrides
[[ -f .envrc.local ]] && source_env .envrc.local

# ensure local data directories exist
mkdir -p ${PRYSM_DATA}
mkdir -p ${ERIGON_DATA}
10 changes: 4 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ services:
image: gcr.io/prysmaticlabs/prysm/beacon-chain:v3.0.0
restart: unless-stopped
user: "${HOST_UID}:${HOST_GID}"
command: --datadir=/data
command: --datadir=/data/sepolia
--rpc-host=0.0.0.0
--monitoring-host=0.0.0.0
--execution-endpoint=http://erigon:8551
--sepolia
--jwt-secret=/erigon-data/jwt.hex
--jwt-secret=/erigon-data/sepolia/jwt.hex
--accept-terms-of-use
--genesis-state=/genesis.ssz
--grpc-gateway-host="0.0.0.0"
Expand Down Expand Up @@ -54,9 +54,9 @@ services:
user: "${HOST_UID}:${HOST_GID}"
command: erigon
--chain=sepolia
--datadir=/erigon-data
--datadir=/erigon-data/sepolia
--torrent.download.slots=7
--http.api="eth,net,erigon,ots"
--http.api="eth,web3,net,erigon,ots"
--ws
--http.corsdomain="*"
--http.addr="0.0.0.0"
Expand Down Expand Up @@ -89,7 +89,6 @@ services:
- "erigon"

nats:
container_name: nats
build:
context: docker/images/nats
ports:
Expand All @@ -100,7 +99,6 @@ services:
- tethys

proxy:
container_name: proxy
image: 41north/tethys-proxy:dev
restart: unless-stopped
depends_on:
Expand Down

0 comments on commit 7bfe578

Please sign in to comment.