Skip to content
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
16 changes: 16 additions & 0 deletions caplin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
13 changes: 0 additions & 13 deletions erigon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 7 additions & 9 deletions ethd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion grandine-allin1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ services:
- metrics.network=${NETWORK}
- logs.collect=true

wipe-db:
wipe-cl-db:
profiles: ["tools"]
restart: "no"
image: alpine:3
Expand Down
13 changes: 0 additions & 13 deletions grandine-cl-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion grandine-plugin-allin1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion grandine-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion nimbus-allin1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ services:
- metrics.network=${NETWORK}
- logs.collect=true

wipe-db:
wipe-cl-db:
profiles: ["tools"]
restart: "no"
image: alpine:3
Expand Down
2 changes: 1 addition & 1 deletion teku-allin1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ services:
- metrics.network=${NETWORK}
- logs.collect=true

wipe-db:
wipe-cl-db:
profiles: ["tools"]
restart: "no"
image: alpine:3
Expand Down
Loading