Cncli Leaderlog - how to use it for "old" epochs

From what I can see in the usage.md from Andrew it only allows, previous, current, next epochs to be calculated for leaderlogs. I would like to be able to run it on earlier epochs.
Is there a way to do that?

1 Like

as a workaround start a separate node and sync it to the desire epoch - I dont know whether it will work…

If you use cntools with cncli you can go back as many blocks as you wish.

1 Like

I’m using cncli standalone, not cntools. It’s not a big deal, but I know the python leaderlog script lets you do any epoch you choose, it’s just odd the cncli doesn’t seem to let you do that.

Maybe you can address @AndrewWestberg about this?

Yeah, I’ll hit up @AndrewWestberg
I didn’t want to bother him if it was an easy thing that I couldn’t see myself.

Leaderlogs depends on stake snapshots taken at the epoch boundaries. The node only knows about 1 epoch into the past since that snapshot is used for calculating upcoming rewards. As such, you can only do leaderlogs for up to 1 previous epoch.

Ok, thanks Andrew.

Do you know much about the depreciated python method? That allows an epoch argument, so I assume the API has a copy of the snapshot for each epoch stored away?