LeaderLog Question

Hello everyone -

I have a question about the CoinCashew leaderlog process. Is it accurate that I need to run:

cardano-cli query ledger-state --mainnet --allegra-era --out-file ledger.json

Each time there’s a new Epoch in order to determine my leader slots? If so, is a way to just append the newer ledger information instead of re-running it to get the entire thing every time which can take a while and use a lot of memory?

Thank you!


  1. yes you need to rerun it. For the leaderlog caluclation you need a delegation snapshot from the previous epoch and the random values, which are generated during the first 2/3 of the current epoch.

  2. I know no method to append the ledger state.

Best wishes

Thanks Patrick! Can you confirm my steps if you have a moment?

1.5 days prior to the next epoch running, I can determine if I will be a slot leader in that Epoch by:

  1. First grabbing a new ledger state via this command:
    cardano-cli query ledger-state --mainnet --allegra-era --out-file ledger.json

  2. Second calculating my sigma value using the --next argument

  3. Finally, running python3 leaderLogs.py using all the updated items above and the argument --epoch 250 (assuming we’re in 249 currently).

Is that right?

Hi, I personally use the cncli tool which i highly recommend.

:confused: I have tried but it always crashes when I run:

cncli.sh leaderlog

I don’t know if I don’t have enough memory or what… It says I need to increase the timeout, but am not sure that’s an argument you can alter, is it?

did you provide all the required options? Have a look at the github docs

It’s super easy when using docker containers. I run this at the beginning of each epoch, so I can be sure that the generated ledger state is actually that what is used by the current epoch.