mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-03-01 04:10:45 +00:00
29 lines
931 B
Nim
29 lines
931 B
Nim
# Nimbus
|
|
# Copyright (c) 2025 Status Research & Development GmbH
|
|
# Licensed under either of
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
|
# at your option.
|
|
# This file may not be copied, modified, or distributed except according to
|
|
# those terms.
|
|
|
|
import
|
|
results,
|
|
json_rpc/errors,
|
|
web3/engine_api_types,
|
|
../../core/tx_pool,
|
|
../beacon_engine,
|
|
./api_utils
|
|
|
|
{.push gcsafe, raises:[InvalidRequest].}
|
|
|
|
proc getBlobsV1*(ben: BeaconEngineRef,
|
|
versionedHashes: openArray[VersionedHash]):
|
|
seq[Opt[BlobAndProofV1]] =
|
|
# https://github.com/ethereum/execution-apis/blob/c710097abda52b5a190d831eb8b1eddd3d28c603/src/engine/cancun.md#specification-3
|
|
if versionedHashes.len > 128:
|
|
raise tooLargeRequest("the number of requested blobs is too large")
|
|
|
|
for v in versionedHashes:
|
|
result.add ben.txPool.getBlobAndProofV1(v)
|