-
Notifications
You must be signed in to change notification settings - Fork 997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add eth2 key/value ENR to phase 0 p2p #1614
Conversation
The actual PR is generic, so looks fine to me.
When doing status messages, which fork version should be sent (and which fork version is in the ENR), the one from the state or a client-maintained |
From discussion earlier: how do we handle the pre-genesis case, where the root is not yet known? Default to |
The PR looks good to me , 1) seems to be the simplest and makes the most sense to me.
This is a safe assumption, I do not know if there would ever be a situation where there is a network upgrade without updating the fork version.
For pre-genesis it would make sense to default with
either one is fine with me |
Made updates re: our conversation today. It isnt exactly what we discussed, but as I worked through, it seemed clean. I'm not yet set on this. Open to feedback |
…separation as well as fork separation
add genesis_validators_root for domain/chain separation
* `next_fork_epoch` is the epoch at which the next fork is planned and the `current_fork_version` will be updated. If no future fork is planned, set `next_fork_epoch = FAR_FUTURE_EPOCH` to signal this fact | ||
|
||
Clients SHOULD connect to peers with `current_fork_digest`, `next_fork_version`, and `next_fork_epoch` that match local values. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add a note that clients SHOULD
connect to peers that have previous fork digests as their current fork digests ? Ex: Peers syncing from genesis/past epochs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been back and forth on this. I think the answer is no in the general case.
Having a different fork digest means that the current slot wrt wall time, you disagree on fundamental consensus rules (even if it is just the fork version). From the perspective of the ENR, I can't tell if the client wrt sync is in the past or up to the current slot. If they are in the past, I could presumable serve them some blocks to get them up to a certain point, but then we will fork. In such a case, it is better for them to find peers that are actually on their chain (fork digest) and sync all the way to the head rather than me connecting to them to see if I can help them part of the way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nitpicks, looks good.
…o domains for chain isolation in p2p faq
Feedback addressed @protolambda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[UPDATED]
eth2
ENR entry that maps to 16-byteENRForkID
(current_fork_digest
,next_fork_version
,next_fork_epoch
Version
is planned to be used when forking a network