Generating keys
First, you should register a stake pool using the following command:
cardano-cli stake-pool registration-certificate \
--cold-verification-key-file cold.vkey \
--vrf-verification-key-file vrf.vkey \
--pool-pledge <AMOUNT TO PLEDGE IN LOVELACE> \
--pool-cost <POOL COST PER EPOCH IN LOVELACE> \
--pool-margin <POOL OPERATOR MARGIN > \
--pool-reward-account-verification-key-file stake.vkey \
--pool-owner-stake-verification-key-file stake.vkey \
--testnet-magic 2 \
--pool-relay-ipv4 <RELAY NODE PUBLIC IP> \
--pool-relay-port <RELAY NODE PORT> \
--single-host-pool-relay STRING <The stake pool relay's DNS name that corresponds to an A or AAAA DNS record> \
--metadata-url https://git.io/JJWdJ \
--metadata-hash <POOL METADATA HASH> \
--out-file pool-registration.certGenerating the artifacts
You will now need to generate all the following artifacts:
payment.vkey
payment verification key
payment.skey
payment signing key
payment.addr
funded address linked to stake
stake.vkey
staking verification key
stake.skey
staking signing key
stake.addr
registered stake address
cold.skey
cold signing key
cold.vkey
cold verification key
kes.skey
KES signing key
kes.vkey
KES verification key
vrf.skey
VRF signing key
vrf.vkey
VRF verification key
opcert.cert
operational certificate
opcert.counter
issue counter
metadata url
metadata hash
Payment and stake key pairs
Payment and stake keys
Generate payment keys:
cardano-cli address key-gen \
--verification-key-file payment.vkey \
--signing-key-file payment.skeyGenerate stake keys:
cardano-cli stake-address key-gen \
--verification-key-file stake.vkey \
--signing-key-file stake.skeyGenerate the payment address:
cardano-cli address build \
--payment-verification-key-file payment.vkey \
--stake-verification-key-file stake.vkey \
--testnet-magic 2 \
--out-file payment.addrGenerate a recovery phrase and save it to a file:
cardano-address recovery-phrase generate > recoveryphrase.txtGet the root private key:
cat recoveryphrase.txt | cardano-address key from-recovery-phrase Shelley > root.prvGenerate the private and public keys for the index 0 address:
cardano-address key child 1852H/1815H/0H/0/0 < root.prv > payment-0.prv
cardano-address key public --without-chain-code < payment-0.prv > payment-0.pubConvert the private key so that it can be used within the cardano-cli:
cardano-cli key convert-cardano-address-key \
--shelley-payment-key \
--signing-key-file payment-0.prv \
--out-file payment-0.skeyGet the public (verification) key compatible with the cardano-cli:
cardano-cli key verification-key \
--signing-key-file payment-0.skey \
--verification-key-file payment-0.vkeyGenerate the stake keys:
cardano-address key child 1852H/1815H/0H/2/0 < root.prv > stake.prv
cardano-address key public --without-chain-code < stake.prv > stake.pubConvert:
cardano-cli key convert-cardano-address-key \
--shelley-stake-key \
--signing-key-file stake.prv \
--out-file stake.skeyGet the extended verification key:
cardano-cli key verification-key \
--signing-key-file stake.skey \
--verification-key-file stake.evkeyAlso, get the non-extended verification key:
cardano-cli key non-extended-key \
--extended-verification-key-file stake.evkey \
--verification-key-file stake.vkeyFinally, generate the payment address:
cardano-cli address build --testnet-magic 2 \
--payment-verification-key $(cat payment-0.pub) \
--stake-verification-key $(cat stake.pub) \
--out-file payment-0.addressAlso, generate the stake address:
cardano-cli stake-address build --testnet-magic 2 \
--stake-verification-key-file stake.pub \
--out-file stake.addressCold keys
cardano-cli node key-gen \
--cold-verification-key-file cold.vkey \
--cold-signing-key-file cold.skey \
--operational-certificate-issue-counter-file opcert.counterKey evolving signature (KES) keys
cardano-cli node key-gen-KES \
--verification-key-file kes.vkey \
--signing-key-file kes.skeyVerifiable random function (VRF) keys
cardano-cli node key-gen-VRF \
--verification-key-file vrf.vkey \
--signing-key-file vrf.skeyUpload keys to the block-producing node
On the Block producer, run:
mkdir keysUse a USB drive to bring kes.skey vrf.skey and opcert.cert to your working machine and from there, upload:
scp kes.skey vrf.skey opcert.cert username@host:/remote/directoryLast updated
Was this helpful?