From a5142993cfd85b7a3a7e417ca9ac98e656834194 Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Fri, 30 Aug 2024 10:27:07 -0700 Subject: [PATCH] move genesis bin creation and link to init.sh This is to tolerate .zetacored being mounted on a volume --- Dockerfile | 3 --- init.sh | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index da796c9..52e3ae0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,6 @@ RUN go install github.com/zeta-chain/dl-pipe/cmd/dl-pipe@latest FROM debian:bookworm AS base -RUN mkdir -p /root/.zetacored/cosmovisor/genesis/bin && \ - ln -s /root/.zetacored/cosmovisor/genesis /root/.zetacored/cosmovisor/current - ENV PATH=/root/.zetacored/cosmovisor/current/bin/:${PATH} RUN apt update && \ diff --git a/init.sh b/init.sh index 4527b33..40fb5bd 100755 --- a/init.sh +++ b/init.sh @@ -66,6 +66,14 @@ download_configs() { install_genesis_zetacored() { echo "Installing genesis zetacored" + + # create the genesis bin path and symlink it to the current path + genesis_path=".zetacored/cosmovisor/genesis" + mkdir -p "$genesis_path" + mkdir -p "${genesis_path}/bin" + current_path=".zetacored/cosmovisor/current" + ln -s "${HOME}/${genesis_path}" "${HOME}/${current_path}" + if [[ -z $ZETACORED_BINARY_URL ]]; then max_height=$($CURL "${ZETACHAIN_SNAPSHOT_METADATA_URL}" | jq -r '.snapshots[0].height') echo "Getting latest passed upgrade plan before ${max_height}"