Documentation ¶
Index ¶
- Constants
- Variables
- func AddHeaderToBlackList(blackListHandler TimeCacher, hash []byte)
- func CheckIfIndexesAreOutOfBound(indexOfFirstTxToBeProcessed int32, indexOfLastTxToBeProcessed int32, ...) error
- func DisplayProcessTxDetails(message string, accountHandler vmcommon.AccountHandler, ...)
- func GetFinalCrossMiniBlockHashes(header data.HeaderHandler, shardID uint32) map[string]uint32
- func GetHeaderFromStorage(shardId uint32, hash []byte, marshalizer marshal.Marshalizer, ...) (data.HeaderHandler, error)
- func GetHeaderFromStorageWithNonce(nonce uint64, shardId uint32, storageService dataRetriever.StorageService, ...) (data.HeaderHandler, []byte, error)
- func GetHeaderHashFromStorageWithNonce(nonce uint64, storageService dataRetriever.StorageService, ...) ([]byte, error)
- func GetMarshalizedHeaderFromStorage(blockUnit dataRetriever.UnitType, hash []byte, marshalizer marshal.Marshalizer, ...) ([]byte, error)
- func GetMetaHeader(hash []byte, headersCacher dataRetriever.HeadersPool, ...) (*block.MetaBlock, error)
- func GetMetaHeaderFromPool(hash []byte, headersCacher dataRetriever.HeadersPool) (*block.MetaBlock, error)
- func GetMetaHeaderFromPoolWithNonce(nonce uint64, headersCacher dataRetriever.HeadersPool) (*block.MetaBlock, []byte, error)
- func GetMetaHeaderFromStorage(hash []byte, marshalizer marshal.Marshalizer, ...) (*block.MetaBlock, error)
- func GetMetaHeaderFromStorageWithNonce(nonce uint64, storageService dataRetriever.StorageService, ...) (*block.MetaBlock, []byte, error)
- func GetMetaHeaderWithNonce(nonce uint64, headersCacher dataRetriever.HeadersPool, ...) (*block.MetaBlock, []byte, error)
- func GetMiniBlockHeaderWithHash(header data.HeaderHandler, miniBlockHash []byte) data.MiniBlockHeaderHandler
- func GetShardHeader(hash []byte, headersCacher dataRetriever.HeadersPool, ...) (data.ShardHeaderHandler, error)
- func GetShardHeaderFromPool(hash []byte, headersCacher dataRetriever.HeadersPool) (data.ShardHeaderHandler, error)
- func GetShardHeaderFromPoolWithNonce(nonce uint64, shardId uint32, headersCacher dataRetriever.HeadersPool) (data.HeaderHandler, []byte, error)
- func GetShardHeaderFromStorage(hash []byte, marshalizer marshal.Marshalizer, ...) (data.ShardHeaderHandler, error)
- func GetShardHeaderFromStorageWithNonce(nonce uint64, shardId uint32, storageService dataRetriever.StorageService, ...) (data.HeaderHandler, []byte, error)
- func GetShardHeaderWithNonce(nonce uint64, shardId uint32, headersCacher dataRetriever.HeadersPool, ...) (data.HeaderHandler, []byte, error)
- func GetSortedStorageUpdates(account *vmcommon.OutputAccount) []*vmcommon.StorageUpdate
- func GetTransactionHandler(senderShardID uint32, destShardID uint32, txHash []byte, ...) (data.TransactionHandler, error)
- func GetTransactionHandlerFromPool(senderShardID uint32, destShardID uint32, txHash []byte, ...) (data.TransactionHandler, error)
- func GetTransactionHandlerFromStorage(txHash []byte, storageService dataRetriever.StorageService, ...) (data.TransactionHandler, error)
- func GetZeroGasAndFees() scheduled.GasAndFees
- func HaveAdditionalTime() func() bool
- func IsAllowedToSaveUnderKey(key []byte) bool
- func IsBuiltinFuncCallWithParam(txData []byte, function string) bool
- func IsInProperRound(index int64) bool
- func IsScheduledMode(header data.HeaderHandler, body *block.Body, hasher hashing.Hasher, ...) (bool, error)
- func IsSetGuardianCall(txData []byte) bool
- func IsShardCacherIdentifierForSourceMe(cacheID string, shardID uint32) bool
- func ParseShardCacherIdentifier(cacheID string) (uint32, uint32, error)
- func ShardCacherIdentifier(senderShardID uint32, destinationShardID uint32) string
- func SortHeadersByNonce(headers []data.HeaderHandler)
- func SortVMOutputInsideData(vmOutput *vmcommon.VMOutput) []*vmcommon.OutputAccount
- func UnmarshalHeader(shardId uint32, marshalizer marshal.Marshalizer, headerBuffer []byte) (data.HeaderHandler, error)
- func UnmarshalMetaHeader(marshalizer marshal.Marshalizer, headerBuffer []byte) (data.MetaHeaderHandler, error)
- func UnmarshalShardHeader(marshalizer marshal.Marshalizer, hdrBuff []byte) (data.ShardHeaderHandler, error)
- func UnmarshalShardHeaderV1(marshalizer marshal.Marshalizer, hdrBuff []byte) (data.ShardHeaderHandler, error)
- func UnmarshalShardHeaderV2(marshalizer marshal.Marshalizer, hdrBuff []byte) (data.ShardHeaderHandler, error)
- type AccountsDBSyncer
- type AntifloodDebugger
- type ArgumentsParser
- type BaseOperationCost
- type BlockChainHookHandler
- type BlockChainHookWithAccountsAdapter
- type BlockHeaderState
- type BlockProcessor
- type BlockSizeThrottler
- type BlockTracker
- type BootStorer
- type Bootstrapper
- type BootstrapperFromStorage
- type BuiltInCost
- type CallArgumentsParser
- type CheckedChunkResult
- type Checker
- type CoreComponentsHolder
- type CryptoComponentsHolder
- type CurrentNetworkEpochProviderHandler
- type DataMarshalizer
- type DataPacker
- type Debugger
- type DeployArgumentsParser
- type DoubleTransactionDetector
- type ESDTPauseHandler
- type ESDTRoleHandler
- type EconomicsDataHandler
- type EnableRoundsHandler
- type EndOfEpochEconomics
- type EpochBootstrapper
- type EpochHandler
- type EpochNotifier
- type EpochStartDataCreator
- type EpochStartEventNotifier
- type EpochStartSystemSCProcessor
- type EpochStartTriggerHandler
- type EpochStartValidatorInfoCreator
- type FallbackHeaderValidator
- type FeeHandler
- type FloodPreventer
- type ForkDetector
- type ForkInfo
- type GasCost
- type GasHandler
- type GuardedAccountHandler
- type GuardianChecker
- type HashAccesser
- type HdrValidatorHandler
- type HeaderConstructionValidator
- type HeaderIntegrityVerifier
- type InterceptedChunksProcessor
- type InterceptedData
- type InterceptedDataFactory
- type InterceptedDebugger
- type InterceptedHeaderSigVerifier
- type InterceptedSignedTransactionHandler
- type InterceptedTransactionHandler
- type Interceptor
- type InterceptorProcessor
- type InterceptorThrottler
- type InterceptorsContainer
- type InterceptorsContainerFactory
- type IntermediateProcessorContainer
- type IntermediateProcessorsContainerFactory
- type IntermediateTransactionHandler
- type MiniBlockProvider
- type NetworkConnectionWatcher
- type NetworkShardingCollector
- type NodesCoordinator
- type NumConnectedPeersProvider
- type P2PAntifloodHandler
- type PayableHandler
- type PeerAuthenticationPayloadValidator
- type PeerBlackListCacher
- type PeerChangesHandler
- type PeerShardMapper
- type PeerValidatorMapper
- type PendingMiniBlocksHandler
- type PoolsCleaner
- type PreProcessor
- type PreProcessorExecutionInfoHandler
- type PreProcessorsContainer
- type PreProcessorsContainerFactory
- type PreferredPeersHolderHandler
- type ProcessedMiniBlocksTracker
- type RatingChanceHandler
- type RatingsInfoHandler
- type RatingsStepHandler
- type RequestBlockBodyHandler
- type RequestHandler
- type RequiredDataPool
- type RewardTransactionPreProcessor
- type RewardTransactionProcessor
- type RewardsCreator
- type RewardsHandler
- type RoundHandler
- type RoundNotifier
- type RoundTimeDurationHandler
- type SCQuery
- type SCQueryService
- type ScheduledBlockProcessor
- type ScheduledInfo
- type ScheduledTxsExecutionHandler
- type SelectionChance
- type ShardedCacheSearchMethod
- type ShardedPool
- type SigVerifier
- type SignaturesHandler
- type SignedDataValidator
- type SmartContractProcessor
- type SmartContractProcessorFacade
- type SmartContractProcessorFull
- type SmartContractResultProcessor
- type SmartContractToProtocolHandler
- type StatusCoreComponentsHolder
- type StorageArgumentsParser
- type TimeCacher
- type TopicFloodPreventer
- type TopicHandler
- type TransactionCoordinator
- type TransactionFeeHandler
- type TransactionLogProcessor
- type TransactionLogProcessorDatabase
- type TransactionProcessor
- type TransactionType
- type TransactionVerifier
- type TxGasHandler
- type TxTypeHandler
- type TxValidator
- type TxValidatorHandler
- type TxVersionCheckerHandler
- type TxsSenderHandler
- type ValidatorInfoSyncer
- type ValidatorStatisticsProcessor
- type ValidatorsProvider
- type ValidityAttester
- type VirtualMachinesContainer
- type VirtualMachinesContainerFactory
- type WhiteListHandler
Constants ¶
const BlockFinality = 1
BlockFinality defines the block finality which is used in meta-chain/shards (the real finality in shards is given by meta-chain)
const EpochChangeGracePeriod = 1
EpochChangeGracePeriod defines the allowed round numbers till the shard has to change the epoch
const MaxGasBandwidthPerBatchPerSender = 5000000
MaxGasBandwidthPerBatchPerSender defines the maximum gas bandwidth that should be selected for a sender per batch from the cache
const MaxGasFeeHigherFactorAccepted = 10
MaxGasFeeHigherFactorAccepted defines the maximum higher factor of gas fee put inside a transaction compared with the real gas used, after which the transaction will be considered an attack and all the gas will be consumed and nothing will be refunded to the sender
const MaxHeaderRequestsAllowed = 20
MaxHeaderRequestsAllowed defines the maximum number of missing cross-shard headers (gaps) which could be requested in one round, when node processes a received block
const MaxHeadersToRequestInAdvance = 20
MaxHeadersToRequestInAdvance defines the maximum number of headers which will be requested in advance, if they are missing
const MaxHeadersToWhitelistInAdvance = 300
MaxHeadersToWhitelistInAdvance defines the maximum number of headers whose miniblocks will be whitelisted in advance
const MaxMetaHeadersAllowedInOneShardBlock = 50
MaxMetaHeadersAllowedInOneShardBlock defines the maximum number of meta headers allowed to be included in one shard block
const MaxMetaNoncesBehind = 15
MaxMetaNoncesBehind defines the maximum difference between the current meta block nonce and the processed meta block nonce before a shard is considered stuck
const MaxMetaNoncesBehindForGlobalStuck = 30
MaxMetaNoncesBehindForGlobalStuck defines the maximum difference between the current meta block nonce and the processed meta block nonce for any shard, where the chain is considered stuck and enters recovery
const MaxNumOfTxsToSelect = 30000
MaxNumOfTxsToSelect defines the maximum number of transactions that should be selected from the cache
const MaxRoundsWithoutCommittedBlock = 10
MaxRoundsWithoutCommittedBlock defines the maximum rounds to wait for a new block to be committed, before a special action to be applied
const MaxRoundsWithoutNewBlockReceived = 10
MaxRoundsWithoutNewBlockReceived defines the maximum number of rounds to wait for a new block to be received, before a special action to be applied
const MaxShardHeadersAllowedInOneMetaBlock = 60
MaxShardHeadersAllowedInOneMetaBlock defines the maximum number of shard headers allowed to be included in one meta block
const MaxShardNoncesBehind = 15
MaxShardNoncesBehind defines the maximum difference between the current shard block nonce and the last notarized shard block nonce by meta, before meta is considered stuck
const MaxSyncWithErrorsAllowed = 10
MaxSyncWithErrorsAllowed defines the maximum allowed number of sync with errors, before a special action to be applied
const MetaBlockValidity = 1
MetaBlockValidity defines the block validity which is when checking a metablock
const MinForkRound = uint64(0)
MinForkRound represents the minimum fork round set by a notarized header received
const MinShardHeadersFromSameShardInOneMetaBlock = 10
MinShardHeadersFromSameShardInOneMetaBlock defines the minimum number of shard headers from the same shard, which would be included in one meta block if they are available
const NonceDifferenceWhenSynced = 0
NonceDifferenceWhenSynced defines the difference between probable highest nonce seen from network and node's last committed block nonce, after which, node is considered himself not synced
const NumTxPerSenderBatchForFillingMiniblock = 10
NumTxPerSenderBatchForFillingMiniblock defines the number of transactions to be drawn from the transactions pool, for a specific sender, in a single pass. Drawing transactions for a miniblock happens in multiple passes, until "MaxItemsInBlock" are drawn.
const RoundModulusTrigger = 5
RoundModulusTrigger defines a round modulus on which a trigger for an action will be released
const RoundModulusTriggerWhenSyncIsStuck = 20
RoundModulusTriggerWhenSyncIsStuck defines a round modulus on which a trigger for an action when sync is stuck will be released
const VMStoragePrefix = "VM@"
Variables ¶
var ErrAccountHasNoActiveGuardian = errors.New("account has no active guardian")
ErrAccountHasNoActiveGuardian signals that the account has no active guardian
var ErrAccountHasNoGuardianSet = errors.New("account has no guardian set")
ErrAccountHasNoGuardianSet signals that the account has no guardians set
var ErrAccountHasNoPendingGuardian = errors.New("account has no pending guardian")
ErrAccountHasNoPendingGuardian signals that the account has no pending guardian
var ErrAccountNotFound = errors.New("account not found")
ErrAccountNotFound signals that the account was not found for the provided address
var ErrAccountNotPayable = errors.New("sending value to non payable contract")
ErrAccountNotPayable will be sent when trying to send money to a non-payable account
var ErrAccountStateDirty = errors.New("accountState was dirty before starting to change")
ErrAccountStateDirty signals that the accounts were modified before starting the current modification
var ErrAccumulatedFeesDoNotMatch = errors.New("accumulated fees do not match")
ErrAccumulatedFeesDoNotMatch signals that accumulated fees do not match
var ErrAccumulatedFeesInEpochDoNotMatch = errors.New("accumulated fees in epoch do not match")
ErrAccumulatedFeesInEpochDoNotMatch signals that accumulated fees in epoch do not match
var ErrAsyncCallsDisabled = errors.New("async calls disabled")
ErrAsyncCallsDisabled signals that async calls are disabled
var ErrBlockBodyHashMismatch = errors.New("block bodies does not match")
ErrBlockBodyHashMismatch signals that block body hashes does not match
var ErrBlockHashDoesNotMatch = errors.New("block hash does not match")
ErrBlockHashDoesNotMatch signals that header hash does not match with the previous one
var ErrBlockProposerSignatureMissing = errors.New("block proposer signature is missing")
ErrBlockProposerSignatureMissing signals that block proposer signature is missing from the block aggregated sig
var ErrBuiltInFunctionsAreDisabled = errors.New("built in functions are disabled")
ErrBuiltInFunctionsAreDisabled signals that built-in functions are disabled
var ErrBuiltinFunctionMismatch = errors.New("builtin function mismatch")
ErrBuiltinFunctionMismatch signals that a builtin function mismatch was detected
var ErrBuiltinFunctionNotExecutable = errors.New("builtin function not executable")
ErrBuiltinFunctionNotExecutable signals that a builtin function is not executable
var ErrCannotReplaceGuardedAccountPendingGuardian = errors.New("cannot replace pending guardian on guarded account")
ErrCannotReplaceGuardedAccountPendingGuardian signals that a pending guardian on a guarded account cannot be replaced
var ErrConsecutiveMissedBlocksPenaltyLowerThanOne = errors.New("consecutive missed blocks penalty lower than 1")
ErrConsecutiveMissedBlocksPenaltyLowerThanOne signals that the ConsecutiveMissedBlocksPenalty is lower than 1
var ErrContainerKeyAlreadyExists = errors.New("provided key already exists in container")
ErrContainerKeyAlreadyExists signals that an element was already set in the container's map
var ErrCrossShardMBWithoutConfirmationFromMeta = errors.New("cross shard miniblock with destination current shard is not confirmed by metachain")
ErrCrossShardMBWithoutConfirmationFromMeta signals that miniblock was not yet notarized by metachain
var ErrDecreaseRatingsStepMoreThanMinusOne = errors.New("decrease rating step has a value greater than -1")
ErrDecreaseRatingsStepMoreThanMinusOne signals that the decrease rating step has a vale greater than -1
var ErrDevFeesInEpochDoNotMatch = errors.New("developer fees in epoch do not match")
ErrDevFeesInEpochDoNotMatch signals that developer fees in epoch do not match
var ErrDeveloperFeesDoNotMatch = errors.New("developer fees do not match")
ErrDeveloperFeesDoNotMatch signals that developer fees do not match
var ErrDuplicateThreshold = errors.New("two thresholds are the same")
ErrDuplicateThreshold signals that two thresholds are the same
var ErrEmptyConsensusGroup = errors.New("consensusGroup is empty")
ErrEmptyConsensusGroup is raised when an operation is attempted with an empty consensus group
var ErrEmptyEpochRewardsConfig = errors.New("the epoch rewards config is empty")
ErrEmptyEpochRewardsConfig signals that the epoch rewards config is empty
var ErrEmptyFloodPreventerList = errors.New("empty flood preventer provided")
ErrEmptyFloodPreventerList signals that an empty flood preventer list has been provided
var ErrEmptyFunctionName = errors.New("empty function name")
ErrEmptyFunctionName signals that an empty function name has been provided
var ErrEmptyGasLimitSettings = errors.New("the gas limit settings is empty")
ErrEmptyGasLimitSettings signals that the gas limit settings is empty
var ErrEmptyPeerID = errors.New("empty peer ID")
ErrEmptyPeerID signals that an empty peer ID has been provided
var ErrEmptyTopic = errors.New("empty topic")
ErrEmptyTopic signals that an empty topic has been provided
var ErrEmptyYearSettings = errors.New("the year settings is empty")
ErrEmptyYearSettings signals that the year settings is empty
var ErrEpochDoesNotMatch = errors.New("epoch does not match")
ErrEpochDoesNotMatch signals that epoch does not match between headers
var ErrEpochStartDataDoesNotMatch = errors.New("epoch start data does not match")
ErrEpochStartDataDoesNotMatch signals that EpochStartData is not the same as the leader created
var ErrFailedTransaction = errors.New("failed transaction, gas consumed")
ErrFailedTransaction signals that transaction is of type failed.
var ErrGasPriceTooHigh = errors.New("gas price is too high for the transaction")
ErrGasPriceTooHigh signals a too high gas price
var ErrGettingShardDataFromEpochStartData = errors.New("could not find shard data from previous epoch start metablock")
ErrGettingShardDataFromEpochStartData signals that could not get shard data from previous epoch start block
var ErrGuardedTransactionNotExpected = errors.New("guarded transaction not expected")
ErrGuardedTransactionNotExpected signals that a guarded transaction was received for processing but the account is not guarded
var ErrGuardianAddressNotExpected = errors.New("guardian address not expected")
ErrGuardianAddressNotExpected signals that the guardian address is not expected
var ErrGuardianSignatureNotExpected = errors.New("guardian signature not expected")
ErrGuardianSignatureNotExpected signals that the guardian signature is not expected
var ErrHeaderBodyMismatch = errors.New("body cannot be validated from header data")
ErrHeaderBodyMismatch signals that the header does not attest all data from the block
var ErrHeaderIsBlackListed = errors.New("header is black listed")
ErrHeaderIsBlackListed signals that the header provided is black listed
var ErrHeaderNotFinal = errors.New("header in metablock is not final")
ErrHeaderNotFinal signals that header is not final, and it should be
var ErrHeaderShardDataMismatch = errors.New("shard header does not match shard info")
ErrHeaderShardDataMismatch signals that shard header does not match created shard info
var ErrHigherNonceInBlock = errors.New("higher nonce in block")
ErrHigherNonceInBlock signals that a block with higher nonce than permitted has been provided
var ErrHigherNonceInTransaction = errors.New("higher nonce in transaction")
ErrHigherNonceInTransaction signals the nonce in transaction is higher than the account's nonce
var ErrHigherRoundInBlock = errors.New("higher round in block")
ErrHigherRoundInBlock signals that a block with higher round than permitted has been provided
var ErrHoursToMaxRatingFromStartRatingZero = errors.New("hours to reach max rating is zero")
ErrHoursToMaxRatingFromStartRatingZero signals that the number of hours to reach max rating step is zero
var ErrIncompatibleReference = errors.New("incompatible reference when processing batch")
ErrIncompatibleReference signals that an incompatible reference was provided when processing a batch
var ErrIncreaseStepLowerThanOne = errors.New("increase step is lower than one")
ErrIncreaseStepLowerThanOne signals that an increase step lower than one has been provided
var ErrIndexDoesNotMatchWithFullyExecutedMiniBlock = errors.New("index does not match with a fully executed mini block")
ErrIndexDoesNotMatchWithFullyExecutedMiniBlock signals that the given index does not match with a fully executed mini block
var ErrIndexDoesNotMatchWithPartialExecutedMiniBlock = errors.New("index does not match with a partial executed mini block")
ErrIndexDoesNotMatchWithPartialExecutedMiniBlock signals that the given index does not match with a partial executed mini block
var ErrIndexIsOutOfBound = errors.New("index is out of bound")
ErrIndexIsOutOfBound signals that the given index is out of bound
var ErrInsufficientFee = errors.New("insufficient balance for fees")
ErrInsufficientFee signals that the current balance doesn't have the required transaction fee
var ErrInsufficientFunds = errors.New("insufficient funds")
ErrInsufficientFunds signals the funds are insufficient for the move balance operation but the transaction fee is covered by the current balance
var ErrInsufficientGasLimitInTx = errors.New("insufficient gas limit in tx")
ErrInsufficientGasLimitInTx signals that a lower gas limit than required was provided
var ErrInsufficientGasPriceInTx = errors.New("insufficient gas price in tx")
ErrInsufficientGasPriceInTx signals that a lower gas price than required was provided
var ErrInterceptedDataNotForCurrentShard = errors.New("intercepted data not for current shard")
ErrInterceptedDataNotForCurrentShard signals that intercepted data is not for current shard
var ErrInvalidArguments = errors.New("invalid arguments to process built-in function")
ErrInvalidArguments signals that invalid arguments were given to process built-in function
var ErrInvalidBadPeerThreshold = errors.New("invalid bad peer threshold")
ErrInvalidBadPeerThreshold signals that an invalid bad peer threshold has been provided
var ErrInvalidBlockRequestOldEpoch = errors.New("invalid block request from old epoch")
ErrInvalidBlockRequestOldEpoch signals that invalid block was requested from old epoch
var ErrInvalidBody = errors.New("invalid body")
ErrInvalidBody signals that an invalid body has been provided
var ErrInvalidCacheRefreshIntervalInSec = errors.New("invalid cacheRefreshIntervalInSec")
ErrInvalidCacheRefreshIntervalInSec signals that the cacheRefreshIntervalInSec is invalid - zero or less
var ErrInvalidChainID = errors.New("invalid chain ID")
ErrInvalidChainID signals that an invalid chain ID was provided
var ErrInvalidContainerKey = errors.New("element does not exist in container")
ErrInvalidContainerKey signals that an element does not exist in the container's map
var ErrInvalidDecayCoefficient = errors.New("decay coefficient is invalid")
ErrInvalidDecayCoefficient signals that the provided decay coefficient is invalid
var ErrInvalidDecayIntervalInSeconds = errors.New("invalid decay interval in seconds")
ErrInvalidDecayIntervalInSeconds signals that an invalid interval in seconds was provided
var ErrInvalidEpochStartMetaBlockConsensusPercentage = errors.New("invalid epoch start meta block consensus percentage")
ErrInvalidEpochStartMetaBlockConsensusPercentage signals that a small epoch start meta block consensus percentage has been provided
var ErrInvalidExpiryTimespan = errors.New("invalid expiry timespan")
ErrInvalidExpiryTimespan signals that an invalid expiry timespan was provided
var ErrInvalidExtraGasLimitGuardedTx = errors.New("invalid extra gas limit for guarded transactions")
ErrInvalidExtraGasLimitGuardedTx signals that an invalid gas limit has been provided in the config file
var ErrInvalidGasModifier = errors.New("invalid gas modifier")
ErrInvalidGasModifier signals that provided gas modifier is invalid
var ErrInvalidGasPerDataByte = errors.New("invalid gas per data byte")
ErrInvalidGasPerDataByte signals that an invalid gas per data byte has been read from config file
var ErrInvalidGenesisTotalSupply = errors.New("invalid genesis total supply")
ErrInvalidGenesisTotalSupply signals that invalid genesis total supply was provided
var ErrInvalidInflationPercentages = errors.New("invalid inflation percentages")
ErrInvalidInflationPercentages signals that inflation percentages are not correct
var ErrInvalidMaxGasLimitPerBlock = errors.New("invalid max gas limit per block")
ErrInvalidMaxGasLimitPerBlock signals that an invalid max gas limit per block has been read from config file
var ErrInvalidMaxGasLimitPerMetaBlock = errors.New("invalid max gas limit per meta block")
ErrInvalidMaxGasLimitPerMetaBlock signals that an invalid max gas limit per meta block has been read from config file
var ErrInvalidMaxGasLimitPerMetaMiniBlock = errors.New("invalid max gas limit per meta mini block")
ErrInvalidMaxGasLimitPerMetaMiniBlock signals that an invalid max gas limit per meta mini block has been read from config file
var ErrInvalidMaxGasLimitPerMiniBlock = errors.New("invalid max gas limit per mini block")
ErrInvalidMaxGasLimitPerMiniBlock signals that an invalid max gas limit per mini block has been read from config file
var ErrInvalidMaxGasLimitPerTx = errors.New("invalid max gas limit per tx")
ErrInvalidMaxGasLimitPerTx signals that an invalid max gas limit per tx has been read from config file
var ErrInvalidMaxGasPriceSetGuardian = errors.New("invalid maximum gas price for set guardian")
ErrInvalidMaxGasPriceSetGuardian signals that an invalid maximum gas price has been provided in the config file
var ErrInvalidMaxScore = errors.New("invalid maximum score")
ErrInvalidMaxScore signals that an invalid maximum score was provided
var ErrInvalidMetaHeader = errors.New("invalid header provided, expected MetaBlock")
ErrInvalidMetaHeader signals that a wrong implementation of HeaderHandler was provided
var ErrInvalidMetaTransaction = errors.New("meta transaction is invalid")
ErrInvalidMetaTransaction signals that meta transaction is invalid
var ErrInvalidMinScore = errors.New("invalid minimum score")
ErrInvalidMinScore signals that an invalid minimum score was provided
var ErrInvalidMiniBlockType = errors.New("invalid miniblock type")
ErrInvalidMiniBlockType signals that an invalid miniblock type has been provided
var ErrInvalidMinimumGasLimitForTx = errors.New("invalid minimum gas limit for transactions")
ErrInvalidMinimumGasLimitForTx signals that an invalid minimum gas limit for transactions has been read from config file
var ErrInvalidMinimumGasPrice = errors.New("invalid minimum gas price")
ErrInvalidMinimumGasPrice signals that an invalid gas price has been read from config file
var ErrInvalidNonceRequest = errors.New("invalid nonce request")
ErrInvalidNonceRequest signals that invalid nonce was requested
var ErrInvalidPeerAccount = errors.New("invalid peer account")
ErrInvalidPeerAccount signals that a peer account is invalid
var ErrInvalidPeerSubType = errors.New("invalid peer subtype")
ErrInvalidPeerSubType signals that an invalid peer subtype was provided
var ErrInvalidProcessWaitTime = errors.New("invalid process wait time")
ErrInvalidProcessWaitTime signals that an invalid process wait time was provided
var ErrInvalidRcvAddr = errors.New("invalid receiver address")
ErrInvalidRcvAddr signals that an invalid receiver address was provided
var ErrInvalidRewardsPercentages = errors.New("invalid rewards percentages")
ErrInvalidRewardsPercentages signals that rewards percentages are not correct
var ErrInvalidRewardsTopUpGradientPoint = errors.New("rewards top up gradient point is invalid")
ErrInvalidRewardsTopUpGradientPoint signals that the top-up gradient point is invalid
var ErrInvalidSetGuardianEpochsDelay = errors.New("incorrect setting for set guardian epochs delay")
ErrInvalidSetGuardianEpochsDelay signals an invalid configuration for the epochs delay
var ErrInvalidShardCacherIdentifier = errors.New("invalid identifier for shard cacher")
ErrInvalidShardCacherIdentifier signals an invalid identifier
var ErrInvalidShardId = errors.New("invalid shard id")
ErrInvalidShardId signals that the shard id is invalid
var ErrInvalidSndAddr = errors.New("invalid sender address")
ErrInvalidSndAddr signals that an invalid sender address was provided
var ErrInvalidTransactionVersion = errors.New("invalid transaction version")
ErrInvalidTransactionVersion signals that an invalid transaction version has been provided
var ErrInvalidTxInPool = errors.New("invalid transaction in the transactions pool")
ErrInvalidTxInPool signals an invalid transaction in the transactions pool
var ErrInvalidUnitValue = errors.New("invalid unit value")
ErrInvalidUnitValue signals that an invalid unit value was provided
var ErrInvalidUserNameLength = errors.New("invalid user name length")
ErrInvalidUserNameLength signals that provided username length is invalid
var ErrInvalidVMInputGasComputation = errors.New("invalid vm input gas computation")
ErrInvalidVMInputGasComputation signals that invalid vm input gas computation was provided
var ErrInvalidValue = errors.New("invalid value provided")
ErrInvalidValue signals that an invalid value was provided
var ErrLenMismatch = errors.New("lengths mismatch")
ErrLenMismatch signals that 2 or more slices have different lengths
var ErrLogNotFound = errors.New("no logs for queried transaction")
ErrLogNotFound is the error returned when a transaction has no logs
var ErrLowerNonceInBlock = errors.New("lower nonce in block")
ErrLowerNonceInBlock signals that a block with lower nonce than permitted has been provided
var ErrLowerNonceInTransaction = errors.New("lower nonce in transaction")
ErrLowerNonceInTransaction signals the nonce in transaction is lower than the account's nonce
var ErrLowerRoundInBlock = errors.New("header round is lower than last committed")
ErrLowerRoundInBlock signals that a header round is too low for processing it
var ErrMarshalWithoutSuccess = errors.New("marshal without success")
ErrMarshalWithoutSuccess signals that marshal some data was not done with success
var ErrMaxAccumulatedFeesExceeded = errors.New("max accumulated fees has been exceeded")
ErrMaxAccumulatedFeesExceeded signals that max accumulated fees has been exceeded
var ErrMaxBlockSizeReached = errors.New("max block size has been reached")
ErrMaxBlockSizeReached signals that max block size has been reached
var ErrMaxCallsReached = errors.New("max calls reached")
ErrMaxCallsReached signals that the allowed max number of calls was reached
var ErrMaxDeveloperFeesExceeded = errors.New("max developer fees has been exceeded")
ErrMaxDeveloperFeesExceeded signals that max developer fees has been exceeded
var ErrMaxGasLimitPerBlockInSelfShardIsReached = errors.New("max gas limit per block in self shard is reached")
ErrMaxGasLimitPerBlockInSelfShardIsReached signals that max gas limit per block in self shard has been reached
var ErrMaxGasLimitPerMiniBlockInReceiverShardIsReached = errors.New("max gas limit per mini block in receiver shard is reached")
ErrMaxGasLimitPerMiniBlockInReceiverShardIsReached signals that max gas limit per mini block in receiver shard has been reached
var ErrMaxGasLimitPerOneTxInReceiverShardIsReached = errors.New("max gas limit per one transaction in receiver shard is reached")
ErrMaxGasLimitPerOneTxInReceiverShardIsReached signals that max gas limit per one transaction in receiver shard has been reached
var ErrMaxGasLimitUsedForDestMeTxsIsReached = errors.New("max gas limit used for dest me txs is reached")
ErrMaxGasLimitUsedForDestMeTxsIsReached signals that max gas limit used for dest me txs has been reached
var ErrMaxRatingIsSmallerThanMinRating = errors.New("max rating is smaller than min rating")
ErrMaxRatingIsSmallerThanMinRating signals that the max rating is smaller than the min rating value
var ErrMaxRatingZero = errors.New("max rating is zero")
ErrMaxRatingZero signals that maxrating with a value of zero has been provided
var ErrMessageExpired = errors.New("message expired")
ErrMessageExpired signals that a received message is expired
var ErrMetaHeaderEpochOutOfRange = errors.New("epoch out of range for meta block header")
ErrMetaHeaderEpochOutOfRange signals that the given header is out of accepted range
var ErrMinRatingSmallerThanOne = errors.New("min rating is smaller than one")
ErrMinRatingSmallerThanOne signals that the min rating is smaller than the min value of 1
var ErrMiniBlockHashMismatch = errors.New("miniblocks does not match")
ErrMiniBlockHashMismatch signals that miniblock hashes does not match
var ErrMiniBlockNumMissMatch = errors.New("num miniblocks does not match")
ErrMiniBlockNumMissMatch signals that number of miniblocks does not match
var ErrMiniBlocksInWrongOrder = errors.New("miniblocks in wrong order, should have been only from me")
ErrMiniBlocksInWrongOrder signals the miniblocks are in wrong order
var ErrMissingBody = errors.New("missing body")
ErrMissingBody signals that body of the block is missing
var ErrMissingHashForHeaderNonce = errors.New("missing hash for header nonce")
ErrMissingHashForHeaderNonce signals that hash of the block is missing
var ErrMissingHeader = errors.New("missing header")
ErrMissingHeader signals that header of the block is missing
var ErrMissingMiniBlock = errors.New("missing mini block")
ErrMissingMiniBlock signals that mini block is missing
var ErrMissingMiniBlockHeader = errors.New("missing mini block header")
ErrMissingMiniBlockHeader signals that mini block header is missing
var ErrMissingPreProcessor = errors.New("pre processor is missing")
ErrMissingPreProcessor signals that required pre-processor is missing
var ErrMissingTransaction = errors.New("missing transaction")
ErrMissingTransaction signals that one transaction is missing
var ErrMoreGasConsumedThanProvided = errors.New("more gas used than provided")
ErrMoreGasConsumedThanProvided signals that VM used more gas than provided
var ErrMoreGasThanGasLimitPerBlock = errors.New("more gas was provided than gas limit per block")
ErrMoreGasThanGasLimitPerBlock signals that more gas was provided than gas limit per block
var ErrMoreGasThanGasLimitPerMiniBlockForSafeCrossShard = errors.New("more gas was provided than gas limit per mini block for safe cross shard")
ErrMoreGasThanGasLimitPerMiniBlockForSafeCrossShard signals that more gas was provided than gas limit per mini block for safe cross shard
var ErrNegativeBalanceDeltaOnCrossShardAccount = errors.New("negative balance delta on cross shard account")
ErrNegativeBalanceDeltaOnCrossShardAccount signals that negative balance delta was given on cross shard account
var ErrNegativeValue = errors.New("negative value")
ErrNegativeValue signals that a negative value has been detected, and it is not allowed
var ErrNilAccountTxsPerShard = errors.New("nil account transactions per shard mapping")
ErrNilAccountTxsPerShard signals a nil mapping for account transactions to shard
var ErrNilAccountsAdapter = errors.New("nil AccountsAdapter")
ErrNilAccountsAdapter defines the error when trying to use a nil AccountsAddapter
var ErrNilAccountsDBSyncer = errors.New("nil accounts DB syncer")
ErrNilAccountsDBSyncer signals that a nil accounts db syncer has been provided
var ErrNilAdditionalData = errors.New("nil additional data")
ErrNilAdditionalData signals that additional data is nil
var ErrNilAddressContainer = errors.New("nil AddressContainer")
ErrNilAddressContainer signals that an operation has been attempted to or with a nil AddressContainer implementation
var ErrNilAllowExternalQueriesChan = errors.New("nil channel for signaling the allowance of external queries")
ErrNilAllowExternalQueriesChan signals that a nil channel for signaling the allowance of external queries provided is nil
var ErrNilAntifloodHandler = errors.New("nil antiflood handler")
ErrNilAntifloodHandler signals that a nil antiflood handler has been provided
var ErrNilAppStatusHandler = errors.New("nil AppStatusHandler")
ErrNilAppStatusHandler defines the error for setting a nil AppStatusHandler
var ErrNilArgsBuiltInFunctionsConstHandler = errors.New("nil arguments for built in functions cost handler")
ErrNilArgsBuiltInFunctionsConstHandler signals that a nil arguments struct for built-in functions cost handler has been provided
var ErrNilArgumentParser = errors.New("argument parser is nil")
ErrNilArgumentParser signals that the argument parser is nil
var ErrNilArgumentStruct = errors.New("nil argument struct")
ErrNilArgumentStruct signals that a function has received nil instead of an instantiated Arg... structure
var ErrNilBadTxHandler = errors.New("nil bad tx handler")
ErrNilBadTxHandler signals that bad tx handler is nil
var ErrNilBalanceComputationHandler = errors.New("nil balance computation handler")
ErrNilBalanceComputationHandler signals that a nil balance computation handler has been provided
var ErrNilBlackListCacher = errors.New("nil black list cacher")
ErrNilBlackListCacher signals that a nil black list cacher was provided
var ErrNilBlackListedPkCache = errors.New("nil black listed public key cache")
ErrNilBlackListedPkCache signals that a nil black listed public key cache has been provided
var ErrNilBlockBody = errors.New("nil block body")
ErrNilBlockBody signals that an operation has been attempted to or with a nil block body
var ErrNilBlockChain = errors.New("nil block chain")
ErrNilBlockChain signals that an operation has been attempted to or with a nil blockchain
var ErrNilBlockChainHook = errors.New("nil blockchain hook")
ErrNilBlockChainHook signals that nil blockchain hook has been provided
var ErrNilBlockHeader = errors.New("nil block header")
ErrNilBlockHeader signals that an operation has been attempted to or with a nil block header
var ErrNilBlockProcessingCutoffHandler = errors.New("nil block processing cutoff handler")
ErrNilBlockProcessingCutoffHandler signals that a nil block processing cutoff handler has been provided
var ErrNilBlockProcessor = errors.New("nil block processor")
ErrNilBlockProcessor signals that an operation has been attempted to or with a nil BlockProcessor implementation
var ErrNilBlockSizeComputationHandler = errors.New("nil block size computation handler")
ErrNilBlockSizeComputationHandler signals that a nil block size computation handler has been provided
var ErrNilBlockSizeThrottler = errors.New("block size throttler is nil")
ErrNilBlockSizeThrottler signals that block size throttler si nil
var ErrNilBlockTracker = errors.New("nil block tracker")
ErrNilBlockTracker signals that a nil block tracker was provided
var ErrNilBootStorer = errors.New("nil boot storer")
ErrNilBootStorer signals that the provided boot storer is bil
var ErrNilBootstrapComponentsHolder = errors.New("nil bootstrap components holder")
ErrNilBootstrapComponentsHolder signals that a nil bootstrap components holder was provided
var ErrNilBootstrapper = errors.New("nil bootstrapper")
ErrNilBootstrapper signals that a nil bootstraper has been provided
var ErrNilBuffer = errors.New("provided byte buffer is nil")
ErrNilBuffer signals that a provided byte buffer is nil
var ErrNilBuiltInFunction = errors.New("built in function is nil")
ErrNilBuiltInFunction signals that built-in function is nil
var ErrNilBuiltInFunctionsCostHandler = errors.New("nil built in functions cost handler")
ErrNilBuiltInFunctionsCostHandler signals that a nil built-in functions cost handler has been provided
var ErrNilCacher = errors.New("nil cacher")
ErrNilCacher signals that a nil cache has been provided
var ErrNilChunksProcessor = errors.New("nil chunks processor")
ErrNilChunksProcessor signals that a nil chunks processor has been provided
var ErrNilContainerElement = errors.New("element cannot be nil")
ErrNilContainerElement signals when trying to add a nil element in the container
var ErrNilCoreComponentsHolder = errors.New("nil core components holder")
ErrNilCoreComponentsHolder signals that a nil core components holder was provided
var ErrNilCrawlerAllowedAddress = errors.New("nil crawler allowed address")
ErrNilCrawlerAllowedAddress signals that no crawler allowed address was found
var ErrNilCryptoComponentsHolder = errors.New("nil crypto components holder")
ErrNilCryptoComponentsHolder signals that a nil crypto components holder was provided
var ErrNilCurrentNetworkEpochProvider = errors.New("nil current network epoch provider")
ErrNilCurrentNetworkEpochProvider signals that a nil CurrentNetworkEpochProvider handler has been provided
var ErrNilDataComponentsHolder = errors.New("nil data components holder")
ErrNilDataComponentsHolder signals that a nil data components holder was provided
var ErrNilDataPoolHolder = errors.New("nil data pool holder")
ErrNilDataPoolHolder signals that the data pool holder is nil
var ErrNilDataToProcess = errors.New("nil data to process")
ErrNilDataToProcess signals that nil data was provided
var ErrNilDebugger = errors.New("nil debug handler")
ErrNilDebugger signals that a nil debug handler has been provided
var ErrNilDnsAddresses = errors.New("nil dns addresses map")
ErrNilDnsAddresses signals that nil dns addresses map was provided
var ErrNilDoubleTransactionsDetector = errors.New("nil double transactions detector")
ErrNilDoubleTransactionsDetector signals that a nil double transactions detector has been provided
var ErrNilESDTGlobalSettingsHandler = errors.New("nil esdt global settings handler")
ErrNilESDTGlobalSettingsHandler signals that nil global settings handler was provided
var ErrNilESDTTransferParser = errors.New("nil esdt transfer parser")
ErrNilESDTTransferParser signals that a nil ESDT transfer parser has been provided
var ErrNilEconomicsData = errors.New("nil economics data")
ErrNilEconomicsData signals that nil economics data has been provided
var ErrNilEconomicsFeeHandler = errors.New("nil economics fee handler")
ErrNilEconomicsFeeHandler signals that fee handler is nil
var ErrNilEnableEpochsHandler = errors.New("nil enable epochs handler")
ErrNilEnableEpochsHandler signals that a nil enable epochs handler has been provided
var ErrNilEnableRoundsHandler = errors.New("nil enable rounds handler has been provided")
ErrNilEnableRoundsHandler signals a nil enable rounds handler has been provided
var ErrNilEpochEconomics = errors.New("nil epoch economics")
ErrNilEpochEconomics signals that nil end of epoch econimics was provided
var ErrNilEpochHandler = errors.New("nil epoch handler")
ErrNilEpochHandler signals that a nil epoch handler was provided
var ErrNilEpochNotifier = errors.New("nil EpochNotifier")
ErrNilEpochNotifier signals that the provided EpochNotifier is nil
var ErrNilEpochStartDataCreator = errors.New("nil epoch start data creator")
ErrNilEpochStartDataCreator signals that nil epoch start data creator was provided
var ErrNilEpochStartNotifier = errors.New("nil epochStartNotifier")
ErrNilEpochStartNotifier signals that the provided epochStartNotifier is nil
var ErrNilEpochStartSystemSCProcessor = errors.New("nil epoch start system sc processor")
ErrNilEpochStartSystemSCProcessor signals that nil epoch start system sc processor was provided
var ErrNilEpochStartTrigger = errors.New("nil start of epoch trigger")
ErrNilEpochStartTrigger signals that a nil start of epoch trigger was provided
var ErrNilEpochStartValidatorInfoCreator = errors.New("nil epoch start validator info creator")
ErrNilEpochStartValidatorInfoCreator signals that nil epoch start validator info creator was provided
var ErrNilFallbackHeaderValidator = errors.New("nil fallback header validator")
ErrNilFallbackHeaderValidator signals that a nil fallback header validator has been provided
var ErrNilForkDetector = errors.New("nil fork detector")
ErrNilForkDetector signals that the fork detector is nil
var ErrNilGasHandler = errors.New("nil gas handler")
ErrNilGasHandler signals that gas handler is nil
var ErrNilGasSchedule = errors.New("nil GasSchedule")
ErrNilGasSchedule signals that an operation has been attempted with a nil gas schedule
var ErrNilGuardedAccountHandler = errors.New("nil guarded account handler")
ErrNilGuardedAccountHandler signals that a nil guarded account handler was provided
var ErrNilGuardianChecker = errors.New("nil guardian checker")
ErrNilGuardianChecker signals that a nil guardian checker was provided
var ErrNilGuardianServiceUID = errors.New("nil guardian service unique identifier")
ErrNilGuardianServiceUID signals that a nil guardian service identifier was provided
var ErrNilHardforkTrigger = errors.New("nil hardfork trigger")
ErrNilHardforkTrigger signals that a nil hardfork trigger has been provided
var ErrNilHasher = errors.New("nil Hasher")
ErrNilHasher signals that an operation has been attempted to or with a nil hasher implementation
var ErrNilHaveTimeHandler = errors.New("nil have time handler")
ErrNilHaveTimeHandler signals that a nil have time handler func was provided
var ErrNilHeaderHandler = errors.New("nil header handler")
ErrNilHeaderHandler signals that a nil header handler has been provided
var ErrNilHeaderIntegrityVerifier = errors.New("nil header integrity verifier")
ErrNilHeaderIntegrityVerifier signals that a nil header integrity verifier has been provided
var ErrNilHeaderSigVerifier = errors.New("nil header sig verifier")
ErrNilHeaderSigVerifier signals that a nil header sig verifier has been provided
var ErrNilHeaderValidator = errors.New("nil header validator")
ErrNilHeaderValidator signals that nil header validator has been provided
var ErrNilHeadersDataPool = errors.New("nil headers data pool")
ErrNilHeadersDataPool signals that a nil headers pool has been provided
var ErrNilHeartbeatCacher = errors.New("nil heartbeat cacher")
ErrNilHeartbeatCacher signals that a nil heartbeat cacher was provided
var ErrNilHistoryRepository = errors.New("history repository is nil")
ErrNilHistoryRepository signals that history processor is nil
var ErrNilInterceptedDataFactory = errors.New("nil intercepted data factory")
ErrNilInterceptedDataFactory signals that a nil intercepted data factory was provided
var ErrNilInterceptedDataProcessor = errors.New("nil intercepted data processor")
ErrNilInterceptedDataProcessor signals that a nil intercepted data processor was provided
var ErrNilInterceptorContainer = errors.New("nil interceptor container")
ErrNilInterceptorContainer signals that nil interceptor container has been provided
var ErrNilInterceptorThrottler = errors.New("nil interceptor throttler")
ErrNilInterceptorThrottler signals that a nil interceptor throttler was provided
var ErrNilIntermediateProcessor = errors.New("intermediate processor is nil")
ErrNilIntermediateProcessor signals that intermediate processors is nil
var ErrNilIntermediateProcessorContainer = errors.New("intermediate processor container is nil")
ErrNilIntermediateProcessorContainer signals that intermediate processors container is nil
var ErrNilIntermediateTransactionHandler = errors.New("intermediate transaction handler is nil")
ErrNilIntermediateTransactionHandler signals that nil intermediate transaction handler was provided
var ErrNilIsMaxBlockSizeReachedHandler = errors.New("nil handler for max block size reached")
ErrNilIsMaxBlockSizeReachedHandler signals a nil max block size reached handler
var ErrNilIsShardStuckHandler = errors.New("nil handler for checking stuck shard")
ErrNilIsShardStuckHandler signals a nil shard stuck handler
var ErrNilKeyGen = errors.New("nil key generator")
ErrNilKeyGen signals that an operation has been attempted to or with a nil single sign key generator
var ErrNilLocker = errors.New("nil locker")
ErrNilLocker signals that a nil locker was provided
var ErrNilManagedPeersHolder = errors.New("nil managed peers holder")
ErrNilManagedPeersHolder signals that a nil managed peers holder has been provided
var ErrNilMarshalizer = errors.New("nil Marshalizer")
ErrNilMarshalizer signals that an operation has been attempted to or with a nil Marshalizer implementation
var ErrNilMessage = errors.New("nil message")
ErrNilMessage signals that a nil message has been received
var ErrNilMessenger = errors.New("nil Messenger")
ErrNilMessenger signals that a nil Messenger object was provided
var ErrNilMetaBlockHeader = errors.New("nil metablock header")
ErrNilMetaBlockHeader signals that an operation has been attempted to or with a nil metablock
var ErrNilMetaBlocksPool = errors.New("nil meta blocks pool")
ErrNilMetaBlocksPool signals that a nil meta blocks pool was used
var ErrNilMinChanceIfZero = errors.New("no min chance ")
ErrNilMinChanceIfZero signals that there was no min chance provided if a chance is still needed
var ErrNilMiniBlock = errors.New("nil mini block")
ErrNilMiniBlock signals that an operation has been attempted with a nil miniblock
var ErrNilMiniBlockPool = errors.New("nil mini block pool")
ErrNilMiniBlockPool signals that a nil mini blocks pool was used
var ErrNilMiniBlocks = errors.New("nil mini blocks")
ErrNilMiniBlocks signals that an operation has been attempted with a nil mini-block
var ErrNilMiniBlocksProvider = errors.New("nil miniblocks provider")
ErrNilMiniBlocksProvider signals that a nil miniblocks data provider has been passed over
var ErrNilMultiSigVerifier = errors.New("nil multi-signature verifier")
ErrNilMultiSigVerifier signals that a nil multi-signature verifier is used
var ErrNilMultiSignerContainer = errors.New("nil multiSigner container")
ErrNilMultiSignerContainer signals that the given multisigner container is nil
var ErrNilNFTStorageHandler = errors.New("nil NFT storage handler")
ErrNilNFTStorageHandler signals that nil NFT storage handler has been provided
var ErrNilNetworkWatcher = errors.New("nil network watcher")
ErrNilNetworkWatcher signals that a nil network watcher has been provided
var ErrNilNodesConfigProvider = errors.New("nil nodes config provider")
ErrNilNodesConfigProvider signals that an operation has been attempted to or with a nil nodes config provider
var ErrNilNodesCoordinator = errors.New("nil nodes coordinator")
ErrNilNodesCoordinator signals that an operation has been attempted to or with a nil nodes coordinator
var ErrNilNodesSetup = errors.New("nil nodes setup")
ErrNilNodesSetup signals that nil nodes setup has been provided
var ErrNilNumConnectedPeersProvider = errors.New("nil number of connected peers provider")
ErrNilNumConnectedPeersProvider signals that a nil number of connected peers provider has been provided
var ErrNilOrEmptyList = errors.New("nil or empty provided list")
ErrNilOrEmptyList signals that a nil or empty list was provided
var ErrNilOutportDataProvider = errors.New("nil outport data provider")
ErrNilOutportDataProvider signals that a nil outport data provider has been given
var ErrNilOutportHandler = errors.New("outport handler is nil")
ErrNilOutportHandler signals that outport is nil
var ErrNilPayloadValidator = errors.New("nil payload validator")
ErrNilPayloadValidator signals that a nil payload validator was provided
var ErrNilPeerAccountsAdapter = errors.New("nil peer accounts database")
ErrNilPeerAccountsAdapter signals that a nil peer accounts database was provided
var ErrNilPeerAuthenticationCacher = errors.New("nil peer authentication cacher")
ErrNilPeerAuthenticationCacher signals that a nil peer authentication cacher was provided
var ErrNilPeerShardMapper = errors.New("nil peer shard mapper")
ErrNilPeerShardMapper signals that a nil peer shard mapper has been provided
var ErrNilPeerSignatureHandler = errors.New("nil peer signature handler")
ErrNilPeerSignatureHandler signals that a nil peer signature handler was provided
var ErrNilPeerValidatorMapper = errors.New("nil peer validator mapper")
ErrNilPeerValidatorMapper signals that nil peer validator mapper has been provided
var ErrNilPendingMiniBlocksHandler = errors.New("nil pending miniblocks handler")
ErrNilPendingMiniBlocksHandler signals that a nil pending miniblocks handler has been provided
var ErrNilPoolsHolder = errors.New("nil pools holder")
ErrNilPoolsHolder signals that an operation has been attempted to or with a nil pools holder object
var ErrNilPreProcessor = errors.New("preprocessor is nil")
ErrNilPreProcessor signals that preprocessors is nil
var ErrNilPreProcessorsContainer = errors.New("preprocessors container is nil")
ErrNilPreProcessorsContainer signals that preprocessors container is nil
var ErrNilPreferredPeersHolder = errors.New("nil preferred peers holder")
ErrNilPreferredPeersHolder signals that preferred peers holder is nil
var ErrNilPrevRandSeed = errors.New("provided previous rand seed is nil")
ErrNilPrevRandSeed signals that a nil previous rand seed has been provided
var ErrNilPreviousBlockHash = errors.New("nil previous block header hash")
ErrNilPreviousBlockHash signals that an operation has been attempted with a nil previous block header hash
var ErrNilProcessDebugger = errors.New("nil process debugger")
ErrNilProcessDebugger signals that a nil process debugger was provided
var ErrNilProcessedMiniBlocksTracker = errors.New("nil processed mini blocks tracker")
ErrNilProcessedMiniBlocksTracker signals that a nil processed mini blocks tracker has been provided
var ErrNilProtocolSustainabilityAddress = errors.New("nil protocol sustainability address")
ErrNilProtocolSustainabilityAddress signals that a nil protocol sustainability address was provided
var ErrNilPubKeysBitmap = errors.New("nil public keys bitmap")
ErrNilPubKeysBitmap signals that an operation has been attempted with a nil public keys bitmap
var ErrNilPubkeyConverter = errors.New("nil pubkey converter")
ErrNilPubkeyConverter signals that an operation has been attempted to or with a nil public key converter implementation
var ErrNilQuotaStatusHandler = errors.New("nil quota status handler")
ErrNilQuotaStatusHandler signals that a nil quota status handler has been provided
var ErrNilRandSeed = errors.New("provided rand seed is nil")
ErrNilRandSeed signals that a nil rand seed has been provided
var ErrNilRater = errors.New("nil rater")
ErrNilRater signals that nil rater has been provided
var ErrNilRatingsInfoHandler = errors.New("nil ratings info handler")
ErrNilRatingsInfoHandler signals that nil ratings info handler has been provided
var ErrNilRcvAddr = errors.New("nil receiver address")
ErrNilRcvAddr signals that an operation has been attempted to or with a nil receiver address
var ErrNilReceiptHandler = errors.New("nil receipt handler")
ErrNilReceiptHandler signals that receipt handler is nil
var ErrNilReceiptsRepository = errors.New("nil receipts repository")
ErrNilReceiptsRepository signals that a nil receipts repository has been provided
var ErrNilRequestHandler = errors.New("nil request handler")
ErrNilRequestHandler signals that a nil request handler interface was provided
var ErrNilRewardTransaction = errors.New("reward transaction is nil")
ErrNilRewardTransaction signals that the reward transaction is nil
var ErrNilRewardTxDataPool = errors.New("reward transactions pool is nil")
ErrNilRewardTxDataPool signals that the reward transactions pool is nil
var ErrNilRewardsCreator = errors.New("nil epoch start rewards creator")
ErrNilRewardsCreator signals that nil epoch start rewards creator was provided
var ErrNilRewardsHandler = errors.New("rewards handler is nil")
ErrNilRewardsHandler signals that rewards handler is nil
var ErrNilRewardsTxProcessor = errors.New("nil rewards transaction processor")
ErrNilRewardsTxProcessor signals that the rewards transaction processor is nil
var ErrNilRootHash = errors.New("root hash is nil")
ErrNilRootHash signals that an operation has been attempted with a nil root hash
var ErrNilRoundHandler = errors.New("nil RoundHandler")
ErrNilRoundHandler signals that an operation has been attempted to or with a nil RoundHandler implementation
var ErrNilRoundNotifier = errors.New("nil RoundNotifier")
ErrNilRoundNotifier signals that the provided EpochNotifier is nil
var ErrNilRoundTimeDurationHandler = errors.New("nil RoundTimeDurationHandler")
ErrNilRoundTimeDurationHandler signals that an operation has been attempted to or with a nil RoundTimeDurationHandler implementation
var ErrNilSCDestAccount = errors.New("nil destination SC account")
ErrNilSCDestAccount signals that destination account is nil
var ErrNilSCToProtocol = errors.New("nil sc to protocol")
ErrNilSCToProtocol signals that nil smart contract to protocol handler has been provided
var ErrNilScAddress = errors.New("nil SC address")
ErrNilScAddress signals that a nil smart contract address has been provided
var ErrNilScQueryElement = errors.New("nil SC query service element")
ErrNilScQueryElement signals that a nil sc query service element was provided
var ErrNilScheduledTxsExecutionHandler = errors.New("nil scheduled txs execution handler")
ErrNilScheduledTxsExecutionHandler signals that scheduled txs execution handler is nil
var ErrNilShardCoordinator = errors.New("nil shard coordinator")
ErrNilShardCoordinator signals that an operation has been attempted to or with a nil shard coordinator
var ErrNilShardedDataCacherNotifier = errors.New("nil sharded data cacher notifier")
ErrNilShardedDataCacherNotifier signals that a nil sharded data cacher notifier has been provided
var ErrNilSignature = errors.New("nil signature")
ErrNilSignature signals that an operation has been attempted with a nil signature
var ErrNilSignaturesHandler = errors.New("nil signatures handler")
ErrNilSignaturesHandler signals that a nil signatures handler was provided
var ErrNilSingleSigner = errors.New("nil single signer")
ErrNilSingleSigner signals that a nil single signer is used
var ErrNilSmartContractProcessor = errors.New("smart contract processor is nil")
ErrNilSmartContractProcessor signals that smart contract call executor is nil
var ErrNilSmartContractResult = errors.New("smart contract result is nil")
ErrNilSmartContractResult signals that the smart contract result is nil
var ErrNilSmartContractResultProcessor = errors.New("nil smart contract result processor")
ErrNilSmartContractResultProcessor signals that smart contract result processor is nil
var ErrNilSndAddr = errors.New("nil sender address")
ErrNilSndAddr signals that an operation has been attempted to or with a nil sender address
var ErrNilStatusComponentsHolder = errors.New("nil status components holder")
ErrNilStatusComponentsHolder signals that a nil status components holder was provided
var ErrNilStatusCoreComponentsHolder = errors.New("nil status core components holder")
ErrNilStatusCoreComponentsHolder signals that a nil status core components holder was provided
var ErrNilStorage = errors.New("nil storage")
ErrNilStorage signals that a nil storage has been provided
var ErrNilStorageService = errors.New("nil storage service")
ErrNilStorageService signals that a nil storage service has been provided
var ErrNilStore = errors.New("nil data storage service")
ErrNilStore signals that the provided storage service is nil
var ErrNilSyncTimer = errors.New("sync timer is nil")
ErrNilSyncTimer signals that the sync timer is nil
var ErrNilSystemSCConfig = errors.New("nil system sc config")
ErrNilSystemSCConfig signals that nil system sc config was provided
var ErrNilTemporaryAccountsHandler = errors.New("temporary accounts handler is nil")
ErrNilTemporaryAccountsHandler signals that temporary accounts handler is nil
var ErrNilTopicFloodPreventer = errors.New("nil topic flood preventer")
ErrNilTopicFloodPreventer signals that a nil topic flood preventer has been provided
var ErrNilTransaction = errors.New("nil transaction")
ErrNilTransaction signals that an operation has been attempted to or with a nil transaction
var ErrNilTransactionCoordinator = errors.New("transaction coordinator is nil")
ErrNilTransactionCoordinator signals that transaction coordinator is nil
var ErrNilTransactionPool = errors.New("nil transaction pool")
ErrNilTransactionPool signals that a nil transaction pool was used
var ErrNilTransactionVersionChecker = errors.New("nil transaction version checker")
ErrNilTransactionVersionChecker signals that provided transaction version checker is nil
var ErrNilTxBlockBody = errors.New("nil tx block body")
ErrNilTxBlockBody signals that an operation has been attempted to or with a nil tx block body
var ErrNilTxDataPool = errors.New("nil transaction data pool")
ErrNilTxDataPool signals that a nil transaction pool has been provided
var ErrNilTxExecutionOrderHandler = errors.New("nil transaction execution order handler")
ErrNilTxExecutionOrderHandler signals that a nil transaction execution order handler was provided
var ErrNilTxForCurrentBlockHandler = errors.New("nil tx for current block handler")
ErrNilTxForCurrentBlockHandler signals that nil tx for current block handler has been provided
var ErrNilTxHash = errors.New("nil transaction hash")
ErrNilTxHash signals that an operation has been attempted with a nil hash
var ErrNilTxLogsProcessor = errors.New("nil transaction logs processor")
ErrNilTxLogsProcessor is the error returned when a transaction has no logs
var ErrNilTxMaxTotalCostHandler = errors.New("nil transaction max total cost")
ErrNilTxMaxTotalCostHandler signals a nil transaction max total cost
var ErrNilTxProcessor = errors.New("nil transactions processor")
ErrNilTxProcessor signals that a nil transactions processor was used
var ErrNilTxStorage = errors.New("nil transaction storage")
ErrNilTxStorage signals that a nil transaction storage has been provided
var ErrNilTxTypeHandler = errors.New("nil tx type handler")
ErrNilTxTypeHandler signals that tx type handler is nil
var ErrNilTxValidator = errors.New("nil transaction validator")
ErrNilTxValidator signals that a nil tx validator has been provided
var ErrNilUTxDataPool = errors.New("unsigned transactions pool is nil")
ErrNilUTxDataPool signals that unsigned transaction pool is nil
var ErrNilUTxStorage = errors.New("unsigned transactions storage is nil")
ErrNilUTxStorage signals that unsigned transaction storage is nil
var ErrNilUint64Converter = errors.New("uint64converter is nil")
ErrNilUint64Converter signals that uint64converter is nil
var ErrNilUnsignedTxDataPool = errors.New("unsigned transactions pool is nil")
ErrNilUnsignedTxDataPool signals that the unsigned transactions pool is nil
var ErrNilUnsignedTxHandler = errors.New("nil unsigned tx handler")
ErrNilUnsignedTxHandler signals that the unsigned tx handler is nil
var ErrNilUserAccount = errors.New("nil user account")
ErrNilUserAccount signals that nil user account was provided
var ErrNilVMContainer = errors.New("nil ErrNilVMContainer")
ErrNilVMContainer defines the error when trying to use a nil vm container
var ErrNilVMOutput = errors.New("nil vm output")
ErrNilVMOutput signals that vmoutput is nil
var ErrNilValidatorInfoPool = errors.New("nil validator info pool")
ErrNilValidatorInfoPool signals that a nil validator info pool has been provided
var ErrNilValidatorInfos = errors.New("nil validator infos")
ErrNilValidatorInfos signals that a nil validator infos has been provided
var ErrNilValidatorStatistics = errors.New("nil validator statistics")
ErrNilValidatorStatistics signals that a nil validator statistics has been provided
var ErrNilValidityAttester = errors.New("nil validity attester")
ErrNilValidityAttester signals that a nil validity attester has been provided
var ErrNilValue = errors.New("nil value")
ErrNilValue signals the value is nil
var ErrNilValueFromRewardTransaction = errors.New("transferred value is nil in reward transaction")
ErrNilValueFromRewardTransaction signals that the transfered value is nil
var ErrNilVersionedHeaderFactory = errors.New("nil versioned header factory")
ErrNilVersionedHeaderFactory signals that the versioned header factory is nil
var ErrNilVmInput = errors.New("nil vm input")
ErrNilVmInput signals that provided vm input is nil
var ErrNilWhiteListHandler = errors.New("nil whitelist handler")
ErrNilWhiteListHandler signals that white list handler is nil
var ErrNoChancesForMaxThreshold = errors.New("max threshold has no chances")
ErrNoChancesForMaxThreshold signals that the max threshold has no chance defined
var ErrNoChancesProvided = errors.New("no chances are provided")
ErrNoChancesProvided signals that there were no chances provided
var ErrNoDataInMessage = errors.New("no data found in received message")
ErrNoDataInMessage signals that no data was found after parsing received p2p message
var ErrNoTxToProcess = errors.New("no transaction to process")
ErrNoTxToProcess signals that no transaction were sent for processing
var ErrNoVM = errors.New("no VM (hook not set)")
ErrNoVM signals that no SCHandler has been set
var ErrNodeIsNotSynced = errors.New("node is not synced")
ErrNodeIsNotSynced signals that the VM query cannot be executed because the node is not synced and the request required this
var ErrNotAllowedToWriteUnderProtectedKey = errors.New("not allowed to write under protected key")
ErrNotAllowedToWriteUnderProtectedKey signals that writing under protected key is not allowed
var ErrNotEnoughGas = errors.New("not enough gas was sent in the transaction")
ErrNotEnoughGas signals that not enough gas has been provided
var ErrNotEnoughGasInUserTx = errors.New("not enough gas provided in user tx")
ErrNotEnoughGasInUserTx signals that not enough gas was provided in user tx
var ErrNotEnoughValidBlocksInStorage = errors.New("not enough valid blocks to start from storage")
ErrNotEnoughValidBlocksInStorage signals that bootstrap from storage failed due to not enough valid blocks stored
var ErrNotEpochStartBlock = errors.New("not epoch start block")
ErrNotEpochStartBlock signals that block is not of type epoch start
var ErrNotarizedHeadersSliceForShardIsNil = errors.New("notarized headers slice for shard is nil")
ErrNotarizedHeadersSliceForShardIsNil signals that the slice holding notarized headers for shard is nil
var ErrNotarizedHeadersSliceIsNil = errors.New("notarized headers slice is nil")
ErrNotarizedHeadersSliceIsNil signals that the slice holding notarized headers is nil
var ErrNumOfMiniBlocksAndMiniBlocksHeadersMismatch = errors.New("num of mini blocks and mini blocks headers does not match")
ErrNumOfMiniBlocksAndMiniBlocksHeadersMismatch signals that number of mini blocks and mini blocks headers does not match
var ErrOnlyValidatorsCanUseThisTopic = errors.New("only validators can use this topic")
ErrOnlyValidatorsCanUseThisTopic signals that topic can be used by validator only
var ErrOriginatorIsBlacklisted = errors.New("originator is blacklisted")
ErrOriginatorIsBlacklisted signals that a message originator is blacklisted on the current node
var ErrOverallBalanceChangeFromSC = errors.New("SC output balance updates are wrong")
ErrOverallBalanceChangeFromSC signals that all sumed balance changes are not zero
var ErrOverflow = errors.New("type overflow occured")
ErrOverflow signals that an overflow occured
var ErrProcessClosed = errors.New("incomplete processing: process is closing")
ErrProcessClosed signals that an incomplete processing occurred due to the early process closing
var ErrPropertyTooLong = errors.New("property too long")
ErrPropertyTooLong signals that a heartbeat property was too long
var ErrPropertyTooShort = errors.New("property too short")
ErrPropertyTooShort signals that a heartbeat property was too short
var ErrQueriesNotAllowedYet = errors.New("node is not ready yet to process VM Queries")
ErrQueriesNotAllowedYet signals that the node is not ready yet to process VM Queries
var ErrRandSeedDoesNotMatch = errors.New("random seed does not match")
ErrRandSeedDoesNotMatch signals that random seed does not match with the previous one
var ErrReceiptsHashMissmatch = errors.New("receipts hash missmatch")
ErrReceiptsHashMissmatch signals that overall receipts has does not match
var ErrRecursiveRelayedTxIsNotAllowed = errors.New("recursive relayed tx is not allowed")
ErrRecursiveRelayedTxIsNotAllowed signals that recursive relayed tx is not allowed
var ErrRelayedGasPriceMissmatch = errors.New("relayed gas price missmatch")
ErrRelayedGasPriceMissmatch signals that relayed gas price is not equal with user tx
var ErrRelayedTxBeneficiaryDoesNotMatchReceiver = errors.New("invalid address in relayed tx")
ErrRelayedTxBeneficiaryDoesNotMatchReceiver signals that an invalid address was provided in the relayed tx
var ErrRelayedTxDisabled = errors.New("relayed tx is disabled")
ErrRelayedTxDisabled signals that relayed tx are disabled
var ErrRelayedTxGasLimitMissmatch = errors.New("relayed tx gas limit higher then user tx gas limit")
ErrRelayedTxGasLimitMissmatch signals that relayed tx gas limit is higher than user tx gas limit
var ErrRelayedTxV2Disabled = errors.New("relayed tx v2 is disabled")
ErrRelayedTxV2Disabled signals that the v2 version of relayed tx is disabled
var ErrRelayedTxV2ZeroVal = errors.New("relayed tx v2 value should be 0")
ErrRelayedTxV2ZeroVal signals that the v2 version of relayed tx should be created with 0 as value
var ErrRelayedTxValueHigherThenUserTxValue = errors.New("relayed tx value is higher than user tx value")
ErrRelayedTxValueHigherThenUserTxValue signals that relayed tx value is higher than user tx value
var ErrReservedFieldInvalid = errors.New("reserved field content is invalid")
ErrReservedFieldInvalid signals that reserved field has an invalid content
var ErrResultingSCRIsTooBig = errors.New("resulting SCR is too big")
ErrResultingSCRIsTooBig signals that resulting smart contract result is too big
var ErrRewardMiniBlockNotFromMeta = errors.New("rewards miniblocks should come only from meta")
ErrRewardMiniBlockNotFromMeta signals that miniblock has a different sender shard than meta
var ErrRootStateDoesNotMatch = errors.New("root state does not match")
ErrRootStateDoesNotMatch signals that root state does not match
var ErrSCDeployFromSCRIsNotPermitted = errors.New("it is not permitted to deploy a smart contract from another smart contract cross shard")
ErrSCDeployFromSCRIsNotPermitted signals that operation is not permitted
var ErrScheduledMiniBlocksMismatch = errors.New("scheduled miniblocks does not match")
ErrScheduledMiniBlocksMismatch signals that scheduled mini blocks created and executed in the last block, which are not yet final, do not match with the ones received in the next proposed body
var ErrScheduledRootHashDoesNotMatch = errors.New("scheduled root hash does not match")
ErrScheduledRootHashDoesNotMatch signals that scheduled root hash does not match
var ErrShardIdMissmatch = errors.New("shard ID missmatch")
ErrShardIdMissmatch signals shard ID does not match expectations
var ErrShardIsStuck = errors.New("shard is stuck")
ErrShardIsStuck signals that a shard is stuck
var ErrSignedBlocksThresholdNotBetweenZeroAndOne = errors.New("signed blocks threshold is not between 0 and 1")
ErrSignedBlocksThresholdNotBetweenZeroAndOne signals that the signed blocks threshold is not between 0 and 1
var ErrSmartContractDeploymentIsDisabled = errors.New("smart Contract deployment is disabled")
ErrSmartContractDeploymentIsDisabled signals that smart contract deployment was disabled
var ErrStartRatingNotBetweenMinAndMax = errors.New("start rating is not between min and max rating")
ErrStartRatingNotBetweenMinAndMax signals that the start rating is not between min and max rating
var ErrStateChangedWhileExecutingVmQuery = errors.New("state changed while executing vm query")
ErrStateChangedWhileExecutingVmQuery signals that the state has been changed while executing a vm query and the request required not to
var ErrSystemBusy = errors.New("system busy")
ErrSystemBusy signals that the system is busy
var ErrTimeIsOut = errors.New("time is out")
ErrTimeIsOut signals that time is out
var ErrTooManyReceiptsMiniBlocks = errors.New("too many receipts miniblocks")
ErrTooManyReceiptsMiniBlocks signals that there were too many receipts miniblocks created
var ErrTransactionAndAccountGuardianMismatch = errors.New("mismatch between transaction guardian and configured account guardian")
ErrTransactionAndAccountGuardianMismatch signals a mismatch between the guardian on the account and the one on the transaction
var ErrTransactionIsNotWhitelisted = errors.New("transaction is not whitelisted")
ErrTransactionIsNotWhitelisted signals that a transaction is not whitelisted
var ErrTransactionNotExecutable = errors.New("transaction is not executable and gas will not be consumed")
ErrTransactionNotExecutable signals that a transaction is not executable and gas will not be consumed
var ErrTransactionSignedWithHashIsNotEnabled = errors.New("transaction signed with hash is not enabled")
ErrTransactionSignedWithHashIsNotEnabled signals that a transaction signed with hash is not enabled
var ErrTrieNodeIsNotWhitelisted = errors.New("trie node is not whitelisted")
ErrTrieNodeIsNotWhitelisted signals that a trie node is not whitelisted
var ErrTxNotFound = errors.New("transaction not found")
ErrTxNotFound signals that a transaction has not found
var ErrTxValueOutOfBounds = errors.New("tx value is out of bounds")
ErrTxValueOutOfBounds signals that transaction value is out of bounds
var ErrTxValueTooBig = errors.New("tx value is too big")
ErrTxValueTooBig signals that transaction value is too big
var ErrUnknownBlockType = errors.New("block type is unknown")
ErrUnknownBlockType signals that block type is not correct
var ErrUnmarshalWithoutSuccess = errors.New("unmarshal without success")
ErrUnmarshalWithoutSuccess signals that unmarshal some data was not done with success
var ErrUpgradeNotAllowed = errors.New("upgrade is allowed only for owner")
ErrUpgradeNotAllowed signals that upgrade is not allowed
var ErrUserNameDoesNotMatch = errors.New("user name does not match")
ErrUserNameDoesNotMatch signals that username does not match
var ErrUserNameDoesNotMatchInCrossShardTx = errors.New("mismatch between receiver username and address")
ErrUserNameDoesNotMatchInCrossShardTx signals that username does not match in case of cross shard tx
var ErrValidatorInfoMiniBlockNotFromMeta = errors.New("validatorInfo miniblocks should come only from meta")
ErrValidatorInfoMiniBlockNotFromMeta signals that miniblock has a different sender shard than meta
var ErrValidatorStatsRootHashDoesNotMatch = errors.New("root hash for validator statistics does not match")
ErrValidatorStatsRootHashDoesNotMatch signals that the root hash for the validator statistics does not match
var ErrWrongNonceInBlock = errors.New("wrong nonce in block")
ErrWrongNonceInBlock signals the nonce in block is different from expected nonce
var ErrWrongNonceInVMOutput = errors.New("nonce invalid from SC run")
ErrWrongNonceInVMOutput signals that nonce in vm output is wrong
var ErrWrongTransaction = errors.New("invalid transaction")
ErrWrongTransaction signals that transaction is invalid
var ErrWrongTransactionType = errors.New("invalid transaction type")
ErrWrongTransactionType signals that transaction is invalid
var ErrWrongTypeAssertion = errors.New("wrong type assertion")
ErrWrongTypeAssertion signals that a type assertion failed
var ErrWrongTypeInContainer = errors.New("wrong type of object inside container")
ErrWrongTypeInContainer signals that a wrong type of object was found in container
var ErrWrongTypeInMiniBlock = errors.New("type in miniblock is not correct for processing")
ErrWrongTypeInMiniBlock signals that type is not correct for processing
var ErrZeroMaxComputableRounds = errors.New("max computable rounds is zero")
ErrZeroMaxComputableRounds signals that a value of zero was provided on the maxComputableRounds
var ErrZeroMaxConsecutiveRoundsOfRatingDecrease = errors.New("max consecutive number of rounds, in which we can decrease a validator rating, is zero")
ErrZeroMaxConsecutiveRoundsOfRatingDecrease signals that a value of zero was provided on the MaxConsecutiveRoundsOfRatingDecrease
Functions ¶
func AddHeaderToBlackList ¶
func AddHeaderToBlackList(blackListHandler TimeCacher, hash []byte)
AddHeaderToBlackList adds a hash to black list handler. Logs if the operation did not succeed
func CheckIfIndexesAreOutOfBound ¶
func CheckIfIndexesAreOutOfBound( indexOfFirstTxToBeProcessed int32, indexOfLastTxToBeProcessed int32, miniBlock *block.MiniBlock, ) error
CheckIfIndexesAreOutOfBound checks if the given indexes are out of bound for the given mini block
func DisplayProcessTxDetails ¶
func DisplayProcessTxDetails( message string, accountHandler vmcommon.AccountHandler, txHandler data.TransactionHandler, txHash []byte, addressPubkeyConverter core.PubkeyConverter, )
DisplayProcessTxDetails displays information related to the tx which should be executed
func GetFinalCrossMiniBlockHashes ¶
func GetFinalCrossMiniBlockHashes(header data.HeaderHandler, shardID uint32) map[string]uint32
GetFinalCrossMiniBlockHashes returns all the finalized miniblocks hashes, from the given header and with the given destination
func GetHeaderFromStorage ¶
func GetHeaderFromStorage( shardId uint32, hash []byte, marshalizer marshal.Marshalizer, storageService dataRetriever.StorageService, ) (data.HeaderHandler, error)
GetHeaderFromStorage method returns a block header from storage
func GetHeaderFromStorageWithNonce ¶
func GetHeaderFromStorageWithNonce( nonce uint64, shardId uint32, storageService dataRetriever.StorageService, uint64Converter typeConverters.Uint64ByteSliceConverter, marshalizer marshal.Marshalizer, ) (data.HeaderHandler, []byte, error)
GetHeaderFromStorageWithNonce method returns a block header from storage with a given nonce and shardId
func GetHeaderHashFromStorageWithNonce ¶
func GetHeaderHashFromStorageWithNonce( nonce uint64, storageService dataRetriever.StorageService, uint64Converter typeConverters.Uint64ByteSliceConverter, marshalizer marshal.Marshalizer, blockUnit dataRetriever.UnitType, ) ([]byte, error)
GetHeaderHashFromStorageWithNonce gets a header hash, given a nonce
func GetMarshalizedHeaderFromStorage ¶
func GetMarshalizedHeaderFromStorage( blockUnit dataRetriever.UnitType, hash []byte, marshalizer marshal.Marshalizer, storageService dataRetriever.StorageService, ) ([]byte, error)
GetMarshalizedHeaderFromStorage gets the marshalized header, which is associated with the given hash, from storage
func GetMetaHeader ¶
func GetMetaHeader( hash []byte, headersCacher dataRetriever.HeadersPool, marshalizer marshal.Marshalizer, storageService dataRetriever.StorageService, ) (*block.MetaBlock, error)
GetMetaHeader gets the header, which is associated with the given hash, from pool or storage
func GetMetaHeaderFromPool ¶
func GetMetaHeaderFromPool( hash []byte, headersCacher dataRetriever.HeadersPool, ) (*block.MetaBlock, error)
GetMetaHeaderFromPool gets the header, which is associated with the given hash, from pool
func GetMetaHeaderFromPoolWithNonce ¶
func GetMetaHeaderFromPoolWithNonce( nonce uint64, headersCacher dataRetriever.HeadersPool, ) (*block.MetaBlock, []byte, error)
GetMetaHeaderFromPoolWithNonce method returns a meta block header from pool with a given nonce
func GetMetaHeaderFromStorage ¶
func GetMetaHeaderFromStorage( hash []byte, marshalizer marshal.Marshalizer, storageService dataRetriever.StorageService, ) (*block.MetaBlock, error)
GetMetaHeaderFromStorage gets the header, which is associated with the given hash, from storage
func GetMetaHeaderFromStorageWithNonce ¶
func GetMetaHeaderFromStorageWithNonce( nonce uint64, storageService dataRetriever.StorageService, uint64Converter typeConverters.Uint64ByteSliceConverter, marshalizer marshal.Marshalizer, ) (*block.MetaBlock, []byte, error)
GetMetaHeaderFromStorageWithNonce method returns a meta block header from storage with a given nonce
func GetMetaHeaderWithNonce ¶
func GetMetaHeaderWithNonce( nonce uint64, headersCacher dataRetriever.HeadersPool, marshalizer marshal.Marshalizer, storageService dataRetriever.StorageService, uint64Converter typeConverters.Uint64ByteSliceConverter, ) (*block.MetaBlock, []byte, error)
GetMetaHeaderWithNonce method returns a meta block header with a given nonce
func GetMiniBlockHeaderWithHash ¶
func GetMiniBlockHeaderWithHash(header data.HeaderHandler, miniBlockHash []byte) data.MiniBlockHeaderHandler
GetMiniBlockHeaderWithHash returns the miniblock header with the given hash
func GetShardHeader ¶
func GetShardHeader( hash []byte, headersCacher dataRetriever.HeadersPool, marshalizer marshal.Marshalizer, storageService dataRetriever.StorageService, ) (data.ShardHeaderHandler, error)
GetShardHeader gets the header, which is associated with the given hash, from pool or storage
func GetShardHeaderFromPool ¶
func GetShardHeaderFromPool( hash []byte, headersCacher dataRetriever.HeadersPool, ) (data.ShardHeaderHandler, error)
GetShardHeaderFromPool gets the header, which is associated with the given hash, from pool
func GetShardHeaderFromPoolWithNonce ¶
func GetShardHeaderFromPoolWithNonce( nonce uint64, shardId uint32, headersCacher dataRetriever.HeadersPool, ) (data.HeaderHandler, []byte, error)
GetShardHeaderFromPoolWithNonce method returns a shard block header from pool with a given nonce and shardId
func GetShardHeaderFromStorage ¶
func GetShardHeaderFromStorage( hash []byte, marshalizer marshal.Marshalizer, storageService dataRetriever.StorageService, ) (data.ShardHeaderHandler, error)
GetShardHeaderFromStorage gets the header, which is associated with the given hash, from storage
func GetShardHeaderFromStorageWithNonce ¶
func GetShardHeaderFromStorageWithNonce( nonce uint64, shardId uint32, storageService dataRetriever.StorageService, uint64Converter typeConverters.Uint64ByteSliceConverter, marshalizer marshal.Marshalizer, ) (data.HeaderHandler, []byte, error)
GetShardHeaderFromStorageWithNonce method returns a shard block header from storage with a given nonce and shardId
func GetShardHeaderWithNonce ¶
func GetShardHeaderWithNonce( nonce uint64, shardId uint32, headersCacher dataRetriever.HeadersPool, marshalizer marshal.Marshalizer, storageService dataRetriever.StorageService, uint64Converter typeConverters.Uint64ByteSliceConverter, ) (data.HeaderHandler, []byte, error)
GetShardHeaderWithNonce method returns a shard block header with a given nonce and shardId
func GetSortedStorageUpdates ¶
func GetSortedStorageUpdates(account *vmcommon.OutputAccount) []*vmcommon.StorageUpdate
GetSortedStorageUpdates returns the storage updates as a sorted list
func GetTransactionHandler ¶
func GetTransactionHandler( senderShardID uint32, destShardID uint32, txHash []byte, shardedDataCacherNotifier dataRetriever.ShardedDataCacherNotifier, storageService dataRetriever.StorageService, marshalizer marshal.Marshalizer, method ShardedCacheSearchMethod, ) (data.TransactionHandler, error)
GetTransactionHandler gets the transaction with a given sender/receiver shardId and txHash
func GetTransactionHandlerFromPool ¶
func GetTransactionHandlerFromPool( senderShardID uint32, destShardID uint32, txHash []byte, shardedDataCacherNotifier dataRetriever.ShardedDataCacherNotifier, method ShardedCacheSearchMethod, ) (data.TransactionHandler, error)
GetTransactionHandlerFromPool gets the transaction from pool with a given sender/receiver shardId and txHash
func GetTransactionHandlerFromStorage ¶
func GetTransactionHandlerFromStorage( txHash []byte, storageService dataRetriever.StorageService, marshalizer marshal.Marshalizer, ) (data.TransactionHandler, error)
GetTransactionHandlerFromStorage gets the transaction from storage with a given sender/receiver shardId and txHash
func GetZeroGasAndFees ¶
func GetZeroGasAndFees() scheduled.GasAndFees
GetZeroGasAndFees returns a zero value structure for the gas and fees
func HaveAdditionalTime ¶
func HaveAdditionalTime() func() bool
HaveAdditionalTime returns if the additional time allocated for scheduled mini blocks is elapsed
func IsAllowedToSaveUnderKey ¶
IsAllowedToSaveUnderKey returns if saving key-value in data tries under given key is allowed
func IsBuiltinFuncCallWithParam ¶ added in v1.5.0
IsBuiltinFuncCallWithParam checks if the given transaction data represents a builtin function call with parameters
func IsInProperRound ¶
IsInProperRound checks if the given round index satisfies the round modulus trigger
func IsScheduledMode ¶
func IsScheduledMode( header data.HeaderHandler, body *block.Body, hasher hashing.Hasher, marshalizer marshal.Marshalizer, ) (bool, error)
IsScheduledMode returns true if the first mini block from the given body is marked as a scheduled
func IsSetGuardianCall ¶ added in v1.5.0
IsSetGuardianCall checks if the given transaction data represents the set guardian builtin function call
func IsShardCacherIdentifierForSourceMe ¶
IsShardCacherIdentifierForSourceMe checks whether the specified cache is for the pair (sender = me, destination = *)
func ParseShardCacherIdentifier ¶
ParseShardCacherIdentifier parses an identifier into its components: sender shard, destination shard
func ShardCacherIdentifier ¶
ShardCacherIdentifier generates a string identifier between 2 shards
func SortHeadersByNonce ¶
func SortHeadersByNonce(headers []data.HeaderHandler)
SortHeadersByNonce will sort a given list of headers by nonce
func SortVMOutputInsideData ¶
func SortVMOutputInsideData(vmOutput *vmcommon.VMOutput) []*vmcommon.OutputAccount
SortVMOutputInsideData returns the output accounts as a sorted list
func UnmarshalHeader ¶
func UnmarshalHeader(shardId uint32, marshalizer marshal.Marshalizer, headerBuffer []byte) (data.HeaderHandler, error)
UnmarshalHeader unmarshalls a block header
func UnmarshalMetaHeader ¶
func UnmarshalMetaHeader(marshalizer marshal.Marshalizer, headerBuffer []byte) (data.MetaHeaderHandler, error)
UnmarshalMetaHeader unmarshalls a meta header
func UnmarshalShardHeader ¶
func UnmarshalShardHeader(marshalizer marshal.Marshalizer, hdrBuff []byte) (data.ShardHeaderHandler, error)
UnmarshalShardHeader unmarshalls a shard header
func UnmarshalShardHeaderV1 ¶
func UnmarshalShardHeaderV1(marshalizer marshal.Marshalizer, hdrBuff []byte) (data.ShardHeaderHandler, error)
UnmarshalShardHeaderV1 unmarshalls a header with version 1
func UnmarshalShardHeaderV2 ¶
func UnmarshalShardHeaderV2(marshalizer marshal.Marshalizer, hdrBuff []byte) (data.ShardHeaderHandler, error)
UnmarshalShardHeaderV2 unmarshalls a header with version 2
Types ¶
type AccountsDBSyncer ¶
type AccountsDBSyncer interface { SyncAccounts(rootHash []byte, storageMarker common.StorageMarker) error IsInterfaceNil() bool }
AccountsDBSyncer defines the methods for the accounts db syncer
type AntifloodDebugger ¶
type AntifloodDebugger interface { AddData(pid core.PeerID, topic string, numRejected uint32, sizeRejected uint64, sequence []byte, isBlacklisted bool) Close() error IsInterfaceNil() bool }
AntifloodDebugger defines an interface for debugging the antiflood behavior
type ArgumentsParser ¶
type ArgumentsParser interface { ParseCallData(data string) (string, [][]byte, error) ParseArguments(data string) ([][]byte, error) ParseDeployData(data string) (*parsers.DeployArgs, error) CreateDataFromStorageUpdate(storageUpdates []*vmcommon.StorageUpdate) string GetStorageUpdates(data string) ([]*vmcommon.StorageUpdate, error) IsInterfaceNil() bool }
ArgumentsParser defines the functionality to parse transaction data into arguments and code for smart contracts
type BaseOperationCost ¶
type BaseOperationCost struct { StorePerByte uint64 ReleasePerByte uint64 DataCopyPerByte uint64 PersistPerByte uint64 CompilePerByte uint64 AoTPreparePerByte uint64 }
BaseOperationCost defines cost for base operation cost
type BlockChainHookHandler ¶
type BlockChainHookHandler interface { GetCode(account vmcommon.UserAccountHandler) []byte GetUserAccount(address []byte) (vmcommon.UserAccountHandler, error) GetStorageData(accountAddress []byte, index []byte) ([]byte, uint32, error) GetBlockhash(nonce uint64) ([]byte, error) LastNonce() uint64 LastRound() uint64 LastTimeStamp() uint64 LastRandomSeed() []byte LastEpoch() uint32 GetStateRootHash() []byte CurrentNonce() uint64 CurrentRound() uint64 CurrentTimeStamp() uint64 CurrentRandomSeed() []byte CurrentEpoch() uint32 NewAddress(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error) ProcessBuiltInFunction(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error) SaveNFTMetaDataToSystemAccount(tx data.TransactionHandler) error GetShardOfAddress(address []byte) uint32 IsSmartContract(address []byte) bool GetBuiltinFunctionNames() vmcommon.FunctionNames GetBuiltinFunctionsContainer() vmcommon.BuiltInFunctionContainer GetAllState(_ []byte) (map[string][]byte, error) GetESDTToken(address []byte, tokenID []byte, nonce uint64) (*esdt.ESDigitalToken, error) IsPaused(tokenID []byte) bool IsLimitedTransfer(tokenID []byte) bool NumberOfShards() uint32 SetCurrentHeader(hdr data.HeaderHandler) SaveCompiledCode(codeHash []byte, code []byte) GetCompiledCode(codeHash []byte) (bool, []byte) IsPayable(sndAddress []byte, recvAddress []byte) (bool, error) DeleteCompiledCode(codeHash []byte) ClearCompiledCodes() GetSnapshot() int RevertToSnapshot(snapshot int) error ExecuteSmartContractCallOnOtherVM(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error) SetVMContainer(vmContainer VirtualMachinesContainer) error Close() error FilterCodeMetadataForUpgrade(input []byte) ([]byte, error) ApplyFiltersOnSCCodeMetadata(codeMetadata vmcommon.CodeMetadata) vmcommon.CodeMetadata ResetCounters() GetCounterValues() map[string]uint64 IsInterfaceNil() bool IsBuiltinFunctionName(functionName string) bool }
BlockChainHookHandler defines the actions which should be performed by implementation
type BlockChainHookWithAccountsAdapter ¶ added in v1.6.0
type BlockChainHookWithAccountsAdapter interface { BlockChainHookHandler GetAccountsAdapter() state.AccountsAdapter }
BlockChainHookWithAccountsAdapter defines an extension of BlockChainHookHandler with the AccountsAdapter exposed
type BlockHeaderState ¶
type BlockHeaderState int
BlockHeaderState specifies which is the state of the block header received
const ( // BHReceived defines ID of a received block header BHReceived BlockHeaderState = iota // BHReceivedTooLate defines ID of a late received block header BHReceivedTooLate // BHProcessed defines ID of a processed block header BHProcessed // BHProposed defines ID of a proposed block header BHProposed // BHNotarized defines ID of a notarized block header BHNotarized )
type BlockProcessor ¶
type BlockProcessor interface { ProcessBlock(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error ProcessScheduledBlock(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error CommitBlock(header data.HeaderHandler, body data.BodyHandler) error RevertCurrentBlock() PruneStateOnRollback(currHeader data.HeaderHandler, currHeaderHash []byte, prevHeader data.HeaderHandler, prevHeaderHash []byte) RevertStateToBlock(header data.HeaderHandler, rootHash []byte) error CreateNewHeader(round uint64, nonce uint64) (data.HeaderHandler, error) RestoreBlockIntoPools(header data.HeaderHandler, body data.BodyHandler) error CreateBlock(initialHdr data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error) MarshalizedDataToBroadcast(header data.HeaderHandler, body data.BodyHandler) (map[uint32][]byte, map[string][][]byte, error) DecodeBlockBody(dta []byte) data.BodyHandler DecodeBlockHeader(dta []byte) data.HeaderHandler SetNumProcessedObj(numObj uint64) RestoreBlockBodyIntoPools(body data.BodyHandler) error NonceOfFirstCommittedBlock() core.OptionalUint64 Close() error IsInterfaceNil() bool }
BlockProcessor is the main interface for block execution engine
type BlockSizeThrottler ¶
type BlockSizeThrottler interface { GetCurrentMaxSize() uint32 Add(round uint64, size uint32) Succeed(round uint64) ComputeCurrentMaxSize() IsInterfaceNil() bool }
BlockSizeThrottler defines the functionality of adapting the node to the network speed/latency when it should send a block to its peers which should be received in a limited time frame
type BlockTracker ¶
type BlockTracker interface { AddCrossNotarizedHeader(shradID uint32, crossNotarizedHeader data.HeaderHandler, crossNotarizedHeaderHash []byte) AddSelfNotarizedHeader(shardID uint32, selfNotarizedHeader data.HeaderHandler, selfNotarizedHeaderHash []byte) AddTrackedHeader(header data.HeaderHandler, hash []byte) CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error CheckBlockAgainstRoundHandler(headerHandler data.HeaderHandler) error CheckBlockAgainstWhitelist(interceptedData InterceptedData) bool CleanupHeadersBehindNonce(shardID uint32, selfNotarizedNonce uint64, crossNotarizedNonce uint64) CleanupInvalidCrossHeaders(metaNewEpoch uint32, metaRoundAttestingEpoch uint64) ComputeLongestChain(shardID uint32, header data.HeaderHandler) ([]data.HeaderHandler, [][]byte) ComputeLongestMetaChainFromLastNotarized() ([]data.HeaderHandler, [][]byte, error) ComputeLongestShardsChainsFromLastNotarized() ([]data.HeaderHandler, [][]byte, map[uint32][]data.HeaderHandler, error) DisplayTrackedHeaders() GetCrossNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error) GetLastCrossNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error) GetLastCrossNotarizedHeadersForAllShards() (map[uint32]data.HeaderHandler, error) GetLastSelfNotarizedHeader(shardID uint32) (data.HeaderHandler, []byte, error) GetSelfNotarizedHeader(shardID uint32, offset uint64) (data.HeaderHandler, []byte, error) GetTrackedHeaders(shardID uint32) ([]data.HeaderHandler, [][]byte) GetTrackedHeadersForAllShards() map[uint32][]data.HeaderHandler GetTrackedHeadersWithNonce(shardID uint32, nonce uint64) ([]data.HeaderHandler, [][]byte) IsShardStuck(shardID uint32) bool ShouldSkipMiniBlocksCreationFromSelf() bool RegisterCrossNotarizedHeadersHandler(func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)) RegisterSelfNotarizedFromCrossHeadersHandler(func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)) RegisterSelfNotarizedHeadersHandler(func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)) RegisterFinalMetachainHeadersHandler(func(shardID uint32, headers []data.HeaderHandler, headersHashes [][]byte)) RemoveLastNotarizedHeaders() RestoreToGenesis() ShouldAddHeader(headerHandler data.HeaderHandler) bool IsInterfaceNil() bool }
BlockTracker defines the functionality for node to track the blocks which are received from network
type BootStorer ¶
type BootStorer interface { SaveLastRound(round int64) error Put(round int64, bootData bootstrapStorage.BootstrapData) error Get(round int64) (bootstrapStorage.BootstrapData, error) GetHighestRound() int64 IsInterfaceNil() bool }
BootStorer is the interface needed by bootstrapper to read/write data in storage
type Bootstrapper ¶
type Bootstrapper interface { Close() error AddSyncStateListener(func(isSyncing bool)) GetNodeState() common.NodeState StartSyncingBlocks() error IsInterfaceNil() bool }
Bootstrapper is an interface that defines the behaviour of a struct that is able to synchronize the node
type BootstrapperFromStorage ¶
type BootstrapperFromStorage interface { LoadFromStorage() error GetHighestBlockNonce() uint64 IsInterfaceNil() bool }
BootstrapperFromStorage is the interface needed by boot component to load data from storage
type BuiltInCost ¶
type BuiltInCost struct { ChangeOwnerAddress uint64 ClaimDeveloperRewards uint64 SaveUserName uint64 SaveKeyValue uint64 ESDTTransfer uint64 ESDTBurn uint64 ESDTLocalMint uint64 ESDTLocalBurn uint64 ESDTNFTCreate uint64 ESDTNFTAddQuantity uint64 ESDTNFTBurn uint64 ESDTNFTTransfer uint64 ESDTNFTChangeCreateOwner uint64 ESDTNFTAddUri uint64 ESDTNFTUpdateAttributes uint64 ESDTNFTMultiTransfer uint64 SetGuardian uint64 GuardAccount uint64 UnGuardAccount uint64 TrieLoadPerNode uint64 TrieStorePerNode uint64 }
BuiltInCost defines cost for built-in methods
type CallArgumentsParser ¶
type CallArgumentsParser interface { ParseData(data string) (string, [][]byte, error) ParseArguments(data string) ([][]byte, error) IsInterfaceNil() bool }
CallArgumentsParser defines the functionality to parse transaction data into call arguments
type CheckedChunkResult ¶
CheckedChunkResult is the DTO used to hold the results after checking a chunk of intercepted data
type Checker ¶
type Checker interface { // IntegrityAndValidity does both validity and integrity checks on the data structure IntegrityAndValidity(coordinator sharding.Coordinator) error // Integrity checks only the integrity of the data Integrity(coordinator sharding.Coordinator) error // IsInterfaceNil returns true if there is no value under the interface IsInterfaceNil() bool }
Checker provides functionality to checks the integrity and validity of a data structure
type CoreComponentsHolder ¶
type CoreComponentsHolder interface { InternalMarshalizer() marshal.Marshalizer SetInternalMarshalizer(marshalizer marshal.Marshalizer) error TxMarshalizer() marshal.Marshalizer Hasher() hashing.Hasher TxSignHasher() hashing.Hasher Uint64ByteSliceConverter() typeConverters.Uint64ByteSliceConverter AddressPubKeyConverter() core.PubkeyConverter ValidatorPubKeyConverter() core.PubkeyConverter PathHandler() storage.PathManagerHandler ChainID() string MinTransactionVersion() uint32 TxVersionChecker() TxVersionCheckerHandler GenesisNodesSetup() sharding.GenesisNodesSetupHandler EpochNotifier() EpochNotifier ChanStopNodeProcess() chan endProcess.ArgEndProcess NodeTypeProvider() core.NodeTypeProviderHandler ProcessStatusHandler() common.ProcessStatusHandler HardforkTriggerPubKey() []byte EnableEpochsHandler() common.EnableEpochsHandler IsInterfaceNil() bool }
CoreComponentsHolder holds the core components needed by the interceptors
type CryptoComponentsHolder ¶
type CryptoComponentsHolder interface { TxSignKeyGen() crypto.KeyGenerator BlockSignKeyGen() crypto.KeyGenerator TxSingleSigner() crypto.SingleSigner BlockSigner() crypto.SingleSigner GetMultiSigner(epoch uint32) (crypto.MultiSigner, error) MultiSignerContainer() cryptoCommon.MultiSignerContainer SetMultiSignerContainer(ms cryptoCommon.MultiSignerContainer) error PeerSignatureHandler() crypto.PeerSignatureHandler PublicKey() crypto.PublicKey PrivateKey() crypto.PrivateKey Clone() interface{} ManagedPeersHolder() common.ManagedPeersHolder IsInterfaceNil() bool }
CryptoComponentsHolder holds the crypto components needed by the interceptors
type CurrentNetworkEpochProviderHandler ¶
type CurrentNetworkEpochProviderHandler interface { EpochIsActiveInNetwork(epoch uint32) bool IsInterfaceNil() bool }
CurrentNetworkEpochProviderHandler is an interface able to compute if the provided epoch is active on the network or not
type DataMarshalizer ¶
DataMarshalizer defines the behavior of a structure that is able to marshalize containing data
type DataPacker ¶
type DataPacker interface { PackDataInChunks(data [][]byte, limit int) ([][]byte, error) IsInterfaceNil() bool }
DataPacker can split a large slice of byte slices in smaller packets
type Debugger ¶
type Debugger interface { SetLastCommittedBlockRound(round uint64) Close() error IsInterfaceNil() bool }
Debugger defines what a process debugger implementation should do
type DeployArgumentsParser ¶
type DeployArgumentsParser interface { ParseData(data string) (*parsers.DeployArgs, error) IsInterfaceNil() bool }
DeployArgumentsParser defines the functionality to parse transaction data into call arguments
type DoubleTransactionDetector ¶
type DoubleTransactionDetector interface { ProcessBlockBody(body *block.Body) IsInterfaceNil() bool }
DoubleTransactionDetector is able to detect if a transaction hash is present more than once in a block body
type ESDTPauseHandler ¶
ESDTPauseHandler provides IsPaused function for an ESDT token
type ESDTRoleHandler ¶
type ESDTRoleHandler interface { CheckAllowedToExecute(account state.UserAccountHandler, tokenID []byte, action []byte) error IsInterfaceNil() bool }
ESDTRoleHandler provides IsAllowedToExecute function for an ESDT
type EconomicsDataHandler ¶
type EconomicsDataHandler interface { SetStatusHandler(statusHandler core.AppStatusHandler) error IsInterfaceNil() bool // contains filtered or unexported methods }
EconomicsDataHandler provides some economics related computation and read access to economics data
type EnableRoundsHandler ¶
EnableRoundsHandler is an interface which can be queried to check for round activation features/fixes
type EndOfEpochEconomics ¶
type EndOfEpochEconomics interface { ComputeEndOfEpochEconomics(metaBlock *block.MetaBlock) (*block.Economics, error) VerifyRewardsPerBlock(metaBlock *block.MetaBlock, correctedProtocolSustainability *big.Int, computedEconomics *block.Economics) error IsInterfaceNil() bool }
EndOfEpochEconomics defines the functionality that is needed to compute end of epoch economics data
type EpochBootstrapper ¶
EpochBootstrapper defines the actions needed by bootstrapper
type EpochHandler ¶
EpochHandler defines what a component which handles current epoch should be able to do
type EpochNotifier ¶
type EpochNotifier interface { // TODO RoundSubscriberHandler should be move to elrond-core RegisterNotifyHandler(handler vmcommon.EpochSubscriberHandler) CurrentEpoch() uint32 CheckEpoch(header data.HeaderHandler) IsInterfaceNil() bool }
EpochNotifier can notify upon an epoch change and provide the current epoch
type EpochStartDataCreator ¶
type EpochStartDataCreator interface { CreateEpochStartData() (*block.EpochStart, error) VerifyEpochStartDataForMetablock(metaBlock *block.MetaBlock) error IsInterfaceNil() bool }
EpochStartDataCreator defines the functionality for node to create epoch start data
type EpochStartEventNotifier ¶
type EpochStartEventNotifier interface { RegisterHandler(handler epochStart.ActionHandler) UnregisterHandler(handler epochStart.ActionHandler) IsInterfaceNil() bool }
EpochStartEventNotifier provides Register and Unregister functionality for the end of epoch events
type EpochStartSystemSCProcessor ¶
type EpochStartSystemSCProcessor interface { ProcessSystemSmartContract(validatorInfos map[uint32][]*state.ValidatorInfo, nonce uint64, epoch uint32) error ProcessDelegationRewards( miniBlocks block.MiniBlockSlice, rewardTxs epochStart.TransactionCacher, ) error ToggleUnStakeUnBond(value bool) error IsInterfaceNil() bool }
EpochStartSystemSCProcessor defines the functionality for the metachain to process system smart contract and end of epoch
type EpochStartTriggerHandler ¶
type EpochStartTriggerHandler interface { Update(round uint64, nonce uint64) IsEpochStart() bool Epoch() uint32 MetaEpoch() uint32 EpochStartRound() uint64 SetProcessed(header data.HeaderHandler, body data.BodyHandler) RevertStateToBlock(header data.HeaderHandler) error EpochStartMetaHdrHash() []byte GetSavedStateKey() []byte LoadState(key []byte) error IsInterfaceNil() bool SetFinalityAttestingRound(round uint64) EpochFinalityAttestingRound() uint64 RequestEpochStartIfNeeded(interceptedHeader data.HeaderHandler) }
EpochStartTriggerHandler defines that actions which are needed by processor for start of epoch
type EpochStartValidatorInfoCreator ¶
type EpochStartValidatorInfoCreator interface { CreateValidatorInfoMiniBlocks(validatorInfo map[uint32][]*state.ValidatorInfo) (block.MiniBlockSlice, error) VerifyValidatorInfoMiniBlocks(miniBlocks []*block.MiniBlock, validatorsInfo map[uint32][]*state.ValidatorInfo) error GetLocalValidatorInfoCache() epochStart.ValidatorInfoCacher CreateMarshalledData(body *block.Body) map[string][][]byte GetValidatorInfoTxs(body *block.Body) map[string]*state.ShardValidatorInfo SaveBlockDataToStorage(metaBlock data.HeaderHandler, body *block.Body) DeleteBlockDataFromStorage(metaBlock data.HeaderHandler, body *block.Body) RemoveBlockDataFromPools(metaBlock data.HeaderHandler, body *block.Body) IsInterfaceNil() bool }
EpochStartValidatorInfoCreator defines the functionality for the metachain to create validator statistics at end of epoch
type FallbackHeaderValidator ¶
type FallbackHeaderValidator interface { ShouldApplyFallbackValidation(headerHandler data.HeaderHandler) bool IsInterfaceNil() bool }
FallbackHeaderValidator defines the behaviour of a component able to signal when a fallback header validation could be applied
type FeeHandler ¶
type FeeHandler interface { IsInterfaceNil() bool // contains filtered or unexported methods }
FeeHandler is able to perform some economics calculation on a provided transaction
type FloodPreventer ¶
type FloodPreventer interface { IncreaseLoad(pid core.PeerID, size uint64) error ApplyConsensusSize(size int) Reset() IsInterfaceNil() bool }
FloodPreventer defines the behavior of a component that is able to signal that too many events occurred on a provided identifier between Reset calls
type ForkDetector ¶
type ForkDetector interface { AddHeader(header data.HeaderHandler, headerHash []byte, state BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte) error RemoveHeader(nonce uint64, hash []byte) CheckFork() *ForkInfo GetHighestFinalBlockNonce() uint64 GetHighestFinalBlockHash() []byte ProbableHighestNonce() uint64 ResetFork() SetRollBackNonce(nonce uint64) RestoreToGenesis() GetNotarizedHeaderHash(nonce uint64) []byte ResetProbableHighestNonce() SetFinalToLastCheckpoint() IsInterfaceNil() bool }
ForkDetector is an interface that defines the behaviour of a struct that is able to detect forks
type GasCost ¶
type GasCost struct { BaseOperationCost BaseOperationCost BuiltInCost BuiltInCost }
GasCost holds all the needed gas costs for system smart contracts
type GasHandler ¶
type GasHandler interface { Init() Reset(key []byte) SetGasProvided(gasProvided uint64, hash []byte) SetGasProvidedAsScheduled(gasProvided uint64, hash []byte) SetGasRefunded(gasRefunded uint64, hash []byte) SetGasPenalized(gasPenalized uint64, hash []byte) GasProvided(hash []byte) uint64 GasProvidedAsScheduled(hash []byte) uint64 GasRefunded(hash []byte) uint64 GasPenalized(hash []byte) uint64 TotalGasProvided() uint64 TotalGasProvidedAsScheduled() uint64 TotalGasProvidedWithScheduled() uint64 TotalGasRefunded() uint64 TotalGasPenalized() uint64 RemoveGasProvided(hashes [][]byte) RemoveGasProvidedAsScheduled(hashes [][]byte) RemoveGasRefunded(hashes [][]byte) RemoveGasPenalized(hashes [][]byte) RestoreGasSinceLastReset(key []byte) ComputeGasProvidedByMiniBlock(*block.MiniBlock, map[string]data.TransactionHandler) (uint64, uint64, error) ComputeGasProvidedByTx(txSenderShardId uint32, txReceiverShardId uint32, txHandler data.TransactionHandler) (uint64, uint64, error) IsInterfaceNil() bool }
GasHandler is able to perform some gas calculation
type GuardedAccountHandler ¶ added in v1.5.0
type GuardedAccountHandler interface { GetActiveGuardian(handler vmcommon.UserAccountHandler) ([]byte, error) HasActiveGuardian(uah state.UserAccountHandler) bool HasPendingGuardian(uah state.UserAccountHandler) bool SetGuardian(uah vmcommon.UserAccountHandler, guardianAddress []byte, txGuardianAddress []byte, guardianServiceUID []byte) error CleanOtherThanActive(uah vmcommon.UserAccountHandler) GetConfiguredGuardians(uah state.UserAccountHandler) (active *guardians.Guardian, pending *guardians.Guardian, err error) IsInterfaceNil() bool }
GuardedAccountHandler allows setting and getting the configured account guardian
type GuardianChecker ¶ added in v1.5.0
type GuardianChecker interface { GetActiveGuardian(handler vmcommon.UserAccountHandler) ([]byte, error) HasActiveGuardian(uah state.UserAccountHandler) bool HasPendingGuardian(uah state.UserAccountHandler) bool IsInterfaceNil() bool }
GuardianChecker can check an account guardian
type HashAccesser ¶
HashAccesser interface provides functionality over hashable objects
type HdrValidatorHandler ¶
type HdrValidatorHandler interface { Hash() []byte HeaderHandler() data.HeaderHandler }
HdrValidatorHandler defines the functionality that is needed for a HdrValidator to validate a header
type HeaderConstructionValidator ¶
type HeaderConstructionValidator interface { IsHeaderConstructionValid(currHdr, prevHdr data.HeaderHandler) error IsInterfaceNil() bool }
HeaderConstructionValidator provides functionality to verify header construction
type HeaderIntegrityVerifier ¶
type HeaderIntegrityVerifier interface { Verify(header data.HeaderHandler) error GetVersion(epoch uint32) string IsInterfaceNil() bool }
HeaderIntegrityVerifier encapsulates methods useful to check that a header's integrity is correct
type InterceptedChunksProcessor ¶
type InterceptedChunksProcessor interface { CheckBatch(b *batch.Batch, whiteListHandler WhiteListHandler) (CheckedChunkResult, error) Close() error IsInterfaceNil() bool }
InterceptedChunksProcessor defines the component that is able to process chunks of intercepted data
type InterceptedData ¶
type InterceptedData interface { CheckValidity() error IsForCurrentShard() bool IsInterfaceNil() bool Hash() []byte Type() string Identifiers() [][]byte String() string }
InterceptedData represents the interceptor's view of the received data
type InterceptedDataFactory ¶
type InterceptedDataFactory interface { Create(buff []byte) (InterceptedData, error) IsInterfaceNil() bool }
InterceptedDataFactory can create new instances of InterceptedData
type InterceptedDebugger ¶
type InterceptedDebugger interface { LogReceivedHashes(topic string, hashes [][]byte) LogProcessedHashes(topic string, hashes [][]byte, err error) IsInterfaceNil() bool }
InterceptedDebugger defines an interface for debugging the intercepted data
type InterceptedHeaderSigVerifier ¶
type InterceptedHeaderSigVerifier interface { VerifyRandSeedAndLeaderSignature(header data.HeaderHandler) error VerifyRandSeed(header data.HeaderHandler) error VerifyLeaderSignature(header data.HeaderHandler) error VerifySignature(header data.HeaderHandler) error IsInterfaceNil() bool }
InterceptedHeaderSigVerifier is the interface needed at interceptors level to check that a header's signature is correct
type InterceptedSignedTransactionHandler ¶ added in v1.5.0
type InterceptedSignedTransactionHandler interface { InterceptedTransactionHandler GetTxMessageForSignatureVerification() ([]byte, error) }
InterceptedSignedTransactionHandler provides additional handling for signed transactions
type InterceptedTransactionHandler ¶ added in v1.5.0
type InterceptedTransactionHandler interface { SenderShardId() uint32 ReceiverShardId() uint32 Nonce() uint64 SenderAddress() []byte Fee() *big.Int Transaction() data.TransactionHandler }
InterceptedTransactionHandler defines an intercepted data wrapper over transaction handler that has receiver and sender shard getters
type Interceptor ¶
type Interceptor interface { ProcessReceivedMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID, source p2p.MessageHandler) error SetInterceptedDebugHandler(handler InterceptedDebugger) error RegisterHandler(handler func(topic string, hash []byte, data interface{})) Close() error IsInterfaceNil() bool }
Interceptor defines what a data interceptor should do It should also adhere to the p2p.MessageProcessor interface so it can wire to a p2p.Messenger
type InterceptorProcessor ¶
type InterceptorProcessor interface { Validate(data InterceptedData, fromConnectedPeer core.PeerID) error Save(data InterceptedData, fromConnectedPeer core.PeerID, topic string) error RegisterHandler(handler func(topic string, hash []byte, data interface{})) IsInterfaceNil() bool }
InterceptorProcessor further validates and saves received data
type InterceptorThrottler ¶
type InterceptorThrottler interface { CanProcess() bool StartProcessing() EndProcessing() IsInterfaceNil() bool }
InterceptorThrottler can monitor the number of the currently running interceptor go routines
type InterceptorsContainer ¶
type InterceptorsContainer interface { Get(key string) (Interceptor, error) Add(key string, val Interceptor) error AddMultiple(keys []string, interceptors []Interceptor) error Replace(key string, val Interceptor) error Remove(key string) Len() int Iterate(handler func(key string, interceptor Interceptor) bool) Close() error IsInterfaceNil() bool }
InterceptorsContainer defines an interceptors holder data type with basic functionality
type InterceptorsContainerFactory ¶
type InterceptorsContainerFactory interface { Create() (InterceptorsContainer, InterceptorsContainer, error) IsInterfaceNil() bool }
InterceptorsContainerFactory defines the functionality to create an interceptors container
type IntermediateProcessorContainer ¶
type IntermediateProcessorContainer interface { Get(key block.Type) (IntermediateTransactionHandler, error) Add(key block.Type, val IntermediateTransactionHandler) error AddMultiple(keys []block.Type, preprocessors []IntermediateTransactionHandler) error Replace(key block.Type, val IntermediateTransactionHandler) error Remove(key block.Type) Len() int Keys() []block.Type IsInterfaceNil() bool }
IntermediateProcessorContainer defines an IntermediateProcessor holder data type with basic functionality
type IntermediateProcessorsContainerFactory ¶
type IntermediateProcessorsContainerFactory interface { Create() (IntermediateProcessorContainer, error) IsInterfaceNil() bool }
IntermediateProcessorsContainerFactory defines the functionality to create an IntermediateProcessors container
type IntermediateTransactionHandler ¶
type IntermediateTransactionHandler interface { AddIntermediateTransactions(txs []data.TransactionHandler) error GetNumOfCrossInterMbsAndTxs() (int, int) CreateAllInterMiniBlocks() []*block.MiniBlock VerifyInterMiniBlocks(body *block.Body) error SaveCurrentIntermediateTxToStorage() GetAllCurrentFinishedTxs() map[string]data.TransactionHandler CreateBlockStarted() GetCreatedInShardMiniBlock() *block.MiniBlock RemoveProcessedResults(key []byte) [][]byte InitProcessedResults(key []byte) IsInterfaceNil() bool }
IntermediateTransactionHandler handles transactions which are not resolved in only one step
type MiniBlockProvider ¶
type MiniBlockProvider interface { GetMiniBlocks(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte) GetMiniBlocksFromPool(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte) GetMiniBlocksFromStorer(hashes [][]byte) ([]*block.MiniblockAndHash, [][]byte) IsInterfaceNil() bool }
MiniBlockProvider defines what a miniblock data provider should do
type NetworkConnectionWatcher ¶
NetworkConnectionWatcher defines a watchdog functionality used to specify if the current node is still connected to the rest of the network
type NetworkShardingCollector ¶
type NetworkShardingCollector interface { PeerShardMapper UpdatePeerIDInfo(pid core.PeerID, pk []byte, shardID uint32) }
NetworkShardingCollector defines the updating methods used by the network sharding component
type NodesCoordinator ¶
type NodesCoordinator interface { GetValidatorWithPublicKey(publicKey []byte) (validator nodesCoordinator.Validator, shardId uint32, err error) GetAllEligibleValidatorsPublicKeys(epoch uint32) (map[uint32][][]byte, error) GetAllWaitingValidatorsPublicKeys(epoch uint32) (map[uint32][][]byte, error) GetAllLeavingValidatorsPublicKeys(epoch uint32) (map[uint32][][]byte, error) IsInterfaceNil() bool }
NodesCoordinator provides Validator methods needed for the peer processing
type NumConnectedPeersProvider ¶
NumConnectedPeersProvider defines the actions that a component that provides the number of connected peers should do
type P2PAntifloodHandler ¶
type P2PAntifloodHandler interface { CanProcessMessage(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error CanProcessMessagesOnTopic(pid core.PeerID, topic string, numMessages uint32, totalSize uint64, sequence []byte) error ApplyConsensusSize(size int) SetDebugger(debugger AntifloodDebugger) error BlacklistPeer(peer core.PeerID, reason string, duration time.Duration) IsOriginatorEligibleForTopic(pid core.PeerID, topic string) error IsInterfaceNil() bool Close() error }
P2PAntifloodHandler defines the behavior of a component able to signal that the system is too busy (or flooded) processing p2p messages
type PayableHandler ¶
type PayableHandler interface { IsPayable(sndAddress []byte, recvAddress []byte) (bool, error) IsInterfaceNil() bool }
PayableHandler provides IsPayable function which returns if an account is payable or not
type PeerAuthenticationPayloadValidator ¶
type PeerAuthenticationPayloadValidator interface { ValidateTimestamp(payloadTimestamp int64) error IsInterfaceNil() bool }
PeerAuthenticationPayloadValidator defines the operations supported by an entity able to validate timestamps found in peer authentication messages
type PeerBlackListCacher ¶
type PeerBlackListCacher interface { Upsert(pid core.PeerID, span time.Duration) error Has(pid core.PeerID) bool Sweep() IsInterfaceNil() bool }
PeerBlackListCacher can determine if a certain peer id is or not blacklisted
type PeerChangesHandler ¶
type PeerChangesHandler interface { PeerChanges() []block.PeerData VerifyPeerChanges(peerChanges []block.PeerData) error IsInterfaceNil() bool }
PeerChangesHandler will create the peer changes data for current block and will verify them
type PeerShardMapper ¶
type PeerShardMapper interface { UpdatePeerIDPublicKeyPair(pid core.PeerID, pk []byte) PutPeerIdShardId(pid core.PeerID, shardID uint32) PutPeerIdSubType(pid core.PeerID, peerSubType core.P2PPeerSubType) GetPeerInfo(pid core.PeerID) core.P2PPeerInfo IsInterfaceNil() bool }
PeerShardMapper can return the public key of a provided peer ID
type PeerValidatorMapper ¶
type PeerValidatorMapper interface { GetPeerInfo(pid core.PeerID) core.P2PPeerInfo IsInterfaceNil() bool }
PeerValidatorMapper can determine the peer info from a peer id
type PendingMiniBlocksHandler ¶
type PendingMiniBlocksHandler interface { AddProcessedHeader(handler data.HeaderHandler) error RevertHeader(handler data.HeaderHandler) error GetPendingMiniBlocks(shardID uint32) [][]byte SetPendingMiniBlocks(shardID uint32, mbHashes [][]byte) IsInterfaceNil() bool }
PendingMiniBlocksHandler is an interface to keep unfinalized miniblocks
type PoolsCleaner ¶
PoolsCleaner defines the functionality to clean pools for old records
type PreProcessor ¶
type PreProcessor interface { CreateBlockStarted() IsDataPrepared(requestedTxs int, haveTime func() time.Duration) error RemoveBlockDataFromPools(body *block.Body, miniBlockPool storage.Cacher) error RemoveTxsFromPools(body *block.Body) error RestoreBlockDataIntoPools(body *block.Body, miniBlockPool storage.Cacher) (int, error) SaveTxsToStorage(body *block.Body) error ProcessBlockTransactions(header data.HeaderHandler, body *block.Body, haveTime func() bool) error RequestBlockTransactions(body *block.Body) int RequestTransactionsForMiniBlock(miniBlock *block.MiniBlock) int ProcessMiniBlock(miniBlock *block.MiniBlock, haveTime func() bool, haveAdditionalTime func() bool, scheduledMode bool, partialMbExecutionMode bool, indexOfLastTxProcessed int, preProcessorExecutionInfoHandler PreProcessorExecutionInfoHandler) ([][]byte, int, bool, error) CreateAndProcessMiniBlocks(haveTime func() bool, randomness []byte) (block.MiniBlockSlice, error) GetAllCurrentUsedTxs() map[string]data.TransactionHandler AddTxsFromMiniBlocks(miniBlocks block.MiniBlockSlice) AddTransactions(txHandlers []data.TransactionHandler) IsInterfaceNil() bool }
PreProcessor is an interface used to prepare and process transaction data
type PreProcessorExecutionInfoHandler ¶
type PreProcessorExecutionInfoHandler interface { GetNumOfCrossInterMbsAndTxs() (int, int) InitProcessedTxsResults(key []byte) RevertProcessedTxsResults(txHashes [][]byte, key []byte) }
PreProcessorExecutionInfoHandler handles pre processor execution info needed by the transactions preprocessors
type PreProcessorsContainer ¶
type PreProcessorsContainer interface { Get(key block.Type) (PreProcessor, error) Add(key block.Type, val PreProcessor) error AddMultiple(keys []block.Type, preprocessors []PreProcessor) error Replace(key block.Type, val PreProcessor) error Remove(key block.Type) Len() int Keys() []block.Type IsInterfaceNil() bool }
PreProcessorsContainer defines an PreProcessors holder data type with basic functionality
type PreProcessorsContainerFactory ¶
type PreProcessorsContainerFactory interface { Create() (PreProcessorsContainer, error) IsInterfaceNil() bool }
PreProcessorsContainerFactory defines the functionality to create an PreProcessors container
type PreferredPeersHolderHandler ¶
type PreferredPeersHolderHandler interface { Get() map[uint32][]core.PeerID Contains(peerID core.PeerID) bool IsInterfaceNil() bool }
PreferredPeersHolderHandler defines the behavior of a component able to handle preferred peers operations
type ProcessedMiniBlocksTracker ¶
type ProcessedMiniBlocksTracker interface { SetProcessedMiniBlockInfo(metaBlockHash []byte, miniBlockHash []byte, processedMbInfo *processedMb.ProcessedMiniBlockInfo) RemoveMetaBlockHash(metaBlockHash []byte) RemoveMiniBlockHash(miniBlockHash []byte) GetProcessedMiniBlocksInfo(metaBlockHash []byte) map[string]*processedMb.ProcessedMiniBlockInfo GetProcessedMiniBlockInfo(miniBlockHash []byte) (*processedMb.ProcessedMiniBlockInfo, []byte) IsMiniBlockFullyProcessed(metaBlockHash []byte, miniBlockHash []byte) bool ConvertProcessedMiniBlocksMapToSlice() []bootstrapStorage.MiniBlocksInMeta ConvertSliceToProcessedMiniBlocksMap(miniBlocksInMetaBlocks []bootstrapStorage.MiniBlocksInMeta) DisplayProcessedMiniBlocks() IsInterfaceNil() bool }
ProcessedMiniBlocksTracker handles tracking of processed mini blocks
type RatingChanceHandler ¶
type RatingChanceHandler interface { // GetMaxThreshold returns the threshold until this ChancePercentage holds GetMaxThreshold() uint32 // GetChancePercentage returns the percentage for the RatingChanceHandler GetChancePercentage() uint32 // IsInterfaceNil verifies if the interface is nil IsInterfaceNil() bool }
RatingChanceHandler provides the methods needed for the computation of chances from the Rating
type RatingsInfoHandler ¶
type RatingsInfoHandler interface { StartRating() uint32 MaxRating() uint32 MinRating() uint32 SignedBlocksThreshold() float32 MetaChainRatingsStepHandler() RatingsStepHandler ShardChainRatingsStepHandler() RatingsStepHandler SelectionChances() []SelectionChance IsInterfaceNil() bool }
RatingsInfoHandler defines the information needed for the rating computation
type RatingsStepHandler ¶
type RatingsStepHandler interface { ProposerIncreaseRatingStep() int32 ProposerDecreaseRatingStep() int32 ValidatorIncreaseRatingStep() int32 ValidatorDecreaseRatingStep() int32 ConsecutiveMissedBlocksPenalty() float32 }
RatingsStepHandler defines the information needed for the rating computation on shards or meta
type RequestBlockBodyHandler ¶
type RequestBlockBodyHandler interface {
GetBlockBodyFromPool(headerHandler data.HeaderHandler) (data.BodyHandler, error)
}
RequestBlockBodyHandler is the interface needed by process block
type RequestHandler ¶
type RequestHandler interface { SetEpoch(epoch uint32) RequestShardHeader(shardID uint32, hash []byte) RequestMetaHeader(hash []byte) RequestMetaHeaderByNonce(nonce uint64) RequestShardHeaderByNonce(shardID uint32, nonce uint64) RequestTransaction(destShardID uint32, txHashes [][]byte) RequestUnsignedTransactions(destShardID uint32, scrHashes [][]byte) RequestRewardTransactions(destShardID uint32, txHashes [][]byte) RequestMiniBlock(destShardID uint32, miniblockHash []byte) RequestMiniBlocks(destShardID uint32, miniblocksHashes [][]byte) RequestTrieNodes(destShardID uint32, hashes [][]byte, topic string) RequestStartOfEpochMetaBlock(epoch uint32) RequestInterval() time.Duration SetNumPeersToQuery(key string, intra int, cross int) error GetNumPeersToQuery(key string) (int, int, error) RequestTrieNode(requestHash []byte, topic string, chunkIndex uint32) CreateTrieNodeIdentifier(requestHash []byte, chunkIndex uint32) []byte RequestPeerAuthenticationsByHashes(destShardID uint32, hashes [][]byte) RequestValidatorInfo(hash []byte) RequestValidatorsInfo(hashes [][]byte) IsInterfaceNil() bool }
RequestHandler defines the methods through which request to data can be made
type RequiredDataPool ¶
type RequiredDataPool struct {
// contains filtered or unexported fields
}
RequiredDataPool represents a structure that can hold a list of required data. Any time one of the expected hash value is received, the associated bit in the receivedBitmap property is set to 1. All the data is considered received when the ones count of the received bitmap is equal to the expected data length
func (*RequiredDataPool) ExpectedData ¶
func (rh *RequiredDataPool) ExpectedData() [][]byte
ExpectedData returns the RequiredDataPool's expected data
func (*RequiredDataPool) ReceivedAll ¶
func (rh *RequiredDataPool) ReceivedAll() bool
ReceivedAll will return true if the count of ones in the bitmap is greater or equal to the expected data length
func (*RequiredDataPool) SetHashes ¶
func (rh *RequiredDataPool) SetHashes(hashes [][]byte)
SetHashes sets the expected data to the passed hashes parameter. The bitmap is also reset and adapted to the length of the new expected data
func (*RequiredDataPool) SetReceivedHash ¶
func (rh *RequiredDataPool) SetReceivedHash(hash []byte)
SetReceivedHash finds the hash in the expected values and sets the appropriate bit to 1. Nothing will happen if the hash is not actually expected
type RewardTransactionPreProcessor ¶
type RewardTransactionPreProcessor interface { AddComputedRewardMiniBlocks(computedRewardMiniblocks block.MiniBlockSlice) IsInterfaceNil() bool }
RewardTransactionPreProcessor prepares the processing of reward transactions
type RewardTransactionProcessor ¶
type RewardTransactionProcessor interface { ProcessRewardTransaction(rewardTx *rewardTx.RewardTx) error IsInterfaceNil() bool }
RewardTransactionProcessor is the interface for reward transaction execution engine
type RewardsCreator ¶
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() epochStart.TransactionCacher CreateMarshalledData(body *block.Body) map[string][][]byte GetRewardsTxs(body *block.Body) map[string]data.TransactionHandler SaveBlockDataToStorage(metaBlock data.MetaHeaderHandler, body *block.Body) DeleteBlockDataFromStorage(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 RewardsHandler ¶
type RewardsHandler interface { IsInterfaceNil() bool // contains filtered or unexported methods }
RewardsHandler will return information about rewards
type RoundHandler ¶
RoundHandler defines the actions which should be handled by a round implementation
type RoundNotifier ¶ added in v1.6.0
type RoundNotifier interface { RegisterNotifyHandler(handler vmcommon.RoundSubscriberHandler) CurrentRound() uint64 CheckRound(header data.HeaderHandler) IsInterfaceNil() bool }
RoundNotifier can notify upon an epoch change and provide the current epoch
type RoundTimeDurationHandler ¶
RoundTimeDurationHandler defines the methods to get the time duration of a round
type SCQuery ¶
type SCQuery struct { ScAddress []byte FuncName string CallerAddr []byte CallValue *big.Int Arguments [][]byte SameScState bool ShouldBeSynced bool BlockNonce core.OptionalUint64 BlockHash []byte }
SCQuery represents a prepared query for executing a function of the smart contract
type SCQueryService ¶
type SCQueryService interface { ExecuteQuery(query *SCQuery) (*vmcommon.VMOutput, common.BlockInfo, error) ComputeScCallGasLimit(tx *transaction.Transaction) (uint64, error) Close() error IsInterfaceNil() bool }
SCQueryService defines how data should be get from a SC account
type ScheduledBlockProcessor ¶
type ScheduledBlockProcessor interface { ProcessScheduledBlock(header data.HeaderHandler, body data.BodyHandler, haveTime func() time.Duration) error IsInterfaceNil() bool }
ScheduledBlockProcessor is the interface for the scheduled miniBlocks execution part of the block processor
type ScheduledInfo ¶
type ScheduledInfo struct { RootHash []byte IntermediateTxs map[block.Type][]data.TransactionHandler GasAndFees scheduled.GasAndFees MiniBlocks block.MiniBlockSlice }
ScheduledInfo holds all the info needed for scheduled SC execution
type ScheduledTxsExecutionHandler ¶
type ScheduledTxsExecutionHandler interface { Init() AddScheduledTx(txHash []byte, tx data.TransactionHandler) bool AddScheduledMiniBlocks(miniBlocks block.MiniBlockSlice) Execute(txHash []byte) error ExecuteAll(haveTime func() time.Duration) error GetScheduledIntermediateTxs() map[block.Type][]data.TransactionHandler GetScheduledMiniBlocks() block.MiniBlockSlice GetScheduledGasAndFees() scheduled.GasAndFees SetScheduledInfo(scheduledInfo *ScheduledInfo) GetScheduledRootHashForHeader(headerHash []byte) ([]byte, error) GetScheduledRootHashForHeaderWithEpoch(headerHash []byte, epoch uint32) ([]byte, error) RollBackToBlock(headerHash []byte) error SaveStateIfNeeded(headerHash []byte) SaveState(headerHash []byte, scheduledInfo *ScheduledInfo) GetScheduledRootHash() []byte SetScheduledRootHash(rootHash []byte) SetScheduledGasAndFees(gasAndFees scheduled.GasAndFees) SetTransactionProcessor(txProcessor TransactionProcessor) SetTransactionCoordinator(txCoordinator TransactionCoordinator) IsScheduledTx(txHash []byte) bool IsMiniBlockExecuted(mbHash []byte) bool IsInterfaceNil() bool }
ScheduledTxsExecutionHandler defines the functionality for execution of scheduled transactions
type SelectionChance ¶
SelectionChance defines the actions which should be handled by a round implementation
type ShardedCacheSearchMethod ¶
type ShardedCacheSearchMethod byte
ShardedCacheSearchMethod defines the algorithm for searching through a sharded cache
const ( // SearchMethodJustPeek will make the algorithm invoke just Peek method SearchMethodJustPeek ShardedCacheSearchMethod = iota // SearchMethodSearchFirst will make the algorithm invoke just SearchFirst method SearchMethodSearchFirst // SearchMethodPeekWithFallbackSearchFirst will first try a Peek method. If the data is not found will fall back // to SearchFirst method SearchMethodPeekWithFallbackSearchFirst )
func (ShardedCacheSearchMethod) ToString ¶
func (method ShardedCacheSearchMethod) ToString() string
ToString converts the ShardedCacheSearchMethod to its string representation
type ShardedPool ¶ added in v1.5.0
type ShardedPool interface {
AddData(key []byte, data interface{}, sizeInBytes int, cacheID string)
}
ShardedPool is a perspective of the sharded data pool
type SigVerifier ¶
type SigVerifier interface {
VerifySig() error
}
SigVerifier provides functionality to verify a signature of a signed data structure that holds also the verifying parameters
type SignaturesHandler ¶
type SignaturesHandler interface { Verify(payload []byte, pid core.PeerID, signature []byte) error IsInterfaceNil() bool }
SignaturesHandler defines the behavior of a struct able to handle signatures
type SignedDataValidator ¶
type SignedDataValidator interface { SigVerifier Checker }
SignedDataValidator provides functionality to check the validity and signature of a data structure
type SmartContractProcessor ¶
type SmartContractProcessor interface { ExecuteSmartContractTransaction(tx data.TransactionHandler, acntSrc, acntDst state.UserAccountHandler) (vmcommon.ReturnCode, error) ExecuteBuiltInFunction(tx data.TransactionHandler, acntSrc, acntDst state.UserAccountHandler) (vmcommon.ReturnCode, error) DeploySmartContract(tx data.TransactionHandler, acntSrc state.UserAccountHandler) (vmcommon.ReturnCode, error) ProcessIfError(acntSnd state.UserAccountHandler, txHash []byte, tx data.TransactionHandler, returnCode string, returnMessage []byte, snapshot int, gasLocked uint64) error IsPayable(sndAddress []byte, recvAddress []byte) (bool, error) CheckBuiltinFunctionIsExecutable(expectedBuiltinFunction string, tx data.TransactionHandler) error IsInterfaceNil() bool }
SmartContractProcessor is the main interface for the smart contract caller engine
type SmartContractProcessorFacade ¶ added in v1.6.0
type SmartContractProcessorFacade interface { SmartContractProcessor SmartContractResultProcessor }
SmartContractProcessorFacade is the main interface for smart contract result execution engine
type SmartContractProcessorFull ¶ added in v1.6.0
type SmartContractProcessorFull interface { SmartContractProcessor SmartContractResultProcessor }
SmartContractProcessorFull is the main interface for smart contract result execution engine
type SmartContractResultProcessor ¶
type SmartContractResultProcessor interface { ProcessSmartContractResult(scr *smartContractResult.SmartContractResult) (vmcommon.ReturnCode, error) IsInterfaceNil() bool }
SmartContractResultProcessor is the main interface for smart contract result execution engine
type SmartContractToProtocolHandler ¶
type SmartContractToProtocolHandler interface { UpdateProtocol(body *block.Body, nonce uint64) error IsInterfaceNil() bool }
SmartContractToProtocolHandler is able to translate data from smart contract state into protocol changes
type StatusCoreComponentsHolder ¶
type StatusCoreComponentsHolder interface { AppStatusHandler() core.AppStatusHandler IsInterfaceNil() bool }
StatusCoreComponentsHolder holds the status core components
type StorageArgumentsParser ¶
type StorageArgumentsParser interface { CreateDataFromStorageUpdate(storageUpdates []*vmcommon.StorageUpdate) string GetStorageUpdates(data string) ([]*vmcommon.StorageUpdate, error) IsInterfaceNil() bool }
StorageArgumentsParser defines the functionality to parse transaction data into call arguments
type TimeCacher ¶
type TimeCacher interface { Add(key string) error Upsert(key string, span time.Duration) error Has(key string) bool Sweep() Len() int IsInterfaceNil() bool }
TimeCacher defines the cache that can keep a record for a bounded time
type TopicFloodPreventer ¶
type TopicFloodPreventer interface { IncreaseLoad(pid core.PeerID, topic string, numMessages uint32) error ResetForTopic(topic string) ResetForNotRegisteredTopics() SetMaxMessagesForTopic(topic string, maxNum uint32) IsInterfaceNil() bool }
TopicFloodPreventer defines the behavior of a component that is able to signal that too many events occurred on a provided identifier between Reset calls, on a given topic
type TopicHandler ¶
type TopicHandler interface { HasTopic(name string) bool CreateTopic(name string, createChannelForTopic bool) error RegisterMessageProcessor(topic string, identifier string, handler p2p.MessageProcessor) error ID() core.PeerID IsInterfaceNil() bool }
TopicHandler defines the functionality needed by structs to manage topics and message processors
type TransactionCoordinator ¶
type TransactionCoordinator interface { RequestMiniBlocks(header data.HeaderHandler) RequestBlockTransactions(body *block.Body) IsDataPreparedForProcessing(haveTime func() time.Duration) error SaveTxsToStorage(body *block.Body) RestoreBlockDataFromStorage(body *block.Body) (int, error) RemoveBlockDataFromPool(body *block.Body) error RemoveTxsFromPool(body *block.Body) error ProcessBlockTransaction(header data.HeaderHandler, body *block.Body, haveTime func() time.Duration) error CreateBlockStarted() CreateMbsAndProcessCrossShardTransactionsDstMe(header data.HeaderHandler, processedMiniBlocksInfo map[string]*processedMb.ProcessedMiniBlockInfo, haveTime func() bool, haveAdditionalTime func() bool, scheduledMode bool) (block.MiniBlockSlice, uint32, bool, error) CreateMbsAndProcessTransactionsFromMe(haveTime func() bool, randomness []byte) block.MiniBlockSlice CreatePostProcessMiniBlocks() block.MiniBlockSlice CreateMarshalizedData(body *block.Body) map[string][][]byte GetAllCurrentUsedTxs(blockType block.Type) map[string]data.TransactionHandler GetAllCurrentLogs() []*data.LogData CreateReceiptsHash() ([]byte, error) VerifyCreatedBlockTransactions(hdr data.HeaderHandler, body *block.Body) error GetCreatedInShardMiniBlocks() []*block.MiniBlock VerifyCreatedMiniBlocks(hdr data.HeaderHandler, body *block.Body) error AddIntermediateTransactions(mapSCRs map[block.Type][]data.TransactionHandler) error GetAllIntermediateTxs() map[block.Type]map[string]data.TransactionHandler AddTxsFromMiniBlocks(miniBlocks block.MiniBlockSlice) AddTransactions(txHandlers []data.TransactionHandler, blockType block.Type) IsInterfaceNil() bool }
TransactionCoordinator is an interface to coordinate transaction processing using multiple processors
type TransactionFeeHandler ¶
type TransactionFeeHandler interface { CreateBlockStarted(gasAndFees scheduled.GasAndFees) GetAccumulatedFees() *big.Int GetDeveloperFees() *big.Int ProcessTransactionFee(cost *big.Int, devFee *big.Int, txHash []byte) ProcessTransactionFeeRelayedUserTx(cost *big.Int, devFee *big.Int, userTxHash []byte, originalTxHash []byte) RevertFees(txHashes [][]byte) IsInterfaceNil() bool }
TransactionFeeHandler processes the transaction fee
type TransactionLogProcessor ¶
type TransactionLogProcessor interface { GetAllCurrentLogs() []*data.LogData GetLog(txHash []byte) (data.LogHandler, error) SaveLog(txHash []byte, tx data.TransactionHandler, vmLogs []*vmcommon.LogEntry) error Clean() IsInterfaceNil() bool }
TransactionLogProcessor is the main interface for saving logs generated by smart contract calls
type TransactionLogProcessorDatabase ¶
type TransactionLogProcessorDatabase interface { GetLogFromCache(txHash []byte) (*data.LogData, bool) EnableLogToBeSavedInCache() Clean() IsInterfaceNil() bool }
TransactionLogProcessorDatabase is interface the for saving logs also in RAM
type TransactionProcessor ¶
type TransactionProcessor interface { ProcessTransaction(transaction *transaction.Transaction) (vmcommon.ReturnCode, error) VerifyTransaction(transaction *transaction.Transaction) error IsInterfaceNil() bool }
TransactionProcessor is the main interface for transaction execution engine
type TransactionType ¶
type TransactionType int
TransactionType specifies the type of the transaction
const ( // MoveBalance defines ID of a payment transaction - moving balances MoveBalance TransactionType = iota // SCDeployment defines ID of a transaction to store a smart contract SCDeployment // SCInvoking defines ID of a transaction of type smart contract call SCInvoking // BuiltInFunctionCall defines ID of a builtin function call BuiltInFunctionCall // RelayedTx defines ID of a transaction of type relayed RelayedTx // RelayedTxV2 defines the ID of a slim relayed transaction version RelayedTxV2 // RewardTx defines ID of a reward transaction RewardTx // InvalidTransaction defines unknown transaction type InvalidTransaction )
func (TransactionType) String ¶
func (transactionType TransactionType) String() string
type TransactionVerifier ¶
type TransactionVerifier interface {
IsTransactionValid(tx data.TransactionHandler) error
}
TransactionVerifier interface validates if the transaction is good and if it should be processed
type TxGasHandler ¶
type TxGasHandler interface { SplitTxGasInCategories(tx data.TransactionWithFeeHandler) (uint64, uint64) GasPriceForProcessing(tx data.TransactionWithFeeHandler) uint64 GasPriceForMove(tx data.TransactionWithFeeHandler) uint64 MinGasPrice() uint64 ComputeFeeForProcessing(tx data.TransactionWithFeeHandler, gasToUse uint64) *big.Int GasPriceModifier() float64 MinGasLimit() uint64 MinGasPriceForProcessing() uint64 IsInterfaceNil() bool }
TxGasHandler handles a transaction gas and gas cost
type TxTypeHandler ¶
type TxTypeHandler interface { ComputeTransactionType(tx data.TransactionHandler) (TransactionType, TransactionType) IsInterfaceNil() bool }
TxTypeHandler is an interface to calculate the transaction type
type TxValidator ¶
type TxValidator interface { CheckTxValidity(interceptedTx InterceptedTransactionHandler) error CheckTxWhiteList(data InterceptedData) error IsInterfaceNil() bool }
TxValidator can determine if a provided transaction handler is valid or not from the process point of view
type TxValidatorHandler ¶
type TxValidatorHandler interface { SenderShardId() uint32 ReceiverShardId() uint32 Nonce() uint64 SenderAddress() []byte Fee() *big.Int }
TxValidatorHandler defines the functionality that is needed for a TxValidator to validate a transaction
type TxVersionCheckerHandler ¶
type TxVersionCheckerHandler interface { IsGuardedTransaction(tx *transaction.Transaction) bool IsSignedWithHash(tx *transaction.Transaction) bool CheckTxVersion(tx *transaction.Transaction) error IsInterfaceNil() bool }
TxVersionCheckerHandler defines the functionality that is needed for a TxVersionChecker to validate transaction version
type TxsSenderHandler ¶
type TxsSenderHandler interface { SendBulkTransactions(txs []*transaction.Transaction) (uint64, error) Close() error IsInterfaceNil() bool }
TxsSenderHandler handles transactions sending
type ValidatorInfoSyncer ¶
type ValidatorInfoSyncer interface { SyncMiniBlocks(headerHandler data.HeaderHandler) ([][]byte, data.BodyHandler, error) SyncValidatorsInfo(bodyHandler data.BodyHandler) ([][]byte, map[string]*state.ShardValidatorInfo, error) IsInterfaceNil() bool }
ValidatorInfoSyncer defines the method needed for validatorInfoProcessing
type ValidatorStatisticsProcessor ¶
type ValidatorStatisticsProcessor interface { UpdatePeerState(header data.MetaHeaderHandler, cache map[string]data.HeaderHandler) ([]byte, error) RevertPeerState(header data.MetaHeaderHandler) error Process(shardValidatorInfo data.ShardValidatorInfoHandler) error IsInterfaceNil() bool RootHash() ([]byte, error) ResetValidatorStatisticsAtNewEpoch(vInfos map[uint32][]*state.ValidatorInfo) error GetValidatorInfoForRootHash(rootHash []byte) (map[uint32][]*state.ValidatorInfo, error) ProcessRatingsEndOfEpoch(validatorInfos map[uint32][]*state.ValidatorInfo, epoch uint32) error Commit() ([]byte, error) DisplayRatings(epoch uint32) SetLastFinalizedRootHash([]byte) LastFinalizedRootHash() []byte PeerAccountToValidatorInfo(peerAccount state.PeerAccountHandler) *state.ValidatorInfo SaveNodesCoordinatorUpdates(epoch uint32) (bool, error) }
ValidatorStatisticsProcessor is the main interface for validators' consensus participation statistics
type ValidatorsProvider ¶
type ValidatorsProvider interface { GetLatestValidators() map[string]*accounts.ValidatorApiResponse IsInterfaceNil() bool Close() error }
ValidatorsProvider is the main interface for validators' provider
type ValidityAttester ¶
type ValidityAttester interface { CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error CheckBlockAgainstRoundHandler(headerHandler data.HeaderHandler) error CheckBlockAgainstWhitelist(interceptedData InterceptedData) bool IsInterfaceNil() bool }
ValidityAttester is able to manage the valid blocks
type VirtualMachinesContainer ¶
type VirtualMachinesContainer interface { Close() error Get(key []byte) (vmcommon.VMExecutionHandler, error) Add(key []byte, val vmcommon.VMExecutionHandler) error AddMultiple(keys [][]byte, vms []vmcommon.VMExecutionHandler) error Replace(key []byte, val vmcommon.VMExecutionHandler) error Remove(key []byte) Len() int Keys() [][]byte IsInterfaceNil() bool }
VirtualMachinesContainer defines a virtual machine holder data type with basic functionality
type VirtualMachinesContainerFactory ¶
type VirtualMachinesContainerFactory interface { Create() (VirtualMachinesContainer, error) Close() error BlockChainHookImpl() BlockChainHookWithAccountsAdapter IsInterfaceNil() bool }
VirtualMachinesContainerFactory defines the functionality to create a virtual machine container
type WhiteListHandler ¶
type WhiteListHandler interface { Remove(keys [][]byte) Add(keys [][]byte) IsWhiteListed(interceptedData InterceptedData) bool IsWhiteListedAtLeastOne(identifiers [][]byte) bool IsInterfaceNil() bool }
WhiteListHandler is the interface needed to add whitelisted data