Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions execution_chain/beacon/api_handler.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Nimbus
# Copyright (c) 2023-2025 Status Research & Development GmbH
# Copyright (c) 2023-2026 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
Expand Down Expand Up @@ -30,4 +30,5 @@ export
newPayload,
forkchoiceUpdated,
getBlobsV1,
getBlobsV2
getBlobsV2,
getBlobsV3
18 changes: 17 additions & 1 deletion execution_chain/beacon/api_handler/api_getblobs.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Nimbus
# Copyright (c) 2025 Status Research & Development GmbH
# Copyright (c) 2025-2026 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
Expand All @@ -8,6 +8,7 @@
# those terms.

import
std/sequtils,
results,
json_rpc/errors,
web3/engine_api_types,
Expand Down Expand Up @@ -50,3 +51,18 @@ proc getBlobsV2*(ben: BeaconEngineRef,
list.add blobAndProof

ok(list)

proc getBlobsV3*(ben: BeaconEngineRef,
versionedHashes: openArray[VersionedHash]):
seq[Opt[BlobAndProofV2]] =
# https://github.com/ethereum/execution-apis/pull/719
if versionedHashes.len > 128:
raise tooLargeRequest("the number of requested blobs is too large")

if ben.latestFork < Osaka:
raise unsupportedFork(
"getBlobsV3 called before Osaka has been activated")

versionedHashes.mapIt(
ben.txPool.getBlobAndProofV2(it)
)
7 changes: 6 additions & 1 deletion execution_chain/rpc/engine_api.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Nimbus
# Copyright (c) 2021-2025 Status Research & Development GmbH
# Copyright (c) 2021-2026 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
Expand Down Expand Up @@ -38,6 +38,7 @@ const supportedMethods: HashSet[string] =
"engine_getClientVersionV1",
"engine_getBlobsV1",
"engine_getBlobsV2",
"engine_getBlobsV3"
])

# I'm trying to keep the handlers below very thin, and move the
Expand Down Expand Up @@ -118,3 +119,7 @@ proc setupEngineAPI*(engine: BeaconEngineRef, server: RpcServer) =
server.rpc("engine_getBlobsV2") do(versionedHashes: seq[VersionedHash]) ->
Opt[seq[BlobAndProofV2]]:
return engine.getBlobsV2(versionedHashes)

server.rpc("engine_getBlobsV3") do(versionedHashes: seq[VersionedHash]) ->
seq[Opt[BlobAndProofV2]]:
return engine.getBlobsV3(versionedHashes)