Documentation
¶
Index ¶
- func NewS3Engine(config dtypes.S3BlockDBConfig) (types.BlockDbEngine, error)
- type S3Engine
- func (e *S3Engine) AddBlock(ctx context.Context, slot uint64, root []byte, ...) (bool, bool, error)
- func (e *S3Engine) AddExecData(ctx context.Context, slot uint64, blockHash []byte, data []byte) (int64, error)
- func (e *S3Engine) Close() error
- func (e *S3Engine) DeleteExecData(ctx context.Context, slot uint64, blockHash []byte) error
- func (e *S3Engine) GetBlock(ctx context.Context, slot uint64, root []byte, flags types.BlockDataFlags, ...) (*types.BlockData, error)
- func (e *S3Engine) GetExecData(ctx context.Context, slot uint64, blockHash []byte) ([]byte, error)
- func (e *S3Engine) GetExecDataRange(ctx context.Context, slot uint64, blockHash []byte, offset int64, length int64) ([]byte, error)
- func (e *S3Engine) GetExecDataTxSections(ctx context.Context, slot uint64, blockHash []byte, txHash []byte, ...) (*types.ExecDataTxSections, error)
- func (e *S3Engine) GetStats() *S3Stats
- func (e *S3Engine) GetStoredComponents(ctx context.Context, slot uint64, root []byte) (types.BlockDataFlags, error)
- func (e *S3Engine) HasExecData(ctx context.Context, slot uint64, blockHash []byte) (bool, error)
- func (e *S3Engine) PruneExecDataBefore(ctx context.Context, maxSlot uint64) (int64, error)
- type S3Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewS3Engine ¶
func NewS3Engine(config dtypes.S3BlockDBConfig) (types.BlockDbEngine, error)
Types ¶
type S3Engine ¶
type S3Engine struct {
// contains filtered or unexported fields
}
func (*S3Engine) AddBlock ¶
func (e *S3Engine) AddBlock( ctx context.Context, slot uint64, root []byte, dataCb func() (*types.BlockData, error), ) (bool, bool, error)
AddBlock stores block data. Returns (added, updated, error).
func (*S3Engine) AddExecData ¶ added in v1.20.3
func (e *S3Engine) AddExecData(ctx context.Context, slot uint64, blockHash []byte, data []byte) (int64, error)
AddExecData stores execution data for a block. Returns stored size.
func (*S3Engine) DeleteExecData ¶ added in v1.20.3
DeleteExecData deletes execution data for a specific block.
func (*S3Engine) GetBlock ¶
func (e *S3Engine) 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 based on flags.
func (*S3Engine) GetExecData ¶ added in v1.20.3
GetExecData retrieves full execution data for a block.
func (*S3Engine) GetExecDataRange ¶ added in v1.20.3
func (e *S3Engine) GetExecDataRange(ctx context.Context, slot uint64, blockHash []byte, offset int64, length int64) ([]byte, error)
GetExecDataRange retrieves a byte range of execution data using S3 Range header.
func (*S3Engine) GetExecDataTxSections ¶ added in v1.20.3
func (e *S3Engine) GetExecDataTxSections(ctx context.Context, slot uint64, blockHash []byte, txHash []byte, sections uint32) (*types.ExecDataTxSections, error)
GetExecDataTxSections retrieves all requested compressed sections for a single transaction using range reads. Three requests total:
- Read first 28 bytes (header + tx count)
- Read full index (tx count * 100 bytes)
- Read contiguous data range covering all requested sections
func (*S3Engine) GetStoredComponents ¶ added in v1.21.0
func (e *S3Engine) GetStoredComponents(ctx context.Context, slot uint64, root []byte) (types.BlockDataFlags, error)
GetStoredComponents returns which components exist for a block by reading metadata.
func (*S3Engine) HasExecData ¶ added in v1.20.3
HasExecData checks if execution data exists for a block.