ethpandaops / forky

An Ethereum Beacon Chain fork choice viewer
GNU General Public License v3.0
26 stars 1 forks source link

Instead of setting the network values, read them from the beacon nodes #71

Open barnabasbusa opened 1 month ago

barnabasbusa commented 1 month ago

Currently forky reads the spec values from a config file.

This is error prone, if you want to use forky on a non standard setup.

It would make sense to read the spec values from the beacon node that it is connected to.

spec:
   seconds_per_slot: 12
   slots_per_epoch: 32
   genesis_time: <genesis-time>

These values could be queried from:

/eth/v1/config/spec | jq .data.SECONDS_PER_SLOT /eth/v1/config/spec | jq .data.SLOTS_PER_EPOCH /eth/v1/config/spec | jq .data.MIN_GENESIS_TIME + GENESIS_DELAY

barnabasbusa commented 1 month ago

Related issue: https://github.com/ethpandaops/ansible-collection-general/issues/232

samcm commented 1 month ago

@barnabasbusa the reason this doesn't exist is because forky doesn't need to connect to a beacon node when receiving events via Xatu (which is what we do for our production instances)