-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Modify fork digest to distinguish BPO forks + add entry to ENR #4354
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
Changes from 26 commits
41f2322
b2e8dba
803460b
45b2ee1
77d981e
0a9b17d
0be632f
738cca0
b00d6a1
fc0990b
4c841df
5d21628
35fd1df
d2e7d5e
a3ec2b5
a674c3e
ae4d000
a428187
2deef95
82bf29b
0b6cd8e
c910bf1
e5dc7a2
353e407
a33876a
d2e1b50
1e79dbc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,7 @@ | |
| - [The discovery domain: discv5](#the-discovery-domain-discv5) | ||
| - [ENR structure](#enr-structure) | ||
| - [Custody group count](#custody-group-count) | ||
| - [Next fork digest](#next-fork-digest) | ||
|
|
||
| <!-- mdformat-toc end --> | ||
|
|
||
|
|
@@ -304,13 +305,13 @@ During the deprecation transition period: | |
| **Protocol ID:** `/eth2/beacon_chain/req/data_column_sidecars_by_range/1/` | ||
|
|
||
| The `<context-bytes>` field is calculated as | ||
| `context = compute_fork_digest(fork_version, genesis_validators_root)`: | ||
| `context = compute_fork_digest(genesis_validators_root, fork_epoch)`: | ||
|
|
||
| <!-- eth2spec: skip --> | ||
|
|
||
| | `fork_version` | Chunk SSZ type | | ||
| | ------------------- | ------------------------ | | ||
| | `FULU_FORK_VERSION` | `fulu.DataColumnSidecar` | | ||
| | `fork_epoch` | Chunk SSZ type | | ||
| | ----------------- | ------------------------ | | ||
| | `FULU_FORK_EPOCH` | `fulu.DataColumnSidecar` | | ||
|
|
||
| Request Content: | ||
|
|
||
|
|
@@ -409,13 +410,13 @@ the request. | |
| *[New in Fulu:EIP7594]* | ||
|
|
||
| The `<context-bytes>` field is calculated as | ||
| `context = compute_fork_digest(fork_version, genesis_validators_root)`: | ||
| `context = compute_fork_digest(genesis_validators_root, fork_epoch)`: | ||
|
|
||
| <!-- eth2spec: skip --> | ||
|
|
||
| | `fork_version` | Chunk SSZ type | | ||
| | ------------------- | ------------------------ | | ||
| | `FULU_FORK_VERSION` | `fulu.DataColumnSidecar` | | ||
| | `fork_epoch` | Chunk SSZ type | | ||
| | ----------------- | ------------------------ | | ||
| | `FULU_FORK_EPOCH` | `fulu.DataColumnSidecar` | | ||
|
|
||
| Request Content: | ||
|
|
||
|
|
@@ -494,3 +495,29 @@ column discovery. | |
| | Key | Value | | ||
| | ----- | ----------------------------------------------------------------------------------------------------------------- | | ||
| | `cgc` | Custody group count, `uint64` big endian integer with no leading zero bytes (`0` is encoded as empty byte string) | | ||
|
|
||
| ##### Next fork digest | ||
|
|
||
| A new entry is added to the ENR under the key `nfd`, short for _next fork | ||
| digest_. This entry communicates the digest of the next scheduled fork, | ||
| regardless of whether it is a regular or a Blob-Parameters-Only fork. | ||
jtraglia marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
raulk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| If no next fork is scheduled, the `nfd` entry contains the default value for the | ||
| type (i.e., the SSZ representation of a zero-filled array). | ||
|
|
||
| | Key | Value | | ||
| | :---- | :---------------------- | | ||
| | `nfd` | SSZ Bytes4 `ForkDigest` | | ||
|
|
||
| Furthermore, the existing `next_fork_epoch` field under the `eth2` entry MUST be | ||
| set to the epoch of the next fork, whether a regular fork, _or a BPO fork_. | ||
|
|
||
| When discovering and interfacing with peers, nodes MUST evaluate `nfd` alongside | ||
| their existing consideration of the `ENRForkID::next_*` fields under the `eth2` | ||
| key, to form a more accurate view of the peer's intended next fork for the | ||
| purposes of sustained peering. A mismatch indicates that the node MUST | ||
| disconnect from such peers at the fork boundary, but not sooner. | ||
|
|
||
| Nodes unprepared to follow the Fulu fork will be unaware of `nfd` entries. | ||
| However, their existing comparison of `eth2` entries (concretely | ||
| `next_fork_epoch`) is sufficient to detect upcoming divergence. | ||
|
Comment on lines
+522
to
+523
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does any client actually implement that check right now? I don't see how that works in practice since if you publish a release that has Or do clients ignore this check if |
||
Uh oh!
There was an error while loading. Please reload this page.