Skip to content

Comments

Add getBlobsV1 and getBlobsV2 support to mock EL server#8870

Open
jimmygchen wants to merge 3 commits intosigp:unstablefrom
jimmygchen:feat-mock-el-get-blobs
Open

Add getBlobsV1 and getBlobsV2 support to mock EL server#8870
jimmygchen wants to merge 3 commits intosigp:unstablefrom
jimmygchen:feat-mock-el-get-blobs

Conversation

@jimmygchen
Copy link
Member

@jimmygchen jimmygchen commented Feb 20, 2026

Description

Revive #7986 which was approved but closed after network-tests flaked repeatedly in the merge queue.

Adds engine_getBlobsV1 and engine_getBlobsV2 handlers to the mock EL server. When blobs have been generated during payload building (integration tests), they're returned by matching versioned hashes from the existing blobs_bundles. When no blobs exist (lcli paired with a real CL), empty results are returned — preventing the CL from logging "method not supported" errors.

Changes from #7986:

  • .to_vec().into().to_vec().try_into().ok()? for V2 cell proofs (VariableList no longer implements From<Vec<_>>)
  • Spec-compliant return types: V1 returns Vec<Option<BlobAndProofV1>> (per-element nullable, positionally matching the request), V2 returns Option<Vec<BlobAndProofV2>> (all-or-nothing, null if any blob is missing)

@jimmygchen jimmygchen added test improvement Improve tests ready-for-review The code is ready for review labels Feb 20, 2026
@jimmygchen jimmygchen marked this pull request as ready for review February 20, 2026 03:26
}
}

Ok(serde_json::to_value(blobs_and_proofs).unwrap())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this return Vec<Option<...>>? To set the missing blobs to null

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in the latest push. V1 now returns Vec<Option<BlobAndProofV1>> with nulls at positions of missing hashes, and V2 returns Option<Vec<BlobAndProofV2>> (null if any blob is missing), per the execution-apis spec.

.find(|(_, commitment)| {
&kzg_commitment_to_versioned_hash(commitment) == versioned_hash
})?;
let is_fulu_bundle = blobs_bundle.blobs.len() < blobs_bundle.proofs.len();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we not decide this based on the slot? Seems like a non-obvious condition.
Maybe add a comment explaining this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review The code is ready for review test improvement Improve tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants