diff --git a/run/common/nix/run.sh b/run/common/nix/run.sh index 8726e74bb7b..753fe496d19 100755 --- a/run/common/nix/run.sh +++ b/run/common/nix/run.sh @@ -55,7 +55,6 @@ NODE_SOCKET_PATH=${NODE_SOCKET_DIR}/${NODE_SOCKET_NAME} LOCAL_NODE_CONFIGS=./configs NODE_CONFIGS=${NODE_CONFIGS:=$LOCAL_NODE_CONFIGS} - # Define the node logs file LOCAL_NODE_LOGS_FILE=./node.log NODE_LOGS_FILE="${NODE_LOGS_FILE:=$LOCAL_NODE_LOGS_FILE}" @@ -78,34 +77,33 @@ cleanup() { mithril() { # shellcheck disable=SC2048 # shellcheck disable=SC2086 - nix shell "github:input-output-hk/mithril?ref=2445.0" -c $* + nix shell "github:input-output-hk/mithril?ref=2450.0" -c $* } # Trap the cleanup function on exit trap cleanup ERR INT EXIT if [[ -z ${NO_NODE-} ]]; then - if [[ -n "${USE_MITHRIL-}" ]]; - then - if [ "$NETWORK" != "mainnet" ]; then - echo "Error: This option is only available for the mainnet network" - exit 1 - fi - echo "Starting the mithril service..." - rm -rf "${NODE_DB:?}"/* - export AGGREGATOR_ENDPOINT - export GENESIS_VERIFICATION_KEY - mithril echo "mithril is available" || exit 44 - digest=$(mithril mithril-client cdb snapshot list --json | jq -r .[0].digest) - (cd "${NODE_DB}" && mithril mithril-client cdb download "$digest") - (cd "${NODE_DB}" && mv db/* . && rmdir db) + if [[ -n "${USE_MITHRIL-}" ]]; then + if [ "$NETWORK" != "mainnet" ]; then + echo "Error: This option is only available for the mainnet network" + exit 1 + fi + echo "Starting the mithril service..." + rm -rf "${NODE_DB:?}"/* + export AGGREGATOR_ENDPOINT + export GENESIS_VERIFICATION_KEY + mithril echo "mithril is available" || exit 44 + digest=$(mithril mithril-client cdb snapshot list --json | jq -r .[0].digest) + (cd "${NODE_DB}" && mithril mithril-client cdb download "$digest") + (cd "${NODE_DB}" && mv db/* . && rmdir db) fi # Start the node with logs redirected to a file if NODE_LOGS_FILE is set # shellcheck disable=SC2086 cardano-node run \ --topology "${NODE_CONFIGS}"/topology.json \ - --database-path "${NODE_DB}"\ + --database-path "${NODE_DB}" \ --socket-path "${NODE_SOCKET_PATH}" \ --config "${NODE_CONFIGS}"/config.json \ +RTS -N -A16m -qg -qb -RTS 1>$NODE_LOGS_FILE 2>$NODE_LOGS_FILE & @@ -115,13 +113,10 @@ if [[ -z ${NO_NODE-} ]]; then sleep 10 - - else echo "Skipping node service..." fi - if [[ -z ${NO_WALLET-} ]]; then echo "Starting the wallet service..." @@ -147,7 +142,7 @@ if [[ -z ${NO_WALLET-} ]]; then --database "${WALLET_DB}" \ --node-socket "${NODE_SOCKET_PATH}" \ --mainnet \ - --listen-address 0.0.0.0 >$WALLET_LOGS_FILE 2>&1 & + --listen-address 0.0.0.0 >$WALLET_LOGS_FILE 2>&1 & WALLET_ID=$! else # shellcheck disable=SC2086 @@ -173,7 +168,6 @@ else echo "Skipping wallet service..." fi - # Case statement to handle different command-line arguments case "$1" in sync) diff --git a/run/mainnet/docker/docker-compose.yml b/run/mainnet/docker/docker-compose.yml index b703d51f34d..3262390d1b8 100644 --- a/run/mainnet/docker/docker-compose.yml +++ b/run/mainnet/docker/docker-compose.yml @@ -49,7 +49,7 @@ services: mithril: env_file: - .env - image: ghcr.io/input-output-hk/mithril-client:test-csd-44dc188 + image: ghcr.io/input-output-hk/mithril-client:2450.0-c6c7eba user: ${USER_ID}:${GROUP_ID} volumes: - ${NODE_DB}:/app/db diff --git a/scripts/buildkite/admin/refresh-preprod-snapshot.sh b/scripts/buildkite/admin/refresh-preprod-snapshot.sh index ed20e5eb3aa..11f5f4b215c 100755 --- a/scripts/buildkite/admin/refresh-preprod-snapshot.sh +++ b/scripts/buildkite/admin/refresh-preprod-snapshot.sh @@ -12,7 +12,7 @@ export GENESIS_VERIFICATION_KEY=5b3132372c37332c3132342c3136312c362c3133372c3133 mithril() { # shellcheck disable=SC2048 # shellcheck disable=SC2086 - nix shell "github:input-output-hk/mithril?ref=2445.0" -c $* + nix shell "github:input-output-hk/mithril?ref=2450.0" -c $* } mithril echo "mithril is available" || exit 44