pebble

package
v1.20.3 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlockTypeHeader uint16 = 1
	BlockTypeBody   uint16 = 2
)
View Source
const (
	KeyNamespaceBlock uint16 = 1
)
View Source
const (
	// KeyNamespaceExecData is the namespace prefix for execution data keys.
	// Each key stores the full DXTX blob for one block.
	// Slot-first ordering enables efficient range deletion for pruning.
	KeyNamespaceExecData uint16 = 2
)

Variables

This section is empty.

Functions

func NewPebbleEngine

func NewPebbleEngine(config dtypes.PebbleBlockDBConfig) (types.BlockDbEngine, error)

Types

type PebbleEngine

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

func (*PebbleEngine) AddBlock

func (e *PebbleEngine) AddBlock(_ context.Context, _ uint64, root []byte, dataCb func() (*types.BlockData, error)) (bool, error)

func (*PebbleEngine) AddExecData added in v1.20.3

func (e *PebbleEngine) AddExecData(_ context.Context, slot uint64, blockHash []byte, data []byte) (int64, error)

AddExecData stores execution data for a block as a full DXTX blob. Returns the stored size in bytes.

func (*PebbleEngine) Close

func (e *PebbleEngine) Close() error

func (*PebbleEngine) DeleteExecData added in v1.20.3

func (e *PebbleEngine) DeleteExecData(_ context.Context, slot uint64, blockHash []byte) error

DeleteExecData deletes execution data for a specific block.

func (*PebbleEngine) GetBlock

func (e *PebbleEngine) GetBlock(_ context.Context, _ uint64, root []byte, parseBlock func(uint64, []byte) (interface{}, error)) (*types.BlockData, error)

func (*PebbleEngine) GetExecData added in v1.20.3

func (e *PebbleEngine) GetExecData(_ context.Context, slot uint64, blockHash []byte) ([]byte, error)

GetExecData retrieves the full DXTX blob for a block. Returns nil, nil if not found.

func (*PebbleEngine) GetExecDataRange added in v1.20.3

func (e *PebbleEngine) GetExecDataRange(_ context.Context, slot uint64, blockHash []byte, offset int64, length int64) ([]byte, error)

GetExecDataRange retrieves a byte range of the DXTX blob.

func (*PebbleEngine) GetExecDataTxSections added in v1.20.3

func (e *PebbleEngine) GetExecDataTxSections(_ context.Context, slot uint64, blockHash []byte, txHash []byte, sections uint32) (*types.ExecDataTxSections, error)

GetExecDataTxSections retrieves compressed section data for a single transaction by loading the full DXTX blob and extracting the requested sections from it.

func (*PebbleEngine) HasExecData added in v1.20.3

func (e *PebbleEngine) HasExecData(_ context.Context, slot uint64, blockHash []byte) (bool, error)

HasExecData checks if execution data exists for a block.

func (*PebbleEngine) PruneExecDataBefore added in v1.20.3

func (e *PebbleEngine) PruneExecDataBefore(_ context.Context, maxSlot uint64) (int64, error)

PruneExecDataBefore deletes execution data for all slots before maxSlot. Returns the number of objects deleted.

Jump to

Keyboard shortcuts

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