From 42760cbefebf50c98adaa2ddaad0add1213bc2b0 Mon Sep 17 00:00:00 2001 From: Mircea Hasegan Date: Thu, 7 Nov 2024 10:51:35 +0100 Subject: [PATCH] fixup! chore: upgrade versions --- .../e2e/local-network/scripts/make-babbage.sh | 8 +- .../e2e/local-network/scripts/mint-handles.sh | 16 +- .../e2e/local-network/scripts/mint-tokens.sh | 8 +- .../scripts/plutus-transaction.sh | 12 +- .../scripts/pools/update-node-utils.sh | 144 +++++++++--------- .../scripts/reference-input-transaction.sh | 42 ++--- .../scripts/setup-new-delegator-keys.sh | 24 +-- .../local-network/scripts/setup-wallets.sh | 6 +- packages/e2e/local-network/scripts/start.sh | 3 +- 9 files changed, 133 insertions(+), 130 deletions(-) diff --git a/packages/e2e/local-network/scripts/make-babbage.sh b/packages/e2e/local-network/scripts/make-babbage.sh index 513f3fee5c1..5cc4f437a1b 100755 --- a/packages/e2e/local-network/scripts/make-babbage.sh +++ b/packages/e2e/local-network/scripts/make-babbage.sh @@ -154,7 +154,7 @@ echo "ExperimentalHardForksEnabled: True" >> "${ROOT}/configuration.yaml" echo "ExperimentalProtocolsEnabled: True" >> "${ROOT}/configuration.yaml" # Copy the cost mode -cardano-cli conway genesis create-staked --genesis-dir "${ROOT}" \ +cardano-cli latest genesis create-staked --genesis-dir "${ROOT}" \ --testnet-magic "${NETWORK_MAGIC}" \ --gen-pools ${NUM_SP_NODES} \ --supply ${MAX_SUPPLY} \ @@ -292,9 +292,9 @@ sed_i -E "s/\"startTime\": [0-9]+/\"startTime\": ${timeUnix}/" ${ROOT}/genesis/b sed_i -E "s/\"systemStart\": \".*\"/\"systemStart\": \"${timeISO}\"/" ${ROOT}/genesis/shelley/genesis.json byronGenesisHash=$(cardano-cli byron genesis print-genesis-hash --genesis-json ${ROOT}/genesis/byron/genesis.json) -shelleyGenesisHash=$(cardano-cli conway genesis hash --genesis ${ROOT}/genesis/shelley/genesis.json) -alonzoGenesisHash=$(cardano-cli conway genesis hash --genesis ${ROOT}/genesis/shelley/genesis.alonzo.json) -conwayGenesisHash=$(cardano-cli conway genesis hash --genesis ${ROOT}/genesis/shelley/genesis.conway.json) +shelleyGenesisHash=$(cardano-cli latest genesis hash --genesis ${ROOT}/genesis/shelley/genesis.json) +alonzoGenesisHash=$(cardano-cli latest genesis hash --genesis ${ROOT}/genesis/shelley/genesis.alonzo.json) +conwayGenesisHash=$(cardano-cli latest genesis hash --genesis ${ROOT}/genesis/shelley/genesis.conway.json) echo "Byron genesis hash: $byronGenesisHash" echo "Shelley genesis hash: $shelleyGenesisHash" diff --git a/packages/e2e/local-network/scripts/mint-handles.sh b/packages/e2e/local-network/scripts/mint-handles.sh index 68ee3007a6d..65b148ce14c 100755 --- a/packages/e2e/local-network/scripts/mint-handles.sh +++ b/packages/e2e/local-network/scripts/mint-handles.sh @@ -34,7 +34,7 @@ cat >network-files/utxo-keys/minting-policy.json <network-files/utxo-keys/handles-metadata.json <network-files/utxo-keys/handles68-datum.json < 283232322968616e646c653638 handle68tokenList="1 ${policyid}.283232322968616e646c653638" -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --change-address "$addr" \ --tx-in "$utxo" \ --tx-out "$destAddr"+10000000+"$handle68tokenList" \ @@ -127,11 +127,13 @@ cardano-cli conway transaction build \ --testnet-magic 888 \ --out-file handle68-tx.raw -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file handle68-tx.raw \ --signing-key-file network-files/utxo-keys/payment.skey \ --testnet-magic 888 \ --out-file handle68-tx.signed -cardano-cli conway transaction submit --testnet-magic 888 --tx-file handle68-tx.signed +cardano-cli latest transaction submit --testnet-magic 888 --tx-file handle68-tx.signed wait_tx_complete $utxo + +sync diff --git a/packages/e2e/local-network/scripts/mint-tokens.sh b/packages/e2e/local-network/scripts/mint-tokens.sh index c305d3be394..f0c57a04d86 100755 --- a/packages/e2e/local-network/scripts/mint-tokens.sh +++ b/packages/e2e/local-network/scripts/mint-tokens.sh @@ -33,7 +33,7 @@ cat >network-files/utxo-keys/minting-policy.json < ${SP_NODE_ID}/fullUtxo.out @@ -53,15 +53,15 @@ updatePool() { # Pool metadata hash (only compute it if a metadata url has been given) if [ -n "$6" ]; then METADATA_URL="$6" - METADATA_HASH=$(cardano-cli conway stake-pool metadata-hash --pool-metadata-file <(curl -s -L -k "${METADATA_URL}")) + METADATA_HASH=$(cardano-cli latest stake-pool metadata-hash --pool-metadata-file <(curl -s -L -k "${METADATA_URL}")) fi # get the protocol parameters - cardano-cli conway query protocol-parameters --testnet-magic 888 --out-file ${SP_NODE_ID}/params.json + cardano-cli latest query protocol-parameters --testnet-magic 888 --out-file ${SP_NODE_ID}/params.json genesisVKey=network-files/utxo-keys/utxo${SP_NODE_ID}.vkey genesisSKey=network-files/utxo-keys/utxo${SP_NODE_ID}.skey - genesisAddr=$(cardano-cli conway address build --payment-verification-key-file "$genesisVKey" --testnet-magic 888) + genesisAddr=$(cardano-cli latest address build --payment-verification-key-file "$genesisVKey" --testnet-magic 888) stakeVKey=network-files/pools/staking-reward"${SP_NODE_ID}".vkey stakeKey=network-files/pools/staking-reward"${SP_NODE_ID}".skey @@ -75,27 +75,27 @@ updatePool() { keyDeposit=2000000 - POOL_ID=$(cardano-cli conway stake-pool id --cold-verification-key-file "$coldVKey" --output-format "hex") + POOL_ID=$(cardano-cli latest stake-pool id --cold-verification-key-file "$coldVKey" --output-format "hex") # funding pool owner stake address - stakeAddr=$(cardano-cli conway address build --payment-verification-key-file "$genesisVKey" --stake-verification-key-file "$stakeVKey" --testnet-magic 888) + stakeAddr=$(cardano-cli latest address build --payment-verification-key-file "$genesisVKey" --stake-verification-key-file "$stakeVKey" --testnet-magic 888) currentBalance=$(getAddressBalance "$stakeAddr") - utxo=$(cardano-cli conway query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') + utxo=$(cardano-cli query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') - cardano-cli conway transaction build \ + cardano-cli latest transaction build \ --change-address "$genesisAddr" \ --tx-in "$utxo" \ --tx-out "$stakeAddr"+"$POOL_OWNER_STAKE" \ --testnet-magic 888 \ --out-file ${SP_NODE_ID}/wallets-tx.raw 2>&1 - cardano-cli conway transaction sign \ + cardano-cli latest transaction sign \ --tx-body-file ${SP_NODE_ID}/wallets-tx.raw \ --signing-key-file "$genesisSKey" \ --testnet-magic 888 \ --out-file ${SP_NODE_ID}/wallets-tx.signed 2>&1 - cardano-cli conway transaction submit --testnet-magic 888 --tx-file ${SP_NODE_ID}/wallets-tx.signed 2>&1 + cardano-cli latest transaction submit --testnet-magic 888 --tx-file ${SP_NODE_ID}/wallets-tx.signed 2>&1 updatedBalance=$(getAddressBalance "$stakeAddr") @@ -106,14 +106,14 @@ updatePool() { # register pool owner stake address currentBalance=$(getAddressBalance "$genesisAddr") - cardano-cli conway stake-address registration-certificate \ + cardano-cli latest stake-address registration-certificate \ --key-reg-deposit-amt ${keyDeposit} \ --stake-verification-key-file "$stakeVKey" \ --out-file ${SP_NODE_ID}/pool-owner-registration.cert - utxo=$(cardano-cli conway query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') + utxo=$(cardano-cli query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') - cardano-cli conway transaction build-raw \ + cardano-cli latest transaction build-raw \ --tx-in "$utxo" \ --tx-out "$genesisAddr"+0 \ --invalid-hereafter 5000000 \ @@ -121,16 +121,16 @@ updatePool() { --out-file ${SP_NODE_ID}/tx.raw \ --certificate ${SP_NODE_ID}/pool-owner-registration.cert - refScriptSize=$(cardano-cli conway query ref-script-size \ + refScriptSize=$(cardano-cli latest query ref-script-size \ --tx-in "$utxo" \ --testnet-magic 888 \ --output-json | jq '.refInputScriptSize') # Upon applying the fee, the tx size could increase, rendering the fee insuficient - # Calculate it twice, once with fee 0, then with the calculated fee, to minimise the + # Calculate it twice, once with fee 0, then with the calculated fee, to minimise the # chance that the tx size increases the second time for i in {1..2}; do - fee=$(cardano-cli conway transaction calculate-min-fee \ + fee=$(cardano-cli latest transaction calculate-min-fee \ --reference-script-size $refScriptSize \ --tx-body-file ${SP_NODE_ID}/tx.raw \ --tx-in-count 1 \ @@ -143,7 +143,7 @@ updatePool() { initialBalance=$(getAddressBalance "$genesisAddr") txOut=$((initialBalance - fee - keyDeposit)) - cardano-cli conway transaction build-raw \ + cardano-cli latest transaction build-raw \ --tx-in "$utxo" \ --tx-out "$genesisAddr"+"$txOut" \ --invalid-hereafter 5000000 \ @@ -152,14 +152,14 @@ updatePool() { --out-file ${SP_NODE_ID}/tx.raw done - cardano-cli conway transaction sign \ + cardano-cli latest transaction sign \ --tx-body-file ${SP_NODE_ID}/tx.raw \ --signing-key-file "$genesisSKey" \ --signing-key-file "$stakeKey" \ --testnet-magic 888 \ --out-file ${SP_NODE_ID}/tx.signed - cardano-cli conway transaction submit \ + cardano-cli latest transaction submit \ --tx-file ${SP_NODE_ID}/tx.signed \ --testnet-magic 888 @@ -172,14 +172,14 @@ updatePool() { # delegating pool owner stake currentBalance=$(getAddressBalance "$genesisAddr") - cardano-cli conway stake-address stake-delegation-certificate \ + cardano-cli latest stake-address stake-delegation-certificate \ --stake-verification-key-file "$stakeVKey" \ --cold-verification-key-file "$coldVKey" \ --out-file ${SP_NODE_ID}/pool-owner-delegation.cert - utxo=$(cardano-cli conway query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') + utxo=$(cardano-cli query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') - cardano-cli conway transaction build-raw \ + cardano-cli latest transaction build-raw \ --tx-in "$utxo" \ --tx-out "$genesisAddr"+0 \ --invalid-hereafter 5000000 \ @@ -187,16 +187,16 @@ updatePool() { --out-file ${SP_NODE_ID}/tx.raw \ --certificate ${SP_NODE_ID}/pool-owner-delegation.cert - refScriptSize=$(cardano-cli conway query ref-script-size \ + refScriptSize=$(cardano-cli latest query ref-script-size \ --tx-in "$utxo" \ --testnet-magic 888 \ --output-json | jq '.refInputScriptSize') - + # Upon applying the fee, the tx size could increase, rendering the fee insuficient - # Calculate it twice, once with fee 0, then with the calculated fee, to minimise the + # Calculate it twice, once with fee 0, then with the calculated fee, to minimise the # chance that the tx size increases the second time for i in {1..2}; do - fee=$(cardano-cli conway transaction calculate-min-fee \ + fee=$(cardano-cli latest transaction calculate-min-fee \ --reference-script-size $refScriptSize \ --tx-body-file ${SP_NODE_ID}/tx.raw \ --tx-in-count 1 \ @@ -209,7 +209,7 @@ updatePool() { initialBalance=$(getAddressBalance "$genesisAddr") txOut=$((initialBalance - fee)) - cardano-cli conway transaction build-raw \ + cardano-cli latest transaction build-raw \ --tx-in "$utxo" \ --tx-out "$genesisAddr"+"$txOut" \ --invalid-hereafter 5000000 \ @@ -218,14 +218,14 @@ updatePool() { --out-file ${SP_NODE_ID}/tx.raw done - cardano-cli conway transaction sign \ + cardano-cli latest transaction sign \ --tx-body-file ${SP_NODE_ID}/tx.raw \ --signing-key-file "$genesisSKey" \ --signing-key-file "$stakeKey" \ --testnet-magic 888 \ --out-file ${SP_NODE_ID}/tx.signed - cardano-cli conway transaction submit \ + cardano-cli latest transaction submit \ --tx-file ${SP_NODE_ID}/tx.signed \ --testnet-magic 888 @@ -239,18 +239,18 @@ updatePool() { # register delegator stake address echo "Registering delegator stake certificate ${SP_NODE_ID}..." - paymentAddr=$(cardano-cli conway address build --payment-verification-key-file "$delegatorPaymentKey" --stake-verification-key-file "$delegatorStakeKey" --testnet-magic 888) + paymentAddr=$(cardano-cli latest address build --payment-verification-key-file "$delegatorPaymentKey" --stake-verification-key-file "$delegatorStakeKey" --testnet-magic 888) currentBalance=$(getAddressBalance "$paymentAddr") # create pool delegation certificate - cardano-cli conway stake-address stake-delegation-certificate \ + cardano-cli latest stake-address stake-delegation-certificate \ --stake-verification-key-file "$delegatorStakeKey" \ --stake-pool-id "$POOL_ID" \ --out-file ${SP_NODE_ID}/deleg.cert - utxo=$(cardano-cli conway query utxo --address "$paymentAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') + utxo=$(cardano-cli query utxo --address "$paymentAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') - cardano-cli conway transaction build-raw \ + cardano-cli latest transaction build-raw \ --tx-in "$utxo" \ --tx-out "$paymentAddr"+0 \ --invalid-hereafter 5000000 \ @@ -258,16 +258,16 @@ updatePool() { --out-file ${SP_NODE_ID}/tx.raw \ --certificate ${SP_NODE_ID}/deleg.cert - refScriptSize=$(cardano-cli conway query ref-script-size \ + refScriptSize=$(cardano-cli latest query ref-script-size \ --tx-in "$utxo" \ --testnet-magic 888 \ --output-json | jq '.refInputScriptSize') # Upon applying the fee, the tx size could increase, rendering the fee insuficient - # Calculate it twice, once with fee 0, then with the calculated fee, to minimise the + # Calculate it twice, once with fee 0, then with the calculated fee, to minimise the # chance that the tx size increases the second time for i in {1..2}; do - fee=$(cardano-cli conway transaction calculate-min-fee \ + fee=$(cardano-cli latest transaction calculate-min-fee \ --reference-script-size $refScriptSize \ --tx-body-file ${SP_NODE_ID}/tx.raw \ --tx-in-count 1 \ @@ -280,7 +280,7 @@ updatePool() { initialBalance=$(getAddressBalance "$paymentAddr") txOut=$((initialBalance - fee)) - cardano-cli conway transaction build-raw \ + cardano-cli latest transaction build-raw \ --tx-in "$utxo" \ --tx-out "$paymentAddr"+"$txOut" \ --invalid-hereafter 5000000 \ @@ -289,14 +289,14 @@ updatePool() { --out-file ${SP_NODE_ID}/tx.raw done - cardano-cli conway transaction sign \ + cardano-cli latest transaction sign \ --tx-body-file ${SP_NODE_ID}/tx.raw \ --signing-key-file "$delegatorPaymentSKey" \ --signing-key-file "$delegatorStakeSKey" \ --testnet-magic 888 \ --out-file ${SP_NODE_ID}/tx.signed - cardano-cli conway transaction submit \ + cardano-cli latest transaction submit \ --tx-file ${SP_NODE_ID}/tx.signed \ --testnet-magic 888 @@ -313,7 +313,7 @@ updatePool() { # Only add metadata if given. if [ -n "$6" ]; then - cardano-cli conway stake-pool registration-certificate \ + cardano-cli latest stake-pool registration-certificate \ --cold-verification-key-file "$coldVKey" \ --vrf-verification-key-file "$vrfKey" \ --pool-pledge "$POOL_PLEDGE" \ @@ -328,7 +328,7 @@ updatePool() { --metadata-hash "${METADATA_HASH}" \ --out-file ${SP_NODE_ID}/pool.cert else - cardano-cli conway stake-pool registration-certificate \ + cardano-cli latest stake-pool registration-certificate \ --cold-verification-key-file "$coldVKey" \ --vrf-verification-key-file "$vrfKey" \ --pool-pledge "$POOL_PLEDGE" \ @@ -342,9 +342,9 @@ updatePool() { --out-file ${SP_NODE_ID}/pool.cert fi - utxo=$(cardano-cli conway query utxo --address "$paymentAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') + utxo=$(cardano-cli query utxo --address "$paymentAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') - cardano-cli conway transaction build-raw \ + cardano-cli latest transaction build-raw \ --tx-in "$utxo" \ --tx-out "$paymentAddr"+"$txOut" \ --invalid-hereafter 500000 \ @@ -352,16 +352,16 @@ updatePool() { --certificate-file ${SP_NODE_ID}/pool.cert \ --out-file ${SP_NODE_ID}/tx.raw - refScriptSize=$(cardano-cli conway query ref-script-size \ + refScriptSize=$(cardano-cli latest query ref-script-size \ --tx-in "$utxo" \ --testnet-magic 888 \ --output-json | jq '.refInputScriptSize') # Upon applying the fee, the tx size could increase, rendering the fee insuficient - # Calculate it twice, once with fee 0, then with the calculated fee, to minimise the + # Calculate it twice, once with fee 0, then with the calculated fee, to minimise the # chance that the tx size increases the second time for i in {1..2}; do - fee=$(cardano-cli conway transaction calculate-min-fee \ + fee=$(cardano-cli latest transaction calculate-min-fee \ --reference-script-size $refScriptSize \ --tx-body-file ${SP_NODE_ID}/tx.raw \ --tx-in-count 1 \ @@ -374,7 +374,7 @@ updatePool() { initialBalance=$(getAddressBalance "$paymentAddr") txOut=$((initialBalance - fee)) - cardano-cli conway transaction build-raw \ + cardano-cli latest transaction build-raw \ --tx-in "$utxo" \ --tx-out "$paymentAddr"+"$txOut" \ --invalid-hereafter 500000 \ @@ -383,7 +383,7 @@ updatePool() { --out-file ${SP_NODE_ID}/tx.raw done - cardano-cli conway transaction sign \ + cardano-cli latest transaction sign \ --tx-body-file ${SP_NODE_ID}/tx.raw \ --signing-key-file "$delegatorPaymentSKey" \ --signing-key-file "$coldKey" \ @@ -391,7 +391,7 @@ updatePool() { --testnet-magic 888 \ --out-file ${SP_NODE_ID}/tx.signed - cardano-cli conway transaction submit \ + cardano-cli latest transaction submit \ --tx-file ${SP_NODE_ID}/tx.signed \ --testnet-magic 888 @@ -416,11 +416,11 @@ deregisterPool() { done # get the protocol parameters - cardano-cli conway query protocol-parameters --testnet-magic 888 --out-file ${SP_NODE_ID}/params.json + cardano-cli latest query protocol-parameters --testnet-magic 888 --out-file ${SP_NODE_ID}/params.json genesisVKey=network-files/utxo-keys/utxo${SP_NODE_ID}.vkey genesisSKey=network-files/utxo-keys/utxo${SP_NODE_ID}.skey - genesisAddr=$(cardano-cli conway address build --payment-verification-key-file "$genesisVKey" --testnet-magic 888) + genesisAddr=$(cardano-cli latest address build --payment-verification-key-file "$genesisVKey" --testnet-magic 888) stakeKey=network-files/pools/staking-reward"${SP_NODE_ID}".skey coldVKey=network-files/pools/cold"${SP_NODE_ID}".vkey coldKey=network-files/pools/cold"${SP_NODE_ID}".skey @@ -432,20 +432,20 @@ deregisterPool() { # We are going to redelegate this stake to dbSync can index it properly. echo "Registering delegator stake certificate ${SP_NODE_ID}..." - paymentAddr=$(cardano-cli conway address build --payment-verification-key-file "$delegatorPaymentKey" --stake-verification-key-file "$delegatorStakeKey" --testnet-magic 888) + paymentAddr=$(cardano-cli latest address build --payment-verification-key-file "$delegatorPaymentKey" --stake-verification-key-file "$delegatorStakeKey" --testnet-magic 888) currentBalance=$(getAddressBalance "$paymentAddr") - POOL_ID=$(cardano-cli conway stake-pool id --cold-verification-key-file "$coldVKey" --output-format "hex") + POOL_ID=$(cardano-cli latest stake-pool id --cold-verification-key-file "$coldVKey" --output-format "hex") # create pool delegation certificate - cardano-cli conway stake-address stake-delegation-certificate \ + cardano-cli latest stake-address stake-delegation-certificate \ --stake-verification-key-file "$delegatorStakeKey" \ --stake-pool-id "$POOL_ID" \ --out-file ${SP_NODE_ID}/deleg.cert - utxo=$(cardano-cli conway query utxo --address "$paymentAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') + utxo=$(cardano-cli query utxo --address "$paymentAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') - cardano-cli conway transaction build-raw \ + cardano-cli latest transaction build-raw \ --tx-in "$utxo" \ --tx-out "$paymentAddr"+0 \ --invalid-hereafter 5000000 \ @@ -453,16 +453,16 @@ deregisterPool() { --out-file ${SP_NODE_ID}/tx.raw \ --certificate ${SP_NODE_ID}/deleg.cert - refScriptSize=$(cardano-cli conway query ref-script-size \ + refScriptSize=$(cardano-cli latest query ref-script-size \ --tx-in "$utxo" \ --testnet-magic 888 \ --output-json | jq '.refInputScriptSize') # Upon applying the fee, the tx size could increase, rendering the fee insuficient - # Calculate it twice, once with fee 0, then with the calculated fee, to minimise the + # Calculate it twice, once with fee 0, then with the calculated fee, to minimise the # chance that the tx size increases the second time for i in {1..2}; do - fee=$(cardano-cli conway transaction calculate-min-fee \ + fee=$(cardano-cli latest transaction calculate-min-fee \ --reference-script-size $refScriptSize \ --tx-body-file ${SP_NODE_ID}/tx.raw \ --tx-in-count 1 \ @@ -475,7 +475,7 @@ deregisterPool() { initialBalance=$(getAddressBalance "$paymentAddr") txOut=$((initialBalance - fee)) - cardano-cli conway transaction build-raw \ + cardano-cli latest transaction build-raw \ --tx-in "$utxo" \ --tx-out "$paymentAddr"+"$txOut" \ --invalid-hereafter 5000000 \ @@ -484,14 +484,14 @@ deregisterPool() { --out-file ${SP_NODE_ID}/tx.raw done - cardano-cli conway transaction sign \ + cardano-cli latest transaction sign \ --tx-body-file ${SP_NODE_ID}/tx.raw \ --signing-key-file "$delegatorPaymentSKey" \ --signing-key-file "$delegatorStakeSKey" \ --testnet-magic 888 \ --out-file ${SP_NODE_ID}/tx.signed - cardano-cli conway transaction submit \ + cardano-cli latest transaction submit \ --tx-file ${SP_NODE_ID}/tx.signed \ --testnet-magic 888 @@ -506,14 +506,14 @@ deregisterPool() { echo "Deregister stake pool ${SP_NODE_ID}..." currentBalance=$(getAddressBalance "$genesisAddr") - cardano-cli conway stake-pool deregistration-certificate \ + cardano-cli latest stake-pool deregistration-certificate \ --cold-verification-key-file "$coldVKey" \ --epoch "$RETIRING_EPOCH" \ --out-file ${SP_NODE_ID}/pool.dereg - utxo=$(cardano-cli conway query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') + utxo=$(cardano-cli query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') - cardano-cli conway transaction build-raw \ + cardano-cli latest transaction build-raw \ --tx-in "$utxo" \ --tx-out "$genesisAddr"+0 \ --invalid-hereafter 500000 \ @@ -521,16 +521,16 @@ deregisterPool() { --certificate-file ${SP_NODE_ID}/pool.dereg \ --out-file ${SP_NODE_ID}/tx.raw - refScriptSize=$(cardano-cli conway query ref-script-size \ + refScriptSize=$(cardano-cli latest query ref-script-size \ --tx-in "$utxo" \ --testnet-magic 888 \ --output-json | jq '.refInputScriptSize') - + # Upon applying the fee, the tx size could increase, rendering the fee insuficient - # Calculate it twice, once with fee 0, then with the calculated fee, to minimise the + # Calculate it twice, once with fee 0, then with the calculated fee, to minimise the # chance that the tx size increases the second time for i in {1..2}; do - fee=$(cardano-cli conway transaction calculate-min-fee \ + fee=$(cardano-cli latest transaction calculate-min-fee \ --reference-script-size $refScriptSize \ --tx-body-file ${SP_NODE_ID}/tx.raw \ --tx-in-count 1 \ @@ -543,7 +543,7 @@ deregisterPool() { initialBalance=$(getAddressBalance "$genesisAddr") txOut=$((initialBalance - fee)) - cardano-cli conway transaction build-raw \ + cardano-cli latest transaction build-raw \ --tx-in "$utxo" \ --tx-out "$genesisAddr"+"$txOut" \ --invalid-hereafter 500000 \ @@ -552,7 +552,7 @@ deregisterPool() { --out-file ${SP_NODE_ID}/tx.raw done - cardano-cli conway transaction sign \ + cardano-cli latest transaction sign \ --tx-body-file ${SP_NODE_ID}/tx.raw \ --signing-key-file "$genesisSKey" \ --signing-key-file "$coldKey" \ @@ -560,7 +560,7 @@ deregisterPool() { --testnet-magic 888 \ --out-file ${SP_NODE_ID}/tx.signed - cardano-cli conway transaction submit \ + cardano-cli latest transaction submit \ --tx-file ${SP_NODE_ID}/tx.signed \ --testnet-magic 888 diff --git a/packages/e2e/local-network/scripts/reference-input-transaction.sh b/packages/e2e/local-network/scripts/reference-input-transaction.sh index 296d23a394a..7fd7509aa7e 100755 --- a/packages/e2e/local-network/scripts/reference-input-transaction.sh +++ b/packages/e2e/local-network/scripts/reference-input-transaction.sh @@ -75,7 +75,7 @@ cardano-cli query protocol-parameters \ --testnet-magic 888 \ --out-file pparams.json -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --testnet-magic 888 \ --change-address "$genesisAddr" \ --tx-in "$utxo" \ @@ -83,13 +83,13 @@ cardano-cli conway transaction build \ --tx-out-inline-datum-value 42 \ --out-file tx-script.build -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx-script.build \ --signing-key-file network-files/utxo-keys/utxo2.skey \ --testnet-magic 888 \ --out-file tx-script.signed -cardano-cli conway transaction submit --testnet-magic 888 --tx-file tx-script.signed +cardano-cli latest transaction submit --testnet-magic 888 --tx-file tx-script.signed updatedBalance=$(getAddressBalance "$REFERENCE_INPUT_ADDR") @@ -107,7 +107,7 @@ currentBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR") echo "Locking reference script UTXO (Multisignature)..." -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --testnet-magic 888 \ --change-address "$genesisAddr" \ --tx-in "$utxo" \ @@ -115,13 +115,13 @@ cardano-cli conway transaction build \ --tx-out-reference-script-file scripts/contracts/multisignature.json \ --out-file tx-script.build -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx-script.build \ --signing-key-file network-files/utxo-keys/utxo2.skey \ --testnet-magic 888 \ --out-file tx-script.signed -cardano-cli conway transaction submit --testnet-magic 888 --tx-file tx-script.signed +cardano-cli latest transaction submit --testnet-magic 888 --tx-file tx-script.signed updatedBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR") @@ -137,7 +137,7 @@ currentBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR") echo "Locking reference script UTXO (Timelock)..." -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --testnet-magic 888 \ --change-address "$genesisAddr" \ --tx-in "$utxo" \ @@ -145,13 +145,13 @@ cardano-cli conway transaction build \ --tx-out-reference-script-file scripts/contracts/timelock.json \ --out-file tx-script.build -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx-script.build \ --signing-key-file network-files/utxo-keys/utxo2.skey \ --testnet-magic 888 \ --out-file tx-script.signed -cardano-cli conway transaction submit --testnet-magic 888 --tx-file tx-script.signed +cardano-cli latest transaction submit --testnet-magic 888 --tx-file tx-script.signed updatedBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR") @@ -167,7 +167,7 @@ currentBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR") echo "Locking reference script UTXO (Plutus V1)..." -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --testnet-magic 888 \ --change-address "$genesisAddr" \ --tx-in "$utxo" \ @@ -175,13 +175,13 @@ cardano-cli conway transaction build \ --tx-out-reference-script-file scripts/contracts/alwayssucceeds.plutus \ --out-file tx-script.build -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx-script.build \ --signing-key-file network-files/utxo-keys/utxo2.skey \ --testnet-magic 888 \ --out-file tx-script.signed -cardano-cli conway transaction submit --testnet-magic 888 --tx-file tx-script.signed +cardano-cli latest transaction submit --testnet-magic 888 --tx-file tx-script.signed updatedBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR") @@ -197,7 +197,7 @@ currentBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR") echo "Locking reference script UTXO (Plutus V2)..." -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --testnet-magic 888 \ --change-address "$genesisAddr" \ --tx-in "$utxo" \ @@ -205,13 +205,13 @@ cardano-cli conway transaction build \ --tx-out-reference-script-file scripts/contracts/reference-input.plutus \ --out-file tx-script.build -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file tx-script.build \ --signing-key-file network-files/utxo-keys/utxo2.skey \ --testnet-magic 888 \ --out-file tx-script.signed -cardano-cli conway transaction submit --testnet-magic 888 --tx-file tx-script.signed +cardano-cli latest transaction submit --testnet-magic 888 --tx-file tx-script.signed updatedBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR") @@ -226,7 +226,7 @@ echo "Locking funds in script..." utxo=$(awk '{printf("%s", $1)}' <<<"$(getBiggestUtxo "$genesisAddr")") currentBalance=$(getAddressBalance "$REFERENCE_INPUT_SCRIPT_ADDR") -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --testnet-magic 888 \ --tx-in "$utxo" \ --tx-out "$REFERENCE_INPUT_SCRIPT_ADDR"+"$AMOUNT" \ @@ -234,13 +234,13 @@ cardano-cli conway transaction build \ --change-address "$genesisAddr" \ --out-file test-babbage.tx -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file test-babbage.tx \ --signing-key-file network-files/utxo-keys/utxo2.skey \ --testnet-magic 888 \ --out-file test-babbage.signed -cardano-cli conway transaction submit --testnet-magic 888 --tx-file test-babbage.signed +cardano-cli latest transaction submit --testnet-magic 888 --tx-file test-babbage.signed updatedBalance=$(getAddressBalance "$REFERENCE_INPUT_SCRIPT_ADDR") @@ -259,7 +259,7 @@ scriptUtxo=$(awk '{printf("%s", $1)}' <<<"$(getBiggestUtxo "$REFERENCE_INPUT_SCR currentBalance=$(getAddressBalance "$REFERENCE_INPUT_SCRIPT_ADDR") returnCollateralVal=$(("$utxoVal" - 1450000)) -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --testnet-magic 888 \ --tx-in-collateral "$utxo" \ --tx-in "$utxo" \ @@ -273,13 +273,13 @@ cardano-cli conway transaction build \ --tx-total-collateral 1450000 \ --out-file test-babbage2.tx -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file test-babbage2.tx \ --signing-key-file network-files/utxo-keys/utxo2.skey \ --testnet-magic 888 \ --out-file test-babbage2.signed -cardano-cli conway transaction submit --testnet-magic 888 --tx-file test-babbage2.signed +cardano-cli latest transaction submit --testnet-magic 888 --tx-file test-babbage2.signed updatedBalance=$(getAddressBalance "$REFERENCE_INPUT_SCRIPT_ADDR") diff --git a/packages/e2e/local-network/scripts/setup-new-delegator-keys.sh b/packages/e2e/local-network/scripts/setup-new-delegator-keys.sh index 5d5d07e0546..d71f8a50d6a 100755 --- a/packages/e2e/local-network/scripts/setup-new-delegator-keys.sh +++ b/packages/e2e/local-network/scripts/setup-new-delegator-keys.sh @@ -68,7 +68,7 @@ mkdir -p "$DELEGATORS_DIR" # GENERATE NEW PAYMENT KEYS for NODE_ID in ${SP_NODES_ID}; do - cardano-cli conway address key-gen \ + cardano-cli latest address key-gen \ --verification-key-file "${DELEGATORS_DIR}/payment${NODE_ID}.vkey" \ --signing-key-file "${DELEGATORS_DIR}/payment${NODE_ID}.skey" done @@ -76,7 +76,7 @@ done # GENERATE NEW STAKE for NODE_ID in ${SP_NODES_ID}; do - cardano-cli conway stake-address key-gen \ + cardano-cli latest stake-address key-gen \ --verification-key-file "${DELEGATORS_DIR}/staking${NODE_ID}.vkey" \ --signing-key-file "${DELEGATORS_DIR}/staking${NODE_ID}.skey" done @@ -84,7 +84,7 @@ done # BUILD ADDRESSES FOR OUR NEW KEYS for NODE_ID in ${SP_NODES_ID}; do - cardano-cli conway address build \ + cardano-cli latest address build \ --testnet-magic $NETWORK_MAGIC \ --payment-verification-key-file "${DELEGATORS_DIR}/payment${NODE_ID}.vkey" \ --stake-verification-key-file "${DELEGATORS_DIR}/staking${NODE_ID}.vkey" \ @@ -94,7 +94,7 @@ done # BUILD ADDRESSES FOR THE EXISTING KEYS, WE WILL NEED THEM FOR OUR FUTURE TRANSACTIONS for NODE_ID in ${SP_NODES_ID}; do - cardano-cli conway address build \ + cardano-cli latest address build \ --testnet-magic $NETWORK_MAGIC \ --payment-verification-key-file "${UTXO_DIR}/utxo${NODE_ID}.vkey" \ --out-file "${UTXO_DIR}/utxo${NODE_ID}.addr" @@ -107,19 +107,19 @@ currentBalance=$(getAddressBalance "$stakeAddr") echo "Funding stake addresses with ${AMOUNT_PER_DELEGATOR}" for NODE_ID in ${SP_NODES_ID}; do - cardano-cli conway transaction build \ + cardano-cli latest transaction build \ --testnet-magic $NETWORK_MAGIC \ --tx-in "$(cardano-cli query utxo --address "$(cat "${UTXO_DIR}/utxo${NODE_ID}.addr")" --testnet-magic $NETWORK_MAGIC --out-file /dev/stdout | jq -r 'keys[0]')" \ --tx-out "$(cat ${DELEGATORS_DIR}/payment${NODE_ID}.addr)+${AMOUNT_PER_DELEGATOR}" \ --change-address "$(cat ${UTXO_DIR}/utxo${NODE_ID}.addr)" \ --out-file "${TRANSACTIONS_DIR}/tx${NODE_ID}.raw" - cardano-cli conway transaction sign --testnet-magic $NETWORK_MAGIC \ + cardano-cli latest transaction sign --testnet-magic $NETWORK_MAGIC \ --tx-body-file "${TRANSACTIONS_DIR}/tx${NODE_ID}.raw" \ --signing-key-file "${UTXO_DIR}/utxo${NODE_ID}.skey" \ --out-file "${TRANSACTIONS_DIR}/tx${NODE_ID}.signed" - cardano-cli conway transaction submit \ + cardano-cli latest transaction submit \ --testnet-magic $NETWORK_MAGIC \ --tx-file "${TRANSACTIONS_DIR}/tx${NODE_ID}.signed" done @@ -135,7 +135,7 @@ sleep 10 # SHOW THE UTXO DISTRIBUTION -cardano-cli conway query utxo --whole-utxo --testnet-magic $NETWORK_MAGIC +cardano-cli query utxo --whole-utxo --testnet-magic $NETWORK_MAGIC # REGISTER STAKE ADDRESSES @@ -146,12 +146,12 @@ stakeAddr="$(cat "${DELEGATORS_DIR}/payment1.addr")" currentBalance=$(getAddressBalance "$stakeAddr") for NODE_ID in ${SP_NODES_ID}; do - cardano-cli conway stake-address registration-certificate \ + cardano-cli latest stake-address registration-certificate \ --stake-verification-key-file "${DELEGATORS_DIR}/staking${NODE_ID}.vkey" \ --key-reg-deposit-amt ${keyDeposit} \ --out-file "${TRANSACTIONS_DIR}/staking${NODE_ID}reg.cert" - cardano-cli conway transaction build \ + cardano-cli latest transaction build \ --testnet-magic $NETWORK_MAGIC \ --tx-in "$(cardano-cli query utxo --address "$(cat "${DELEGATORS_DIR}/payment${NODE_ID}.addr")" --testnet-magic $NETWORK_MAGIC --out-file /dev/stdout | jq -r 'keys[0]')" \ --change-address "$(cat ${DELEGATORS_DIR}/payment${NODE_ID}.addr)" \ @@ -159,13 +159,13 @@ for NODE_ID in ${SP_NODES_ID}; do --witness-override 2 \ --out-file "${TRANSACTIONS_DIR}/reg-stake-tx${NODE_ID}.raw" - cardano-cli conway transaction sign --testnet-magic $NETWORK_MAGIC \ + cardano-cli latest transaction sign --testnet-magic $NETWORK_MAGIC \ --tx-body-file "${TRANSACTIONS_DIR}/reg-stake-tx${NODE_ID}.raw" \ --signing-key-file "${DELEGATORS_DIR}/payment${NODE_ID}.skey" \ --signing-key-file "${DELEGATORS_DIR}/staking${NODE_ID}.skey" \ --out-file "${TRANSACTIONS_DIR}/reg-stake-tx${NODE_ID}.signed" - cardano-cli conway transaction submit \ + cardano-cli latest transaction submit \ --testnet-magic $NETWORK_MAGIC \ --tx-file "${TRANSACTIONS_DIR}/reg-stake-tx${NODE_ID}.signed" done diff --git a/packages/e2e/local-network/scripts/setup-wallets.sh b/packages/e2e/local-network/scripts/setup-wallets.sh index 6d85ae5cb36..881242bbbea 100755 --- a/packages/e2e/local-network/scripts/setup-wallets.sh +++ b/packages/e2e/local-network/scripts/setup-wallets.sh @@ -37,7 +37,7 @@ walletAddr5="addr_test1qr0c3frkem9cqn5f73dnvqpena27k2fgqew6wct9eaka03agfwkvzr0zy # Spend the first UTxO utxo=$(cardano-cli query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}') -cardano-cli conway transaction build \ +cardano-cli latest transaction build \ --change-address "$genesisAddr" \ --tx-in "$utxo" \ --tx-out "$walletAddr1"+"$AMOUNT_PER_WALLET" \ @@ -48,11 +48,11 @@ cardano-cli conway transaction build \ --testnet-magic 888 \ --out-file wallets-tx.raw -cardano-cli conway transaction sign \ +cardano-cli latest transaction sign \ --tx-body-file wallets-tx.raw \ --signing-key-file network-files/utxo-keys/utxo3.skey \ --testnet-magic 888 \ --out-file wallets-tx.signed -cardano-cli conway transaction submit --testnet-magic 888 --tx-file wallets-tx.signed +cardano-cli latest transaction submit --testnet-magic 888 --tx-file wallets-tx.signed wait_tx_complete $utxo diff --git a/packages/e2e/local-network/scripts/start.sh b/packages/e2e/local-network/scripts/start.sh index a6c8f984168..9cdf92504b3 100755 --- a/packages/e2e/local-network/scripts/start.sh +++ b/packages/e2e/local-network/scripts/start.sh @@ -43,7 +43,6 @@ while [ `cardano-cli query tip --testnet-magic 888 | jq .block` == null ] ; do sleep 1 done -healthy & ./scripts/setup-new-delegator-keys.sh ./scripts/update-stake-pools.sh.sh "$SP_NODES_ID" @@ -56,4 +55,6 @@ healthy & touch ./network-files/run/done +healthy & + wait