execution_client

package
v0.0.0-...-92d349b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutionClient

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

ExecutionClient interfaces with the Erigon-EL component consensus side.

func NewExecutionClient

func NewExecutionClient(ctx context.Context, addr string) (*ExecutionClient, error)

NewExecutionClient establishes a client-side connection with Erigon-EL

func (*ExecutionClient) ForkChoiceUpdate

func (ec *ExecutionClient) ForkChoiceUpdate(headHash libcommon.Hash) (*execution.ForkChoiceReceipt, error)

func (*ExecutionClient) InsertBodies

func (ec *ExecutionClient) InsertBodies(bodies []*types.RawBody, blockHashes []libcommon.Hash, blockNumbers []uint64) error

InsertBodies will send block bodies to execution client

func (*ExecutionClient) InsertExecutionPayloads

func (ec *ExecutionClient) InsertExecutionPayloads(payloads []*cltypes.Eth1Block) error

InsertExecutionPayloads insert a segment of execution payloads

func (*ExecutionClient) InsertHeaders

func (ec *ExecutionClient) InsertHeaders(headers []*types.Header) error

InsertHeaders will send block bodies to execution client

func (*ExecutionClient) IsCanonical

func (ec *ExecutionClient) IsCanonical(hash libcommon.Hash) (bool, error)

func (*ExecutionClient) ReadBody

func (ec *ExecutionClient) ReadBody(number uint64, blockHash libcommon.Hash) (*types.RawBody, error)

func (*ExecutionClient) ReadExecutionPayload

func (ec *ExecutionClient) ReadExecutionPayload(number uint64, blockHash libcommon.Hash) (*cltypes.Eth1Block, error)

func (*ExecutionClient) ReadHeader

func (ec *ExecutionClient) ReadHeader(number uint64, blockHash libcommon.Hash) (*types.Header, error)

type InsertBatch

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

InsertBatch is a struct for batching and inserting execution payloads.

func NewInsertBatch

func NewInsertBatch(ec *ExecutionClient) *InsertBatch

NewInsertBatch creates a new InsertBatch struct with the given execution client.

func (*InsertBatch) Flush

func (b *InsertBatch) Flush() error

Flush inserts the execution payloads in the payload buffer using the execution client.

func (*InsertBatch) WriteExecutionPayload

func (b *InsertBatch) WriteExecutionPayload(payload *cltypes.Eth1Block) error

WriteExecutionPayload adds an execution payload to the payload buffer. If the buffer has reached the batch size, the payloads in the buffer are inserted using the execution client.

Jump to

Keyboard shortcuts

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