track

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 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 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 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

Jump to

Keyboard shortcuts

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