execution_client

package
v0.0.0-...-ff78b6e Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultRPCHTTPTimeout = time.Second * 30

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutionClientDirect

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

func NewExecutionClientDirect

func NewExecutionClientDirect(ctx context.Context, chainRW eth1_chain_reader.ChainReaderWriterEth1) (*ExecutionClientDirect, error)

func (*ExecutionClientDirect) ForkChoiceUpdate

func (cc *ExecutionClientDirect) ForkChoiceUpdate(finalized libcommon.Hash, head libcommon.Hash) error

func (*ExecutionClientDirect) FrozenBlocks

func (cc *ExecutionClientDirect) FrozenBlocks() uint64

func (*ExecutionClientDirect) GetBodiesByHashes

func (cc *ExecutionClientDirect) GetBodiesByHashes(hashes []libcommon.Hash) ([]*types.RawBody, error)

GetBodiesByHashes gets block bodies with given hashes

func (*ExecutionClientDirect) GetBodiesByRange

func (cc *ExecutionClientDirect) GetBodiesByRange(start, count uint64) ([]*types.RawBody, error)

GetBodiesByRange gets block bodies in given block range

func (*ExecutionClientDirect) InsertBlock

func (cc *ExecutionClientDirect) InsertBlock(blk *types.Block) error

func (*ExecutionClientDirect) InsertBlocks

func (cc *ExecutionClientDirect) InsertBlocks(blks []*types.Block) error

func (*ExecutionClientDirect) IsCanonicalHash

func (cc *ExecutionClientDirect) IsCanonicalHash(hash libcommon.Hash) (bool, error)

func (*ExecutionClientDirect) NewPayload

func (cc *ExecutionClientDirect) NewPayload(payload *cltypes.Eth1Block, beaconParentRoot *libcommon.Hash) (invalid bool, err error)

func (*ExecutionClientDirect) Ready

func (cc *ExecutionClientDirect) Ready() (bool, error)

func (*ExecutionClientDirect) SupportInsertion

func (cc *ExecutionClientDirect) SupportInsertion() bool

type ExecutionClientRpc

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

func NewExecutionClientRPC

func NewExecutionClientRPC(ctx context.Context, jwtSecret []byte, addr string, port int) (*ExecutionClientRpc, error)

func (*ExecutionClientRpc) ForkChoiceUpdate

func (cc *ExecutionClientRpc) ForkChoiceUpdate(finalized libcommon.Hash, head libcommon.Hash) error

func (*ExecutionClientRpc) FrozenBlocks

func (cc *ExecutionClientRpc) FrozenBlocks() uint64

func (*ExecutionClientRpc) GetBodiesByHashes

func (cc *ExecutionClientRpc) GetBodiesByHashes(hashes []libcommon.Hash) ([]*types.RawBody, error)

GetBodiesByHashes gets block bodies with given hashes

func (*ExecutionClientRpc) GetBodiesByRange

func (cc *ExecutionClientRpc) GetBodiesByRange(start, count uint64) ([]*types.RawBody, error)

GetBodiesByRange gets block bodies in given block range

func (*ExecutionClientRpc) InsertBlock

func (cc *ExecutionClientRpc) InsertBlock(*types.Block) error

func (*ExecutionClientRpc) InsertBlocks

func (cc *ExecutionClientRpc) InsertBlocks([]*types.Block) error

func (*ExecutionClientRpc) IsCanonicalHash

func (cc *ExecutionClientRpc) IsCanonicalHash(libcommon.Hash) (bool, error)

func (*ExecutionClientRpc) NewPayload

func (cc *ExecutionClientRpc) NewPayload(payload *cltypes.Eth1Block, beaconParentRoot *libcommon.Hash) (invalid bool, err error)

func (*ExecutionClientRpc) Ready

func (cc *ExecutionClientRpc) Ready() (bool, error)

func (*ExecutionClientRpc) SupportInsertion

func (cc *ExecutionClientRpc) SupportInsertion() bool

type ExecutionEngine

type ExecutionEngine interface {
	NewPayload(payload *cltypes.Eth1Block, beaconParentRoot *libcommon.Hash) (bool, error)
	ForkChoiceUpdate(finalized libcommon.Hash, head libcommon.Hash) error
	SupportInsertion() bool
	InsertBlocks([]*types.Block) error
	InsertBlock(*types.Block) error
	IsCanonicalHash(libcommon.Hash) (bool, error)
	Ready() (bool, error)
	// Range methods
	GetBodiesByRange(start, count uint64) ([]*types.RawBody, error)
	GetBodiesByHashes(hashes []libcommon.Hash) ([]*types.RawBody, error)
	// Snapshots
	FrozenBlocks() uint64
}

ExecutionEngine is used only for syncing up very close to chain tip and to stay in sync. It pretty much mimics engine API.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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