diff --git a/beacon_chain/rpc/rest_beacon_api.nim b/beacon_chain/rpc/rest_beacon_api.nim index 6569b2c2d..2d1ecd571 100644 --- a/beacon_chain/rpc/rest_beacon_api.nim +++ b/beacon_chain/rpc/rest_beacon_api.nim @@ -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: diff --git a/beacon_chain/rpc/rest_validator_api.nim b/beacon_chain/rpc/rest_validator_api.nim index 64643a43f..b2f8711c2 100644 --- a/beacon_chain/rpc/rest_validator_api.nim +++ b/beacon_chain/rpc/rest_validator_api.nim @@ -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( diff --git a/beacon_chain/spec/mev/capella_mev.nim b/beacon_chain/spec/mev/capella_mev.nim index 6f4f790b0..dd26c8167 100644 --- a/beacon_chain/spec/mev/capella_mev.nim +++ b/beacon_chain/spec/mev/capella_mev.nim @@ -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 diff --git a/beacon_chain/spec/mev/deneb_mev.nim b/beacon_chain/spec/mev/deneb_mev.nim index 0f6ca22db..edf9b5573 100644 --- a/beacon_chain/spec/mev/deneb_mev.nim +++ b/beacon_chain/spec/mev/deneb_mev.nim @@ -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]