Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrEndOfEpochEconomicsDataDoesNotMatch = errors.New("end of epoch economics data does not match")
ErrEndOfEpochEconomicsDataDoesNotMatch signals that end of epoch data does not match
var ErrEpochStartDataForShardNotFound = errors.New("epoch start data for current shard not found")
ErrEpochStartDataForShardNotFound signals that epoch start shard data was not found for current shard id
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
var ErrInvalidConsensusThreshold = errors.New("invalid consensus threshold")
ErrInvalidConsensusThreshold signals that an invalid consensus threshold has been provided
var ErrInvalidDefaultDBPath = errors.New("invalid default db path")
ErrInvalidDefaultDBPath signals that an invalid default database path has been provided
var ErrInvalidDefaultEpochString = errors.New("invalid default epoch string")
ErrInvalidDefaultEpochString signals that an invalid default epoch string has been provided
var ErrInvalidDefaultShardString = errors.New("invalid default shard string")
ErrInvalidDefaultShardString signals that an invalid default shard string has been provided
var ErrInvalidSettingsForEpochStartTrigger = errors.New("invalid start of epoch trigger settings")
ErrInvalidSettingsForEpochStartTrigger signals that settings for start of epoch trigger are invalid
var ErrInvalidWorkingDir = errors.New("invalid working directory")
ErrInvalidWorkingDir signals that an invalid working directory has been provided
var ErrMetaHdrNotFound = errors.New("meta header not found")
ErrMetaHdrNotFound signals that metaheader was not found
var ErrMissingHeader = errors.New("missing header")
ErrMissingHeader signals that searched header is missing
var ErrNilArgsNewMetaEpochStartTrigger = errors.New("nil arguments for meta start of epoch trigger")
ErrNilArgsNewMetaEpochStartTrigger signals that nil arguments were provided
var ErrNilArgsNewShardEpochStartTrigger = errors.New("nil arguments for shard start of epoch trigger")
ErrNilArgsNewShardEpochStartTrigger signals that nil arguments for shard epoch trigger has been provided
var ErrNilBlockKeyGen = errors.New("nil block key generator")
ErrNilBlockKeyGen signals that a nil block key generator has been provided
var ErrNilBlockSingleSigner = errors.New("nil block single signer")
ErrNilBlockSingleSigner signals that a nil block single signer has been provided
var ErrNilDataPoolsHolder = errors.New("nil data pools holder")
ErrNilDataPoolsHolder signals that nil data pools holder has been provided
var ErrNilEconomicsData = errors.New("nil economics data")
ErrNilEconomicsData signals that a nil economics data handler has been provided
var ErrNilEpochStartNotifier = errors.New("nil epoch start notifier")
ErrNilEpochStartNotifier signals that nil epoch start notifier has been provided
var ErrNilEpochStartSettings = errors.New("nil start of epoch settings")
ErrNilEpochStartSettings signals that nil start of epoch settings has been provided
var ErrNilGenesisNodesConfig = errors.New("nil genesis nodes config")
ErrNilGenesisNodesConfig signals that a nil genesis nodes config has been provided
var ErrNilHasher = errors.New("nil hasher")
ErrNilHasher signals that nil hasher has been provided
var ErrNilHeaderHandler = errors.New("nil header handler")
ErrNilHeaderHandler signals that a nil header handler has been provided
var ErrNilHeaderValidator = errors.New("nil header validator")
ErrNilHeaderValidator signals that nil header validator has been provided
var ErrNilKeyGen = errors.New("nil key generator")
ErrNilKeyGen signals that a nil key generator has been provided
var ErrNilMarshalizer = errors.New("nil marshalizer")
ErrNilMarshalizer signals that nil marshalizer has been provided
var ErrNilMessenger = errors.New("nil messenger")
ErrNilMessenger signals that a nil messenger has been provided
var ErrNilMetaBlock = errors.New("nil metablock")
ErrNilMetaBlock signals that a nil metablock has been provided
var ErrNilMetaBlockStorage = errors.New("nil metablocks storage")
ErrNilMetaBlockStorage signals that nil metablocks storage has been provided
var ErrNilMetaBlocksPool = errors.New("nil metablocks pool")
ErrNilMetaBlocksPool signals that nil metablock pools holder has been provided
var ErrNilMetaNonceHashStorage = errors.New("nil meta nonce hash storage")
ErrNilMetaNonceHashStorage signals that nil meta header nonce hash storage has been provided
var ErrNilMiniBlockPool = errors.New("nil mini block pool")
ErrNilMiniBlockPool signals that a nil mini blocks pool was used
var ErrNilMiniblock = errors.New("nil miniblock")
ErrNilMiniblock signals that nil miniblock has been provided
var ErrNilMiniblocks = errors.New("nil arguments for miniblocks object")
ErrNilMiniblocks signals that nil argument was passed
var ErrNilNodesCoordinator = errors.New("nil nodes coordinator")
ErrNilNodesCoordinator signals that an operation has been attempted to or with a nil nodes coordinator
var ErrNilPathManager = errors.New("nil path manager")
ErrNilPathManager signals that a nil path manager has been provided
var ErrNilPubKey = errors.New("nil public key")
ErrNilPubKey signals that a nil public key has been provided
var ErrNilPubkeyConverter = errors.New("nil pubkey converter")
ErrNilPubkeyConverter signals that nil address converter was provided
var ErrNilRater = errors.New("nil rater")
ErrNilRater signals that a nil rater has been provided
var ErrNilRequestHandler = errors.New("nil request handler")
ErrNilRequestHandler signals that nil request handler has been provided
var ErrNilRewardsHandler = errors.New("rewards handler is nil")
ErrNilRewardsHandler signals that rewards handler is nil
var ErrNilRounder = errors.New("nil Rounder")
ErrNilRounder signals that an operation has been attempted to or with a nil Rounder implementation
var ErrNilShardCoordinator = errors.New("shard coordinator is nil")
ErrNilShardCoordinator is raised when a valid shard coordinator is expected but nil used
var ErrNilShardHeaderStorage = errors.New("nil shard header storage")
ErrNilShardHeaderStorage signals that shard header storage is nil
var ErrNilSingleSigner = errors.New("nil single signer")
ErrNilSingleSigner signals that a nil single signer has been provided
var ErrNilStatusHandler = errors.New("nil app status handler")
ErrNilStatusHandler signals that a nil status handler has been provided
var ErrNilStorage = errors.New("nil storage")
ErrNilStorage signals that nil storage has been provided
var ErrNilStorageService = errors.New("nil storage service")
ErrNilStorageService signals that nil storage service has been provided
var ErrNilTotalAccumulatedFeesInEpoch = errors.New("total accumulated fees in epoch is nil")
ErrNilTotalAccumulatedFeesInEpoch signals that total accumulated fees in epoch is nil
var ErrNilTrieStorageManager = errors.New("nil trie storage managers map")
ErrNilTrieStorageManager signals that a nil trie storage managers map has been provided
var ErrNilTriesContainer = errors.New("nil tries container")
ErrNilTriesContainer signals that a nil tries container has been provided
var ErrNilTriggerStorage = errors.New("nil trigger storage")
ErrNilTriggerStorage signals that nil meta header storage has been provided
var ErrNilTxSignMarshalizer = errors.New("nil tx sign marshalizer")
ErrNilTxSignMarshalizer signals that nil tx sign marshalizer has been provided
var ErrNilUint64Converter = errors.New("nil uint64 converter")
ErrNilUint64Converter signals that nil uint64 converter has been provided
var ErrNilValidatorInfo = errors.New("validator info is nil")
ErrNilValidatorInfo signals that a nil value for the validatorInfo has been provided
var ErrNilValidatorInfoProcessor = errors.New("nil validator info processor")
ErrNilValidatorInfoProcessor signals that a nil validator info processor has been provided
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
var ErrNotEpochStartBlock = errors.New("not epoch start block")
ErrNotEpochStartBlock signals that block is not of type epoch start
var ErrRewardMiniBlockHashDoesNotMatch = errors.New("reward miniblock hash does not match")
ErrRewardMiniBlockHashDoesNotMatch signals that created and received rewards miniblock hash does not match
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
var ErrSavedRoundIsHigherThanInput = errors.New("saved round is higher than input round")
ErrSavedRoundIsHigherThanInput signals that input round was wrong
var ErrSavedRoundIsHigherThanInputRound = errors.New("saved round is higher than input round")
ErrSavedRoundIsHigherThanInputRound signals that input round was wrong
var ErrTimeoutWaitingForMetaBlock = errors.New("timeout while waiting for epoch start meta block")
ErrTimeoutWaitingForMetaBlock signals that a timeout event was raised while waiting for the epoch start meta block
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
var ErrValidatorMiniBlockHashDoesNotMatch = errors.New("validatorInfo miniblock hash does not match")
ErrValidatorMiniBlockHashDoesNotMatch signals that created and received validatorInfo miniblock hash does not match
var ErrWrongTypeAssertion = errors.New("wrong type assertion")
ErrWrongTypeAssertion signals wrong type assertion
Functions ¶
This section is empty.
Types ¶
type AccountsDBSyncer ¶ added in v1.0.102
type AccountsDBSyncer interface { GetSyncedTries() map[string]data.Trie SyncAccounts(rootHash []byte) error IsInterfaceNil() bool }
AccountsDBSyncer defines the methods for the accounts db syncer
type ActionHandler ¶ added in v1.0.102
type ActionHandler interface { EpochStartAction(hdr data.HeaderHandler) EpochStartPrepare(metaHdr data.HeaderHandler, body data.BodyHandler) NotifyOrder() uint32 }
ActionHandler defines the action taken on epoch start event
type HeaderValidator ¶
type HeaderValidator interface { IsHeaderConstructionValid(currHdr, prevHdr data.HeaderHandler) error IsInterfaceNil() bool }
HeaderValidator defines the actions needed to validate a header
type HeadersByHashSyncer ¶ added in v1.0.102
type HeadersByHashSyncer interface { SyncMissingHeadersByHash(shardIDs []uint32, headersHashes [][]byte, ctx context.Context) error GetHeaders() (map[string]data.HeaderHandler, error) ClearFields() IsInterfaceNil() bool }
HeadersByHashSyncer defines the methods to sync all missing headers by hash
type Notifier ¶ added in v1.0.102
type Notifier interface { NotifyAll(hdr data.HeaderHandler) NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler) IsInterfaceNil() bool }
Notifier defines which actions should be done for handling new epoch's events
type PendingMiniBlocksSyncHandler ¶ added in v1.0.102
type PendingMiniBlocksSyncHandler interface { SyncPendingMiniBlocks(miniBlockHeaders []block.MiniBlockHeader, ctx context.Context) error GetMiniBlocks() (map[string]*block.MiniBlock, error) ClearFields() IsInterfaceNil() bool }
PendingMiniBlocksSyncHandler defines the methods to sync all pending miniblocks
type RegistrationHandler ¶ added in v1.0.102
type RegistrationHandler interface { RegisterHandler(handler ActionHandler) UnregisterHandler(handler ActionHandler) }
RegistrationHandler provides Register and Unregister functionality for the end of epoch events
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) RequestInterval() time.Duration SetNumPeersToQuery(key string, intra int, cross int) error GetNumPeersToQuery(key string) (int, int, error) 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 StartOfEpochMetaSyncer ¶ added in v1.0.102
type StartOfEpochMetaSyncer interface { SyncEpochStartMeta(waitTime time.Duration) (*block.MetaBlock, error) IsInterfaceNil() bool }
StartOfEpochMetaSyncer defines the methods to synchronize epoch start meta block from the network when nothing is known
type TriggerHandler ¶
type TriggerHandler interface { ForceEpochStart(round uint64) error IsEpochStart() bool Epoch() uint32 MetaEpoch() uint32 Update(round uint64, nonce uint64) EpochStartRound() uint64 EpochStartMetaHdrHash() []byte GetSavedStateKey() []byte LoadState(key []byte) error SetProcessed(header data.HeaderHandler, body data.BodyHandler) 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