From b7ccf24c93e023a1b01decb3ee5afc0ecd123ad1 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Wed, 5 Jun 2024 16:19:07 +0530 Subject: [PATCH] Read snapshot file paths --- stack-orchestrator/config/bsc-node/docker-entrypoint.sh | 2 +- stack-orchestrator/stacks/bsc-node/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stack-orchestrator/config/bsc-node/docker-entrypoint.sh b/stack-orchestrator/config/bsc-node/docker-entrypoint.sh index b97073c..09d5f1d 100755 --- a/stack-orchestrator/config/bsc-node/docker-entrypoint.sh +++ b/stack-orchestrator/config/bsc-node/docker-entrypoint.sh @@ -22,7 +22,7 @@ fi # Use snapshot if provided # Take first file from the snapshot dir -snapshot_file=$((ls /var/tmp/snapshot/) 2>/dev/null | head -1) +snapshot_file=$((ls /var/tmp/snapshot/*) 2>/dev/null | head -1) geth_dir=${DATA_DIR}/geth ADDITIONAL_FLAGS="" if [ ! -d "$geth_dir" ] && [ "${CERC_USE_SNAPSHOT}" = "true" ] && [ -n "$snapshot_file" ]; then diff --git a/stack-orchestrator/stacks/bsc-node/README.md b/stack-orchestrator/stacks/bsc-node/README.md index 4c0d810..9853f6f 100644 --- a/stack-orchestrator/stacks/bsc-node/README.md +++ b/stack-orchestrator/stacks/bsc-node/README.md @@ -42,7 +42,7 @@ Instructions for running a BSC node laconic-so --stack ~/cerc/bsc-stack/stack-orchestrator/stacks/bsc-node deploy create --spec-file bsc-node-spec.yml --deployment-dir bsc-node-deployment ``` -* (Optional) Copy over the snapshot file (`*.tar.lz4`) in snapshot data directory in the deployment (`bsc-node-deployment/data/snapshot`): +* (Optional) Copy over the snapshot file (`*.tar.lz4` or `*.tar.zst`) in snapshot data directory in the deployment (`bsc-node-deployment/data/snapshot`): ```bash # Example @@ -61,7 +61,7 @@ Instructions for running a BSC node CERC_BSC_NETWORK= # Whether to sync from a snapshot (true | false) (default: false) - # Requires snapshot file with extension .tar.lz4 to be placed in the snapshot directory + # Requires snapshot file with extension .tar.lz4 or .tar.zst to be placed in the snapshot directory CERC_USE_SNAPSHOT= # Whether to run as a fast node (true | false) (default: false)