File tree Expand file tree Collapse file tree 5 files changed +19
-0
lines changed
Expand file tree Collapse file tree 5 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,7 @@ suite "JSON-RPC Quantity":
204204 checkRandomObject (ExecutionPayloadV3 )
205205 checkRandomObject (BlobsBundleV1 )
206206 checkRandomObject (BlobAndProofV1 )
207+ checkRandomObject (BlobAndProofV2 )
207208 checkRandomObject (ExecutionPayloadBodyV1 )
208209 checkRandomObject (PayloadAttributesV1 )
209210 checkRandomObject (PayloadAttributesV2 )
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ ExecutionPayloadV1OrV2.useDefaultSerializationIn JrpcConv
6060ExecutionPayloadV3 .useDefaultSerializationIn JrpcConv
6161BlobsBundleV1 .useDefaultSerializationIn JrpcConv
6262BlobAndProofV1 .useDefaultSerializationIn JrpcConv
63+ BlobAndProofV2 .useDefaultSerializationFor JrpcConv
6364ExecutionPayloadBodyV1 .useDefaultSerializationIn JrpcConv
6465PayloadAttributesV1 .useDefaultSerializationIn JrpcConv
6566PayloadAttributesV2 .useDefaultSerializationIn JrpcConv
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ createRpcSigsFromNim(RpcClient):
3939 proc engine_getPayloadBodiesByHashV1 (hashes: seq [Hash32 ]): seq [Opt [ExecutionPayloadBodyV1 ]]
4040 proc engine_getPayloadBodiesByRangeV1 (start: Quantity , count: Quantity ): seq [Opt [ExecutionPayloadBodyV1 ]]
4141 proc engine_getBlobsV1 (blob_versioned_hashes: seq [VersionedHash ]): GetBlobsV1Response
42+ proc engine_getBlobsV2 (blob_versioned_hashes: seq [VersionedHash ]): GetBlobsV2Response
4243
4344 # https://github.com/ethereum/execution-apis/blob/9301c0697e4c7566f0929147112f6d91f65180f6/src/engine/common.md
4445 proc engine_exchangeCapabilities (methods: seq [string ]): seq [string ]
@@ -115,6 +116,13 @@ template getBlobs*(
115116 Future [GetBlobsV1Response ] =
116117 engine_getBlobsV1 (rpcClient, blob_versioned_hashes)
117118
119+ template getBlobs * (
120+ rpcClient: RpcClient ,
121+ T: type GetBlobsV2Response ,
122+ blob_versioned_hashes: seq [VersionedHash ]):
123+ Future [GetBlobsV2Response ] =
124+ engine_getBlobsV2 (rpcClient, blob_versioned_hashes)
125+
118126template newPayload * (
119127 rpcClient: RpcClient ,
120128 payload: ExecutionPayloadV1 ): Future [PayloadStatusV1 ] =
Original file line number Diff line number Diff line change @@ -131,6 +131,10 @@ type
131131 blob* : Blob
132132 proof* : KzgProof
133133
134+ BlobAndProofV2 * = object
135+ blob* : Blob
136+ proofs* : array [cellsPerExternalBlob, KzgProof ]
137+
134138 # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.4/src/engine/shanghai.md#executionpayloadbodyv1
135139 # For optional withdrawals field, see:
136140 # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.4/src/engine/shanghai.md#engine_getpayloadbodiesbyhashv1
223227
224228 GetBlobsV1Response * = seq [BlobAndProofV1 ]
225229
230+ GetBlobsV2Response * = seq [BlobAndProofV2 ]
231+
226232 SomeGetPayloadResponse * =
227233 ExecutionPayloadV1 |
228234 GetPayloadV2Response |
Original file line number Diff line number Diff line change 2929 # https://github.com/ethereum/execution-apis/blob/c4089414bbbe975bbc4bf1ccf0a3d31f76feb3e1/src/engine/cancun.md#blobsbundlev1
3030 fieldElementsPerBlob = 4096
3131
32+ # https://github.com/0x00101010/execution-apis/blob/eip-7594/src/engine/osaka.md#blobandproofv2
33+ cellsPerExternalBlob* = 128
34+
3235type
3336 # https://github.com/ethereum/execution-apis/blob/c4089414bbbe975bbc4bf1ccf0a3d31f76feb3e1/src/schemas/base-types.yaml
3437
You can’t perform that action at this time.
0 commit comments