<p>The notion of time is based on the input <strong>startKesPeriod</strong>, which is taken from the most current KES period of the blockchain.</p>
<p>You get the current KES period by dividing current slot number of the blockchain with the <strong>slotsPerKESPeriod</strong> parameter.</p>
<p>Hope that helps.</p>

CC BY-SA 4.0
2021-07-09T12:46:33.427Z
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
CC BY-SA 4.0
2021-07-09T14:24:10.350Z
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.
STAY Pool - Here to Stay
CC BY-SA 4.0
2021-07-09T11:51:40.640Z
2021-07-09T11:51:40.640Z
STAY Pool - Here to Stay
<p>Talking about <code>key-gen-KES</code> and <code>issue-op-cert</code> operations of <code>cardano-cli</code>.
Does the output of these functions depends on the machine clock?</p>
<p>They are part of <a href="https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node#18-1-rotate-pools-kes-keys-updating-the-operational-cert-with-a-new-kes-period" rel="nofollow noreferrer">rotating the KES process</a> 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.</p>
<p>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?</p>
<pre><code>   cardano-cli node key-gen-KES \
        --verification-key-file kes.vkey \
        --signing-key-file kes.skey
</code></pre>
<p>and</p>
<pre><code>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 &lt;startKesPeriod&gt; \
    --out-file node.cert
</code></pre>
<p>I did a quick search on the <a href="https://github.com/input-output-hk/cardano-node" rel="nofollow noreferrer"><code>cardano-node</code> Github repo</a> for both
<a href="https://github.com/input-output-hk/cardano-node/search?q=issue-op-cert" rel="nofollow noreferrer">key-gen-KES</a> and <a href="https://github.com/input-output-hk/cardano-node/search?q=issue-op-cert" rel="nofollow noreferrer">issue-op-cert</a> but I am not familiarized with the cardano-node codebase enough to make any sense of it.</p>

<stake-pool>
Is KES rotation operation time sensitive? Does the datetime of the offline machine need to be set correctly?
# Is KES rotation operation time sensitive? Does the datetime of the offline machine need to be set correctly?

(Asked by: username_0 on 2021-07-09)

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  \
    --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.

**Tags:** stake-pool

---

## 1 answers

### Answer by username_1 on 2021-07-09. Score: 4 | Accepted answer

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.

> **Comments:**
> **username_0**: 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?  
> **username_1**: 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.  

---

