-
Notifications
You must be signed in to change notification settings - Fork 958
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
Open
etan-status
wants to merge
3
commits into
ethereum:dev
Choose a base branch
from
etan-status:ef-blobp2p
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -187,6 +187,16 @@ The following validations MUST pass before forwarding the `blob_sidecar` on the | |
- _[REJECT]_ The sidecar is proposed by the expected `proposer_index` for the block's slot in the context of the current shuffling (defined by `block_header.parent_root`/`block_header.slot`). | ||
If the `proposer_index` cannot immediately be verified against the expected shuffling, the sidecar MAY be queued for later processing while proposers for the block's branch are calculated -- in such a case _do not_ `REJECT`, instead `IGNORE` this message. | ||
|
||
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` | | ||
|
||
##### Attestation subnets | ||
|
||
###### `beacon_attestation_{subnet_id}` | ||
|
@@ -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 commentThe 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 |
||
|
||
| `fork_version` | Chunk SSZ type | | ||
|--------------------------|-------------------------------| | ||
|
@@ -263,14 +273,6 @@ Clients SHOULD NOT respond with blocks that fail the beacon chain state transiti | |
|
||
*[New in Deneb:EIP4844]* | ||
|
||
The `<context-bytes>` field is calculated as `context = compute_fork_digest(fork_version, genesis_validators_root)`: | ||
|
||
[1]: # (eth2spec: skip) | ||
|
||
| `fork_version` | Chunk SSZ type | | ||
|--------------------------|-------------------------------| | ||
| `DENEB_FORK_VERSION` | `deneb.BlobSidecar` | | ||
|
||
Request Content: | ||
|
||
``` | ||
|
@@ -309,19 +311,22 @@ Clients SHOULD include a sidecar in the response as soon as it passes the gossip | |
Clients SHOULD NOT respond with sidecars related to blocks that fail gossip validation rules. | ||
Clients SHOULD NOT respond with sidecars related to blocks that fail the beacon chain state transition | ||
|
||
##### BlobSidecarsByRange v1 | ||
For each `response_chunk`, a `ForkDigest`-context based on `compute_fork_version(compute_epoch_at_slot(blob_sidecar.signed_block_header.message.slot))` is used to select the fork namespace of the Response type. | ||
|
||
**Protocol ID:** `/eth2/beacon_chain/req/blob_sidecars_by_range/1/` | ||
Per `context = compute_fork_digest(fork_version, genesis_validators_root)`: | ||
|
||
*[New in Deneb:EIP4844]* | ||
[0]: # (eth2spec: skip) | ||
|
||
The `<context-bytes>` field is calculated as `context = compute_fork_digest(fork_version, genesis_validators_root)`: | ||
| `fork_version` | Chunk SSZ type | | ||
|--------------------------------|-------------------------------| | ||
| `DENEB_FORK_VERSION` and later | `deneb.BlobSidecar` | | ||
|
||
[1]: # (eth2spec: skip) | ||
|
||
| `fork_version` | Chunk SSZ type | | ||
|--------------------------|-------------------------------| | ||
| `DENEB_FORK_VERSION` | `deneb.BlobSidecar` | | ||
##### BlobSidecarsByRange v1 | ||
|
||
**Protocol ID:** `/eth2/beacon_chain/req/blob_sidecars_by_range/1/` | ||
|
||
*[New in Deneb:EIP4844]* | ||
|
||
Request Content: | ||
``` | ||
|
@@ -389,6 +394,16 @@ Clients MUST respond with blob sidecars that are consistent from a single chain | |
|
||
After the initial blob sidecar, clients MAY stop in the process of responding if their fork choice changes the view of the chain in the context of the request. | ||
|
||
For each `response_chunk`, a `ForkDigest`-context based on `compute_fork_version(compute_epoch_at_slot(blob_sidecar.signed_block_header.message.slot))` is used to select the fork namespace of the Response type. | ||
|
||
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` | | ||
|
||
## Design decision rationale | ||
|
||
### Why are blobs relayed as a sidecar, separate from beacon blocks? | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-messagesThere 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.