# LeaderLog Question

**URL:** <https://forum.cardano.org/t/leaderlog-question/49237>\
**Category:** Setup a Stake Pool\
**Created:** [21 February 2021 14:43 UTC](https://forum.cardano.org/t/leaderlog-question/49237 "2021-02-21T14:43:54Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcvetyty](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@mcvetyty](https://forum.cardano.org/u/mcvetyty)\
**Post date:** [21 February 2021 14:43 UTC](https://forum.cardano.org/t/leaderlog-question/49237/1 "2021-02-21T14:43:54Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![pr63ice](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/pr63ice/32/28048_2.png) [@pr63ice](https://forum.cardano.org/u/pr63ice)\
**Post date:** [21 February 2021 18:43 UTC](https://forum.cardano.org/t/leaderlog-question/49237/2 "2021-02-21T18:43:36Z")

</div>

Hey,

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

---

<div class="post-metadata">

**Author:** ![mcvetyty](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@mcvetyty](https://forum.cardano.org/u/mcvetyty)\
**Post date:** [21 February 2021 19:12 UTC](https://forum.cardano.org/t/leaderlog-question/49237/3 "2021-02-21T19:12:48Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![pr63ice](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/pr63ice/32/28048_2.png) [@pr63ice](https://forum.cardano.org/u/pr63ice)\
**Post date:** [21 February 2021 19:15 UTC](https://forum.cardano.org/t/leaderlog-question/49237/4 "2021-02-21T19:15:48Z")

</div>

Hi, I personally use the [cncli](https://github.com/AndrewWestberg/cncli) tool which i highly recommend.  
Best

---

<div class="post-metadata">

**Author:** ![mcvetyty](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@mcvetyty](https://forum.cardano.org/u/mcvetyty)\
**Post date:** [21 February 2021 19:18 UTC](https://forum.cardano.org/t/leaderlog-question/49237/5 "2021-02-21T19:18:40Z")

</div>

😕 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?

---

<div class="post-metadata">

**Author:** ![pr63ice](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/pr63ice/32/28048_2.png) [@pr63ice](https://forum.cardano.org/u/pr63ice)\
**Post date:** [21 February 2021 19:20 UTC](https://forum.cardano.org/t/leaderlog-question/49237/6 "2021-02-21T19:20:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tomdx](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/tomdx/32/44498_2.png) [@tomdx](https://forum.cardano.org/u/tomdx)\
**Post date:** [22 February 2021 10:04 UTC](https://forum.cardano.org/t/leaderlog-question/49237/7 "2021-02-22T10:04:39Z")

</div>

It’s super easy when using [docker containers](https://tdiesler.gitbook.io/cardano/#ledger-state). 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.

---

<div class="post-metadata">

**Author:** ![dolar468468](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/dolar468468/32/29001_2.png) [@dolar468468](https://forum.cardano.org/u/dolar468468)\
**Post date:** [12 March 2021 10:47 UTC](https://forum.cardano.org/t/leaderlog-question/49237/8 "2021-03-12T10:47:49Z")

</div>

Hi I’ve followed the CoinCashew leaderlog process as well, but it does not look like its working for me.

When I run

python3 leaderLogs.py   
–pool-id 75c48bfd17b701338131cdc3b8f6a3e218f31b6817795888191abae2   
–tz America/Los\_Angeles   
–vrf-skey ~/cnode/pool-keys/vrf.skey

I get ERROR: You’re a bit early. The epoch nonce for Epoch 254 isn’t ready yet! Try again later.

 ![pool](https://us1.discourse-cdn.com/flex023/uploads/cardano/original/3X/e/1/e19681e9b0f20817ca9097f0091fc15c008e35e5.png)

I have tried also your [mcvetyty](https://forum.cardano.org/u/mcvetyty) command  
cardano-cli query ledger-state --mainnet --allegra-era --out-file ledger.json  
that gave me an empty json file 😕

Am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![tomdx](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/tomdx/32/44498_2.png) [@tomdx](https://forum.cardano.org/u/tomdx)\
**Post date:** [12 March 2021 11:00 UTC](https://forum.cardano.org/t/leaderlog-question/49237/9 "2021-03-12T11:00:59Z")

</div>

@dolar468468 this has changed with the mary hard fork. You’d now want to follow [these instructions](https://github.com/AndrewWestberg/cncli/blob/develop/README.md#running).

---

<div class="post-metadata">

**Author:** ![dolar468468](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/dolar468468/32/29001_2.png) [@dolar468468](https://forum.cardano.org/u/dolar468468)\
**Post date:** [12 March 2021 11:36 UTC](https://forum.cardano.org/t/leaderlog-question/49237/10 "2021-03-12T11:36:14Z")

</div>

Actually it worked. I had a mistake in the command. I have not specified the epoch with --epoch 253

python3 leaderLogs.py   
–pool-id 75c48bfd17b701338131cdc3b8f6a3e218f31b6817795888191abae2   
–tz America/Los\_Angeles   
–epoch 253   
–vrf-skey ~/cnode/pool-keys/vrf.skey

But I am still sad 😞 because I am still not sure if the pool is even working. With 25% chance and around 500k ada in the pool we did not get any blocks …

 ![pool no slots](https://us1.discourse-cdn.com/flex023/uploads/cardano/original/3X/7/f/7f943b2ef772945461fafb60756bad79a4d336c4.png)

But it looks like evetything is running on gLiveView so I do not understand 😞

---

<div class="post-metadata">

**Author:** ![mcvetyty](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@mcvetyty](https://forum.cardano.org/u/mcvetyty)\
**Post date:** [12 March 2021 11:50 UTC](https://forum.cardano.org/t/leaderlog-question/49237/11 "2021-03-12T11:50:58Z")

</div>

> But it looks like everything is running on gLiveView so I do not understand

Being scheduled to mint blocks does not depend on your system to be operational.

As you said, with a 500K pledge you have about a 25 or 30% chance of being scheduled for a block, but that percentage resets every epoch. So similar to rolling a four sided dice 12 times, you may, unfortunately, never get scheduled any of those times. Just keep checking and working to get more delegates to increase your % chance.

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [12 March 2021 15:45 UTC](https://forum.cardano.org/t/leaderlog-question/49237/12 "2021-03-12T15:45:04Z")

</div>

> [@dolar468468](#):
>
> 75c48bfd17b701338131cdc3b8f6a3e218f31b6817795888191abae2

Last epoch I had 0 slot assigned with 3,5M stake so… be patience… u will make blocks

---

<div class="post-metadata">

**Author:** ![jeremyisme](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jeremyisme/32/54872_2.png) [@jeremyisme](https://forum.cardano.org/u/jeremyisme)\
**Post date:** [9 April 2021 20:26 UTC](https://forum.cardano.org/t/leaderlog-question/49237/13 "2021-04-09T20:26:21Z")

</div>

Hi all, I was trying to check leaderlogs this morning (NZ time, about 1 hr ago), but I keep getting the “you’re a bit early” error for epoch 259. When I tried testing back on epoch 258 I get an API error. I’m following the coincashew guide. The script was updated when I can the updater.

Anyone else having issues?

---

<div class="post-metadata">

**Author:** ![jeremyisme](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jeremyisme/32/54872_2.png) [@jeremyisme](https://forum.cardano.org/u/jeremyisme)\
**Post date:** [10 April 2021 00:28 UTC](https://forum.cardano.org/t/leaderlog-question/49237/14 "2021-04-10T00:28:50Z")

</div>

The “you’re a bit early” error has gone now, but I get an API error. Has anyone use the leaderlogs script today successfully?

---

<div class="post-metadata">

**Author:** ![jeremyisme](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jeremyisme/32/54872_2.png) [@jeremyisme](https://forum.cardano.org/u/jeremyisme)\
**Post date:** [10 April 2021 08:10 UTC](https://forum.cardano.org/t/leaderlog-question/49237/15 "2021-04-10T08:10:18Z")

</div>

It works now. I guess the api was having a bad day…

---

<div class="post-metadata">

**Author:** ![LKBHPool](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/lkbhpool/32/23018_2.png) [@LKBHPool](https://forum.cardano.org/u/LKBHPool)\
**Post date:** [24 May 2021 06:49 UTC](https://forum.cardano.org/t/leaderlog-question/49237/16 "2021-05-24T06:49:03Z")

</div>

> [@mcvetyty](#):
>
> - cardano-cli query ledger-state --mainnet --allegra-era --out-file ledger.json

Hi,  
I am new to the leaderlog tool. Where in coincashew can i find the information about leaderlogs setup from scratch ? thanks.

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [24 May 2021 08:33 UTC](https://forum.cardano.org/t/leaderlog-question/49237/17 "2021-05-24T08:33:38Z")

</div>

hello ,

18.12 Slot Leader Schedule - Find out when your pool will mint blocks

cheers,

---

<div class="post-metadata">

**Author:** ![LKBHPool](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/lkbhpool/32/23018_2.png) [@LKBHPool](https://forum.cardano.org/u/LKBHPool)\
**Post date:** [24 May 2021 11:32 UTC](https://forum.cardano.org/t/leaderlog-question/49237/18 "2021-05-24T11:32:13Z")

</div>

thanks Alex.
