Parsing error with CNCLI trying to check leaderlogs

So I last epoch I was able to use cncli to check if i was going to be a slot leader. No luck last block.
Given next epoch stats should be out now, I ran ledger-dump and then tried to run cncli -leaderlog.sh and am getting a parsing error:

“status”: “error”,
“errorMessage”: “EOF while parsing a value at line 1 column 0”

My cncli-fivedays.sh is also giving me an exit failure.

I was previously using leaderlogs.py but understand that is being phased out.

Can anybody help me troubleshoot?

Thanks!

U should start to use the cncli script

Cheers,

That is the same cncli script I have been using that has been giving me the error.
Now I reran the ledger-dump script and things seem to have worked this time.
Maybe I had an error in processing the ledger-state.json or something.

Now the fivedays script still gives me an “exit failure”, but I’m not even sure the purpose of this particular script. Do you know the reason for it?
Thanks

Nope, I am using cncli

I’m not sure you are understanding my question.
I am also using cncli from Andrew Westberg as well.
On his site, he has 4 scripts to help run it:

I can also run cncli from the command line, but there are a lot of arguments to add, so I prefer the cncli leaderlog.sh script. As I understand it, for it to work, I have to proceed that with the ledger-dump script. I guess I wanted to know exactly the purpose of the other 3 scripts.

What is your process for running cncli?

Ah, sorry, my bad…

That is the same cncli script I have been using that has been giving me the error.
Now I reran the ledger-dump script and things seem to have worked this time.
Maybe I had an error in processing the ledger-state.json or something.

Yeah, you are not the only one who received an error when trying to check the leaderlog with less than 1,5 days before the epoch start. I had this error today also, but now It worked.

Now the fivedays script still gives me an “exit failure”, but I’m not even sure the purpose of this particular script. Do you know the reason for it?

I think it’s calculating the epoch, since one epoch has 5 days

PS: when I try to check my blocks I:

  • first sync it : ./cncli.sh sync
  • then run: ./cncli.sh leaderlog

Cheers,

or you can try to call cncli without the wrapping script:
cncli leaderlog --pool-id <pool_id> --pool-vrf-skey vrf.skey --byron-genesis configs/mainnet-byron-genesis.json --shelley-genesis configs/mainnet-shelley-genesis.json --ledger-state ledger-state.json --db cncli.db

Ok guys that makes me feel better that others were having issues.
Laplasz, that’s the way I was running it before, but it was too much typing , so I made the script :wink:

It does seem that the timing of running the cncli command matters alot and if you are trying to run it after an epoch change but before the 36hour window, you will get different errors. Maybe I was just running it before all the epoch snapshots were taken to calculate the next leader logs.

Is the ledger-dump necessary prior to running cncli effectively? Or do you guys not do that?

Thanks for your help!

since I dont know about ledger-dump, I do not call it:)
yes, the pure cncli call is a little bit complex…

I didn’t want to jinx anything by mentioning it, but I wanted you two (@laplasz and @Alexd1985 ) to be the first to know since you provided me so much help in the process:

Got my first slot leader assignment for my RADAR stake pool this weekend in Epoch 263!

Fingers crossed nothing gets in the way! :crossed_fingers:

Love that I’ve been now able to pay it back a little by helping some others in the process as well.

Can’t thank you guys enough!
-Sully at RADAR

1 Like

Great news - I was very exited when I got my first assignment - I thought I wont miss the time for sure - and when the time came I get a call and it made me totally forget about the event:) but fortunately the pool did the job…
So - it will be a good experience!

1 Like

How long did it take to get your first block?

Regards,
Shibu Gope

Great news, happy for u!

Do u have chrony installed right?
The Producer has IN/OUT peers and tx processing right?

Yes, Alex. Everything is processing transactions well on my block producer, 2 in from my relays, 2 out to my relays, plus a couple other outs that send my height / blocktip to pooltool.io. Should be good baring some unforeseen power/internet failure.

@Shibu_Gope - we will be starting our 5th epoch. Up to 207k staked, which make our odds of minting a block about 20% per epoch. So as statistically, we were just about due! Looking forward to getting it under my belt so we have a real base to grow on!
-Sully

1 Like

Congrats for the block!

1 Like

Are you still having trouble with the cncli-fivedays.sh script? I can’t seem to get my leaderlog to work before the end of the epoch lately, i.e. I have to wait until a few hours into the “current” epoch before my leaderlog script will work.
The fivedays script, when I run it separately gives me “exit failure”. It is such a simple script but I can’t figure out why it won’t run properly.

I can run the manual version, but I can’t get this command to run
sudo bash ${NODE_HOME}/scripts/cncli-leaderlog.sh next UTC

The cncli-fivedays.sh script is below

cat > ${NODE_HOME}/scripts/cncli-fivedays.sh << EOF
#!/usr/bin/env bash

CARDANO_START=\$(date +%s -d "2017-09-23")
CARDANO_START_DAY=\$(( CARDANO_START / 86400 ))
NOW_TIMESTAMP=\$(date +%s)
NOW_DAY=\$(( NOW_TIMESTAMP / 86400 ))
DAYS_SINCE_CARDANO_START=\$(( NOW_DAY - CARDANO_START_DAY ))
RESULT=\$(( DAYS_SINCE_CARDANO_START % 5 ))

if [[ "\$RESULT" == "0" ]]; then
    echo "Exit Success"
    exit 0
else
    echo "Exit Failure"
    exit 1
fi
EOF

I now use this procedure to check leaderlogs. It’s easier on the RAM/CPU and I haven’t had a fail in a while. You need to make sure cncli.db is in sync.

cardano-cli query stake-snapshot --stake-pool-id YOUR POOL ID --mainnet >/root/scripts/snapshot.json

cncli leaderlog --pool-id YOUR POOL ID*
–pool-vrf-skey /home/blocknode/cardano-my-node/vrf.skey
–byron-genesis /home/blocknode/cardano-my-node/mainnet-byron-genesis.json
–shelley-genesis /home/blocknode/cardano-my-node/mainnet-shelley-genesis.json
–pool-stake $(cat snapshot.json | jq .poolStakeMark)
–active-stake $(cat snapshot.json | jq .activeStakeMark)
–db /root/scripts/cncli.db
–tz America/New_York
–ledger-set next

Look at Andrew’s github as well for better documentationhttps://github.com/AndrewWestberg/cncli/blob/develop/USAGE.md

-Sully at RADAR

Thanks @mdsullivan With a few tweaks to the file paths, I got it working on my coincashew install and got my leaderlog run before the end of the epoch, for the first time in about 5 or 6 epochs. Thanks

1 Like