I've lost my `vrf.skey`. What do I do now?

Prior to cardano node 1.32.1, I’ve been running my block node with no problems. After upgrading to v 1.32.1, I’m getting this error:

cardano-node: /home/block/cardano-my-node/vrf.skey: getFileStatus: does not exist (No such file or directory)

Now I can’t seem to find my vrf.skey anywhere. I do however have my vrf.vkey.

What should I do to fix this?
Should I just regenerate it using the below command ?

cardano-cli node key-gen-VRF \
    --verification-key-file vrf.vkey \
    --signing-key-file vrf.skey


EDIT: running the command above fixed my issue. Silly me!

1 Like

After you do this, you have to create and submit a new stake pool registration certificate, because the vrf verification key is registered to the blockchain.

Is it this step here?

The command in the link above above uses just the vrf.vkey though, not the vrf.skey :thinking:

cardano-cli stake-pool registration-certificate \
    --cold-verification-key-file $HOME/cold-keys/node.vkey \
    --vrf-verification-key-file vrf.vkey \
    --pool-pledge 100000000 \
    --pool-cost 345000000 \
    --pool-margin 0.15 \
    --pool-reward-account-verification-key-file stake.vkey \
    --pool-owner-stake-verification-key-file stake.vkey \
    --mainnet \
    --single-host-pool-relay <dns based relay, example ~ relaynode1.myadapoolnamerocks.com> \
    --pool-relay-port 6000 \
    --metadata-url <url where you uploaded poolMetaData.json> \
    --metadata-hash $(cat poolMetaDataHash.txt) \
    --out-file pool.cert

Yes, this is what you have to do, create the certificate again with the new vrf.vkey (corresponding to the new vrf.skey) and submit the certificate with a transaction.

Will do, thanks for the pointers @georgem1976! :bowing_man:

1 Like

@georgem1976 Sorry I forgot to ask, how can I confirm that it worked? Because when I regenerated the vrf.vkey and vrf.skey and used the new vrf.skey to restart my node, it seems to be up and running without having to re-register it.

It is up and running without registering the new key, but it will never mint any valid block this way. You have to register the new key (by submitting a new registration certificate).
You run this command:

cardano-cli node key-hash-VRF --verification-key-file vrf.vkey

and check if the output is equal to the one displayed on cardanoscan.io for your stake pool (“Vrf Hash” field).

1 Like