Skip to content

Commit

Permalink
Merge pull request #3890 from StefanBratanov/eip_7732_modify
Browse files Browse the repository at this point in the history
EIP-7732: Modify `ExecutionPayloadEnvelopeByRoot`
  • Loading branch information
hwwhww authored Aug 29, 2024
2 parents 0dd76d3 + ba99f8b commit a95195b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
3 changes: 3 additions & 0 deletions configs/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,6 @@ CUSTODY_REQUIREMENT: 4
# [New in Electra:EIP7251]
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 128000000000 # 2**7 * 10**9 (= 128,000,000,000)
MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 256000000000 # 2**8 * 10**9 (= 256,000,000,000)

# EIP7732
MAX_REQUEST_PAYLOADS: 128
3 changes: 3 additions & 0 deletions configs/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,6 @@ CUSTODY_REQUIREMENT: 4
# [New in Electra:EIP7251]
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 64000000000 # 2**6 * 10**9 (= 64,000,000,000)
MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 128000000000 # 2**7 * 10**9 (= 128,000,000,000)

# EIP7732
MAX_REQUEST_PAYLOADS: 128
25 changes: 17 additions & 8 deletions specs/_features/eip7732/p2p-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This document contains the consensus-layer networking specification for EIP7732.

- [Modification in EIP-7732](#modification-in-eip-7732)
- [Preset](#preset)
- [Configuration](#configuration)
- [Containers](#containers)
- [`BlobSidecar`](#blobsidecar)
- [Helpers](#helpers)
Expand All @@ -23,7 +24,7 @@ This document contains the consensus-layer networking specification for EIP7732.
- [BeaconBlocksByRange v3](#beaconblocksbyrange-v3)
- [BeaconBlocksByRoot v3](#beaconblocksbyroot-v3)
- [BlobSidecarsByRoot v2](#blobsidecarsbyroot-v2)
- [ExecutionPayloadEnvelopeByRoot v1](#executionpayloadenvelopebyroot-v1)
- [ExecutionPayloadEnvelopesByRoot v1](#executionpayloadenvelopesbyroot-v1)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand All @@ -37,6 +38,14 @@ This document contains the consensus-layer networking specification for EIP7732.
|------------------------------------------|-----------------------------------|---------------------------------------------------------------------|
| `KZG_COMMITMENT_INCLUSION_PROOF_DEPTH_EIP7732` | `13` # TODO: Compute it when the spec stabilizes | Merkle proof depth for the `blob_kzg_commitments` list item |

### Configuration

*[New in EIP7732]*

| Name | Value | Description |
|------------------------|----------------|-------------------------------------------------------------------|
| `MAX_REQUEST_PAYLOADS` | `2**7` (= 128) | Maximum number of execution payload envelopes in a single request |


### Containers

Expand Down Expand Up @@ -225,9 +234,9 @@ Per `context = compute_fork_digest(fork_version, genesis_validators_root)`:
| `EIP7732_FORK_VERSION` | `eip7732.BlobSidecar` |


##### ExecutionPayloadEnvelopeByRoot v1
##### ExecutionPayloadEnvelopesByRoot v1

**Protocol ID:** `/eth2/beacon_chain/req/execution_payload_envelope_by_root/1/`
**Protocol ID:** `/eth2/beacon_chain/req/execution_payload_envelopes_by_root/1/`

The `<context-bytes>` field is calculated as `context = compute_fork_digest(fork_version, genesis_validators_root)`:

Expand All @@ -241,22 +250,22 @@ Request Content:

```
(
List[Root, MAX_REQUEST_PAYLOAD]
List[Root, MAX_REQUEST_PAYLOADS]
)
```

Response Content:

```
(
List[SignedExecutionPayloadEnvelope, MAX_REQUEST_PAYLOAD]
List[SignedExecutionPayloadEnvelope, MAX_REQUEST_PAYLOADS]
)
```
Requests execution payload envelope by `signed_execution_payload_envelope.message.block_root`. The response is a list of `SignedExecutionPayloadEnvelope` whose length is less than or equal to the number of requested execution payload envelopes. It may be less in the case that the responding peer is missing payload envelopes.
Requests execution payload envelopes by `signed_execution_payload_envelope.message.block_root`. The response is a list of `SignedExecutionPayloadEnvelope` whose length is less than or equal to the number of requested execution payload envelopes. It may be less in the case that the responding peer is missing payload envelopes.

No more than `MAX_REQUEST_PAYLOAD` may be requested at a time.
No more than `MAX_REQUEST_PAYLOADS` may be requested at a time.

ExecutionPayloadEnvelopeByRoot is primarily used to recover recent execution payload envelope (e.g. when receiving a payload attestation with revealed status as true but never received a payload).
ExecutionPayloadEnvelopesByRoot is primarily used to recover recent execution payload envelopes (e.g. when receiving a payload attestation with revealed status as true but never received a payload).

The request MUST be encoded as an SSZ-field.

Expand Down

0 comments on commit a95195b

Please sign in to comment.