Skip to content

Commit

Permalink
Merge pull request #1933 from input-output-hk/fix_conway_fast
Browse files Browse the repository at this point in the history
Fix conway fast cluster
  • Loading branch information
mkoura authored Aug 22, 2023
2 parents ecf5fd9 + 97b8f44 commit 9eb6c1c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cardano_node_tests/cluster_scripts/conway_fast/start-cluster-hfc
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ for i in $(seq 1 $NUM_BFT_NODES); do
echo "$BFT_PORT" > "$STATE_CLUSTER/nodes/node-bft$i/port"
done

KEY_DEPOSIT="$(jq '.protocolParams.keyDeposit' \
< "$STATE_CLUSTER/shelley/genesis.json")"

for i in $(seq 1 "$NUM_POOLS"); do
mkdir -p "$STATE_CLUSTER/nodes/node-pool$i"
mv "$STATE_CLUSTER/create_staked/pools/cold$i.skey" "$STATE_CLUSTER/nodes/node-pool$i/cold.skey"
Expand Down Expand Up @@ -311,12 +314,14 @@ for i in $(seq 1 "$NUM_POOLS"); do
cardano_cli_log stake-address registration-certificate \
--conway-era \
--stake-verification-key-file "$STATE_CLUSTER/nodes/node-pool$i/owner-stake.vkey" \
--key-reg-deposit-amt "$KEY_DEPOSIT" \
--out-file "$STATE_CLUSTER/nodes/node-pool$i/stake.reg.cert"

# stake reward address registration cert
cardano_cli_log stake-address registration-certificate \
--conway-era \
--stake-verification-key-file "$STATE_CLUSTER/nodes/node-pool$i/reward.vkey" \
--key-reg-deposit-amt "$KEY_DEPOSIT" \
--out-file "$STATE_CLUSTER/nodes/node-pool$i/stake-reward.reg.cert"

# stake address delegation certs
Expand Down Expand Up @@ -483,8 +488,7 @@ cardano_cli_log query protocol-parameters \
--out-file "$STATE_CLUSTER/pparams.json"

TXIN_ADDR="$(<"$STATE_CLUSTER"/shelley/genesis-utxo.addr)"
DEPOSITS="$(jq '2 * .protocolParams.keyDeposit' \
< "$STATE_CLUSTER/shelley/genesis.json")"
DEPOSITS="$((KEY_DEPOSIT * 2))"
NEEDED_AMOUNT="$(( (POOL_PLEDGE + DEPOSITS) * NUM_POOLS ))"
FEE_BUFFER=100000000
STOP_TXIN_AMOUNT="$((NEEDED_AMOUNT + FEE_BUFFER))"
Expand Down Expand Up @@ -516,7 +520,7 @@ for i in $(seq 1 "$NUM_POOLS"); do
done

cardano_cli_log transaction build-raw \
--babbage-era \
--conway-era \
--fee 0 \
"${TXINS[@]}" \
--tx-out "$TXIN_ADDR+0" \
Expand All @@ -536,7 +540,7 @@ FEE="$(cardano_cli_log transaction calculate-min-fee \
TXOUT_AMOUNT="$((TXIN_AMOUNT - FEE - NEEDED_AMOUNT))"

cardano_cli_log transaction build-raw \
--babbage-era \
--conway-era \
--fee "$FEE" \
"${TXINS[@]}" \
--tx-out "$TXIN_ADDR+$TXOUT_AMOUNT" \
Expand Down

0 comments on commit 9eb6c1c

Please sign in to comment.