Add stubs for EIP4844 engine API calls (#4536)

This commit is contained in:
henridf 2023-01-21 01:47:38 +01:00 committed by GitHub
parent 8c2e01da24
commit f8ee0def2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 1 deletions

View File

@ -531,6 +531,28 @@ proc getPayloadV2*(
return (await p.dataProvider.web3.provider.engine_getPayloadV2( return (await p.dataProvider.web3.provider.engine_getPayloadV2(
FixedBytes[8] payloadId)).executionPayload FixedBytes[8] payloadId)).executionPayload
proc getPayloadV3*(
p: Eth1Monitor, payloadId: bellatrix.PayloadID):
Future[engine_api.ExecutionPayloadV3] {.async.} =
# Eth1 monitor can recycle connections without (external) warning; at least,
# don't crash.
if p.isNil or p.dataProvider.isNil:
return default(engine_api.ExecutionPayloadV3)
return (await p.dataProvider.web3.provider.engine_getPayloadV3(
FixedBytes[8] payloadId)).executionPayload
proc getBlobsBundleV1*(
p: Eth1Monitor, payloadId: bellatrix.PayloadID):
Future[engine_api.BlobsBundleV1] {.async.} =
# Eth1 monitor can recycle connections without (external) warning; at least,
# don't crash.
if p.isNil or p.dataProvider.isNil:
return default(engine_api.BlobsBundleV1)
return (await p.dataProvider.web3.provider.engine_getBlobsBundleV1(
FixedBytes[8] payloadId))
proc newPayload*(p: Eth1Monitor, payload: engine_api.ExecutionPayloadV1): proc newPayload*(p: Eth1Monitor, payload: engine_api.ExecutionPayloadV1):
Future[PayloadStatusV1] = Future[PayloadStatusV1] =
# Eth1 monitor can recycle connections without (external) warning; at least, # Eth1 monitor can recycle connections without (external) warning; at least,

2
vendor/nim-web3 vendored

@ -1 +1 @@
Subproject commit b5188b0679aa36ae54ea083bcd68349ef1b344e7 Subproject commit 98fba0fb0471abffdbe69fb8e66bb59152a7075c