Skip to content

Commit

Permalink
Governance-Update / CLI 10.2.0 / More accurate voting results
Browse files Browse the repository at this point in the history
- Multiple changes to scripts 24a_genVote.sh and 24c_queryVote.sh:
  * Pool-DefaultVoting behavior via the Pool-Rewards-Account delegation is now taken into account for calculating correct voting results
  * Calculating AutoAbstain for inactive dRep-VotingPower is now taken into account for calculating correct voting results
- Node 10.1.4 is now the minimum version (Hotfix-Version)
- CLI 10.2.0 is now the minimum version (adds needed queries)
  • Loading branch information
gitmachtl committed Jan 11, 2025
1 parent dc9c46a commit c20f2d0
Show file tree
Hide file tree
Showing 9 changed files with 1,334 additions and 1,008 deletions.
17 changes: 11 additions & 6 deletions cardano/mainnet/00_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ case "${network,,}" in
_adahandleAPI="https://api.handle.me" #Adahandle-API URLs -> autoresolve into ${adahandleAPI}
_catalystAPI="https://api.projectcatalyst.io/api/v1" #Catalyst-API URLs -> autoresolve into ${catalystAPI}
_lightModeParametersURL="https://uptime.live/data/cardano/parms/mainnet-parameters.json" #Parameters-JSON-File with current informations about cardano-cli version, tip, era, protocol-parameters
_guardrailScriptUTXO="dc06746a898fd230f164f47a3d749348b65655b8fb388ff275f54d62891653e2#0"
_guardrailScriptSize=2132
;;


Expand Down Expand Up @@ -252,7 +254,7 @@ case "${network,,}" in
_adahandleAPI=
_catalystAPI= #Catalyst-API URLs -> autoresolve into ${catalystAPI}
_lightModeParametersURL="https://uptime.live/data/cardano/parms/sanchonet-parameters.json" #Parameters-JSON-File with current informations about cardano-cli version, tip, era, protocol-parameters
_guardrailScriptUTXO="8b9163fa38914b45470a5426c27939cfb77628f0c54d08b0b61b9905c2cbfc2b#0"
# _guardrailScriptUTXO="8b9163fa38914b45470a5426c27939cfb77628f0c54d08b0b61b9905c2cbfc2b#0"
_guardrailScriptSize=2132
;;

Expand Down Expand Up @@ -300,15 +302,15 @@ 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="10.1.0" #minimum allowed cli version for this script-collection version
minCliVersion="10.2.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="10.1.0" #minimum allowed node version for this script-collection version
minNodeVersion="10.1.4" #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=${ENV_MINLEDGERCARDANOAPPVERSION:-"7.1.1"} #minimum version for the cardano-app on the Ledger HW-Wallet
minTrezorCardanoAppVersion="2.7.2" #minimum version for the firmware on the Trezor HW-Wallet
minKeystoneCardanoAppVersion="1.7.7" #minimum version for the firmware on the Keystone HW-Wallet
minHardwareCliVersion="1.15.0" #minimum version for the cardano-hw-cli
minCardanoSignerVersion="1.18.0" #minimum version for the cardano-signer binary
minCardanoSignerVersion="1.20.1" #minimum version for the cardano-signer binary
minCatalystToolboxVersion="0.5.0" #minimum version for the catalyst-toolbox binary

#Defaults - Variables and Constants
Expand Down Expand Up @@ -542,8 +544,11 @@ case ${workMode} in
if [[ "${koiosApiToken}" != "" ]]; then
result=$(jq -R 'split(".") | .[1] | @base64d | fromjson' <<< "${koiosApiToken}" 2> /dev/null)
if [[ $? -ne 0 ]]; then majorError "The provided koiosApiToken '${koiosApiToken}'\nis not a valid one! Please recheck for typos, register a new one or leave the koiosApiToken="" entry empty."; exit 1; fi
{ read koiosApiExpireDate; read koiosApiTier; read koiosApiProjID; } <<< $( jq -r ".exp // -1, .tier, .projID // \"---\"" <<< ${result} 2> /dev/null)
if [[ ${koiosApiExpireDate} -gt 0 ]]; then koiosApiExpireDate=$(date --date="@${koiosApiExpireDate}"); fi #get the local expire date from the utc seconds since unix-time-start
{ read koiosApiExpireTime; read koiosApiTier; read koiosApiProjID; } <<< $( jq -r ".exp // -1, .tier, .projID // \"---\"" <<< ${result} 2> /dev/null)
if [[ ${koiosApiExpireTime} -gt 0 ]]; then
koiosApiExpireDate=$(date --date="@${koiosApiExpireTime}");
if [[ $(bc <<< "${koiosApiExpireTime} < $(date -u +%s)") -eq 1 ]]; then koiosApiExpireDate+=" \e[35m!!! expired !!!\e[0m"; fi
fi #get the local expire date from the utc seconds since unix-time-start
case ${koiosApiTier} in
"1") koiosApiTier="Free-Tier";;
"2") koiosApiTier="Pro-Tier";;
Expand Down
880 changes: 451 additions & 429 deletions cardano/mainnet/24a_genVote.sh

Large diffs are not rendered by default.

270 changes: 203 additions & 67 deletions cardano/mainnet/24c_queryVote.sh

Large diffs are not rendered by default.

Binary file modified cardano/mainnet/cardano-signer
Binary file not shown.
8 changes: 4 additions & 4 deletions cardano/mainnet/sha256sum_sposcripts.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
a0399e2a6c2b498907763796516807cfe2caf57d090ea0c90dce65806779dfe5 00_common.sh
6016da663ff1587883b462f7bb51155c29cd2afa739f4ce1e0a1ba9bdf203f84 00_common.sh
fe214ceb1043db48867277a647fcc9b60fec8819166eb44a35b1893e4a7aa9a0 01_claimRewards.sh
8f98ef3f0983ed12ba714390b9a528ccf06b41f51dfcd1d52c50d86f038455c8 01_protectKey.sh
4d3797b4afbb09920067ace5e35c987ed182dfc4b54d54de40a3a531b452fa0d 01_queryAddress.sh
Expand Down Expand Up @@ -42,12 +42,12 @@ d0d27aff25b7407380fcd609881e7bb9e14deeaf5abab54c7528c90d0d329eb3 21d_retDRepCer
6162bcba0ec0c2347c5c1b4e0c8c267bc7db09a517ba40bcc5936a6cd8dc9f66 23c_regComAuthCert.sh
c927edc17422334e7daf3157bed4519e04310df097a98bfb73219677dfe6a406 23d_checkComOnChain.sh
172052fdc7b506f9fe8324aadd5dc8735f322864e7494094cd4283c236a20b6a 23e_retComColdKeys.sh
d2094bb0bfe991f56715530bf97a3243fb03f981089f6a1b635a332d87e0a6a0 24a_genVote.sh
b688e008322234dd8158e63d9ac9cdeeb46e5136fc055e490331ad91ea36b8fa 24a_genVote.sh
5ced5419f35f37017381262a8f74b2db6460c994d7c49119856bab740703888e 24b_regVote.sh
1010f3230c3db488c8433e16bd1d889a5e7cc112a74acbdb8865955953abb7bc 24c_queryVote.sh
264230119e0e6e20a455a30c3fd7b98d68d54a848b33195e15ce7d5999dd781e 24c_queryVote.sh
85f0b2f5856f515cf7716452a944376af71e378db5516e5e508a2c4fa1592ad2 25a_genAction.sh
096e590e6f3cad16e910b65eec6929eb5b7475b1be79b1a908e4d57e6ee61bd8 25b_regAction.sh
b7b13da87eeafe5dbd0f0d1810e2f4e69dc02c8c1e0697f8c7847740dc73a4fb bech32
6c5df521e2848c6767f878bbe81a7ec077ff8d1b0dbd01819aea45e1701d5a4a token-metadata-creator
0ae1c4ae68451994edceafc2282af23ef5f1fdd641efb907c769ef135c701e03 catalyst-toolbox
6549942cd21978a95325a99914e4287a962600e5ac21d5533dcee9bf4bb36036 cardano-signer
e56039e673e23cda01239c7945a70f35a791529c53626b298fedaff906930b01 cardano-signer
17 changes: 11 additions & 6 deletions cardano/testnet/00_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ case "${network,,}" in
_adahandleAPI="https://api.handle.me" #Adahandle-API URLs -> autoresolve into ${adahandleAPI}
_catalystAPI="https://api.projectcatalyst.io/api/v1" #Catalyst-API URLs -> autoresolve into ${catalystAPI}
_lightModeParametersURL="https://uptime.live/data/cardano/parms/mainnet-parameters.json" #Parameters-JSON-File with current informations about cardano-cli version, tip, era, protocol-parameters
_guardrailScriptUTXO="dc06746a898fd230f164f47a3d749348b65655b8fb388ff275f54d62891653e2#0"
_guardrailScriptSize=2132
;;


Expand Down Expand Up @@ -252,7 +254,7 @@ case "${network,,}" in
_adahandleAPI=
_catalystAPI= #Catalyst-API URLs -> autoresolve into ${catalystAPI}
_lightModeParametersURL="https://uptime.live/data/cardano/parms/sanchonet-parameters.json" #Parameters-JSON-File with current informations about cardano-cli version, tip, era, protocol-parameters
_guardrailScriptUTXO="8b9163fa38914b45470a5426c27939cfb77628f0c54d08b0b61b9905c2cbfc2b#0"
# _guardrailScriptUTXO="8b9163fa38914b45470a5426c27939cfb77628f0c54d08b0b61b9905c2cbfc2b#0"
_guardrailScriptSize=2132
;;

Expand Down Expand Up @@ -300,15 +302,15 @@ 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="10.1.0" #minimum allowed cli version for this script-collection version
minCliVersion="10.2.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="10.1.0" #minimum allowed node version for this script-collection version
minNodeVersion="10.1.4" #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=${ENV_MINLEDGERCARDANOAPPVERSION:-"7.1.1"} #minimum version for the cardano-app on the Ledger HW-Wallet
minTrezorCardanoAppVersion="2.7.2" #minimum version for the firmware on the Trezor HW-Wallet
minKeystoneCardanoAppVersion="1.7.7" #minimum version for the firmware on the Keystone HW-Wallet
minHardwareCliVersion="1.15.0" #minimum version for the cardano-hw-cli
minCardanoSignerVersion="1.18.0" #minimum version for the cardano-signer binary
minCardanoSignerVersion="1.20.1" #minimum version for the cardano-signer binary
minCatalystToolboxVersion="0.5.0" #minimum version for the catalyst-toolbox binary

#Defaults - Variables and Constants
Expand Down Expand Up @@ -542,8 +544,11 @@ case ${workMode} in
if [[ "${koiosApiToken}" != "" ]]; then
result=$(jq -R 'split(".") | .[1] | @base64d | fromjson' <<< "${koiosApiToken}" 2> /dev/null)
if [[ $? -ne 0 ]]; then majorError "The provided koiosApiToken '${koiosApiToken}'\nis not a valid one! Please recheck for typos, register a new one or leave the koiosApiToken="" entry empty."; exit 1; fi
{ read koiosApiExpireDate; read koiosApiTier; read koiosApiProjID; } <<< $( jq -r ".exp // -1, .tier, .projID // \"---\"" <<< ${result} 2> /dev/null)
if [[ ${koiosApiExpireDate} -gt 0 ]]; then koiosApiExpireDate=$(date --date="@${koiosApiExpireDate}"); fi #get the local expire date from the utc seconds since unix-time-start
{ read koiosApiExpireTime; read koiosApiTier; read koiosApiProjID; } <<< $( jq -r ".exp // -1, .tier, .projID // \"---\"" <<< ${result} 2> /dev/null)
if [[ ${koiosApiExpireTime} -gt 0 ]]; then
koiosApiExpireDate=$(date --date="@${koiosApiExpireTime}");
if [[ $(bc <<< "${koiosApiExpireTime} < $(date -u +%s)") -eq 1 ]]; then koiosApiExpireDate+=" \e[35m!!! expired !!!\e[0m"; fi
fi #get the local expire date from the utc seconds since unix-time-start
case ${koiosApiTier} in
"1") koiosApiTier="Free-Tier";;
"2") koiosApiTier="Pro-Tier";;
Expand Down
Loading

0 comments on commit c20f2d0

Please sign in to comment.