Skip to content

Conversation

mablr
Copy link
Contributor

@mablr mablr commented Oct 19, 2025

Motivation

Close #12181

Solution

  • Implemented the anvil_getBlobsByBlockId in the Eth API to retrieve blobs by block ID and versioned hashes filtering option.
  • Created a new /eth/v1/beacon/blobs route
  • Added integration test to validate the new endpoint and its functionality, including filtering by versioned hashes.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes (/eth/v1/beacon/blob_sidecars should be removed)

- Implemented the `anvil_getBlobsByBlockId` function in the Eth API to retrieve blobs by block ID and versioned hashes filtering option.
- Created a new HTTP handler for the Beacon API to process requests for blobs.
- Added integration test to validate the new endpoint and its functionality, including filtering by versioned hashes.
Copy link
Contributor Author

@mablr mablr left a comment

Choose a reason for hiding this comment

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

It may be worthy to deprecate (completely remove before the next release) /eth/v1/beacon/blob_sidecars as it's already obsolete.

PS: I haven't removed it so far, awaiting your feedback...


// Get the blob sidecars using existing EthApi logic
match api.anvil_get_blob_sidecars_by_block_id(block_id) {
Ok(Some(sidecar)) => BeaconResponse::with_flags(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Once /eth/v1/beacon/blob_sidecars is deprecated, BeaconResponse struct helper can be removed.

Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

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

thank you, can you pls check CI, the newly added test_beacon_api_get_blobs test fails with

thread 'tokio-runtime-worker' has overflowed its stack
    fatal runtime error: stack overflow, aborting

https://github.com/foundry-rs/foundry/actions/runs/18636701613/job/53128861516#step:14:1877

@mattsse
Copy link
Member

mattsse commented Oct 20, 2025

fatal runtime error: stack overflow, aborting

this is likely blob deserde issue

@mablr
Copy link
Contributor Author

mablr commented Oct 20, 2025

fatal runtime error: stack overflow, aborting

this is likely blob deserde issue

Hmm I think the last commit (0f7c552) actually fixed the problem.
image

I guess the failure is due to GitHub CI😅 https://github.com/foundry-rs/foundry/actions/runs/18648981612/job/53162399230?pr=12182

@mablr mablr marked this pull request as ready for review October 20, 2025 10:55
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Member

@zerosnacks zerosnacks left a comment

Choose a reason for hiding this comment

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

Thanks!

@zerosnacks zerosnacks added this pull request to the merge queue Oct 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 20, 2025
@onbjerg onbjerg added this pull request to the merge queue Oct 20, 2025
@DaniPopes DaniPopes removed this pull request from the merge queue due to a manual request Oct 20, 2025
@grandizzy grandizzy enabled auto-merge October 21, 2025 05:33
@grandizzy grandizzy added this pull request to the merge queue Oct 21, 2025
Merged via the queue into foundry-rs:master with commit 7c3e5e1 Oct 21, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this to Done in Foundry Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

beacon-api: eth/v1/beacon/blob_sidecars deprecated in favour of eth/v1/beacon/blobs

6 participants