execution_client

package
v3.0.0-alpha5.0...-c974331 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: LGPL-3.0 Imports: 21 Imported by: 0

Documentation

Overview

Package execution_client is a generated GoMock package.

Index

Constants

View Source
const (
	PayloadStatusNone = iota
	PayloadStatusNotValidated
	PayloadStatusInvalidated
	PayloadStatusValidated
)
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(chainRW eth1_chain_reader.ChainReaderWriterEth1) (*ExecutionClientDirect, error)

func (*ExecutionClientDirect) CurrentHeader

func (cc *ExecutionClientDirect) CurrentHeader(ctx context.Context) (*types.Header, error)

func (*ExecutionClientDirect) ForkChoiceUpdate

func (cc *ExecutionClientDirect) ForkChoiceUpdate(ctx context.Context, finalized libcommon.Hash, head libcommon.Hash, attr *engine_types.PayloadAttributes) ([]byte, error)

func (*ExecutionClientDirect) FrozenBlocks

func (cc *ExecutionClientDirect) FrozenBlocks(ctx context.Context) uint64

func (*ExecutionClientDirect) GetAssembledBlock

func (cc *ExecutionClientDirect) GetAssembledBlock(_ context.Context, idBytes []byte) (*cltypes.Eth1Block, *engine_types.BlobsBundleV1, *big.Int, error)

func (*ExecutionClientDirect) GetBodiesByHashes

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

GetBodiesByHashes gets block bodies with given hashes

func (*ExecutionClientDirect) GetBodiesByRange

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

GetBodiesByRange gets block bodies in given block range

func (*ExecutionClientDirect) HasBlock

func (cc *ExecutionClientDirect) HasBlock(ctx context.Context, hash libcommon.Hash) (bool, error)

func (*ExecutionClientDirect) HasGapInSnapshots

func (cc *ExecutionClientDirect) HasGapInSnapshots(ctx context.Context) bool

func (*ExecutionClientDirect) InsertBlock

func (cc *ExecutionClientDirect) InsertBlock(ctx context.Context, blk *types.Block) error

func (*ExecutionClientDirect) InsertBlocks

func (cc *ExecutionClientDirect) InsertBlocks(ctx context.Context, blocks []*types.Block, wait bool) error

func (*ExecutionClientDirect) IsCanonicalHash

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

func (*ExecutionClientDirect) NewPayload

func (cc *ExecutionClientDirect) NewPayload(ctx context.Context, payload *cltypes.Eth1Block, beaconParentRoot *libcommon.Hash, versionedHashes []libcommon.Hash) (PayloadStatus, error)

func (*ExecutionClientDirect) Ready

func (cc *ExecutionClientDirect) Ready(ctx context.Context) (bool, error)

func (*ExecutionClientDirect) SupportInsertion

func (cc *ExecutionClientDirect) SupportInsertion() bool

type ExecutionClientRpc

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

func NewExecutionClientRPC

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

func (*ExecutionClientRpc) CurrentHeader

func (cc *ExecutionClientRpc) CurrentHeader(ctx context.Context) (*types.Header, error)

func (*ExecutionClientRpc) ForkChoiceUpdate

func (cc *ExecutionClientRpc) ForkChoiceUpdate(ctx context.Context, finalized libcommon.Hash, head libcommon.Hash, attributes *engine_types.PayloadAttributes) ([]byte, error)

func (*ExecutionClientRpc) FrozenBlocks

func (cc *ExecutionClientRpc) FrozenBlocks(ctx context.Context) uint64

func (*ExecutionClientRpc) GetAssembledBlock

func (cc *ExecutionClientRpc) GetAssembledBlock(ctx context.Context, id []byte) (*cltypes.Eth1Block, *engine_types.BlobsBundleV1, *big.Int, error)

func (*ExecutionClientRpc) GetBodiesByHashes

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

GetBodiesByHashes gets block bodies with given hashes

func (*ExecutionClientRpc) GetBodiesByRange

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

GetBodiesByRange gets block bodies in given block range

func (*ExecutionClientRpc) HasBlock

func (cc *ExecutionClientRpc) HasBlock(ctx context.Context, hash libcommon.Hash) (bool, error)

HasBlock checks if block with given hash is present

func (*ExecutionClientRpc) HasGapInSnapshots

func (cc *ExecutionClientRpc) HasGapInSnapshots(ctx context.Context) bool

func (*ExecutionClientRpc) InsertBlock

func (cc *ExecutionClientRpc) InsertBlock(ctx context.Context, block *types.Block) error

func (*ExecutionClientRpc) InsertBlocks

func (cc *ExecutionClientRpc) InsertBlocks(ctx context.Context, blocks []*types.Block, wait bool) error

func (*ExecutionClientRpc) IsCanonicalHash

func (cc *ExecutionClientRpc) IsCanonicalHash(ctx context.Context, hash libcommon.Hash) (bool, error)

func (*ExecutionClientRpc) NewPayload

func (cc *ExecutionClientRpc) NewPayload(ctx context.Context, payload *cltypes.Eth1Block, beaconParentRoot *libcommon.Hash, versionedHashes []libcommon.Hash) (PayloadStatus, error)

func (*ExecutionClientRpc) Ready

func (cc *ExecutionClientRpc) Ready(ctx context.Context) (bool, error)

func (*ExecutionClientRpc) SupportInsertion

func (cc *ExecutionClientRpc) SupportInsertion() bool

type ExecutionEngine

type ExecutionEngine interface {
	NewPayload(ctx context.Context, payload *cltypes.Eth1Block, beaconParentRoot *libcommon.Hash, versionedHashes []libcommon.Hash) (PayloadStatus, error)
	ForkChoiceUpdate(ctx context.Context, finalized libcommon.Hash, head libcommon.Hash, attributes *engine_types.PayloadAttributes) ([]byte, error)
	SupportInsertion() bool
	InsertBlocks(ctx context.Context, blocks []*types.Block, wait bool) error
	InsertBlock(ctx context.Context, block *types.Block) error
	CurrentHeader(ctx context.Context) (*types.Header, error)
	IsCanonicalHash(ctx context.Context, hash libcommon.Hash) (bool, error)
	Ready(ctx context.Context) (bool, error)
	// Range methods
	GetBodiesByRange(ctx context.Context, start, count uint64) ([]*types.RawBody, error)
	GetBodiesByHashes(ctx context.Context, hashes []libcommon.Hash) ([]*types.RawBody, error)
	HasBlock(ctx context.Context, hash libcommon.Hash) (bool, error)
	// Snapshots
	FrozenBlocks(ctx context.Context) uint64
	HasGapInSnapshots(ctx context.Context) bool
	// Block production
	GetAssembledBlock(ctx context.Context, id []byte) (*cltypes.Eth1Block, *engine_types.BlobsBundleV1, *big.Int, error)
}

type MockExecutionEngine

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

MockExecutionEngine is a mock of ExecutionEngine interface.

func NewMockExecutionEngine

func NewMockExecutionEngine(ctrl *gomock.Controller) *MockExecutionEngine

NewMockExecutionEngine creates a new mock instance.

func (*MockExecutionEngine) CurrentHeader

func (m *MockExecutionEngine) CurrentHeader(ctx context.Context) (*types.Header, error)

CurrentHeader mocks base method.

func (*MockExecutionEngine) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockExecutionEngine) ForkChoiceUpdate

func (m *MockExecutionEngine) ForkChoiceUpdate(ctx context.Context, finalized, head common.Hash, attributes *engine_types.PayloadAttributes) ([]byte, error)

ForkChoiceUpdate mocks base method.

func (*MockExecutionEngine) FrozenBlocks

func (m *MockExecutionEngine) FrozenBlocks(ctx context.Context) uint64

FrozenBlocks mocks base method.

func (*MockExecutionEngine) GetAssembledBlock

GetAssembledBlock mocks base method.

func (*MockExecutionEngine) GetBodiesByHashes

func (m *MockExecutionEngine) GetBodiesByHashes(ctx context.Context, hashes []common.Hash) ([]*types.RawBody, error)

GetBodiesByHashes mocks base method.

func (*MockExecutionEngine) GetBodiesByRange

func (m *MockExecutionEngine) GetBodiesByRange(ctx context.Context, start, count uint64) ([]*types.RawBody, error)

GetBodiesByRange mocks base method.

func (*MockExecutionEngine) HasBlock

func (m *MockExecutionEngine) HasBlock(ctx context.Context, hash common.Hash) (bool, error)

HasBlock mocks base method.

func (*MockExecutionEngine) HasGapInSnapshots

func (m *MockExecutionEngine) HasGapInSnapshots(ctx context.Context) bool

HasGapInSnapshots mocks base method.

func (*MockExecutionEngine) InsertBlock

func (m *MockExecutionEngine) InsertBlock(ctx context.Context, block *types.Block) error

InsertBlock mocks base method.

func (*MockExecutionEngine) InsertBlocks

func (m *MockExecutionEngine) InsertBlocks(ctx context.Context, blocks []*types.Block, wait bool) error

InsertBlocks mocks base method.

func (*MockExecutionEngine) IsCanonicalHash

func (m *MockExecutionEngine) IsCanonicalHash(ctx context.Context, hash common.Hash) (bool, error)

IsCanonicalHash mocks base method.

func (*MockExecutionEngine) NewPayload

func (m *MockExecutionEngine) NewPayload(ctx context.Context, payload *cltypes.Eth1Block, beaconParentRoot *common.Hash, versionedHashes []common.Hash) (PayloadStatus, error)

NewPayload mocks base method.

func (*MockExecutionEngine) Ready

func (m *MockExecutionEngine) Ready(ctx context.Context) (bool, error)

Ready mocks base method.

func (*MockExecutionEngine) SupportInsertion

func (m *MockExecutionEngine) SupportInsertion() bool

SupportInsertion mocks base method.

type MockExecutionEngineCurrentHeaderCall

type MockExecutionEngineCurrentHeaderCall struct {
	*gomock.Call
}

MockExecutionEngineCurrentHeaderCall wrap *gomock.Call

func (*MockExecutionEngineCurrentHeaderCall) Do

Do rewrite *gomock.Call.Do

func (*MockExecutionEngineCurrentHeaderCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExecutionEngineCurrentHeaderCall) Return

Return rewrite *gomock.Call.Return

type MockExecutionEngineForkChoiceUpdateCall

type MockExecutionEngineForkChoiceUpdateCall struct {
	*gomock.Call
}

MockExecutionEngineForkChoiceUpdateCall wrap *gomock.Call

func (*MockExecutionEngineForkChoiceUpdateCall) Do

Do rewrite *gomock.Call.Do

func (*MockExecutionEngineForkChoiceUpdateCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExecutionEngineForkChoiceUpdateCall) Return

Return rewrite *gomock.Call.Return

type MockExecutionEngineFrozenBlocksCall

type MockExecutionEngineFrozenBlocksCall struct {
	*gomock.Call
}

MockExecutionEngineFrozenBlocksCall wrap *gomock.Call

func (*MockExecutionEngineFrozenBlocksCall) Do

Do rewrite *gomock.Call.Do

func (*MockExecutionEngineFrozenBlocksCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExecutionEngineFrozenBlocksCall) Return

Return rewrite *gomock.Call.Return

type MockExecutionEngineGetAssembledBlockCall

type MockExecutionEngineGetAssembledBlockCall struct {
	*gomock.Call
}

MockExecutionEngineGetAssembledBlockCall wrap *gomock.Call

func (*MockExecutionEngineGetAssembledBlockCall) Do

Do rewrite *gomock.Call.Do

func (*MockExecutionEngineGetAssembledBlockCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExecutionEngineGetAssembledBlockCall) Return

Return rewrite *gomock.Call.Return

type MockExecutionEngineGetBodiesByHashesCall

type MockExecutionEngineGetBodiesByHashesCall struct {
	*gomock.Call
}

MockExecutionEngineGetBodiesByHashesCall wrap *gomock.Call

func (*MockExecutionEngineGetBodiesByHashesCall) Do

Do rewrite *gomock.Call.Do

func (*MockExecutionEngineGetBodiesByHashesCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExecutionEngineGetBodiesByHashesCall) Return

Return rewrite *gomock.Call.Return

type MockExecutionEngineGetBodiesByRangeCall

type MockExecutionEngineGetBodiesByRangeCall struct {
	*gomock.Call
}

MockExecutionEngineGetBodiesByRangeCall wrap *gomock.Call

func (*MockExecutionEngineGetBodiesByRangeCall) Do

Do rewrite *gomock.Call.Do

func (*MockExecutionEngineGetBodiesByRangeCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExecutionEngineGetBodiesByRangeCall) Return

Return rewrite *gomock.Call.Return

type MockExecutionEngineHasBlockCall

type MockExecutionEngineHasBlockCall struct {
	*gomock.Call
}

MockExecutionEngineHasBlockCall wrap *gomock.Call

func (*MockExecutionEngineHasBlockCall) Do

Do rewrite *gomock.Call.Do

func (*MockExecutionEngineHasBlockCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExecutionEngineHasBlockCall) Return

Return rewrite *gomock.Call.Return

type MockExecutionEngineHasGapInSnapshotsCall

type MockExecutionEngineHasGapInSnapshotsCall struct {
	*gomock.Call
}

MockExecutionEngineHasGapInSnapshotsCall wrap *gomock.Call

func (*MockExecutionEngineHasGapInSnapshotsCall) Do

Do rewrite *gomock.Call.Do

func (*MockExecutionEngineHasGapInSnapshotsCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExecutionEngineHasGapInSnapshotsCall) Return

Return rewrite *gomock.Call.Return

type MockExecutionEngineInsertBlockCall

type MockExecutionEngineInsertBlockCall struct {
	*gomock.Call
}

MockExecutionEngineInsertBlockCall wrap *gomock.Call

func (*MockExecutionEngineInsertBlockCall) Do

Do rewrite *gomock.Call.Do

func (*MockExecutionEngineInsertBlockCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExecutionEngineInsertBlockCall) Return

Return rewrite *gomock.Call.Return

type MockExecutionEngineInsertBlocksCall

type MockExecutionEngineInsertBlocksCall struct {
	*gomock.Call
}

MockExecutionEngineInsertBlocksCall wrap *gomock.Call

func (*MockExecutionEngineInsertBlocksCall) Do

Do rewrite *gomock.Call.Do

func (*MockExecutionEngineInsertBlocksCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExecutionEngineInsertBlocksCall) Return

Return rewrite *gomock.Call.Return

type MockExecutionEngineIsCanonicalHashCall

type MockExecutionEngineIsCanonicalHashCall struct {
	*gomock.Call
}

MockExecutionEngineIsCanonicalHashCall wrap *gomock.Call

func (*MockExecutionEngineIsCanonicalHashCall) Do

Do rewrite *gomock.Call.Do

func (*MockExecutionEngineIsCanonicalHashCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExecutionEngineIsCanonicalHashCall) Return

Return rewrite *gomock.Call.Return

type MockExecutionEngineMockRecorder

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

MockExecutionEngineMockRecorder is the mock recorder for MockExecutionEngine.

func (*MockExecutionEngineMockRecorder) CurrentHeader

CurrentHeader indicates an expected call of CurrentHeader.

func (*MockExecutionEngineMockRecorder) ForkChoiceUpdate

func (mr *MockExecutionEngineMockRecorder) ForkChoiceUpdate(ctx, finalized, head, attributes any) *MockExecutionEngineForkChoiceUpdateCall

ForkChoiceUpdate indicates an expected call of ForkChoiceUpdate.

func (*MockExecutionEngineMockRecorder) FrozenBlocks

FrozenBlocks indicates an expected call of FrozenBlocks.

func (*MockExecutionEngineMockRecorder) GetAssembledBlock

GetAssembledBlock indicates an expected call of GetAssembledBlock.

func (*MockExecutionEngineMockRecorder) GetBodiesByHashes

GetBodiesByHashes indicates an expected call of GetBodiesByHashes.

func (*MockExecutionEngineMockRecorder) GetBodiesByRange

func (mr *MockExecutionEngineMockRecorder) GetBodiesByRange(ctx, start, count any) *MockExecutionEngineGetBodiesByRangeCall

GetBodiesByRange indicates an expected call of GetBodiesByRange.

func (*MockExecutionEngineMockRecorder) HasBlock

HasBlock indicates an expected call of HasBlock.

func (*MockExecutionEngineMockRecorder) HasGapInSnapshots

HasGapInSnapshots indicates an expected call of HasGapInSnapshots.

func (*MockExecutionEngineMockRecorder) InsertBlock

InsertBlock indicates an expected call of InsertBlock.

func (*MockExecutionEngineMockRecorder) InsertBlocks

func (mr *MockExecutionEngineMockRecorder) InsertBlocks(ctx, blocks, wait any) *MockExecutionEngineInsertBlocksCall

InsertBlocks indicates an expected call of InsertBlocks.

func (*MockExecutionEngineMockRecorder) IsCanonicalHash

IsCanonicalHash indicates an expected call of IsCanonicalHash.

func (*MockExecutionEngineMockRecorder) NewPayload

func (mr *MockExecutionEngineMockRecorder) NewPayload(ctx, payload, beaconParentRoot, versionedHashes any) *MockExecutionEngineNewPayloadCall

NewPayload indicates an expected call of NewPayload.

func (*MockExecutionEngineMockRecorder) Ready

Ready indicates an expected call of Ready.

func (*MockExecutionEngineMockRecorder) SupportInsertion

SupportInsertion indicates an expected call of SupportInsertion.

type MockExecutionEngineNewPayloadCall

type MockExecutionEngineNewPayloadCall struct {
	*gomock.Call
}

MockExecutionEngineNewPayloadCall wrap *gomock.Call

func (*MockExecutionEngineNewPayloadCall) Do

Do rewrite *gomock.Call.Do

func (*MockExecutionEngineNewPayloadCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExecutionEngineNewPayloadCall) Return

Return rewrite *gomock.Call.Return

type MockExecutionEngineReadyCall

type MockExecutionEngineReadyCall struct {
	*gomock.Call
}

MockExecutionEngineReadyCall wrap *gomock.Call

func (*MockExecutionEngineReadyCall) Do

Do rewrite *gomock.Call.Do

func (*MockExecutionEngineReadyCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExecutionEngineReadyCall) Return

Return rewrite *gomock.Call.Return

type MockExecutionEngineSupportInsertionCall

type MockExecutionEngineSupportInsertionCall struct {
	*gomock.Call
}

MockExecutionEngineSupportInsertionCall wrap *gomock.Call

func (*MockExecutionEngineSupportInsertionCall) Do

Do rewrite *gomock.Call.Do

func (*MockExecutionEngineSupportInsertionCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockExecutionEngineSupportInsertionCall) Return

Return rewrite *gomock.Call.Return

type PayloadStatus

type PayloadStatus int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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