process

package
v1.5.15 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: GPL-3.0 Imports: 42 Imported by: 3

Documentation

Index

Constants

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

View Source
const EpochChangeGracePeriod = 1

EpochChangeGracePeriod defines the allowed round numbers till the shard has to change the epoch

View Source
const MaxGasBandwidthPerBatchPerSender = 5000000

MaxGasBandwidthPerBatchPerSender defines the maximum gas bandwidth that should be selected for a sender per batch from the cache

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

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

View Source
const MaxHeadersToRequestInAdvance = 20

MaxHeadersToRequestInAdvance defines the maximum number of headers which will be requested in advance, if they are missing

View Source
const MaxHeadersToWhitelistInAdvance = 300

MaxHeadersToWhitelistInAdvance defines the maximum number of headers whose miniblocks will be whitelisted in advance

View Source
const MaxMetaHeadersAllowedInOneShardBlock = 50

MaxMetaHeadersAllowedInOneShardBlock defines the maximum number of meta headers allowed to be included in one shard block

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

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

View Source
const MaxNumOfTxsToSelect = 30000

MaxNumOfTxsToSelect defines the maximum number of transactions that should be selected from the cache

View Source
const MaxRoundsWithoutCommittedBlock = 10

MaxRoundsWithoutCommittedBlock defines the maximum rounds to wait for a new block to be committed, before a special action to be applied

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

View Source
const MaxShardHeadersAllowedInOneMetaBlock = 60

MaxShardHeadersAllowedInOneMetaBlock defines the maximum number of shard headers allowed to be included in one meta block

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

View Source
const MaxSyncWithErrorsAllowed = 10

MaxSyncWithErrorsAllowed defines the maximum allowed number of sync with errors, before a special action to be applied

View Source
const MetaBlockValidity = 1

MetaBlockValidity defines the block validity which is when checking a metablock

View Source
const MinForkRound = uint64(0)

MinForkRound represents the minimum fork round set by a notarized header received

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

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

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

View Source
const RoundModulusTrigger = 5

RoundModulusTrigger defines a round modulus on which a trigger for an action will be released

View Source
const RoundModulusTriggerWhenSyncIsStuck = 20

RoundModulusTriggerWhenSyncIsStuck defines a round modulus on which a trigger for an action when sync is stuck will be released

Variables

View Source
var ErrAccountHasNoActiveGuardian = errors.New("account has no active guardian")

ErrAccountHasNoActiveGuardian signals that the account has no active guardian

View Source
var ErrAccountHasNoGuardianSet = errors.New("account has no guardian set")

ErrAccountHasNoGuardianSet signals that the account has no guardians set

View Source
var ErrAccountHasNoPendingGuardian = errors.New("account has no pending guardian")

ErrAccountHasNoPendingGuardian signals that the account has no pending guardian

View Source
var ErrAccountNotFound = errors.New("account not found")

ErrAccountNotFound signals that the account was not found for the provided address

View Source
var ErrAccountNotPayable = errors.New("sending value to non payable contract")

ErrAccountNotPayable will be sent when trying to send money to a non-payable account

View Source
var ErrAccountStateDirty = errors.New("accountState was dirty before starting to change")

ErrAccountStateDirty signals that the accounts were modified before starting the current modification

View Source
var ErrAccumulatedFeesDoNotMatch = errors.New("accumulated fees do not match")

ErrAccumulatedFeesDoNotMatch signals that accumulated fees do not match

View Source
var ErrAccumulatedFeesInEpochDoNotMatch = errors.New("accumulated fees in epoch do not match")

ErrAccumulatedFeesInEpochDoNotMatch signals that accumulated fees in epoch do not match

View Source
var ErrBlockBodyHashMismatch = errors.New("block bodies does not match")

ErrBlockBodyHashMismatch signals that block body hashes does not match

View Source
var ErrBlockHashDoesNotMatch = errors.New("block hash does not match")

ErrBlockHashDoesNotMatch signals that header hash does not match with the previous one

View Source
var ErrBlockProposerSignatureMissing = errors.New("block proposer signature is missing")

ErrBlockProposerSignatureMissing signals that block proposer signature is missing from the block aggregated sig

View Source
var ErrBuiltInFunctionsAreDisabled = errors.New("built in functions are disabled")

ErrBuiltInFunctionsAreDisabled signals that built-in functions are disabled

View Source
var ErrBuiltinFunctionMismatch = errors.New("builtin function mismatch")

ErrBuiltinFunctionMismatch signals that a builtin function mismatch was detected

View Source
var ErrBuiltinFunctionNotExecutable = errors.New("builtin function not executable")

ErrBuiltinFunctionNotExecutable signals that a builtin function is not executable

View Source
var ErrCannotReplaceGuardedAccountPendingGuardian = errors.New("cannot replace pending guardian on guarded account")

ErrCannotReplaceGuardedAccountPendingGuardian signals that a pending guardian on a guarded account cannot be replaced

View Source
var ErrConsecutiveMissedBlocksPenaltyLowerThanOne = errors.New("consecutive missed blocks penalty lower than 1")

ErrConsecutiveMissedBlocksPenaltyLowerThanOne signals that the ConsecutiveMissedBlocksPenalty is lower than 1

View Source
var ErrContainerKeyAlreadyExists = errors.New("provided key already exists in container")

ErrContainerKeyAlreadyExists signals that an element was already set in the container's map

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

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

View Source
var ErrDevFeesInEpochDoNotMatch = errors.New("developer fees in epoch do not match")

ErrDevFeesInEpochDoNotMatch signals that developer fees in epoch do not match

View Source
var ErrDeveloperFeesDoNotMatch = errors.New("developer fees do not match")

ErrDeveloperFeesDoNotMatch signals that developer fees do not match

View Source
var ErrDuplicateThreshold = errors.New("two thresholds are the same")

ErrDuplicateThreshold signals that two thresholds are the same

View Source
var ErrEmptyConsensusGroup = errors.New("consensusGroup is empty")

ErrEmptyConsensusGroup is raised when an operation is attempted with an empty consensus group

View Source
var ErrEmptyEpochRewardsConfig = errors.New("the epoch rewards config is empty")

ErrEmptyEpochRewardsConfig signals that the epoch rewards config is empty

View Source
var ErrEmptyFloodPreventerList = errors.New("empty flood preventer provided")

ErrEmptyFloodPreventerList signals that an empty flood preventer list has been provided

View Source
var ErrEmptyFunctionName = errors.New("empty function name")

ErrEmptyFunctionName signals that an empty function name has been provided

View Source
var ErrEmptyGasLimitSettings = errors.New("the gas limit settings is empty")

ErrEmptyGasLimitSettings signals that the gas limit settings is empty

View Source
var ErrEmptyPeerID = errors.New("empty peer ID")

ErrEmptyPeerID signals that an empty peer ID has been provided

View Source
var ErrEmptyTopic = errors.New("empty topic")

ErrEmptyTopic signals that an empty topic has been provided

View Source
var ErrEmptyYearSettings = errors.New("the year settings is empty")

ErrEmptyYearSettings signals that the year settings is empty

View Source
var ErrEpochDoesNotMatch = errors.New("epoch does not match")

ErrEpochDoesNotMatch signals that epoch does not match between headers

View Source
var ErrEpochStartDataDoesNotMatch = errors.New("epoch start data does not match")

ErrEpochStartDataDoesNotMatch signals that EpochStartData is not the same as the leader created

View Source
var ErrFailedTransaction = errors.New("failed transaction, gas consumed")

ErrFailedTransaction signals that transaction is of type failed.

View Source
var ErrGasPriceTooHigh = errors.New("gas price is too high for the transaction")

ErrGasPriceTooHigh signals a too high gas price

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

View Source
var ErrGuardedTransactionNotExpected = errors.New("guarded transaction not expected")

ErrGuardedTransactionNotExpected signals that a guarded transaction was received for processing but the account is not guarded

View Source
var ErrGuardianAddressNotExpected = errors.New("guardian address not expected")

ErrGuardianAddressNotExpected signals that the guardian address is not expected

View Source
var ErrGuardianSignatureNotExpected = errors.New("guardian signature not expected")

ErrGuardianSignatureNotExpected signals that the guardian signature is not expected

View Source
var ErrHeaderBodyMismatch = errors.New("body cannot be validated from header data")

ErrHeaderBodyMismatch signals that the header does not attest all data from the block

View Source
var ErrHeaderIsBlackListed = errors.New("header is black listed")

ErrHeaderIsBlackListed signals that the header provided is black listed

View Source
var ErrHeaderNotFinal = errors.New("header in metablock is not final")

ErrHeaderNotFinal signals that header is not final, and it should be

View Source
var ErrHeaderShardDataMismatch = errors.New("shard header does not match shard info")

ErrHeaderShardDataMismatch signals that shard header does not match created shard info

View Source
var ErrHigherNonceInBlock = errors.New("higher nonce in block")

ErrHigherNonceInBlock signals that a block with higher nonce than permitted has been provided

View Source
var ErrHigherNonceInTransaction = errors.New("higher nonce in transaction")

ErrHigherNonceInTransaction signals the nonce in transaction is higher than the account's nonce

View Source
var ErrHigherRoundInBlock = errors.New("higher round in block")

ErrHigherRoundInBlock signals that a block with higher round than permitted has been provided

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

View Source
var ErrIncompatibleReference = errors.New("incompatible reference when processing batch")

ErrIncompatibleReference signals that an incompatible reference was provided when processing a batch

View Source
var ErrIncreaseStepLowerThanOne = errors.New("increase step is lower than one")

ErrIncreaseStepLowerThanOne signals that an increase step lower than one has been provided

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

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

View Source
var ErrIndexIsOutOfBound = errors.New("index is out of bound")

ErrIndexIsOutOfBound signals that the given index is out of bound

View Source
var ErrInsufficientFee = errors.New("insufficient balance for fees")

ErrInsufficientFee signals that the current balance doesn't have the required transaction fee

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

View Source
var ErrInsufficientGasLimitInTx = errors.New("insufficient gas limit in tx")

ErrInsufficientGasLimitInTx signals that a lower gas limit than required was provided

View Source
var ErrInsufficientGasPriceInTx = errors.New("insufficient gas price in tx")

ErrInsufficientGasPriceInTx signals that a lower gas price than required was provided

View Source
var ErrInterceptedDataNotForCurrentShard = errors.New("intercepted data not for current shard")

ErrInterceptedDataNotForCurrentShard signals that intercepted data is not for current shard

View Source
var ErrInvalidArguments = errors.New("invalid arguments to process built-in function")

ErrInvalidArguments signals that invalid arguments were given to process built-in function

View Source
var ErrInvalidBadPeerThreshold = errors.New("invalid bad peer threshold")

ErrInvalidBadPeerThreshold signals that an invalid bad peer threshold has been provided

View Source
var ErrInvalidBlockRequestOldEpoch = errors.New("invalid block request from old epoch")

ErrInvalidBlockRequestOldEpoch signals that invalid block was requested from old epoch

View Source
var ErrInvalidBody = errors.New("invalid body")

ErrInvalidBody signals that an invalid body has been provided

View Source
var ErrInvalidCacheRefreshIntervalInSec = errors.New("invalid cacheRefreshIntervalInSec")

ErrInvalidCacheRefreshIntervalInSec signals that the cacheRefreshIntervalInSec is invalid - zero or less

View Source
var ErrInvalidChainID = errors.New("invalid chain ID")

ErrInvalidChainID signals that an invalid chain ID was provided

View Source
var ErrInvalidContainerKey = errors.New("element does not exist in container")

ErrInvalidContainerKey signals that an element does not exist in the container's map

View Source
var ErrInvalidDecayCoefficient = errors.New("decay coefficient is invalid")

ErrInvalidDecayCoefficient signals that the provided decay coefficient is invalid

View Source
var ErrInvalidDecayIntervalInSeconds = errors.New("invalid decay interval in seconds")

ErrInvalidDecayIntervalInSeconds signals that an invalid interval in seconds was provided

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

View Source
var ErrInvalidExpiryTimespan = errors.New("invalid expiry timespan")

ErrInvalidExpiryTimespan signals that an invalid expiry timespan was provided

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

View Source
var ErrInvalidGasModifier = errors.New("invalid gas modifier")

ErrInvalidGasModifier signals that provided gas modifier is invalid

View Source
var ErrInvalidGasPerDataByte = errors.New("invalid gas per data byte")

ErrInvalidGasPerDataByte signals that an invalid gas per data byte has been read from config file

View Source
var ErrInvalidGenesisTotalSupply = errors.New("invalid genesis total supply")

ErrInvalidGenesisTotalSupply signals that invalid genesis total supply was provided

View Source
var ErrInvalidInflationPercentages = errors.New("invalid inflation percentages")

ErrInvalidInflationPercentages signals that inflation percentages are not correct

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

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

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

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

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

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

View Source
var ErrInvalidMaxScore = errors.New("invalid maximum score")

ErrInvalidMaxScore signals that an invalid maximum score was provided

View Source
var ErrInvalidMetaHeader = errors.New("invalid header provided, expected MetaBlock")

ErrInvalidMetaHeader signals that a wrong implementation of HeaderHandler was provided

View Source
var ErrInvalidMetaTransaction = errors.New("meta transaction is invalid")

ErrInvalidMetaTransaction signals that meta transaction is invalid

View Source
var ErrInvalidMinScore = errors.New("invalid minimum score")

ErrInvalidMinScore signals that an invalid minimum score was provided

View Source
var ErrInvalidMiniBlockType = errors.New("invalid miniblock type")

ErrInvalidMiniBlockType signals that an invalid miniblock type has been provided

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

View Source
var ErrInvalidMinimumGasPrice = errors.New("invalid minimum gas price")

ErrInvalidMinimumGasPrice signals that an invalid gas price has been read from config file

View Source
var ErrInvalidNonceRequest = errors.New("invalid nonce request")

ErrInvalidNonceRequest signals that invalid nonce was requested

View Source
var ErrInvalidPeerAccount = errors.New("invalid peer account")

ErrInvalidPeerAccount signals that a peer account is invalid

View Source
var ErrInvalidPeerSubType = errors.New("invalid peer subtype")

ErrInvalidPeerSubType signals that an invalid peer subtype was provided

View Source
var ErrInvalidProcessWaitTime = errors.New("invalid process wait time")

ErrInvalidProcessWaitTime signals that an invalid process wait time was provided

View Source
var ErrInvalidRcvAddr = errors.New("invalid receiver address")

ErrInvalidRcvAddr signals that an invalid receiver address was provided

View Source
var ErrInvalidRewardsPercentages = errors.New("invalid rewards percentages")

ErrInvalidRewardsPercentages signals that rewards percentages are not correct

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

ErrInvalidRewardsTopUpGradientPoint signals that the top-up gradient point is invalid

View Source
var ErrInvalidSetGuardianEpochsDelay = errors.New("incorrect setting for set guardian epochs delay")

ErrInvalidSetGuardianEpochsDelay signals an invalid configuration for the epochs delay

View Source
var ErrInvalidShardCacherIdentifier = errors.New("invalid identifier for shard cacher")

ErrInvalidShardCacherIdentifier signals an invalid identifier

View Source
var ErrInvalidShardId = errors.New("invalid shard id")

ErrInvalidShardId signals that the shard id is invalid

View Source
var ErrInvalidSndAddr = errors.New("invalid sender address")

ErrInvalidSndAddr signals that an invalid sender address was provided

View Source
var ErrInvalidTransactionVersion = errors.New("invalid transaction version")

ErrInvalidTransactionVersion signals that an invalid transaction version has been provided

View Source
var ErrInvalidTxInPool = errors.New("invalid transaction in the transactions pool")

ErrInvalidTxInPool signals an invalid transaction in the transactions pool

View Source
var ErrInvalidUnitValue = errors.New("invalid unit value")

ErrInvalidUnitValue signals that an invalid unit value was provided

View Source
var ErrInvalidUserNameLength = errors.New("invalid user name length")

ErrInvalidUserNameLength signals that provided username length is invalid

View Source
var ErrInvalidVMInputGasComputation = errors.New("invalid vm input gas computation")

ErrInvalidVMInputGasComputation signals that invalid vm input gas computation was provided

View Source
var ErrInvalidVMType = errors.New("invalid VM type")

ErrInvalidVMType signals that invalid vm type was provided

View Source
var ErrInvalidValue = errors.New("invalid value provided")

ErrInvalidValue signals that an invalid value was provided

View Source
var ErrLenMismatch = errors.New("lengths mismatch")

ErrLenMismatch signals that 2 or more slices have different lengths

View Source
var ErrLogNotFound = errors.New("no logs for queried transaction")

ErrLogNotFound is the error returned when a transaction has no logs

View Source
var ErrLowerNonceInBlock = errors.New("lower nonce in block")

ErrLowerNonceInBlock signals that a block with lower nonce than permitted has been provided

View Source
var ErrLowerNonceInTransaction = errors.New("lower nonce in transaction")

ErrLowerNonceInTransaction signals the nonce in transaction is lower than the account's nonce

View Source
var ErrLowerRoundInBlock = errors.New("header round is lower than last committed")

ErrLowerRoundInBlock signals that a header round is too low for processing it

View Source
var ErrMarshalWithoutSuccess = errors.New("marshal without success")

ErrMarshalWithoutSuccess signals that marshal some data was not done with success

View Source
var ErrMaxAccumulatedFeesExceeded = errors.New("max accumulated fees has been exceeded")

ErrMaxAccumulatedFeesExceeded signals that max accumulated fees has been exceeded

View Source
var ErrMaxBlockSizeReached = errors.New("max block size has been reached")

ErrMaxBlockSizeReached signals that max block size has been reached

View Source
var ErrMaxCallsReached = errors.New("max calls reached")

ErrMaxCallsReached signals that the allowed max number of calls was reached

View Source
var ErrMaxDeveloperFeesExceeded = errors.New("max developer fees has been exceeded")

ErrMaxDeveloperFeesExceeded signals that max developer fees has been exceeded

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

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

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

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

View Source
var ErrMaxRatingIsSmallerThanMinRating = errors.New("max rating is smaller than min rating")

ErrMaxRatingIsSmallerThanMinRating signals that the max rating is smaller than the min rating value

View Source
var ErrMaxRatingZero = errors.New("max rating is zero")

ErrMaxRatingZero signals that maxrating with a value of zero has been provided

View Source
var ErrMessageExpired = errors.New("message expired")

ErrMessageExpired signals that a received message is expired

View Source
var ErrMetaHeaderEpochOutOfRange = errors.New("epoch out of range for meta block header")

ErrMetaHeaderEpochOutOfRange signals that the given header is out of accepted range

View Source
var ErrMinRatingSmallerThanOne = errors.New("min rating is smaller than one")

ErrMinRatingSmallerThanOne signals that the min rating is smaller than the min value of 1

View Source
var ErrMiniBlockHashMismatch = errors.New("miniblocks does not match")

ErrMiniBlockHashMismatch signals that miniblock hashes does not match

View Source
var ErrMiniBlockNumMissMatch = errors.New("num miniblocks does not match")

ErrMiniBlockNumMissMatch signals that number of miniblocks does not match

View Source
var ErrMiniBlocksInWrongOrder = errors.New("miniblocks in wrong order, should have been only from me")

ErrMiniBlocksInWrongOrder signals the miniblocks are in wrong order

View Source
var ErrMissingBody = errors.New("missing body")

ErrMissingBody signals that body of the block is missing

View Source
var ErrMissingHashForHeaderNonce = errors.New("missing hash for header nonce")

ErrMissingHashForHeaderNonce signals that hash of the block is missing

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

ErrMissingHeader signals that header of the block is missing

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

ErrMissingMiniBlock signals that mini block is missing

View Source
var ErrMissingMiniBlockHeader = errors.New("missing mini block header")

ErrMissingMiniBlockHeader signals that mini block header is missing

View Source
var ErrMissingPreProcessor = errors.New("pre processor is missing")

ErrMissingPreProcessor signals that required pre-processor is missing

View Source
var ErrMissingTransaction = errors.New("missing transaction")

ErrMissingTransaction signals that one transaction is missing

View Source
var ErrMoreGasConsumedThanProvided = errors.New("more gas used than provided")

ErrMoreGasConsumedThanProvided signals that VM used more gas than provided

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

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

View Source
var ErrNegativeBalanceDeltaOnCrossShardAccount = errors.New("negative balance delta on cross shard account")

ErrNegativeBalanceDeltaOnCrossShardAccount signals that negative balance delta was given on cross shard account

View Source
var ErrNegativeValue = errors.New("negative value")

ErrNegativeValue signals that a negative value has been detected, and it is not allowed

View Source
var ErrNilAccountTxsPerShard = errors.New("nil account transactions per shard mapping")

ErrNilAccountTxsPerShard signals a nil mapping for account transactions to shard

View Source
var ErrNilAccountsAdapter = errors.New("nil AccountsAdapter")

ErrNilAccountsAdapter defines the error when trying to use a nil AccountsAddapter

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

ErrNilAccountsDBSyncer signals that a nil accounts db syncer has been provided

View Source
var ErrNilAdditionalData = errors.New("nil additional data")

ErrNilAdditionalData signals that additional data is nil

View Source
var ErrNilAddressContainer = errors.New("nil AddressContainer")

ErrNilAddressContainer signals that an operation has been attempted to or with a nil AddressContainer implementation

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

View Source
var ErrNilAntifloodHandler = errors.New("nil antiflood handler")

ErrNilAntifloodHandler signals that a nil antiflood handler has been provided

View Source
var ErrNilAppStatusHandler = errors.New("nil AppStatusHandler")

ErrNilAppStatusHandler defines the error for setting a nil AppStatusHandler

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

View Source
var ErrNilArgumentParser = errors.New("argument parser is nil")

ErrNilArgumentParser signals that the argument parser is nil

View Source
var ErrNilArgumentStruct = errors.New("nil argument struct")

ErrNilArgumentStruct signals that a function has received nil instead of an instantiated Arg... structure

View Source
var ErrNilBadTxHandler = errors.New("nil bad tx handler")

ErrNilBadTxHandler signals that bad tx handler is nil

View Source
var ErrNilBalanceComputationHandler = errors.New("nil balance computation handler")

ErrNilBalanceComputationHandler signals that a nil balance computation handler has been provided

View Source
var ErrNilBlackListCacher = errors.New("nil black list cacher")

ErrNilBlackListCacher signals that a nil black list cacher was provided

View Source
var ErrNilBlackListedPkCache = errors.New("nil black listed public key cache")

ErrNilBlackListedPkCache signals that a nil black listed public key cache has been provided

View Source
var ErrNilBlockBody = errors.New("nil block body")

ErrNilBlockBody signals that an operation has been attempted to or with a nil block body

View Source
var ErrNilBlockChain = errors.New("nil block chain")

ErrNilBlockChain signals that an operation has been attempted to or with a nil blockchain

View Source
var ErrNilBlockChainHook = errors.New("nil blockchain hook")

ErrNilBlockChainHook signals that nil blockchain hook has been provided

View Source
var ErrNilBlockHeader = errors.New("nil block header")

ErrNilBlockHeader signals that an operation has been attempted to or with a nil block header

View Source
var ErrNilBlockProcessor = errors.New("nil block processor")

ErrNilBlockProcessor signals that an operation has been attempted to or with a nil BlockProcessor implementation

View Source
var ErrNilBlockSizeComputationHandler = errors.New("nil block size computation handler")

ErrNilBlockSizeComputationHandler signals that a nil block size computation handler has been provided

View Source
var ErrNilBlockSizeThrottler = errors.New("block size throttler is nil")

ErrNilBlockSizeThrottler signals that block size throttler si nil

View Source
var ErrNilBlockTracker = errors.New("nil block tracker")

ErrNilBlockTracker signals that a nil block tracker was provided

View Source
var ErrNilBootStorer = errors.New("nil boot storer")

ErrNilBootStorer signals that the provided boot storer is bil

View Source
var ErrNilBootstrapComponentsHolder = errors.New("nil bootstrap components holder")

ErrNilBootstrapComponentsHolder signals that a nil bootstrap components holder was provided

View Source
var ErrNilBootstrapper = errors.New("nil bootstrapper")

ErrNilBootstrapper signals that a nil bootstraper has been provided

View Source
var ErrNilBuffer = errors.New("provided byte buffer is nil")

ErrNilBuffer signals that a provided byte buffer is nil

View Source
var ErrNilBuiltInFunction = errors.New("built in function is nil")

ErrNilBuiltInFunction signals that built-in function is nil

View Source
var ErrNilBuiltInFunctionsCostHandler = errors.New("nil built in functions cost handler")

ErrNilBuiltInFunctionsCostHandler signals that a nil built-in functions cost handler has been provided

View Source
var ErrNilCacher = errors.New("nil cacher")

ErrNilCacher signals that a nil cache has been provided

View Source
var ErrNilChunksProcessor = errors.New("nil chunks processor")

ErrNilChunksProcessor signals that a nil chunks processor has been provided

View Source
var ErrNilContainerElement = errors.New("element cannot be nil")

ErrNilContainerElement signals when trying to add a nil element in the container

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

ErrNilCoreComponentsHolder signals that a nil core components holder was provided

View Source
var ErrNilCrawlerAllowedAddress = errors.New("nil crawler allowed address")

ErrNilCrawlerAllowedAddress signals that no crawler allowed address was found

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

ErrNilCryptoComponentsHolder signals that a nil crypto components holder was provided

View Source
var ErrNilCurrentNetworkEpochProvider = errors.New("nil current network epoch provider")

ErrNilCurrentNetworkEpochProvider signals that a nil CurrentNetworkEpochProvider handler has been provided

View Source
var ErrNilDataComponentsHolder = errors.New("nil data components holder")

ErrNilDataComponentsHolder signals that a nil data components holder was provided

View Source
var ErrNilDataPoolHolder = errors.New("nil data pool holder")

ErrNilDataPoolHolder signals that the data pool holder is nil

View Source
var ErrNilDataToProcess = errors.New("nil data to process")

ErrNilDataToProcess signals that nil data was provided

View Source
var ErrNilDebugger = errors.New("nil debug handler")

ErrNilDebugger signals that a nil debug handler has been provided

View Source
var ErrNilDnsAddresses = errors.New("nil dns addresses map")

ErrNilDnsAddresses signals that nil dns addresses map was provided

View Source
var ErrNilDoubleTransactionsDetector = errors.New("nil double transactions detector")

ErrNilDoubleTransactionsDetector signals that a nil double transactions detector has been provided

View Source
var ErrNilESDTGlobalSettingsHandler = errors.New("nil esdt global settings handler")

ErrNilESDTGlobalSettingsHandler signals that nil global settings handler was provided

View Source
var ErrNilESDTTransferParser = errors.New("nil esdt transfer parser")

ErrNilESDTTransferParser signals that a nil ESDT transfer parser has been provided

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

ErrNilEconomicsData signals that nil economics data has been provided

View Source
var ErrNilEconomicsFeeHandler = errors.New("nil economics fee handler")

ErrNilEconomicsFeeHandler signals that fee handler is nil

View Source
var ErrNilEnableEpochsHandler = errors.New("nil enable epochs handler")

ErrNilEnableEpochsHandler signals that a nil enable epochs handler has been provided

View Source
var ErrNilEnableRoundsHandler = errors.New("nil enable rounds handler has been provided")

ErrNilEnableRoundsHandler signals a nil enable rounds handler has been provided

View Source
var ErrNilEpochEconomics = errors.New("nil epoch economics")

ErrNilEpochEconomics signals that nil end of epoch econimics was provided

View Source
var ErrNilEpochHandler = errors.New("nil epoch handler")

ErrNilEpochHandler signals that a nil epoch handler was provided

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

ErrNilEpochNotifier signals that the provided EpochNotifier is nil

View Source
var ErrNilEpochStartDataCreator = errors.New("nil epoch start data creator")

ErrNilEpochStartDataCreator signals that nil epoch start data creator was provided

View Source
var ErrNilEpochStartNotifier = errors.New("nil epochStartNotifier")

ErrNilEpochStartNotifier signals that the provided epochStartNotifier is nil

View Source
var ErrNilEpochStartSystemSCProcessor = errors.New("nil epoch start system sc processor")

ErrNilEpochStartSystemSCProcessor signals that nil epoch start system sc processor was provided

View Source
var ErrNilEpochStartTrigger = errors.New("nil start of epoch trigger")

ErrNilEpochStartTrigger signals that a nil start of epoch trigger was provided

View Source
var ErrNilEpochStartValidatorInfoCreator = errors.New("nil epoch start validator info creator")

ErrNilEpochStartValidatorInfoCreator signals that nil epoch start validator info creator was provided

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

ErrNilFallbackHeaderValidator signals that a nil fallback header validator has been provided

View Source
var ErrNilForkDetector = errors.New("nil fork detector")

ErrNilForkDetector signals that the fork detector is nil

View Source
var ErrNilGasHandler = errors.New("nil gas handler")

ErrNilGasHandler signals that gas handler is nil

View Source
var ErrNilGasSchedule = errors.New("nil GasSchedule")

ErrNilGasSchedule signals that an operation has been attempted with a nil gas schedule

View Source
var ErrNilGuardedAccountHandler = errors.New("nil guarded account handler")

ErrNilGuardedAccountHandler signals that a nil guarded account handler was provided

View Source
var ErrNilGuardianChecker = errors.New("nil guardian checker")

ErrNilGuardianChecker signals that a nil guardian checker was provided

View Source
var ErrNilGuardianServiceUID = errors.New("nil guardian service unique identifier")

ErrNilGuardianServiceUID signals that a nil guardian service identifier was provided

View Source
var ErrNilHardforkTrigger = errors.New("nil hardfork trigger")

ErrNilHardforkTrigger signals that a nil hardfork trigger has been provided

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

ErrNilHasher signals that an operation has been attempted to or with a nil hasher implementation

View Source
var ErrNilHaveTimeHandler = errors.New("nil have time handler")

ErrNilHaveTimeHandler signals that a nil have time handler func was provided

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

ErrNilHeaderHandler signals that a nil header handler has been provided

View Source
var ErrNilHeaderIntegrityVerifier = errors.New("nil header integrity verifier")

ErrNilHeaderIntegrityVerifier signals that a nil header integrity verifier has been provided

View Source
var ErrNilHeaderSigVerifier = errors.New("nil header sig verifier")

ErrNilHeaderSigVerifier signals that a nil header sig verifier has been provided

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

ErrNilHeaderValidator signals that nil header validator has been provided

View Source
var ErrNilHeadersDataPool = errors.New("nil headers data pool")

ErrNilHeadersDataPool signals that a nil headers pool has been provided

View Source
var ErrNilHeartbeatCacher = errors.New("nil heartbeat cacher")

ErrNilHeartbeatCacher signals that a nil heartbeat cacher was provided

View Source
var ErrNilHistoryRepository = errors.New("history repository is nil")

ErrNilHistoryRepository signals that history processor is nil

View Source
var ErrNilInterceptedDataFactory = errors.New("nil intercepted data factory")

ErrNilInterceptedDataFactory signals that a nil intercepted data factory was provided

View Source
var ErrNilInterceptedDataProcessor = errors.New("nil intercepted data processor")

ErrNilInterceptedDataProcessor signals that a nil intercepted data processor was provided

View Source
var ErrNilInterceptorContainer = errors.New("nil interceptor container")

ErrNilInterceptorContainer signals that nil interceptor container has been provided

View Source
var ErrNilInterceptorThrottler = errors.New("nil interceptor throttler")

ErrNilInterceptorThrottler signals that a nil interceptor throttler was provided

View Source
var ErrNilIntermediateProcessor = errors.New("intermediate processor is nil")

ErrNilIntermediateProcessor signals that intermediate processors is nil

View Source
var ErrNilIntermediateProcessorContainer = errors.New("intermediate processor container is nil")

ErrNilIntermediateProcessorContainer signals that intermediate processors container is nil

View Source
var ErrNilIntermediateTransactionHandler = errors.New("intermediate transaction handler is nil")

ErrNilIntermediateTransactionHandler signals that nil intermediate transaction handler was provided

View Source
var ErrNilIsMaxBlockSizeReachedHandler = errors.New("nil handler for max block size reached")

ErrNilIsMaxBlockSizeReachedHandler signals a nil max block size reached handler

View Source
var ErrNilIsShardStuckHandler = errors.New("nil handler for checking stuck shard")

ErrNilIsShardStuckHandler signals a nil shard stuck handler

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

ErrNilKeyGen signals that an operation has been attempted to or with a nil single sign key generator

View Source
var ErrNilLocker = errors.New("nil locker")

ErrNilLocker signals that a nil locker was provided

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

ErrNilMarshalizer signals that an operation has been attempted to or with a nil Marshalizer implementation

View Source
var ErrNilMessage = errors.New("nil message")

ErrNilMessage signals that a nil message has been received

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

ErrNilMessenger signals that a nil Messenger object was provided

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

ErrNilMetaBlockHeader signals that an operation has been attempted to or with a nil metablock

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

ErrNilMetaBlocksPool signals that a nil meta blocks pool was used

View Source
var ErrNilMinChanceIfZero = errors.New("no min chance ")

ErrNilMinChanceIfZero signals that there was no min chance provided if a chance is still needed

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

ErrNilMiniBlock signals that an operation has been attempted with a nil miniblock

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

ErrNilMiniBlockPool signals that a nil mini blocks pool was used

View Source
var ErrNilMiniBlocks = errors.New("nil mini blocks")

ErrNilMiniBlocks signals that an operation has been attempted with a nil mini-block

View Source
var ErrNilMiniBlocksProvider = errors.New("nil miniblocks provider")

ErrNilMiniBlocksProvider signals that a nil miniblocks data provider has been passed over

View Source
var ErrNilMultiSigVerifier = errors.New("nil multi-signature verifier")

ErrNilMultiSigVerifier signals that a nil multi-signature verifier is used

View Source
var ErrNilMultiSignerContainer = errors.New("nil multiSigner container")

ErrNilMultiSignerContainer signals that the given multisigner container is nil

View Source
var ErrNilNFTStorageHandler = errors.New("nil NFT storage handler")

ErrNilNFTStorageHandler signals that nil NFT storage handler has been provided

View Source
var ErrNilNetworkWatcher = errors.New("nil network watcher")

ErrNilNetworkWatcher signals that a nil network watcher has been provided

View Source
var ErrNilNodesConfigProvider = errors.New("nil nodes config provider")

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

View Source
var ErrNilNodesCoordinator = errors.New("nil nodes coordinator")

ErrNilNodesCoordinator signals that an operation has been attempted to or with a nil nodes coordinator

View Source
var ErrNilNodesSetup = errors.New("nil nodes setup")

ErrNilNodesSetup signals that nil nodes setup has been provided

View Source
var ErrNilNumConnectedPeersProvider = errors.New("nil number of connected peers provider")

ErrNilNumConnectedPeersProvider signals that a nil number of connected peers provider has been provided

View Source
var ErrNilOrEmptyList = errors.New("nil or empty provided list")

ErrNilOrEmptyList signals that a nil or empty list was provided

View Source
var ErrNilOutportDataProvider = errors.New("nil outport data  provider")

ErrNilOutportDataProvider signals that a nil outport data provider has been given

View Source
var ErrNilOutportHandler = errors.New("outport handler is nil")

ErrNilOutportHandler signals that outport is nil

View Source
var ErrNilPayloadValidator = errors.New("nil payload validator")

ErrNilPayloadValidator signals that a nil payload validator was provided

View Source
var ErrNilPeerAccountsAdapter = errors.New("nil peer accounts database")

ErrNilPeerAccountsAdapter signals that a nil peer accounts database was provided

View Source
var ErrNilPeerAuthenticationCacher = errors.New("nil peer authentication cacher")

ErrNilPeerAuthenticationCacher signals that a nil peer authentication cacher was provided

View Source
var ErrNilPeerShardMapper = errors.New("nil peer shard mapper")

ErrNilPeerShardMapper signals that a nil peer shard mapper has been provided

View Source
var ErrNilPeerSignatureHandler = errors.New("nil peer signature handler")

ErrNilPeerSignatureHandler signals that a nil peer signature handler was provided

View Source
var ErrNilPeerValidatorMapper = errors.New("nil peer validator mapper")

ErrNilPeerValidatorMapper signals that nil peer validator mapper has been provided

View Source
var ErrNilPendingMiniBlocksHandler = errors.New("nil pending miniblocks handler")

ErrNilPendingMiniBlocksHandler signals that a nil pending miniblocks handler has been provided

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

ErrNilPoolsHolder signals that an operation has been attempted to or with a nil pools holder object

View Source
var ErrNilPreProcessor = errors.New("preprocessor is nil")

ErrNilPreProcessor signals that preprocessors is nil

View Source
var ErrNilPreProcessorsContainer = errors.New("preprocessors container is nil")

ErrNilPreProcessorsContainer signals that preprocessors container is nil

View Source
var ErrNilPreferredPeersHolder = errors.New("nil preferred peers holder")

ErrNilPreferredPeersHolder signals that preferred peers holder is nil

View Source
var ErrNilPrevRandSeed = errors.New("provided previous rand seed is nil")

ErrNilPrevRandSeed signals that a nil previous rand seed has been provided

View Source
var ErrNilPreviousBlockHash = errors.New("nil previous block header hash")

ErrNilPreviousBlockHash signals that an operation has been attempted with a nil previous block header hash

View Source
var ErrNilProcessDebugger = errors.New("nil process debugger")

ErrNilProcessDebugger signals that a nil process debugger was provided

View Source
var ErrNilProcessedMiniBlocksTracker = errors.New("nil processed mini blocks tracker")

ErrNilProcessedMiniBlocksTracker signals that a nil processed mini blocks tracker has been provided

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

ErrNilProtocolSustainabilityAddress signals that a nil protocol sustainability address was provided

View Source
var ErrNilPubKeysBitmap = errors.New("nil public keys bitmap")

ErrNilPubKeysBitmap signals that an operation has been attempted with a nil public keys bitmap

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

ErrNilPubkeyConverter signals that an operation has been attempted to or with a nil public key converter implementation

View Source
var ErrNilQuotaStatusHandler = errors.New("nil quota status handler")

ErrNilQuotaStatusHandler signals that a nil quota status handler has been provided

View Source
var ErrNilRandSeed = errors.New("provided rand seed is nil")

ErrNilRandSeed signals that a nil rand seed has been provided

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

ErrNilRater signals that nil rater has been provided

View Source
var ErrNilRatingsInfoHandler = errors.New("nil ratings info handler")

ErrNilRatingsInfoHandler signals that nil ratings info handler has been provided

View Source
var ErrNilRcvAddr = errors.New("nil receiver address")

ErrNilRcvAddr signals that an operation has been attempted to or with a nil receiver address

View Source
var ErrNilReceiptHandler = errors.New("nil receipt handler")

ErrNilReceiptHandler signals that receipt handler is nil

View Source
var ErrNilReceiptsRepository = errors.New("nil receipts repository")

ErrNilReceiptsRepository signals that a nil receipts repository has been provided

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

ErrNilRequestHandler signals that a nil request handler interface was provided

View Source
var ErrNilRewardTransaction = errors.New("reward transaction is nil")

ErrNilRewardTransaction signals that the reward transaction is nil

View Source
var ErrNilRewardTxDataPool = errors.New("reward transactions pool is nil")

ErrNilRewardTxDataPool signals that the reward transactions pool is nil

View Source
var ErrNilRewardsCreator = errors.New("nil epoch start rewards creator")

ErrNilRewardsCreator signals that nil epoch start rewards creator was provided

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

ErrNilRewardsHandler signals that rewards handler is nil

View Source
var ErrNilRewardsTxProcessor = errors.New("nil rewards transaction processor")

ErrNilRewardsTxProcessor signals that the rewards transaction processor is nil

View Source
var ErrNilRootHash = errors.New("root hash is nil")

ErrNilRootHash signals that an operation has been attempted with a nil root hash

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

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

View Source
var ErrNilRoundTimeDurationHandler = errors.New("nil RoundTimeDurationHandler")

ErrNilRoundTimeDurationHandler signals that an operation has been attempted to or with a nil RoundTimeDurationHandler implementation

View Source
var ErrNilSCDestAccount = errors.New("nil destination SC account")

ErrNilSCDestAccount signals that destination account is nil

View Source
var ErrNilSCToProtocol = errors.New("nil sc to protocol")

ErrNilSCToProtocol signals that nil smart contract to protocol handler has been provided

View Source
var ErrNilScAddress = errors.New("nil SC address")

ErrNilScAddress signals that a nil smart contract address has been provided

View Source
var ErrNilScQueryElement = errors.New("nil SC query service element")

ErrNilScQueryElement signals that a nil sc query service element was provided

View Source
var ErrNilScheduledTxsExecutionHandler = errors.New("nil scheduled txs execution handler")

ErrNilScheduledTxsExecutionHandler signals that scheduled txs execution handler is nil

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

ErrNilShardCoordinator signals that an operation has been attempted to or with a nil shard coordinator

View Source
var ErrNilShardedDataCacherNotifier = errors.New("nil sharded data cacher notifier")

ErrNilShardedDataCacherNotifier signals that a nil sharded data cacher notifier has been provided

View Source
var ErrNilSignature = errors.New("nil signature")

ErrNilSignature signals that an operation has been attempted with a nil signature

View Source
var ErrNilSignaturesHandler = errors.New("nil signatures handler")

ErrNilSignaturesHandler signals that a nil signatures handler was provided

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

ErrNilSingleSigner signals that a nil single signer is used

View Source
var ErrNilSmartContractProcessor = errors.New("smart contract processor is nil")

ErrNilSmartContractProcessor signals that smart contract call executor is nil

View Source
var ErrNilSmartContractResult = errors.New("smart contract result is nil")

ErrNilSmartContractResult signals that the smart contract result is nil

View Source
var ErrNilSmartContractResultProcessor = errors.New("nil smart contract result processor")

ErrNilSmartContractResultProcessor signals that smart contract result processor is nil

View Source
var ErrNilSndAddr = errors.New("nil sender address")

ErrNilSndAddr signals that an operation has been attempted to or with a nil sender address

View Source
var ErrNilStatusComponentsHolder = errors.New("nil status components holder")

ErrNilStatusComponentsHolder signals that a nil status components holder was provided

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

ErrNilStatusCoreComponentsHolder signals that a nil status core components holder was provided

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

ErrNilStorage signals that a nil storage has been provided

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

ErrNilStore signals that the provided storage service is nil

View Source
var ErrNilSyncTimer = errors.New("sync timer is nil")

ErrNilSyncTimer signals that the sync timer is nil

View Source
var ErrNilSystemSCConfig = errors.New("nil system sc config")

ErrNilSystemSCConfig signals that nil system sc config was provided

View Source
var ErrNilTemporaryAccountsHandler = errors.New("temporary accounts handler is nil")

ErrNilTemporaryAccountsHandler signals that temporary accounts handler is nil

View Source
var ErrNilTopicFloodPreventer = errors.New("nil topic flood preventer")

ErrNilTopicFloodPreventer signals that a nil topic flood preventer has been provided

View Source
var ErrNilTransaction = errors.New("nil transaction")

ErrNilTransaction signals that an operation has been attempted to or with a nil transaction

View Source
var ErrNilTransactionCoordinator = errors.New("transaction coordinator is nil")

ErrNilTransactionCoordinator signals that transaction coordinator is nil

View Source
var ErrNilTransactionPool = errors.New("nil transaction pool")

ErrNilTransactionPool signals that a nil transaction pool was used

View Source
var ErrNilTransactionVersionChecker = errors.New("nil transaction version checker")

ErrNilTransactionVersionChecker signals that provided transaction version checker is nil

View Source
var ErrNilTxBlockBody = errors.New("nil tx block body")

ErrNilTxBlockBody signals that an operation has been attempted to or with a nil tx block body

View Source
var ErrNilTxDataPool = errors.New("nil transaction data pool")

ErrNilTxDataPool signals that a nil transaction pool has been provided

View Source
var ErrNilTxForCurrentBlockHandler = errors.New("nil tx for current block handler")

ErrNilTxForCurrentBlockHandler signals that nil tx for current block handler has been provided

View Source
var ErrNilTxHash = errors.New("nil transaction hash")

ErrNilTxHash signals that an operation has been attempted with a nil hash

View Source
var ErrNilTxLogsProcessor = errors.New("nil transaction logs processor")

ErrNilTxLogsProcessor is the error returned when a transaction has no logs

View Source
var ErrNilTxMaxTotalCostHandler = errors.New("nil transaction max total cost")

ErrNilTxMaxTotalCostHandler signals a nil transaction max total cost

View Source
var ErrNilTxProcessor = errors.New("nil transactions processor")

ErrNilTxProcessor signals that a nil transactions processor was used

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

ErrNilTxStorage signals that a nil transaction storage has been provided

View Source
var ErrNilTxTypeHandler = errors.New("nil tx type handler")

ErrNilTxTypeHandler signals that tx type handler is nil

View Source
var ErrNilTxValidator = errors.New("nil transaction validator")

ErrNilTxValidator signals that a nil tx validator has been provided

View Source
var ErrNilUTxDataPool = errors.New("unsigned transactions pool is nil")

ErrNilUTxDataPool signals that unsigned transaction pool is nil

View Source
var ErrNilUTxStorage = errors.New("unsigned transactions storage is nil")

ErrNilUTxStorage signals that unsigned transaction storage is nil

View Source
var ErrNilUint64Converter = errors.New("uint64converter is nil")

ErrNilUint64Converter signals that uint64converter is nil

View Source
var ErrNilUnsignedTxDataPool = errors.New("unsigned transactions pool is nil")

ErrNilUnsignedTxDataPool signals that the unsigned transactions pool is nil

View Source
var ErrNilUnsignedTxHandler = errors.New("nil unsigned tx handler")

ErrNilUnsignedTxHandler signals that the unsigned tx handler is nil

View Source
var ErrNilUserAccount = errors.New("nil user account")

ErrNilUserAccount signals that nil user account was provided

View Source
var ErrNilVMOutput = errors.New("nil vm output")

ErrNilVMOutput signals that vmoutput is nil

View Source
var ErrNilValidatorInfoPool = errors.New("nil validator info pool")

ErrNilValidatorInfoPool signals that a nil validator info pool has been provided

View Source
var ErrNilValidatorInfos = errors.New("nil validator infos")

ErrNilValidatorInfos signals that a nil validator infos has been provided

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

ErrNilValidatorStatistics signals that a nil validator statistics has been provided

View Source
var ErrNilValidityAttester = errors.New("nil validity attester")

ErrNilValidityAttester signals that a nil validity attester has been provided

View Source
var ErrNilValue = errors.New("nil value")

ErrNilValue signals the value is nil

View Source
var ErrNilValueFromRewardTransaction = errors.New("transferred value is nil in reward transaction")

ErrNilValueFromRewardTransaction signals that the transfered value is nil

View Source
var ErrNilVersionedHeaderFactory = errors.New("nil versioned header factory")

ErrNilVersionedHeaderFactory signals that the versioned header factory is nil

View Source
var ErrNilVmInput = errors.New("nil vm input")

ErrNilVmInput signals that provided vm input is nil

View Source
var ErrNilWhiteListHandler = errors.New("nil whitelist handler")

ErrNilWhiteListHandler signals that white list handler is nil

View Source
var ErrNoChancesForMaxThreshold = errors.New("max threshold has no chances")

ErrNoChancesForMaxThreshold signals that the max threshold has no chance defined

View Source
var ErrNoChancesProvided = errors.New("no chances are provided")

ErrNoChancesProvided signals that there were no chances provided

View Source
var ErrNoDataInMessage = errors.New("no data found in received message")

ErrNoDataInMessage signals that no data was found after parsing received p2p message

View Source
var ErrNoTxToProcess = errors.New("no transaction to process")

ErrNoTxToProcess signals that no transaction were sent for processing

View Source
var ErrNoVM = errors.New("no VM (hook not set)")

ErrNoVM signals that no SCHandler has been set

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

View Source
var ErrNotAllowedToWriteUnderProtectedKey = errors.New("not allowed to write under protected key")

ErrNotAllowedToWriteUnderProtectedKey signals that writing under protected key is not allowed

View Source
var ErrNotEnoughGas = errors.New("not enough gas was sent in the transaction")

ErrNotEnoughGas signals that not enough gas has been provided

View Source
var ErrNotEnoughGasInUserTx = errors.New("not enough gas provided in user tx")

ErrNotEnoughGasInUserTx signals that not enough gas was provided in user tx

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

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

ErrNotEpochStartBlock signals that block is not of type epoch start

View Source
var ErrNotarizedHeadersSliceForShardIsNil = errors.New("notarized headers slice for shard is nil")

ErrNotarizedHeadersSliceForShardIsNil signals that the slice holding notarized headers for shard is nil

View Source
var ErrNotarizedHeadersSliceIsNil = errors.New("notarized headers slice is nil")

ErrNotarizedHeadersSliceIsNil signals that the slice holding notarized headers is nil

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

View Source
var ErrOnlyValidatorsCanUseThisTopic = errors.New("only validators can use this topic")

ErrOnlyValidatorsCanUseThisTopic signals that topic can be used by validator only

View Source
var ErrOriginatorIsBlacklisted = errors.New("originator is blacklisted")

ErrOriginatorIsBlacklisted signals that a message originator is blacklisted on the current node

View Source
var ErrOverallBalanceChangeFromSC = errors.New("SC output balance updates are wrong")

ErrOverallBalanceChangeFromSC signals that all sumed balance changes are not zero

View Source
var ErrOverflow = errors.New("type overflow occured")

ErrOverflow signals that an overflow occured

View Source
var ErrProcessClosed = errors.New("incomplete processing: process is closing")

ErrProcessClosed signals that an incomplete processing occurred due to the early process closing

View Source
var ErrPropertyTooLong = errors.New("property too long")

ErrPropertyTooLong signals that a heartbeat property was too long

View Source
var ErrPropertyTooShort = errors.New("property too short")

ErrPropertyTooShort signals that a heartbeat property was too short

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

View Source
var ErrRandSeedDoesNotMatch = errors.New("random seed does not match")

ErrRandSeedDoesNotMatch signals that random seed does not match with the previous one

View Source
var ErrReceiptsHashMissmatch = errors.New("receipts hash missmatch")

ErrReceiptsHashMissmatch signals that overall receipts has does not match

View Source
var ErrRecursiveRelayedTxIsNotAllowed = errors.New("recursive relayed tx is not allowed")

ErrRecursiveRelayedTxIsNotAllowed signals that recursive relayed tx is not allowed

View Source
var ErrRelayedGasPriceMissmatch = errors.New("relayed gas price missmatch")

ErrRelayedGasPriceMissmatch signals that relayed gas price is not equal with user tx

View Source
var ErrRelayedTxBeneficiaryDoesNotMatchReceiver = errors.New("invalid address in relayed tx")

ErrRelayedTxBeneficiaryDoesNotMatchReceiver signals that an invalid address was provided in the relayed tx

View Source
var ErrRelayedTxDisabled = errors.New("relayed tx is disabled")

ErrRelayedTxDisabled signals that relayed tx are disabled

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

View Source
var ErrRelayedTxV2Disabled = errors.New("relayed tx v2 is disabled")

ErrRelayedTxV2Disabled signals that the v2 version of relayed tx is disabled

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

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

View Source
var ErrReservedFieldInvalid = errors.New("reserved field content is invalid")

ErrReservedFieldInvalid signals that reserved field has an invalid content

View Source
var ErrResultingSCRIsTooBig = errors.New("resulting SCR is too big")

ErrResultingSCRIsTooBig signals that resulting smart contract result is too big

View Source
var ErrRewardMiniBlockNotFromMeta = errors.New("rewards miniblocks should come only from meta")

ErrRewardMiniBlockNotFromMeta signals that miniblock has a different sender shard than meta

View Source
var ErrRootStateDoesNotMatch = errors.New("root state does not match")

ErrRootStateDoesNotMatch signals that root state does not match

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

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

View Source
var ErrScheduledRootHashDoesNotMatch = errors.New("scheduled root hash does not match")

ErrScheduledRootHashDoesNotMatch signals that scheduled root hash does not match

View Source
var ErrShardIdMissmatch = errors.New("shard ID missmatch")

ErrShardIdMissmatch signals shard ID does not match expectations

View Source
var ErrShardIsStuck = errors.New("shard is stuck")

ErrShardIsStuck signals that a shard is stuck

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

View Source
var ErrSmartContractDeploymentIsDisabled = errors.New("smart Contract deployment is disabled")

ErrSmartContractDeploymentIsDisabled signals that smart contract deployment was disabled

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

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

View Source
var ErrSystemBusy = errors.New("system busy")

ErrSystemBusy signals that the system is busy

View Source
var ErrTimeIsOut = errors.New("time is out")

ErrTimeIsOut signals that time is out

View Source
var ErrTooManyReceiptsMiniBlocks = errors.New("too many receipts miniblocks")

ErrTooManyReceiptsMiniBlocks signals that there were too many receipts miniblocks created

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

View Source
var ErrTransactionIsNotWhitelisted = errors.New("transaction is not whitelisted")

ErrTransactionIsNotWhitelisted signals that a transaction is not whitelisted

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

View Source
var ErrTransactionSignedWithHashIsNotEnabled = errors.New("transaction signed with hash is not enabled")

ErrTransactionSignedWithHashIsNotEnabled signals that a transaction signed with hash is not enabled

View Source
var ErrTrieNodeIsNotWhitelisted = errors.New("trie node is not whitelisted")

ErrTrieNodeIsNotWhitelisted signals that a trie node is not whitelisted

View Source
var ErrTxNotFound = errors.New("transaction not found")

ErrTxNotFound signals that a transaction has not found

View Source
var ErrTxValueOutOfBounds = errors.New("tx value is out of bounds")

ErrTxValueOutOfBounds signals that transaction value is out of bounds

View Source
var ErrTxValueTooBig = errors.New("tx value is too big")

ErrTxValueTooBig signals that transaction value is too big

View Source
var ErrUnknownBlockType = errors.New("block type is unknown")

ErrUnknownBlockType signals that block type is not correct

View Source
var ErrUnmarshalWithoutSuccess = errors.New("unmarshal without success")

ErrUnmarshalWithoutSuccess signals that unmarshal some data was not done with success

View Source
var ErrUpgradeNotAllowed = errors.New("upgrade is allowed only for owner")

ErrUpgradeNotAllowed signals that upgrade is not allowed

View Source
var ErrUserNameDoesNotMatch = errors.New("user name does not match")

ErrUserNameDoesNotMatch signals that username does not match

View Source
var ErrUserNameDoesNotMatchInCrossShardTx = errors.New("mismatch between receiver username and address")

ErrUserNameDoesNotMatchInCrossShardTx signals that username does not match in case of cross shard tx

View Source
var ErrValidatorInfoMiniBlockNotFromMeta = errors.New("validatorInfo miniblocks should come only from meta")

ErrValidatorInfoMiniBlockNotFromMeta signals that miniblock has a different sender shard than meta

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

View Source
var ErrWrongNonceInBlock = errors.New("wrong nonce in block")

ErrWrongNonceInBlock signals the nonce in block is different from expected nonce

View Source
var ErrWrongNonceInVMOutput = errors.New("nonce invalid from SC run")

ErrWrongNonceInVMOutput signals that nonce in vm output is wrong

View Source
var ErrWrongTransaction = errors.New("invalid transaction")

ErrWrongTransaction signals that transaction is invalid

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

ErrWrongTypeAssertion signals that a type assertion failed

View Source
var ErrWrongTypeInContainer = errors.New("wrong type of object inside container")

ErrWrongTypeInContainer signals that a wrong type of object was found in container

View Source
var ErrWrongTypeInMiniBlock = errors.New("type in miniblock is not correct for processing")

ErrWrongTypeInMiniBlock signals that type is not correct for processing

View Source
var ErrZeroMaxComputableRounds = errors.New("max computable rounds is zero")

ErrZeroMaxComputableRounds signals that a value of zero was provided on the maxComputableRounds

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

func IsAllowedToSaveUnderKey(key []byte) bool

IsAllowedToSaveUnderKey returns if saving key-value in data tries under given key is allowed

func IsBuiltinFuncCallWithParam added in v1.5.0

func IsBuiltinFuncCallWithParam(txData []byte, function string) bool

IsBuiltinFuncCallWithParam checks if the given transaction data represents a builtin function call with parameters

func IsInProperRound

func IsInProperRound(index int64) bool

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

func IsSetGuardianCall(txData []byte) bool

IsSetGuardianCall checks if the given transaction data represents the set guardian builtin function call

func IsShardCacherIdentifierForSourceMe

func IsShardCacherIdentifierForSourceMe(cacheID string, shardID uint32) bool

IsShardCacherIdentifierForSourceMe checks whether the specified cache is for the pair (sender = me, destination = *)

func ParseShardCacherIdentifier

func ParseShardCacherIdentifier(cacheID string) (uint32, uint32, error)

ParseShardCacherIdentifier parses an identifier into its components: sender shard, destination shard

func ShardCacherIdentifier

func ShardCacherIdentifier(senderShardID uint32, destinationShardID uint32) string

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) 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
	Close() error
	FilterCodeMetadataForUpgrade(input []byte) ([]byte, error)
	ApplyFiltersOnSCCodeMetadata(codeMetadata vmcommon.CodeMetadata) vmcommon.CodeMetadata
	ResetCounters()
	GetCounterValues() map[string]uint64
	IsInterfaceNil() bool
}

BlockChainHookHandler defines the actions which should be performed by implementation

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()
	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
}

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

type CheckedChunkResult struct {
	IsChunk        bool
	HaveAllChunks  bool
	CompleteBuffer []byte
}

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{}
	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

type DataMarshalizer interface {
	CreateMarshalledData(txHashes [][]byte) ([][]byte, error)
}

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

type ESDTPauseHandler interface {
	IsPaused(token []byte) bool
	IsInterfaceNil() bool
}

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

type EnableRoundsHandler interface {
	CheckRound(round uint64)
	IsExampleEnabled() bool
	IsInterfaceNil() bool
}

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

type EpochBootstrapper interface {
	SetCurrentEpochStartRound(round uint64)
	IsInterfaceNil() bool
}

EpochBootstrapper defines the actions needed by bootstrapper

type EpochHandler

type EpochHandler interface {
	MetaEpoch() uint32
	IsInterfaceNil() bool
}

EpochHandler defines what a component which handles current epoch should be able to do

type EpochNotifier

type EpochNotifier interface {
	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 ForkInfo

type ForkInfo struct {
	IsDetected bool
	Nonce      uint64
	Round      uint64
	Hash       []byte
}

ForkInfo hold the data related to a detected fork

func NewForkInfo

func NewForkInfo() *ForkInfo

NewForkInfo creates a new ForkInfo object

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

type HashAccesser interface {
	SetHash([]byte)
	Hash() []byte
}

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) 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, 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

type NetworkConnectionWatcher interface {
	IsConnectedToTheNetwork() bool
	IsInterfaceNil() bool
}

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

type NumConnectedPeersProvider interface {
	ConnectedPeers() []core.PeerID
	IsInterfaceNil() bool
}

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

type PoolsCleaner interface {
	Close() error
	StartCleaning()
	IsInterfaceNil() bool
}

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

type RoundHandler interface {
	Index() int64
	IsInterfaceNil() bool
}

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

type RoundTimeDurationHandler

type RoundTimeDurationHandler interface {
	TimeDuration() time.Duration
	IsInterfaceNil() bool
}

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
}

SCQuery represents a prepared query for executing a function of the smart contract

type SCQueryService

type SCQueryService interface {
	ExecuteQuery(query *SCQuery) (*vmcommon.VMOutput, 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

type SelectionChance interface {
	GetMaxThreshold() uint32
	GetChancePercent() uint32
}

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 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]*state.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() BlockChainHookHandler
	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

Jump to

Keyboard shortcuts

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