Documentation
¶
Index ¶
- func NewTieredEngine(config dtypes.TieredBlockDBConfig, logger logrus.FieldLogger) (types.BlockDbEngine, error)
- type TieredEngine
- func (e *TieredEngine) AddBlock(ctx context.Context, slot uint64, root []byte, ...) (bool, bool, error)
- func (e *TieredEngine) Close() error
- func (e *TieredEngine) GetBlock(ctx context.Context, slot uint64, root []byte, flags types.BlockDataFlags, ...) (*types.BlockData, error)
- func (e *TieredEngine) GetStoredComponents(ctx context.Context, slot uint64, root []byte) (types.BlockDataFlags, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTieredEngine ¶
func NewTieredEngine(config dtypes.TieredBlockDBConfig, logger logrus.FieldLogger) (types.BlockDbEngine, error)
NewTieredEngine creates a new tiered storage engine.
Types ¶
type TieredEngine ¶
type TieredEngine struct {
// contains filtered or unexported fields
}
TieredEngine combines Pebble (cache) and S3 (primary storage) in a tiered architecture. Reads check cache first, then fall back to S3. Writes go to both (write-through).
func (*TieredEngine) AddBlock ¶
func (e *TieredEngine) AddBlock( ctx context.Context, slot uint64, root []byte, dataCb func() (*types.BlockData, error), ) (bool, bool, error)
AddBlock stores block data using write-through to both cache and S3. Returns (added, updated, error).
func (*TieredEngine) Close ¶
func (e *TieredEngine) Close() error
Close closes both storage engines.
func (*TieredEngine) GetBlock ¶
func (e *TieredEngine) GetBlock( ctx context.Context, slot uint64, root []byte, flags types.BlockDataFlags, parseBlock func(uint64, []byte) (any, error), parsePayload func(uint64, []byte) (any, error), ) (*types.BlockData, error)
GetBlock retrieves block data with selective loading. Checks cache first, fetches missing components from S3.
func (*TieredEngine) GetStoredComponents ¶
func (e *TieredEngine) GetStoredComponents(ctx context.Context, slot uint64, root []byte) (types.BlockDataFlags, error)
GetStoredComponents returns which components exist for a block. Checks cache first, then S3.
Click to show internal directories.
Click to hide internal directories.