English
Updating Stake Pool Information
Important Reminder
🔥
Any changes made in this section take effect in two epochs. A common mistake is lowering the pledge amount and removing funds too soon. This results in zero rewards as the current live pledge amount is no longer met.
Need to change your pledge, fee, margin, pool IP/port, or metadata? Simply resubmit your stake pool registration certificate.
Reminder: There is no requirement to pay the 500 ADA stake pool deposit again.
First, generate the protocol-parameters.
block producer node
1
cardano-cli query protocol-parameters \
2
--mainnet \
3
--out-file $NODE_HOME/params.json
Copied!
If you're changing your poolMetaData.json, remember to calculate the hash of your metadata file and re-upload the updated poolMetaData.json file. For more details, refer to the section Registering Your Stake Pool.
block producer node
1
cardano-cli stake-pool metadata-hash --pool-metadata-file poolMetaData.json > poolMetaDataHash.txt
Copied!
If you changed your poolMetaData.json, copy poolMetaDataHash.txt to your cold environment.
Update the below registration-certificate transaction with your desired stake pool settings.
If you have multiple relay nodes, then change your parameters accordingly.
metadata-url must be no longer than 64 characters.
air-gapped offline machine
1
cardano-cli stake-pool registration-certificate \
2
--cold-verification-key-file $HOME/cold-keys/node.vkey \
3
--vrf-verification-key-file vrf.vkey \
4
--pool-pledge 1000000000 \
5
--pool-cost 345000000 \
6
--pool-margin 0.20 \
7
--pool-reward-account-verification-key-file stake.vkey \
8
--pool-owner-stake-verification-key-file stake.vkey \
9
--mainnet \
10
--single-host-pool-relay <dns based relay, example ~ relaynode1.myadapoolnamerocks.com> \
11
--pool-relay-port 6000 \
12
--metadata-url <url where you uploaded poolMetaData.json> \
13
--metadata-hash $(cat poolMetaDataHash.txt) \
14
--out-file pool.cert
Copied!
minPoolCost is 340000000 lovelace or 340 ADA. Therefore, your --pool-cost must be at a minimum this amount.
Here we are pledging 1000 ADA with a fixed pool cost of 345 ADA and a pool margin of 20%.
Copy pool.cert to your hot environment.
Pledge stake to your stake pool.
air-gapped offline machine
1
cardano-cli stake-address delegation-certificate \
2
--stake-verification-key-file stake.vkey \
3
--cold-verification-key-file $HOME/cold-keys/node.vkey \
4
--out-file deleg.cert
Copied!
Copy deleg.cert to your hot environment.
You need to find the tip of the blockchain to set the invalid-hereafter parameter properly.
block producer node
1
currentSlot=$(cardano-cli query tip --mainnet | jq -r '.slot')
2
echo Current Slot: $currentSlot
Copied!
Find your balance and UTXOs.
block producer node
1
cardano-cli query utxo \
2
--address $(cat payment.addr) \
3
--mainnet > fullUtxo.out
4
​
5
tail -n +3 fullUtxo.out | sort -k3 -nr > balance.out
6
​
7
cat balance.out
8
​
9
tx_in=""
10
total_balance=0
11
while read -r utxo; do
12
in_addr=$(awk '{ print $1 }' <<< "${utxo}")
13
idx=$(awk '{ print $2 }' <<< "${utxo}")
14
utxo_balance=$(awk '{ print $3 }' <<< "${utxo}")
15
total_balance=$((${total_balance}+${utxo_balance}))
16
echo TxHash: ${in_addr}#${idx}
17
echo ADA: ${utxo_balance}
18
tx_in="${tx_in} --tx-in ${in_addr}#${idx}"
19
done < balance.out
20
txcnt=$(cat balance.out | wc -l)
21
echo Total ADA balance: ${total_balance}
22
echo Number of UTXOs: ${txcnt}
Copied!
Run the build-raw transaction command.
The invalid-hereafter value must be greater than the current tip. In this example, we use current slot + 10000.
block producer node
1
cardano-cli transaction build-raw \
2
${tx_in} \
3
--tx-out $(cat payment.addr)+${total_balance} \
4
--invalid-hereafter $(( ${currentSlot} + 10000)) \
5
--fee 0 \
6
--certificate-file pool.cert \
7
--certificate-file deleg.cert \
8
--out-file tx.tmp
Copied!
Calculate the minimum fee:
block producer node
1
fee=$(cardano-cli transaction calculate-min-fee \
2
--tx-body-file tx.tmp \
3
--tx-in-count ${txcnt} \
4
--tx-out-count 1 \
5
--mainnet \
6
--witness-count 3 \
7
--byron-witness-count 0 \
8
--protocol-params-file params.json | awk '{ print $1 }')
9
echo fee: $fee
Copied!
Calculate your change output.
block producer node
1
txOut=$((${total_balance}-${fee}))
2
echo txOut: ${txOut}
Copied!
Build the transaction.
block producer node
1
cardano-cli transaction build-raw \
2
${tx_in} \
3
--tx-out $(cat payment.addr)+${txOut} \
4
--invalid-hereafter $(( ${currentSlot} + 10000)) \
5
--fee ${fee} \
6
--certificate-file pool.cert \
7
--certificate-file deleg.cert \
8
--out-file tx.raw
Copied!
Copy tx.raw to your cold environment.
Sign the transaction.
air-gapped offline machine
1
cardano-cli transaction sign \
2
--tx-body-file tx.raw \
3
--signing-key-file payment.skey \
4
--signing-key-file $HOME/cold-keys/node.skey \
5
--signing-key-file stake.skey \
6
--mainnet \
7
--out-file tx.signed
Copied!
Copy tx.signed to your hot environment.
Send the transaction.
block producer node
1
cardano-cli transaction submit \
2
--tx-file tx.signed \
3
--mainnet
Copied!
Changes take effect in two epochs. After the next epoch transition, verify that your pool settings are correct.
block producer node
1
cardano-cli query ledger-state --mainnet > ledger-state.json
2
jq -r '.esLState._delegationState._pstate._pParams."'"$(cat stakepoolid.txt)"'" // empty' ledger-state.json
Copied!
Copy link