diff --git a/scripts/cnode-helper-scripts/cnode.sh b/scripts/cnode-helper-scripts/cnode.sh index 459e41ce0..77ce671a5 100755 --- a/scripts/cnode-helper-scripts/cnode.sh +++ b/scripts/cnode-helper-scripts/cnode.sh @@ -61,6 +61,15 @@ pre_startup_sanity() { [[ $(find "${LOG_DIR}"/node*.json 2>/dev/null | wc -l) -gt 0 ]] && mv "${LOG_DIR}"/node*.json "${LOG_DIR}"/archive/ } +mithril_snapshot_download() { + [[ -z "${MITHRIL_CLIENT}" ]] && MITHRIL_CLIENT="${CNODE_HOME}"/scripts/mithril-client.sh + if [[ ! -f "${MITHRIL_CLIENT}" ]] || [[ ! -e "${MITHRIL_CLIENT}" ]]; then + echo "ERROR: Could not locate mithril-client.sh script or script is not executable. Skipping mithril snapshot download!!" + else + "${MITHRIL_CLIENT}" -d + fi +} + stop_node() { CNODE_PID=$(pgrep -fn "$(basename ${CNODEBIN}).*.--port ${CNODE_PORT}" 2>/dev/null) # env was only called in offline mode kill -2 ${CNODE_PID} 2>/dev/null @@ -131,6 +140,11 @@ if [[ "${DEPLOY_SYSTEMD}" == "Y" ]]; then fi pre_startup_sanity +# Download the latest mithril snapshot before starting node +if [[ "${MITHRIL_DOWNLOAD}" == "Y" ]]; then + mithril_snapshot_download +fi + # Run Node if [[ -f "${POOL_DIR}/${POOL_OPCERT_FILENAME}" && -f "${POOL_DIR}/${POOL_VRF_SK_FILENAME}" && -f "${POOL_DIR}/${POOL_HOTKEY_SK_FILENAME}" ]]; then exec "${CNODEBIN}" "${CPU_RUNTIME[@]}" run \ diff --git a/scripts/cnode-helper-scripts/deploy-as-systemd.sh b/scripts/cnode-helper-scripts/deploy-as-systemd.sh index 6662038a4..04b0b4335 100755 --- a/scripts/cnode-helper-scripts/deploy-as-systemd.sh +++ b/scripts/cnode-helper-scripts/deploy-as-systemd.sh @@ -43,6 +43,11 @@ if command -v mithril-signer >/dev/null 2>&1 ; then read -rsn1 yn if [[ ${yn} = [Yy]* ]]; then ./mithril-signer.sh -d + else + if [[ -f /etc/systemd/system/${vname}-mithril-signer.service ]]; then + sudo systemctl disable ${vname}-mithril-signer.service + sudo rm -f /etc/systemd/system/${vname}-mithril-signer.service + fi fi fi @@ -422,7 +427,7 @@ sudo systemctl daemon-reload [[ -f /etc/systemd/system/${vname}-cncli-validate.service ]] && sudo systemctl enable ${vname}-cncli-validate.service [[ -f /etc/systemd/system/${vname}-cncli-ptsendtip.service ]] && sudo systemctl enable ${vname}-cncli-ptsendtip.service [[ -f /etc/systemd/system/${vname}-cncli-ptsendslots.service ]] && sudo systemctl enable ${vname}-cncli-ptsendslots.service -[[ -f /etc/systemd/system/${vanem}-mithril-signer.service ]] && sudo systemctl enable ${vname}-mithril-signer.service +[[ -f /etc/systemd/system/${vname}-mithril-signer.service ]] && sudo systemctl enable ${vname}-mithril-signer.service echo diff --git a/scripts/cnode-helper-scripts/env b/scripts/cnode-helper-scripts/env index 2357f18b7..d8d52fccf 100644 --- a/scripts/cnode-helper-scripts/env +++ b/scripts/cnode-helper-scripts/env @@ -80,6 +80,8 @@ #ASSET_POLICY_ID_FILENAME="policy.id" #CIP0094_POLL_URL="https://raw.githubusercontent.com/cardano-foundation/CIP-0094-polls/main/networks/polls.json" # URL for polls to vote against +#MITHRIL_DOWNLOAD="Y" # (Y|N) Download latest Mithril snapshot + ###################################### # Do NOT modify code below # ###################################### @@ -795,6 +797,7 @@ set_default_vars() { [[ -z ${ASSET_POLICY_SCRIPT_FILENAME} ]] && ASSET_POLICY_SCRIPT_FILENAME="policy.script" [[ -z ${ASSET_POLICY_ID_FILENAME} ]] && ASSET_POLICY_ID_FILENAME="policy.id" [[ -z ${CIP0094_POLL_URL} ]] && CIP0094_POLL_URL="https://raw.githubusercontent.com/cardano-foundation/CIP-0094-polls/main/networks/polls.json" + [[ -z ${MITHRIL_DOWNLOAD} ]] && MITHRIL_DOWNLOAD="Y" FG_BLACK='\e[30m' FG_RED='\e[31m' FG_GREEN='\e[32m' diff --git a/scripts/cnode-helper-scripts/guild-deploy.sh b/scripts/cnode-helper-scripts/guild-deploy.sh index 5151e40e9..609deb86b 100755 --- a/scripts/cnode-helper-scripts/guild-deploy.sh +++ b/scripts/cnode-helper-scripts/guild-deploy.sh @@ -521,13 +521,13 @@ setup_folder() { echo -e "\nexport ${CNODE_VNAME}_HOME=${CNODE_HOME}" >> "${HOME}"/.bashrc fi - $sudo mkdir -p "${CNODE_HOME}"/files "${CNODE_HOME}"/db "${CNODE_HOME}"/guild-db "${CNODE_HOME}"/logs "${CNODE_HOME}"/scripts "${CNODE_HOME}"/scripts/archive "${CNODE_HOME}"/sockets "${CNODE_HOME}"/priv + $sudo mkdir -p "${CNODE_HOME}"/files "${CNODE_HOME}"/db "${CNODE_HOME}"/guild-db "${CNODE_HOME}"/logs "${CNODE_HOME}"/scripts "${CNODE_HOME}"/scripts/archive "${CNODE_HOME}"/sockets "${CNODE_HOME}"/priv "${CNODE_HOME}"/mithril $sudo chown -R "$U_ID":"$G_ID" "${CNODE_HOME}" 2>/dev/null if [[ ${INSTALL_MITHRIL} == 'Y' ]]; then - $sudo mkdir -p "${CNODE_HOME}"/mithril-signer/data-stores - $sudo chown -R "$U_ID":"$G_ID" "${CNODE_HOME}"/mithril-signer 2>/dev/null + $sudo mkdir -p "${CNODE_HOME}"/mithril/data-stores + $sudo chown -R "$U_ID":"$G_ID" "${CNODE_HOME}"/mithril 2>/dev/null fi } diff --git a/scripts/cnode-helper-scripts/mithril-client.sh b/scripts/cnode-helper-scripts/mithril-client.sh new file mode 100644 index 000000000..5cead8f13 --- /dev/null +++ b/scripts/cnode-helper-scripts/mithril-client.sh @@ -0,0 +1,180 @@ +#!/usr/bin/env bash +# shellcheck disable=SC2086 +#shellcheck source=/dev/null + +. "$(dirname $0)"/env offline + +###################################### +# User Variables - Change as desired # +# Common variables set in env file # +###################################### + +#MITHRILBIN="${HOME}"/.local/bin/mithril-client # Path for mithril-client binary, if not in $PATH + +###################################### +# Do NOT modify code below # +###################################### + +##################### +# Functions # +##################### + +usage() { + cat <<-EOF + + Usage: $(basename "$0") [-d] [-u] + + Cardano Mithril client wrapper script !! + -d Download latest Mithril snapshot + -u Update mithril environment file + + EOF +} + + +generate_environment_file() { + export ERA_READER_ADDRESS=https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/${RELEASE}-${NETWORK_NAME,,}/era.addr + export ERA_READER_VKEY=https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/${RELEASE}-${NETWORK_NAME,,}/era.vkey + if [[ -n "${POOL_NAME}" ]] && [[ "${POOL_NAME}" != "CHANGE_ME" ]]; then + bash -c "cat <<-'EOF' > ${CNODE_HOME}/mithril/mithril.env + KES_SECRET_KEY_PATH=${POOL_DIR}/${POOL_HOTKEY_SK_FILENAME} + OPERATIONAL_CERTIFICATE_PATH=${POOL_DIR}/${POOL_OPCERT_FILENAME} + NETWORK=${NETWORK_NAME,,} + RELEASE=${RELEASE} + AGGREGATOR_ENDPOINT=https://aggregator.${RELEASE}-${NETWORK_NAME,,}.api.mithril.network/aggregator + RUN_INTERVAL=60000 + DB_DIRECTORY=${CNODE_HOME}/db + CARDANO_NODE_SOCKET_PATH=${CARDANO_NODE_SOCKET_PATH} + CARDANO_CLI_PATH=${HOME}/.local/bin/cardano-cli + DATA_STORES_DIRECTORY=${CNODE_HOME}/mithril/data-stores + STORE_RETENTION_LIMITS=5 + ERA_READER_ADAPTER_TYPE=cardano-chain + ERA_READER_ADAPTER_PARAMS=$(jq -nc --arg address "$(wget -q -O - "${ERA_READER_ADDRESS}")" --arg verification_key "$(wget -q -O - "${ERA_READER_VKEY}")" '{"address": $address, "verification_key": $verification_key}') + GENESIS_VERIFICATION_KEY=$(wget -q -O - https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/${RELEASE}-${NETWORK_NAME,,}/genesis.vkey) + PARTY_ID=$(cat ${POOL_DIR}/${POOL_ID_FILENAME}) + SNAPSHOT_DIGEST=latest + EOF" + else + bash -c "cat <<-'EOF' > ${CNODE_HOME}/mithril/mithril.env + NETWORK=${NETWORK_NAME,,} + RELEASE=${RELEASE} + AGGREGATOR_ENDPOINT=https://aggregator.${RELEASE}-${NETWORK_NAME,,}.api.mithril.network/aggregator + DB_DIRECTORY=${CNODE_HOME}/db + GENESIS_VERIFICATION_KEY=$(wget -q -O - https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/${RELEASE}-${NETWORK_NAME,,}/genesis.vkey) + SNAPSHOT_DIGEST=latest + EOF" + fi + chown $USER:$USER "${CNODE_HOME}"/mithril/mithril.env +} + + +pre_startup_sanity() { + REQUIRED_PARAMETERS="Y" + if [[ ! -f "${CNODE_HOME}"/mithril/mithril.env ]]; then + echo "INFO: Mithril environment file not found, creating environment file.." + generate_environment_file && echo "INFO: Mithril environment file created successfully!!" + elif [[ "${UPDATE_ENVIRONMENT}" == "Y" ]]; then + echo "INFO: Updating mithril environment file.." + generate_environment_file && echo "INFO: Mithril environment file updated successfully!!" + fi + . "${CNODE_HOME}"/mithril/mithril.env + [[ -z "${NETWORK}" ]] && echo "ERROR: The NETWORK must be set before calling mithril-client!!" && REQUIRED_PARAMETERS="N" + [[ -z "${RELEASE}" ]] && echo "ERROR: Failed to set RELEASE variable, please check NETWORK variable in env file!!" && REQUIRED_PARAMETERS="N" + [[ -z "${CNODE_HOME}" ]] && echo "ERROR: The CNODE_HOME must be set before calling mithril-client!!" && REQUIRED_PARAMETERS="N" + [[ ! -d "${CNODE_HOME}" ]] && echo "ERROR: The CNODE_HOME directory does not exist, please check CNODE_HOME variable in env file!!" && REQUIRED_PARAMETERS="N" + [[ -z "${AGGREGATOR_ENDPOINT}" ]] && echo "ERROR: The AGGREGATOR_ENDPOINT must be set before calling mithril-client!!" && REQUIRED_PARAMETERS="N" + [[ -z "${GENESIS_VERIFICATION_KEY}" ]] && echo "ERROR: The GENESIS_VERIFICATION_KEY must be set before calling mithril-client!!" && REQUIRED_PARAMETERS="N" + [[ ! -x "${MITHRILBIN}" ]] && echo "ERROR: The MITHRILBIN variable does not contain an executable file, please check MITHRILBIN variable in env file!!" && REQUIRED_PARAMETERS="N" + [[ "${REQUIRED_PARAMETERS}" != "Y" ]] && exit 1 + export GENESIS_VERIFICATION_KEY + DOWNLOAD_SNAPSHOT="N" + REMOVE_DB_DIR="N" +} + +set_defaults() { + [[ -z "${MITHRILBIN}" ]] && MITHRILBIN="${HOME}"/.local/bin/mithril-client + if [[ -z "${NETWORK_NAME}" ]]; then + echo "ERROR: The NETWORK_NAME must be set before mithril-client can download snapshots!!" + exit 1 + else + case "${NETWORK_NAME,,}" in + mainnet|preprod|guild) + RELEASE="release" + ;; + preview) + RELEASE="pre-release" + ;; + *) + echo "ERROR: The NETWORK_NAME must be set to Mainnet, PreProd, Preview, Guild before mithril-client can download snapshots!!" + exit 1 + esac + fi + pre_startup_sanity +} + +check_db_dir() { + # If the DB directory does not exist then set DOWNLOAD_SNAPSHOT to Y + if [[ ! -d "${DB_DIRECTORY}" ]]; then + echo "INFO: The db directory does not exist.." + DOWNLOAD_SNAPSHOT="Y" + # If the DB directory is empty then set DOWNLOAD_SNAPSHOT to Y and REMOVE_DB_DIR to Y + elif [[ -d "${DB_DIRECTORY}" ]] && [[ -z "$(ls -A "${DB_DIRECTORY}")" ]] && [[ $(du -cs "${DB_DIRECTORY}"/* 2>/dev/null | awk '/total$/ {print $1}') -eq 0 ]]; then + echo "INFO: The db directory is empty.." + REMOVE_DB_DIR="Y" + DOWNLOAD_SNAPSHOT="Y" + else + echo "INFO: The db directory is not empty.." + fi + +} + +remove_db_dir() { + # Mithril client errors if the db folder already exists, so remove it if it is empty + if [[ "${REMOVE_DB_DIR}" == "Y" ]]; then + echo "INFO: Removing empty db directory to prepare for snapshot download.." + rmdir "${DB_DIRECTORY}" + fi +} + +download_snapshot() { + if [[ "${DOWNLOAD_SNAPSHOT}" == "Y" ]]; then + echo "INFO: Downloading latest mithril snapshot.." + "${MITHRILBIN}" -v --aggregator-endpoint ${AGGREGATOR_ENDPOINT} snapshot download --download-dir ${CNODE_HOME} ${SNAPSHOT_DIGEST} + else + echo "INFO: Skipping snapshot download.." + fi +} + + +##################### +# Execution # +##################### + +# Parse command line options +while getopts :du opt; do + case ${opt} in + d ) MITHRIL_DOWNLOAD="Y" ;; + u ) UPDATE_ENVIRONMENT="Y" ;; + \? ) usage ;; + esac +done + +#Deploy systemd if -d argument was specified +if [[ "${UPDATE_ENVIRONMENT}" == "Y" ]] && [[ "${MITHRIL_DOWNLOAD}" != "Y" ]]; then + set_defaults +elif [[ "${MITHRIL_DOWNLOAD}" == "Y" ]]; then + set_defaults + check_db_dir + remove_db_dir + download_snapshot +elif [[ "${UPDATE_ENVIRONMENT}" == "Y" ]] && [[ "${MITHRIL_DOWNLOAD}" == "Y" ]]; then + set_defaults + check_db_dir + remove_db_dir + download_snapshot +else + usage + exit 1 +fi + +exit 0 diff --git a/scripts/cnode-helper-scripts/mithril-signer.sh b/scripts/cnode-helper-scripts/mithril-signer.sh index 8140fe055..970e83c20 100755 --- a/scripts/cnode-helper-scripts/mithril-signer.sh +++ b/scripts/cnode-helper-scripts/mithril-signer.sh @@ -27,7 +27,7 @@ usage() { Cardano Mithril signer wrapper script !! -d Deploy mithril-signer as a systemd service - -u Update mithril-signer environment file + -u Update mithril environment file EOF exit 1 @@ -35,20 +35,22 @@ usage() { set_defaults() { [[ -z "${MITHRILBIN}" ]] && MITHRILBIN="${HOME}"/.local/bin/mithril-signer - if [[ -z "${NETWORK}" ]] || [[ -z "${POOL_NAME}" ]] || [[ "${POOL_NAME}" == "CHANGE_ME" ]]; then - echo "ERROR: The NETWORK and POOL_NAME must be set before deploying mithril-signer as a systemd service!!" + if [[ -z "${POOL_NAME}" ]] || [[ "${POOL_NAME}" == "CHANGE_ME" ]]; then + echo "ERROR: The POOL_NAME must be set before deploying mithril-signer as a systemd service!!" exit 1 else - case "${NETWORK}" in - mainnet|preprod) + case "${NETWORK_NAME,,}" in + mainnet|preprod|guild) RELEASE="release" ;; - *) + preview) RELEASE="pre-release" ;; + *) + echo "ERROR: The NETWORK_NAME must be set to Mainnet, PreProd, Preview, or Guild before mithril-signer can be deployed!!" + exit 1 esac fi - [[ -z ${RELEASE} ]] && echo "ERROR: Failed to set RELEASE variable, please check NETWORK variable in env file!!" && exit 1 } pre_startup_sanity() { @@ -62,52 +64,53 @@ pre_startup_sanity() { } get_relay_endpoint() { - read -p "Enter the IP address of the relay endpoint: " RELAY_ENDPOINT_IP - read -p "Enter the port of the relay endpoint (press Enter to use default 3132): " RELAY_PORT + read -r -p "Enter the IP address of the relay endpoint: " RELAY_ENDPOINT_IP + read -r -p "Enter the port of the relay endpoint (press Enter to use default 3132): " RELAY_PORT RELAY_PORT=${RELAY_PORT:-3132} echo "Using RELAY_ENDPOINT=${RELAY_ENDPOINT_IP}:${RELAY_PORT} for the Mithril signer relay endpoint." } generate_environment_file() { # Inquire about the relay endpoint - read -p "Are you using a relay endpoint? (y/n, press Enter to use default y): " ENABLE_RELAY_ENDPOINT + read -r -p "Are you using a relay endpoint? (y/n, press Enter to use default y): " ENABLE_RELAY_ENDPOINT ENABLE_RELAY_ENDPOINT=${ENABLE_RELAY_ENDPOINT:-y} if [[ "${ENABLE_RELAY_ENDPOINT}" == "y" ]]; then get_relay_endpoint else - echo "Using a naive Mithril configuration without a relay for testnets and devnets." + echo "Using a naive Mithril configuration without a mithril relay." fi - ERA_READER_ADDRESS=https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/${RELEASE}-${NETWORK}/era.addr - ERA_READER_VKEY=https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/${RELEASE}-${NETWORK}/era.vkey - sudo bash -c "cat <<-'EOF' > ${CNODE_HOME}/mithril-signer/service.env + # Generate the full set of environment variables required by Mithril signer use case + export ERA_READER_ADDRESS=https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/${RELEASE}-${NETWORK_NAME,,}/era.addr + export ERA_READER_VKEY=https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/${RELEASE}-${NETWORK_NAME,,}/era.vkey + sudo bash -c "cat <<-'EOF' > ${CNODE_HOME}/mithril/mithril.env KES_SECRET_KEY_PATH=${POOL_DIR}/${POOL_HOTKEY_SK_FILENAME} OPERATIONAL_CERTIFICATE_PATH=${POOL_DIR}/${POOL_OPCERT_FILENAME} - NETWORK=${NETWORK} - AGGREGATOR_ENDPOINT=https://aggregator.${RELEASE}-${NETWORK}.api.mithril.network/aggregator + NETWORK=${NETWORK_NAME,,} + RELEASE=${RELEASE} + AGGREGATOR_ENDPOINT=https://aggregator.${RELEASE}-${NETWORK_NAME,,}.api.mithril.network/aggregator RUN_INTERVAL=60000 DB_DIRECTORY=${CNODE_HOME}/db CARDANO_NODE_SOCKET_PATH=${CARDANO_NODE_SOCKET_PATH} CARDANO_CLI_PATH=${HOME}/.local/bin/cardano-cli - DATA_STORES_DIRECTORY=${CNODE_HOME}/mithril-signer/data-stores + DATA_STORES_DIRECTORY=${CNODE_HOME}/mithril/data-stores STORE_RETENTION_LIMITS=5 ERA_READER_ADAPTER_TYPE=cardano-chain - ERA_READER_ADDRESS=https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/${RELEASE}-${NETWORK}/era.addr - ERA_READER_VKEY=https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/${RELEASE}-${NETWORK}/era.vkey - ERA_READER_ADAPTER_PARAMS=$(jq -nc --arg address $(wget -q -O - "${ERA_READER_ADDRESS}") --arg verification_key $(wget -q -O - "${ERA_READER_VKEY}") '{"address": $address, "verification_key": $verification_key}') - GENESIS_VERIFICATION_KEY=$(curl -s https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/${RELEASE}-${NETWORK}/genesis.vkey) + ERA_READER_ADAPTER_PARAMS=$(jq -nc --arg address "$(wget -q -O - "${ERA_READER_ADDRESS}")" --arg verification_key "$(wget -q -O - "${ERA_READER_VKEY}")" '{"address": $address, "verification_key": $verification_key}') + GENESIS_VERIFICATION_KEY=$(wget -q -O - https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/${RELEASE}-${NETWORK_NAME,,}/genesis.vkey) PARTY_ID=$(cat ${POOL_DIR}/${POOL_ID_FILENAME}) - EOF" && sudo chown $USER:$USER "${CNODE_HOME}"/mithril-signer/service.env + SNAPSHOT_DIGEST=latest + EOF" && sudo chown $USER:$USER "${CNODE_HOME}"/mithril/mithril.env if [[ "${ENABLE_RELAY_ENDPOINT}" == "y" ]]; then - sudo bash -c "echo RELAY_ENDPOINT=http://${RELAY_ENDPOINT_IP}:${RELAY_PORT} >> ${CNODE_HOME}/mithril-signer/service.env" + sudo bash -c "echo RELAY_ENDPOINT=http://${RELAY_ENDPOINT_IP}:${RELAY_PORT} >> ${CNODE_HOME}/mithril/mithril.env" fi } deploy_systemd() { echo "Creating ${CNODE_VNAME}-mithril-signer systemd service environment file.." - if [[ ! -f "${CNODE_HOME}"/mithril-signer/service.env ]]; then - generate_environment_file && echo "Environment file created successfully!!" + if [[ ! -f "${CNODE_HOME}"/mithril/mithril.env ]]; then + generate_environment_file && echo "Mithril environment file created successfully!!" fi echo "Deploying ${CNODE_VNAME}-mithril-signer as systemd service.." @@ -117,15 +120,15 @@ deploy_systemd() { StartLimitIntervalSec=0 Wants=network-online.target After=network-online.target - BindsTo=${vname}.service - After=${vname}.service + BindsTo=${CNODE_VNAME}.service + After=${CNODE_VNAME}.service [Service] Type=simple Restart=always RestartSec=5 User=${USER} - EnvironmentFile=${CNODE_HOME}/mithril-signer/service.env + EnvironmentFile=${CNODE_HOME}/mithril/mithril.env ExecStart=/bin/bash -l -c \"exec ${HOME}/.local/bin/mithril-signer -vv\" KillSignal=SIGINT SuccessExitStatus=143 @@ -179,6 +182,6 @@ pre_startup_sanity # Run Mithril Signer Server echo "Sourcing the Mithril Signer environment file.." -. "${CNODE_HOME}"/mithril-signer/service.env +. "${CNODE_HOME}"/mithril/mithril.env echo "Starting Mithril Signer Server.." "${MITHRILBIN}" -vvv >> "${LOG_DIR}"/mithril-signer.log 2>&1