githubEdit

Generating Keys for the Block-producing Node

The block-producer node requires you to create 3 keys as defined in the Shelley ledger specsarrow-up-right:

  • 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.skey
circle-info

KES (key evolving signature) keys are created to secure your stake pool against hackers who might compromise your keys.

On mainnet, you will need to regenerate the KES key every 90 days.

triangle-exclamation

Make a directory to store your cold keys

mkdir $HOME/cold-keys
pushd $HOME/cold-keys

Make 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.counter
circle-exclamation

Determine the number of slots per KES period from the genesis file.

circle-exclamation

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.

circle-info

Your stake pool requires an operational certificate to verify that the pool has the authority to run. For more details on operational certificates, see the topic Issuing a New Operational Certificate.

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.

circle-info

To operate a stake pool, you need the KES, VRF key and Operational Certificate. Cold keys generate new operational certificates periodically.

Now start your block producer node.