lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

Perform validation on `config.yaml`

Open dknopik opened this issue 1 year ago • 1 comments

Description

When constructing custom devnets, usually a custom config.yaml is created. The only validation performed right now is a check whether the PRESET_NAME matches the EthSpec used.

When a user makes a mistake and provides an invalid config.yaml, it is silently accepted at first, but may cause unexpected behaviour later on. Users might not realize their mistake from this behaviour. For example: When specifying the same fork version for Deneb (activated from genesis) and Electra (far future), Lighthouse will subscribe to the subnets of Electra, but send blocks for Deneb - causing deserialisation errors. This can be avoided by implementing sanity checks that deny illegal config.yamls.

Version

Current unstable (c7ded10)

Present Behaviour

Invalid config.yamls are silently accepted, causing various errors later on.

Expected Behaviour

Lighthouse should perform a set of sanity checks to identify clearly faulty configurations and tell the user.

Steps to resolve

  • [ ] Define good sanity checks
  • [ ] Implement

dknopik avatar Jul 30 '24 14:07 dknopik

Yeah we've seen this issue before and I think it's a good idea to validate the config. Related: https://github.com/sigp/lighthouse/issues/3033#issuecomment-1659491285

jimmygchen avatar Jul 31 '24 00:07 jimmygchen

I'll probably pick this one up later today.

Patchoulis avatar Apr 14 '25 09:04 Patchoulis