Documentation
¶
Index ¶
- Constants
- func NewPebbleEngine(config dtypes.PebbleBlockDBConfig) (types.BlockDbEngine, error)
- type PebbleEngine
- func (e *PebbleEngine) AddBlock(_ context.Context, _ uint64, root []byte, ...) (bool, error)
- func (e *PebbleEngine) AddExecData(_ context.Context, slot uint64, blockHash []byte, data []byte) (int64, error)
- func (e *PebbleEngine) Close() error
- func (e *PebbleEngine) DeleteExecData(_ context.Context, slot uint64, blockHash []byte) error
- func (e *PebbleEngine) GetBlock(_ context.Context, _ uint64, root []byte, ...) (*types.BlockData, error)
- func (e *PebbleEngine) GetExecData(_ context.Context, slot uint64, blockHash []byte) ([]byte, error)
- func (e *PebbleEngine) GetExecDataRange(_ context.Context, slot uint64, blockHash []byte, offset int64, length int64) ([]byte, error)
- func (e *PebbleEngine) GetExecDataTxSections(_ context.Context, slot uint64, blockHash []byte, txHash []byte, ...) (*types.ExecDataTxSections, error)
- func (e *PebbleEngine) HasExecData(_ context.Context, slot uint64, blockHash []byte) (bool, error)
- func (e *PebbleEngine) PruneExecDataBefore(_ context.Context, maxSlot uint64) (int64, error)
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) 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
DeleteExecData deletes execution data for a specific block.
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
HasExecData checks if execution data exists for a block.
func (*PebbleEngine) PruneExecDataBefore ¶ added in v1.20.3
PruneExecDataBefore deletes execution data for all slots before maxSlot. Returns the number of objects deleted.
Click to show internal directories.
Click to hide internal directories.