mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-18 09:27:05 +00:00
rm REST Capella builder API support (#5981)
This commit is contained in:
parent
1f48795e91
commit
2b91b66679
@ -1082,7 +1082,7 @@ proc installBeaconApiHandlers*(router: var RestRouter, node: BeaconNode) =
|
|||||||
return RestApiResponse.jsonError(Http400, BlockIncorrectFork)
|
return RestApiResponse.jsonError(Http400, BlockIncorrectFork)
|
||||||
|
|
||||||
withConsensusFork(currentEpochFork):
|
withConsensusFork(currentEpochFork):
|
||||||
when consensusFork >= ConsensusFork.Capella:
|
when consensusFork >= ConsensusFork.Deneb:
|
||||||
let
|
let
|
||||||
restBlock = decodeBodyJsonOrSsz(
|
restBlock = decodeBodyJsonOrSsz(
|
||||||
consensusFork.SignedBlindedBeaconBlock, body).valueOr:
|
consensusFork.SignedBlindedBeaconBlock, body).valueOr:
|
||||||
|
@ -522,7 +522,7 @@ proc installValidatorApiHandlers*(router: var RestRouter, node: BeaconNode) =
|
|||||||
contextFork = node.dag.cfg.consensusForkAtEpoch(node.currentSlot.epoch)
|
contextFork = node.dag.cfg.consensusForkAtEpoch(node.currentSlot.epoch)
|
||||||
|
|
||||||
withConsensusFork(contextFork):
|
withConsensusFork(contextFork):
|
||||||
when consensusFork >= ConsensusFork.Capella:
|
when consensusFork >= ConsensusFork.Deneb:
|
||||||
let res = await makeBlindedBeaconBlockForHeadAndSlot[
|
let res = await makeBlindedBeaconBlockForHeadAndSlot[
|
||||||
consensusFork.BlindedBeaconBlock](
|
consensusFork.BlindedBeaconBlock](
|
||||||
node, payloadBuilderClient, qrandao,
|
node, payloadBuilderClient, qrandao,
|
||||||
@ -532,7 +532,7 @@ proc installValidatorApiHandlers*(router: var RestRouter, node: BeaconNode) =
|
|||||||
return responseVersioned(res.get().blindedBlckPart, contextFork)
|
return responseVersioned(res.get().blindedBlckPart, contextFork)
|
||||||
elif consensusFork >= ConsensusFork.Bellatrix:
|
elif consensusFork >= ConsensusFork.Bellatrix:
|
||||||
return RestApiResponse.jsonError(
|
return RestApiResponse.jsonError(
|
||||||
Http400, "Pre-Capella builder API unsupported")
|
Http400, "Pre-Deneb builder API unsupported")
|
||||||
else:
|
else:
|
||||||
# Pre-Bellatrix, this endpoint will return a BeaconBlock
|
# Pre-Bellatrix, this endpoint will return a BeaconBlock
|
||||||
let res = await makeBeaconBlockForHeadAndSlot(
|
let res = await makeBeaconBlockForHeadAndSlot(
|
||||||
|
@ -10,22 +10,9 @@
|
|||||||
import ".."/datatypes/[altair, capella]
|
import ".."/datatypes/[altair, capella]
|
||||||
from stew/byteutils import to0xHex
|
from stew/byteutils import to0xHex
|
||||||
|
|
||||||
from ../datatypes/bellatrix import ExecutionAddress
|
|
||||||
from ../eth2_merkleization import hash_tree_root
|
from ../eth2_merkleization import hash_tree_root
|
||||||
|
|
||||||
type
|
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/bellatrix/builder.md#builderbid
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/capella/builder.md#executionpayloadheader
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/capella/builder.md#executionpayloadheader
|
||||||
BuilderBid* = object
|
BuilderBid* = object
|
||||||
|
@ -10,10 +10,23 @@
|
|||||||
import ".."/datatypes/[altair, deneb]
|
import ".."/datatypes/[altair, deneb]
|
||||||
|
|
||||||
from stew/byteutils import to0xHex
|
from stew/byteutils import to0xHex
|
||||||
|
from ../datatypes/bellatrix import ExecutionAddress
|
||||||
from ".."/datatypes/capella import SignedBLSToExecutionChange
|
from ".."/datatypes/capella import SignedBLSToExecutionChange
|
||||||
from ".."/eth2_merkleization import hash_tree_root
|
from ".."/eth2_merkleization import hash_tree_root
|
||||||
|
|
||||||
type
|
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
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/deneb/builder.md#builderbid
|
||||||
BuilderBid* = object
|
BuilderBid* = object
|
||||||
header*: deneb.ExecutionPayloadHeader # [Modified in Deneb]
|
header*: deneb.ExecutionPayloadHeader # [Modified in Deneb]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user