erigon-pulse/cl/phase1/execution_client/interface.go
Giulio rebuffo 8291aa2497
Caplin: Storing Execution Headers in Caplin (#8080)
This PR stores Execution Headers in Caplin when running without storing
fullblocks
2023-08-26 00:41:57 +02:00

25 lines
918 B
Go

package execution_client
import (
libcommon "github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/erigon/cl/cltypes"
"github.com/ledgerwatch/erigon/core/types"
)
var errContextExceeded = "rpc error: code = DeadlineExceeded desc = context deadline exceeded"
// ExecutionEngine is used only for syncing up very close to chain tip and to stay in sync.
// It pretty much mimics engine API.
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
// GetBodiesByRange(start, count uint64) *types.RawBody TODO(Giulio2002): implement
// GetBodiesByHashes([]) *types.RawBody TODO(Giulio2002): implement
IsCanonicalHash(libcommon.Hash) (bool, error)
Ready() (bool, error)
}