Finding the longest attestation slot gap

Find the best slot gap to avoid missing any validator duties.

The following steps align with our mainnet guide. You may need to adjust file names and directory locations where appropriate. The core concepts remain the same.

  • Your validators are assigned duties to attest and propose blocks.

  • Understanding the schedule of your validator's duties better, you can find the best time to plan consensus/execution client updates, system reboots or outages.

  • Since the Altair Hard Fork, checking sync committee membership is a must before performing any maintenance. This will give you up to ~27 hours of advanced notice in case your validators have been selected for sync committee duties.

1. Install python3

sudo apt update && sudo apt-get install python3

2. Download pietjepuk2's python script.

cd $HOME

3. Enter your validator index numbers as parameters to the python script.

python3 <validator index number(s)>
# Example
# python3 1000 1001 1002 1003

Sample Output showing the longest gap in seconds, # of slots and time range.

Longest gap (first):

120.0 seconds (10 slots), from 13:37:35 until 13:39:35

  • The python script calls the http API on port 5052.

  • Ensure the http API is enabled for your consensus layer client.

    • teku: --rest-api-enabled=true

  • Teku by default uses port 5051, rather than 5052. Search and replace the port number before using.

  • This version does not include block proposals, although the odds of having one scheduled are really low of course.

  • Block proposal duties are only known for the current epoch, whereas attestation duties are known for the current and next one.

Nice work. Now you now the best gap to avoid missing any validator duties.

Visit here for our Mainnet guide

Congrats on completing the guide. ✨

Did you find our guide useful? Send us a signal with a tip and we'll keep updating it.

It really energizes us to keep creating the best crypto guides.

Use to find our donation addresses. 🙏

Any feedback and all pull requests much appreciated. 🌛

Last updated