There are some patterns that lead to degraded type-safety.
We should review our codebase, especially things added in electra, for these types of patterns and refactor if possible.
Ideally we can more clearly articulate our findings here into something that can be added to the contributing doc or elsewhere.
is there a way to make this more typesafe?
I'll make an issue for later, but there are some patterns in our code that lead to this kind of bug (that we should clean up later).
There are some patterns that lead to degraded type-safety. We should review our codebase, especially things added in electra, for these types of patterns and refactor if possible.
Ideally we can more clearly articulate our findings here into something that can be added to the contributing doc or elsewhere.
I'll make an issue for later, but there are some patterns in our code that lead to this kind of bug (that we should clean up later).
_Originally posted by @wemeetagain in https://github.com/ChainSafe/lodestar/pull/6788#discussion_r1603812066_