You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in the yaml config, we set the disabled fork epoch values (ALTAIR_FORK_EPOCH, MERGE_FORK_EPOCH) as uint64::max().
To be more explicit, we could instead set the fork_epoch value for disabled forks as null in the yaml config.
The primary reasoning is that uint64::max() is a placeholder value to denote that the fork is disabled on the given network config. Setting it explicitly to null would simplify knowing if the fork is enabled or not without any additional context (that u64::max() denotes disabled).
The text was updated successfully, but these errors were encountered:
pawanjay176
changed the title
Set disabled values as null in yaml config
Set disabled fork epoch values as null in yaml config
Aug 26, 2021
Thanks Pawan. I was going to advocate for this too, because it differentiates between:
The fork epoch has been set for this network, and it is N, and
The fork epoch has not been decided for this network, but may be set to some value N in future
Lighthouse has been representing fork epochs as Option<Epoch> since we started working on Altair, so our None/null value was used to represent case (2). We were incorrectly treating 2**64 - 1 as case (1), i.e. a concrete epoch at which the fork would eventually activate. We're going to move to mapping 2**64 - 1 to None on (de)serialisation, which is probably what we should have done from the start. I think this should be backwards-compatible for us, and avoids changing the spec. The only thing I can imagine might be affected is the /config/fork_schedule endpoint, which will filter out the forks that aren't scheduled rather than returning them with u64::max.
Currently in the yaml config, we set the disabled fork epoch values (
ALTAIR_FORK_EPOCH
,MERGE_FORK_EPOCH
) asuint64::max()
.To be more explicit, we could instead set the fork_epoch value for disabled forks as
null
in the yaml config.The primary reasoning is that
uint64::max()
is a placeholder value to denote that the fork is disabled on the given network config. Setting it explicitly tonull
would simplify knowing if the fork is enabled or not without any additional context (thatu64::max()
denotes disabled).The text was updated successfully, but these errors were encountered: