track

package
v1.7.14 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilBlockTrackerHandler = errors.New("nil block tracker handler")

ErrNilBlockTrackerHandler signals that a nil block tracker handler has been provided

View Source
var ErrNilCrossNotarizedHeadersNotifier = errors.New("nil cross notarized header notifier")

ErrNilCrossNotarizedHeadersNotifier signals that a nil block notifier handler has been provided

View Source
var ErrNilCrossNotarizer = errors.New("nil cross notarizer")

ErrNilCrossNotarizer signals that a nil block notarizer handler has been provided

View Source
var ErrNilFinalMetachainHeadersNotifier = errors.New("nil final metachain header notifier")

ErrNilFinalMetachainHeadersNotifier signals that a nil block notifier handler has been provided

View Source
var ErrNilKeysHandler = errors.New("nil keys handler")

ErrNilKeysHandler signals that a nil keys handler was provided

View Source
var ErrNilRoundHandler = errors.New("nil roundHandler")

ErrNilRoundHandler signals that a nil roundHandler has been provided

View Source
var ErrNilSelfNotarizedFromCrossHeadersNotifier = errors.New("nil self notarized from cross header notifier")

ErrNilSelfNotarizedFromCrossHeadersNotifier signals that a nil block notifier handler has been provided

View Source
var ErrNilSelfNotarizedHeadersNotifier = errors.New("nil self notarized header notifier")

ErrNilSelfNotarizedHeadersNotifier signals that a nil block notifier handler has been provided

View Source
var ErrNilSelfNotarizer = errors.New("nil self notarizer")

ErrNilSelfNotarizer signals that a nil block notarizer handler has been provided

View Source
var ErrNotarizedHeaderOffsetIsOutOfBound = errors.New("requested offset of the notarized header is out of bound")

ErrNotarizedHeaderOffsetIsOutOfBound signals that a requested offset of the notarized header is out of bound

Functions

func NewBlockBalancer

func NewBlockBalancer() (*blockBalancer, error)

NewBlockBalancer creates a block balancer object which implements blockBalancerHandler interface

func NewBlockNotarizer

func NewBlockNotarizer(
	hasher hashing.Hasher,
	marshalizer marshal.Marshalizer,
	shardCoordinator sharding.Coordinator,
) (*blockNotarizer, error)

NewBlockNotarizer creates a block notarizer object which implements blockNotarizerHandler interface

func NewBlockNotifier

func NewBlockNotifier() (*blockNotifier, error)

NewBlockNotifier creates a block notifier object which implements blockNotifierHandler interface

func NewBlockProcessor

func NewBlockProcessor(arguments ArgBlockProcessor) (*blockProcessor, error)

NewBlockProcessor creates a block processor object which implements blockProcessorHandler interface

func NewMetaBlockTrack

func NewMetaBlockTrack(arguments ArgMetaTracker) (*metaBlockTrack, error)

NewMetaBlockTrack creates an object for tracking the received meta blocks

func NewMiniBlockTrack

func NewMiniBlockTrack(
	dataPool dataRetriever.PoolsHolder,
	shardCoordinator sharding.Coordinator,
	whitelistHandler process.WhiteListHandler,
) (*miniBlockTrack, error)

NewMiniBlockTrack creates an object for tracking the received mini blocks

func NewSentSignaturesTracker added in v1.6.14

func NewSentSignaturesTracker(keysHandler KeysHandler) (*sentSignaturesTracker, error)

NewSentSignaturesTracker will create a new instance of a tracker able to record if a signature was sent from self

func NewShardBlockTrack

func NewShardBlockTrack(arguments ArgShardTracker) (*shardBlockTrack, error)

NewShardBlockTrack creates an object for tracking the received shard blocks

Types

type ArgBaseTracker

type ArgBaseTracker struct {
	Hasher           hashing.Hasher
	HeaderValidator  process.HeaderConstructionValidator
	Marshalizer      marshal.Marshalizer
	RequestHandler   process.RequestHandler
	RoundHandler     process.RoundHandler
	ShardCoordinator sharding.Coordinator
	Store            dataRetriever.StorageService
	StartHeaders     map[uint32]data.HeaderHandler
	PoolsHolder      dataRetriever.PoolsHolder
	WhitelistHandler process.WhiteListHandler
	FeeHandler       process.FeeHandler
}

ArgBaseTracker holds all dependencies required by the process data factory in order to create new instances of shard/meta block tracker

type ArgBlockProcessor

type ArgBlockProcessor struct {
	HeaderValidator                       process.HeaderConstructionValidator
	RequestHandler                        process.RequestHandler
	ShardCoordinator                      sharding.Coordinator
	BlockTracker                          blockTrackerHandler
	CrossNotarizer                        blockNotarizerHandler
	SelfNotarizer                         blockNotarizerHandler
	CrossNotarizedHeadersNotifier         blockNotifierHandler
	SelfNotarizedFromCrossHeadersNotifier blockNotifierHandler
	SelfNotarizedHeadersNotifier          blockNotifierHandler
	FinalMetachainHeadersNotifier         blockNotifierHandler
	RoundHandler                          process.RoundHandler
}

ArgBlockProcessor holds all dependencies required to process tracked blocks in order to create new instances of block processor

type ArgMetaTracker

type ArgMetaTracker struct {
	ArgBaseTracker
}

ArgMetaTracker holds all dependencies required by the process data factory in order to create new instances of meta block tracker

type ArgShardTracker

type ArgShardTracker struct {
	ArgBaseTracker
}

ArgShardTracker holds all dependencies required by the process data factory in order to create new instances of shard block tracker

type HeaderInfo

type HeaderInfo struct {
	Hash   []byte
	Header data.HeaderHandler
}

HeaderInfo holds the information about a header

type KeysHandler added in v1.6.14

type KeysHandler interface {
	ResetRoundsWithoutReceivedMessages(pkBytes []byte, pid core.PeerID)
	IsInterfaceNil() bool
}

KeysHandler defines the operations implemented by a component that will manage all keys, including the single signer keys or the set of multi-keys

Jump to

Keyboard shortcuts

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