s3

package
v1.20.4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

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, 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) Close

func (e *S3Engine) Close() error

func (*S3Engine) DeleteExecData added in v1.20.3

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

DeleteExecData deletes execution data for a specific block.

func (*S3Engine) GetBlock

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

func (*S3Engine) GetExecData added in v1.20.3

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

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:

  1. Read first 28 bytes (header + tx count)
  2. Read full index (tx count * 100 bytes)
  3. Read contiguous data range covering all requested sections

func (*S3Engine) GetStats added in v1.20.4

func (e *S3Engine) GetStats() *S3Stats

GetStats returns current S3 operation statistics.

func (*S3Engine) HasExecData added in v1.20.3

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

HasExecData checks if execution data exists for a block.

func (*S3Engine) PruneExecDataBefore added in v1.20.3

func (e *S3Engine) PruneExecDataBefore(ctx context.Context, maxSlot uint64) (int64, error)

PruneExecDataBefore deletes execution data for all slots before maxSlot. Uses the shared tier prefix, filtering for _exec suffix.

type S3Stats added in v1.20.4

type S3Stats struct {
	Bucket     string
	PathPrefix string
	GetCount   int64
	PutCount   int64
	StatCount  int64
	GetBytes   int64
	PutBytes   int64
}

S3Stats holds S3 engine statistics.

Jump to

Keyboard shortcuts

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