epochStart

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrForceEpochStartCanBeCalledOnlyOnNewRound = errors.New("invalid time to call force start of epoch, possible only on new round")

ErrForceEpochStartCanBeCalledOnlyOnNewRound signals that force start of epoch was called on wrong round

View Source
var ErrInvalidSettingsForEpochStartTrigger = errors.New("invalid start of epoch trigger settings")

ErrInvalidSettingsForEpochStartTrigger signals that settings for start of epoch trigger are invalid

View Source
var ErrMetaHdrNotFound = errors.New("meta header not found")

ErrMetaHdrNotFound signals that metaheader was not found

View Source
var ErrNilAddressConverter = errors.New("nil address converter")

ErrNilAddressConverter signals that nil address converter was provided

View Source
var ErrNilArgsNewMetaEpochStartTrigger = errors.New("nil arguments for meta start of epoch trigger")

ErrNilArgsNewMetaEpochStartTrigger signals that nil arguments were provided

View Source
var ErrNilArgsNewShardEpochStartTrigger = errors.New("nil arguments for shard start of epoch trigger")

ErrNilArgsNewShardEpochStartTrigger signals that nil arguments for shard epoch trigger has been provided

View Source
var ErrNilDataPoolsHolder = errors.New("nil data pools holder")

ErrNilDataPoolsHolder signals that nil data pools holder has been provided

View Source
var ErrNilEpochStartNotifier = errors.New("nil epoch start notifier")

ErrNilEpochStartNotifier signals that nil epoch start notifier has been provided

View Source
var ErrNilEpochStartSettings = errors.New("nil start of epoch settings")

ErrNilEpochStartSettings signals that nil start of epoch settings has been provided

View Source
var ErrNilHasher = errors.New("nil hasher")

ErrNilHasher signals that nil hasher has been provided

View Source
var ErrNilHeaderHandler = errors.New("nil header handler")

ErrNilHeaderHandler signals that a nil header handler has been provided

View Source
var ErrNilHeaderValidator = errors.New("nil header validator")

ErrNilHeaderValidator signals that nil header validator has been provided

View Source
var ErrNilMarshalizer = errors.New("nil marshalizer")

ErrNilMarshalizer signals that nil marshalizer has been provided

View Source
var ErrNilMetaBlockStorage = errors.New("nil metablocks storage")

ErrNilMetaBlockStorage signals that nil metablocks storage has been provided

View Source
var ErrNilMetaBlocksPool = errors.New("nil metablocks pool")

ErrNilMetaBlocksPool signals that nil metablock pools holder has been provided

View Source
var ErrNilMetaNonceHashStorage = errors.New("nil meta nonce hash storage")

ErrNilMetaNonceHashStorage signals that nil meta header nonce hash storage has been provided

View Source
var ErrNilMiniBlockPool = errors.New("nil mini block pool")

ErrNilMiniBlockPool signals that a nil mini blocks pool was used

View Source
var ErrNilMiniblock = errors.New("nil miniblock")

ErrNilMiniblock signals that nil miniblock has been provided

View Source
var ErrNilMiniblocks = errors.New("nil arguments for miniblocks object")

ErrNilMiniblocks signals that nil argument was passed

View Source
var ErrNilRequestHandler = errors.New("nil request handler")

ErrNilRequestHandler signals that nil request handler has been provided

View Source
var ErrNilShardCoordinator = errors.New("shard coordinator is nil")

ErrNilShardCoordinator is raised when a valid shard coordinator is expected but nil used

View Source
var ErrNilShardHeaderStorage = errors.New("nil shard header storage")

ErrNilShardHeaderStorage signals that shard header storage is nil

View Source
var ErrNilStatusHandler = errors.New("nil app status handler")

ErrNilStatusHandler signals that a nil status handler has been provided

View Source
var ErrNilStorage = errors.New("nil storage")

ErrNilStorage signals that nil storage has been provided

View Source
var ErrNilStorageService = errors.New("nil storage service")

ErrNilStorageService signals that nil storage service has been provided

View Source
var ErrNilTriggerStorage = errors.New("nil trigger storage")

ErrNilTriggerStorage signals that nil meta header storage has been provided

View Source
var ErrNilUint64Converter = errors.New("nil uint64 converter")

ErrNilUint64Converter signals that nil uint64 converter has been provided

View Source
var ErrNilValidatorInfo = errors.New("validator info is nil")

ErrNilValidatorInfo signals that a nil value for the validatorInfo has been provided

View Source
var ErrNilValidatorInfoProcessor = errors.New("nil validator info processor")

ErrNilValidatorInfoProcessor signals that a nil validator info processor has been provided

View Source
var ErrNilValidatorStatistics = errors.New("nil validator statistics")

ErrNilValidatorStatistics signals that a nil validator statistics has been provided

View Source
var ErrNotEnoughRoundsBetweenEpochs = errors.New("tried to force start of epoch before passing of enough rounds")

ErrNotEnoughRoundsBetweenEpochs signals that not enough rounds has passed since last epoch start

View Source
var ErrRewardMiniBlockHashDoesNotMatch = errors.New("reward miniblock hash does not match")

ErrRewardMiniBlockHashDoesNotMatch signals that created and received rewards miniblock hash does not match

View Source
var ErrRewardMiniBlocksNumDoesNotMatch = errors.New("number of created and received rewards miniblocks missmatch")

ErrRewardMiniBlocksNumDoesNotMatch signals that number of created and received rewards miniblocks is not equal

View Source
var ErrSavedRoundIsHigherThanInput = errors.New("saved round is higher than input round")

ErrSavedRoundIsHigherThanInput signals that input round was wrong

View Source
var ErrSavedRoundIsHigherThanInputRound = errors.New("saved round is higher than input round")

ErrSavedRoundIsHigherThanInputRound signals that input round was wrong

View Source
var ErrValidatorInfoMiniBlocksNumDoesNotMatch = errors.New("number of created and received validatorInfo miniblocks missmatch")

ErrValidatorInfoMiniBlocksNumDoesNotMatch signals that number of created and received validatorInfo miniblocks is not equal

View Source
var ErrValidatorMiniBlockHashDoesNotMatch = errors.New("validatorInfo miniblock hash does not match")

ErrValidatorMiniBlockHashDoesNotMatch signals that created and received validatorInfo miniblock hash does not match

View Source
var ErrWrongTypeAssertion = errors.New("wrong type assertion")

ErrWrongTypeAssertion signals wrong type assertion

Functions

This section is empty.

Types

type EpochStartHandler

type EpochStartHandler interface {
	EpochStartAction(hdr data.HeaderHandler)
	EpochStartPrepare(hdr data.HeaderHandler)
	NotifyOrder() uint32
}

EpochStartHandler defines the action taken on epoch start event

type EpochStartNotifier

type EpochStartNotifier interface {
	NotifyAll(hdr data.HeaderHandler)
	NotifyAllPrepare(hdr data.HeaderHandler)
	IsInterfaceNil() bool
}

EpochStartNotifier defines which actions should be done for handling new epoch's events

type EpochStartSubscriber

type EpochStartSubscriber interface {
	RegisterHandler(handler EpochStartHandler)
	UnregisterHandler(handler EpochStartHandler)
}

EpochStartSubscriber provides Register and Unregister functionality for the end of epoch events

type HeaderValidator

type HeaderValidator interface {
	IsHeaderConstructionValid(currHdr, prevHdr data.HeaderHandler) error
	IsInterfaceNil() bool
}

HeaderValidator defines the actions needed to validate a header

type RequestHandler

type RequestHandler interface {
	RequestShardHeader(shardId uint32, hash []byte)
	RequestMetaHeader(hash []byte)
	RequestMetaHeaderByNonce(nonce uint64)
	RequestShardHeaderByNonce(shardId uint32, nonce uint64)
	RequestStartOfEpochMetaBlock(epoch uint32)
	RequestMiniBlocks(destShardID uint32, miniblocksHashes [][]byte)
	IsInterfaceNil() bool
}

RequestHandler defines the methods through which request to data can be made

type Rounder

type Rounder interface {
	// Index returns the current round
	Index() int64
	// TimeStamp returns the time stamp of the round
	TimeStamp() time.Time
	IsInterfaceNil() bool
}

Rounder defines the actions which should be handled by a round implementation

type TriggerHandler

type TriggerHandler interface {
	ForceEpochStart(round uint64) error
	IsEpochStart() bool
	Epoch() uint32
	Update(round uint64, nonce uint64)
	EpochStartRound() uint64
	EpochStartMetaHdrHash() []byte
	GetSavedStateKey() []byte
	LoadState(key []byte) error
	SetProcessed(header data.HeaderHandler)
	SetFinalityAttestingRound(round uint64)
	EpochFinalityAttestingRound() uint64
	RevertStateToBlock(header data.HeaderHandler) error
	SetCurrentEpochStartRound(round uint64)
	RequestEpochStartIfNeeded(interceptedHeader data.HeaderHandler)
	SetAppStatusHandler(handler core.AppStatusHandler) error
	IsInterfaceNil() bool
}

TriggerHandler defines the functionalities for an start of epoch trigger

type ValidatorStatisticsProcessorHandler

type ValidatorStatisticsProcessorHandler interface {
	Process(info data.ShardValidatorInfoHandler) error
	Commit() ([]byte, error)
	IsInterfaceNil() bool
}

ValidatorStatisticsProcessorHandler defines the actions for processing validator statistics needed in the epoch events

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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