add current MEV builder SSZ types (#3620)

This commit is contained in:
tersec 2022-05-08 22:42:21 +00:00 committed by GitHub
parent 104cc3053f
commit eea33b82a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,14 +5,33 @@
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed except according to those terms.
import "."/[altair, bellatrix]
import ".."/datatypes/[altair, bellatrix]
{.push raises: [Defect].}
type
# https://github.com/flashbots/mev-boost/blob/thegostep/docs/docs/milestone-1.md#blindedbeaconblockbody
# This is forked from bellatrix.BeaconBlockBody with execution_payload
# replaced with execution_payload_header
# https://github.com/lightclient/builder-specs/blob/198f9e15c3764b7c3b0fbd9ec8bef3391ceeab61/specs/README.md#validatorregistrationv1
ValidatorRegistrationV1 = object
feeRecipient*: ExecutionAddress
gasLimit*: uint64
timestamp*: uint64
pubkey*: ValidatorPubKey
# https://github.com/lightclient/builder-specs/blob/198f9e15c3764b7c3b0fbd9ec8bef3391ceeab61/specs/README.md#builderbidv1
BuilderBidV1 = object
header*: ExecutionPayloadHeader
value*: Eth2Digest # uint256
pubkey*: ValidatorPubKey
# https://github.com/lightclient/builder-specs/blob/198f9e15c3764b7c3b0fbd9ec8bef3391ceeab61/specs/README.md#blindedbeaconblock
BlindedBeaconBlock = object
slot*: Slot
proposer_index*: uint64
parent_root*: Eth2Digest
state_root*: Eth2Digest
body*: BlindedBeaconBlockBody
# https://github.com/lightclient/builder-specs/blob/198f9e15c3764b7c3b0fbd9ec8bef3391ceeab61/specs/README.md#blindedbeaconblockbody
BlindedBeaconBlockBody = object
randao_reveal*: ValidatorSig
eth1_data*: Eth1Data
@ -25,16 +44,7 @@ type
sync_aggregate*: SyncAggregate
execution_payload_header*: ExecutionPayloadHeader
# https://github.com/flashbots/mev-boost/blob/thegostep/docs/docs/milestone-1.md#blindedbeaconblock
# This is forked from bellatrix.BeaconBlock with body replaced with
# BlindedBeaconBlockBody
BlindedBeaconBlock = object
slot*: Slot
proposer_index*: uint64
parent_root*: Eth2Digest
state_root*: Eth2Digest
body*: BlindedBeaconBlockBody
# TODO current spec PR doesn't have this yet
# https://github.com/flashbots/mev-boost/blob/thegostep/docs/docs/milestone-1.md#signedblindedbeaconblock
SignedBlindedBeaconBlock = object
message*: BlindedBeaconBlock