Documentation
¶
Index ¶
- func InitWithPebble(config dtypes.PebbleBlockDBConfig) error
- func InitWithS3(config dtypes.S3BlockDBConfig) error
- type BlockDb
- func (db *BlockDb) AddBlock(ctx context.Context, slot uint64, root []byte, header_ver uint64, ...) (bool, error)
- func (db *BlockDb) AddBlockWithCallback(ctx context.Context, slot uint64, root []byte, ...) (bool, error)
- func (db *BlockDb) AddExecData(ctx context.Context, slot uint64, blockRoot []byte, data []byte) (int64, error)
- func (db *BlockDb) Close() error
- func (db *BlockDb) DeleteExecData(ctx context.Context, slot uint64, blockRoot []byte) error
- func (db *BlockDb) GetBlock(ctx context.Context, slot uint64, root []byte, ...) (*types.BlockData, error)
- func (db *BlockDb) GetExecData(ctx context.Context, slot uint64, blockRoot []byte) ([]byte, error)
- func (db *BlockDb) GetExecDataRange(ctx context.Context, slot uint64, blockRoot []byte, offset int64, length int64) ([]byte, error)
- func (db *BlockDb) GetExecDataTxSections(ctx context.Context, slot uint64, blockRoot []byte, txHash []byte, ...) (*types.ExecDataTxSections, error)
- func (db *BlockDb) HasExecData(ctx context.Context, slot uint64, blockRoot []byte) (bool, error)
- func (db *BlockDb) PruneExecDataBefore(ctx context.Context, maxSlot uint64) (int64, error)
- func (db *BlockDb) SupportsExecData() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitWithPebble ¶
func InitWithPebble(config dtypes.PebbleBlockDBConfig) error
InitWithPebble initializes the global BlockDb with a Pebble backend.
func InitWithS3 ¶
func InitWithS3(config dtypes.S3BlockDBConfig) error
InitWithS3 initializes the global BlockDb with an S3 backend.
Types ¶
type BlockDb ¶
type BlockDb struct {
// contains filtered or unexported fields
}
BlockDb wraps the underlying storage engine for both beacon block data and execution data.
var GlobalBlockDb *BlockDb
GlobalBlockDb is the global singleton BlockDb instance.
func (*BlockDb) AddBlockWithCallback ¶
func (*BlockDb) AddExecData ¶ added in v1.20.3
func (db *BlockDb) AddExecData(ctx context.Context, slot uint64, blockRoot []byte, data []byte) (int64, error)
AddExecData stores execution data for a block. Returns stored size.
func (*BlockDb) DeleteExecData ¶ added in v1.20.3
DeleteExecData deletes execution data for a specific block.
func (*BlockDb) GetExecData ¶ added in v1.20.3
GetExecData retrieves full execution data for a block.
func (*BlockDb) GetExecDataRange ¶ added in v1.20.3
func (db *BlockDb) GetExecDataRange(ctx context.Context, slot uint64, blockRoot []byte, offset int64, length int64) ([]byte, error)
GetExecDataRange retrieves a byte range of execution data.
func (*BlockDb) GetExecDataTxSections ¶ added in v1.20.3
func (db *BlockDb) GetExecDataTxSections(ctx context.Context, slot uint64, blockRoot []byte, txHash []byte, sections uint32) (*types.ExecDataTxSections, error)
GetExecDataTxSections retrieves compressed section data for a single transaction. sections is a bitmask selecting which sections to return.
func (*BlockDb) HasExecData ¶ added in v1.20.3
HasExecData checks if execution data exists for a block.
func (*BlockDb) PruneExecDataBefore ¶ added in v1.20.3
PruneExecDataBefore deletes execution data for all slots before maxSlot.
func (*BlockDb) SupportsExecData ¶ added in v1.20.3
SupportsExecData returns true if the underlying engine supports execution data storage.