ethpandaops / dora

Dora the Explorer is a lightweight slot explorer for the ethereum beaconchain
https://beaconlight.ephemery.dev/
GNU General Public License v3.0
82 stars 26 forks source link

fix endless loop when validator set cannot be loaded on dead chain #151

Closed pk910 closed 1 month ago

pk910 commented 1 month ago

As currently seen on https://dora.ssz-devnet-0.ethpandaops.io

There is no validator set available as there is no blocks in the network and no epoch stats are loaded. Due to an issue in the GetCanonicalValidatorSet, dora gets stuck in an endess loop, trying to iterate to the parent of epoch 0, which obviously doesn't work.

The error propagates down to several pages and other parts of the code as they're all calling the GetCanonicalValidatorSet` function: image