Skip to content

Commit 7e268b7

Browse files
committed
chore: remove hacks for Cardano '8.1.2' in devnet
1 parent e644856 commit 7e268b7

File tree

4 files changed

+5
-33
lines changed

4 files changed

+5
-33
lines changed

mithril-test-lab/mithril-devnet/mkfiles/mkfiles-cardano.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ $CARDANO_CLI byron genesis genesis \
8585
cp $SCRIPT_DIRECTORY/configuration/babbage/alonzo-babbage-test-genesis.json "${ARTIFACTS_DIR_TEMP}/genesis.alonzo.spec.json"
8686
cp $SCRIPT_DIRECTORY/configuration/babbage/conway-babbage-test-genesis.json "${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json"
8787

88-
if [ "${CARDANO_NODE_VERSION_RELEASE}" = "8.1.2" ]; then
89-
# Fix 8.1.2, to avoid the following error: 'Command failed: genesis create-staked Error: Error while decoding Shelley genesis at: example/genesis.conway.spec.json Error: Error in $: key "genDelegs" not found'
90-
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 '. += {"genDelegs":{}}' > ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json && rm ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp
91-
fi
92-
9388
if [ $(version_lt "${CARDANO_NODE_VERSION_RELEASE}" "8.8.0") = "false" ]; then
9489
# 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'
9590
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

mithril-test-lab/mithril-devnet/mkfiles/mkfiles-mithril-delegation.sh

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ CURRENT_CARDANO_ERA=\$(CARDANO_NODE_SOCKET_PATH=node-pool${N}/ipc/node.sock $CAR
1010
| jq -r '.era |= ascii_downcase | .era')
1111
echo ">>>> Current Cardano Era: \${CURRENT_CARDANO_ERA}"
1212
13-
# Fix: era related command is not (well) supported in Cardano node version '8.1.2'
14-
if [ "${CARDANO_NODE_VERSION}" = "8.1.2" ]; then
15-
CURRENT_CARDANO_ERA=""
16-
fi
17-
1813
# Get the current epoch
1914
CURRENT_EPOCH=\$(CARDANO_NODE_SOCKET_PATH=node-pool${N}/ipc/node.sock $CARDANO_CLI query tip \\
2015
--cardano-mode \\
@@ -65,19 +60,11 @@ EOF
6560
# User N will delegate to pool N
6661
for N in ${POOL_NODES_N}; do
6762
cat >> delegate.sh <<EOF
68-
if [ \$(version_lte "${CARDANO_NODE_VERSION_RELEASE}" "8.1.2") == "false" ]; then
69-
# Stake address delegation certs
70-
$CARDANO_CLI \${CURRENT_CARDANO_ERA} stake-address stake-delegation-certificate \
71-
--stake-verification-key-file addresses/user${N}-stake.vkey \
72-
--cold-verification-key-file node-pool${N}/shelley/cold.vkey \
73-
--out-file addresses/user${N}-stake.deleg.cert
74-
else
75-
# Legacy stake address delegation certs
76-
$CARDANO_CLI \${CURRENT_CARDANO_ERA} stake-address delegation-certificate \
77-
--stake-verification-key-file addresses/user${N}-stake.vkey \
78-
--cold-verification-key-file node-pool${N}/shelley/cold.vkey \
79-
--out-file addresses/user${N}-stake.deleg.cert
80-
fi
63+
# Stake address delegation certs
64+
$CARDANO_CLI \${CURRENT_CARDANO_ERA} stake-address stake-delegation-certificate \
65+
--stake-verification-key-file addresses/user${N}-stake.vkey \
66+
--cold-verification-key-file node-pool${N}/shelley/cold.vkey \
67+
--out-file addresses/user${N}-stake.deleg.cert
8168
8269
EOF
8370
done

mithril-test-lab/mithril-devnet/mkfiles/mkfiles-mithril-era.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ function send_funds_to_era_address {
6262
| jq -r '.era |= ascii_downcase | .era')
6363
echo ">>>> Current Cardano Era: \${CURRENT_CARDANO_ERA}"
6464
65-
# Fix: era related command is not (well) supported in Cardano node version '8.1.2'
66-
if [ "${CARDANO_NODE_VERSION}" = "8.1.2" ]; then
67-
CURRENT_CARDANO_ERA=""
68-
fi
69-
7065
# Get current Cardano block
7166
CURRENT_CARDANO_BLOCK=\$(CARDANO_NODE_SOCKET_PATH=node-pool${N}/ipc/node.sock $CARDANO_CLI query tip \\
7267
--testnet-magic ${NETWORK_MAGIC} \\

mithril-test-lab/mithril-devnet/mkfiles/mkfiles-mithril-payment.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,6 @@ cat >> payment-mithril.sh <<EOF
7777
| jq -r '.era |= ascii_downcase | .era')
7878
echo ">>>>>> Current Cardano Era: \${CURRENT_CARDANO_ERA}"
7979
80-
# Fix: era related command is not (well) supported in Cardano node version '8.1.2'
81-
if [ "${CARDANO_NODE_VERSION}" = "8.1.2" ]; then
82-
CURRENT_CARDANO_ERA=""
83-
fi
84-
8580
# Set the amount to be transferred
8681
AMOUNT_TRANSFERRED=\$(( 2000000 + 10 * ${i} + j))
8782
echo ">>>>>> Send funds: \${AMOUNT_TRANSFERRED} Lovelace from 'utxo${i}.addr' to '${ADDR_RX}.addr'"

0 commit comments

Comments
 (0)