requester

package
v0.33.26-util-checkpoi... Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultFetchTimeout is the default initial timeout for fetching ExecutionData from the
	// db/network. The timeout is increased using an incremental backoff until FetchTimeout.
	DefaultFetchTimeout = 10 * time.Second

	// DefaultMaxFetchTimeout is the default timeout for fetching ExecutionData from the db/network
	DefaultMaxFetchTimeout = 10 * time.Minute

	// DefaultRetryDelay is the default initial delay used in the exponential backoff for failed
	// ExecutionData download retries
	DefaultRetryDelay = 1 * time.Second

	// DefaultMaxRetryDelay is the default maximum delay used in the exponential backoff for failed
	// ExecutionData download retries
	DefaultMaxRetryDelay = 5 * time.Minute

	// DefaultMaxSearchAhead is the default max number of unsent notifications to allow before
	// pausing new fetches.
	DefaultMaxSearchAhead = 5000
)

Variables

This section is empty.

Functions

func New

New creates a new execution data requester component

Types

type ExecutionDataConfig

type ExecutionDataConfig struct {
	// The initial value to use as the last processed block height. This should be the
	// first block height to sync - 1
	InitialBlockHeight uint64

	// Max number of unsent notifications to allow before pausing new fetches. After exceeding this
	// limit, the requester will stop processing new finalized block notifications. This prevents
	// unbounded memory use by the requester if it gets stuck fetching a specific height.
	MaxSearchAhead uint64

	// The initial timeout for fetching ExecutionData from the db/network
	FetchTimeout time.Duration

	// The max timeout for fetching ExecutionData from the db/network
	MaxFetchTimeout time.Duration

	// Exponential backoff settings for download retries
	RetryDelay    time.Duration
	MaxRetryDelay time.Duration
}

ExecutionDataConfig contains configuration options for the ExecutionDataRequester

type ExecutionDataDistributor added in v0.30.2

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

ExecutionDataDistributor subscribes to execution data received events from the requester and distributes them to subscribers

func NewExecutionDataDistributor added in v0.30.2

func NewExecutionDataDistributor() *ExecutionDataDistributor

func (*ExecutionDataDistributor) AddOnExecutionDataReceivedConsumer added in v0.30.2

func (p *ExecutionDataDistributor) AddOnExecutionDataReceivedConsumer(consumer state_synchronization.OnExecutionDataReceivedConsumer)

AddOnExecutionDataReceivedConsumer adds a consumer to be notified when new execution data is received

func (*ExecutionDataDistributor) OnExecutionDataReceived added in v0.30.2

func (p *ExecutionDataDistributor) OnExecutionDataReceived(executionData *execution_data.BlockExecutionDataEntity)

OnExecutionDataReceived is called when new execution data is received

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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