prefetcher

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT, MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type L1BlobSource added in v1.5.1

type L1BlobSource interface {
	GetBlobSidecars(ctx context.Context, ref eth.L1BlockRef, hashes []eth.IndexedBlobHash) ([]*eth.BlobSidecar, error)
	GetBlobs(ctx context.Context, ref eth.L1BlockRef, hashes []eth.IndexedBlobHash) ([]*eth.Blob, error)
}

type L1Source

type L1Source interface {
	InfoByHash(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, error)
	InfoAndTxsByHash(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Transactions, error)
	FetchReceipts(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Receipts, error)
}

type L2Source

type L2Source interface {
	InfoAndTxsByHash(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Transactions, error)
	NodeByHash(ctx context.Context, hash common.Hash) ([]byte, error)
	CodeByHash(ctx context.Context, hash common.Hash) ([]byte, error)
	OutputByRoot(ctx context.Context, root common.Hash) (eth.Output, error)
}

type Prefetcher

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

func NewPrefetcher

func NewPrefetcher(logger log.Logger, l1Fetcher L1Source, l1BlobFetcher L1BlobSource, l2Fetcher L2Source, kvStore kvstore.KV) *Prefetcher

func (*Prefetcher) GetPreimage

func (p *Prefetcher) GetPreimage(ctx context.Context, key common.Hash) ([]byte, error)

func (*Prefetcher) Hint

func (p *Prefetcher) Hint(hint string) error

type RetryingL1BlobSource added in v1.5.1

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

func NewRetryingL1BlobSource added in v1.5.1

func NewRetryingL1BlobSource(logger log.Logger, source L1BlobSource) *RetryingL1BlobSource

func (*RetryingL1BlobSource) GetBlobSidecars added in v1.5.1

func (s *RetryingL1BlobSource) GetBlobSidecars(ctx context.Context, ref eth.L1BlockRef, hashes []eth.IndexedBlobHash) ([]*eth.BlobSidecar, error)

func (*RetryingL1BlobSource) GetBlobs added in v1.5.1

func (s *RetryingL1BlobSource) GetBlobs(ctx context.Context, ref eth.L1BlockRef, hashes []eth.IndexedBlobHash) ([]*eth.Blob, error)

type RetryingL1Source

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

func NewRetryingL1Source

func NewRetryingL1Source(logger log.Logger, source L1Source) *RetryingL1Source

func (*RetryingL1Source) FetchReceipts

func (s *RetryingL1Source) FetchReceipts(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Receipts, error)

func (*RetryingL1Source) InfoAndTxsByHash

func (s *RetryingL1Source) InfoAndTxsByHash(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Transactions, error)

func (*RetryingL1Source) InfoByHash

func (s *RetryingL1Source) InfoByHash(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, error)

type RetryingL2Source

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

func NewRetryingL2Source

func NewRetryingL2Source(logger log.Logger, source L2Source) *RetryingL2Source

func (*RetryingL2Source) CodeByHash

func (s *RetryingL2Source) CodeByHash(ctx context.Context, hash common.Hash) ([]byte, error)

func (*RetryingL2Source) InfoAndTxsByHash

func (s *RetryingL2Source) InfoAndTxsByHash(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Transactions, error)

func (*RetryingL2Source) NodeByHash

func (s *RetryingL2Source) NodeByHash(ctx context.Context, hash common.Hash) ([]byte, error)

func (*RetryingL2Source) OutputByRoot added in v1.1.4

func (s *RetryingL2Source) OutputByRoot(ctx context.Context, root common.Hash) (eth.Output, error)

Jump to

Keyboard shortcuts

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