Generate the Operational Certificate

I’m confused…
Look for Tip slotNo value. In this example we are on slot 906528. So we have KES period is 120:
expr 432571 / 3600
<251
Where is the 432571 coming from?

They have used different values in their code examples for some reason.
The KES period is slotNo / slotsPerKESPeriod
On mainnet the slots per KES period is 129600, and current slot height at the time of this post is 4790520, so the current KES period is 36.

# cat mainnet-shelley-genesis.json | grep KESPeriod
    "slotsPerKESPeriod": 129600,

# cardano-cli shelley query tip --mainnet
{
    "blockNo": 4505374,
    "headerHash": "87b46754cf7116061332674360e2e4179aa78f9a7b8dd9050b6b0909268cc68b",
    "slotNo": 4790520
}

# expr 4790520 / 129600
36
3 Likes

there are a lot of mistakes in the documentation…

I am wondering how this calculation for the KES period can make sense, at the moment… When calculating the KES period, following the documentation, the current slot number is a mix of Byron (4492800) and Shelley slots (373750 by now). But it is only divided by Shelley’s slotsPerKESPeriod. How can the KES-period ever be correct mixing vastly different slot durations? And: Does it matter at all, as long as the KES period number increases every time?

I understand, that the validity of a newly issued operationals certificate is only derermined by slotsPerKESPeriod * slotLength, looking into the future. But I found it strange nonetheless.

Any thoughts?

1 Like