epochStart

package
v1.3.21 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCouldNotInitDelegationSystemSC = errors.New("could not init delegation system sc")

ErrCouldNotInitDelegationSystemSC signals that delegation system sc init failed

View Source
var ErrEmptyESDTOwnerAddress = errors.New("empty ESDT owner address")

ErrEmptyESDTOwnerAddress signals that an empty ESDT owner address was provided

View Source
var ErrEndOfEpochEconomicsDataDoesNotMatch = errors.New("end of epoch economics data does not match")

ErrEndOfEpochEconomicsDataDoesNotMatch signals that end of epoch data does not match

View Source
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

View Source
var ErrExecutingSystemScCode = errors.New("error executing system SC code")

ErrExecutingSystemScCode signals that an error occurred while executing system SC code

View Source
var ErrInvalidAccumulatedFees = errors.New("accumulated rewards are invalid")

ErrInvalidAccumulatedFees signals that the accumulated fees are invalid

View Source
var ErrInvalidAmountMintedTokens = errors.New("amount of minted tokens is invalid")

ErrInvalidAmountMintedTokens signals that the amount of minted tokens is invalid

View Source
var ErrInvalidConsensusThreshold = errors.New("invalid consensus threshold")

ErrInvalidConsensusThreshold signals that an invalid consensus threshold has been provided

View Source
var ErrInvalidEstimatedProtocolSustainabilityRewards = errors.New("estimated protocol sustainability rewards are invalid")

ErrInvalidEstimatedProtocolSustainabilityRewards signals that the estimated protocol sustainability rewards are invalid

View Source
var ErrInvalidInflationRate = errors.New("inflation rate is invalid")

ErrInvalidInflationRate signals usage of an invalid inflation rate

View Source
var ErrInvalidMaxHardCapForMissingNodes = errors.New("invalid max hardcap for missing nodes")

ErrInvalidMaxHardCapForMissingNodes signals that the maximum hardcap value for missing nodes is invalid

View Source
var ErrInvalidMaxNumberOfNodes = errors.New("maximum number of nodes invalid")

ErrInvalidMaxNumberOfNodes signals that the maximum number of nodes is invalid

View Source
var ErrInvalidMinNodePrice = errors.New("minimum node price is invalid")

ErrInvalidMinNodePrice signals that the minimum node price is invalid (e.g negative, not a number, etc)

View Source
var ErrInvalidMinNumberOfNodes = errors.New("minimum number of nodes invalid")

ErrInvalidMinNumberOfNodes signals that the minimum number of nodes is invalid

View Source
var ErrInvalidNumConcurrentTrieSyncers = errors.New("invalid num concurrent trie syncers")

ErrInvalidNumConcurrentTrieSyncers signals that the number of concurrent trie syncers is invalid

View Source
var ErrInvalidRewardsPerBlock = errors.New("invalid rewards per block")

ErrInvalidRewardsPerBlock signals that the computed rewards per block are invalid

View Source
var ErrInvalidRewardsTopUpFactor = errors.New("top-up factor invalid")

ErrInvalidRewardsTopUpFactor signals that the factor for computing the top-up rewards out of the full rewards is invalid

View Source
var ErrInvalidRewardsTopUpGradientPoint = errors.New("top-up gradient point invalid")

ErrInvalidRewardsTopUpGradientPoint signals that the given point controlling the top-up gradient is invalid

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 ErrInvalidSystemSCReturn = errors.New("invalid system sc return")

ErrInvalidSystemSCReturn signals that system sc returned with something unexpected

View Source
var ErrInvalidTotalToDistribute = errors.New("invalid total to distribute")

ErrInvalidTotalToDistribute signals that the computed total rewards to be distributed is invalid

View Source
var ErrInvalidWorkingDir = errors.New("invalid working directory")

ErrInvalidWorkingDir signals that an invalid working directory has been provided

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

ErrMetaHdrNotFound signals that metaheader was not found

View Source
var ErrMissingHeader = errors.New("missing header")

ErrMissingHeader signals that searched header is missing

View Source
var ErrMissingMiniBlock = errors.New("missing miniBlock")

ErrMissingMiniBlock signals that the searched miniBlock is missing

View Source
var ErrNilAccountsDB = errors.New("nil accounts DB")

ErrNilAccountsDB signals that nil accounts DB has been 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 ErrNilArgumentsParser = errors.New("nil arguments parsers")

ErrNilArgumentsParser signals that nil arguments parser was provided

View Source
var ErrNilBlockKeyGen = errors.New("nil block key generator")

ErrNilBlockKeyGen signals that a nil block key generator has been provided

View Source
var ErrNilBlockSingleSigner = errors.New("nil block single signer")

ErrNilBlockSingleSigner signals that a nil block single signer has been provided

View Source
var ErrNilChanceComputer = errors.New("nil chance computer")

ErrNilChanceComputer signals that nil chance computer has been provided

View Source
var ErrNilCoreComponentsHolder = errors.New("nil core components holder")

ErrNilCoreComponentsHolder signals that a nil core components holder was provided

View Source
var ErrNilCryptoComponentsHolder = errors.New("nil crypto components holder")

ErrNilCryptoComponentsHolder signals that a nil crypto components holder was provided

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

ErrNilDataPoolsHolder signals that nil data pools holder has been provided

View Source
var ErrNilDataTrie = errors.New("nil data trie")

ErrNilDataTrie signals that a nil data trie was provided

View Source
var ErrNilEconomicsData = errors.New("nil economics data")

ErrNilEconomicsData signals that a nil economics data handler has been provided

View Source
var ErrNilEconomicsDataProvider = errors.New("end of epoch economics data provider is nil")

ErrNilEconomicsDataProvider signals that the economics data provider is nil

View Source
var ErrNilEndOfEpochCallerAddress = errors.New("nil end of epoch caller address")

ErrNilEndOfEpochCallerAddress signals that nil end of epoch caller address was provided

View Source
var ErrNilEpochNotifier = errors.New("nil EpochNotifier")

ErrNilEpochNotifier signals that the provided EpochNotifier is nil

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 ErrNilGenesisNodesConfig = errors.New("nil genesis nodes config")

ErrNilGenesisNodesConfig signals that a nil genesis nodes config has been provided

View Source
var ErrNilGenesisTotalSupply = errors.New("nil genesis total supply")

ErrNilGenesisTotalSupply signals that nil genesis total supply 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 ErrNilHeaderIntegrityVerifier = errors.New("nil header integrity verifier handler")

ErrNilHeaderIntegrityVerifier signals that a nil header integrity verifier was provided

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

ErrNilHeaderValidator signals that nil header validator has been provided

View Source
var ErrNilHeadersSyncer = errors.New("nil headers syncer")

ErrNilHeadersSyncer signals that a nil headers syncer has been provided

View Source
var ErrNilKeyGen = errors.New("nil key generator")

ErrNilKeyGen signals that a nil key generator has been provided

View Source
var ErrNilLatestStorageDataProvider = errors.New("nil latest storage data provider")

ErrNilLatestStorageDataProvider signals that a nil latest storage data provider was provided

View Source
var ErrNilLocalTxCache = errors.New("nil local tx cache")

ErrNilLocalTxCache signals that nil local tx cache has been provided

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

ErrNilMarshalizer signals that nil marshalizer has been provided

View Source
var ErrNilMessenger = errors.New("nil messenger")

ErrNilMessenger signals that a nil messenger has been provided

View Source
var ErrNilMetaBlock = errors.New("nil metablock")

ErrNilMetaBlock signals that a nil metablock 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 ErrNilMetablockProcessor = errors.New("nil metablock processor")

ErrNilMetablockProcessor signals that a nil metablock processor was provided

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

ErrNilMiniBlockPool signals that a nil mini blocks pool was used

View Source
var ErrNilMiniBlocksSyncer = errors.New("nil miniBlocks syncer")

ErrNilMiniBlocksSyncer signals that a nil miniBlocks syncer has been provided

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 ErrNilNodesConfigProvider = errors.New("nil nodes config provider")

ErrNilNodesConfigProvider signals that an operation has been attempted to or with a nil nodes config provider

View Source
var ErrNilPathManager = errors.New("nil path manager")

ErrNilPathManager signals that a nil path manager has been provided

View Source
var ErrNilProtocolSustainabilityAddress = errors.New("nil protocol sustainability address")

ErrNilProtocolSustainabilityAddress signals that a nil protocol sustainability address was provided

View Source
var ErrNilPubKey = errors.New("nil public key")

ErrNilPubKey signals that a nil public key has been provided

View Source
var ErrNilPubkeyConverter = errors.New("nil pubkey converter")

ErrNilPubkeyConverter signals that nil address converter was provided

View Source
var ErrNilRater = errors.New("nil rater")

ErrNilRater signals that a nil rater has been provided

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

ErrNilRequestHandler signals that nil request handler has been provided

View Source
var ErrNilRewardsHandler = errors.New("rewards handler is nil")

ErrNilRewardsHandler signals that rewards handler is nil

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

ErrNilRoundHandler signals that an operation has been attempted to or with a nil RoundHandler implementation

View Source
var ErrNilScheduledDataSyncerFactory = errors.New("nil scheduled data syncer factory")

ErrNilScheduledDataSyncerFactory signals that a nil scheduled data syncer factory was provided

View Source
var ErrNilScheduledTxsHandler = errors.New("nil scheduled transactions handler")

ErrNilScheduledTxsHandler signals that a nil scheduled transactions 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 ErrNilShuffler = errors.New("nil nodes shuffler provided")

ErrNilShuffler signals that a nil shuffler was provided

View Source
var ErrNilSingleSigner = errors.New("nil single signer")

ErrNilSingleSigner signals that a nil single signer has been provided

View Source
var ErrNilStakingDataProvider = errors.New("nil staking data provider")

ErrNilStakingDataProvider signals that a nil staking data provider was used

View Source
var ErrNilStakingSCAddress = errors.New("nil staking system smart contract address")

ErrNilStakingSCAddress signals that nil staking system smart contract address was provided

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 ErrNilStorageUnitOpener = errors.New("nil storage unit opener")

ErrNilStorageUnitOpener signals that a nil storage unit opener was provided

View Source
var ErrNilSystemVM = errors.New("nil system VM")

ErrNilSystemVM signals that nil system VM has been provided

View Source
var ErrNilSystemVmInstance = errors.New("nil system VM instance")

ErrNilSystemVmInstance signals that a nil system VM instance was provided

View Source
var ErrNilTotalAccumulatedFeesInEpoch = errors.New("total accumulated fees in epoch is nil")

ErrNilTotalAccumulatedFeesInEpoch signals that total accumulated fees in epoch is nil

View Source
var ErrNilTotalDevFeesInEpoch = errors.New("total developer fees in epoch is nil")

ErrNilTotalDevFeesInEpoch signals that total developer fees in epoch is nil

View Source
var ErrNilTransactionsSyncer = errors.New("nil transactions syncer")

ErrNilTransactionsSyncer signals that a nil transactions syncer 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 ErrNilTxSignMarshalizer = errors.New("nil tx sign marshalizer")

ErrNilTxSignMarshalizer signals that nil tx sign marshalizer 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 ErrNotEnoughNumConnectedPeers = errors.New("not enough min num of connected peers from config")

ErrNotEnoughNumConnectedPeers signals that config is invalid for num of connected peers

View Source
var ErrNotEnoughNumOfPeersToConsiderBlockValid = errors.New("not enough num of peers to consider block valid from config")

ErrNotEnoughNumOfPeersToConsiderBlockValid signals that config is invalid for num of peer to consider block valid

View Source
var ErrNotEpochStartBlock = errors.New("not epoch start block")

ErrNotEpochStartBlock signals that block is not of type epoch start

View Source
var ErrOwnerDoesntHaveEligibleNodesInEpoch = errors.New("owner has no eligible nodes in epoch")

ErrOwnerDoesntHaveEligibleNodesInEpoch signals that the owner doesn't have any eligible nodes in epoch

View Source
var ErrProtocolSustainabilityAddressInMetachain = errors.New("protocol sustainability address in metachain")

ErrProtocolSustainabilityAddressInMetachain signals that protocol sustainability address is in metachain which is not allowed

View Source
var ErrResetLastUnJailedFromQueue = errors.New("reset last unjailed from queue failed")

ErrResetLastUnJailedFromQueue signals that reset unjailed from queue failed

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 ErrStakingSCOutputAccountNotFound = errors.New("staking sc output was not found")

ErrStakingSCOutputAccountNotFound signals that staking sc output account was not found

View Source
var ErrSystemDelegationCall = errors.New("delegation system sc call returned with error")

ErrSystemDelegationCall signals that delegation system sc returned with error

View Source
var ErrSystemValidatorSCCall = errors.New("system validator sc call failed")

ErrSystemValidatorSCCall signals that system validator sc call failed

View Source
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

View Source
var ErrUnStakeExecuteError = errors.New("unstake execution error")

ErrUnStakeExecuteError signals that unstaked returned with error

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 AccountsDBSyncer added in v1.0.102

type AccountsDBSyncer interface {
	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 EpochEconomicsDataProvider added in v1.1.15

type EpochEconomicsDataProvider interface {
	SetNumberOfBlocks(nbBlocks uint64)
	SetNumberOfBlocksPerShard(blocksPerShard map[uint32]uint64)
	SetLeadersFees(fees *big.Int)
	SetRewardsToBeDistributed(rewards *big.Int)
	SetRewardsToBeDistributedForBlocks(rewards *big.Int)
	NumberOfBlocks() uint64
	NumberOfBlocksPerShard() map[uint32]uint64
	LeaderFees() *big.Int
	RewardsToBeDistributed() *big.Int
	RewardsToBeDistributedForBlocks() *big.Int
	IsInterfaceNil() bool
}

EpochEconomicsDataProvider provides end of epoch economics data

type EpochNotifier added in v1.1.59

type EpochNotifier interface {
	RegisterNotifyHandler(handler vmcommon.EpochSubscriberHandler)
	CurrentEpoch() uint32
	CheckEpoch(epoch uint32)
	IsInterfaceNil() bool
}

EpochNotifier can notify upon an epoch change and provide the current epoch

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 ImportStartHandler added in v1.0.133

type ImportStartHandler interface {
	ShouldStartImport() bool
	IsAfterExportBeforeImport() bool
	IsInterfaceNil() bool
}

ImportStartHandler can manage the process of starting the import after the hardfork event

type ManualEpochStartNotifier added in v1.2.0

type ManualEpochStartNotifier interface {
	RegisterHandler(handler ActionHandler)
	NewEpoch(epoch uint32)
	CurrentEpoch() uint32
	IsInterfaceNil() bool
}

ManualEpochStartNotifier represents a notifier that can be triggered manually for an epoch change event. Useful in storage resolvers (import-db process)

type NodesConfigProvider added in v1.0.110

type NodesConfigProvider interface {
	ConsensusGroupSize(shardID uint32) int
	IsInterfaceNil() bool
}

NodesConfigProvider will provide the necessary information for start in epoch economics block creation

type Notifier added in v1.0.102

type Notifier interface {
	NotifyAll(hdr data.HeaderHandler)
	NotifyAllPrepare(metaHdr data.HeaderHandler, body data.BodyHandler)
	NotifyEpochChangeConfirmed(epoch uint32)
	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 []data.MiniBlockHeaderHandler, 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)
	IsInterfaceNil() bool
}

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 RewardsCreator added in v1.1.15

type RewardsCreator interface {
	CreateRewardsMiniBlocks(
		metaBlock data.MetaHeaderHandler, validatorsInfo map[uint32][]*state.ValidatorInfo, computedEconomics *block.Economics,
	) (block.MiniBlockSlice, error)
	VerifyRewardsMiniBlocks(
		metaBlock data.MetaHeaderHandler, validatorsInfo map[uint32][]*state.ValidatorInfo, computedEconomics *block.Economics,
	) error
	GetProtocolSustainabilityRewards() *big.Int
	GetLocalTxCache() TransactionCacher
	CreateMarshalizedData(body *block.Body) map[string][][]byte
	GetRewardsTxs(body *block.Body) map[string]data.TransactionHandler
	SaveTxBlockToStorage(metaBlock data.MetaHeaderHandler, body *block.Body)
	DeleteTxsFromStorage(metaBlock data.MetaHeaderHandler, body *block.Body)
	RemoveBlockDataFromPools(metaBlock data.MetaHeaderHandler, body *block.Body)
	IsInterfaceNil() bool
}

RewardsCreator defines the functionality for the metachain to create rewards at end of epoch

type RoundHandler added in v1.2.0

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

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

type StakingDataProvider added in v1.1.15

type StakingDataProvider interface {
	GetTotalStakeEligibleNodes() *big.Int
	GetTotalTopUpStakeEligibleNodes() *big.Int
	GetNodeStakedTopUp(blsKey []byte) (*big.Int, error)
	PrepareStakingDataForRewards(keys map[uint32][][]byte) error
	FillValidatorInfo(blsKey []byte) error
	ComputeUnQualifiedNodes(validatorInfos map[uint32][]*state.ValidatorInfo) ([][]byte, map[string][][]byte, error)
	Clean()
	IsInterfaceNil() bool
}

StakingDataProvider is able to provide staking data from the system smart contracts

type StartOfEpochMetaSyncer added in v1.0.102

type StartOfEpochMetaSyncer interface {
	SyncEpochStartMeta(waitTime time.Duration) (data.MetaHeaderHandler, error)
	IsInterfaceNil() bool
}

StartOfEpochMetaSyncer defines the methods to synchronize epoch start meta block from the network when nothing is known

type TransactionCacher added in v1.1.15

type TransactionCacher interface {
	GetTx(txHash []byte) (data.TransactionHandler, error)
	IsInterfaceNil() bool
}

TransactionCacher defines the methods for the local cacher, info for current round

type TriggerHandler

type TriggerHandler interface {
	Close() error
	ForceEpochStart(round uint64)
	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)
	IsInterfaceNil() bool
}

TriggerHandler defines the functionalities for an start of epoch trigger

type ValidatorInfoCreator added in v1.1.1

type ValidatorInfoCreator interface {
	PeerAccountToValidatorInfo(peerAccount state.PeerAccountHandler) *state.ValidatorInfo
	IsInterfaceNil() bool
}

ValidatorInfoCreator defines the methods to create a validator info

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