provider

package
v0.34.0-crescendo-prev... Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0 Imports: 21 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// DefaultChunkDataPackRequestWorker is the default number of concurrent workers processing chunk data pack requests on
	// execution nodes.
	DefaultChunkDataPackRequestWorker = 100
	// DefaultChunkDataPackQueryTimeout is the default timeout value for querying a chunk data pack from storage.
	DefaultChunkDataPackQueryTimeout = 10 * time.Second
	// DefaultChunkDataPackDeliveryTimeout is the default timeout value for delivery of a chunk data pack to a verification
	// node.
	DefaultChunkDataPackDeliveryTimeout = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	component.Component
	// contains filtered or unexported fields
}

An Engine provides means of accessing data about execution state and broadcasts execution receipts to nodes in the network. Also generates and saves execution receipts

func New

func New(
	logger zerolog.Logger,
	tracer module.Tracer,
	net network.EngineRegistry,
	state protocol.State,
	execState state.ReadOnlyExecutionState,
	metrics module.ExecutionMetrics,
	checkAuthorizedAtBlock func(blockID flow.Identifier) (bool, error),
	chunkDataPackRequestQueue engine.MessageStore,
	chdpRequestWorkers uint,
	chunkDataPackQueryTimeout time.Duration,
	chunkDataPackDeliveryTimeout time.Duration,
) (*Engine, error)

func (*Engine) BroadcastExecutionReceipt

func (e *Engine) BroadcastExecutionReceipt(ctx context.Context, height uint64, receipt *flow.ExecutionReceipt) (bool, error)

BroadcastExecutionReceipt broadcasts an execution receipt to all nodes in the network. It skips broadcasting the receipt if the block is sealed, or the node is not authorized at the block. It returns true if the receipt is broadcasted, false otherwise.

func (*Engine) Process

func (e *Engine) Process(channel channels.Channel, originID flow.Identifier, event interface{}) error

type NoopEngine added in v0.33.12

type NoopEngine struct {
	module.NoopReadyDoneAware
}

func (*NoopEngine) BroadcastExecutionReceipt added in v0.33.12

func (*NoopEngine) BroadcastExecutionReceipt(context.Context, uint64, *flow.ExecutionReceipt) (bool, error)

func (*NoopEngine) Process added in v0.33.12

func (*NoopEngine) Process(channel channels.Channel, originID flow.Identifier, message interface{}) error

type ProviderEngine

type ProviderEngine interface {
	network.MessageProcessor
	module.ReadyDoneAware
	// BroadcastExecutionReceipt broadcasts an execution receipt to all nodes in the network.
	// It skips broadcasting the receipt if the block is sealed, or the node is not authorized at the block.
	// It returns true if the receipt is broadcasted, false otherwise.
	BroadcastExecutionReceipt(context.Context, uint64, *flow.ExecutionReceipt) (bool, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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