check-holesky.sh
is a script that verifies if a beacon node is on the correct fork by comparing its block roots with a reference chain data file. It has been preconfigured with the slot -> block root mappings generated from a lighthouse-erigon
node.
wget https://gist.githubusercontent.com/samcm/e2da294dab77e93ad0ee0e815580294f/raw/b379bd5417409d2b01c7c3dd9d3348c91e80b348/check-holesky.sh \
> check-holesky.sh
chmod +x check-holeksy.sh
# Custom values
BEACON_NODE_URL="http://localhost:5052" ./check-holesky.sh
Variable | Description | Default |
---|---|---|
CHAIN_DATA_URL |
URL to the reference chain data JSON file | https://gist.githubusercontent.com/samcm/e2da294dab77e93ad0ee0e815580294f/raw/d9f71a035185f10d2a7fff887f0a5823b430bf71/holesky-lighthouse-erigon.json |
BEACON_NODE_URL |
URL to the beacon node API | http://localhost:5052 |
bash
curl
jq
- Access to a beacon node API endpoint
🔍 Checking slots starting from 3712450 (epoch 116014)...
⏭️ Slot 3712450 (epoch 116014) not found on node, trying earlier slot...
✅ Matching root at slot 3712443 (epoch 116013): 0xc680de17afc7d73cda381bb1ec743e63d6123fd255ebb6e682cf1c59702afcb4
✅ Node is on the correct fork
⏭️ Slot 3712443 (epoch 116013) not found on node, trying earlier slot...
⏭️ Slot 3712415 (epoch 116012) not found on node, trying earlier slot...
⏭️ Slot 3712355 (epoch 116011) not found on node, trying earlier slot...
⏭️ Slot 3712292 (epoch 116009) not found on node, trying earlier slot...
⏭️ Slot 3711917 (epoch 115997) not found on node, trying earlier slot...
❌ Fork detected at slot 3711913 (epoch 115997)!
Expected root: 0xcd2f0403e62139d1e77440d66df9abacc2c706e45527e95cc51569c9d328de9a
Node's root: 0x03e705ddb8526f702992e005ae27c9dd10dff5a4cf070cc7a3142c02c487e123
🔍 Continuing to search for fork point...
⏭️ Slot 3711901 (epoch 115996) not found on node, trying earlier slot...
⏭️ Slot 3711860 (epoch 115995) not found on node, trying earlier slot...
⏭️ Slot 3711858 (epoch 115995) not found on node, trying earlier slot...
⏭️ Slot 3711831 (epoch 115994) not found on node, trying earlier slot...
⏭️ Slot 3711791 (epoch 115993) not found on node, trying earlier slot...
⏭️ Slot 3711703 (epoch 115990) not found on node, trying earlier slot...
⏭️ Slot 3711699 (epoch 115990) not found on node, trying earlier slot...
⏭️ Slot 3711682 (epoch 115990) not found on node, trying earlier slot...
⏭️ Slot 3711672 (epoch 115989) not found on node, trying earlier slot...
⏭️ Slot 3711668 (epoch 115989) not found on node, trying earlier slot...
⏭️ Slot 3711649 (epoch 115989) not found on node, trying earlier slot...
⏭️ Slot 3711641 (epoch 115988) not found on node, trying earlier slot...
⏭️ Slot 3711636 (epoch 115988) not found on node, trying earlier slot...
⏭️ Slot 3711574 (epoch 115986) not found on node, trying earlier slot...
⏭️ Slot 3711477 (epoch 115983) not found on node, trying earlier slot...
⏭️ Slot 3711461 (epoch 115983) not found on node, trying earlier slot...
⏭️ Slot 3711433 (epoch 115982) not found on node, trying earlier slot...
⏭️ Slot 3711416 (epoch 115981) not found on node, trying earlier slot...
⏭️ Slot 3711391 (epoch 115980) not found on node, trying earlier slot...
⏭️ Slot 3711388 (epoch 115980) not found on node, trying earlier slot...
⏭️ Slot 3711311 (epoch 115978) not found on node, trying earlier slot...
⏭️ Slot 3711290 (epoch 115977) not found on node, trying earlier slot...
⏭️ Slot 3711171 (epoch 115974) not found on node, trying earlier slot...
⏭️ Slot 3711036 (epoch 115969) not found on node, trying earlier slot...
❌ Node is on a different fork, and no common ancestor was found
Typo: chmod +x check-holeksy.sh -> chmod +x check-holesky.sh