From a8fee6e2b635b0c341a14c6408857e957de615c3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Raynaud Date: Fri, 28 Jun 2024 16:07:49 +0200 Subject: [PATCH] fix: make devnet work with '8.9.1+' --- .../mithril-devnet/mkfiles/mkfiles-cardano.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mithril-test-lab/mithril-devnet/mkfiles/mkfiles-cardano.sh b/mithril-test-lab/mithril-devnet/mkfiles/mkfiles-cardano.sh index f090a6ba917..9a09eb634c2 100644 --- a/mithril-test-lab/mithril-devnet/mkfiles/mkfiles-cardano.sh +++ b/mithril-test-lab/mithril-devnet/mkfiles/mkfiles-cardano.sh @@ -89,19 +89,25 @@ if [ "${CARDANO_NODE_VERSION_RELEASE}" = "8.1.2" ]; then fi if [ $(version_lt "${CARDANO_NODE_VERSION_RELEASE}" "8.8.0") = "false" ]; then - # Fix >=8.8.0, to avoid the following errors: 'Command failed: genesis create-staked Error: Error: Error while decoding Shelley genesis at: ./temp/genesis.conway.spec.json Error: Error in $.poolVotingThresholds: key "motionNoConfidence" not found + # Fix >=8.8.0, to avoid the following errors: 'Command failed: genesis create-staked Error: Error: Error while decoding Shelley genesis at: ./temp/genesis.conway.spec.json Error: Error in $.poolVotingThresholds: key "motionNoConfidence" not found' mv ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp && cat ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp | jq '. += {"poolVotingThresholds": {"motionNoConfidence": 0.51, "committeeNormal": 0.51, "committeeNoConfidence": 0.51, "hardForkInitiation": 0.51, "ppSecurityGroup": 0.51}, "dRepVotingThresholds": {"motionNoConfidence": 0.51, "committeeNormal": 0.51, "committeeNoConfidence": 0.51, "updateToConstitution": 0.51, "hardForkInitiation": 0.51, "ppNetworkGroup": 0.51, "ppEconomicGroup": 0.51, "ppTechnicalGroup": 0.51, "ppGovGroup": 0.51, "treasuryWithdrawal": 0.51}}' > ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json && rm ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp cat ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json fi +if [ $(version_lt "${CARDANO_NODE_VERSION_RELEASE}" "8.9.1") = "false" ]; then + # Fix >=8.9.1, to avoid the following errors: 'Command failed: genesis create-staked Error: Error while decoding Shelley genesis at: ./temp/genesis.conway.spec.json Error: Error in $.committee: key "quorum" not found' + mv ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp && cat ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp | jq '. += {"committee": {"quorum": 0.51, "members": {}}}' > ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json && rm ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp + cat ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json +fi + if [ $(version_lt "${CARDANO_NODE_VERSION_RELEASE}" "8.10.0") = "false" ]; then - # Fix >=8.10.0, to avoid the following errors: 'Command failed: genesis create-staked Error: Error while decoding Shelley genesis at: ./temp/genesis.conway.spec.json Error: Error in $: key "minFeeRefScriptCostPerByte" not found + # Fix >=8.10.0, to avoid the following errors: 'Command failed: genesis create-staked Error: Error while decoding Shelley genesis at: ./temp/genesis.conway.spec.json Error: Error in $: key "minFeeRefScriptCostPerByte" not found' mv ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp && cat ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp | jq '. += {"minFeeRefScriptCostPerByte": 0, "committee": {"members": {}, "threshold": 0.67}}' > ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json && rm ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp cat ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json fi if [ $(version_lt "${CARDANO_NODE_VERSION_RELEASE}" "8.11.0") = "false" ]; then - # Fix >=8.11.0, to avoid the following errors: 'Command failed: genesis create-staked Error: Error while decoding Shelley genesis at: ./temp/genesis.conway.spec.json Error: Error in $: key "plutusV3CostModel" not found + # Fix >=8.11.0, to avoid the following errors: 'Command failed: genesis create-staked Error: Error while decoding Shelley genesis at: ./temp/genesis.conway.spec.json Error: Error in $: key "plutusV3CostModel" not found' mv ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp && cat ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp | jq '. += {"plutusV3CostModel": []}' > ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json && rm ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp cat ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json fi