Documentation ¶
Index ¶
- type ExecutionClient
- func (ec *ExecutionClient) ForkChoiceUpdate(headHash libcommon.Hash) (*execution.ForkChoiceReceipt, error)
- func (ec *ExecutionClient) InsertBodies(bodies []*types.RawBody, blockHashes []libcommon.Hash, blockNumbers []uint64) error
- func (ec *ExecutionClient) InsertExecutionPayloads(payloads []*cltypes.Eth1Block) error
- func (ec *ExecutionClient) InsertHeaders(headers []*types.Header) error
- func (ec *ExecutionClient) IsCanonical(hash libcommon.Hash) (bool, error)
- func (ec *ExecutionClient) ReadBody(number uint64, blockHash libcommon.Hash) (*types.RawBody, error)
- func (ec *ExecutionClient) ReadExecutionPayload(number uint64, blockHash libcommon.Hash) (*cltypes.Eth1Block, error)
- func (ec *ExecutionClient) ReadHeader(number uint64, blockHash libcommon.Hash) (*types.Header, error)
- type InsertBatch
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) ReadExecutionPayload ¶
func (*ExecutionClient) ReadHeader ¶
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.