Skip to content

Commit 05fff6f

Browse files
committed
node 9.0.0 release for testnet
All scripts updated to work with node 9.0.0 and cli 9.0.0.0 Detailed changelog will follow with the mainnet release
1 parent 7dc67e4 commit 05fff6f

19 files changed

+175
-1240
lines changed

cardano/testnet/00_common.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,12 @@ if [[ "${adahandleAPI: -1}" == "/" ]]; then adahandleAPI=${adahandleAPI%?}; fi #
285285
if [[ "${magicparam}" == "" || ${addrformat} == "" || ${byronToShelleyEpochs} == "" ]]; then majorError "The 'magicparam', 'addrformat' or 'byronToShelleyEpochs' is not set!\nOr maybe you have set the wrong parameter network=\"${network}\" ?\nList of preconfigured network-names: ${networknames}"; exit 1; fi
286286

287287
#Don't allow to overwrite the needed Versions, so we set it after the overwrite part
288-
minCliVersion="8.23.1" #minimum allowed cli version for this script-collection version
288+
minCliVersion="9.0.0" #minimum allowed cli version for this script-collection version
289289
maxCliVersion="99.99.9" #maximum allowed cli version, 99.99.9 = no limit so far
290-
minNodeVersion="8.11.0" #minimum allowed node version for this script-collection version
290+
minNodeVersion="8.12.2" #minimum allowed node version for this script-collection version
291291
maxNodeVersion="99.99.9" #maximum allowed node version, 99.99.9 = no limit so far
292292
minLedgerCardanoAppVersion="7.1.0" #minimum version for the cardano-app on the Ledger HW-Wallet
293-
minTrezorCardanoAppVersion="2.6.5" #minimum version for the firmware on the Trezor HW-Wallet
293+
minTrezorCardanoAppVersion="2.7.2" #minimum version for the firmware on the Trezor HW-Wallet
294294
minHardwareCliVersion="1.15.0" #minimum version for the cardano-hw-cli
295295
minCardanoSignerVersion="1.16.1" #minimum version for the cardano-signer binary
296296
minCatalystToolboxVersion="0.5.0" #minimum version for the catalyst-toolbox binary
@@ -577,10 +577,10 @@ fi
577577

578578
#-------------------------------------------------------------
579579
#Check if curl, jq, bc and xxd is installed
580-
if ! exists curl; then echo -e "\e[33mYou need the little tool 'curl', its needed to fetch online data !\n\nInstall it on Ubuntu/Debian like:\n\e[97msudo apt update && sudo apt -y install curl\n\n\e[33mThx! :-)\e[0m\n"; exit 2; fi
581-
if ! exists jq; then echo -e "\e[33mYou need the little tool 'jq', its needed to do the json processing !\n\nInstall it on Ubuntu/Debian like:\n\e[97msudo apt update && sudo apt -y install jq\n\n\e[33mThx! :-)\e[0m\n"; exit 2; fi
582-
if ! exists bc; then echo -e "\e[33mYou need the little tool 'bc', its needed to do larger number calculations !\n\nInstall it on Ubuntu/Debian like:\n\e[97msudo apt update && sudo apt -y install bc\n\n\e[33mThx! :-)\e[0m\n"; exit 2; fi
583-
if ! exists xxd; then echo -e "\e[33mYou need the little tool 'xxd', its needed to convert hex strings !\n\nInstall it on Ubuntu/Debian like:\n\e[97msudo apt update && sudo apt -y install xxd\n\n\e[33mThx! :-)\e[0m\n"; exit 2; fi
580+
if ! ${offlineMode} && ! exists curl; then echo -e "\n\n\e[33mYou need the little tool 'curl', its needed to fetch online data !\n\nInstall it on Ubuntu/Debian like:\n\e[97msudo apt update && sudo apt -y install curl\n\n\e[33mThx! :-)\e[0m\n"; exit 2; fi
581+
if ! exists jq; then echo -e "\n\n\e[33mYou need the little tool 'jq', its needed to do the json processing !\n\nInstall it on Ubuntu/Debian like:\n\e[97msudo apt update && sudo apt -y install jq\n\n\e[33mThx! :-)\e[0m\n"; exit 2; fi
582+
if ! exists bc; then echo -e "\n\n\e[33mYou need the little tool 'bc', its needed to do larger number calculations !\n\nInstall it on Ubuntu/Debian like:\n\e[97msudo apt update && sudo apt -y install bc\n\n\e[33mThx! :-)\e[0m\n"; exit 2; fi
583+
if ! exists xxd; then echo -e "\n\n\e[33mYou need the little tool 'xxd', its needed to convert hex strings !\n\nInstall it on Ubuntu/Debian like:\n\e[97msudo apt update && sudo apt -y install xxd\n\n\e[33mThx! :-)\e[0m\n"; exit 2; fi
584584

585585

586586
#-------------------------------------------------------------

cardano/testnet/01_queryAddress.sh

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -328,13 +328,20 @@ elif [[ ${typeOfAddr} == ${addrTypeStake} ]]; then #Staking Address
328328
;;
329329

330330
*)
331-
#normal drep-id
332-
drepDelegationHASH=${drepDelegationHASH: -56} #last 56chars of the entry is the hash itself
333-
drepDelegationID=$(${bech32_bin} "drep" <<< "${drepDelegationHASH}" 2> /dev/null)
334-
if [[ $? -eq 0 ]]; then
335-
echo -e " \t\e[0mVoting-Power of Staking Address is delegated to DRepID(HASH): \e[32m${drepDelegationID}\e[0m (\e[94m${drepDelegationHASH}\e[0m)\n";
336-
fi
337-
;;
331+
#normal drep-id or drep-script-id
332+
case "${drepDelegationHASH%%-*}" in
333+
"keyHash") drepDelegationID=$(${bech32_bin} "drep" <<< "${drepDelegationHASH##*-}" 2> /dev/null)
334+
echo -e " \t\e[0mVoting-Power of Staking Address is delegated to DRepID(HASH): \e[32m${drepDelegationID}\e[0m (\e[94m${drepDelegationHASH##*-}\e[0m)\n";
335+
;;
336+
"scriptHash") drepDelegationID=$(${bech32_bin} "drep_script" <<< "${drepDelegationHASH##*-}" 2> /dev/null)
337+
echo -e " \t\e[0mVoting-Power of Staking Address is delegated to DRep-Script-ID(HASH): \e[32m${drepDelegationID}\e[0m (\e[94m${drepDelegationHASH##*-}\e[0m)\n";
338+
;;
339+
*) #unknown type
340+
echo -e " \t\e[0mVoting-Power of Staking Address is delegated to DRep-HASH: \e[32m${drepDelegationHASH}\e[0m\n";
341+
;;
342+
esac
343+
;;
344+
338345
esac
339346

340347
echo

cardano/testnet/01_workOffline.sh

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,15 @@ case ${action} in
146146
case ${workMode} in
147147

148148
"online") #onlinemode
149+
#get the normal parameters
149150
protocolParametersJSON=$(${cardanocli} ${cliEra} query protocol-parameters )
150-
governanceParametersJSON=$(${cardanocli} ${cliEra} query gov-state 2> /dev/null | jq -r ".currentPParams")
151-
protocolParametersJSON=$( jq ". += ${governanceParametersJSON} " <<< ${protocolParametersJSON}) #embedding the governance parameters into the normal protocolParameters
151+
#get the previous actions ids for the various action types and the constitution state
152+
prevActionIDsJSON=$(${cardanocli} ${cliEra} query gov-state 2> /dev/null | jq -r ".nextRatifyState.nextEnactState.prevGovActionIds" 2> /dev/null)
153+
if [[ ${prevActionIDsJSON} == "" ]]; then prevActionIDsJSON='{}'; fi
154+
constitutionParametersJSON=$(${cardanocli} ${cliEra} query constitution 2> /dev/null | jq -r "." 2> /dev/null)
155+
if [[ ${constitutionParametersJSON} == "" ]]; then constitutionParametersJSON='{}'; fi
156+
#merge them together
157+
protocolParametersJSON=$( jq --sort-keys ".constitution += ${constitutionParametersJSON} | .prevActionIDs += ${prevActionIDsJSON}" <<< ${protocolParametersJSON})
152158
;;
153159

154160
"light") #lightmode
@@ -180,9 +186,15 @@ case ${action} in
180186
case ${workMode} in
181187

182188
"online") #onlinemode
189+
#get the normal parameters
183190
protocolParametersJSON=$(${cardanocli} ${cliEra} query protocol-parameters )
184-
governanceParametersJSON=$(${cardanocli} ${cliEra} query gov-state 2> /dev/null | jq -r ".currentPParams")
185-
protocolParametersJSON=$( jq ". += ${governanceParametersJSON} " <<< ${protocolParametersJSON}) #embedding the governance parameters into the normal protocolParameters
191+
#get the previous actions ids for the various action types and the constitution state
192+
prevActionIDsJSON=$(${cardanocli} ${cliEra} query gov-state 2> /dev/null | jq -r ".nextRatifyState.nextEnactState.prevGovActionIds" 2> /dev/null)
193+
if [[ ${prevActionIDsJSON} == "" ]]; then prevActionIDsJSON='{}'; fi
194+
constitutionParametersJSON=$(${cardanocli} ${cliEra} query constitution 2> /dev/null | jq -r "." 2> /dev/null)
195+
if [[ ${constitutionParametersJSON} == "" ]]; then constitutionParametersJSON='{}'; fi
196+
#merge them together
197+
protocolParametersJSON=$( jq --sort-keys ".constitution += ${constitutionParametersJSON} | .prevActionIDs += ${prevActionIDsJSON}" <<< ${protocolParametersJSON})
186198
;;
187199

188200
"light") #lightmode

cardano/testnet/03c_checkStakingAddrOnChain.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,18 @@ if [[ ${typeOfAddr} == ${addrTypeStake} ]]; then #Staking Address
124124
;;
125125

126126
*)
127-
#normal drep-id
128-
drepDelegationHASH=${drepDelegationHASH: -56} #last 56chars of the entry is the hash itself
129-
drepDelegationID=$(${bech32_bin} "drep" <<< "${drepDelegationHASH}" 2> /dev/null)
130-
if [[ $? -eq 0 ]]; then
131-
echo -e "\e[0mVoting-Power of Staking Address is delegated to DRepID(HASH): \e[32m${drepDelegationID}\e[0m (\e[94m${drepDelegationHASH}\e[0m)\n";
132-
fi
127+
#normal drep-id or drep-script-id
128+
case "${drepDelegationHASH%%-*}" in
129+
"keyHash") drepDelegationID=$(${bech32_bin} "drep" <<< "${drepDelegationHASH##*-}" 2> /dev/null)
130+
echo -e "\e[0mVoting-Power of Staking Address is delegated to DRepID(HASH): \e[32m${drepDelegationID}\e[0m (\e[94m${drepDelegationHASH##*-}\e[0m)\n";
131+
;;
132+
"scriptHash") drepDelegationID=$(${bech32_bin} "drep_script" <<< "${drepDelegationHASH##*-}" 2> /dev/null)
133+
echo -e "\e[0mVoting-Power of Staking Address is delegated to DRep-Script-ID(HASH): \e[32m${drepDelegationID}\e[0m (\e[94m${drepDelegationHASH##*-}\e[0m)\n";
134+
;;
135+
*) drepDelegationID="" #unknown type
136+
echo -e "\e[0mVoting-Power of Staking Address is delegated to DRep-HASH: \e[32m${drepDelegationHASH}\e[0m\n";
137+
;;
138+
esac
133139
;;
134140
esac
135141

0 commit comments

Comments
 (0)