rm REST Capella builder API support (#5981)

This commit is contained in:
tersec 2024-02-28 01:10:19 +00:00 committed by GitHub
parent 1f48795e91
commit 2b91b66679
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 16 deletions

View File

@ -1082,7 +1082,7 @@ proc installBeaconApiHandlers*(router: var RestRouter, node: BeaconNode) =
return RestApiResponse.jsonError(Http400, BlockIncorrectFork)
withConsensusFork(currentEpochFork):
when consensusFork >= ConsensusFork.Capella:
when consensusFork >= ConsensusFork.Deneb:
let
restBlock = decodeBodyJsonOrSsz(
consensusFork.SignedBlindedBeaconBlock, body).valueOr:

View File

@ -522,7 +522,7 @@ proc installValidatorApiHandlers*(router: var RestRouter, node: BeaconNode) =
contextFork = node.dag.cfg.consensusForkAtEpoch(node.currentSlot.epoch)
withConsensusFork(contextFork):
when consensusFork >= ConsensusFork.Capella:
when consensusFork >= ConsensusFork.Deneb:
let res = await makeBlindedBeaconBlockForHeadAndSlot[
consensusFork.BlindedBeaconBlock](
node, payloadBuilderClient, qrandao,
@ -532,7 +532,7 @@ proc installValidatorApiHandlers*(router: var RestRouter, node: BeaconNode) =
return responseVersioned(res.get().blindedBlckPart, contextFork)
elif consensusFork >= ConsensusFork.Bellatrix:
return RestApiResponse.jsonError(
Http400, "Pre-Capella builder API unsupported")
Http400, "Pre-Deneb builder API unsupported")
else:
# Pre-Bellatrix, this endpoint will return a BeaconBlock
let res = await makeBeaconBlockForHeadAndSlot(

View File

@ -10,22 +10,9 @@
import ".."/datatypes/[altair, capella]
from stew/byteutils import to0xHex
from ../datatypes/bellatrix import ExecutionAddress
from ../eth2_merkleization import hash_tree_root
type
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#validatorregistrationv1
ValidatorRegistrationV1* = object
fee_recipient*: ExecutionAddress
gas_limit*: uint64
timestamp*: uint64
pubkey*: ValidatorPubKey
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#signedvalidatorregistrationv1
SignedValidatorRegistrationV1* = object
message*: ValidatorRegistrationV1
signature*: ValidatorSig
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#builderbid
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/capella/builder.md#executionpayloadheader
BuilderBid* = object

View File

@ -10,10 +10,23 @@
import ".."/datatypes/[altair, deneb]
from stew/byteutils import to0xHex
from ../datatypes/bellatrix import ExecutionAddress
from ".."/datatypes/capella import SignedBLSToExecutionChange
from ".."/eth2_merkleization import hash_tree_root
type
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#validatorregistrationv1
ValidatorRegistrationV1* = object
fee_recipient*: ExecutionAddress
gas_limit*: uint64
timestamp*: uint64
pubkey*: ValidatorPubKey
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#signedvalidatorregistrationv1
SignedValidatorRegistrationV1* = object
message*: ValidatorRegistrationV1
signature*: ValidatorSig
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/deneb/builder.md#builderbid
BuilderBid* = object
header*: deneb.ExecutionPayloadHeader # [Modified in Deneb]