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

Drop deprecated references to cardano-cli ${NETWORK_ERA} #1844

Merged
merged 1 commit into from
Jan 14, 2025
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
4 changes: 4 additions & 0 deletions docs/Scripts/cntools-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.3] - 2025-01-10
#### Fixed
- Drop deprecated refences to `${NETWORK_ERA}`

## [13.3.2] - 2025-01-09
#### Fixed
- Corrected predefined Drep wallet data querying in light (api) mode - should address StringToDecodeMissingSeparatorChar errors
Expand Down
2 changes: 1 addition & 1 deletion scripts/cnode-helper-scripts/cncli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ getPoolVrfVkeyCborHex() {
}

getLedgerData() { # getNodeMetrics expected to have been already run
if ! stake_snapshot=$(${CCLI} ${NETWORK_ERA} query stake-snapshot --stake-pool-id ${POOL_ID} ${NETWORK_IDENTIFIER} 2>&1); then
if ! stake_snapshot=$(${CCLI} query stake-snapshot --stake-pool-id ${POOL_ID} ${NETWORK_IDENTIFIER} 2>&1); then
echo "ERROR: stake-snapshot query failed: ${stake_snapshot}"
return 1
fi
Expand Down
6 changes: 3 additions & 3 deletions scripts/cnode-helper-scripts/cnode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ set_defaults() {
check_config_sanity() {
BYGENHASH=$("${CCLI}" byron genesis print-genesis-hash --genesis-json "${BYRON_GENESIS_JSON}" 2>/dev/null)
BYGENHASHCFG=$(jq '.ByronGenesisHash' <"${CONFIG}" 2>/dev/null)
SHGENHASH=$("${CCLI}" ${NETWORK_ERA} genesis hash --genesis "${GENESIS_JSON}" 2>/dev/null)
SHGENHASH=$("${CCLI}" latest genesis hash --genesis "${GENESIS_JSON}" 2>/dev/null)
SHGENHASHCFG=$(jq '.ShelleyGenesisHash' <"${CONFIG}" 2>/dev/null)
ALGENHASH=$("${CCLI}" ${NETWORK_ERA} genesis hash --genesis "${ALONZO_GENESIS_JSON}" 2>/dev/null)
ALGENHASH=$("${CCLI}" latest genesis hash --genesis "${ALONZO_GENESIS_JSON}" 2>/dev/null)
ALGENHASHCFG=$(jq '.AlonzoGenesisHash' <"${CONFIG}" 2>/dev/null)
CWGENHASH=$("${CCLI}" ${NETWORK_ERA} genesis hash --genesis "${CONWAY_GENESIS_JSON}" 2>/dev/null)
CWGENHASH=$("${CCLI}" latest genesis hash --genesis "${CONWAY_GENESIS_JSON}" 2>/dev/null)
CWGENHASHCFG=$(jq '.ConwayGenesisHash' <"${CONFIG}" 2>/dev/null)
# If hash are missing/do not match, add that to the end of config. We could have sorted it based on logic, but that would mess up sdiff comparison outputs
if [[ "${BYGENHASH}" != "${BYGENHASHCFG}" ]] || [[ "${SHGENHASH}" != "${SHGENHASHCFG}" ]] || [[ "${ALGENHASH}" != "${ALGENHASHCFG}" ]] || [[ "${CWGENHASH}" != "${CWGENHASHCFG}" ]]; then
Expand Down
228 changes: 114 additions & 114 deletions scripts/cnode-helper-scripts/cntools.library

Large diffs are not rendered by default.

138 changes: 69 additions & 69 deletions scripts/cnode-helper-scripts/cntools.sh

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions scripts/cnode-helper-scripts/dbsync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ check_defaults() {
check_config_sanity() {
BYGENHASH=$("${CCLI}" byron genesis print-genesis-hash --genesis-json "${BYRON_GENESIS_JSON}" 2>/dev/null)
BYGENHASHCFG=$(jq '.ByronGenesisHash' <"${CONFIG}" 2>/dev/null)
SHGENHASH=$("${CCLI}" ${NETWORK_ERA} genesis hash --genesis "${GENESIS_JSON}" 2>/dev/null)
SHGENHASH=$("${CCLI}" latest genesis hash --genesis "${GENESIS_JSON}" 2>/dev/null)
SHGENHASHCFG=$(jq '.ShelleyGenesisHash' <"${CONFIG}" 2>/dev/null)
ALGENHASH=$("${CCLI}" ${NETWORK_ERA} genesis hash --genesis "${ALONZO_GENESIS_JSON}" 2>/dev/null)
ALGENHASH=$("${CCLI}" latest genesis hash --genesis "${ALONZO_GENESIS_JSON}" 2>/dev/null)
ALGENHASHCFG=$(jq '.AlonzoGenesisHash' <"${CONFIG}" 2>/dev/null)
CWGENHASH=$("${CCLI}" ${NETWORK_ERA} genesis hash --genesis "${CONWAY_GENESIS_JSON}" 2>/dev/null)
CWGENHASH=$("${CCLI}" latest genesis hash --genesis "${CONWAY_GENESIS_JSON}" 2>/dev/null)
CWGENHASHCFG=$(jq '.ConwayGenesisHash' <"${CONFIG}" 2>/dev/null)
# If hash are missing/do not match, add that to the end of config. We could have sorted it based on logic, but that would mess up sdiff comparison outputs
if [[ "${BYGENHASH}" != "${BYGENHASHCFG}" ]] || [[ "${SHGENHASH}" != "${SHGENHASHCFG}" ]] || [[ "${ALGENHASH}" != "${ALGENHASHCFG}" ]] || [[ "${CWGENHASH}" != "${CWGENHASHCFG}" ]]; then
Expand Down
10 changes: 5 additions & 5 deletions scripts/cnode-helper-scripts/env
Original file line number Diff line number Diff line change
Expand Up @@ -840,10 +840,10 @@ getPoolID() {
pool_id_bech32=""
pool_coldkey_vk_file="${pool_dir}/${POOL_COLDKEY_VK_FILENAME}"
if [[ -f ${pool_coldkey_vk_file} ]]; then
[[ $(type -t println) = function ]] && println ACTION "${CCLI} ${NETWORK_ERA} stake-pool id --cold-verification-key-file ${pool_coldkey_vk_file} --output-format hex"
[[ $(type -t println) = function ]] && println ACTION "${CCLI} ${NETWORK_ERA} stake-pool id --cold-verification-key-file ${pool_coldkey_vk_file}"
if ! pool_id=$(${CCLI} ${NETWORK_ERA} stake-pool id --cold-verification-key-file "${pool_coldkey_vk_file}" --output-format hex 2>/dev/null) || \
! pool_id_bech32=$(${CCLI} ${NETWORK_ERA} stake-pool id --cold-verification-key-file "${pool_coldkey_vk_file}" 2>/dev/null); then
[[ $(type -t println) = function ]] && println ACTION "${CCLI} latest stake-pool id --cold-verification-key-file ${pool_coldkey_vk_file} --output-format hex"
[[ $(type -t println) = function ]] && println ACTION "${CCLI} latest stake-pool id --cold-verification-key-file ${pool_coldkey_vk_file}"
if ! pool_id=$(${CCLI} latest stake-pool id --cold-verification-key-file "${pool_coldkey_vk_file}" --output-format hex 2>/dev/null) || \
! pool_id_bech32=$(${CCLI} latest stake-pool id --cold-verification-key-file "${pool_coldkey_vk_file}" 2>/dev/null); then
return 1
fi
echo ${pool_id} > "${pool_id_file}"
Expand All @@ -870,7 +870,7 @@ getProtocolParams() {
return 3
fi
else
PROT_PARAMS="$(${CCLI} ${NETWORK_ERA} query protocol-parameters ${NETWORK_IDENTIFIER} 2>&1)"
PROT_PARAMS="$(${CCLI} query protocol-parameters ${NETWORK_IDENTIFIER} 2>&1)"
if grep -q "Network.Socket.connect" <<< "${PROT_PARAMS}"; then
return 1
elif [[ -z "${PROT_PARAMS}" ]] || ! jq -er . <<< "${PROT_PARAMS}" &>/dev/null; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/cnode-helper-scripts/gLiveView.sh
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ getOpCert () {
fi
fi
if [[ -f ${opcert_file} ]]; then
op_cert="$(${CCLI} ${NETWORK_ERA} query kes-period-info ${NETWORK_IDENTIFIER} --op-cert-file "${opcert_file}")"
op_cert="$(${CCLI} query kes-period-info ${NETWORK_IDENTIFIER} --op-cert-file "${opcert_file}")"
[[ ${op_cert} =~ qKesNodeStateOperationalCertificateNumber.:[[:space:]]([0-9]+) ]] && op_cert_chain="${BASH_REMATCH[1]}"
[[ ${op_cert} =~ qKesOnDiskOperationalCertificateNumber.:[[:space:]]([0-9]+) ]] && op_cert_disk="${BASH_REMATCH[1]}"
fi
Expand Down
Loading