English
Registering Your Stake Pool
Create your pool's metadata with a JSON file. Update with your pool information.
ticker must be between 3-9 characters in length. Characters must be A-Z and 0-9 only.
description cannot exceed 255 characters in length.
block producer node
1
cat > poolMetaData.json << EOF
2
{
3
"name": "MyPoolName",
4
"description": "My pool description",
5
"ticker": "MPN",
6
"homepage": "https://myadapoolnamerocks.com"
7
}
8
EOF
Copied!
Calculate the hash of your metadata file. It's saved to poolMetaDataHash.txt
block producer node
1
cardano-cli stake-pool metadata-hash --pool-metadata-file poolMetaData.json > poolMetaDataHash.txt
Copied!
Copy poolMetaDataHash.txt to your air-gapped offline machine, cold environment.
Next, upload your poolMetaData.json file to a Web site that you administer or a public Web site. For example, you can upload your pool metadata to GitHub.
Verify the metadata hashes by comparing your uploaded .json file and your local .json file's hash.
block producer node
Get the metadata hash from your metadata json URL. Replace <https://REPLACE WITH YOUR METADATA_URL> with your actual URL.
1
cardano-cli stake-pool metadata-hash --pool-metadata-file <(curl -s -L <https://REPLACE WITH YOUR METADATA_URL>)
Copied!
This above hash must equal the local metadata hash.
1
cat poolMetaDataHash.txt
Copied!
If the hashes do no match, then the uploaded .json file likely was truncated or extra whitespace caused issues. Upload the .json again or to a different web host.
Find the minimum pool cost.
block producer node
1
minPoolCost=$(cat $NODE_HOME/params.json | jq -r .minPoolCost)
2
echo minPoolCost: ${minPoolCost}
Copied!
minPoolCost is 340000000 lovelace or 340 ADA. Therefore, your --pool-cost must be at a minimum this amount.
Create a registration certificate for your stake pool. Update with your metadata URL and your relay node information. Choose one of the three options available to configure relay nodes -- DNS based, Round Robin DNS based, or IP based.
DNS based relays are recommended for simplicity of node management. In other words, you don't need to re-submit this registration certificate transaction every time your IP changes. Also you can easily update the DNS to point towards a new IP should you re-locate or re-build a relay node, for example.

Configuring Multiple Relay Nodes

Update the next operation
cardano-cli stake-pool registration-certificate
to be run on your air-gapped offline machine appropriately. Replace with your proper domain names or IP addresses.
DNS based relays, 1 entry per DNS record
1
--single-host-pool-relay <relaynode1.myadapoolnamerocks.com> \
2
--pool-relay-port 6000 \
3
--single-host-pool-relay <relaynode2.myadapoolnamerocks.com> \
4
--pool-relay-port 6000 \
Copied!
Round Robin DNS based relays, 1 entry per SRV DNS record
1
--multi-host-pool-relay <relayNodes.myadapoolnamerocks.com> \
2
--pool-relay-port 6000 \
Copied!
IP based relays, 1 entry per IP address
1
--pool-relay-port 6000 \
2
--pool-relay-ipv4 <your first relay node public IP address> \
3
--pool-relay-port 6000 \
4
--pool-relay-ipv4 <your second relay node public IP address> \
Copied!
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 100000000 \
5
--pool-cost 345000000 \
6
--pool-margin 0.15 \
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!
Here we are pledging 100 ADA with a fixed pool cost of 345 ADA and a pool margin of 15%.
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.
This operation creates a delegation certificate which delegates funds from all stake addresses associated with key stake.vkey to the pool belonging to cold key node.vkey
A stake pool owner's promise to fund their own pool is called Pledge.
  • Your balance needs to be greater than the pledge amount.
  • You pledge funds are not moved anywhere. In this guide's example, the pledge remains in the stake pool's owner keys, specifically payment.addr
  • Failing to fulfill pledge will result in missed block minting opportunities and your delegators would miss rewards.
  • Your pledge is not locked up. You are free to transfer your funds.
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!
Find the deposit fee for a pool.
block producer node
1
stakePoolDeposit=$(cat $NODE_HOME/params.json | jq -r '.stakePoolDeposit')
2
echo stakePoolDeposit: $stakePoolDeposit
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} - ${stakePoolDeposit})) \
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!
Ensure your balance is greater than cost of fee + minPoolCost or this will not work.
Calculate your change output.
block producer node
1
txOut=$((${total_balance}-${stakePoolDeposit}-${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!
Copy link