Generating Keys for the Block-producing Node
The block-producer node requires you to create 3 keys as defined in the Shelley ledger specs:
stake pool cold key (node.cert)
stake pool hot key (kes.skey)
stake pool VRF key (vrf.skey)
First, make a KES key pair.
cd $NODE_HOME
cardano-cli node key-gen-KES \
--verification-key-file kes.vkey \
--signing-key-file kes.skeyMake a directory to store your cold keys
mkdir $HOME/cold-keys
pushd $HOME/cold-keysMake a set of cold keys and create the cold counter file.
cardano-cli node key-gen \
--cold-verification-key-file node.vkey \
--cold-signing-key-file $HOME/cold-keys/node.skey \
--operational-certificate-issue-counter node.counterDetermine the number of slots per KES period from the genesis file.
Find the kesPeriod by dividing the slot tip number by the slotsPerKESPeriod.
With this calculation, you can generate a operational certificate for your pool.
Copy kes.vkey to your cold environment.
Change the <startKesPeriod> value accordingly.
Copy node.cert to your hot environment.
Make a VRF key pair.
Update vrf key permissions to read-only. You must also copy vrf.vkey to your cold environment.
Stop your stake pool by running the following:
Update your startup script with the new KES, VRF and Operation Certificate.
Now start your block producer node.