From 91cfc41f9b1ce1c86f117b1385c5eeeb174d1fb5 Mon Sep 17 00:00:00 2001 From: cardano-bot Date: Tue, 24 Sep 2024 00:53:20 +0000 Subject: [PATCH 1/4] New mithril release version --- files/docker/node/release-versions/mithril-latest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/docker/node/release-versions/mithril-latest.txt b/files/docker/node/release-versions/mithril-latest.txt index ef1a7646e..96b6b6d06 100644 --- a/files/docker/node/release-versions/mithril-latest.txt +++ b/files/docker/node/release-versions/mithril-latest.txt @@ -1 +1 @@ -2430.0 +2437.1 From f99a0d1b163b7446b3f1acd110ae61067588f403 Mon Sep 17 00:00:00 2001 From: rdlrt <3169068+rdlrt@users.noreply.github.com> Date: Tue, 24 Sep 2024 12:54:24 +1000 Subject: [PATCH 2/4] CNTools 13.2.2 --- docs/Scripts/cntools-changelog.md | 4 ++++ scripts/cnode-helper-scripts/cntools.library | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/Scripts/cntools-changelog.md b/docs/Scripts/cntools-changelog.md index 5684a7b42..4931ebd1a 100644 --- a/docs/Scripts/cntools-changelog.md +++ b/docs/Scripts/cntools-changelog.md @@ -6,6 +6,10 @@ All notable changes to this tool will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [13.2.2] - 2024-09-23 +#### Fixed +- URL for share.koios.rest to download catalyst-toolbox + ## [13.2.1] - 2024-09-10 #### Added - Added gov vote validation for role and type diff --git a/scripts/cnode-helper-scripts/cntools.library b/scripts/cnode-helper-scripts/cntools.library index 8b9efe415..e77ef0011 100644 --- a/scripts/cnode-helper-scripts/cntools.library +++ b/scripts/cnode-helper-scripts/cntools.library @@ -15,7 +15,7 @@ CNTOOLS_MAJOR_VERSION=13 # Minor: Changes and features of minor character that can be applied without breaking existing functionality or workflow CNTOOLS_MINOR_VERSION=2 # Patch: Backwards compatible bug fixes. No additional functionality or major changes -CNTOOLS_PATCH_VERSION=1 +CNTOOLS_PATCH_VERSION=2 CNTOOLS_VERSION="${CNTOOLS_MAJOR_VERSION}.${CNTOOLS_MINOR_VERSION}.${CNTOOLS_PATCH_VERSION}" DUMMYFEE=20000 @@ -171,7 +171,7 @@ download_catalyst_toolbox() { fi rm -rf /tmp/catalyst-toolbox-bin && mkdir /tmp/catalyst-toolbox-bin pushd /tmp/catalyst-toolbox-bin >/dev/null || return 1 - if curl -sL -f -m ${CURL_TIMEOUT} -o "${HOME}"/.local/bin/catalyst-toolbox "https://share.koios.rest/api/public/dl/Q0m8-F2X%2Fbinaries%2Fcatalyst-toolbox-x86_64-gnu"; then + if curl -sL -f -m ${CURL_TIMEOUT} -o "${HOME}"/.local/bin/catalyst-toolbox "https://share.koios.rest/api/public/dl/xFdZDfM4%2Fbin%2Fcatalyst-toolbox"; then chmod +x "${HOME}"/.local/bin/catalyst-toolbox local catalyst_toolbox_version; catalyst_toolbox_version=$(catalyst-toolbox --full-version) println DEBUG " ${catalyst_toolbox_version%% - *} ${FG_GREEN}installed!${NC}" From 487935fde99708326db9ea3c6c8740ea44be7d1d Mon Sep 17 00:00:00 2001 From: Andreas Osberghaus <148758+mrgrauel@users.noreply.github.com> Date: Tue, 24 Sep 2024 12:04:55 +0200 Subject: [PATCH 3/4] [Fix] Untar of `cardano-cli` and ensure CARDANO_NODE_VERSION is respected (#1825) Fixes untar of `ccli.tar.gz` Check `scripts/cnode-helper-scripts/guild-deploy.sh:403` Solving downloading latest binaries for cardano-cli Manually on my local machine --- scripts/cnode-helper-scripts/guild-deploy.sh | 34 ++++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/scripts/cnode-helper-scripts/guild-deploy.sh b/scripts/cnode-helper-scripts/guild-deploy.sh index 2eb598f1e..8765191ea 100755 --- a/scripts/cnode-helper-scripts/guild-deploy.sh +++ b/scripts/cnode-helper-scripts/guild-deploy.sh @@ -60,11 +60,11 @@ versionCheck() { printf '%s\n%s' "${1//v/}" "${2//v/}" | sort -C -V; } #$1=avail usage() { cat <<-EOF >&2 - + Usage: $(basename "$0") [-n ] [-p path] [-t ] [-b ] [-u] [-s [p][b][l][m][d][c][o][w][x][f][s]] Set up dependencies for building/using common tools across cardano ecosystem. The script will always update dynamic content from existing scripts retaining existing user variables - + -n Connect to specified network instead of mainnet network (Default: connect to cardano mainnet network) eg: -n guild -p Parent folder path underneath which the top-level folder will be created (Default: /opt/cardano) -t Alternate name for top level folder - only alpha-numeric chars allowed (Default: cnode) @@ -82,7 +82,7 @@ usage() { x Download latest (released) binaries for Cardano Signer binary (Default: skip) f Force overwrite config files (backups of existing ones will be created) (Default: skip) s Force overwrite entire content [including user variables] of scripts (Default: skip) - + EOF exit 1 } @@ -109,7 +109,7 @@ set_defaults() { [[ -z "${BRANCH}" ]] && BRANCH="master" [[ "${SUDO}" = 'Y' ]] && sudo="sudo" || sudo="" [[ "${SUDO}" = 'Y' && $(id -u) -eq 0 ]] && err_exit "Please run as non-root user." - [[ -z "${CARDANO_NODE_VERSION}" ]] && CARDANO_NODE_VERSION="$(curl -sfk "https://raw.githubusercontent.com/${G_ACCOUNT}/guild-operators/${BRANCH}/files/docker/node/release-versions/cardano-node-latest.txt")" || CARDANO_NODE_VERSION=9.1.1 + [[ -z "${CARDANO_NODE_VERSION}" ]] && CARDANO_NODE_VERSION="$(curl -sfk "https://raw.githubusercontent.com/${G_ACCOUNT}/guild-operators/${BRANCH}/files/docker/node/release-versions/cardano-node-latest.txt" || echo "9.1.1")" CNODE_HOME="${CNODE_PATH}/${CNODE_NAME}" CNODE_VNAME=$(echo "$CNODE_NAME" | awk '{print toupper($0)}') [[ -z ${MITHRIL_HOME} ]] && MITHRIL_HOME="${CNODE_HOME}/mithril" @@ -144,7 +144,7 @@ update_check() { mv -f "${PARENT}"/guild-deploy.sh.tmp "${PARENT}"/guild-deploy.sh && \ chmod 755 "${PARENT}"/guild-deploy.sh && \ echo -e "\nUpdate applied successfully, please run the script again!\n" && \ - exit 0; + exit 0; } || { echo -e "Update failed!\n\nPlease manually download latest version of guild-deploy.sh script from GitHub" && \ exit 1; @@ -373,7 +373,7 @@ build_libblst() { exec_prefix=\${prefix} libdir=\${exec_prefix}/lib includedir=\${prefix}/include - + Name: libblst Description: Multilingual BLS12-381 signature library URL: https://github.com/supranational/blst @@ -394,13 +394,13 @@ download_cnodebins() { [[ -z ${ARCH##*aarch64*} ]] && err_exit " The build archives are not available for ARM, you might need to build them!" echo -e "\nDownloading binaries.." pushd "${HOME}"/tmp >/dev/null || err_exit - echo -e "\n Downloading Cardano Node archive created from GitHub.." + echo -e "\n Downloading Cardano Node ${CARDANO_NODE_VERSION} archive created from GitHub.." rm -f cardano-node cardano-address curl -m 200 -sfL https://github.com/intersectmbo/cardano-node/releases/download/${CARDANO_NODE_VERSION}/cardano-node-${CARDANO_NODE_VERSION}-linux.tar.gz -o cnode.tar.gz || err_exit " Could not download cardano-node release ${CARDANO_NODE_VERSION} from GitHub!" tar zxf cnode.tar.gz --strip-components 2 ./bin/cardano-node ./bin/cardano-submit-api ./bin/bech32 &>/dev/null rm -f cnode.tar.gz curl -m 200 -sfL https://github.com/IntersectMBO/cardano-cli/releases/download/cardano-cli-9.4.1.0/cardano-cli-9.4.1.0-x86_64-linux.tar.gz -o ccli.tar.gz || err_exit " Could not download cardano-cli from GitHub!" - tar zxf ccli.tar.gz --strip-components 1 cardano-cli-x86_64-linux &>/dev/null && mv cardano-cli-x86_64 cardano-cli + tar zxf ccli.tar.gz --strip-components 0 cardano-cli-x86_64-linux &>/dev/null && mv cardano-cli-x86_64-linux cardano-cli rm -f ccli.tar.gz [[ -f cardano-node ]] || err_exit " cardano-node archive downloaded but binary (cardano-node) not found after extracting package!" echo -e "\n Downloading Github release package for Cardano Addresses" @@ -466,7 +466,7 @@ download_cardanohwcli() { mkdir -p "${HOME}"/.local/bin rm -rf "${HOME}"/bin/cardano-hw-cli # Remove duplicate file in $PATH (old convention) if [ -f "${HOME}"/.local/bin/cardano-hw-cli ]; then - rm -rf "${HOME}"/.local/bin/cardano-hw-cli + rm -rf "${HOME}"/.local/bin/cardano-hw-cli fi pushd "${HOME}"/.local/bin >/dev/null || err_exit mv -f /tmp/chwcli-bin/cardano-hw-cli/* ./ @@ -583,17 +583,17 @@ download_mithril() { # Create folder structure and set up permissions/ownerships setup_folder() { echo -e "\nCreating Folder Structure .." - + if grep -q "export ${CNODE_VNAME}_HOME=" "${HOME}"/.bashrc; then echo -e "\nEnvironment Variable already set up!" else echo -e "\nSetting up Environment Variable" 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 "${MITHRIL_HOME}"/data-stores $sudo chown -R "$U_ID":"$G_ID" "${CNODE_HOME}" 2>/dev/null - + } # Download and update scripts for cnode @@ -602,7 +602,7 @@ populate_cnode() { echo -e "\nDownloading files..." pushd "${CNODE_HOME}"/files >/dev/null || err_exit echo "${BRANCH}" > "${CNODE_HOME}"/scripts/.env_branch - + local err_msg=" Had Trouble downloading the file:" # Download node config, genesis and topology from template #NWCONFURL="https://raw.githubusercontent.com/input-output-hk/cardano-playground/main/static/book.play.dev.cardano.org/environments" @@ -641,11 +641,11 @@ populate_cnode() { rm -f config.json.tmp rm -f dbsync.json.tmp fi - + pushd "${CNODE_HOME}"/scripts >/dev/null || err_exit - + [[ ${SCRIPTS_FORCE_OVERWRITE} = 'Y' ]] && echo -e "\nForced full upgrade! Please edit scripts/env, scripts/cnode.sh, scripts/dbsync.sh, scripts/submitapi.sh, scripts/ogmios.sh, scripts/gLiveView.sh and scripts/topologyUpdater.sh scripts/mithril-client.sh scripts/mithril-relay.sh scripts/mithril-signer.sh (alongwith files/topology.json, files/config.json, files/dbsync.json) as required!" - + updateWithCustomConfig "blockPerf.sh" updateWithCustomConfig "cabal-build-all.sh" updateWithCustomConfig "cncli.sh" @@ -666,7 +666,7 @@ populate_cnode() { updateWithCustomConfig "mithril-relay.sh" updateWithCustomConfig "mithril-signer.sh" updateWithCustomConfig "mithril.library" - + find "${CNODE_HOME}/scripts" -name '*.sh' -exec chmod 755 {} \; 2>/dev/null chmod 750 "${CNODE_HOME}"/priv 2>/dev/null } From dd06e9d4c3943e38fe7f65cb07bc8e0e5d06588f Mon Sep 17 00:00:00 2001 From: Ola Date: Tue, 24 Sep 2024 14:00:59 +0200 Subject: [PATCH 4/4] fix mithril signer --- scripts/cnode-helper-scripts/mithril-client.sh | 4 ++-- scripts/cnode-helper-scripts/mithril-signer.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cnode-helper-scripts/mithril-client.sh b/scripts/cnode-helper-scripts/mithril-client.sh index 705514d41..7b2c60c73 100755 --- a/scripts/cnode-helper-scripts/mithril-client.sh +++ b/scripts/cnode-helper-scripts/mithril-client.sh @@ -94,7 +94,7 @@ function main() { esac ;; cardano-db) - mithril_init client + mithril_init client || exit 1 case $2 in download) check_db_dir @@ -124,7 +124,7 @@ function main() { esac ;; stake-distribution) - mithril_init client + mithril_init client || exit 1 case $2 in download) download_stake_distribution diff --git a/scripts/cnode-helper-scripts/mithril-signer.sh b/scripts/cnode-helper-scripts/mithril-signer.sh index ef1631bf0..2aeeb7d84 100755 --- a/scripts/cnode-helper-scripts/mithril-signer.sh +++ b/scripts/cnode-helper-scripts/mithril-signer.sh @@ -97,7 +97,7 @@ function main() { generate_environment_file exit 0 else - mithril_init + mithril_init signer || exit 1 if [[ "${DEPLOY_SYSTEMD}" == "Y" ]]; then if deploy_systemd ; then echo "Mithril signer Systemd service successfully deployed"