engine_types

package
v0.0.0-...-1f8a15b Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertPayloadId

func ConvertPayloadId(payloadId uint64) *hexutility.Bytes

func ConvertWithdrawalsFromRpc

func ConvertWithdrawalsFromRpc(in []*types2.Withdrawal) []*types.Withdrawal

func ConvertWithdrawalsToRpc

func ConvertWithdrawalsToRpc(in []*types.Withdrawal) []*types2.Withdrawal

Types

type BlobsBundleV1

type BlobsBundleV1 struct {
	Commitments []hexutility.Bytes `json:"commitments" gencodec:"required"`
	Proofs      []hexutility.Bytes `json:"proofs"      gencodec:"required"`
	Blobs       []hexutility.Bytes `json:"blobs"       gencodec:"required"`
}

BlobsBundleV1 holds the blobs of an execution payload

func ConvertBlobsFromRpc

func ConvertBlobsFromRpc(bundle *types2.BlobsBundleV1) *BlobsBundleV1

type EngineStatus

type EngineStatus string
const (
	ValidStatus            EngineStatus = "VALID"
	InvalidStatus          EngineStatus = "INVALID"
	SyncingStatus          EngineStatus = "SYNCING"
	AcceptedStatus         EngineStatus = "ACCEPTED"
	InvalidBlockHashStatus EngineStatus = "INVALID_BLOCK_HASH"
)

type ExecutionPayload

type ExecutionPayload 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     hexutility.Bytes    `json:"logsBloom"     gencodec:"required"`
	PrevRandao    common.Hash         `json:"prevRandao"    gencodec:"required"`
	BlockNumber   hexutil.Uint64      `json:"blockNumber"   gencodec:"required"`
	GasLimit      hexutil.Uint64      `json:"gasLimit"      gencodec:"required"`
	GasUsed       hexutil.Uint64      `json:"gasUsed"       gencodec:"required"`
	Timestamp     hexutil.Uint64      `json:"timestamp"     gencodec:"required"`
	ExtraData     hexutility.Bytes    `json:"extraData"     gencodec:"required"`
	BaseFeePerGas *hexutil.Big        `json:"baseFeePerGas" gencodec:"required"`
	BlockHash     common.Hash         `json:"blockHash"     gencodec:"required"`
	Transactions  []hexutility.Bytes  `json:"transactions"  gencodec:"required"`
	Withdrawals   []*types.Withdrawal `json:"withdrawals"`
	BlobGasUsed   *hexutil.Uint64     `json:"blobGasUsed"`
	ExcessBlobGas *hexutil.Uint64     `json:"excessBlobGas"`
}

ExecutionPayload represents an execution payload (aka block)

func ConvertPayloadFromRpc

func ConvertPayloadFromRpc(payload *types2.ExecutionPayload) *ExecutionPayload

func ConvertRpcBlockToExecutionPayload

func ConvertRpcBlockToExecutionPayload(payload *execution.Block) *ExecutionPayload

type ExecutionPayloadBodyV1

type ExecutionPayloadBodyV1 struct {
	Transactions []hexutility.Bytes  `json:"transactions" gencodec:"required"`
	Withdrawals  []*types.Withdrawal `json:"withdrawals"  gencodec:"required"`
}

type ForkChoiceState

type ForkChoiceState struct {
	HeadHash           common.Hash `json:"headBlockHash"             gencodec:"required"`
	SafeBlockHash      common.Hash `json:"safeBlockHash"             gencodec:"required"`
	FinalizedBlockHash common.Hash `json:"finalizedBlockHash"        gencodec:"required"`
}

PayloadAttributes represent the attributes required to start assembling a payload

type ForkChoiceUpdatedResponse

type ForkChoiceUpdatedResponse struct {
	PayloadId     *hexutility.Bytes `json:"payloadId"` // We need to reformat the uint64 so this makes more sense.
	PayloadStatus *PayloadStatus    `json:"payloadStatus"`
}

type GetPayloadResponse

type GetPayloadResponse struct {
	ExecutionPayload      *ExecutionPayload `json:"executionPayload" gencodec:"required"`
	BlockValue            *hexutil.Big      `json:"blockValue"`
	BlobsBundle           *BlobsBundleV1    `json:"blobsBundle"`
	ShouldOverrideBuilder bool              `json:"shouldOverrideBuilder"`
}

type PayloadAttributes

type PayloadAttributes struct {
	Timestamp             hexutil.Uint64      `json:"timestamp"             gencodec:"required"`
	PrevRandao            common.Hash         `json:"prevRandao"            gencodec:"required"`
	SuggestedFeeRecipient common.Address      `json:"suggestedFeeRecipient" gencodec:"required"`
	Withdrawals           []*types.Withdrawal `json:"withdrawals"`
	ParentBeaconBlockRoot *common.Hash        `json:"parentBeaconBlockRoot"`
}

PayloadAttributes represent the attributes required to start assembling a payload

type PayloadStatus

type PayloadStatus struct {
	Status          EngineStatus      `json:"status" gencodec:"required"`
	ValidationError *StringifiedError `json:"validationError"`
	LatestValidHash *common.Hash      `json:"latestValidHash"`
	CriticalError   error
}

type StringifiedError

type StringifiedError struct {
	// contains filtered or unexported fields
}

func NewStringifiedError

func NewStringifiedError(err error) *StringifiedError

func NewStringifiedErrorFromString

func NewStringifiedErrorFromString(err string) *StringifiedError

func (StringifiedError) Error

func (e StringifiedError) Error() error

func (StringifiedError) MarshalJSON

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

type TransitionConfiguration

type TransitionConfiguration struct {
	TerminalTotalDifficulty *hexutil.Big `json:"terminalTotalDifficulty" gencodec:"required"`
	TerminalBlockHash       common.Hash  `json:"terminalBlockHash"       gencodec:"required"`
	TerminalBlockNumber     *hexutil.Big `json:"terminalBlockNumber"     gencodec:"required"`
}

TransitionConfiguration represents the correct configurations of the CL and the EL

Jump to

Keyboard shortcuts

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