Skip to content

Commit

Permalink
node 9.0.0 release for testnet
Browse files Browse the repository at this point in the history
All scripts updated to work with node 9.0.0 and cli 9.0.0.0

Detailed changelog will follow with the mainnet release
  • Loading branch information
gitmachtl committed Jul 9, 2024
1 parent 7dc67e4 commit 05fff6f
Show file tree
Hide file tree
Showing 19 changed files with 175 additions and 1,240 deletions.
14 changes: 7 additions & 7 deletions cardano/testnet/00_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,12 @@ if [[ "${adahandleAPI: -1}" == "/" ]]; then adahandleAPI=${adahandleAPI%?}; fi #
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

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

#-------------------------------------------------------------
#Check if curl, jq, bc and xxd is installed
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
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
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
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
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
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
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
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


#-------------------------------------------------------------
Expand Down
21 changes: 14 additions & 7 deletions cardano/testnet/01_queryAddress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,20 @@ elif [[ ${typeOfAddr} == ${addrTypeStake} ]]; then #Staking Address
;;

*)
#normal drep-id
drepDelegationHASH=${drepDelegationHASH: -56} #last 56chars of the entry is the hash itself
drepDelegationID=$(${bech32_bin} "drep" <<< "${drepDelegationHASH}" 2> /dev/null)
if [[ $? -eq 0 ]]; then
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";
fi
;;
#normal drep-id or drep-script-id
case "${drepDelegationHASH%%-*}" in
"keyHash") drepDelegationID=$(${bech32_bin} "drep" <<< "${drepDelegationHASH##*-}" 2> /dev/null)
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";
;;
"scriptHash") drepDelegationID=$(${bech32_bin} "drep_script" <<< "${drepDelegationHASH##*-}" 2> /dev/null)
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";
;;
*) #unknown type
echo -e " \t\e[0mVoting-Power of Staking Address is delegated to DRep-HASH: \e[32m${drepDelegationHASH}\e[0m\n";
;;
esac
;;

esac

echo
Expand Down
20 changes: 16 additions & 4 deletions cardano/testnet/01_workOffline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,15 @@ case ${action} in
case ${workMode} in

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

"light") #lightmode
Expand Down Expand Up @@ -180,9 +186,15 @@ case ${action} in
case ${workMode} in

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

"light") #lightmode
Expand Down
18 changes: 12 additions & 6 deletions cardano/testnet/03c_checkStakingAddrOnChain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,18 @@ if [[ ${typeOfAddr} == ${addrTypeStake} ]]; then #Staking Address
;;

*)
#normal drep-id
drepDelegationHASH=${drepDelegationHASH: -56} #last 56chars of the entry is the hash itself
drepDelegationID=$(${bech32_bin} "drep" <<< "${drepDelegationHASH}" 2> /dev/null)
if [[ $? -eq 0 ]]; then
echo -e "\e[0mVoting-Power of Staking Address is delegated to DRepID(HASH): \e[32m${drepDelegationID}\e[0m (\e[94m${drepDelegationHASH}\e[0m)\n";
fi
#normal drep-id or drep-script-id
case "${drepDelegationHASH%%-*}" in
"keyHash") drepDelegationID=$(${bech32_bin} "drep" <<< "${drepDelegationHASH##*-}" 2> /dev/null)
echo -e "\e[0mVoting-Power of Staking Address is delegated to DRepID(HASH): \e[32m${drepDelegationID}\e[0m (\e[94m${drepDelegationHASH##*-}\e[0m)\n";
;;
"scriptHash") drepDelegationID=$(${bech32_bin} "drep_script" <<< "${drepDelegationHASH##*-}" 2> /dev/null)
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";
;;
*) drepDelegationID="" #unknown type
echo -e "\e[0mVoting-Power of Staking Address is delegated to DRep-HASH: \e[32m${drepDelegationHASH}\e[0m\n";
;;
esac
;;
esac

Expand Down
Loading

0 comments on commit 05fff6f

Please sign in to comment.