update builder API spec reference URLs to v0.4.0 (#5812)
This commit is contained in:
parent
4ec36e0670
commit
d8a2690a92
|
@ -1580,7 +1580,7 @@ proc onSlotStart(node: BeaconNode, wallTime: BeaconTime,
|
||||||
|
|
||||||
await onSlotEnd(node, wallSlot)
|
await onSlotEnd(node, wallSlot)
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/validator.md#registration-dissemination
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/validator.md#registration-dissemination
|
||||||
# This specification suggests validators re-submit to builder software every
|
# This specification suggests validators re-submit to builder software every
|
||||||
# `EPOCHS_PER_VALIDATOR_REGISTRATION_SUBMISSION` epochs.
|
# `EPOCHS_PER_VALIDATOR_REGISTRATION_SUBMISSION` epochs.
|
||||||
if wallSlot.is_epoch and
|
if wallSlot.is_epoch and
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# beacon_chain
|
# beacon_chain
|
||||||
# Copyright (c) 2023 Status Research & Development GmbH
|
# Copyright (c) 2023-2024 Status Research & Development GmbH
|
||||||
# Licensed and distributed under either of
|
# Licensed and distributed under either of
|
||||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||||
|
@ -13,32 +13,32 @@ from stew/byteutils import to0xHex
|
||||||
from ../datatypes/bellatrix import ExecutionAddress
|
from ../datatypes/bellatrix import ExecutionAddress
|
||||||
|
|
||||||
type
|
type
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/builder.md#validatorregistrationv1
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#validatorregistrationv1
|
||||||
ValidatorRegistrationV1* = object
|
ValidatorRegistrationV1* = object
|
||||||
fee_recipient*: ExecutionAddress
|
fee_recipient*: ExecutionAddress
|
||||||
gas_limit*: uint64
|
gas_limit*: uint64
|
||||||
timestamp*: uint64
|
timestamp*: uint64
|
||||||
pubkey*: ValidatorPubKey
|
pubkey*: ValidatorPubKey
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/builder.md#signedvalidatorregistrationv1
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#signedvalidatorregistrationv1
|
||||||
SignedValidatorRegistrationV1* = object
|
SignedValidatorRegistrationV1* = object
|
||||||
message*: ValidatorRegistrationV1
|
message*: ValidatorRegistrationV1
|
||||||
signature*: ValidatorSig
|
signature*: ValidatorSig
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.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.3.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
|
||||||
header*: capella.ExecutionPayloadHeader # [Modified in Capella]
|
header*: capella.ExecutionPayloadHeader # [Modified in Capella]
|
||||||
value*: UInt256
|
value*: UInt256
|
||||||
pubkey*: ValidatorPubKey
|
pubkey*: ValidatorPubKey
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/builder.md#signedbuilderbid
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#signedbuilderbid
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/capella/builder.md#executionpayloadheader
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/capella/builder.md#executionpayloadheader
|
||||||
SignedBuilderBid* = object
|
SignedBuilderBid* = object
|
||||||
message*: BuilderBid # [Modified in Capella]
|
message*: BuilderBid # [Modified in Capella]
|
||||||
signature*: ValidatorSig
|
signature*: ValidatorSig
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/capella/builder.md#blindedbeaconblockbody
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/capella/builder.md#blindedbeaconblockbody
|
||||||
BlindedBeaconBlockBody* = object
|
BlindedBeaconBlockBody* = object
|
||||||
randao_reveal*: ValidatorSig
|
randao_reveal*: ValidatorSig
|
||||||
eth1_data*: Eth1Data
|
eth1_data*: Eth1Data
|
||||||
|
@ -55,8 +55,8 @@ type
|
||||||
List[SignedBLSToExecutionChange,
|
List[SignedBLSToExecutionChange,
|
||||||
Limit MAX_BLS_TO_EXECUTION_CHANGES] # [New in Capella]
|
Limit MAX_BLS_TO_EXECUTION_CHANGES] # [New in Capella]
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/builder.md#blindedbeaconblock
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#blindedbeaconblock
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/capella/builder.md#blindedbeaconblockbody
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/capella/builder.md#blindedbeaconblockbody
|
||||||
BlindedBeaconBlock* = object
|
BlindedBeaconBlock* = object
|
||||||
slot*: Slot
|
slot*: Slot
|
||||||
proposer_index*: uint64
|
proposer_index*: uint64
|
||||||
|
@ -71,17 +71,17 @@ type
|
||||||
of true:
|
of true:
|
||||||
blindedData*: BlindedBeaconBlock
|
blindedData*: BlindedBeaconBlock
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/builder.md#signedblindedbeaconblock
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#signedblindedbeaconblock
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/capella/builder.md#blindedbeaconblockbody
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/capella/builder.md#blindedbeaconblockbody
|
||||||
SignedBlindedBeaconBlock* = object
|
SignedBlindedBeaconBlock* = object
|
||||||
message*: BlindedBeaconBlock
|
message*: BlindedBeaconBlock
|
||||||
signature*: ValidatorSig
|
signature*: ValidatorSig
|
||||||
|
|
||||||
const
|
const
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/builder.md#domain-types
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#domain-types
|
||||||
DOMAIN_APPLICATION_BUILDER* = DomainType([byte 0x00, 0x00, 0x00, 0x01])
|
DOMAIN_APPLICATION_BUILDER* = DomainType([byte 0x00, 0x00, 0x00, 0x01])
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/validator.md#constants
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/validator.md#constants
|
||||||
EPOCHS_PER_VALIDATOR_REGISTRATION_SUBMISSION* = 1
|
EPOCHS_PER_VALIDATOR_REGISTRATION_SUBMISSION* = 1
|
||||||
|
|
||||||
# Spec is 1 second, but mev-boost indirection can induce delay when the relay
|
# Spec is 1 second, but mev-boost indirection can induce delay when the relay
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# beacon_chain
|
# beacon_chain
|
||||||
# Copyright (c) 2023 Status Research & Development GmbH
|
# Copyright (c) 2023-2024 Status Research & Development GmbH
|
||||||
# Licensed and distributed under either of
|
# Licensed and distributed under either of
|
||||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||||
|
@ -13,22 +13,20 @@ from stew/byteutils import to0xHex
|
||||||
from ".."/datatypes/capella import SignedBLSToExecutionChange
|
from ".."/datatypes/capella import SignedBLSToExecutionChange
|
||||||
|
|
||||||
type
|
type
|
||||||
# https://github.com/ethereum/builder-specs/blob/534e4f81276b8346d785ed9aba12c4c74b927ec6/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]
|
||||||
blob_kzg_commitments*: KzgCommitments # [New in Deneb]
|
blob_kzg_commitments*: KzgCommitments # [New in Deneb]
|
||||||
value*: UInt256
|
value*: UInt256
|
||||||
pubkey*: ValidatorPubKey
|
pubkey*: ValidatorPubKey
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/builder.md#signedbuilderbid
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#signedbuilderbid
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/capella/builder.md#executionpayloadheader
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/deneb/builder.md#executionpayloadheader
|
||||||
# https://github.com/ethereum/builder-specs/blob/534e4f81276b8346d785ed9aba12c4c74b927ec6/specs/deneb/builder.md#executionpayloadheader
|
|
||||||
SignedBuilderBid* = object
|
SignedBuilderBid* = object
|
||||||
message*: BuilderBid
|
message*: BuilderBid
|
||||||
signature*: ValidatorSig
|
signature*: ValidatorSig
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/capella/builder.md#blindedbeaconblockbody
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/deneb/builder.md#blindedbeaconblockbody
|
||||||
# https://github.com/ethereum/builder-specs/blob/0b913daaa491cd889083827375977a6285e684bd/specs/deneb/builder.md#blindedbeaconblockbody
|
|
||||||
BlindedBeaconBlockBody* = object
|
BlindedBeaconBlockBody* = object
|
||||||
randao_reveal*: ValidatorSig
|
randao_reveal*: ValidatorSig
|
||||||
eth1_data*: Eth1Data
|
eth1_data*: Eth1Data
|
||||||
|
@ -45,9 +43,8 @@ type
|
||||||
Limit MAX_BLS_TO_EXECUTION_CHANGES]
|
Limit MAX_BLS_TO_EXECUTION_CHANGES]
|
||||||
blob_kzg_commitments*: KzgCommitments # [New in Deneb]
|
blob_kzg_commitments*: KzgCommitments # [New in Deneb]
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/builder.md#blindedbeaconblock
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#blindedbeaconblock
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/capella/builder.md#blindedbeaconblockbody
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/deneb/builder.md#blindedbeaconblockbody
|
||||||
# https://github.com/ethereum/builder-specs/blob/0b913daaa491cd889083827375977a6285e684bd/specs/deneb/builder.md#blindedbeaconblockbody
|
|
||||||
BlindedBeaconBlock* = object
|
BlindedBeaconBlock* = object
|
||||||
slot*: Slot
|
slot*: Slot
|
||||||
proposer_index*: uint64
|
proposer_index*: uint64
|
||||||
|
@ -62,13 +59,13 @@ type
|
||||||
of true:
|
of true:
|
||||||
blindedData*: BlindedBeaconBlock
|
blindedData*: BlindedBeaconBlock
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/builder.md#signedblindedbeaconblock
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#signedblindedbeaconblock
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/capella/builder.md#blindedbeaconblockbody
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/capella/builder.md#blindedbeaconblockbody
|
||||||
SignedBlindedBeaconBlock* = object
|
SignedBlindedBeaconBlock* = object
|
||||||
message*: BlindedBeaconBlock
|
message*: BlindedBeaconBlock
|
||||||
signature*: ValidatorSig
|
signature*: ValidatorSig
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/534e4f81276b8346d785ed9aba12c4c74b927ec6/specs/deneb/builder.md#executionpayloadandblobsbundle
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/deneb/builder.md#executionpayloadandblobsbundle
|
||||||
ExecutionPayloadAndBlobsBundle* = object
|
ExecutionPayloadAndBlobsBundle* = object
|
||||||
execution_payload*: deneb.ExecutionPayload
|
execution_payload*: deneb.ExecutionPayload
|
||||||
blobs_bundle*: BlobsBundle
|
blobs_bundle*: BlobsBundle
|
||||||
|
|
|
@ -16,7 +16,7 @@ proc registerValidator*(body: seq[SignedValidatorRegistrationV1]
|
||||||
): RestPlainResponse {.
|
): RestPlainResponse {.
|
||||||
rest, endpoint: "/eth/v1/builder/validators",
|
rest, endpoint: "/eth/v1/builder/validators",
|
||||||
meth: MethodPost, connection: {Dedicated, Close}.}
|
meth: MethodPost, connection: {Dedicated, Close}.}
|
||||||
## https://github.com/ethereum/builder-specs/blob/v0.3.0/apis/builder/validators.yaml
|
## https://github.com/ethereum/builder-specs/blob/v0.4.0/apis/builder/validators.yaml
|
||||||
## https://github.com/ethereum/beacon-APIs/blob/v2.3.0/apis/validator/register_validator.yaml
|
## https://github.com/ethereum/beacon-APIs/blob/v2.3.0/apis/validator/register_validator.yaml
|
||||||
|
|
||||||
proc getHeaderCapella*(slot: Slot,
|
proc getHeaderCapella*(slot: Slot,
|
||||||
|
@ -25,10 +25,10 @@ proc getHeaderCapella*(slot: Slot,
|
||||||
): RestResponse[GetHeaderResponseCapella] {.
|
): RestResponse[GetHeaderResponseCapella] {.
|
||||||
rest, endpoint: "/eth/v1/builder/header/{slot}/{parent_hash}/{pubkey}",
|
rest, endpoint: "/eth/v1/builder/header/{slot}/{parent_hash}/{pubkey}",
|
||||||
meth: MethodGet, connection: {Dedicated, Close}.}
|
meth: MethodGet, connection: {Dedicated, Close}.}
|
||||||
## https://github.com/ethereum/builder-specs/blob/v0.3.0/apis/builder/header.yaml
|
## https://github.com/ethereum/builder-specs/blob/v0.4.0/apis/builder/header.yaml
|
||||||
|
|
||||||
proc submitBlindedBlock*(body: capella_mev.SignedBlindedBeaconBlock
|
proc submitBlindedBlock*(body: capella_mev.SignedBlindedBeaconBlock
|
||||||
): RestResponse[SubmitBlindedBlockResponseCapella] {.
|
): RestResponse[SubmitBlindedBlockResponseCapella] {.
|
||||||
rest, endpoint: "/eth/v1/builder/blinded_blocks",
|
rest, endpoint: "/eth/v1/builder/blinded_blocks",
|
||||||
meth: MethodPost, connection: {Dedicated, Close}.}
|
meth: MethodPost, connection: {Dedicated, Close}.}
|
||||||
## https://github.com/ethereum/builder-specs/blob/v0.3.0/apis/builder/blinded_blocks.yaml
|
## https://github.com/ethereum/builder-specs/blob/v0.4.0/apis/builder/blinded_blocks.yaml
|
||||||
|
|
|
@ -18,10 +18,10 @@ proc getHeaderDeneb*(slot: Slot,
|
||||||
): RestResponse[GetHeaderResponseDeneb] {.
|
): RestResponse[GetHeaderResponseDeneb] {.
|
||||||
rest, endpoint: "/eth/v1/builder/header/{slot}/{parent_hash}/{pubkey}",
|
rest, endpoint: "/eth/v1/builder/header/{slot}/{parent_hash}/{pubkey}",
|
||||||
meth: MethodGet, connection: {Dedicated, Close}.}
|
meth: MethodGet, connection: {Dedicated, Close}.}
|
||||||
## https://github.com/ethereum/builder-specs/blob/34509da74237942aa15a4c0ca828f67acdf77652/apis/builder/header.yaml
|
## https://github.com/ethereum/builder-specs/blob/v0.4.0/apis/builder/header.yaml
|
||||||
|
|
||||||
proc submitBlindedBlock*(body: deneb_mev.SignedBlindedBeaconBlock
|
proc submitBlindedBlock*(body: deneb_mev.SignedBlindedBeaconBlock
|
||||||
): RestResponse[SubmitBlindedBlockResponseDeneb] {.
|
): RestResponse[SubmitBlindedBlockResponseDeneb] {.
|
||||||
rest, endpoint: "/eth/v1/builder/blinded_blocks",
|
rest, endpoint: "/eth/v1/builder/blinded_blocks",
|
||||||
meth: MethodPost, connection: {Dedicated, Close}.}
|
meth: MethodPost, connection: {Dedicated, Close}.}
|
||||||
## https://github.com/ethereum/builder-specs/blob/34509da74237942aa15a4c0ca828f67acdf77652/apis/builder/blinded_blocks.yaml
|
## https://github.com/ethereum/builder-specs/blob/v0.4.0/apis/builder/blinded_blocks.yaml
|
||||||
|
|
|
@ -80,7 +80,7 @@ proc verify_epoch_signature*(
|
||||||
func compute_block_signing_root*(
|
func compute_block_signing_root*(
|
||||||
fork: Fork, genesis_validators_root: Eth2Digest, slot: Slot,
|
fork: Fork, genesis_validators_root: Eth2Digest, slot: Slot,
|
||||||
blck: Eth2Digest | SomeForkyBeaconBlock | BeaconBlockHeader |
|
blck: Eth2Digest | SomeForkyBeaconBlock | BeaconBlockHeader |
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/builder.md#signing
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#signing
|
||||||
capella_mev.BlindedBeaconBlock): Eth2Digest =
|
capella_mev.BlindedBeaconBlock): Eth2Digest =
|
||||||
let
|
let
|
||||||
epoch = epoch(slot)
|
epoch = epoch(slot)
|
||||||
|
@ -335,7 +335,7 @@ proc verify_contribution_and_proof_signature*(
|
||||||
|
|
||||||
blsVerify(pubkey, signing_root.data, signature)
|
blsVerify(pubkey, signing_root.data, signature)
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/builder.md#signing
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#signing
|
||||||
func compute_builder_signing_root(
|
func compute_builder_signing_root(
|
||||||
fork: Fork,
|
fork: Fork,
|
||||||
msg: capella_mev.BuilderBid | deneb_mev.BuilderBid |
|
msg: capella_mev.BuilderBid | deneb_mev.BuilderBid |
|
||||||
|
|
|
@ -39,7 +39,7 @@ const
|
||||||
TIME_DELAY_FROM_SLOT* = 79.milliseconds
|
TIME_DELAY_FROM_SLOT* = 79.milliseconds
|
||||||
SUBSCRIPTION_BUFFER_SLOTS* = 2'u64
|
SUBSCRIPTION_BUFFER_SLOTS* = 2'u64
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/validator.md#constants
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/validator.md#constants
|
||||||
EPOCHS_BETWEEN_VALIDATOR_REGISTRATION* = 1
|
EPOCHS_BETWEEN_VALIDATOR_REGISTRATION* = 1
|
||||||
|
|
||||||
ZeroTimeDiff* = TimeDiff(nanoseconds: 0'i64)
|
ZeroTimeDiff* = TimeDiff(nanoseconds: 0'i64)
|
||||||
|
@ -977,7 +977,7 @@ proc isDefault*(reg: SignedValidatorRegistrationV1): bool =
|
||||||
|
|
||||||
proc isExpired(vc: ValidatorClientRef,
|
proc isExpired(vc: ValidatorClientRef,
|
||||||
reg: SignedValidatorRegistrationV1, slot: Slot): bool =
|
reg: SignedValidatorRegistrationV1, slot: Slot): bool =
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/validator.md#registration-dissemination
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/validator.md#registration-dissemination
|
||||||
# This specification suggests validators re-submit to builder software every
|
# This specification suggests validators re-submit to builder software every
|
||||||
# `EPOCHS_PER_VALIDATOR_REGISTRATION_SUBMISSION` epochs.
|
# `EPOCHS_PER_VALIDATOR_REGISTRATION_SUBMISSION` epochs.
|
||||||
let
|
let
|
||||||
|
|
|
@ -617,7 +617,7 @@ func constructSignableBlindedBlock[T: capella_mev.SignedBlindedBeaconBlock](
|
||||||
|
|
||||||
var blindedBlock: T
|
var blindedBlock: T
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/validator.md#block-proposal
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/validator.md#block-proposal
|
||||||
copyFields(blindedBlock.message, blck, blckFields)
|
copyFields(blindedBlock.message, blck, blckFields)
|
||||||
copyFields(blindedBlock.message.body, blck.body, blckBodyFields)
|
copyFields(blindedBlock.message.body, blck.body, blckBodyFields)
|
||||||
assign(
|
assign(
|
||||||
|
@ -635,7 +635,7 @@ proc constructSignableBlindedBlock[T: deneb_mev.SignedBlindedBeaconBlock](
|
||||||
|
|
||||||
var blindedBlock: T
|
var blindedBlock: T
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/validator.md#block-proposal
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/validator.md#block-proposal
|
||||||
copyFields(blindedBlock.message, blck, blckFields)
|
copyFields(blindedBlock.message, blck, blckFields)
|
||||||
copyFields(blindedBlock.message.body, blck.body, blckBodyFields)
|
copyFields(blindedBlock.message.body, blck.body, blckBodyFields)
|
||||||
assign(
|
assign(
|
||||||
|
@ -659,7 +659,7 @@ func constructPlainBlindedBlock[T: capella_mev.BlindedBeaconBlock](
|
||||||
|
|
||||||
var blindedBlock: T
|
var blindedBlock: T
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/validator.md#block-proposal
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/validator.md#block-proposal
|
||||||
copyFields(blindedBlock, blck, blckFields)
|
copyFields(blindedBlock, blck, blckFields)
|
||||||
copyFields(blindedBlock.body, blck.body, blckBodyFields)
|
copyFields(blindedBlock.body, blck.body, blckBodyFields)
|
||||||
assign(blindedBlock.body.execution_payload_header, executionPayloadHeader)
|
assign(blindedBlock.body.execution_payload_header, executionPayloadHeader)
|
||||||
|
@ -678,7 +678,7 @@ func constructPlainBlindedBlock[T: deneb_mev.BlindedBeaconBlock](
|
||||||
|
|
||||||
var blindedBlock: T
|
var blindedBlock: T
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/validator.md#block-proposal
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/validator.md#block-proposal
|
||||||
copyFields(blindedBlock, blck, blckFields)
|
copyFields(blindedBlock, blck, blckFields)
|
||||||
copyFields(blindedBlock.body, blck.body, blckBodyFields)
|
copyFields(blindedBlock.body, blck.body, blckBodyFields)
|
||||||
assign(
|
assign(
|
||||||
|
@ -1710,7 +1710,7 @@ proc registerValidatorsPerBuilder(
|
||||||
return
|
return
|
||||||
|
|
||||||
const emptyNestedSeq = @[newSeq[SignedValidatorRegistrationV1](0)]
|
const emptyNestedSeq = @[newSeq[SignedValidatorRegistrationV1](0)]
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/validator.md#validator-registration
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/validator.md#validator-registration
|
||||||
# Seed with single empty inner list to avoid special cases
|
# Seed with single empty inner list to avoid special cases
|
||||||
var validatorRegistrations = emptyNestedSeq
|
var validatorRegistrations = emptyNestedSeq
|
||||||
|
|
||||||
|
@ -1762,9 +1762,8 @@ proc registerValidatorsPerBuilder(
|
||||||
if validator.index.isNone:
|
if validator.index.isNone:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/apis/builder/validators.yaml
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#is_eligible_for_registration
|
||||||
# Builders should verify that `pubkey` corresponds to an active or
|
# Validators should be active or pending
|
||||||
# pending validator
|
|
||||||
withState(node.dag.headState):
|
withState(node.dag.headState):
|
||||||
if distinctBase(validator.index.get) >=
|
if distinctBase(validator.index.get) >=
|
||||||
forkyState.data.validators.lenu64:
|
forkyState.data.validators.lenu64:
|
||||||
|
|
|
@ -70,7 +70,7 @@ proc unblindAndRouteBlockMEV*(
|
||||||
|
|
||||||
const httpOk = 200
|
const httpOk = 200
|
||||||
if bundle.status != httpOk:
|
if bundle.status != httpOk:
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/validator.md#proposer-slashing
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/validator.md#proposer-slashing
|
||||||
# This means if a validator publishes a signature for a
|
# This means if a validator publishes a signature for a
|
||||||
# `BlindedBeaconBlock` (via a dissemination of a
|
# `BlindedBeaconBlock` (via a dissemination of a
|
||||||
# `SignedBlindedBeaconBlock`) then the validator **MUST** not use the
|
# `SignedBlindedBeaconBlock`) then the validator **MUST** not use the
|
||||||
|
@ -90,7 +90,7 @@ proc unblindAndRouteBlockMEV*(
|
||||||
|
|
||||||
# Signature provided is consistent with unblinded execution payload,
|
# Signature provided is consistent with unblinded execution payload,
|
||||||
# so construct full beacon block
|
# so construct full beacon block
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/validator.md#block-proposal
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/validator.md#block-proposal
|
||||||
var signedBlock = consensusFork.SignedBeaconBlock(
|
var signedBlock = consensusFork.SignedBeaconBlock(
|
||||||
signature: blindedBlock.signature)
|
signature: blindedBlock.signature)
|
||||||
copyFields(
|
copyFields(
|
||||||
|
|
|
@ -811,7 +811,7 @@ proc getDepositMessageSignature*(v: AttachedValidator, version: Version,
|
||||||
let request = Web3SignerRequest.init(version, deposit_message)
|
let request = Web3SignerRequest.init(version, deposit_message)
|
||||||
await v.signData(request)
|
await v.signData(request)
|
||||||
|
|
||||||
# https://github.com/ethereum/builder-specs/blob/v0.3.0/specs/bellatrix/builder.md#signing
|
# https://github.com/ethereum/builder-specs/blob/v0.4.0/specs/bellatrix/builder.md#signing
|
||||||
proc getBuilderSignature*(v: AttachedValidator, fork: Fork,
|
proc getBuilderSignature*(v: AttachedValidator, fork: Fork,
|
||||||
validatorRegistration: ValidatorRegistrationV1):
|
validatorRegistration: ValidatorRegistrationV1):
|
||||||
Future[SignatureResult] {.async.} =
|
Future[SignatureResult] {.async.} =
|
||||||
|
|
Loading…
Reference in New Issue