add RPC signature; add type constraints on proposeBlockMEV (#5498)
This commit is contained in:
parent
40616b6243
commit
eeac00d08e
|
@ -245,6 +245,12 @@ proc publishBlindedBlock*(body: capella_mev.SignedBlindedBeaconBlock):
|
||||||
meth: MethodPost.}
|
meth: MethodPost.}
|
||||||
## https://ethereum.github.io/beacon-APIs/#/Beacon/publishBlindedBlock
|
## https://ethereum.github.io/beacon-APIs/#/Beacon/publishBlindedBlock
|
||||||
|
|
||||||
|
proc publishBlindedBlock*(body: deneb_mev.SignedBlindedBeaconBlockContents):
|
||||||
|
RestPlainResponse {.
|
||||||
|
rest, endpoint: "/eth/v1/beacon/blinded_blocks",
|
||||||
|
meth: MethodPost.}
|
||||||
|
## https://ethereum.github.io/beacon-APIs/#/Beacon/publishBlindedBlock
|
||||||
|
|
||||||
proc publishSszBlindedBlock*(
|
proc publishSszBlindedBlock*(
|
||||||
client: RestClientRef,
|
client: RestClientRef,
|
||||||
blck: ForkySignedBeaconBlock
|
blck: ForkySignedBeaconBlock
|
||||||
|
|
|
@ -730,10 +730,7 @@ proc getBlindedBlockParts[EPH: ForkyExecutionPayloadHeader](
|
||||||
# processing does not work directly using blinded blocks, fix up transactions
|
# processing does not work directly using blinded blocks, fix up transactions
|
||||||
# root after running the state transition function on an otherwise equivalent
|
# root after running the state transition function on an otherwise equivalent
|
||||||
# non-blinded block without transactions.
|
# non-blinded block without transactions.
|
||||||
when EPH is bellatrix.ExecutionPayloadHeader:
|
when EPH is capella.ExecutionPayloadHeader:
|
||||||
type PayloadType = bellatrix.ExecutionPayloadForSigning
|
|
||||||
let withdrawals_root = Opt.none Eth2Digest
|
|
||||||
elif EPH is capella.ExecutionPayloadHeader:
|
|
||||||
type PayloadType = capella.ExecutionPayloadForSigning
|
type PayloadType = capella.ExecutionPayloadForSigning
|
||||||
let withdrawals_root =
|
let withdrawals_root =
|
||||||
Opt.some executionPayloadHeader.get.blindedBlckPart.withdrawals_root
|
Opt.some executionPayloadHeader.get.blindedBlckPart.withdrawals_root
|
||||||
|
@ -810,7 +807,9 @@ proc getBuilderBid[
|
||||||
return ok (unsignedBlindedBlock.get, bidValue)
|
return ok (unsignedBlindedBlock.get, bidValue)
|
||||||
|
|
||||||
proc proposeBlockMEV(
|
proc proposeBlockMEV(
|
||||||
node: BeaconNode, payloadBuilderClient: RestClientRef, blindedBlock: auto):
|
node: BeaconNode, payloadBuilderClient: RestClientRef,
|
||||||
|
blindedBlock: capella_mev.SignedBlindedBeaconBlock |
|
||||||
|
deneb_mev.SignedBlindedBeaconBlockContents):
|
||||||
Future[Result[BlockRef, string]] {.async.} =
|
Future[Result[BlockRef, string]] {.async.} =
|
||||||
let unblindedBlockRef = await node.unblindAndRouteBlockMEV(
|
let unblindedBlockRef = await node.unblindAndRouteBlockMEV(
|
||||||
payloadBuilderClient, blindedBlock)
|
payloadBuilderClient, blindedBlock)
|
||||||
|
|
Loading…
Reference in New Issue