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

Thanks

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

2 Likes

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

Reviving this thread - after following the steps above, I keep getting VRFKeyWrongVRFKey errors and missing blocks.
Not sure why this happens as cardano-cli node key-hash-VRF --verification-key-file vrf.vkey returns the same hash as the one here:
PXLZ PXLZ Staking Pool - Cardanoscan.

Node & CLI versions = 8.1.2

Full error stack trace:

Invalid block e71ecd080241447742820e4158ebf6ea867d0c6e199d610e778308b7ab5ca8f3 at slot 108258133: ExtValidationErrorHeader (HeaderProtocolError (HardForkValidationErrFromEra S (S (S (S (S (Z (WrapValidationErr {unwrapValidationErr = VRFKeyWrongVRFKey (KeyHash "ccf9fa7bd7cc72f851effb0e229f7ab163ae670250c38b18dbdd8f8f") "e672db0d1a60b4cf512a72715d0e2d58383e9bf3616a68080b7139b90e503f42" "f527c0aeee95ee74950d9a146185d56f221a1ff2f92bf4161f2d36923fc8483b"}))))))))```
Valid candidate dcc9573e7f8bd18855481fb27ccc7761d0f977a85b97ff184cdc47b09725352b at slot 108258128
fromList [("credentials",String "Cardano"),("val",Object (fromList [("kind",String "TraceForgedInvalidBlock"),("reason",Object (fromList [("error",Object (fromList [("error",Object (fromList [("blockHeaderVrfKey",String "f527c0aeee95ee74950d9a146185d56f221a1ff2f92bf4161f2d36923fc8483b"),("kind",String "VRFKeyWrongVRFKey"),("stakePoolKeyHash",String "ccf9fa7bd7cc72f851effb0e229f7ab163ae670250c38b18dbdd8f8f"),("stakePoolVrfKey",String "e672db0d1a60b4cf512a72715d0e2d58383e9bf3616a68080b7139b90e503f42")])),("kind",String "HeaderProtocolError")])),("kind",String "ValidationError")])),("slot",Number 1.08258133e8)]))]

Screenshot 2023-11-13 at 00.13.11
Screenshot 2023-11-13 at 00.14.01

Which VRF public key did you use when running this command?
You should check on the BP which is the VRF signing key used (in the cardano-cli command line), generate the public key from it, then run the command on that public key, to be sure the BP is running with the correct VRF signing key.

Running the following on the BP node:

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

returns:

f527c0aeee95ee74950d9a146185d56f221a1ff2f92bf4161f2d36923fc8483b

which is the same VRF hash which is the same one as on PXLZ PXLZ Staking Pool - Cardanoscan.

So this means that the correct vrf.vkey was used to submit the latest pool certificate no?

Yes, but when did you submit the stake pool registration certificate? Was the previous stake pool registration certificate submitted with a different VRF key or the same? It takes 2 full epochs for the new VRF key to be the one in use, if you change it.

You’re right! Thanks for the heads up, will have to go blockless for the next couple epochs unfortunately.

1 Like