diff --git a/caplin.yml b/caplin.yml index 731cb5fa..a39c3f5c 100644 --- a/caplin.yml +++ b/caplin.yml @@ -5,3 +5,19 @@ services: # Caplin consensus P2P ports - "${HOST_IP:-}:${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/tcp" - "${HOST_IP:-}:${CL_P2P_PORT:-9000}:${CL_P2P_PORT:-9000}/udp" + + wipe-cl-db: + profiles: ["tools"] + restart: "no" + image: alpine:3 + user: "10001" + volumes: + - erigon-el-data:/var/lib/erigon + - /etc/localtime:/etc/localtime:ro + entrypoint: ["/bin/sh", "-c"] + command: + - | + rm -rf /var/lib/erigon/caplin/* + +volumes: + erigon-el-data: diff --git a/erigon.yml b/erigon.yml index 4ae8c876..6654af4e 100644 --- a/erigon.yml +++ b/erigon.yml @@ -105,19 +105,6 @@ services: - metrics.network=${NETWORK} - logs.collect=true - wipe-db: - profiles: ["tools"] - restart: "no" - image: alpine:3 - user: "10001" - volumes: - - erigon-el-data:/var/lib/erigon - - /etc/localtime:/etc/localtime:ro - entrypoint: ["/bin/sh", "-c"] - command: - - | - rm -rf /var/lib/erigon/caplin/* - volumes: erigon-el-data: jwtsecret: diff --git a/ethd b/ethd index 9a158689..8d4a455a 100755 --- a/ethd +++ b/ethd @@ -2995,21 +2995,21 @@ resync-consensus() { case "${__value}" in *lighthouse.yml*|*lighthouse-cl-only.yml*) cl_volume='lhconsensus-data'; cl_client="Lighthouse";; - *teku-allin1.yml*) cl_volume='wipe-db'; cl_client="Teku";; + *teku-allin1.yml*) cl_volume='wipe-cl-db'; cl_client="Teku";; *teku.yml*|*teku-cl-only.yml*) cl_volume='tekuconsensus-data'; cl_client="Teku";; - *nimbus-allin1.yml*) cl_volume='wipe-db'; cl_client="Nimbus";; + *nimbus-allin1.yml*) cl_volume='wipe-cl-db'; cl_client="Nimbus";; *nimbus.yml*|*nimbus-cl-only.yml*) cl_volume='nimbus-consensus-data'; cl_client="Nimbus";; *nimbus-unified.yml*) cl_volume='wipe-cl-db'; cl_client="Nimbus Unified";; *lodestar.yml*|*lodestar-cl-only.yml*) cl_volume='lsconsensus-data'; cl_client="Lodestar";; *prysm.yml*|*prysm-cl-only.yml*) cl_volume='prysmconsensus-data'; cl_client="Prysm";; - *grandine-plugin.yml*|*grandine-plugin-allin1.yml*) cl_volume='wipe-db'; cl_client="Grandine Plugin";; - *grandine-allin1.yml*) cl_volume='wipe-db'; cl_client="Grandine";; + *grandine-plugin.yml*|*grandine-plugin-allin1.yml*) cl_volume='wipe-cl-db'; cl_client="Grandine Plugin";; + *grandine-allin1.yml*) cl_volume='wipe-cl-db'; cl_client="Grandine";; *grandine.yml*|*grandine-cl-only.yml*) cl_volume='grandineconsensus-data'; cl_client="Grandine";; - *erigon.yml*) cl_volume='wipe-db'; cl_client="Caplin";; + *erigon.yml*) cl_volume='wipe-cl-db'; cl_client="Caplin";; *) echo "You do not appear to be running a consensus layer client. Nothing to do."; return;; esac - if [[ ! "${cl_volume}" =~ ^(wipe-db|wipe-cl-db)$ ]] && ! __dodocker volume ls -q \ + if [[ ! "${cl_volume}" = "wipe-cl-db" ]] && ! __dodocker volume ls -q \ | grep -qi "$(basename "$(realpath .)")[_-]${cl_volume}"; then echo "Did not find Docker volume for ${cl_client}. Nothing to do." return 0 @@ -3039,9 +3039,7 @@ resync-consensus() { else __docompose stop consensus && __docompose rm -f consensus fi - if [[ "${cl_volume}" = "wipe-db" ]]; then - __docompose run --rm wipe-db - elif [[ "${cl_volume}" = "wipe-cl-db" ]]; then + if [[ "${cl_volume}" = "wipe-cl-db" ]]; then __docompose run --rm wipe-cl-db else cl_volume="$(basename "$(realpath .)" | tr '[:upper:]' '[:lower:]')_${cl_volume}" diff --git a/grandine-allin1.yml b/grandine-allin1.yml index d94d5047..ec88a500 100644 --- a/grandine-allin1.yml +++ b/grandine-allin1.yml @@ -113,7 +113,7 @@ services: - metrics.network=${NETWORK} - logs.collect=true - wipe-db: + wipe-cl-db: profiles: ["tools"] restart: "no" image: alpine:3 diff --git a/grandine-cl-only.yml b/grandine-cl-only.yml index fad17863..d3b9fe02 100644 --- a/grandine-cl-only.yml +++ b/grandine-cl-only.yml @@ -102,19 +102,6 @@ services: - metrics.network=${NETWORK} - logs.collect=true - wipe-db: - profiles: ["tools"] - restart: "no" - image: alpine:3 - user: "10002" - volumes: - - grandineconsensus-data:/var/lib/grandine - - /etc/localtime:/etc/localtime:ro - entrypoint: ["/bin/sh", "-c"] - command: - - | - rm -rf /var/lib/grandine/${NETWORK}/beacon/* - volumes: grandineconsensus-data: jwtsecret: diff --git a/grandine-plugin-allin1.yml b/grandine-plugin-allin1.yml index e56b25dc..b1d18d17 100644 --- a/grandine-plugin-allin1.yml +++ b/grandine-plugin-allin1.yml @@ -35,7 +35,7 @@ services: # No metrics scrape at present via labels. # Create an extra scrape target for execution:8008 in prometheus/conf.d - wipe-db: + wipe-cl-db: profiles: ["tools"] restart: "no" image: alpine:3 diff --git a/grandine-plugin.yml b/grandine-plugin.yml index 9c16370a..f0f2d42f 100644 --- a/grandine-plugin.yml +++ b/grandine-plugin.yml @@ -35,7 +35,7 @@ services: # No metrics scrape at present via labels. # Create an extra scrape target for execution:8008 in prometheus/conf.d - wipe-db: + wipe-cl-db: profiles: ["tools"] restart: "no" image: alpine:3 diff --git a/nimbus-allin1.yml b/nimbus-allin1.yml index 95d5fa6b..b58783cc 100644 --- a/nimbus-allin1.yml +++ b/nimbus-allin1.yml @@ -101,7 +101,7 @@ services: - metrics.network=${NETWORK} - logs.collect=true - wipe-db: + wipe-cl-db: profiles: ["tools"] restart: "no" image: alpine:3 diff --git a/teku-allin1.yml b/teku-allin1.yml index dcbeac90..ad310bdc 100644 --- a/teku-allin1.yml +++ b/teku-allin1.yml @@ -116,7 +116,7 @@ services: - metrics.network=${NETWORK} - logs.collect=true - wipe-db: + wipe-cl-db: profiles: ["tools"] restart: "no" image: alpine:3