Documentation ¶
Index ¶
- Constants
- Variables
- func AddHeaderToBlackList(blackListHandler TimeCacher, hash []byte)
- func DisplayProcessTxDetails(message string, accountHandler state.AccountHandler, ...)
- func GetHeaderFromStorageWithNonce(nonce uint64, shardId uint32, storageService dataRetriever.StorageService, ...) (data.HeaderHandler, []byte, error)
- func GetMarshalizedHeaderFromStorage(blockUnit dataRetriever.UnitType, hash []byte, marshalizer marshal.Marshalizer, ...) ([]byte, error)
- func GetMetaHeader(hash []byte, headersCacher dataRetriever.HeadersPool, ...) (*block.MetaBlock, error)
- func GetMetaHeaderFromPool(hash []byte, headersCacher dataRetriever.HeadersPool) (*block.MetaBlock, error)
- func GetMetaHeaderFromPoolWithNonce(nonce uint64, headersCacher dataRetriever.HeadersPool) (*block.MetaBlock, []byte, error)
- func GetMetaHeaderFromStorage(hash []byte, marshalizer marshal.Marshalizer, ...) (*block.MetaBlock, error)
- func GetMetaHeaderFromStorageWithNonce(nonce uint64, storageService dataRetriever.StorageService, ...) (*block.MetaBlock, []byte, error)
- func GetMetaHeaderWithNonce(nonce uint64, headersCacher dataRetriever.HeadersPool, ...) (*block.MetaBlock, []byte, error)
- func GetShardHeader(hash []byte, headersCacher dataRetriever.HeadersPool, ...) (*block.Header, error)
- func GetShardHeaderFromPool(hash []byte, headersCacher dataRetriever.HeadersPool) (*block.Header, error)
- func GetShardHeaderFromPoolWithNonce(nonce uint64, shardId uint32, headersCacher dataRetriever.HeadersPool) (*block.Header, []byte, error)
- func GetShardHeaderFromStorage(hash []byte, marshalizer marshal.Marshalizer, ...) (*block.Header, error)
- func GetShardHeaderFromStorageWithNonce(nonce uint64, shardId uint32, storageService dataRetriever.StorageService, ...) (*block.Header, []byte, error)
- func GetShardHeaderWithNonce(nonce uint64, shardId uint32, headersCacher dataRetriever.HeadersPool, ...) (*block.Header, []byte, error)
- func GetSortedStorageUpdates(account *vmcommon.OutputAccount) []*vmcommon.StorageUpdate
- func GetTransactionHandler(senderShardID uint32, destShardID uint32, txHash []byte, ...) (data.TransactionHandler, error)
- func GetTransactionHandlerFromPool(senderShardID uint32, destShardID uint32, txHash []byte, ...) (data.TransactionHandler, error)
- func GetTransactionHandlerFromStorage(txHash []byte, storageService dataRetriever.StorageService, ...) (data.TransactionHandler, error)
- func IsAllowedToSaveUnderKey(key []byte) bool
- func IsInProperRound(index int64) bool
- func IsShardCacherIdentifierForSourceMe(cacheID string, shardID uint32) bool
- func ParseShardCacherIdentifier(cacheID string) (uint32, uint32, error)
- func ShardCacherIdentifier(senderShardID uint32, destinationShardID uint32) string
- func SortHeadersByNonce(headers []data.HeaderHandler)
- func SortVMOutputInsideData(vmOutput *vmcommon.VMOutput) []*vmcommon.OutputAccount
- type AntifloodDebugger
- type ArgumentsParser
- type BaseOperationCost
- type BlockChainHookHandler
- type BlockHeaderState
- type BlockProcessor
- type BlockSizeThrottler
- type BlockTracker
- type BootStorer
- type Bootstrapper
- type BootstrapperFromStorage
- type BuiltInCost
- type BuiltInFunctionContainer
- type BuiltinFunction
- type CallArgumentsParser
- type Checker
- type DataMarshalizer
- type DataPacker
- type DeployArgumentsParser
- type ESDTPauseHandler
- type EconomicsDataHandler
- type EndOfEpochEconomics
- type EpochBootstrapper
- type EpochHandler
- type EpochNotifier
- type EpochStartDataCreator
- type EpochStartEventNotifier
- type EpochStartSystemSCProcessor
- type EpochStartTriggerHandler
- type EpochStartValidatorInfoCreator
- type FallbackHeaderValidator
- type FeeHandler
- type FloodPreventer
- type ForkDetector
- type ForkInfo
- type GasCost
- type GasHandler
- type HashAccesser
- type HdrValidatorHandler
- type HeaderConstructionValidator
- type HeaderIntegrityVerifier
- type HeaderValidator
- type InterceptedData
- type InterceptedDataFactory
- type InterceptedDebugger
- type InterceptedHeaderSigVerifier
- type Interceptor
- type InterceptorProcessor
- type InterceptorThrottler
- type InterceptorsContainer
- type InterceptorsContainerFactory
- type IntermediateProcessorContainer
- type IntermediateProcessorsContainerFactory
- type IntermediateTransactionHandler
- type MiniBlockProvider
- type MiniblockAndHash
- type NetworkConnectionWatcher
- type NodesCoordinator
- type P2PAntifloodHandler
- type PayableHandler
- type PeerBlackListCacher
- type PeerChangesHandler
- type PeerShardMapper
- type PeerValidatorMapper
- type PendingMiniBlocksHandler
- type PoolsCleaner
- type PreProcessor
- type PreProcessorsContainer
- type PreProcessorsContainerFactory
- type RatingChanceHandler
- type RatingsInfoHandler
- type RatingsStepHandler
- type RequestBlockBodyHandler
- type RequestHandler
- type RequiredDataPool
- type RewardTransactionPreProcessor
- type RewardTransactionProcessor
- type RewardsCreator
- type RewardsHandler
- type RoundTimeDurationHandler
- type Rounder
- type SCQuery
- type SCQueryService
- type SelectionChance
- type SigVerifier
- type SignedDataValidator
- type SmartContractProcessor
- type SmartContractResultProcessor
- type SmartContractToProtocolHandler
- type StorageArgumentsParser
- type TimeCacher
- type TopicFloodPreventer
- type TopicHandler
- type TransactionCoordinator
- type TransactionFeeCalculator
- type TransactionFeeHandler
- type TransactionLogProcessor
- type TransactionLogProcessorDatabase
- type TransactionProcessor
- type TransactionType
- type TransactionVerifier
- type TransactionWithFeeHandler
- type TxGasHandler
- type TxTypeHandler
- type TxValidator
- type TxValidatorHandler
- type TxVersionCheckerHandler
- type ValidatorInfoSyncer
- type ValidatorStatisticsProcessor
- type ValidatorsProvider
- type ValidityAttester
- type VirtualMachinesContainer
- type VirtualMachinesContainerFactory
- type WhiteListHandler
Constants ¶
const BlockFinality = 1
BlockFinality defines the block finality which is used in meta-chain/shards (the real finality in shards is given by meta-chain)
const EpochChangeGracePeriod = 1
EpochChangeGracePeriod defines the allowed round numbers till the shard has to change the epoch
const MaxGasFeeHigherFactorAccepted = 10
MaxGasFeeHigherFactorAccepted defines the maximum higher factor of gas fee put inside a transaction compared with the real gas used, after which the transaction will be considered an attack and all the gas will be consumed and nothing will be refunded to the sender
const MaxHeaderRequestsAllowed = 20
MaxHeaderRequestsAllowed defines the maximum number of missing cross-shard headers (gaps) which could be requested in one round, when node processes a received block
const MaxHeadersToRequestInAdvance = 20
MaxHeadersToRequestInAdvance defines the maximum number of headers which will be requested in advance, if they are missing
const MaxHeadersToWhitelistInAdvance = 20
MaxHeadersToWhitelistInAdvance defines the maximum number of headers whose miniblocks will be whitelisted in advance
const MaxMetaHeadersAllowedInOneShardBlock = 50
MaxMetaHeadersAllowedInOneShardBlock defines the maximum number of meta headers allowed to be included in one shard block
const MaxMetaNoncesBehind = 15
MaxMetaNoncesBehind defines the maximum difference between the current meta block nonce and the processed meta block nonce before a shard is considered stuck
const MaxNumOfTxsToSelect = 30000
MaxNumOfTxsToSelect defines the maximum number of transactions that should be selected from the cache
const MaxNumPendingMiniBlocksPerShard = 10
MaxNumPendingMiniBlocksPerShard defines the maximum number of pending miniblocks per shard, after which a shard could be considered stuck if this value multiplied by the number of shards is reached
const MaxRoundsToKeepUnprocessedMiniBlocks = 100
MaxRoundsToKeepUnprocessedMiniBlocks defines the maximum number of rounds for which unprocessed miniblocks are kept in pool
const MaxRoundsToKeepUnprocessedTransactions = 100
MaxRoundsToKeepUnprocessedTransactions defines the maximum number of rounds for which unprocessed transactions are kept in pool
const MaxRoundsWithoutCommittedBlock = 10
MaxRoundsWithoutCommittedBlock defines the maximum rounds to wait for a new block to be committed, before a special action to be applied
const MaxRoundsWithoutNewBlockReceived = 10
MaxRoundsWithoutNewBlockReceived defines the maximum number of rounds to wait for a new block to be received, before a special action to be applied
const MaxShardHeadersAllowedInOneMetaBlock = 60
MaxShardHeadersAllowedInOneMetaBlock defines the maximum number of shard headers allowed to be included in one meta block
const MaxShardNoncesBehind = 15
MaxShardNoncesBehind defines the maximum difference between the current shard block nonce and the last notarized shard block nonce by meta, before meta is considered stuck
const MaxSyncWithErrorsAllowed = 10
MaxSyncWithErrorsAllowed defines the maximum allowed number of sync with errors, before a special action to be applied
const MetaBlockValidity = 1
MetaBlockValidity defines the block validity which is when checking a metablock
const MinForkRound = uint64(0)
MinForkRound represents the minimum fork round set by a notarized header received
const MinShardHeadersFromSameShardInOneMetaBlock = 10
MinShardHeadersFromSameShardInOneMetaBlock defines the minimum number of shard headers from the same shard, which would be included in one meta block if they are available
const NonceDifferenceWhenSynced = 0
NonceDifferenceWhenSynced defines the difference between probable highest nonce seen from network and node's last committed block nonce, after which, node is considered himself not synced
const NumTxPerSenderBatchForFillingMiniblock = 10
NumTxPerSenderBatchForFillingMiniblock defines the number of transactions to be drawn from the transactions pool, for a specific sender, in a single pass. Drawing transactions for a miniblock happens in multiple passes, until "MaxItemsInBlock" are drawn.
const RoundModulusTrigger = 5
RoundModulusTrigger defines a round modulus on which a trigger for an action will be released
const RoundModulusTriggerWhenSyncIsStuck = 20
RoundModulusTriggerWhenSyncIsStuck defines a round modulus on which a trigger for an action when sync is stuck will be released
Variables ¶
var ErrAccountNotFound = errors.New("account not found")
ErrAccountNotFound signals that the account was not found for the provided address
var ErrAccountNotPayable = errors.New("sending value to non payable contract")
ErrAccountNotPayable will be sent when trying to send money to a non-payable account
var ErrAccountStateDirty = errors.New("accountState was dirty before starting to change")
ErrAccountStateDirty signals that the accounts were modified before starting the current modification
var ErrAccumulatedFeesDoNotMatch = errors.New("accumulated fees do not match")
ErrAccumulatedFeesDoNotMatch signals that accumulated fees do not match
var ErrAccumulatedFeesInEpochDoNotMatch = errors.New("accumulated fees in epoch do not match")
ErrAccumulatedFeesInEpochDoNotMatch signals that accumulated fees in epoch do not match
var ErrAddressIsNotESDTSystemSC = errors.New("destination is not system sc address")
ErrAddressIsNotESDTSystemSC signals that destination is not a system sc address
var ErrBlockBodyHashMismatch = errors.New("block bodies does not match")
ErrBlockBodyHashMismatch signals that block body hashes does not match
var ErrBlockHashDoesNotMatch = errors.New("block hash does not match")
ErrBlockHashDoesNotMatch signals that header hash does not match with the previous one
var ErrBlockProposerSignatureMissing = errors.New("block proposer signature is missing")
ErrBlockProposerSignatureMissing signals that block proposer signature is missing from the block aggregated sig
var ErrBuiltInFunctionCalledWithValue = errors.New("built in function called with tx value is not allowed")
ErrBuiltInFunctionCalledWithValue signals that builtin function was called with value that is not allowed
var ErrBuiltInFunctionsAreDisabled = errors.New("built in functions are disabled")
ErrBuiltInFunctionsAreDisabled signals that built in functions are disabled
var ErrCallerIsNotTheDNSAddress = errors.New("not a dns address")
ErrCallerIsNotTheDNSAddress signals that called address is not the DNS address
var ErrCannotWipeAccountNotFrozen = errors.New("cannot wipe because the account is not frozen for this esdt token")
ErrCannotWipeAccountNotFrozen signals that account isn't frozen so the wipe is not possible
var ErrConsecutiveMissedBlocksPenaltyLowerThanOne = errors.New("consecutive missed blocks penalty lower than 1")
ErrConsecutiveMissedBlocksPenaltyLowerThanOne signals that the ConsecutiveMissedBlocksPenalty is lower than 1
var ErrContainerKeyAlreadyExists = errors.New("provided key already exists in container")
ErrContainerKeyAlreadyExists signals that an element was already set in the container's map
var ErrCrossShardMBWithoutConfirmationFromMeta = errors.New("cross shard miniblock with destination current shard is not confirmed by metachain")
ErrCrossShardMBWithoutConfirmationFromMeta signals that miniblock was not yet notarized by metachain
var ErrDecreaseRatingsStepMoreThanMinusOne = errors.New("decrease rating step has a value greater than -1")
ErrDecreaseRatingsStepMoreThanMinusOne signals that the decrease rating step has a vale greater than -1
var ErrDevFeesInEpochDoNotMatch = errors.New("developer fees in epoch do not match")
ErrDevFeesInEpochDoNotMatch signals that developer fees in epoch do not match
var ErrDeveloperFeesDoNotMatch = errors.New("developer fees do not match")
ErrDeveloperFeesDoNotMatch signals that developer fees do not match
var ErrDuplicateThreshold = errors.New("two thresholds are the same")
ErrDuplicateThreshold signals that two thresholds are the same
var ErrESDTIsFrozenForAccount = errors.New("account is frozen for this esdt token")
ErrESDTIsFrozenForAccount signals that account is frozen for given esdt token
var ErrESDTTokenIsPaused = errors.New("esdt token is paused")
ErrESDTTokenIsPaused signals that esdt token is paused
var ErrEmptyConsensusGroup = errors.New("consensusGroup is empty")
ErrEmptyConsensusGroup is raised when an operation is attempted with an empty consensus group
var ErrEmptyFloodPreventerList = errors.New("empty flood preventer provided")
ErrEmptyFloodPreventerList signals that an empty flood preventer list has been provided
var ErrEmptyFunctionName = errors.New("empty function name")
ErrEmptyFunctionName signals that an empty function name has been provided
var ErrEmptyPeerID = errors.New("empty peer ID")
ErrEmptyPeerID signals that an empty peer ID has been provided
var ErrEmptyTopic = errors.New("empty topic")
ErrEmptyTopic signals that an empty topic has been provided
var ErrEpochDoesNotMatch = errors.New("epoch does not match")
ErrEpochDoesNotMatch signals that epoch does not match between headers
var ErrEpochStartDataDoesNotMatch = errors.New("epoch start data does not match")
ErrEpochStartDataDoesNotMatch signals that EpochStartData is not the same as the leader created
var ErrFailedTransaction = errors.New("failed transaction, gas consumed")
ErrFailedTransaction signals that transaction is of type failed.
var ErrGettingShardDataFromEpochStartData = errors.New("could not find shard data from previous epoch start metablock")
ErrGettingShardDataFromEpochStartData signals that could not get shard data from previous epoch start block
var ErrHeaderBodyMismatch = errors.New("body cannot be validated from header data")
ErrHeaderBodyMismatch signals that the header does not attest all data from the block
var ErrHeaderIsBlackListed = errors.New("header is black listed")
ErrHeaderIsBlackListed signals that the header provided is black listed
var ErrHeaderNotFinal = errors.New("header in metablock is not final")
ErrHeaderNotFinal signals that header is not final and it should be
var ErrHeaderShardDataMismatch = errors.New("shard header does not match shard info")
ErrHeaderShardDataMismatch signals that shard header does not match created shard info
var ErrHigherNonceInBlock = errors.New("higher nonce in block")
ErrHigherNonceInBlock signals that a block with higher nonce than permitted has been provided
var ErrHigherNonceInTransaction = errors.New("higher nonce in transaction")
ErrHigherNonceInTransaction signals the nonce in transaction is higher than the account's nonce
var ErrHigherRoundInBlock = errors.New("higher round in block")
ErrHigherRoundInBlock signals that a block with higher round than permitted has been provided
var ErrHoursToMaxRatingFromStartRatingZero = errors.New("hours to reach max rating is zero")
ErrHoursToMaxRatingFromStartRatingZero signals that the number of hours to reach max rating step is zero
var ErrIncreaseStepLowerThanOne = errors.New("increase step is lower than one")
ErrIncreaseStepLowerThanOne signals that an increase step lower than one has been provided
var ErrInsufficientFee = errors.New("insufficient balance for fees")
ErrInsufficientFee signals that the current balance doesn't have the required transaction fee
var ErrInsufficientFunds = errors.New("insufficient funds")
ErrInsufficientFunds signals the funds are insufficient for the move balance operation but the transaction fee is covered by the current balance
var ErrInsufficientGasLimitInTx = errors.New("insufficient gas limit in tx")
ErrInsufficientGasLimitInTx signals that a lower gas limit than required was provided
var ErrInsufficientGasPriceInTx = errors.New("insufficient gas price in tx")
ErrInsufficientGasPriceInTx signals that a lower gas price than required was provided
var ErrInterceptedDataNotForCurrentShard = errors.New("intercepted data not for current shard")
ErrInterceptedDataNotForCurrentShard signals that intercepted data is not for current shard
var ErrInvalidAddressLength = errors.New("invalid address length")
ErrInvalidAddressLength signals that address length is invalid
var ErrInvalidArguments = errors.New("invalid arguments to process built-in function")
ErrInvalidArguments signals that invalid arguments were given to process built-in function
var ErrInvalidBadPeerThreshold = errors.New("invalid bad peer threshold")
ErrInvalidBadPeerThreshold signals that an invalid bad peer threshold has been provided
var ErrInvalidBlockRequestOldEpoch = errors.New("invalid block request from old epoch")
ErrInvalidBlockRequestOldEpoch signals that invalid block was requested from old epoch
var ErrInvalidBody = errors.New("invalid body")
ErrInvalidBody signals that an invalid body has been provided
var ErrInvalidCacheRefreshIntervalInSec = errors.New("invalid cacheRefreshIntervalInSec")
ErrInvalidCacheRefreshIntervalInSec signals that the cacheRefreshIntervalInSec is invalid - zero or less
var ErrInvalidChainID = errors.New("invalid chain ID")
ErrInvalidChainID signals that an invalid chain ID has been provided
var ErrInvalidContainerKey = errors.New("element does not exist in container")
ErrInvalidContainerKey signals that an element does not exist in the container's map
var ErrInvalidDecayCoefficient = errors.New("decay coefficient is invalid")
ErrInvalidDecayCoefficient signals that the provided decay coefficient is invalid
var ErrInvalidDecayIntervalInSeconds = errors.New("invalid decay interval in seconds")
ErrInvalidDecayIntervalInSeconds signals that an invalid interval in seconds was provided
var ErrInvalidGasModifier = errors.New("invalid gas modifier")
ErrInvalidGasModifier signals that provided gas modifier is invalid
var ErrInvalidGasPerDataByte = errors.New("invalid gas per data byte")
ErrInvalidGasPerDataByte signals that an invalid gas per data byte has been read from config file
var ErrInvalidGenesisTotalSupply = errors.New("invalid genesis total supply")
ErrInvalidGenesisTotalSupply signals that invalid genesis total supply was provided
var ErrInvalidInflationPercentages = errors.New("invalid inflation percentages")
ErrInvalidInflationPercentages signals that inflation percentages are not correct
var ErrInvalidMaxGasLimitPerBlock = errors.New("invalid max gas limit per block")
ErrInvalidMaxGasLimitPerBlock signals that an invalid max gas limit per block has been read from config file
var ErrInvalidMaxScore = errors.New("invalid maximum score")
ErrInvalidMaxScore signals that an invalid maximum score was provided
var ErrInvalidMetaHeader = errors.New("invalid header provided, expected MetaBlock")
ErrInvalidMetaHeader signals that a wrong implementation of HeaderHandler was provided
var ErrInvalidMetaTransaction = errors.New("meta transaction is invalid")
ErrInvalidMetaTransaction signals that meta transaction is invalid
var ErrInvalidMinScore = errors.New("invalid minimum score")
ErrInvalidMinScore signals that an invalid minimum score was provided
var ErrInvalidMiniBlockType = errors.New("invalid miniblock type")
ErrInvalidMiniBlockType signals that an invalid miniblock type has been provided
var ErrInvalidMinimumGasLimitForTx = errors.New("invalid minimum gas limit for transactions")
ErrInvalidMinimumGasLimitForTx signals that an invalid minimum gas limit for transactions has been read from config file
var ErrInvalidMinimumGasPrice = errors.New("invalid minimum gas price")
ErrInvalidMinimumGasPrice signals that an invalid gas price has been read from config file
var ErrInvalidNonceRequest = errors.New("invalid nonce request")
ErrInvalidNonceRequest signals that invalid nonce was requested
var ErrInvalidPeerAccount = errors.New("invalid peer account")
ErrInvalidPeerAccount signals that a peer account is invalid
var ErrInvalidRewardsPercentages = errors.New("invalid rewards percentages")
ErrInvalidRewardsPercentages signals that rewards percentages are not correct
var ErrInvalidRewardsTopUpGradientPoint = errors.New("rewards top up gradient point is invalid")
ErrInvalidRewardsTopUpGradientPoint signals that the top up gradient point is invalid
var ErrInvalidShardCacherIdentifier = errors.New("invalid identifier for shard cacher")
ErrInvalidShardCacherIdentifier signals an invalid identifier
var ErrInvalidShardId = errors.New("invalid shard id")
ErrInvalidShardId signals that the shard id is invalid
var ErrInvalidTransactionVersion = errors.New("invalid transaction version")
ErrInvalidTransactionVersion signals that an invalid transaction version has been provided
var ErrInvalidTxInPool = errors.New("invalid transaction in the transactions pool")
ErrInvalidTxInPool signals an invalid transaction in the transactions pool
var ErrInvalidUnitValue = errors.New("invalid unit value")
ErrInvalidUnitValue signals that an invalid unit value was provided
var ErrInvalidUserNameLength = errors.New("invalid user name length")
ErrInvalidUserNameLength signals that provided user name length is invalid
var ErrInvalidVMInputGasComputation = errors.New("invalid vm input gas computation")
ErrInvalidVMInputGasComputation signals that invalid vm input gas computation was provided
var ErrInvalidVMType = errors.New("invalid VM type")
ErrInvalidVMType signals that invalid vm type was provided
var ErrInvalidValue = errors.New("invalid value provided")
ErrInvalidValue signals that an invalid value was provided
var ErrLenMismatch = errors.New("lengths mismatch")
ErrLenMismatch signals that 2 or more slices have different lengths
var ErrLogNotFound = errors.New("no logs for queried transaction")
ErrLogNotFound is the error returned when a transaction has no logs
var ErrLowerNonceInBlock = errors.New("lower nonce in block")
ErrLowerNonceInBlock signals that a block with lower nonce than permitted has been provided
var ErrLowerNonceInTransaction = errors.New("lower nonce in transaction")
ErrLowerNonceInTransaction signals the nonce in transaction is lower than the account's nonce
var ErrLowerRoundInBlock = errors.New("header round is lower than last committed")
ErrLowerRoundInBlock signals that a header round is too low for processing it
var ErrMarshalWithoutSuccess = errors.New("marshal without success")
ErrMarshalWithoutSuccess signals that marshal some data was not done with success
var ErrMaxBlockSizeReached = errors.New("max block size has been reached")
ErrMaxBlockSizeReached signals that max block size has been reached
var ErrMaxGasLimitPerBlockInSelfShardIsReached = errors.New("max gas limit per block in self shard is reached")
ErrMaxGasLimitPerBlockInSelfShardIsReached signals that max gas limit per block in self shard has been reached
var ErrMaxGasLimitPerMiniBlockInReceiverShardIsReached = errors.New("max gas limit per mini block in receiver shard is reached")
ErrMaxGasLimitPerMiniBlockInReceiverShardIsReached signals that max gas limit per mini block in receiver shard has been reached
var ErrMaxGasLimitPerMiniBlockInSenderShardIsReached = errors.New("max gas limit per mini block in sender shard is reached")
ErrMaxGasLimitPerMiniBlockInSenderShardIsReached signals that max gas limit per mini block in sender shard has been reached
var ErrMaxRatingIsSmallerThanMinRating = errors.New("max rating is smaller than min rating")
ErrMaxRatingIsSmallerThanMinRating signals that the max rating is smaller than the min rating value
var ErrMaxRatingZero = errors.New("max rating is zero")
ErrMaxRatingZero signals that maxrating with a value of zero has been provided
var ErrMinRatingSmallerThanOne = errors.New("min rating is smaller than one")
ErrMinRatingSmallerThanOne signals that the min rating is smaller than the min value of 1
var ErrMiniBlockHashMismatch = errors.New("miniblocks does not match")
ErrMiniBlockHashMismatch signals that miniblock hashes does not match
var ErrMiniBlockNumMissMatch = errors.New("num miniblocks does not match")
ErrMiniBlockNumMissMatch signals that number of miniblocks does not match
var ErrMiniBlocksInWrongOrder = errors.New("miniblocks in wrong order, should have been only from me")
ErrMiniBlocksInWrongOrder signals the miniblocks are in wrong order
var ErrMissingBody = errors.New("missing body")
ErrMissingBody signals that body of the block is missing
var ErrMissingHashForHeaderNonce = errors.New("missing hash for header nonce")
ErrMissingHashForHeaderNonce signals that hash of the block is missing
var ErrMissingHeader = errors.New("missing header")
ErrMissingHeader signals that header of the block is missing
var ErrMissingPreProcessor = errors.New("pre processor is missing")
ErrMissingPreProcessor signals that required pre processor is missing
var ErrMissingTransaction = errors.New("missing transaction")
ErrMissingTransaction signals that one transaction is missing
var ErrMoreGasConsumedThanProvided = errors.New("more gas used than provided")
ErrMoreGasConsumedThanProvided signals that VM used more gas than provided
var ErrMoreGasThanGasLimitPerBlock = errors.New("more gas was provided than gas limit per block")
ErrMoreGasThanGasLimitPerBlock signals that more gas was provided than gas limit per block
var ErrNegativeBalanceDeltaOnCrossShardAccount = errors.New("negative balance delta on cross shard account")
ErrNegativeBalanceDeltaOnCrossShardAccount signals that negative balance delta was given on cross shard account
var ErrNegativeValue = errors.New("negative value")
ErrNegativeValue signals that a negative value has been detected and it is not allowed
var ErrNilAccountsAdapter = errors.New("nil AccountsAdapter")
ErrNilAccountsAdapter defines the error when trying to use a nil AccountsAddapter
var ErrNilAddressContainer = errors.New("nil AddressContainer")
ErrNilAddressContainer signals that an operation has been attempted to or with a nil AddressContainer implementation
var ErrNilAntifloodHandler = errors.New("nil antiflood handler")
ErrNilAntifloodHandler signals that a nil antiflood handler has been provided
var ErrNilAppStatusHandler = errors.New("nil AppStatusHandler")
ErrNilAppStatusHandler defines the error for setting a nil AppStatusHandler
var ErrNilArgumentParser = errors.New("argument parser is nil")
ErrNilArgumentParser signals that the argument parser is nil
var ErrNilArgumentStruct = errors.New("nil argument struct")
ErrNilArgumentStruct signals that a function has received nil instead of an instantiated Arg... structure
var ErrNilBadTxHandler = errors.New("nil bad tx handler")
ErrNilBadTxHandler signals that bad tx handler is nil
var ErrNilBalanceComputationHandler = errors.New("nil balance computation handler")
ErrNilBalanceComputationHandler signals that a nil balance computation handler has been provided
var ErrNilBlackListCacher = errors.New("nil black list cacher")
ErrNilBlackListCacher signals that a nil black list cacher was provided
var ErrNilBlackListedPkCache = errors.New("nil black listed public key cache")
ErrNilBlackListedPkCache signals that a nil black listed public key cache has been provided
var ErrNilBlockBody = errors.New("nil block body")
ErrNilBlockBody signals that an operation has been attempted to or with a nil block body
var ErrNilBlockChain = errors.New("nil block chain")
ErrNilBlockChain signals that an operation has been attempted to or with a nil blockchain
var ErrNilBlockChainHook = errors.New("nil blockchain hook")
ErrNilBlockChainHook signals that nil blockchain hook has been provided
var ErrNilBlockHeader = errors.New("nil block header")
ErrNilBlockHeader signals that an operation has been attempted to or with a nil block header
var ErrNilBlockProcessor = errors.New("nil block processor")
ErrNilBlockProcessor signals that an operation has been attempted to or with a nil BlockProcessor implementation
var ErrNilBlockSizeComputationHandler = errors.New("nil block size computation handler")
ErrNilBlockSizeComputationHandler signals that a nil block size computation handler has been provided
var ErrNilBlockSizeThrottler = errors.New("block size throttler is nil")
ErrNilBlockSizeThrottler signals that block size throttler si nil
var ErrNilBlockTracker = errors.New("nil block tracker")
ErrNilBlockTracker signals that a nil block tracker was provided
var ErrNilBootStorer = errors.New("nil boot storer")
ErrNilBootStorer signals that the provided boot storer is bil
var ErrNilBuffer = errors.New("provided byte buffer is nil")
ErrNilBuffer signals that a provided byte buffer is nil
var ErrNilBuiltInFunction = errors.New("built in function is nil")
ErrNilBuiltInFunction signals that built in function is nil
var ErrNilCacher = errors.New("nil cacher")
ErrNilCacher signals that a nil cache has been provided
var ErrNilContainerElement = errors.New("element cannot be nil")
ErrNilContainerElement signals when trying to add a nil element in the container
var ErrNilDataPoolHolder = errors.New("nil data pool holder")
ErrNilDataPoolHolder signals that the data pool holder is nil
var ErrNilDataToProcess = errors.New("nil data to process")
ErrNilDataToProcess signals that nil data was provided
var ErrNilDebugger = errors.New("nil debug handler")
ErrNilDebugger signals that a nil debug handler has been provided
var ErrNilDnsAddresses = errors.New("nil dns addresses map")
ErrNilDnsAddresses signals that nil dns addresses map was provided
var ErrNilEconomicsData = errors.New("nil economics data")
ErrNilEconomicsData signals that nil economics data has been provided
var ErrNilEconomicsFeeHandler = errors.New("nil economics fee handler")
ErrNilEconomicsFeeHandler signals that fee handler is nil
var ErrNilEpochEconomics = errors.New("nil epoch economics")
ErrNilEpochEconomics signals that nil end of epoch econimics was provided
var ErrNilEpochHandler = errors.New("nil epoch handler")
ErrNilEpochHandler signals that a nil epoch handler was provided
var ErrNilEpochNotifier = errors.New("nil EpochNotifier")
ErrNilEpochNotifier signals that the provided EpochNotifier is nil
var ErrNilEpochStartDataCreator = errors.New("nil epoch start data creator")
ErrNilEpochStartDataCreator signals that nil epoch start data creator was provided
var ErrNilEpochStartNotifier = errors.New("nil epochStartNotifier")
ErrNilEpochStartNotifier signals that the provided epochStartNotifier is nil
var ErrNilEpochStartSystemSCProcessor = errors.New("nil epoch start system sc processor")
ErrNilEpochStartSystemSCProcessor signals that nil epoch start system sc processor was provided
var ErrNilEpochStartTrigger = errors.New("nil start of epoch trigger")
ErrNilEpochStartTrigger signals that a nil start of epoch trigger was provided
var ErrNilEpochStartValidatorInfoCreator = errors.New("nil epoch start validator info creator")
ErrNilEpochStartValidatorInfoCreator signals that nil epoch start validator info creator was provided
var ErrNilFallbackHeaderValidator = errors.New("nil fallback header validator")
ErrNilFallbackHeaderValidator signals that a nil fallback header validator has been provided
var ErrNilForkDetector = errors.New("nil fork detector")
ErrNilForkDetector signals that the fork detector is nil
var ErrNilGasHandler = errors.New("nil gas handler")
ErrNilGasHandler signals that gas handler is nil
var ErrNilGasSchedule = errors.New("nil GasSchedule")
ErrNilGasSchedule signals that an operation has been attempted with a nil gas schedule
var ErrNilHasher = errors.New("nil Hasher")
ErrNilHasher signals that an operation has been attempted to or with a nil hasher implementation
var ErrNilHaveTimeHandler = errors.New("nil have time handler")
ErrNilHaveTimeHandler signals that a nil have time handler func was provided
var ErrNilHdrValidator = errors.New("nil header validator")
ErrNilHdrValidator signals that a nil header validator has been provided
var ErrNilHeaderHandler = errors.New("nil header handler")
ErrNilHeaderHandler signals that a nil header handler has been provided
var ErrNilHeaderIntegrityVerifier = errors.New("nil header integrity verifier")
ErrNilHeaderIntegrityVerifier signals that a nil header integrity verifier has been provided
var ErrNilHeaderSigVerifier = errors.New("nil header sig verifier")
ErrNilHeaderSigVerifier signals that a nil header sig verifier has been provided
var ErrNilHeaderValidator = errors.New("nil header validator")
ErrNilHeaderValidator signals that nil header validator has been provided
var ErrNilHeadersDataPool = errors.New("nil headers data pool")
ErrNilHeadersDataPool signals that a nil headers pool has been provided
var ErrNilHeadersNonceHashStorage = errors.New("nil headers nonce hash storage")
ErrNilHeadersNonceHashStorage signals that a nil header nonce hash storage has been provided
var ErrNilHeadersStorage = errors.New("nil headers storage")
ErrNilHeadersStorage signals that a nil header storage has been provided
var ErrNilHistoryRepository = errors.New("history repository is nil")
ErrNilHistoryRepository signals that history processor is nil
var ErrNilIndexer = errors.New("indexer is nil")
ErrNilIndexer signals that indexer is nil
var ErrNilInterceptedDataFactory = errors.New("nil intercepted data factory")
ErrNilInterceptedDataFactory signals that a nil intercepted data factory was provided
var ErrNilInterceptedDataProcessor = errors.New("nil intercepted data processor")
ErrNilInterceptedDataProcessor signals that a nil intercepted data processor was provided
var ErrNilInterceptorContainer = errors.New("nil interceptor container")
ErrNilInterceptorContainer signals that nil interceptor container has been provided
var ErrNilInterceptorThrottler = errors.New("nil interceptor throttler")
ErrNilInterceptorThrottler signals that a nil interceptor throttler was provided
var ErrNilIntermediateProcessorContainer = errors.New("intermediate processor container is nil")
ErrNilIntermediateProcessorContainer signals that intermediate processors container is nil
var ErrNilIntermediateTransactionHandler = errors.New("intermediate transaction handler is nil")
ErrNilIntermediateTransactionHandler signals that nil intermediate transaction handler was provided
var ErrNilKeyGen = errors.New("nil key generator")
ErrNilKeyGen signals that an operation has been attempted to or with a nil single sign key generator
var ErrNilMarshalizer = errors.New("nil Marshalizer")
ErrNilMarshalizer signals that an operation has been attempted to or with a nil Marshalizer implementation
var ErrNilMessage = errors.New("nil message")
ErrNilMessage signals that a nil message has been received
var ErrNilMessenger = errors.New("nil Messenger")
ErrNilMessenger signals that a nil Messenger object was provided
var ErrNilMetaBlockHeader = errors.New("nil metablock header")
ErrNilMetaBlockHeader signals that an operation has been attempted to or with a nil metablock
var ErrNilMetaBlocksPool = errors.New("nil meta blocks pool")
ErrNilMetaBlocksPool signals that a nil meta blocks pool was used
var ErrNilMinChanceIfZero = errors.New("no min chance ")
ErrNilMinChanceIfZero signals that there was no min chance provided if a chance is still needed
var ErrNilMiniBlock = errors.New("nil mini block")
ErrNilMiniBlock signals that an operation has been attempted with a nil miniblock
var ErrNilMiniBlockPool = errors.New("nil mini block pool")
ErrNilMiniBlockPool signals that a nil mini blocks pool was used
var ErrNilMiniBlocks = errors.New("nil mini blocks")
ErrNilMiniBlocks signals that an operation has been attempted with a nil mini-block
var ErrNilMiniBlocksProvider = errors.New("nil miniblocks provider")
ErrNilMiniBlocksProvider signals that a nil miniblocks data provider has been passed over
var ErrNilMultiSigVerifier = errors.New("nil multi-signature verifier")
ErrNilMultiSigVerifier signals that a nil multi-signature verifier is used
var ErrNilNetworkWatcher = errors.New("nil network watcher")
ErrNilNetworkWatcher signals that a nil network watcher has been provided
var ErrNilNodesConfigProvider = errors.New("nil nodes config provider")
ErrNilNodesConfigProvider signals that an operation has been attempted to or with a nil nodes config provider
var ErrNilNodesCoordinator = errors.New("nil nodes coordinator")
ErrNilNodesCoordinator signals that an operation has been attempted to or with a nil nodes coordinator
var ErrNilNodesSetup = errors.New("nil nodes setup")
ErrNilNodesSetup signals that nil nodes setup has been provided
var ErrNilOrEmptyList = errors.New("nil or empty provided list")
ErrNilOrEmptyList signals that a nil or empty list was provided
var ErrNilPauseHandler = errors.New("nil pause handler")
ErrNilPauseHandler signals that nil pause handler has been provided
var ErrNilPayableHandler = errors.New("nil payableHandler was provided")
ErrNilPayableHandler signals that nil payableHandler was provided
var ErrNilPeerAccountsAdapter = errors.New("nil peer accounts database")
ErrNilPeerAccountsAdapter signals that a nil peer accounts database was provided
var ErrNilPeerShardMapper = errors.New("nil peer shard mapper")
ErrNilPeerShardMapper signals that a nil peer shard mapper has been provided
var ErrNilPeerValidatorMapper = errors.New("nil peer validator mapper")
ErrNilPeerValidatorMapper signals that nil peer validator mapper has been provided
var ErrNilPendingMiniBlocksHandler = errors.New("nil pending miniblocks handler")
ErrNilPendingMiniBlocksHandler signals that a nil pending miniblocks handler has been provided
var ErrNilPoolsHolder = errors.New("nil pools holder")
ErrNilPoolsHolder signals that an operation has been attempted to or with a nil pools holder object
var ErrNilPreProcessor = errors.New("preprocessor is nil")
ErrNilPreProcessor signals that preprocessors is nil
var ErrNilPreProcessorsContainer = errors.New("preprocessors container is nil")
ErrNilPreProcessorsContainer signals that preprocessors container is nil
var ErrNilPrevRandSeed = errors.New("provided previous rand seed is nil")
ErrNilPrevRandSeed signals that a nil previous rand seed has been provided
var ErrNilPreviousBlockHash = errors.New("nil previous block header hash")
ErrNilPreviousBlockHash signals that a operation has been attempted with a nil previous block header hash
var ErrNilProtocolSustainabilityAddress = errors.New("nil protocol sustainability address")
ErrNilProtocolSustainabilityAddress signals that a nil protocol sustainability address was provided
var ErrNilPubKeysBitmap = errors.New("nil public keys bitmap")
ErrNilPubKeysBitmap signals that a operation has been attempted with a nil public keys bitmap
var ErrNilPubkeyConverter = errors.New("nil pubkey converter")
ErrNilPubkeyConverter signals that an operation has been attempted to or with a nil public key converter implementation
var ErrNilQuotaStatusHandler = errors.New("nil quota status handler")
ErrNilQuotaStatusHandler signals that a nil quota status handler has been provided
var ErrNilRandSeed = errors.New("provided rand seed is nil")
ErrNilRandSeed signals that a nil rand seed has been provided
var ErrNilRater = errors.New("nil rater")
ErrNilRater signals that nil rater has been provided
var ErrNilRatingsInfoHandler = errors.New("nil ratings info handler")
ErrNilRatingsInfoHandler signals that nil ratings info handler has been provided
var ErrNilRcvAddr = errors.New("nil receiver address")
ErrNilRcvAddr signals that an operation has been attempted to or with a nil receiver address
var ErrNilReceiptHandler = errors.New("nil receipt handler")
ErrNilReceiptHandler signals that receipt handler is nil
var ErrNilRequestHandler = errors.New("nil request handler")
ErrNilRequestHandler signals that a nil request handler interface was provided
var ErrNilRewardTransaction = errors.New("reward transaction is nil")
ErrNilRewardTransaction signals that the reward transaction is nil
var ErrNilRewardTxDataPool = errors.New("reward transactions pool is nil")
ErrNilRewardTxDataPool signals that the reward transactions pool is nil
var ErrNilRewardsCreator = errors.New("nil epoch start rewards creator")
ErrNilRewardsCreator signals that nil epoch start rewards creator was provided
var ErrNilRewardsHandler = errors.New("rewards handler is nil")
ErrNilRewardsHandler signals that rewards handler is nil
var ErrNilRewardsTxProcessor = errors.New("nil rewards transaction processor")
ErrNilRewardsTxProcessor signals that the rewards transaction processor is nil
var ErrNilRootHash = errors.New("root hash is nil")
ErrNilRootHash signals that an operation has been attempted with a nil root hash
var ErrNilRounder = errors.New("nil Rounder")
ErrNilRounder signals that an operation has been attempted to or with a nil Rounder implementation
var ErrNilSCDestAccount = errors.New("nil destination SC account")
ErrNilSCDestAccount signals that destination account is nil
var ErrNilSCToProtocol = errors.New("nil sc to protocol")
ErrNilSCToProtocol signals that nil smart contract to protocol handler has been provided
var ErrNilScAddress = errors.New("nil SC address")
ErrNilScAddress signals that a nil smart contract address has been provided
var ErrNilScQueryElement = errors.New("nil SC query service element")
ErrNilScQueryElement signals that a nil sc query service element was provided
var ErrNilShardCoordinator = errors.New("nil shard coordinator")
ErrNilShardCoordinator signals that an operation has been attempted to or with a nil shard coordinator
var ErrNilShardedDataCacherNotifier = errors.New("nil sharded data cacher notifier")
ErrNilShardedDataCacherNotifier signals that a nil sharded data cacher notifier has been provided
var ErrNilSignature = errors.New("nil signature")
ErrNilSignature signals that a operation has been attempted with a nil signature
var ErrNilSingleSigner = errors.New("nil single signer")
ErrNilSingleSigner signals that a nil single signer is used
var ErrNilSmartContractProcessor = errors.New("smart contract processor is nil")
ErrNilSmartContractProcessor signals that smart contract call executor is nil
var ErrNilSmartContractResult = errors.New("smart contract result is nil")
ErrNilSmartContractResult signals that the smart contract result is nil
var ErrNilSmartContractResultProcessor = errors.New("nil smart contract result processor")
ErrNilSmartContractResultProcessor signals that smart contract result processor is nil
var ErrNilSndAddr = errors.New("nil sender address")
ErrNilSndAddr signals that an operation has been attempted to or with a nil sender address
var ErrNilStorage = errors.New("nil storage")
ErrNilStorage signals that a nil storage has been provided
var ErrNilStore = errors.New("nil data storage service")
ErrNilStore signals that the provided storage service is nil
var ErrNilSystemSCConfig = errors.New("nil system sc config")
ErrNilSystemSCConfig signals that nil system sc config was provided
var ErrNilTemporaryAccountsHandler = errors.New("temporary accounts handler is nil")
ErrNilTemporaryAccountsHandler signals that temporary accounts handler is nil
var ErrNilTopicFloodPreventer = errors.New("nil topic flood preventer")
ErrNilTopicFloodPreventer signals that a nil topic flood preventer has been provided
var ErrNilTpsBenchmark = errors.New("tps benchmark object is nil")
ErrNilTpsBenchmark signals that tps benchmark object is nil
var ErrNilTransaction = errors.New("nil transaction")
ErrNilTransaction signals that an operation has been attempted to or with a nil transaction
var ErrNilTransactionCoordinator = errors.New("transaction coordinator is nil")
ErrNilTransactionCoordinator signals that transaction coordinator is nil
var ErrNilTransactionPool = errors.New("nil transaction pool")
ErrNilTransactionPool signals that a nil transaction pool was used
var ErrNilTransactionVersionChecker = errors.New("nil transaction version checker")
ErrNilTransactionVersionChecker signals that provided transaction version checker is nil
var ErrNilTxBlockBody = errors.New("nil tx block body")
ErrNilTxBlockBody signals that an operation has been attempted to or with a nil tx block body
var ErrNilTxDataPool = errors.New("nil transaction data pool")
ErrNilTxDataPool signals that a nil transaction pool has been provided
var ErrNilTxForCurrentBlockHandler = errors.New("nil tx for current block handler")
ErrNilTxForCurrentBlockHandler signals that nil tx for current block handler has been provided
var ErrNilTxHash = errors.New("nil transaction hash")
ErrNilTxHash signals that an operation has been attempted with a nil hash
var ErrNilTxLogsProcessor = errors.New("nil transaction logs processor")
ErrNilTxLogsProcessor is the error returned when a transaction has no logs
var ErrNilTxProcessor = errors.New("nil transactions processor")
ErrNilTxProcessor signals that a nil transactions processor was used
var ErrNilTxStorage = errors.New("nil transaction storage")
ErrNilTxStorage signals that a nil transaction storage has been provided
var ErrNilTxTypeHandler = errors.New("nil tx type handler")
ErrNilTxTypeHandler signals that tx type handler is nil
var ErrNilTxValidator = errors.New("nil transaction validator")
ErrNilTxValidator signals that a nil tx validator has been provided
var ErrNilUTxDataPool = errors.New("unsigned transactions pool is nil")
ErrNilUTxDataPool signals that unsigned transaction pool is nil
var ErrNilUTxStorage = errors.New("unsigned transactions storage is nil")
ErrNilUTxStorage signals that unsigned transaction storage is nil
var ErrNilUint64Converter = errors.New("unit64converter is nil")
ErrNilUint64Converter signals that uint64converter is nil
var ErrNilUnsignedTxDataPool = errors.New("unsigned transactions pool is nil")
ErrNilUnsignedTxDataPool signals that the unsigned transactions pool is nil
var ErrNilUnsignedTxHandler = errors.New("nil unsigned tx handler")
ErrNilUnsignedTxHandler signals that the unsigned tx handler is nil
var ErrNilUserAccount = errors.New("nil user account")
ErrNilUserAccount signals that nil user account was provided
var ErrNilVMOutput = errors.New("nil vm output")
ErrNilVMOutput signals that vmoutput is nil
var ErrNilValidatorInfos = errors.New("nil validator infos")
ErrNilValidatorInfos signals that a nil validator infos has been provided
var ErrNilValidatorStatistics = errors.New("nil validator statistics")
ErrNilValidatorStatistics signals that a nil validator statistics has been provided
var ErrNilValidityAttester = errors.New("nil validity attester")
ErrNilValidityAttester signals that a nil validity attester has been provided
var ErrNilValue = errors.New("nil value")
ErrNilValue signals the value is nil
var ErrNilValueFromRewardTransaction = errors.New("transferred value is nil in reward transaction")
ErrNilValueFromRewardTransaction signals that the transfered value is nil
var ErrNilVmInput = errors.New("nil vm input")
ErrNilVmInput signals that provided vm input is nil
var ErrNilWhiteListHandler = errors.New("nil whitelist handler")
ErrNilWhiteListHandler signals that white list handler is nil
var ErrNoChancesForMaxThreshold = errors.New("max threshold has no chances")
ErrNoChancesForMaxThreshold signals that the max threshold has no chance defined
var ErrNoChancesProvided = errors.New("no chances are provided")
ErrNoChancesProvided signals that there were no chances provided
var ErrNoDataInMessage = errors.New("no data found in received message")
ErrNoDataInMessage signals that no data was found after parsing received p2p message
var ErrNoVM = errors.New("no VM (hook not set)")
ErrNoVM signals that no SCHandler has been set
var ErrNotEnoughGas = errors.New("not enough gas was sent in the transaction")
ErrNotEnoughGas signals that not enough gas has been provided
var ErrNotEnoughGasInUserTx = errors.New("not enough gas provided in user tx")
ErrNotEnoughGasInUserTx signals that not enough gas was provided in user tx
var ErrNotEnoughValidBlocksInStorage = errors.New("not enough valid blocks to start from storage")
ErrNotEnoughValidBlocksInStorage signals that bootstrap from storage failed due to not enough valid blocks stored
var ErrNotEpochStartBlock = errors.New("not epoch start block")
ErrNotEpochStartBlock signals that block is not of type epoch start
var ErrNotarizedHeadersSliceForShardIsNil = errors.New("notarized headers slice for shard is nil")
ErrNotarizedHeadersSliceForShardIsNil signals that the slice holding notarized headers for shard is nil
var ErrNotarizedHeadersSliceIsNil = errors.New("notarized headers slice is nil")
ErrNotarizedHeadersSliceIsNil signals that the slice holding notarized headers is nil
var ErrOnlySystemAccountAccepted = errors.New("only system account is accepted")
ErrOnlySystemAccountAccepted signals that only system account is accepted
var ErrOnlyValidatorsCanUseThisTopic = errors.New("only validators can use this topic")
ErrOnlyValidatorsCanUseThisTopic signals that topic can be used by validator only
var ErrOperationNotPermitted = errors.New("operation in account not permitted")
ErrOperationNotPermitted signals that operation is not permitted
var ErrOriginatorIsBlacklisted = errors.New("originator is blacklisted")
ErrOriginatorIsBlacklisted signals that a message originator is blacklisted on the current node
var ErrOverallBalanceChangeFromSC = errors.New("SC output balance updates are wrong")
ErrOverallBalanceChangeFromSC signals that all sumed balance changes are not zero
var ErrOverflow = errors.New("type overflow occured")
ErrOverflow signals that an overflow occured
var ErrRandSeedDoesNotMatch = errors.New("random seed do not match")
ErrRandSeedDoesNotMatch signals that random seed does not match with the previous one
var ErrReceiptsHashMissmatch = errors.New("receipts hash missmatch")
ErrReceiptsHashMissmatch signals that overall receipts has does not match
var ErrRecursiveRelayedTxIsNotAllowed = errors.New("recursive relayed tx is not allowed")
ErrRecursiveRelayedTxIsNotAllowed signals that recursive relayed tx is not allowed
var ErrRelayedGasPriceMissmatch = errors.New("relayed gas price missmatch")
ErrRelayedGasPriceMissmatch signals that relayed gas price is not equal with user tx
var ErrRelayedTxBeneficiaryDoesNotMatchReceiver = errors.New("invalid address in relayed tx")
ErrRelayedTxBeneficiaryDoesNotMatchReceiver signals that an invalid address was provided in the relayed tx
var ErrRelayedTxDisabled = errors.New("relayed tx is disabled")
ErrRelayedTxDisabled signals that relayed tx are disabled
var ErrRelayedTxGasLimitMissmatch = errors.New("relayed tx gas limit higher then user tx gas limit")
ErrRelayedTxGasLimitMissmatch signals that relayed tx gas limit is higher then user tx gas limit
var ErrRelayedTxValueHigherThenUserTxValue = errors.New("relayed tx value is higher than user tx value")
ErrRelayedTxValueHigherThenUserTxValue signals that relayed tx value is higher then user tx value
var ErrReservedFieldNotSupportedYet = errors.New("reserved field not supported yet")
ErrReservedFieldNotSupportedYet signals that reserved field is not empty
var ErrRewardMiniBlockNotFromMeta = errors.New("rewards miniblocks should come only from meta")
ErrRewardMiniBlockNotFromMeta signals that miniblock has a different sender shard than meta
var ErrRootStateDoesNotMatch = errors.New("root state does not match")
ErrRootStateDoesNotMatch signals that root state does not match
var ErrSCDeployFromSCRIsNotPermitted = errors.New("it is not permitted to deploy a smart contract from another smart contract cross shard")
ErrSCDeployFromSCRIsNotPermitted signals that operation is not permitted
var ErrShardIdMissmatch = errors.New("shard ID missmatch")
ErrShardIdMissmatch signals shard ID does not match expectations
var ErrShardIsStuck = errors.New("shard is stuck")
ErrShardIsStuck signals that a shard is stuck
var ErrSignedBlocksThresholdNotBetweenZeroAndOne = errors.New("signed blocks threshold is not between 0 and 1")
ErrSignedBlocksThresholdNotBetweenZeroAndOne signals that the signed blocks threshold is not between 0 and 1
var ErrSmartContractDeploymentIsDisabled = errors.New("smart Contract deployment is disabled")
ErrSmartContractDeploymentIsDisabled signals that smart contract deployment was disabled
var ErrStartRatingNotBetweenMinAndMax = errors.New("start rating is not between min and max rating")
ErrStartRatingNotBetweenMinAndMax signals that the start rating is not between min and max rating
var ErrSystemBusy = errors.New("system busy")
ErrSystemBusy signals that the system is busy
var ErrTimeIsOut = errors.New("time is out")
ErrTimeIsOut signals that time is out
var ErrTooManyReceiptsMiniBlocks = errors.New("too many receipts miniblocks")
ErrTooManyReceiptsMiniBlocks signals that there were too many receipts miniblocks created
var ErrTransactionIsNotWhitelisted = errors.New("transaction is not whitelisted")
ErrTransactionIsNotWhitelisted signals that a transaction is not whitelisted
var ErrTransactionSignedWithHashIsNotEnabled = errors.New("transaction signed with hash is not enabled")
ErrTransactionSignedWithHashIsNotEnabled signals that a transaction signed with hash is not enabled
var ErrTxNotFound = errors.New("transaction not found")
ErrTxNotFound signals that a transaction has not found
var ErrTxValueOutOfBounds = errors.New("tx value is out of bounds")
ErrTxValueOutOfBounds signals that transaction value is out of bounds
var ErrTxValueTooBig = errors.New("tx value is too big")
ErrTxValueTooBig signals that transaction value is too big
var ErrUnknownBlockType = errors.New("block type is unknown")
ErrUnknownBlockType signals that block type is not correct
var ErrUnmarshalWithoutSuccess = errors.New("unmarshal without success")
ErrUnmarshalWithoutSuccess signals that unmarshal some data was not done with success
var ErrUpgradeNotAllowed = errors.New("upgrade is allowed only for owner")
ErrUpgradeNotAllowed signals that upgrade is not allowed
var ErrUserNameChangeIsDisabled = errors.New("user name change is disabled")
ErrUserNameChangeIsDisabled signals the user name change is not allowed
var ErrUserNameDoesNotMatch = errors.New("user name does not match")
ErrUserNameDoesNotMatch signals that user name does not match
var ErrUserNameDoesNotMatchInCrossShardTx = errors.New("user name does not match in destination shard")
ErrUserNameDoesNotMatchInCrossShardTx signals that user name does not match in case of cross shard tx
var ErrValidatorInfoMiniBlockNotFromMeta = errors.New("validatorInfo miniblocks should come only from meta")
ErrValidatorInfoMiniBlockNotFromMeta signals that miniblock has a different sender shard than meta
var ErrValidatorStatsRootHashDoesNotMatch = errors.New("root hash for validator statistics does not match")
ErrValidatorStatsRootHashDoesNotMatch signals that the root hash for the validator statistics does not match
var ErrWrongNonceInBlock = errors.New("wrong nonce in block")
ErrWrongNonceInBlock signals the nonce in block is different than expected nonce
var ErrWrongNonceInVMOutput = errors.New("nonce invalid from SC run")
ErrWrongNonceInVMOutput signals that nonce in vm output is wrong
var ErrWrongTransaction = errors.New("invalid transaction")
ErrWrongTransaction signals that transaction is invalid
var ErrWrongTypeAssertion = errors.New("wrong type assertion")
ErrWrongTypeAssertion signals that an type assertion failed
var ErrWrongTypeInContainer = errors.New("wrong type of object inside container")
ErrWrongTypeInContainer signals that a wrong type of object was found in container
var ErrWrongTypeInMiniBlock = errors.New("type in miniblock is not correct for processing")
ErrWrongTypeInMiniBlock signals that type is not correct for processing
var ErrZeroMaxComputableRounds = errors.New("max computable rounds is zero")
ErrZeroMaxComputableRounds signals that a value of zero was provided on the maxComputableRounds
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 DisplayProcessTxDetails ¶
func DisplayProcessTxDetails( message string, accountHandler state.AccountHandler, txHandler data.TransactionHandler, addressPubkeyConverter core.PubkeyConverter, )
DisplayProcessTxDetails displays information related to the tx which should be executed
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 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 GetShardHeader ¶
func GetShardHeader( hash []byte, headersCacher dataRetriever.HeadersPool, marshalizer marshal.Marshalizer, storageService dataRetriever.StorageService, ) (*block.Header, 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, ) (*block.Header, 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, ) (*block.Header, []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, ) (*block.Header, 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, ) (*block.Header, []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, ) (*block.Header, []byte, error)
GetShardHeaderWithNonce method returns a shard block header with a given nonce and shardId
func GetSortedStorageUpdates ¶ added in v1.1.1
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, searchFirst bool, ) (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, searchFirst bool, ) (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 IsAllowedToSaveUnderKey ¶ added in v1.0.114
IsAllowedToSaveUnderKey returns if saving key-value in data tries under given key is allowed
func IsInProperRound ¶
IsInProperRound checks if the given round index satisfies the round modulus trigger
func IsShardCacherIdentifierForSourceMe ¶ added in v1.0.123
IsShardCacherIdentifierForSourceMe checks whether the specified cache is for the pair (sender = me, destination = *)
func ParseShardCacherIdentifier ¶
ParseShardCacherIdentifier parses an identifier into its components: sender shard, destination shard
func ShardCacherIdentifier ¶
ShardCacherIdentifier generates a string identifier between 2 shards
func SortHeadersByNonce ¶
func SortHeadersByNonce(headers []data.HeaderHandler)
SortHeadersByNonce will sort a given list of headers by nonce
func SortVMOutputInsideData ¶ added in v1.1.1
func SortVMOutputInsideData(vmOutput *vmcommon.VMOutput) []*vmcommon.OutputAccount
SortVMOutputInsideData returns the output accounts as a sorted list
Types ¶
type AntifloodDebugger ¶ added in v1.0.127
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) 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 ¶ added in v1.1.12
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 { IsPayable(address []byte) (bool, error) SetCurrentHeader(hdr data.HeaderHandler) GetBuiltInFunctions() BuiltInFunctionContainer NewAddress(creatorAddress []byte, creatorNonce uint64, vmType []byte) ([]byte, error) DeleteCompiledCode(codeHash []byte) 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 CommitBlock(header data.HeaderHandler, body data.BodyHandler) error RevertAccountState(header data.HeaderHandler) PruneStateOnRollback(currHeader data.HeaderHandler, prevHeader data.HeaderHandler) RevertStateToBlock(header data.HeaderHandler) error CreateNewHeader(round uint64, nonce uint64) data.HeaderHandler RestoreBlockIntoPools(header data.HeaderHandler, body data.BodyHandler) error CreateBlock(initialHdr data.HeaderHandler, haveTime func() bool) (data.HeaderHandler, data.BodyHandler, error) ApplyProcessedMiniBlocks(processedMiniBlocks *processedMb.ProcessedMiniBlockTracker) 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) 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 CheckBlockAgainstRounder(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 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() core.NodeState StartSyncingBlocks() SetStatusHandler(handler core.AppStatusHandler) error IsInterfaceNil() bool }
Bootstrapper is an interface that defines the behaviour of a struct that is able to synchronize the node
type BootstrapperFromStorage ¶
type BootstrapperFromStorage interface { LoadFromStorage() error GetHighestBlockNonce() uint64 IsInterfaceNil() bool }
BootstrapperFromStorage is the interface needed by boot component to load data from storage
type BuiltInCost ¶ added in v1.1.12
type BuiltInCost struct { ChangeOwnerAddress uint64 ClaimDeveloperRewards uint64 SaveUserName uint64 SaveKeyValue uint64 ESDTTransfer uint64 ESDTBurn uint64 }
BuiltInCost defines cost for built-in methods
type BuiltInFunctionContainer ¶ added in v1.0.103
type BuiltInFunctionContainer interface { Get(key string) (BuiltinFunction, error) Add(key string, function BuiltinFunction) error Replace(key string, function BuiltinFunction) error Remove(key string) Len() int Keys() map[string]struct{} IsInterfaceNil() bool }
BuiltInFunctionContainer defines the methods for the built-in protocol container
type BuiltinFunction ¶
type BuiltinFunction interface { ProcessBuiltinFunction(acntSnd, acntDst state.UserAccountHandler, vmInput *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error) SetNewGasConfig(gasCost *GasCost) IsInterfaceNil() bool }
BuiltinFunction defines the methods for the built-in protocol smart contract functions
type CallArgumentsParser ¶ added in v1.0.133
type CallArgumentsParser interface { ParseData(data string) (string, [][]byte, error) IsInterfaceNil() bool }
CallArgumentsParser defines the functionality to parse transaction data into call arguments
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 DataMarshalizer ¶
DataMarshalizer defines the behavior of a structure that is able to marshalize containing data
type DataPacker ¶
type DataPacker interface { PackDataInChunks(data [][]byte, limit int) ([][]byte, error) IsInterfaceNil() bool }
DataPacker can split a large slice of byte slices in smaller packets
type DeployArgumentsParser ¶ added in v1.0.133
type DeployArgumentsParser interface { ParseData(data string) (*parsers.DeployArgs, error) IsInterfaceNil() bool }
DeployArgumentsParser defines the functionality to parse transaction data into call arguments
type ESDTPauseHandler ¶ added in v1.1.3
ESDTPauseHandler provides IsPaused function for an ESDT token
type EconomicsDataHandler ¶ added in v1.1.15
type EconomicsDataHandler interface { DeveloperPercentage() float64 MaxGasLimitPerBlock(shardID uint32) uint64 ComputeGasLimit(tx TransactionWithFeeHandler) uint64 ComputeMoveBalanceFee(tx TransactionWithFeeHandler) *big.Int ComputeTxFee(tx TransactionWithFeeHandler) *big.Int CheckValidityTxValues(tx TransactionWithFeeHandler) error MinGasPrice() uint64 GasPriceModifier() float64 LeaderPercentage() float64 ProtocolSustainabilityPercentage() float64 ProtocolSustainabilityAddress() string MinInflationRate() float64 MaxInflationRate(year uint32) float64 GasPerDataByte() uint64 MinGasLimit() uint64 GenesisTotalSupply() *big.Int ComputeFeeForProcessing(tx TransactionWithFeeHandler, gasToUse uint64) *big.Int RewardsTopUpGradientPoint() *big.Int RewardsTopUpFactor() float64 SplitTxGasInCategories(tx TransactionWithFeeHandler) (uint64, uint64) GasPriceForProcessing(tx TransactionWithFeeHandler) uint64 GasPriceForMove(tx TransactionWithFeeHandler) uint64 MinGasPriceForProcessing() uint64 IsInterfaceNil() bool }
EconomicsDataHandler is able to perform economics calculations and return economics data
type EndOfEpochEconomics ¶
type EndOfEpochEconomics interface { ComputeEndOfEpochEconomics(metaBlock *block.MetaBlock) (*block.Economics, error) VerifyRewardsPerBlock(metaBlock *block.MetaBlock, correctedProtocolSustainability *big.Int, computedEconomics *block.Economics) error IsInterfaceNil() bool }
EndOfEpochEconomics defines the functionality that is needed to compute end of epoch economics data
type EpochBootstrapper ¶
EpochBootstrapper defines the actions needed by bootstrapper
type EpochHandler ¶ added in v1.0.117
EpochHandler defines what a component which handles current epoch should be able to do
type EpochNotifier ¶ added in v1.1.1
type EpochNotifier interface { RegisterNotifyHandler(handler core.EpochSubscriberHandler) CurrentEpoch() uint32 CheckEpoch(epoch uint32) 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 ¶ added in v1.0.117
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 ¶ added in v1.1.1
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 SaveValidatorInfoBlocksToStorage(metaBlock *block.MetaBlock, body *block.Body) DeleteValidatorInfoBlocksFromStorage(metaBlock *block.MetaBlock) RemoveBlockDataFromPools(metaBlock *block.MetaBlock, body *block.Body) IsInterfaceNil() bool }
EpochStartValidatorInfoCreator defines the functionality for the metachain to create validator statistics at end of epoch
type FallbackHeaderValidator ¶ added in v1.1.3
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 { DeveloperPercentage() float64 MaxGasLimitPerBlock(shardID uint32) uint64 ComputeGasLimit(tx TransactionWithFeeHandler) uint64 ComputeMoveBalanceFee(tx TransactionWithFeeHandler) *big.Int ComputeTxFee(tx TransactionWithFeeHandler) *big.Int CheckValidityTxValues(tx TransactionWithFeeHandler) error ComputeFeeForProcessing(tx TransactionWithFeeHandler, gasToUse uint64) *big.Int MinGasPrice() uint64 GasPriceModifier() float64 IsInterfaceNil() bool }
FeeHandler is able to perform some economics calculation on a provided transaction
type FloodPreventer ¶
type FloodPreventer interface { IncreaseLoad(pid core.PeerID, size uint64) error ApplyConsensusSize(size int) Reset() IsInterfaceNil() bool }
FloodPreventer defines the behavior of a component that is able to signal that too many events occurred on a provided identifier between Reset calls
type ForkDetector ¶
type ForkDetector interface { AddHeader(header data.HeaderHandler, headerHash []byte, state BlockHeaderState, selfNotarizedHeaders []data.HeaderHandler, selfNotarizedHeadersHashes [][]byte) error RemoveHeader(nonce uint64, hash []byte) CheckFork() *ForkInfo GetHighestFinalBlockNonce() uint64 GetHighestFinalBlockHash() []byte ProbableHighestNonce() uint64 ResetFork() SetRollBackNonce(nonce uint64) RestoreToGenesis() GetNotarizedHeaderHash(nonce uint64) []byte ResetProbableHighestNonce() SetFinalToLastCheckpoint() IsInterfaceNil() bool }
ForkDetector is an interface that defines the behaviour of a struct that is able to detect forks
type GasCost ¶ added in v1.1.12
type GasCost struct { BaseOperationCost BaseOperationCost BuiltInCost BuiltInCost }
GasCost holds all the needed gas costs for system smart contracts
type GasHandler ¶
type GasHandler interface { Init() SetGasConsumed(gasConsumed uint64, hash []byte) SetGasRefunded(gasRefunded uint64, hash []byte) GasConsumed(hash []byte) uint64 GasRefunded(hash []byte) uint64 TotalGasConsumed() uint64 TotalGasRefunded() uint64 RemoveGasConsumed(hashes [][]byte) RemoveGasRefunded(hashes [][]byte) ComputeGasConsumedByMiniBlock(*block.MiniBlock, map[string]data.TransactionHandler) (uint64, uint64, error) ComputeGasConsumedByTx(txSenderShardId uint32, txReceiverShardId uint32, txHandler data.TransactionHandler) (uint64, uint64, error) IsInterfaceNil() bool }
GasHandler is able to perform some gas calculation
type HashAccesser ¶
HashAccesser interface provides functionality over hashable objects
type HdrValidatorHandler ¶
type HdrValidatorHandler interface { Hash() []byte HeaderHandler() data.HeaderHandler }
HdrValidatorHandler defines the functionality that is needed for a HdrValidator to validate a header
type HeaderConstructionValidator ¶
type HeaderConstructionValidator interface { IsHeaderConstructionValid(currHdr, prevHdr data.HeaderHandler) error IsInterfaceNil() bool }
HeaderConstructionValidator provides functionality to verify header construction
type HeaderIntegrityVerifier ¶ added in v1.1.1
type HeaderIntegrityVerifier interface { Verify(header data.HeaderHandler) error GetVersion(epoch uint32) string IsInterfaceNil() bool }
HeaderIntegrityVerifier is the interface needed to check that a header's integrity is correct
type HeaderValidator ¶
type HeaderValidator interface { HeaderValidForProcessing(headerHandler HdrValidatorHandler) error IsInterfaceNil() bool }
HeaderValidator can determine if a provided header handler is valid or not from the process point of view
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 ¶ added in v1.0.127
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 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 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{})) 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) 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() error GetAllCurrentFinishedTxs() map[string]data.TransactionHandler CreateBlockStarted() GetCreatedInShardMiniBlock() *block.MiniBlock RemoveProcessedResultsFor(txHashes [][]byte) IsInterfaceNil() bool }
IntermediateTransactionHandler handles transactions which are not resolved in only one step
type MiniBlockProvider ¶ added in v1.0.104
type MiniBlockProvider interface { GetMiniBlocks(hashes [][]byte) ([]*MiniblockAndHash, [][]byte) GetMiniBlocksFromPool(hashes [][]byte) ([]*MiniblockAndHash, [][]byte) IsInterfaceNil() bool }
MiniBlockProvider defines what a miniblock data provider should do
type MiniblockAndHash ¶ added in v1.0.111
MiniblockAndHash holds the info related to a miniblock and its hash
type NetworkConnectionWatcher ¶
NetworkConnectionWatcher defines a watchdog functionality used to specify if the current node is still connected to the rest of the network
type NodesCoordinator ¶ added in v1.0.117
type NodesCoordinator interface { 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 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 }
P2PAntifloodHandler defines the behavior of a component able to signal that the system is too busy (or flooded) processing p2p messages
type PayableHandler ¶ added in v1.1.3
PayableHandler provides IsPayable function which returns if an account is payable or not
type PeerBlackListCacher ¶ added in v1.0.133
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 ¶ added in v1.0.133
type PeerShardMapper interface { GetPeerInfo(pid core.PeerID) core.P2PPeerInfo IsInterfaceNil() bool }
PeerShardMapper can return the public key of a provided peer ID
type PeerValidatorMapper ¶ added in v1.0.133
type PeerValidatorMapper interface { GetPeerInfo(pid core.PeerID) core.P2PPeerInfo IsInterfaceNil() bool }
PeerValidatorMapper can determine the peer info from a peer id
type PendingMiniBlocksHandler ¶
type PendingMiniBlocksHandler interface { AddProcessedHeader(handler data.HeaderHandler) error RevertHeader(handler data.HeaderHandler) error GetPendingMiniBlocks(shardID uint32) [][]byte SetPendingMiniBlocks(shardID uint32, mbHashes [][]byte) IsInterfaceNil() bool }
PendingMiniBlocksHandler is an interface to keep unfinalized miniblocks
type PoolsCleaner ¶
PoolsCleaner defines the functionality to clean pools for old records
type PreProcessor ¶
type PreProcessor interface { CreateBlockStarted() IsDataPrepared(requestedTxs int, haveTime func() time.Duration) error RemoveBlockDataFromPools(body *block.Body, miniBlockPool storage.Cacher) error RemoveTxsFromPools(body *block.Body) error RestoreBlockDataIntoPools(body *block.Body, miniBlockPool storage.Cacher) (int, error) SaveTxsToStorage(body *block.Body) error ProcessBlockTransactions(body *block.Body, haveTime func() bool) error RequestBlockTransactions(body *block.Body) int RequestTransactionsForMiniBlock(miniBlock *block.MiniBlock) int ProcessMiniBlock(miniBlock *block.MiniBlock, haveTime func() bool, getNumOfCrossInterMbsAndTxs func() (int, int)) ([][]byte, error) CreateAndProcessMiniBlocks(haveTime func() bool) (block.MiniBlockSlice, error) GetAllCurrentUsedTxs() map[string]data.TransactionHandler IsInterfaceNil() bool }
PreProcessor is an interface used to prepare and process transaction data
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 RatingChanceHandler ¶ added in v0.0.5
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 ¶ added in v0.0.5
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 ¶ added in v0.0.5
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) 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 of 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 ¶ added in v1.1.15
type RewardsCreator interface { CreateRewardsMiniBlocks( metaBlock *block.MetaBlock, validatorsInfo map[uint32][]*state.ValidatorInfo, computedEconomics *block.Economics, ) (block.MiniBlockSlice, error) VerifyRewardsMiniBlocks( metaBlock *block.MetaBlock, validatorsInfo map[uint32][]*state.ValidatorInfo, computedEconomics *block.Economics, ) error GetProtocolSustainabilityRewards() *big.Int GetLocalTxCache() epochStart.TransactionCacher CreateMarshalizedData(body *block.Body) map[string][][]byte GetRewardsTxs(body *block.Body) map[string]data.TransactionHandler SaveTxBlockToStorage(metaBlock *block.MetaBlock, body *block.Body) DeleteTxsFromStorage(metaBlock *block.MetaBlock, body *block.Body) RemoveBlockDataFromPools(metaBlock *block.MetaBlock, body *block.Body) IsInterfaceNil() bool }
RewardsCreator defines the functionality for the metachain to create rewards at end of epoch
type RewardsHandler ¶
type RewardsHandler interface { LeaderPercentage() float64 ProtocolSustainabilityPercentage() float64 ProtocolSustainabilityAddress() string MinInflationRate() float64 MaxInflationRate(year uint32) float64 RewardsTopUpGradientPoint() *big.Int RewardsTopUpFactor() float64 IsInterfaceNil() bool }
RewardsHandler will return information about rewards
type RoundTimeDurationHandler ¶
RoundTimeDurationHandler defines the methods to get the time duration of a round
type SCQuery ¶
type SCQuery struct { ScAddress []byte FuncName string CallerAddr []byte CallValue *big.Int Arguments [][]byte }
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) IsInterfaceNil() bool }
SCQueryService defines how data should be get from a SC account
type SelectionChance ¶
SelectionChance defines the actions which should be handled by a round implementation
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 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(address []byte) (bool, 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 StorageArgumentsParser ¶ added in v1.0.133
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 ¶ added in v1.0.133
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, 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) error RestoreBlockDataFromStorage(body *block.Body) (int, error) RemoveBlockDataFromPool(body *block.Body) error RemoveTxsFromPool(body *block.Body) error ProcessBlockTransaction(body *block.Body, haveTime func() time.Duration) error CreateBlockStarted() CreateMbsAndProcessCrossShardTransactionsDstMe( header data.HeaderHandler, processedMiniBlocksHashes map[string]struct{}, haveTime func() bool, ) (block.MiniBlockSlice, uint32, bool, error) CreateMbsAndProcessTransactionsFromMe(haveTime func() bool) block.MiniBlockSlice CreatePostProcessMiniBlocks() block.MiniBlockSlice CreateMarshalizedData(body *block.Body) map[string][][]byte GetAllCurrentUsedTxs(blockType block.Type) map[string]data.TransactionHandler CreateReceiptsHash() ([]byte, error) VerifyCreatedBlockTransactions(hdr data.HeaderHandler, body *block.Body) error CreateMarshalizedReceipts() ([]byte, error) IsInterfaceNil() bool }
TransactionCoordinator is an interface to coordinate transaction processing using multiple processors
type TransactionFeeCalculator ¶ added in v1.1.18
type TransactionFeeCalculator interface { ComputeGasUsedAndFeeBasedOnRefundValue(tx TransactionWithFeeHandler, refundValue *big.Int) (uint64, *big.Int) ComputeTxFeeBasedOnGasUsed(tx TransactionWithFeeHandler, gasUsed uint64) *big.Int ComputeGasLimit(tx TransactionWithFeeHandler) uint64 IsInterfaceNil() bool }
TransactionFeeCalculator is able to calculated fee of a transaction
type TransactionFeeHandler ¶
type TransactionFeeHandler interface { CreateBlockStarted() GetAccumulatedFees() *big.Int GetDeveloperFees() *big.Int ProcessTransactionFee(cost *big.Int, devFee *big.Int, txHash []byte) RevertFees(txHashes [][]byte) IsInterfaceNil() bool }
TransactionFeeHandler processes the transaction fee
type TransactionLogProcessor ¶ added in v1.0.104
type TransactionLogProcessor interface { GetLog(txHash []byte) (data.LogHandler, error) SaveLog(txHash []byte, tx data.TransactionHandler, vmLogs []*vmcommon.LogEntry) error IsInterfaceNil() bool }
TransactionLogProcessor is the main interface for saving logs generated by smart contract calls
type TransactionLogProcessorDatabase ¶ added in v1.0.114
type TransactionLogProcessorDatabase interface { GetLogFromCache(txHash []byte) (data.LogHandler, 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) 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 // RewardTx defines ID of a reward transaction RewardTx // InvalidTransaction defines unknown transaction type InvalidTransaction )
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 TransactionWithFeeHandler ¶
type TransactionWithFeeHandler interface { GetGasLimit() uint64 GetGasPrice() uint64 GetData() []byte GetRcvAddr() []byte GetValue() *big.Int }
TransactionWithFeeHandler represents a transaction structure that has economics variables defined
type TxGasHandler ¶ added in v1.1.15
type TxGasHandler interface { SplitTxGasInCategories(tx TransactionWithFeeHandler) (uint64, uint64) GasPriceForProcessing(tx TransactionWithFeeHandler) uint64 GasPriceForMove(tx TransactionWithFeeHandler) uint64 MinGasPrice() uint64 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(txHandler TxValidatorHandler) 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 ¶ added in v1.1.12
type TxVersionCheckerHandler interface { 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 ValidatorInfoSyncer ¶ added in v1.0.102
type ValidatorInfoSyncer interface { SyncMiniBlocks(metaBlock *block.MetaBlock) ([][]byte, data.BodyHandler, error) IsInterfaceNil() bool }
ValidatorInfoSyncer defines the method needed for validatorInfoProcessing
type ValidatorStatisticsProcessor ¶
type ValidatorStatisticsProcessor interface { UpdatePeerState(header data.HeaderHandler, cache map[string]data.HeaderHandler) ([]byte, error) RevertPeerState(header data.HeaderHandler) 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 ¶ added in v0.0.5
type ValidatorsProvider interface { GetLatestValidators() map[string]*state.ValidatorApiResponse IsInterfaceNil() bool }
ValidatorsProvider is the main interface for validators' provider
type ValidityAttester ¶
type ValidityAttester interface { CheckBlockAgainstFinal(headerHandler data.HeaderHandler) error CheckBlockAgainstRounder(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) BlockChainHookImpl() BlockChainHookHandler IsInterfaceNil() bool }
VirtualMachinesContainerFactory defines the functionality to create a virtual machine container
type WhiteListHandler ¶ added in v1.0.102
type WhiteListHandler interface { Remove(keys [][]byte) Add(keys [][]byte) IsWhiteListed(interceptedData InterceptedData) bool IsInterfaceNil() bool }
WhiteListHandler is the interface needed to add whitelisted data