types

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NilHash = common.Hash{}

NilHash represents an empty hash

Functions

This section is empty.

Types

type BlindBeaconBlockBodyV1 added in v0.3.1

type BlindBeaconBlockBodyV1 struct {
	RandaoReveal hexutil.Bytes   `json:"randaoReveal"`
	Eth1Data     json.RawMessage `json:"eth1Data"`
	Graffiti     hexutil.Bytes   `json:"graffiti"` // Bytes32  # Arbitrary data

	ProposerSlashings json.RawMessage `json:"proposerSlashings"` // List[ProposerSlashing, MAX_PROPOSER_SLASHINGS]
	AttesterSlashings json.RawMessage `json:"attesterSlashings"` // List[AttesterSlashing, MAX_ATTESTER_SLASHINGS]
	Attestations      json.RawMessage `json:"attestations"`      // List[Attestation, MAX_ATTESTATIONS]
	Deposits          json.RawMessage `json:"deposits"`          // List[Deposit, MAX_DEPOSITS]
	VoluntaryExits    json.RawMessage `json:"voluntaryExits"`    // List[SignedVoluntaryExit, MAX_VOLUNTARY_EXITS]

	SyncAggregate    json.RawMessage          `json:"syncAggregate"` // `object`, [`SyncAggregateV1`](#syncaggregatev1)
	ExecutionPayload ExecutionPayloadHeaderV1 `json:"executionPayload"`
}

BlindBeaconBlockBodyV1 spec: https://github.com/ethereum/execution-apis/blob/bd6546751054f14ce80711f5dc66508ef3f447c7/src/builder/specification.md#blindbeaconblockbodyv1

type BlindBeaconBlockV1

type BlindBeaconBlockV1 struct {
	Slot          string                 `json:"slot"`
	ProposerIndex string                 `json:"proposerIndex"`
	ParentRoot    string                 `json:"parentRoot"`
	StateRoot     string                 `json:"stateRoot"`
	Body          BlindBeaconBlockBodyV1 `json:"body"`
}

BlindBeaconBlockV1 spec: https://github.com/ethereum/execution-apis/blob/bd6546751054f14ce80711f5dc66508ef3f447c7/src/builder/specification.md#blindbeaconblockv1

type ExecutionPayloadHeaderV1

type ExecutionPayloadHeaderV1 struct {
	ParentHash       common.Hash    `json:"parentHash" gencodec:"required"`
	FeeRecipient     common.Address `json:"feeRecipient" gencodec:"required"`
	StateRoot        common.Hash    `json:"stateRoot" gencodec:"required"`
	ReceiptsRoot     common.Hash    `json:"receiptsRoot" gencodec:"required"`
	LogsBloom        []byte         `json:"logsBloom" gencodec:"required"`
	PrevRandao       common.Hash    `json:"prevRandao" gencodec:"required"`
	BlockNumber      uint64         `json:"blockNumber" gencodec:"required"`
	GasLimit         uint64         `json:"gasLimit" gencodec:"required"`
	GasUsed          uint64         `json:"gasUsed" gencodec:"required"`
	Timestamp        uint64         `json:"timestamp" gencodec:"required"`
	ExtraData        []byte         `json:"extraData" gencodec:"required"`
	BaseFeePerGas    *big.Int       `json:"baseFeePerGas" gencodec:"required"`
	BlockHash        common.Hash    `json:"blockHash" gencodec:"required"`
	TransactionsRoot common.Hash    `json:"transactionsRoot" gencodec:"required"`
}

ExecutionPayloadHeaderV1 spec https://github.com/ethereum/consensus-specs/blob/dev/specs/bellatrix/beacon-chain.md#executionpayloadheader

func (ExecutionPayloadHeaderV1) MarshalJSON

func (e ExecutionPayloadHeaderV1) MarshalJSON() ([]byte, error)

MarshalJSON marshals as JSON.

func (*ExecutionPayloadHeaderV1) UnmarshalJSON

func (e *ExecutionPayloadHeaderV1) UnmarshalJSON(input []byte) error

UnmarshalJSON unmarshals from JSON.

type ExecutionPayloadV1

type ExecutionPayloadV1 struct {
	ParentHash    common.Hash    `json:"parentHash" gencodec:"required"`
	FeeRecipient  common.Address `json:"feeRecipient" gencodec:"required"`
	StateRoot     common.Hash    `json:"stateRoot" gencodec:"required"`
	ReceiptsRoot  common.Hash    `json:"receiptsRoot" gencodec:"required"`
	LogsBloom     []byte         `json:"logsBloom" gencodec:"required"`
	PrevRandao    common.Hash    `json:"prevRandao" gencodec:"required"`
	BlockNumber   uint64         `json:"blockNumber" gencodec:"required"`
	GasLimit      uint64         `json:"gasLimit" gencodec:"required"`
	GasUsed       uint64         `json:"gasUsed" gencodec:"required"`
	Timestamp     uint64         `json:"timestamp" gencodec:"required"`
	ExtraData     []byte         `json:"extraData" gencodec:"required"`
	BaseFeePerGas *big.Int       `json:"baseFeePerGas" gencodec:"required"`
	BlockHash     common.Hash    `json:"blockHash" gencodec:"required"`
	Transactions  *[]string      `json:"transactions" gencodec:"required"`
}

ExecutionPayloadV1 as defined in https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.8/src/engine/specification.md#executionpayloadv1

func (ExecutionPayloadV1) MarshalJSON

func (e ExecutionPayloadV1) MarshalJSON() ([]byte, error)

MarshalJSON marshals as JSON.

func (*ExecutionPayloadV1) UnmarshalJSON

func (e *ExecutionPayloadV1) UnmarshalJSON(input []byte) error

UnmarshalJSON unmarshals from JSON.

type GetHeaderResponse

type GetHeaderResponse struct {
	Message   GetHeaderResponseMessage `json:"message"`
	Signature hexutil.Bytes            `json:"signature"`
}

GetHeaderResponse as defined in https://github.com/flashbots/mev-boost/blob/main/docs/specification.md#response-1

type GetHeaderResponseMessage

type GetHeaderResponseMessage struct {
	Header ExecutionPayloadHeaderV1 `json:"header"`
	Value  *hexutil.Big             `json:"value"`
	Pubkey hexutil.Bytes            `json:"pubkey"`
}

GetHeaderResponseMessage as defined in https://github.com/flashbots/mev-boost/blob/main/docs/specification.md#response-1

type RegisterValidatorRequestMessage

type RegisterValidatorRequestMessage struct {
	FeeRecipient common.Address `json:"feeRecipient"`
	Timestamp    hexutil.Uint64 `json:"timestamp"`
	Pubkey       hexutil.Bytes  `json:"pubkey"`
}

RegisterValidatorRequestMessage as defined in https://github.com/flashbots/mev-boost/blob/main/docs/specification.md#request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL