Skip to content

Commit

Permalink
move genesis bin creation and link to init.sh
Browse files Browse the repository at this point in the history
This is to tolerate .zetacored being mounted on a volume
  • Loading branch information
gartnera committed Aug 30, 2024
1 parent 495ffcd commit a514299
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
8 changes: 8 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit a514299

Please sign in to comment.