pusher

package
v0.38.0-rc.8-pr6993 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: AGPL-3.0 Imports: 16 Imported by: 3

Documentation

Overview

Package pusher implements an engine for providing access to resources held by the collection node, including collections, collection guarantees, and transactions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

Engine is part of the Collection Node. It broadcasts finalized collections ("collection guarantees") that the cluster generates to Consensus Nodes for inclusion in blocks.

func New

func New(
	log zerolog.Logger,
	net network.EngineRegistry,
	state protocol.State,
	engMetrics module.EngineMetrics,
	mempoolMetrics module.MempoolMetrics,
	me module.Local,
	collections storage.Collections,
	transactions storage.Transactions,
) (*Engine, error)

New creates a new pusher engine.

func (*Engine) Process

func (e *Engine) Process(channel channels.Channel, originID flow.Identifier, message any) error

Process is called by the networking layer, when peers broadcast messages with this node as one of the recipients. The protocol specifies that Collector nodes broadcast Collection Guarantees to Consensus Nodes and _only_ those. When the pusher engine (running only on Collectors) receives a message, this message is evidence of byzantine behavior. Byzantine inputs are internally handled by the pusher.Engine and do *not* result in error returns. No errors expected during normal operation (including byzantine inputs).

func (*Engine) SubmitCollectionGuarantee

func (e *Engine) SubmitCollectionGuarantee(guarantee *flow.CollectionGuarantee)

SubmitCollectionGuarantee adds a collection guarantee to the engine's queue to later be published to consensus nodes.

Jump to

Keyboard shortcuts

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