Leader Log Scripts
Scripts for stake pool owners to check when their pool is scheduled for the slot leadership
The scripts allow stake pool owners to check when their pool is scheduled for the slot leadership. The steps below cover the following.
Installation
Below guide is for Ubuntu 20.04.
Update and add ppa package:
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppaUpdate, install python and pip:
sudo apt-get update
sudo apt-get install -y python3.9
sudo apt-get install -y python3-pipCheck version of the scripts:
python3 --version
pip3 --versionInstall python package pytz:
pip3 install pytzDownload scripts
Download getSigma.py and leaderLogs.pyscripts from github:
cd $NODE_HOME
wget https://raw.githubusercontent.com/papacarp/pooltool.io/master/leaderLogs/getSigma.py
wget https://raw.githubusercontent.com/papacarp/pooltool.io/master/leaderLogs/leaderLogs.pyExecuting scripts
Create Cardano ledger state:
cardano-cli query ledger-state --mainnet --allegra-era --out-file ledger-state.jsonUsing your Pool ID and ledger-state.json execute getSigma script:

python3 getSigma.py \
--pool-id a930baffeb4ab6d3e93b39a70f1d6b5f5f922baad9e4f618da285b05 \
--ledger ledger-state.jsonRun leaderLogs.py with following parameters.
Execute leaderLogs.py:
python3 leaderLogs.py \
--vrf-skey vrf.skey \
--sigma 6.970276119270975e-05 \
--pool-id a930baffeb4ab6d3e93b39a70f1d6b5f5f922baad9e4f618da285b05 \
--epoch 223 \
--epoch-nonce fa2cd68857d74b32d704c86ac94ad40c2d7b5d7143ace3ea4e1fa798794059c0 \
-bft \
--tz Europe/LondonIf are scheduled for slot leadership then you should see output similar to this:
Checking leadership log for Epoch 223 [ d Param: 0.58 ]
2020-10-14 20:19:53 ==> Leader for 164102, Cumulative epoch blocks: 1
2020-10-14 20:19:53 ==> Leader for slot 164102, Cumulative epoch blocks: 1
2020-10-15 08:39:00 ==> Leader for 208449, Cumulative epoch blocks: 2
2020-10-15 08:39:00 ==> Leader for slot 208449, Cumulative epoch blocks: 2
2020-10-17 10:46:55 ==> Stolen by BFT for 388924, Cumulative stolen blocks due to d param: 1
2020-10-17 10:46:55 ==> Leader for slot 388924, Cumulative epoch blocks: 2
2020-10-17 21:01:49 ==> Stolen by BFT for 425818, Cumulative stolen blocks due to d param: 2
2020-10-17 21:01:49 ==> Leader for slot 425818, Cumulative epoch blocks: 2Security: It is responsibility of the operator to protect and secure the stake pool. Consider what you share with others. The Basics
Last updated
Was this helpful?