4

Talking about key-gen-KES and issue-op-cert operations of cardano-cli. Does the output of these functions depends on the machine clock?

They are part of rotating the KES process of which one of the steps if performed on an off-line machine, meaning no NTP time synchronization over the network. And if we combine that we no battery on the off-line machine that we get a date time that is far from current.

Hence my question. Do the KES rotating operation need to be performed on machines that have date and time set correctly? Can the offline machine clock be off by hours? days? months?

   cardano-cli node key-gen-KES \
        --verification-key-file kes.vkey \
        --signing-key-file kes.skey

and

cardano-cli node issue-op-cert \
    --kes-verification-key-file kes.vkey \
    --cold-signing-key-file $HOME/cold-keys/node.skey \
    --operational-certificate-issue-counter $HOME/cold-keys/node.counter \
    --kes-period <startKesPeriod> \
    --out-file node.cert

I did a quick search on the cardano-node Github repo for both key-gen-KES and issue-op-cert but I am not familiarized with the cardano-node codebase enough to make any sense of it.

1 Answer 1

4

The notion of time is based on the input startKesPeriod, which is taken from the most current KES period of the blockchain.

You get the current KES period by dividing current slot number of the blockchain with the slotsPerKESPeriod parameter.

Hope that helps.

2
  • 1
    Thanks. Yes, obviously but this is an explicit input. I should have been more verbose in my question perhaps as it is the implicit inputs that I am concerned about. Not the explicit ones that users provide themselves. In other words, can you tell if the only datetime reference that is needed for either of these two operations is the kesperiod?
    – matcheek
    Jul 9, 2021 at 12:46
  • That's a great question. I've done some research, but without fully understanding the code behind cardano-cli, I can't say for sure. Hope someone from IOG will answer this. Jul 9, 2021 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.