-
Notifications
You must be signed in to change notification settings - Fork 989
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
Document ForkDigest
-context for EIP-4844 BlobSidecar
in Electra
#3850
Conversation
Currently, documentation does not state what determines the `ForkDigest` for `BlobSidecar`. It makes most sense to use the corresponding slot as that one determines the `ForkDigest` of the corresponding beacon block. Furthermore, add "and later" remarks so that `ELECTRA_FORK_VERSION` is also associated with the `deneb.BlobSidecar` type. This is in line with how `light-client/p2p-interface.md` is done.
specs/deneb/p2p-interface.md
Outdated
The gossip `ForkDigest`-context is determined based on `compute_fork_version(compute_epoch_at_slot(blob_sidecar.signed_block_header.message.slot))`. | ||
|
||
Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: | ||
|
||
[0]: # (eth2spec: skip) | ||
|
||
| `fork_version` | Chunk SSZ type | | ||
|--------------------------------|-------------------------------| | ||
| `DENEB_FORK_VERSION` and later | `deneb.BlobSidecar` | | ||
|
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.
The ForkDigest
-context thing is only for Req/Resp, not GossipSub topics. GossipSub has nothing to do with it.
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.
ForkDigest
is also part of Gossipsub (as part of the topic name): https://github.com/ethereum/consensus-specs/blob/a42d6706d89c414764eda7e2d0103e19f1e23761/specs/phase0/p2p-interface.md#topics-and-messages
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.
Let's call it ForkDigestValue
then.
This is new to the spec (except light-client), but, given that |
@@ -241,7 +251,7 @@ No more than `MAX_REQUEST_BLOCKS_DENEB` may be requested at a time. | |||
|
|||
Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: | |||
|
|||
[1]: # (eth2spec: skip) | |||
[0]: # (eth2spec: skip) |
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'm a bit curious when to use [0] and when to use [1] here. cc: @hwwhww
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.
Likewise, it's inconsistent inside the same document. Overall, [0] seems to be more.. "dominant" throughout the codebase, for these table annotations.
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.
Agreed. It shouldn't really matter either way, it's only used to tell pyspec not to parse the table.
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.
Looks good to me, thank you!
I'm reluctant to merge this PR since we have never specified how to derive |
https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md#topics-and-messages
Also, it was your suggestion to switch to I'm also fine going back to |
What I meant is we didn't specify it in Altair, Bellatrix, or Capella.
I just suggested that it should be called |
Hmm. The difference that's blob sidecars specific is that they are tied to a block, while the other messages are all standalone. What the explicit spec of the In practice, this is (so far) only relevant in edge cases around the fork transition and possibly only createable by a weird implementation or by combining late block proposal with severe clock disparity / processing lag spikes that advance the clock between individual sidecars sending. In principle we have three classes of gossip:
That explains why this is a |
Regarding whether there needs to be any specification for this at all, I wonder about the security implications as well of leaving this implementation-defined. During the fork transition, CL implementations start building Electra meshes an epoch or so before the fork transition happens. Today, there is nothing that prevents nodes from broadcasting If that is left open, blobs may appear on either of the meshes, or even on both. In case of both, question is if it can be used to introduce latency spikes by doubling the traffic. Answer there is no because there is an So, while this is only about edge cases during the fork transition, and it's probably alright to leave it unspecified, I still think (1) there is no downside in restricting the blob to be sent on the same mesh as block, and (2) there may (or may not) be security implications if implementations can just pick whatever mesh they want for large messages such as blobsidecar. And, also, this is unique for |
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
Currently, documentation does not state what determines the
ForkDigest
forBlobSidecar
. It makes most sense to use the corresponding slot as that one determines theForkDigest
of the corresponding beacon block.Furthermore, add "and later" remarks so that
ELECTRA_FORK_VERSION
is also associated with thedeneb.BlobSidecar
type.This is in line with how
light-client/p2p-interface.md
is done.