Skip to content

Commit d0bc85f

Browse files
committed
engine_getBlobsV2: add partialResponse flag to enable partial hits
Add optional `partialResponse` boolean flag to reinstate `engine_getBlobsV1`'s partial hit behavior, needed for optimization work. Background: - `engine_getBlobsV1` currently achieves a 70-80% hit rate, expected to remain high even as blob volume increases. - EIP-4844 introduced full blob sidecar broadcasts at the CL layer; with PeerDAS, the CL now gossips column sidecars. - Because columns sidecars require all cells to be present, support for partial hits was previously dropped [in this commit][cad419]. Motivation: - The P2P networking team is actively working on backwards-compatible optimizations that can be deployed in-between forks. - For instance, we're prototyping cell-level deltas to facilitate column reconciliation based on local availability. - This would reduce redundant full-column transmissions and reclaim useful bandwith to further scale blobs. Remarks: - We're aware this change might be procedurally late, but its ease of implementation and its ability to unlock an entire class of interim improvements makes it worthwhile to consider (and we only noticed this opportunity in Berlin). - We'll happily submit PRs to implement this in EL and CL clients if needed. Just let us know! - We gated partial responses behind a flag to avoid unnecessary overhead while unused. [cad419]: cad4194
1 parent bc5a37e commit d0bc85f

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

src/engine/openrpc/methods/blob.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
type: array
4646
items:
4747
$ref: '#/components/schemas/hash32'
48+
- name: Partial response requested
49+
required: true
50+
schema:
51+
title: partialResponse
52+
type: boolean
4853
result:
4954
name: List of blobs and corresponding cell proofs
5055
schema:
@@ -60,6 +65,8 @@
6065
- name: Blob versioned hashes
6166
value:
6267
- '0x000657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014'
68+
- name: Partial response requested
69+
value: true
6370
result:
6471
name: List of blobs and corresponding cell proofs
6572
value:

src/engine/osaka.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,24 +96,30 @@ Consensus layer clients **MAY** use this method to fetch blobs from the executio
9696
* method: `engine_getBlobsV2`
9797
* params:
9898
1. `Array of DATA`, 32 Bytes - Array of blob versioned hashes.
99+
2. `partialResponse` : `BOOLEAN` - Controls whether to return partial hits.
99100
* timeout: 1s
100101

101102
#### Response
102103

103-
* result: `Array of BlobAndProofV2` - Array of [`BlobAndProofV2`](#BlobAndProofV2) or `null` in case of any missing blobs.
104+
* result: `Array of BlobAndProofV2`:
105+
* if `partialResponse=false`: Array of [`BlobAndProofV2`](#BlobAndProofV2), or `null` in case of ANY missing blobs.
106+
* if `partialResponse=true`: Array of [`BlobAndProofV2`](#BlobAndProofV2), containing `null` for EACH missing blob.
104107
* error: code and message set in case an error occurs during processing of the request.
105108

106109
#### Specification
107110

108111
Refer to the specification for [`engine_getBlobsV1`](./cancun.md#engine_getblobsv1) with changes of the following:
109112

110113
1. Given an array of blob versioned hashes client software **MUST** respond with an array of `BlobAndProofV2` objects with matching versioned hashes, respecting the order of versioned hashes in the input array.
111-
2. Client software **MUST** return `null` in case of any missing or older version blobs. For instance,
114+
2. When `partialResponse=false`, client software **MUST** return `null` in case of any missing or older version blobs. For instance,
112115
1. if the request is `[A_versioned_hash, B_versioned_hash, C_versioned_hash]` and client software has data for blobs `A` and `C`, but doesn't have data for `B`, the response **MUST** be `null`.
113116
2. if the request is `[A_versioned_hash_for_blob_with_blob_proof]`, the response **MUST** be `null` as well.
114-
3. Client software **MUST** support request sizes of at least 128 blob versioned hashes. The client **MUST** return `-38004: Too large request` error if the number of requested blobs is too large.
115-
4. Client software **MUST** return `null` if syncing or otherwise unable to serve blob pool data.
116-
5. Callers **MUST** consider that execution layer clients may prune old blobs from their pool, and will respond with `null` if a blob has been pruned.
117+
3. When `partialResponse=true`, client software **MUST** place responses in the order given in the request, using `null` for any missing blobs. For instance,
118+
1. if the request is `[A_versioned_hash, B_versioned_hash, C_versioned_hash]` and client software has data for blobs `A` and `C`, but doesn't have data for `B`, the response **MUST** be `[A, null, C]`.
119+
2. if the request is `[A_versioned_hash_for_blob_with_blob_proof]`, the response **MUST** be `null`.
120+
4. Client software **MUST** support request sizes of at least 128 blob versioned hashes. The client **MUST** return `-38004: Too large request` error if the number of requested blobs is too large.
121+
5. Client software **MUST** return `null` if syncing or otherwise unable to serve blob pool data.
122+
6. Callers **MUST** consider that execution layer clients may prune old blobs from their pool, and will respond with `null` if a blob has been pruned.
117123

118124
### Update the methods of previous forks
119125

0 commit comments

Comments
 (0)