Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mithril-client.sh] Use the DB_DIR instead of CNODE_HOME/db #1800

Merged
merged 3 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/cnode-helper-scripts/mithril-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ download_snapshot() {
if [[ "${DOWNLOAD_SNAPSHOT}" == "Y" ]]; then
echo "INFO: Downloading latest mithril snapshot.."
trap 'cleanup_db_directory' INT
if ! "${MITHRILBIN}" -v --aggregator-endpoint ${AGGREGATOR_ENDPOINT} cardano-db download --download-dir ${CNODE_HOME} --genesis-verification-key ${GENESIS_VERIFICATION_KEY} ${SNAPSHOT_DIGEST} ; then
if ! "${MITHRILBIN}" -v --aggregator-endpoint ${AGGREGATOR_ENDPOINT} cardano-db download --download-dir $(dirname ${DB_DIRECTORY}) --genesis-verification-key ${GENESIS_VERIFICATION_KEY} ${SNAPSHOT_DIGEST} ; then
cleanup_db_directory
exit 1
fi
Expand Down
2 changes: 1 addition & 1 deletion scripts/cnode-helper-scripts/mithril-signer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ deploy_systemd() {
stop_signer() {
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
# touch clean "${CNODE_HOME}"/db/clean # Disabled as it's a bit hacky, but only runs when SIGINT is passed to node process. Should not be needed if node does it's job
# touch clean "${DB_DIRECTORY}"/clean # Disabled as it's a bit hacky, but only runs when SIGINT is passed to node process. Should not be needed if node does it's job
echo " Sending SIGINT to $(basename "${0::-3}") process.."
sleep 5
exit 0
Expand Down
4 changes: 2 additions & 2 deletions scripts/cnode-helper-scripts/mithril.library
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ update_mithril_environment_for_signer() {
RELEASE=${RELEASE}
AGGREGATOR_ENDPOINT=https://aggregator.${RELEASE}-${NETWORK_NAME,,}.api.mithril.network/aggregator
RUN_INTERVAL=60000
DB_DIRECTORY=${CNODE_HOME}/db
DB_DIRECTORY=${DB_DIR}
CARDANO_NODE_SOCKET_PATH=${CARDANO_NODE_SOCKET_PATH}
CARDANO_CLI_PATH=${HOME}/.local/bin/cardano-cli
DATA_STORES_DIRECTORY=${CNODE_HOME}/mithril/data-stores
Expand Down Expand Up @@ -202,7 +202,7 @@ update_mithril_environment_for_client() {
NETWORK=${NETWORK_NAME,,}
RELEASE=${RELEASE}
AGGREGATOR_ENDPOINT=https://aggregator.${RELEASE}-${NETWORK_NAME,,}.api.mithril.network/aggregator
DB_DIRECTORY=${CNODE_HOME}/db
DB_DIRECTORY=${DB_DIR}
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"
Expand Down