assigner

package
v0.37.0-crescendo-RC3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: AGPL-3.0 Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

The Assigner engine reads the receipts from each finalized block. For each receipt, it reads its result and find the chunks the assigned to me to verify, and then save it to the chunks job queue for the fetcher engine to process.

func New

func New(
	log zerolog.Logger,
	metrics module.VerificationMetrics,
	tracer module.Tracer,
	me module.Local,
	state protocol.State,
	assigner module.ChunkAssigner,
	chunksQueue storage.ChunksQueue,
	newChunkListener module.NewJobListener,
	stopAtHeight uint64,
) *Engine

func (*Engine) Done

func (e *Engine) Done() <-chan struct{}

func (*Engine) ProcessFinalizedBlock

func (e *Engine) ProcessFinalizedBlock(block *flow.Block)

ProcessFinalizedBlock is the entry point of assigner engine. It pushes the block down the pipeline with tracing on it enabled. Through the pipeline the execution receipts included in the block are indexed, and their chunk assignments are done, and the assigned chunks are pushed to the chunks queue, which is the output stream of this engine. Once the assigner engine is done handling all the receipts in the block, it notifies the block consumer.

func (*Engine) Ready

func (e *Engine) Ready() <-chan struct{}

func (*Engine) WithBlockConsumerNotifier added in v0.15.1

func (e *Engine) WithBlockConsumerNotifier(notifier module.ProcessingNotifier)

type FinalizedBlockProcessor added in v0.15.1

type FinalizedBlockProcessor interface {
	// ProcessFinalizedBlock receives a finalized block and processes all of its constituent execution receipts.
	// Note: it should be implemented in a non-blocking way.
	ProcessFinalizedBlock(*flow.Block)

	// WithBlockConsumerNotifier sets the notifier of this finalized block processor.
	// The notifier is called by the internal logic of the processor to let the consumer know that
	// the processor is done by processing a block so that the next block may be passed to the processor
	// by the consumer through invoking ProcessFinalizedBlock of this processor.
	WithBlockConsumerNotifier(module.ProcessingNotifier)
}

FinalizedBlockProcessor should be implemented by the verification node engine responsible for processing execution receipts included in a finalized block.

In the current version, the assigner engine is responsible of processing execution receipts included in a finalized block. From the architectural perspective, FinalizedBlockProcessor aligns as following on the verification pipeline: ----------------------------- ------------------ -------------------------- | Consensus Follower Engine | ---> finalized blocks --> | Block Consumer | ---> finalized block workers --> | FinalizedBlockProcessor| ----------------------------- ------------------ --------------------------

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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